Questions tagged [gui]
Graphical User Interface. A term used to describe the tools available to the player to interact with the game.
693
questions
0
votes
1
answer
1k
views
Why is my UI not working on android but works perfectly on PC?
I tested my game for the first time on mobile and the UI almost doesn't work. I use if(!EventSystem.current.IsPointerOverGameObject()) to check if I'm clicking on ...
-2
votes
1
answer
393
views
I need a game over (UI image) to appear after timer reaches 0
So here is my timer script that works fine. I need it to activate the game over (UI image) when the timer reaches 0.
I tried attaching a game over script to the UI image (GOS script)..... no luck
<...
0
votes
1
answer
1k
views
What's the best way to draw gizmos in build
I currently use Unity gizmos for many debugging purposes, but I'd like almost all of them to be visible to the player in-game (when the game is built).
For example, when a player is dragging to place ...
3
votes
1
answer
3k
views
How to integrate images into text lines in Unity?
Here are two screenshots from Stellaris, where images are seamlessly integrated into the text. How can I achieve this in Unity?
0
votes
0
answers
166
views
How do I highlight the squares adjacent to my player in a Isometric grid
I am making a grid base RPG (like Fire Emblem but isometric) but currently I'm stuck on the movement, mainly the UI (showing how far the player can move around the board).
Like the image below where ...
1
vote
0
answers
1k
views
Orientation changed event in Unity3D?
I'd like to listen to orientation change events, so for example my UI layout or the components themselves can be changed.
All I've found is that I should check the value of ...
1
vote
1
answer
91
views
Skill button cooldown
When a spell is on cooldown I display a "unfilling" black bar over the spell GUI until the cooldown is reached. Problem is when i have more than one second of cooldown the scale of the "...
0
votes
0
answers
28
views
How to make counter unity? [duplicate]
How do I count how many diamonds my player has collected in my 3d world
What I need to do is to make a script which will update my text ui when the player collides with a diamond but I do not know how ...
1
vote
1
answer
518
views
Detect when item has been dragged & dropped onto an inventory slot
In my inventory system I want to be able to drag and drop items into inventory slots.
I managed to make it work, but only in a weird way:
When the player starts dragging, it picks up the item and it ...
-1
votes
1
answer
801
views
How do I make buttons function on the cursors click in roblox studio? [duplicate]
I would just like to know how to add buttons in roblox studio because when I play roblox and see all those great games with buttons that I can click! How do I make a button, and how do I make it work?
0
votes
1
answer
88
views
ScollRect Jumps while Filling
I have a UI panel with a scollrect inside, which I fill dynamically. It can only be moved vertically.
When filling this scollrect, the content jumps up and down for one frame, creating a weird look. ...
1
vote
2
answers
461
views
Curved 3D health bar
Hello I would like to make a curved healthbar (like if it is drawn on a cylinder). See the spatial UI element left to the shoulder of the character on this photo for what I mean.
There is a main ...
0
votes
2
answers
52
views
How do I stop clicks on a button from also triggering my gameplay scripts?
My character jumps when I press the right side of screen. The pause button is alsp in the top right corner. So when I press that button, the right side script always triggers and I don't want that to ...
0
votes
1
answer
321
views
How do Nethack frontends work?
I have been trying to learn about GUI frontends for Nethack, but I have been unable to determine how do they get the game information (map, inventory, player info, enemy locations, etc) from Nethack? ...
0
votes
0
answers
360
views
Unity 3D - Why does my button need to be clicked twice to work?
My goal is to go back and forth between a series of animations by clicking left and right arrow UI buttons. I wrote this C# script and the "next" button (which executes ...
0
votes
1
answer
57
views
libGDX imagebutton seeing double
If I leave my imagebuttons' width and height alone I get larger buttons than I'd like:
radio.setX(wu*35);
radio.setY(hu*20);
When I replace/add to the ...
1
vote
1
answer
54
views
What interchange format should I use for e.g. subtitles and UI texts?
Are there any standard formats that can be used as the source material for game texts (i.e. subtitles, UI texts, etc.)? I can think of the following constraints:
at least some style effects (e.g. ...
-1
votes
1
answer
67
views
Transparent gui Shows another gui when it is not supposed to?
I am making a game in roblox. and in that game i need a Main-menu. and the main-menu gui is basically transparent and there is more guis behind in another ScreenGui ...
0
votes
1
answer
115
views
Should UI systems update naively with events and data from outside, or should they be coupled to some game state/singleton to know to change itself?
I'm making a game in Unity for my game dev course in uni. I hope the question isn't too confusing but I have bolded sort of like a TLDR at the bottom.
My level currently has a pregame UI panel, to set ...
1
vote
1
answer
359
views
Using multiple pygame_gui managers
I would like to structure my gui into different panels.
so to help keep my code managable i thought it might be a good idea to have a main panel. with its own manager and then a secondary panel with ...
3
votes
1
answer
2k
views
How can I implement UI in Unity using Chromium?
I'm looking for an alternative to UI Builder.
Ideally I'd like to have basically a Chromium instance atop Unity3D which would have its JS calls somehow land in the C# (maybe in the "Update" ...
1
vote
1
answer
247
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 <...
2
votes
2
answers
304
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
1
answer
111
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
1
answer
200
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....
2
votes
2
answers
254
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
0
answers
150
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
1
answer
236
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 ...
1
vote
2
answers
190
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:
...
1
vote
0
answers
68
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
1
answer
640
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
1
answer
185
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....
1
vote
2
answers
303
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 ...
1
vote
1
answer
324
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
2
answers
1k
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 ...
1
vote
1
answer
273
views
Best way to make a Side Panel UI with Libgdx?
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
1
answer
52
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
1
answer
33
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
1
answer
3k
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
0
answers
737
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
1
answer
450
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
1
answer
635
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
1
answer
375
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
1
answer
716
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
1
answer
452
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
0
answers
336
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 ...
1
vote
0
answers
120
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 ...
2
votes
0
answers
186
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
1
answer
4k
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 ...
1
vote
0
answers
396
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 ...