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
1 vote
2 answers
868 views

Cursor is locked and hidden, and can't click UI

I have a player with a third person character controller component. I have a problem with the cursor lock: it hides the cursor so I cannot click UI buttons. ...
4 votes
3 answers
5k views

Unity Round(Circle) Buttons

I have been using unity and C# scripting now for the past 2 or 3 weeks. So yeah i am very new to unity and C#. I wanted to know if there is a way to make a round(circle) button without using the ...
1 vote
1 answer
265 views

button thumbnail slider effect unity3D

I am trying to make this effect for buttons. i.e the middle one is bigger and is selected. the buttons can be moved left or right by swapping with finger. Does anyone have any idea how to do it?
0 votes
1 answer
29 views

How to make UI text longer?

I'm working on a menu that needs a wordy description, but I've noticed that it only shows 4 letters, then cuts off and this doesn't seem right. I right click, select UI > text and again, it only ...
0 votes
1 answer
123 views

Set UI text using value from separate script

I've been working on the TANKS! tutorial from unity, attempting to add a U.I overlay that displays the scores of each player. I cannot seem to get it working with the current setup the game has: ...
4 votes
1 answer
13k views

Running into issues with Unity Vertical Layout Group

I feel sure that I'm missing something obvious, but I've been stuck with this over the past few days. I want to make a relatively simple UI component for a character creation screen that looks ...
  • 43
1 vote
1 answer
1k views

Unity UI Dropdown list rendering on top of other canvases

I have 2 screenspace canvases in my scene.. Canvas 2 has just the mouse pointer image on it, the canvas has a sort order of 10. Canvas 1 has everything else on it, it has a sort order of 0. The ...
0 votes
1 answer
115 views

How to check if a custom Control is focused?

So I am building custom UI for my MonoGame project. I've gotten pretty far already, having created Controls such as: Button Panel TextBox Form ComboBox CheckBox etc. All of these controls obviously ...
  • 113
1 vote
1 answer
160 views

Handling different aspect ratios on a 2D dodging game

I've been making a game where the player is on the ground and has to dodge objects falling to the ground. Since I'm using libGDX (But the question still applies to any other language/framework), The ...
  • 59
1 vote
2 answers
2k views

Can't interact with anything in UI canvas, although it was working previously

I'm working on a menu with several buttons and input fields. For a while everything was working fine, but suddenly every button and input field is not reacting to being clicked on, as if everything's ...
  • 11
0 votes
1 answer
267 views

Is it possible to customize the Scriptableobject inspector for Simple level data, without the use of PropertyDrawers?

I've invented an innovative, new game mechanic for Bricker Breaker Quest and want to create a quick prototype to recruit a game development team. After wasting a week researching the best way to ...
  • 115
0 votes
1 answer
1k views

Canvas UI elements out of place in Unity3d

I placed all elements in the places I want to show in the Game mode, nevertheless, when I go to Game Mode they are shown in the wrong place as it was shown in the pictures (they go to the center). I ...
  • 277
0 votes
1 answer
53 views

Unity: How to receive input events on a RectTransform that does not contain any image/text/...?

In Unity 2018.3: Imagine a GameObject with only a RectTransform component and a custom script attached to it - otherwise ...
0 votes
0 answers
39 views

Use references to UIManager script or direct for children OBJs

So I've got a canvas with UIManager script attached to it, the canvas has a lot of buttons and texts as children OBJs and they somehow need to communicate to each other. Should this be done through ...
1 vote
1 answer
270 views

Counter won't add to score [closed]

I'm trying to make a rolling ball game. But for some reason, I can't seem to get the counter to actually add to the score. Here's the code: ...
0 votes
0 answers
15 views

NullReferenceException: Object reference not set to an instance of an object [duplicate]

Hi so im displaying food, health an water on the screen in a text box by using UnityEngine.UI and making text variables. They are all defined in the update function so they will keep changing and are ...
1 vote
1 answer
420 views

Why Unity3D 2018 UI looks bad and very sharpy?

I update my project from Unity 2017.1.1 to 2018.3.9 and almost everything is OK except UIs. All of UIs like Images,Buttons,texts,text mesh pro, sprites and others looks very sharpy and pixel pixel ... ...
  • 175
0 votes
1 answer
1k views

Unity Canvas hover image does not trigger event

So i have the following setup: This produces the following UI: Now on each of the "HudCircle"(Bottom/Right/Left/Top), I have the following components: As you can see I have a script that has the ...
0 votes
0 answers
861 views

Simple shader that scales UI image from the center

I'm having trouble making a (vertex) shader that scales UI images from the center. I can scale the image, but the image doesn't stay centered. Here is a project showing the problem Here is a ...
  • 51
2 votes
2 answers
1k views

Preventing the mouse from breaking keyboard navigation in UI?

I am trying to achieve the following, a behavior like Windows Explorer where mouse and keyboard play nice together. Here's a GIF along explanations: first I click one of the folders using the mouse ...
  • 773
1 vote
1 answer
493 views

Changing text occurs error: move initialization code to the Awake or Start function

I have GameManager class that has Log method: ...
  • 1,133
0 votes
0 answers
70 views

Issue with button clicked by mouse? [duplicate]

I have panel with some images and buttons. when I click on a button with "gold" name it works, and if I click on any thing other I got error //NullReferenceException: Object reference not set to an ...
  • 537
1 vote
0 answers
205 views

How can I approach writing a GUI framework for my game? [closed]

The problem I want to write a simple GUI framework designed for a game, in order to learn the inner workings and nitty-gritty of how GUI 'engines' such as Unity3D's GUI work. I can't find any ...
  • 111
1 vote
1 answer
25 views

Identify button from script?

I want from my script to change the color of the button that identify from the Function OnClick. It's possible ? ...
  • 537
0 votes
2 answers
584 views

Moving panel between two positions smoothly?

I'm trying to make my panel moving from one position to another one smoothly. What I get is more faster no matter what I did to make it slower never get slow !! Both Vector3.Lerp and Vector3....
  • 537
1 vote
0 answers
2k views

Using Unity Post Processing v2, how can I apply processing effects to just the UI?

I am using Unity 2018.3 with HDRP 4.9, and Post Processing 2.1.3. I would like to apply post processing effects (i.e bloom) to the UI only. I tried the 2 camera approach, but still can't get it ...
0 votes
1 answer
259 views

Technical term for the border that appears around the screen, usually in response to low health?

This had a strange term but I can't remember what it's called and it's difficult to search for.
0 votes
2 answers
3k views

JavaFX - How do I create a health bar?

I tried searching online on how to implement health bar with Java FX in a 2D side-view Java fighting game but I can only find those that goes with 'awt' and 'Swing'. The health bar I'm picturing are ...
3 votes
1 answer
497 views

Create context menu in Scene view

I created some MenuItemfunctions for navigating, which are currently displayed on the menu toolbar. The C# code: ...
  • 209
0 votes
0 answers
231 views

how do I instantiate a prefab that adds to the score text in c#?

Hello I'm working on a game with random generation, a dungeon crawler of sorts. i need to be able to have an object that when instantiated, adds to the score(the goal is to find all of them as the ...
0 votes
0 answers
1k views

How to zoom image on Unity UI to particular point where mouse cursor is located?

I have some RectTransform on Unity UI. I have already implemented some Zoom functionality but now I need it to zoom to the area where the mouse cursor is located. Currently, it zooms to the anchor ...
2 votes
1 answer
908 views

UI/Menu that works with and without VR (Unity, WMR)

I'm working on an app that I want to be useable without and with VR (with a Windows Mixed Reality HMD like the Samsung Odyssey). For non-VR I'm simply using a canvas in "Screen Space - Camera" and a ...
  • 267
0 votes
1 answer
39 views

Rewriting a text object [duplicate]

I'm trying to set up a UI system. Say I have a text object 'text' which is visible onscreen. I want to change it with a button press using a script such that the text box's previous string is replaced ...
  • 1
0 votes
1 answer
2k views

Unity UI Buttons don't work when clicked, don't seem intractable at all

This is probably a quick and easy fix but I can't seem to get it. As the title says I've got UI buttons which appear when my character dies, they used to work just fine but now suddenly when doing a ...
0 votes
1 answer
312 views

Why is this LIBGDX Action behavior THE EXACT OPPOSITE of what I expect?

Here is a code snippet of the relevant section in my render loop. My intention was to make the actor who was currently focused blinking, to indicate that it was the currently selected UI element. But ...
1 vote
0 answers
21 views

How to attach an UI button to a prefab and follow it in Unity2D

My plan is creating a button above my prefab (a tree) and whenever my character is detected, the button will appear and allow me to click on it to active a dialog. I just want my trees are randomly ...
0 votes
2 answers
115 views

Error in DRAW GUI event on android. (GameMaker)

Image of the game on a mobile phone: As you can see the maze (draw event) has been resized correctly. But the yellow post-it (draw GUI event) has not been scaled or displayed in the correct location ...
1 vote
0 answers
592 views

How to sort cards' on-screen positions by their suit?

I have a 13 cards and sort button. When I click that button, I want all the cards of each suit to be grouped-together on screen. So if I have 4 diamond cards in my 13-card hand, all 4 diamonds must ...
0 votes
1 answer
209 views

Make Unity GUI for mobile phones only?

I'm using Unity and I want to make a responsive GUI for portrait resolution only. Now I'd like to know if this is a good or bad idea when I force the user to play my game in portrait mode only. Shall ...
  • 239
0 votes
1 answer
2k views

Unity - Button still interactable even when interactable is set to false

my button can still be pressed in-game even if I set it to button.interactable = false; What I'm trying to achieve is when the Panel ...
0 votes
0 answers
2k views

Blurry text in Unity UI at default scale

I'm working on a VR (GoogleVR Cardboard) game, and need to include UI elements within it. Ever since I first learned how to use Unity's UI elements, I've been limping around what seems to be a major ...
  • 139
0 votes
1 answer
76 views

Contracting Unity EditorWindow UI

How can I make scalable(contracting) EditorWindow UI(not in-game UI) like in inspector example?
0 votes
1 answer
422 views

Trying to mix and mingle 3d physics with the Unity UI

I have recently created a drag drop system where I drag stuff from a UI menu and then drop it to another UI. The child of the draggable UI object is a 3d model. I have attached box collider and ...
0 votes
1 answer
2k views

"SetSelectedGameobject" only highlights button on second try (Unity 2017.3)

To support the use of a gamepad in the options menu I set SetSelectedGameObject and firstSelectedGameObject (which doesn't seem ...
  • 267
0 votes
2 answers
213 views

How can I make the cursor avoid something completely?

I wrote some code for a UI button that causes the mouse to avoid it. I realize this is kind of a weird thing to do in a game design-wise, but this is a really weird game. I need a button that is not ...
  • 2,576
3 votes
0 answers
295 views

Quest UI Display in Unity 2D

I have this quest manager script where I store all my quests for easy duplication. I'm adding a feature that gives the player the option to see his/her current to-do quest. The first thing I ...
1 vote
1 answer
1k views

Blurry UI when using Screen Space Camera

I am using Screen-Space Camera as a render mode on canvas but the Textmeshpro text and other UI elements are looking blurry around edges. I think it might be due to canvas scaler setting. After ...
  • 370
0 votes
1 answer
179 views

Does a successful attempt count as an attempt?

I'm writing a video game and I'd like to know if I should include the "successful" attempt in the count of "total attempts". For instance, in a clay shooting game, if the player needs four shots ...
0 votes
2 answers
2k views

Unity 3d texture animated round circular bar

I'm struggling to create a circular bar with an animated texture and a round cap end. What I would like to create is implemented in the Unity game Subnautica - the bottom left bar. So here is the HUD ...
0 votes
1 answer
32 views

Unable to add button in Unity

I am wanting to add a button to my scene in order to mute/unmute music. I can add the button to my scene, but it's not appearing on the UI. I can't see it anywhere, not on the scene nor the game ...
  • 189

1 2 3
4
5
14