Questions tagged [gui]

Graphical User Interface. A term used to describe the tools available to the player to interact with the game.

Filter by
Sorted by
Tagged with
0
votes
1answer
25 views

What is the Unity 2019.3.5 version of `UnityEngine.UI.Text`?

I was following a tutorial on how to create a dialogue Box in Unity, and in one part of the tutorial the tutor imports UnityEngine.UI and creates an object of type <...
1
vote
2answers
42 views

how to structure game logic for user interfaces of different nature (gui, tui, cli)?

I would like to implement a simple game logic engine that is agnostic to the rendering system, but I don't know how to do that, really... so I would like to have advise and know the state of the art! ...
0
votes
1answer
32 views

Add buttons into List when mouse is HoldDown?

I have three buttons in my menu. What I need to do is when I click on first button it becomes the first element in my list. Now, when I keep mouse button down and move it to the second button it ...
0
votes
1answer
20 views

Change the min width/height of a LayoutElement to scale with the screen size

I want to change the Min Width and Min Height configured in my LayoutElement so that they scale proportionate to the screen size. For example, at a screen resolution of 1920x1080, the min width is 300....
1
vote
2answers
197 views

How to make attention grabbing notifications?

A lot of my play-testers miss the tutorial notifications in my game. The notifications fade into the screen and fade out after the player progresses away from where the tutorial was relevant. I've ...
0
votes
0answers
27 views

How to make a dynamic frontline system for my game?

My problem: Basically the units, units meaning soldiers or vehicles, influence the frontline by moving into the opponents territory (See example image). I'm trying to understand where to even start ...
1
vote
1answer
41 views

Design pattern for menu transitions in C# (Unity)

I am working on my first project in Unity using C# and I am currently trying to design a menu system that does the following sequence of events when a user clicks a button: Button does some effect ...
0
votes
1answer
27 views

Make UI draggable from clicked vertices of UI

I am able to make my UI panel draggable. Here is the script, it will be helpful: ...
0
votes
0answers
20 views

Unity UI Chat Message Expanding Bubble

How do you set up Unity's UI Layout system so that the chat bubble changes in size automatically based on the length of the text? What's the right use of Layout and Content Size Fitter elements? How ...
0
votes
0answers
13 views

Canvas Drag and Drop children within parent

I have a working drag and drop script for gameobjects within a canvas panel. I would like to prevent the panels children from being dragged outside of the panel. I have a somewhat working (although ...
0
votes
0answers
17 views

Horizontal scrollview only

I am using unity's scrollview. I want to disable the vertical scrollbar and i want the viewport to resize vertically depending on the content. Too confusing to explain with word so i have created the ...
0
votes
1answer
22 views

How can I add word wrap to EditorGUILayout.TextArea?

How can I add word wrap to the editor textarea? I'm trying to mimic the [TextArea] attribute (word wrap, automatically increase height when needed) For some reason GUILayout.TextArea() works fine, but ...
0
votes
1answer
23 views

Gradient Input in Game view

I want to develop a little tool to help visualize fireworks before using them in a show in Unity where the user can set several parameters and gets a preview of the firework effect in a preview window....
0
votes
0answers
13 views

Unity TextMeshPro bounds.size is wrong when hovering first time over gameobject

I have this weird issue, which I am not able to fix. This is my third attempt and I need some help. Basically I have a hover element which spawns when I hover over a gameobject. The height of the ...
1
vote
2answers
43 views

Unity: How to work with forms

Today I learned some cool tricks about sizing containers and its children, I mainly using this, because I need to build some forms. But now... It is some preffered way how to handle forms? Or some ...
0
votes
0answers
32 views

Visually edit a libGDX GUI scene

I'm looking for a way to visually edit a libGDX scene. Some way to quickly build an example of a scene using a provided skin and default components, visually, and then export this definition to be ...
1
vote
1answer
80 views

How to move objects across a canvas with consistent speed on different screen resolutions?

I am making a rhythm game in Unity. I have been using Transform.Translate for moving images on a canvas as the music notes. However, I cannot consistently use this method on different screen widths. ...
0
votes
0answers
11 views

Use arrow keys to navigate between specific toggles, not all UI elements

I'm making a game where the player needs to select a object out of three and navigates between then with the arrows of the keyboard, and I'm using toggles to make this system. But the problem is that ...
0
votes
1answer
97 views

Is there no UI culling for unity?

I don't understand, am I missing something? I have hundreds of moving images on screen that only need to render and do their logic/physics when they are in the canvas. Otherwise they can just ...
0
votes
1answer
27 views

Best way to make a Side Panel UI with Libgdx? (Java)

Take this image for example, the game is called Realm of the mad god, and it has this side panel filling the whole screen height with the player info. To reproduce it, Is there any way to make the ...
0
votes
1answer
17 views

Monobehaviour script method does not appear as an option for UI button's On Click

I have the following script, and when I try to use a UI button to call the CheckGuess method, it does not appear as an option: ...
0
votes
1answer
27 views

Controlling Source Image From Script

I am trying to make a health system where hearts display how much health you have. On each heart, I have an Image component. I am trying to control what source image the Image component uses from a ...
0
votes
0answers
23 views

Unity button tint

unity button tint allows me to give a few colors to different modes of the button: normal, highlighted, pressed, and selected colors. I want to fully disable the "selected" mode color, since whenever ...
0
votes
1answer
68 views

Unity UI's Image component renders without anti-aliasing?

I tried the sprite's import settings with point filtering, with billinear filtering, I also tried changing my canvas' UI Scale mode to Screen Space - Camera, but nothing seems to fix it. I also tried ...
1
vote
0answers
21 views

Drawing rectangle around a target on screen

I am just started with Unity and C#. I need in my work to do rectangle on a scene. I have a 3D scene, say some warehouse and there is an object. Camera is animated and moving towards the object. Is it ...
0
votes
1answer
63 views

How to make a 'Picture-book Cutscene' in Unity 2D with simple 2D images?

I'm trying to implement a simple cutscene system in my Unity game, preferably one that allows cutscenes to play at the start and end of each of the levels. What I was imagining was pretty similar to ...
0
votes
1answer
33 views

UI Sprite in Unity3D is badly drawn? (Possibly anti-aliasing problem)

I move a 28x42 Image, in a 11x17 RectTransform in Update, with anti-aliasing on, without compression, with point filtering. But sadly its visuals aren't smooth, it's flickery, even in a standalone ...
0
votes
1answer
37 views

How do I display the next speaker image in my dialogue?

I am working on a dialogue system and while the text part works, the UI for the Dialogue Boxes does not. When I click on the Continue button, I want the script to go down the Elements [] and use the ...
0
votes
1answer
47 views

How to position/transform vertices for 2D UI in shaders?

I am building a 3D engine and have a rendering abstraction that focuses on writing shaders. Most my 3D shaders have gl_Position output like: ...
0
votes
1answer
56 views

Unity UI Objects edges are not smooth

I have this Unity UI Image placeholder and here is the snapshot As you can see its edges are not smooth. First I thought this is editor problem but after making the build it remains the same. What i ...
0
votes
0answers
39 views

Maintain UI position with Aspect Ratio Fitter and anchor preset is set to stretch

So i have a text UI using Aspect Ratio Fitter with Aspect Mode Height Control Width and i set anchor preset to stretch upward . To make it easier to understand , i want my text to stretch upward ...
0
votes
0answers
7 views

GridLayoutGroup items maximizing area with scalable items

How can I make GridLayoutGroup to scale children keeping their aspect ratio, with no overflows?
1
vote
0answers
26 views

UI clicks hitting the GameObjects below

I've made a simple script which makes a mesh with a collider act like a button. However the mesh button get clicked through the UI. I figured out how to fix this in editor, however this problem still ...
1
vote
0answers
30 views

Pan over an image like a map using scroll container in godot?

I want to create a level select screen, the aspect ratio for my game screen is 576*1024 and the image, I am using is 2048*2048. What I want is for the user to scroll the screen and navigate along the ...
0
votes
2answers
401 views

How to create a countdown timer that shows hours, minutes and seconds in unity?

Kind of an easy question but everything I have found on this topic is either outdated or only counts down numbers and not time which is what I need. How can I go about creating a countdown timer where ...
0
votes
0answers
12 views

LibGDX Scene2D a different way of implementing a GUI scale setting other than multiplying everything by a constant?

I have a bunch of UI elements for my game. I have an inventory, HUD, hotbar, in-game menu etc. Now I want to scale these based on a setting. I import the settings from a file and basically put it in a ...
0
votes
0answers
29 views

What is the order of execution of OnClick and PointerUp in Unity?

I have an UI element in Unity with a Button and a Event Trigger component. The Button component calls a method when the OnClick event is triggered, and the Event Trigger component calls another method ...
0
votes
0answers
17 views

Unity - Shader graph - How to recreate fill function in UIImage

I am trying to create a circular health bar that would deplete on the Y-axis. This works fine on a normal image with Image type filled and fill method - vertical but I want the texture to be animated. ...
0
votes
1answer
22 views

How do I make an actor move to the foreground temporarily in LibGDX scene2d?

I have an inventory UI which is a table in scene2d. Then the table had a bunch of Containers which are basically inventory slots. They have a transparant grey background color. Then in each container ...
0
votes
1answer
77 views

Small health bar above entity is drawn differently when the entity is rotated differently

Here is a simple positioning code for my health bar: transform.position = Camera.main.WorldToScreenPoint(target.position - 0.2f * target.up); Here is the prefab: ...
0
votes
0answers
12 views

How to create brush that paints or erases in Unity(Mobile)?

Kind of a simple question but I have no idea where to start. Basically I just want to use my finger to drag along an image and either paint on it or erase the image texture entirely (presumable using ...
0
votes
1answer
45 views

How to communicate to an inventory item which character it's being used on?

Currently, I have an Inventory that is a ScriptableObject, which means it's not tied to any specific game object or player ...
0
votes
2answers
64 views

How to create game database editor interface like Age of Empires' AGE

Age of Empires had this powerful AGE (Advanced Genie Editor) tool to let players mod the game data with ease. You could see all the game's databases through this tool and play with them to make your ...
0
votes
0answers
148 views

PUN2 > Displaying all players' HP to a single pannel of a UI

I've set up a scoreboard-like UI to display all players' in the room as shown in the capture above. What I'd like to do is to display each player's own status info - Life amount as of now then ...
1
vote
0answers
310 views

Unity Input System On-Screen Button doesn't work with touchscreen 2019.3.2f1

I am trying to make my player jump whenever the space button is pressed (if a keyboard is present), and I'm adding a on-screen button for players on mobile. The on-screen button works fine in the ...
0
votes
0answers
130 views

How to adapt my mobile game for different aspect ratios?

Before I start, I'd like to note that I work in the Unity Engine, but the basic theoretical stuff should be similar just about anywhere. It's not really hard to get the game's camera/World view or UI ...
0
votes
1answer
55 views

How do I move/select menu options through UI joystick and buttons?

I have a working Menu system in my game. I am able to move across the menu using Up/Down arrow keys and select those options using the enter key. The problem is how do i get that arrow key ...
0
votes
1answer
31 views

How can I continue to rotate a 2D UI Object using OnPointerEnter when object is on its side? (OnPointerExit is triggered)

I have been wracking my brain on this for days. I'm trying to create a nice looking hand of cards, when the card is hovered over, it bobs up and down and rotates. This is triggered by OnPointerEnter, ...
0
votes
1answer
522 views

Different resolution for UI?

I'm developing my first game for mobile devices in Unity3D. My game uses a 720p-resolution. Currently the UI uses the same one. So far so good. I heard that professional game-developers create their ...
0
votes
1answer
27 views

How to automatically scroll vertical text?

I've a GUI, and a panel with a Text control. I simply want to do an automatic vertical scroll effect (circular). Problems I've to solve: - How to identify if text on my textbox is "too much" and ...

1
2 3 4 5
13