#📲┃ui-ux
1 messages · Page 26 of 1
Hello I made a death screen in UI and I have a script that enables it when I hit an obstacle but I don't know how to disable it in the first place (before runtime I mean). Can someone help me?
You can just disable it in the inspector before hitting play
If you want it still enabled but to disable when you play, you can just disable it in the start function
thank you
I'm probably just blind but I can't find where to do that in the inspector
Hello everyone, how can I make the text scroll (previously, increasing the content helped, but now it is impossible to resize it)
It's not completely impossible, it just stopped increasing in the direction I need.
https://docs.unity3d.com/Packages/com.unity.ugui@3.0/manual/script-ScrollRect.html has a vertical scroll bar. You can set progress on it even if it's invisible. It's easiest way to scroll content.
if I have a GridLayoutGroup is there a way I can either
- Allow objects to snap to a grid but allow gaps in said grid? The only way I've managed to achieve this is to use filler empty gameobjects
- Building off the example above, is there a way I can find the appropriate index of where an object will be in a GridLayout based on position without reversing the math?
I'm attempting to make icons you can drag and drop around a grid
You don't have to figure out their coordinates as they will always know it. Actually moving elements would be very messy. When you start dragging something, set its image to none or other, then spawn its representation under the pointer. When you drop it somewhere, assign its image and data there.
well I have the drag and dropping functionality done, but the issue is the grid just lays things in order of the hierarchy. So if I want something on the 4th column there's no way to move it there because the grid handles the layout itself. So far my answer is to fill the grid with a bunch of empty objects and swap sibling index positions when an item is moved. But finding the index of the object already at the position of where the new item is being dropped is the difficult part
it's the child index
I know that's what I said
yes
So far my answer is to fill the grid with a bunch of empty objects and swap sibling index positions when an item is moved
that is currently what I'm doing. But finding the index based on positions so far as proven troublesome
Why do you need position. You raycast the object and get its index
Rather end drag event would have that data
because due to spacing and such it may not always find an object under its position
just don't use any padding and extend with invisible image component as background (to raycast against it at full cell size)
then you won't have any holes
It's also quite trivial to calculate position as well
Have to figure out exact size of elements with padding.
how can i add more sprites to my sprite sheet without having to reassign everything??
it's the checkmark to the left of the input field where you can name your object (i named it UIManager)
I'm trying to make it so that green box always takes half the screen to the left no matter the screen size and i've been messing with the anchor presets but no luck so far. I have canvas with scale with screen size enabled. Any help would be appreciated
Use the stretch anchor preset and move the right side anchor to the midway point
I tried that but now my code won't turn the canvas back on when I die
here's my code
disabling the canvas in the start function worked but I could see the white outline of the canvas in the game view and idk how to fix it
That just means you have gizmos turned on
ok thanks it works now
this?
that's vertical stretch
you want horizontal stretching
Any of the 4 presets along the right side
i got it now, tysm!
i want to make a background for the text but if the text is long, the background as u can see wil be small. How can i make like that the background matches the sizes of the phrase
Use a ContentSizeFitter on the background
now i have this problem
thank you
Why is this happening, i just put a sprite for the image, a vertical layout group and content size fitter
is it possible to render a text over a sprite in text mesh pro? I am basically searching for a way to have custom texture for <mark> tag or something like this.
You might have some transparent pixels left around from erasing that the auto slicer is registering as separate sprites. I’d just go to Photoshop and erase all around the sprites to get rid of any loose pixels
Oh i’m now realizing i’m really late lmao, hope it helps tho
hey guys, I'm having a bit of trouble using WorldToScreenPoint
I want to have the circle off to the right appear in front of where the aircraft is heading, where the dot is
I just figured it'd be as simple as something like Vector3 adjustPosition = currentCamera.WorldToScreenPoint(transform.forward * 800f); Vector2 screenPoint = new Vector2(adjustPosition.x, adjustPosition.y); GameManager.Instance.lockCircle.anchoredPosition = screenPoint;
800f being the position of that dot
but I've tried using localPosition, position, anchoredPosition and the circle is always kind of doing it's own thing
does anybody have any ideas?
You passed a direction vector into it
It wants a position vector
ah... I need it to be something like "the transform + forward a certain distance"
I guess I'll need to assign it to a new position vector? Like Vector3 forwardPosition = transform.position + transform.forward * 800f?
You could use TransformPoint
Or that
ok sweet, thanks for the heads up!
I've closed the editor but I'll give it a go tomorrow
How i can mask image using multiple objects? (these are vectors btw)
Use a filled image for the red part
but how i can do this?
my hp is made out of segments, there can be any amount of segments, the more segments there are - the less space they use
i dont think slider can do that, neither me using code
each segment is an individual image though
if you have 5.5 health, you draw 5 full red bars and one half-filled one
ok, then how i can make code control the unknown (aka changeable) amount of objects?
use an array and a for loop
something like:
float healthToDistrubute = player.currentHealth;
for (int i = 0; i < numberOfBars; i++) {
float fill;
if (healthToDistribute > 1) {
fill = 1;
healthToDistribute -= 1;
}
else {
fill = healthToDistribute;
healthToDistribute = 0;
}
images[i].fillAmount = fill;
}```
k ty
Hey,
How would I center the image between the card title and the top edge of the card?
use a vertical layout group
Give each child a LayoutElement with the appropriate settings
Any ideas on what I can do to fix this scaling issue? The problem is scaling from 1920 x 1080 to 1280 x 1024. You can see that I have one component set in front of a 3d object with the rest behind, I want the game to be able to support multiple resolutions
Any ideas on what I can do to fix this
Got the UI to scale according to screen but... what about the background?
You can't, not something that has a defined ratio and isn't tiled. Your best bet would be to make it as big as your largest supported resolution and don't scale it at all.
Then it just crops for smaller resolutions
Ideally the logo and the background would be separate elements
Hi, I have a problem: I put the canvas on the screen space camera, and I brought it as close as possible to the player, now I do not display UI elements correctly, that is, they become simply huge despite the fact that they are children of the canvas.
I brought it as close as possible to the player
Why
what are you trying to do
plane distance of 1 is extremely close, there's usually not a good reason for that
yes, that's the thing, I need the canvas to be displayed so close, otherwise it will be covered by other objects. The problem is that I need to display this canvas on one specific camera.
why not just put it on an overlay camera
which doesn't render anything else
Unfortunately, this method does not work in my case
Any clues on why bloom intensity (URP volume) would be causing ALL my UI canvases to scale down to about 1/2 their desired size?? Most bizarre problem I've ever had
2023.3 b10
no idea but you're on an old beta version of Unity?
2023.3 is now Unity 6 so you can upgrade to the latest version of Unity 6 since you're in the tech stream
I was trying to avoid the install fee which I thought was going to be present in 6 and forward?
And I updated to 2023.3 from 2023.2 because of a context menu bug that was making the editor unusable
2023 is an early beta version of Unity 6
Also the fee isn't going to apply to you unless your game is wildly successful
If you want to make a game and avoid the new license and have a stable version of Unity best bet for now is 2022.3 LTS
Hello, I'm having an issue with UI and I think it might be Unity bug and no one's responding to my discussions post. I'll post a link to it because it's pretty long. Any help is much appreciated!
https://discussions.unity.com/t/error-when-turning-on-off-toggle/1498499
I responded on discussions but it looks like you probably have some faulty data set up in one of the callback functions on your toggle
Thanks for the help! I left a response on the discussion to clarify how I fixed the issue.
Well I've no clue if it's going to be wildly successful but it's not an indie title which was why I trying to avoid it. I reckon it will be fine. I ended up solving this by just setting up new cameras, I guess it was some glitch in the scene
I'm using TextMeshPro for some background UI elements and I can't figure out how to get rid of the anti-aliasing/blurriness
nevermind, fixed
changed the Atlas Render Mode to RASTER
Anyone have any idea why after I reset my panels in UNITY all my scenes decided to look like they are outside the normal panel for the scene? I just reset the layout, and magically, all my scenes look like they are outside of the panel now. Its bizarre. Sort of frustrating too
Where's the canvas outline? Can you turn on gizmos + the Rect tool?
The canvas outline is hte grey box. Its like all my scenes after I reset my windows in unity all look like this
It looks like the rect transform got blown up somehow.
But it shouldnt of.
Yeah my rect transforms blew up what the heck. And I cant even adjust it anymore or control it. All of my scenes.
Its like "Some values driven by canvas" when it IS the main canvas. On all of my scenes.
All I did was set my layouts for Unity. Poof.
what are your canvas scaler settings
Default. I just generally have to have them there for thigns to work, but I dont think they got modified.
Ignore my script console errors, silly reference errors non UI related.
Ah - isn't it because of "Constant Pixel Size"? Shouldn't you use "Scale With Screen Size"?
Also are your buttons and text properly anchored?
Ill be honest, ive never had to touch those settings for them to work normally.
But once I changed it, yeah it changes the scale, etc. Weird, Thanks
Hello! I have money text and money icon. How can I make them always center regardless of the amount of money?
this is actually not trivial, and frankly annoyingly difficult compared to how simple it should be
I would have it aligned right TBH. That way the $ is always in on solid position and the value can climb/adjust naturally.
And Im pretty sure the dollar is in front normally isnt it?
Its $12390
I'd love if someone smarter than me figured out an easier way to do this, but here's my solution:
what you need is to add, to MoneyCell in your case, a "Horizontal Layout Group", set child alignment to middle center and disable child force expand
then you need to go to the text component with the money amount, set text wrapping mode to no wrap
and then add this script to the gameobject with the text
using UnityEngine;
using TMPro;
[ExecuteInEditMode]
public class TextExpanderToSize : MonoBehaviour
{
[SerializeField]
private TMP_Text _toExpand;
[ExecuteInEditMode]
void Awake()
{
_toExpand = GetComponent<TMP_Text>();
}
[ExecuteInEditMode]
void Update()
{
if (_toExpand)
{
Vector2 temp = _toExpand.rectTransform.sizeDelta;
temp.x = _toExpand.renderedWidth;
_toExpand.rectTransform.sizeDelta = temp;
}
}
}
then you need to go back and play with the spacing option on the Horizontal Layout Group
this won't center the whole text + image group
as in the margin between left border of MoneyCell and left border of text, and right border of money image and right bortder of MoneyCell won't be equal
Reach out to chatgpt. Or gemini, seriously. It can help in an instant.
I know when to do that and when not to do that. This is a bad use case and it would only lead me astray
Understood. Unfortunately I do not have the answer an I apologize.
I am providing an answer, I just want someone more experienced in UI to verify if this is the simplest option, or if I'm missing something
Ok ok, my fault for misunderstanding..
I had that problem once. There's an easy fix for that. Give the text content size fitter and make the doller sign a child of the text. Make sure that the dollar sign is aligned on the right side of the text. Put a parent around the text and also give it content size fitter.
That parent is the anchor point for whatever you want to use the center.
You might get warnings in the inspector that direct nested items with content size fitter isn't allowed, but don't mind that. It works fine that way.
Thank you! It worked
that will center on the text, and the margins won't always be the same on both sides with this solution
unless it just doesn't work for me?
does anyone have any starter tips or suggestions for a pixel-perfect ui? only looking for the ui to be affected, not the actual camera
Might not work for you then. Normally it should work if you also have a content size fitter on the parent
Unable to click on the buttons for some reason
I've checking the sort order but still the issue persists
Where's your EventSystem?
My bad. I added that after figuring it out. And it works well now. Thank you though! 🫡
hello i want make this Ui smaller but it dont works someone can help me (dont work even if i set scale to 1 on all UI element of my empty)
Hey there, I want to create a tab like menu where the player can click on a button to open a tab. That button needs to STAY selected when the player clicks somewhere else (excpet if its another navigation button of course). Unity has a "selected" color, but the selected state gets removed once you click anywhere else. Any help would be much appreciated!
if it stays selected despite clicking somewhere else, which is a behaviour unlike most other buttons, I'd do it with code. Make selected color equal to unselected color and change both in code
Thanks for the help!
I used button.interactable = false in the end
works like a charm
someone pls
have you tried changing the width and height in the rect transform?
why is my character icon mask so scuffed no matter what?
if I disable the Icon and make the mask image color white:
its masking the icon in a janky way
yes
when i scale down my ui i dont have everything only a black round
you scaled it to less than 2% of original size. Consider scaling it down... not that much
but i need to place this on a small gameObject what can i do ???
I don't understand why can't I adjust the rect transform of the viewport? what is restraining it?
The scroll rect, no?
already fixed it.. I worked my way around it. Instead of placing the background on the scroll view itself, I placed the scrollview in a background(Image) component so that I could adjust the scroll view to my desired size
hello i have made a button with a world canva but i cant use my button . why ? (all target raycast are off)
public AudioSource Click;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void Button()
{
gameObject.transform.localScale /= 2;
Click.Play();
StartCoroutine(ClickTimer());
}
IEnumerator ClickTimer()
{
yield return new WaitForSeconds(0.5f);
gameObject.transform.localScale *= 2;
}
Well... you turned off raycast target for one
and third, I think UI event interaction doesn't work with a locked cursor unless you use a custom input module
Anyone have a Korean font asset with text mesh pro for me? I can't create one, there is a bug in my version
Hi, I'm trying to work with nested layouts. Unfortunately on mobile, so I can't a picture, but there's a layout with groups of buttons, and a large image next to it. They both are not the same size, and I'm trying to align them in a certain way. Is there a way to group the child layout and the separate image in a parent layout and have them aligned/position in a way that I want them to, or are the alignments fixed? I hope that my question makes sense
Yes the UI system has a whole system for layouts etc
Using layout groups and layout elements
Your question is a bit too vague to answer more specifically
I just got home, so I can provide an example now
I have a VerticalLayout and a PortraitImage here, and I want to group them into a new GameObject with a HorizontalLayout component
Within that HorizontalLayout GameObject, I wish to have the end result to be something like this
The problem is that, when I create a HorizontalLayout, I can't define how a "row" is supposed to align for the children GameObjects, so I was wondering if there is a way to do so
hello I want to make a UI image where the transparency decreases over a certain time (to make a transition) does anyone know how to do it? 
uh if my knowledge serves correctly you gotta edit the alpha value
alpha controls the opacity
anyway, im here to ask something
why?
the bottom of the screen theres no definition, the other side also no defninition, just the top and side for some reason?
wait a min what
nvm its just inspector shenanigans
Trying to add TMPro Text to a 360*180 resolution screen. The Text gets all blurry. Tried to set resolution on canvas to a higher resolution, played around with worldview settings and pixel perfect...but the Text still appears blurry. What am I missing?
from where can i get this device overlay images if i want ???
hey guys I have a question about timscale and UI, I have a simple restart button and a simple UI for now, when the Player dies, the UI activates and the player gets to press the restart button
but when that is pressed the animation are no longer working including the VFX for shooting is there a reason why ?
do you want ui to have animations when game is paused? then this is how to do it https://www.youtube.com/watch?v=82MgDp8b_ms unless im misunderstanding the question
In this video we talk about how to fix stuck animation when you set time scale as 0. This is a pretty common practice when creating a pause state for your game but can mess with your Animation and UI.
......................................................................................
✔✔ Follow us:
●Instagram: https://instagram.com/tech_vikin...
Not really so, the player dies after health is at 0 and timescale is 0 , and UI pops out to restart
I press the restart button , the ui does go away but somehow when the scene restarts some components are disabled
it doesnt sound ui related then. how would the ui disable your components
maybe you are forgetting to set the timescale back to 1
its back to 1 after the scene is loaded
you got some mistakes in your scene loading code or somewhere, are you sure its related to the ui? if not then you should probably ask in a different channel not the ui one
and ur probably gonna have to post that code
Is there a best approach for handling issues with input fields and mobile keyboard type speeds? If I spam keys and the 'done' button on iOS keyboards, I can go over the character limit and add characters outside of the content type
whyyy does my masked text in a scroll view reappear over the compass
Hi. I have a question: I need to make a certain indentation from the center of the text for the text (TMP_Text). As an example, I added a picture of a book, and it is necessary that the text does not intersect in the center of the book, but only on the pages. Is it possible to do this using only 1 text object or will it take 2?
Thanks
okay so im trying to learn some things and there seems to be an outline around the pause panel thats showing the backgrund
is there a way to fill those parts?
TMP issue, possibly related to Canvas.ForceUpdateCanvases ()
I'm trying to call a coroutine that implements a typewriter effect on my text, but it's working differently depending on where I put the code, before or after a Canvas.ForceUpdateCanvases() method.
It's kind of hard to explain, but did anyone find issues like this or perhaps has any idea of what's happening?
ForceUpdateCanvas causes stuff to get re-laid out if necessary so yeah it could definitely affect things if you have pending layout changes
All right, so is there any other method I can call that can force the scroll down to happen?
Ah, the problem was not related to this apparently, I'll investigate further
will the outline around it go away or is it a sizing issue
:(
when i choose any of the first 3 aspect ratio's it shows a bit of the right and top of the panel
That's just the gizmo,no?
I want to change the outline of this tmpro, but dont want to change the outline of the other tmpro's using this font, how?
i apologize but i dont understand

im not fully getting it
i think i understand what the gizmos are, but im not understanding how it applies to the outline
im guessing id have to deactivate a gizmo to let it just fill the screen?
The outline is a gizmo
If you don't want to see it, you can disable the gizmo or all gizmos
im going to try to remove ones i think are related
maybe canvas
i dont think its working ;-;
it can probably wait
Just disable all gizmos
But in this case it would be RectTransform
Not Canvas
i might be the flaw i dont think im getting this
this is what im doing
im going to bed
Just press the main gizmos button
Making a menu, is it fine to choose a specific aspect (e.g. 16 : 9), a Canvas with Scale with screen size, and make Camera's color the same as Canvas', or is there any better approach?
Hi there! I'm trying to make a little X button for a small alert box, and I want it to be in the corner, but the text stretches the box with vertical, and I am unsure how to make it move with the box. I have attached an image of how i want it to look. I've also attached my hierchay for this object.
add a Layout Element to the box and click "ignore layout" on it
Which element specifically? The root object of the object?
the root of the alert box
Ok!
I had a layout element on the object already, but i clicked the "Ignore Layout" toggle on it. The close button still doesn't move with the box. Is there any other steps needed?
wait when you say "the text stretches the box with vertical" can you specify what text and what does "with vertical" mean
The alertbox scales the height to fit the text that is present inside the box (the text object)
If it helps, here are screenshots of every element of the alert box in the inspector
what does the alert box look like currently?
Sure!
oh ok i see, you gotta select the box with the X inside and click this and make it top right instead of middle center
what is the object name of it?
Close probably? but that already seems to have it set to top right. you probably have to make it so Panel is its parent
and then you would have to add a layout element component to it and enable "ignore layout". this is where i thought you were earlier when i said this but i got a bit confused, you can remove the component from that other thing you added it to
ok
If it helps, i could probably make a demo project
did u try doing what i said?
Hello. Is it possible to place a 2dlive asset inside a canvas?
I'm unsure what you are trying to tell me to do?
well first of all you have to make it so Panel is the parent of Close
then give Close the layout element component and enable "ignore layout"
and thats it
playing with some UI stuff.... what is this faint grey box? I've not been able to figure this out yet
😄
The ad button is clickable in testing, but not the game.
Like I said, it's likely obscured because you didn't test for mobile resolution. To test that you debug the problem and output events of the event system to the log.
Use logcat to read application logs at runtime
or just output debug messages to UI
Or run on Unity emulator for the exact device to inspect it at runtime...
Quick question, so I checked and apparently TMP does support little icons in the text, but can I make it use my custom icon provider?
For example: <sprite name="resources.gold"> 5000
and then it calls a function like this one: Texture2D GetIcon(string name)
or something like that?
I already know TMP has links which can trigger custom code, but can sprites be loaded from custom code like this as well?
hey guys. Not sure how to do it. I created an UI and inside it I created just a image and using an image I have done in photoshop. But when I scale the screen it doesnt scale together. and that happem
Any ideas?
This is like that game border and no matter the size of the window it should stay on the border
maybe because I am using 10:10 aspect ratio? should I use instead resolution, like 1280x1280 ?
that fixed here but is that a good practice?
is using animators to animate UI really that bad when it comes to performance on mobile devices?
You’re gonna wanna hit that button, then hit the blue option near the bottom right of the menu
Hang on i can’t use unity right now, lemme find a picture
This one (don’t mind the red, i took this image off google)
Btw if I you want it to be flexible with aspect ratios, you might wanna go dive into 9 sliced sprites (I think that’s what it’s called)
If I want to have a dropdown come down and block mouse clicks on buttons behind it, what's the best way to go about it?
I'm sure there's an easy way I'm just blanking on it at the moment
The dropdown itself also has buttons on it
So I'm getting into a bit of UI fighting
Yeah still doesnt work, will check that 9 sliced thing. thank you
when creating 9-sliced images, remember to:
- make the image at the smallest resolution it will be at.
- make sure at least the cardinal quadrants are symmetrical (the diagonals can be unique if you want)
- make sure to slice it tightly like this
scaling 9-slices will only work if the object is larger than its base resolution
so if you make the object 500x500 and wonder why it's scaling weirdly instead of stretching properly it's probably too high res
Thank you. but is that gooing really to work? I mean I just want my image.. that is the white borded to be always at the border no matter the size of the window.. looks like a simple task or should be at least.. but it seems not to be an easy task
correct, that is what 9-slicing is for
I hate this UI system unity has.. they should improve it. I wish I could code it and control it via code, would be easier prob
here's an example video I found if you're a visual learner
https://youtu.be/37q-0oS65LY
How to use Unity's built-in 9-slice utility via the Sprite Editor, and what this help you accomplish.
9-slicing sprites is used primarily for UIs and 2D games. It allows you to stretch a sprite without deforming the corners, and also allows you to tile the center of a sprite while keeping the outer edges untiled.
For more documentation on 9-...
Thank you will check it now
there are assets which overhaul unity's UI, and you can learn and commit to them, but it is a whole new set of things to learn and usually a bit of money, so I recommend working with the built-in for now
yeah, I will do that. thank you for your time and help. Will check the video and try it now.
So after watching all the video. basically this technique is just for you to strech it and not distorce the image. And that is not my prob. Actually my prob is that I want the borders to stay always at the border of the screem and no matter how much I move the window size it will stay there still.. but that is not happening even using 9 sliced as 9 sliced actually is used to another purpose that is not the one I have now.
ah, well, maybe experiment with a combination of 9-slicing and using the stretch to fit feature. I'm not really sure sorry
yeah dont worry, but already tried.. just doesnt work. When I try to increase or decrease the window size instead of being like this
it stayts like this
so the image square never scales together with the window size.. sadly.
Fixed it
I set all here to 0
and used scale to sdjjust the image
now it always stays on the borders
I have a windowed mode when building on run time. I want my assets to NOT change size when I change the window size. How do I do it?
its crazy how coding is easier than making things work in the UI.
Anyone know how to fix that? I just want that when I scale the screen up or down my empty object with an image inside stay same size.
Already tried with all ancors etc nothing works. No idea what to do here. Cant find solution online.
try this setup
Already tried it .. doesnt work. Well it fixed the prob to the sides but it still streches up and down
I need it to be always same size.
@gloomy marten
I already tried so many things. sadly UI is harder than coding in unity
try the bottom right then
same result as the video
also using my UI like that dont know if that could be an issue
really?
yes
any video?
is the same result as in the video if I record it will be the same.. 100% the same
theoritically it shouldnt
the white bar should also use the same setup (stretch both vertically and horizontally)
the white bar is doing that its supposed to do my prob is the empty object
that is not doing what I want.. I wish that I could code everything.. UI in unity is broken
now its stretching only up and down
but should be fix and not strech at all
just wish I could do something to continue my game. I am block on the process of the game as I am not able to do UI. that is sad
the thing is that its been 4 days just to fix that and no progress hahaha
no one seems to know why also. Crazy
Sorry I misread your question
So you need the empty area under the white bar to stay the same?
Try adding Aspect ration fitter component to that empty area, and use width control height
already tried that too.. trust me i tried everything
hahahaha
the video you saw.. the first one
I already had this component there
you might need to add content size fitter to it's parent with vertical fit set to min size or prefered size
Check first video and you will see..
SS from the first video
weird thing is that everything that I already found on internet I tried, cant find more information. Might be something with my project or I dont know. Might need to create another proj.. and see if there it works. than if yes I will need to understand why on mine doesnt
@scarlet ether like this?
yes. I think I managed to do it I deleted my old Canvas and created another one.. might have been some weird settings. will check if all is working fine and let u know
thank you for ur time and help
no problem
yeah, starting over from scratch sometime easier than figuring out an existing one
using System.Collections.Generic;
using UnityEngine;
public class CameraSwitch : MonoBehaviour
{z
public Camera[] cameras;
public Canvas canvas;
private int currentCamera = 0;
public void onSwitch(){
currentCamera += (currentCamera == cameras.Length - 1) ? -currentCamera : 1;
canvas.targetDisplay = currentCamera;
}
}
I use this code to change the targetDisplay of the canvas, i am trying to make it change the display automatically accordingly
can I override TMP sprite renderer? or add custom rendering with tags that would refer to my code to render a sprite? or can I create and load a custom sprite asset for all TMP texts?
how do you put UI on a gameobject like i want to put it on a monitor but i cant seem to find how
Make a world space canvas
thanks
discovered you can only have one grid layout group on an object after I lined up the first one all nice. If you want a 2nd one on an imgae do people typically jut break up the image or like add panels in front of the image to take different layout groups?
i'm doing a webGL build and one of my scenes button's dont seem to work in full screen mode but it works fine in none full screen.. I compared the buttons to buttons in another scene which work well in both full screen and normal and the canvas settings and button settings all seem exactly the same...
any ideas why these buttons would not work in full screen?
How would I wake a TMP text equal an int or float of another script?
With an = sign?
What is the issue?
myReference.text = otherReference.valueIWant
This is my code the errer is waveText = waveText.text = enemySpawner.Wave; says I cant convert int to string is there a way I should be doing this
{
public TMP_Text waveText;
public EnemySpawner enemySpawner;
// Start is called before the first frame update
void Start()
{
EnemySpawner enemyspawner = enemySpawner.GetComponent<EnemySpawner>();
}
// Update is called once per frame
void Update()
{
}
void updateWaveCounter(int wave)
{
waveText = waveText.text = enemySpawner.Wave;
}
}
Yea... you want a SINGLE = sign
Get rid of the first waveText = part
waveText.text = enemySpawner.Wave only of course
I did a little bit of changing around that helped thanks
Hi, why does the simulator side (right) looks so different than the editor (left)?
can someone help me with a ui problem
i'm hungry can someone tell me what i crave?
tell us the issue
i have a script for hovering over a button
but the button starts jittering if i aim the cursor on the line between the button and the other space
like its fighting on if should hover or not
what's your logic for said script?
i can send it
problem soon to be solved
what
What you guys think about the UI design so far? Is the distance animation on the right too much of a gimmick already or cool detail?
I really like the distance gauge. It adds a lot of flavor to the ui
Thank you, I thought it would be funny little idea since it resembles how the real life displays with the wheels work but then I started doubting whether it is distracting or too much
And what is the scale in game view?
Oh, it was 1.4x maybe that is the prob
Definitely part of it. Going over 1 will always make everything more pixelated
Now, it could ALSO be something else too
Got it. Thank you!
Does anyone know if it is possible to add a dynamic blur overlap effect on UI elements?
I've only seen it done on 3D elements using the Opaque Texture and some shaders. Unfortunately UI elements dont write to the Opaque Texture.
My main refference is the iOS blur effects with notifications and control center
has anyone dealt with text turning into braille in webgL? This si the normal unity TMP font. It works properly for other platforms
how can i fix my tilemape overlapping my ui text
i have just set font in textmeshpro inputfield to my pixel font and it displays like this
what is wrong? this font renders fine everywhere else
text smash pro
Same question for me, plz any help would be appreciated.
help please anyone
If u didn't change any settings I personally think smth wrong w the fo tbt
Font
Any suggestions?, i accept any criticism
but it works with everything else nd renders perfectly...
here's my font
changed in unity ttf import settings:
- font size: 8
- character set: custom
- render type: hinted raster
and in textmeshpro importer: - font size: 8
- render type: hinted raster
I have a rendertexture i render my scene too and have put it as an image in the UI. The canvas is set to scale along with the height. Is this the best way to go about displaying the render result?
Any tips on how to make my home menu looks better please? (what should the button's looks like)
I'm one of the worse UI designers myself but I'll address couple issues that stand out to me the most: **Contrast: **the buttons at the bottom have way too little contrast between the background and the icon color, at first glance I didn't even notice there was icons to begin with. If you squint your eyes the buttons just look like white blocks with nothing in them. **White Space: **there's too little space for the buttons at the bottom, both around them and between them. To add more space sideways, you can make the buttons less wide since the icons doesn't require that much space on both sides. Talking about the icons, I think the buttons are also too low to fit the icons with appropriate amount of space on top of them and below them. As a last note: I assume the highest of the buttons means "maps" or "play" or something but since it's far from self explanatory, I would add a text to highlight the meaning of the button (since it's 2 buttons wide, there's plenty of space to do that and it would make sense too since it seems to be the "main button")
Also this last button not lining up perfectly would make all the perfectionists lose their minds
Oops, thanks lol, I would've never noticed
I hope i ask on right channel..
does anyone know how to fix this stretched images? png
ig there's a preserve aspect ratio toggle on the image component in the inspector
no i dont think so. there isnt
And on the sprite (so your 2D image in your assets), set the clamp mode to repeat
There is one on the image component of the game object that displays it
Also change wrap mode to repeat instead of clamp, that might help too
aah i see, this is the problem. it fix now.
Thanks a lot for you suggestions! I already know the contrat issue, it's cause the shape/background color of the button is temporary, I'm in lack of inspiration... I'll increase spacing tho!
Buttons means:
Endless mode
Levels | Online
Settings | Shop
Now that I think about it, I don't think any of the first three button icons alone would be sufficient to implicate the use of the button for a first time user, I would recommend adding a text element to them
Ok, thanks!
I'm trying to recreate a chat ui on unity, Ive already separate each chat box into a universal prefab that I just instantiate when I create a new message, the problem is that I'm currently using Vertical Layout Group but it also influence the X axis, contraining every message to be centered while instead I should move each message to the left or right depending on who sent the message
How can I solve this problem?
Do better alternatives exists for my case?
You could create your own sort of vertical layout by script
Hey, I thought about it and I'd like to know your opinion on that layout:
Race
Levels
Duels
⚙️ | 🛒
Emojis for logos, Names for text
Funnily enough that's exactly the way I thought makes the most sense. Something similar to the example you provided could work very well, you can always add more life to the UI by adding borders/outlines/colors similar to what you did for the Mini Drift text earlier
Ok, cool! Thanks a lot for your help!!
I like the 3 upper ones more but the shop and settings buttons need some work to stand out and fit in the layout
The top part isn't finished
Better although the two button types are so different that they don't seem to blend together all that well. Maybe it would be better if you could either fit them in the same layout or add enough separation between them (the two button types) so that they don't seem visually related. Sorry, I have to get some sleep now, it's quite late here already
Quite late where I am too lol
Bye
And thanks for the help
np
guys why isn't my scroll rect working? I put it in a canvas set on world space and put the main camera as the event camera. It all works when i just grab the panel inside the scroll from the scene but i doesn't work when i try to grab or scroll in game.
One thing you could try is adding more burger images so that the content (Panel) is bigger than the scrollivew
it already is
Yeah, didn't see that on my phone sorry
don't worry
Which one's better?
I feel like the one with all the buttons on the bottom is better, but the top part looks wrong
I'd need to change the logo
Second picture looks neat
Ok thanks
is it possible to place 3D Objects on UI, in HDRP With transparent background? I tried some stuff using layers but it does not have transparent bg
This is camera + raw image
You could probably render your 3D objects inside your canvas
How can I achieve that?
Masks and layers is not working here well, please can you guide?
You can use a second orthographic camera that render the canvas and display to Display 1
And set the canvas to screen space - camera mode
That post should help you
Thanks for your answer but is it still possible, because I have so many UI Views already setup under one canvas?
The whole hierarchy is done and well working from code to open/close.
If it's inside 1 canvas, yes it is
Okay, thank you very much, will check that post!
The only thing is that you won't be able to change alpha value of the meshes (in case you want you UI to fade in/out)
One thing you could try before doing all that is setting the camera that does the render texture to depth mode maybe
Even tho I'm not sure if it'll work or not
ah, I am doing that using Canvas Group alpha
in hdrp is that an option?
That won't work
Idk, I only use default pipeline
But the mesh inside of canvas thing should still work with hdrp, just no transparency
Yeah. in Default layers are working well too, hdrp has some problems with that
I have some idea
No idea if it will work
I did solid bg as green screen
can I somehow write a blit shader which
discards greens?
to make manual cutout
But here I am using RenderTexture and no idea how I can achieve that. Is that a bad idea?
I found this online:
Set HDRenderPipelineAsset->Rendering->Color Buffer Format from R11G11B10 to R16G16B16A16,then you can read alpha channel from RT
Yeah, I have tried that one, was asking Claude for help
but it was not working. Thanks mate for trying to help, if that helps, will tell you!
. Please help me for this
Is adding my own sprites into an image component just broken on unity 6?
So, I have a Scroll Area, and the contents are set up in a grid form and they are spaced out. The scrolling is very difficult to do because I can only scroll on the content itself, not the gap between the content. How do I fix that?
I also do have another question for the scrolling area :D
Not sure if this is best place. Can anyone help a friend out and post some resources on in game ui/ux for close up physical device interactions? For example: I want to make the controls of a turn table (record player/vinyl record player) interactive. I need to make the pysical "gestures" of rotating, lifting, pushing, etc. accessible via the mouse... what games can I look at that uses this and showcases it zoomed up with similar objects?
finally i solved this
the problem was that extra padding was on by default in TMP InputField
without it everything is ok
Hi
How can I fix this ?
https://unity.huh.how/textmesh-pro
check out this link
Guys im trying to make that the player can interact with UI world space but it doesn't work. I even put the correct Event camera, and im using the new inputsystem. In the scene there is a EventSystem gameobject. I don't know what's wrong
Is it because i have Cursor.lockState = CursorLockMode.Locked; ?
nevermind, solved it by putting the crosshair that is in the middle of the screen Raycast Target Off
But now i have another problem, if i try to drag with left button the scroll rect it doesn't work but if i use the mouse scroll it works
Does anyone know a font that allows for ascii characters? I'm trying to make some old soviet terminals but all of the fonts I can find just turn ascii art I get online into boxes.⠀⠀⠀⠀⠀⠀
⠑⢶⣄⠀⠀⠀
⠀⢠⣾⣿⡟⠁⠀⠀⠙⣷⡄⠀
⠀⠻⡿⠛⢿⣦⣀⠀⠀⢹⣷⠀
⠀⠀⠁⠀⠈⠛⢿⣦⣀⣾⡿⠀
⠀⢠⣴⢷⣤⣀⣠⣽⣿⣿⣃⠀
⣴⡟⠉⠀⠉⠛⠛⠛⠉⠈⠻⡷
Almost all fonts allow ASCII. The text you shared here is using decidedly non-ASCII characters
There are only 127 ASCII characters and they're listed here:
A complete list of all ASCII codes, characters, symbols and signs included in the 7-bit ASCII table and the extended ASCII table according to the Windows-1252 character set, which is a superset of ISO 8859-1 in terms of printable characters.
I would like to ask this question again, because it is an issue in my game xD
I would appreciate any and all help I could get :D
I have a 2D map and I'm trying to make a minimap for it. I've made a scrip that locks the camera and makes it not go beyond the edge of the map, and I've put a 2D box collider on it.
My intention is for the minimap to show a visual representation of the player, a text with his coordinates being updated all the time and for it to be clickable, i.e. if I click on the minimap it will walk on the main map
Any ideas on how to do this? Any videos or guides to help me?
hi. i'm extremely new to the engine. Why isn't the button changing its opacity when i hover the mouse nor when i click it?
Oh I see that's unfortunate
Many fonts have those characters but if you use TMP you'll have to find out what the character range is and include that when creating a font asset
(Soviet terminals wouldn't have had Braille icons in their fonts but don't let realism get in the way of aesthetics)
You could also find or generate art that has only ASCII characters
this has most characters you would need for rendering western monospace terminal text (cyrillic, latin, greek + special characters for box drawing) https://www.jetbrains.com/lp/mono/
fonts "lato", "noto" and "inter" (the unity ui font) also have practically all (western) UTF8 characters, you will need a very large font asset texture to fit all their characters... just try generating one with the hex range 0-2FFF.
I have a problem where i cannot drag the scroll rect with the left mouse button in a world space but if i try to use the mouse wheel to scroll it works. Anyone know how to fix?
why does my image on my UI scale from a weird spot and not the middle of the canvas?
Hey guys, I have a UI Text, and everytime I scale my game screen the text gets bigger or smaller nor respecting the limites I created. I am using same technique and it works for other things in the ui where they always stay same size no matter the scale of the game windows .. but the text depending it is not having a fixed size.. how to fix that?
why when I write anything in this text it just doesnt show up?
and when I enlarge it and make the font bigger it shows up blurry and black
and when I write something its blurry af
Anyone know a way to make dropdowns able to select multiple values at once like a checklist?
Either a way to natively or an existing asset
Is there a way for textmeshpro to automatically markee if the text is too long?
just so we are on the same page, this is markee 😅
So my Cursor in the unity edit is visible.
But when i build the game
The cursor is invisible
and you cant see it
does anyone know how to help wit this?
Thanks!
Gotcha
if you want alternatives, you want "nerdfonts" are fonts that have many glyphs 😅
animating maxVisibleCharacters and firstVisibleCharacter did it for me 👀
a bit choppy (since we jump per character and not perfectly smooth) but good enough for what I need
does anyone know how is this kind of loading bar called? like instead of being a rectangle is kind of warped
Skewed maybe?
This made me remember that unity can't skew 🥲
@fossil crown Don't cross-post
how to make buttons accept not only left click, but also right? i also need to know which mouse button was pressed
Instead of a Button you can use a plain Selectable and add a script with IPointerClickHandler. From there you can check which button was processed from the PointerEventArgs
oh thanks
whats wrong with default UI? it has RenderTexture (raw image component). or you just dont like it?
What you mean by that?
Hi, I have a PNG image with a bunch of icons in it, and there has been a bunch of sprites created from this 1 PNG.
Question 1: How do I create sprites from PNGs like this?
Question 2: How do I reference one of the icons in the PNG through USS? For example, through background-image?
- With the sprite editor / import settings of the image
- The same way you reference any normal sprite afaik
Anyone?
does anyone know how do I make the UI Strech releativly to the screen?
Watch an introductary tutorial on Unity UI to learn about anchoring
I'm building up a chat sisyem on the UNITY UI, I have a prefab called chatblox for each message, they get instanciated at runtime when a new message arrives.
Now I'm handling the vertical layout of the messages via code, they get sorted sorted one above the other (like in messaging apps),
the problem is that I'm trying to get the height of the last message to then place the new one at "previousMessageY + someSpace" but when I try to access the last message height, I always get 0, even if in the inspcet its clearly not 0. what am I doing wrong?
Since each block has a content fitter component they have greyed out width and heigh in rect, but I dont think thats the cause I always get 0 in return
Here's the code
// Get last message rect reference
RectTransform lastMessageRect = contentParent.GetChild(childCount - 2).GetComponent<RectTransform>();
// Calculate the new Y position (rect.height here always returns 0 even if the reference points to the right obj)
float newY = lastMessageRect.anchoredPosition.y + lastMessageRect.rect.height + messageSpacing;
// Move the new message above the last
newMessageRect.localPosition = new Vector2(newMessageRect.localPosition.x, newY);```
I can't use vertical group because my messageblocks can have different heights based on their content
hello i don't know if i'm in the right place so sorry if it's not the right one.
I'm making a 2d game with tree and stone sprites but I'd like to use perlin noise when generating the game map randomly to have natural looking environments. If anyone knows of a simple way to do this, I'd love to hear about it.
I found out that if I instance the objecs but these are unactive in scene, their heigh and width will be 0, so instead of keeping them unactive for now I use a mask to make them not visible when not needed, however I think this is just a workaround since masked active items still consume resources. what alternatives I have to handle this?
hey! im using the font bahnschrift for my game, and does anybody know why it does this? the text seperates when i type certain characters, even though i didnt add any spaces or special characters, and this only happens in unity
I'd like to ask what the best way is for supporting both phone and tablet portrait screens:
- What are the best Canvas Scaler settings and reference resolution to use?
On phones, we can utilize the full screen space. However on tablets, we don't want to expand fully so that there can be some empty space around the sides (except for backgrounds). I can do this by making the main UI content anchors to stay centered and not expand. Though this gives me the issue that on larger phone screens, the main UI content should still expand to the full available size. How do you solve this issue?
Example of what I want to achieve (phone vs tablet):
Alredy watched a lot of them.. doesnt work for the text as I want but thank you!!
What does your text rect transform look like then?
soo, I'm trying to setup my credits.... ummmmm
can you tell me if Edit->Project Settings->TextMeshPro Settings-> Parse escape sequence is on or off?
it can also be found in extra settings on said component
nvm I just had \\t instead of \t and for some reason I didn't notice it when pasting my template
makes sense! Pretty sure that's the XML way of doing things
personally, I like to use Scale With Screen Size, and use a typical 9:16 reference resolution, like 1080x1920, for setting up the UI itself
Most of the work then is just putting in all the anchors properly in the actual UI - and you set screen match mode to Match Width or Height, and them play with the match value to your tastes, I tend to use 0.5 but it might not be what you're looking for here, I think height match (so value 1) might be good for the style you're going for
9:16 is a good middle ground, that's why I usually choose it for ui work for tablets + phones, but it's really important to remember that it's not a be all end all
there are phones with ridiculous aspect ratios, which bit us in the ass a few times
and tablets come in many sizes as well
it's gonna require some iteration, and your ui should work on anything from 9:19 to 3:4 to actually work everywhere
thank the gods for unity game view resolution settings xd
also 1 more thing - you NEED to test the precise resolution in pixels, NOT ONLY aspect ratio, in said unity game view resolution settings
it can change how the UI looks a lot - you need to do a lot of testing to verify everything works
it also tends to expose some screwed up anchors, often xd
hi there i got a bit of a problem with my ui. when i change the resolution of my game all my ui buttons go outside of the screen how can i fix this?
you CAN use verical groups despite the different heights based on their content, why not? It's all in the vertical layout group settings
there IS an issue, that if you change the child size from code, it doesn't update everything nicely
but you can run
_layout.CalculateLayoutInputHorizontal();
_layout.SetLayoutHorizontal();
to forcefully make it recalculate everything if something's off
of course it would have vertical functions for you, my example is horisontal layout
you need to learn how UI anchors work, it's pretty fun
they allow you to anchor your UI elements to certain areas of your screen
the easy way allows you to anchor them to corners, top/bottom/left/right and middle
arent they anchored by default?
to change the anchor, click the element you wanna do, click this
center middle button and select your anchor! You can hold alt when selecting your anchor to move the element while doing it as well
they are anchored to the middle of the screen by default
and if you just moved them to the sides, it calculates the amount of pixels from the middle and that's where it displays the UI
so if the position of the side changes, the UI element stays in the same place, which might mean outside of the screen!
instead, you probably want to anchor it to a corner or to a side instead - and this will make unity always display the element X pixels away from the side or corner you select
ah i see
you can also change the "pivot" - to tell unity where the anchor is placed on the ui element itself
so if you place things at the bottom of your screen, you could just move it up X pixels manually, or you could set your pivot to be X=0.5 and y=0
or x=0.5 and y=1 at the top
and that's where the anchor will be! play around with it
pivot is like a percentage of the whole recttransform, so you don't have to play with pixel offsets as much
and if you change the size of your element, it'll just magically work
check out what I said to vlesch, above, you need to click that button I screenshotted, hold alt while selecting the anchor, and click the blue arrows in the selection instead of the oragne/red ones - play around with it and see how it works!
does this ancher ancher them to all the sides of the canvas? or does it work difrently?
yes! It makes it stretch to all 4 corners of the parent element - so in your case it could be the canvas
you can adjust the Left Right Top and Bottom values to offset it a bit, so it covers only most of the screen, if you wanna
if i use that anchor the elements just disapair when i change resolution
try anchoring it to one side instead of the whole screen - this anchor is used for things like background images, which need to be over the whole thing
click on the canvas, and in canvas scaler, set UI Scale Mode to Scale With Screen Size - and in reference resolution, put in something like 1920x1080 for horizontal screens (PCs/TVs) and 1080x1920 for mobile phones (depends what your project is for)
and then you can set screen match mode to match width or height
and then you can play with the match value how you like, or leave it at 0 or at 0.5, both should work fine for most cases
do note that this might mean you have to rearrange a lot of your UI - but it will scale nicely then!
alright thx alot🙂
I think the normal unity UI system is miles better than UI toolkit for most usecases
but you need to keep in mind that it will be VERY different than working in JS/HTML/CSS
and it does support rendertexture
are you using TextMeshPro?
it's very recommended
the issue might lay in the font you're using
or your component settings...
how to make the game be scalled to every screen witout pain
when i full sceen the web game it becomes good
by the way thanks @vapid edge for solving the first problem

tell me if you have done your anchors properly
and show me, on your canvas object, your canvas scaler component
😅 i have four canvas
this is the frist one
do you have a reason for making it world space?
you might have to change everything for all of them
yeah because the camera is moving
i think 🤔
one sec
yeb i set it like that because camera
is the UI supposed to stay in the world while the camera moves around? why is the camera moving around?
did you do it to make an animation?
to change between the screens?
yes
yes
World space camera is not very good for those things - it won't scale to screen resolution changes or aspect ratio changes
World space camera is for things like some text on a billboard, or an enemy name hovering over an enemy in 3d space
For menus, you should use the Screen Space - Overlay, and then in canvas scaler set it to Scale With Screen Size, and set reference resolution to (in your case) 1920x1080
You should have one main canvas, and move your menus around, using the anchoredPosition component of their RectTransform, from code
the camera should not move at all to animate the UI changes
Okay thx
if you need more help, ask here ^^ it might be a lot of work to rearrange things, but if you do it this way, it should all work nicely
Screen space- overlay is setting all canvas to center
You need to make one main canvas, and all your menu screens (like main menu, options, credits, mode select) need to be separate child objects
this will make them stuck to the camera, yes, but it will also make them scale with the camera, which is what you need
you need to then reference them through code, and move them around by changing the anchoredPosition that they have
as I said - lot of work, and you need to switch your system from moving the camera to moving the ui screens around
I don't think there's another way
When I tried the vertical group it didn't seem to respect each element's height
if you change the height of childobjects through code after spawning it in -
_layout.CalculateLayoutInputVertical();
_layout.SetLayoutVertical();
from code after any change
if you do that, and if you have the vertical layout settings set properly, it should work
let me know if the above works - if it doesn't, we could further troubleshoot this, but I promise you that vertical layout group is the best solution to your problem
i figured it out, in the 'Extra Settings' tab for the TextMeshPro, theres a "font feature" setting, and by default its automatically set to "kern", if you change it to nothing it fixes the problem .. well, it did for me anyway
Thanks I'll try this
How can I improve my shop UI please?
Hi, this is probably a pretty dumb problem.
The clickable area of my buttons is way bigger than the image i'm using as Bttns.
How can I make the clickable area the same size as my bttns?
i've marked the clickable areas of the buttons so yu can see what i mean ^^
Thanks for the answer. After researching, it does seem most common to use 1080x1920 and 0.5 Match Width or Height. However I have some questions:
-
Personally I like to always use Mobile Simulator view instead of game view. This is since it simulates device Safe Area (iPhone notch, homebar gesture), and Touchscreen input code. Since I want to use Mobile View, I can't use 1080x1920. Is it okay to pick something like iPhone 13 device and use that for reference resolution -- or is there some caveat/issues from not using 1080x1920 reference resolution?
-
Have you built UI for both phone and tablet in portrait mode? Did you ever need to make it so that tablets don't expand main UI content fully (padding around sides), but phones have to expand fully? (see examples #📲┃ui-ux message) If so, how did you implement that?
i wil try
Any idea on how to improve this?
How to start in game ux design ?
How can I make my icons have the same shadow effect than my text? The icons are just white images
i'm having a headache, trying to implement a RuntimeInspector (the one made by Yasirkula).
I plan on having a button on the bottom left corner of the screen that you can use to turn on or off the runtime inspector. This button would be also moved by the runtime hierarchy, the image here explains it rather well i think. where the left panel is the hierarchy and the right panel is the actual inspector.
Trying to make it so the button moves accordingly when the inspector pops up, i'm 90% sure i'm supposed to use the Horizontal LayoutGroup and ContentSizeFitter for this, however. when i disable the hierarchy the entire container itself moves around leaving the button in a seemingly random place. how can i fix this behaviour so the object with content size fitter stays in its place and just causes the button to move to the corner?
Here's a gif where i show what i mean by the button just, moving about when i disable the hierarchy
https://i.gyazo.com/7d574dcb320e305f740d3e093a9755aa.gif
As you can see, the button is not moving to a "seemingly random place" but to the anchor point of the original layout (the one with the big white square), try moving that anchor point to the the top left of the original layout maybe ?(so set anchor pos to 0,0 in the inspector of the gameobject with the layout) (not a pro with UI, just some ideas I have that could fix it ig)
hey guys my world space canvas is not interactable the buttons on it. i have checled and it has a event camera
Is your cursor locked?
(also do you have an event system in the scene?)
that's why
you need a workaround for it to work with a locked cursor
basically the built in input module doesn't work with a locked cursor
so you need to override it
where should i attach the script to? anywhere?
got it
anyway to render a particle system behind a UI image but on top of a UI background?
so sandwhiched between two UI images
-FOUND A SOLUTION IN ORDER LAYERS-
this is when my slider is at its max value
and this is the minimum value
the minimum value shouldn't look like that
instead the slider should be drained because it's at 0
when I try to adjust the width to match the emptyness at 0 this is the result I get on the max value
how can I make it even on both sides?
@here
Ooof, never use that @ ..
You guys think this is a nice cursor?
out of 18185 online nobody can help me out?
You’ve shown the issue, you haven’t give any info that helps someone work out what the problem is.
There is info.
What’s the setup?
How are you setting the value to 0?
Are you sure the value reaches 0?
If you can’t ask a question properly , don’t expect help from 18k people 😉
The setup is the default slider setup. I'm setting the value trough the value in the inspector. I am sure it reaches 0.
You’ve made changes to the slider
the only change is deleting the handle
and that's causing the issue
the handle is usually covering that part
IIRC the anchors on the slider are a -5, which takes it beyond the rect
and what's the fix?
.. set them to 0
Sliders aren't a good tool for this. Just use a filled image
It's so much less complicated
that may be a great solution
Hello, I made a world space UI but i can't interact with it at all. Does anybody know how to fix it, I would greatly appreciate it, thanks!
hi lol
As mentioned in the other channel, see if you have the same issue as here #📲┃ui-ux message
Howdy, I'm writing this here because it's mostly related to UI and TMPro.
When I use TextMeshProGUI and try to scale it, Unity runs into infinite loading.
I tried:
- Different fonts, including the default font
- Deleting and re-importing TMPro
- Deleting the Library folder
- Waiting 30 minutes

I'll send a video soon of what's going on in more detail
Of course, in other projects I don't have this problem and text scaling works normally
hello i have a probleme with my rain
On some phones, the rain works, but on others, the camera is misplaced.
with another phone
I wanted to ask a question, how can you view all UI’s in a scene?
Smoll update
What I found:
- PosX, PosY and Height works correctly
- Everything works correctly when TMPro is turned off
- It "crashes" only when written
2008-05-03 06:29:35 -0700 AXON BODY 4 D01A0767G - A modified version of the text
2008-05-03 06:29:35 -0700 AXON BODY 4 D01A0767Gis working correctly - Most likely the 'crash' is caused by the space between
06:29:35and-0700
I've never seen a weirder bug in my life...
EDIT:
I checked more carefully, if there is a <any char> -<any char> in the text and you change the width then Unity starts infinite loading...
Unity, pls fix
Second EDIT:
It crashes other projects too...
I dont know if you would know how to fix but i already tried that script and it worked a couple days ago and then it just stopped working randomly, i now made a new project to test and the script works
its got something to do with the project then, but i didnt tweak anything that important tho
The rest of your scene may not be set up properly
Hard to say without seeing it
what to you want to see
Can someone explain me with this looks differente from scene to game? Even when I maximize my screen it looks different
First you'll have to change the game view scale back to 1x and check if it still looks like that. If that didn't work show what the "this" is (select it and show the inspector)
The problem was the scale tyy
hellooo,can someone help me? my svg file in the unity are removing the text adn some components? I included the message in the screenshot it said that incomplete mesh data in the sprites
it was supposed to be like this
Assuming you're using Unity's Vector Graphics package, it's spelled out pretty explicitly that it doesn't support text elements, among other things:
https://docs.unity3d.com/Packages/com.unity.vectorgraphics@2.0/manual/index.html#known-limitations
hi xd
if TMP underline is too high up, what setting do i need to adjust in the font asset to bring it down? there's a bunch of settings and i haven't changed any of them since idk what most do
Does anyone know why it looks like that?
I already put the same resolution of the render texture and the rewimage and it still looks like that
”like that” is the really vague description of a problem
Don't you see how that looks? It looks vertical instead of where I can see clearly
I do see white box inside a blue box with grey background, how I’m aupposed to know what’s wrong?
Well, forget it, I already fixed it.
Great. Next time make sure to describe what’s wrong with your game instead of sending screenshots without context. Not all of us are detectives nor do we want to pretend to be one
@lunar relic Looking at your message history, it seems like this was far from the first time this has happened too. Assuming you are not just trolling here and genuinely want to get helped, you should seriously consider putting more effort into formulating easy to understand questions with enough context
Is there a way we can set a max width on a UI container? For example, I want the UI container to keep expanding up until a certain certain screen size (tablets), where it will no longer expand more.
hey guys I have this here
my fillplayerHP bar is always in front of the HP bar border.. how to fix that?
cant find a layer to control
the red part is in front of the white part
the only way would be removing red part as child and just put it above the white bar in the hierarchy ?
One thing that strikes me as strange is, are there any alternatives to Gridlayout groups, when i'm wanting slower transitions than "instant" for moving objects to their intended positions?
right now, I'm working on a janky system of using Gridlayout groups to hold "nodes" that other UI elements slide towards, but that feels backwards.
is there any way around it? or do I just have to use a png of my assets?
Hey so if I have a bunch of foldouts in editorgui in a custom inspector
How do i keep those foldouts that I opened open when switching between gameobjects with Instances of the custom inspector
Okay so i am literally going crazy
So i have a Canvas, and below that i have a object which is "options_menu"
and below that i have "close", a ui button
okay so no matter what i do, the "close" object cannot go above "options_menu"
i've tried so hard but no
and idk how to solve it
overly specific for google and chatgpt couldnt understand it
i have only 1 canvas
You're doing UI wrong:
You're not supposed to use sprite renderers and transforms. That's for the gameplay. Never for UI.
You need to use RectTransform and Image components instead. Try right clicking in the hierarchy, and selecting the ui dropdown. I'd recommend watching a unity UI tutorial, as that can get a bit complicated. To properly build a UI, you need to have all childobjects of canvas to have a recttransform
And leave the z position alone! You don't touch it when doing screenspace UI.
thank you ill try
Then how can i decide which image should be above the others and etc.?
Figured it out!
Hierarchy order
Hi guys.. I have an UI Text. Even if I play around with anchors or use Best fit. as you cna see in the video. when I move increase or descrease the game window everything stay same size but not the text..
anyone?
hi
how to make a loading animation? i have frames of my animation, i just made an animation clip and animation controller but i don't know how to put it on my canvas
the screen space camera should add perspective to UI elements on the canvas no?
How can I have a world space canvas (enemy healthbar for example), but have it appear flat and consistent size despite distance from camera?
I tried using a normal UI canvas and WorldToScreenPoint, it gives the desired effect, but for some reason it's either jittery, lagging behind, or lagging in front when enemy is moving (tried all the different Update loops). I'm using Cinemachine camera if that effects anything.
edit: fixed by using CinemachineCore.CameraUpdatedEvent.AddListener(OnCameraUpdated) instead of Update loop.
Hi sorry I asked about this the other day but will admit I was still lost. If someone can give me a indepth explanation on how to make these and what I need to do I am willing to draw art in return
I made a empty parent and empty child then a Text-TextMeshPro
and I truly dont know if thats the correct thing I am meant to do?
I tried to drag the InGameText to the game manager part on the inspector and it just wont let me it comes up with the ❌ sign not allowing me
the tutorial I am following for this did not show me how to make the canvas with all the attached things they already had them so I am just confused on how to do it myself especially with it not working for me
In your code, did you write something like Text InGameText;? You must use TMP_Text InGameText;
Text refers to the old legacy text component. For the new text component (TextMeshPro), use TMP_Text instead.
ahh I see yes this is what mine is right now
so I should change Text to TMP_Text for all of the instances of Text ?
Yep
Oh but it is giving me this error now?
At the top where your using statements are, put using TMPro;
Pro tip: if you put your cursor into the red line and press Ctrl + ., it will tell you if you're missing a using statement.
thank you I will do so !
should this also be updated? cause my new error I am assuming is referencing this
i forgot to mention thats line 66 and it says 66 in the error
No, only the Text where you declare the variable for the first time. That should remain as timeText.text
how do i change the opacity of a ui element when the mouse is hovered over it
like p:hover in css for example
OnPointerEnter / OnPointerExit
is that in a script or in the inspector
Script
alr thx
how do i make the transition smooth
so its not just instantly more translucent
Same as anything else, lerp / tween it
I use DOTween, because is easier, but it's an extra (free) plugin
idk what any of those are 😭
googleable keywords
chatgpt carrying
does using more canvas eats performance
No. Helps it
Questions about designing UI:
- Is it possible to use grid snapping when moving UI elements on the canvas?
- Is there a way to get proportional snapping, like ensuring 2 different buttons are equally spaced out, etc.
- Is there a way to enable snapping guide to center
Any other UI designing tips are welcome. If Unity doesn't support much, is there any good packages that help extend UI designing functionality?
Have you looked into UI Toolkit?
I have, but seems like it's still lacking features that normal UGUI has. For example, playing particles in UI, advanced shader effects. Especially since I'm using 2022 LTS as recommended for stability, there's not even built in placeholder text for input fields until version 2023. The resources and tutorials available for UI Toolkit is also lacking in comparison to UGUI, and most GUI asset kits only provide UGUI prefabs and not UI Toolkit versions. It might be a choice in a year or so, but I don't think right now for my project.
At the very least, is there no way to have grid snapping enabled for canvas UI objects? I know it's possible for world objects.
All of that stuff would be achieved with Auto layout stuff basically
hello while trying add post-processing on the ui via a separate camera on the Screen Space - Camera it does not seem to. It does work on the main player cam but I want different post-processing effects on the ui then on the main cam. does anyone know any better way or how to fix this?
Hi,
I want to do a gradient black from the edge to the middle of the screen when my life is under 20 hp.
Is there a tool to do this or I need to do this with an image but I don't think the result will be very beautiful ?
Don't do that with UI, use post processing and increase the strength of a vingette
hi
why scrolling doesn't work sometimes? (when anything isn't moving that means i can't scroll)
At a guess (because you haven't shown anything useful to see for sure), the content rect isn't big enough... you need to resize it to fit the contents (the children)
it's big enough
it fits all buttons
You're gonna have to show the setup, I'm not going to keep making random guesses.
Also, from the vid, it looks like it only scrolls when you use the mouse wheel ?
it starts working when i move mouse a bit
hey guys, I'm kind of confused as to how the TMpro's preferred values work. Can someone explain to me? Does it prioritize keeping original width or height?
I'm trying to get the width for the text, while keeping the height unchanged, but it tries to get more height instead
where does scroll work and where it doesnt? or is it completely random?
Does anyone know of a good crash course for building UI that includes a Tab system(& ideally works for console environments)? paid or free doesn't matter. SasquatchB studios tutorials are GREAT but I need something more in-depth.
yes, i only noticed that when it doesn't work i have to shake the cursor and it works again then stops again
hi guys, I am kinda confused because the text objects in my game are getting sized down when in play mode? (The one with the grey background is in editor mode, and thats how big I want the text, but the white one is the actual game screen)
Do you have AutoSize on in your TextMeshPro component?
I'm facing a bit of a strange problem myself. In my startup scene, there are two canvasses. They both need to have Screen Space - Camera as their Render Mode. One of them is DDOL.
Now when I press play, the DDOL Canvas loses the reference to the camera, and even when paused doesn't see the camera available in the scene. The other, non-DDOL Canvas still has a reference to the camera available. When I try to set the camera through code, it doesn't do anything, but I don't get an exception either.
Anybody knows whats wrong?
They aren't Text Mesh Pro, they are the normal "Text (Legacy)" components
Ah, I'm afraid I know little about those. Aside from checking whether your Rect Transform has stretch enabled I don't have any suggestions then.
tysm!
do you put the cursor back in the exact same spot after shaking it though? cause its unlikely that its completely random, something may be blocking raycasts etc
i find out when it works - when cursor is on one of the buttons
so ur scroll view doesnt have a transparent image behind it that fills the entire thing, for catching raycasts. it has one by default so you must have deleted it
what should i do?
try adding a child to Scroll Area (and make it above Levels in the hierarchy) and set its color to transparent. and then make it stretch to fit the entire scroll area by clicking on this and selecting the right option (do you know how to do this?)
this happened cause you didnt use Create > Scroll View to create a scroll view i assume? you just created an empty gameobject and added the scroll view component to it yourself?
yeah, i guess the video i watched to know how to make it wasn't good
@stoic hull well you can just add that thing i talked about here. also when you create this child make it Create > UI > Image so it creates the proper thing for you
it already added image component to Scroll View
oh you created a new scroll view properly now?
yes
you can put all your levels into here and everything should work then
but how to delete horizontal scroll bar?
just delete it
oh wait i wanted to disable it first but didn't try to delete (idk why, just nevermind)
@honest saffron thank you
@honest saffron last question: how to disable scrolling with cursor (as on sensor screen but with mouse)? and should i?
pro tip, you can google stuff like that and will find lots of posts discussing how to do it. if you type "how to disable scrolling with cursor" into google. and if you should do it depends on what you want, it's your game 😄
oh you should also specify in that google search that it's unity
I have a question
lets suppose i have an image that acts as a viewport
and i have some other images inside it
its more like a scroll rect
like where the content size fitter fits itself for the image it is in
i want a content size fitter that fits itself based on the images inside it
anything like that possible?
Yes, content size fitter is made to resize content rects
but i want to resize the rect according to the elements inside it
When adding items inside fitter controlled object through script it may require additonal forced redraw calls
That is its purpose
no no no
you see content size fitter
when i add it to something
lets suppose a UI.Text
now whatever i will write in that text
according to the size of the text
the rect transform's width and height will change
but lets suppose i add a child gameobject
inside a gameobject controlled by content size fitter
then it doesnt work
how to make it work?
Nesting should work just fine, except in some cases #📲┃ui-ux message
can i get some docs
or examples?
its my first time
also thanks for the guide
Experiment with dynamically updating fitter.
See LayoutRebuilder.ForceRebuildLayoutImmediate
https://discussions.unity.com/t/content-size-fitter-refresh-problem/678806/6
tried
didnt work
I feel like this is super easy but, how do I get a canvas/text to display over a object instead of the screen
I have an UI image, in which I want to display a sprite. I want to display it with the pivot point of the sprite in the center of the image, but it seems like it wants the center of the sprite in the center of the image. Any ideas?
First off check where your pivot is in the sprite editor for the image
This is how it looks in the sprite editor. When showing it in UI image, it's like the "cutout" and pivot points are fully ignored, and the full picture is instead displayed, stretched out in the UI image
I probably just don't understand what I'm doing 😄
Can you show screenshots of how you set up the UI image
I think I'm starting to see what's wrong, but it feels like I'm missing some fundamentals here
When I look at the sprite in the inspector, it's still the full size of the image
Is it possible to "cut away" the canvas outside of the defined border of the sprite?
Or am I supposed to do this outside of Unity maybe?
Hmm I sorted it by cutting away the edges of the image outside of unity. But if anyone has the time to explain why the borders "doesn't work" or how it works, I'd appreciate it, or where I can read up on it
Hey guys.. its been a week and I still cant find solution to my problem. I have UI-Text. Everything on my game stays in place and scales properly.. But the UI Text, even tho I play around with anchors etc.. it is not doing the same behavior.. this is the video showing
This seems to just indicate you didn't properly set up the sprite in the sprite editor.
Yes I agree, I just don't understand what I'm doing wrong. I mean, I have a game going where I have cut out my sprites just fine when I'm using multiple sprites from the same sheet
When I disable the canvas' graphic raycaster, the OnPointerDown event on my Image stops triggering.
But when I reenable it and set the Blocking Mask to Nothing, the OnPointerDown gets triggered when it shouldn't! Does anyone know why this is happening?
hi guys, how to add frame by frame animation to ui object? (Image (not Sprite))
Select the UI object, open the Animation tab and press "Create"?
animation doesn't work
It is working on mine
Screen space - Overlay canvas doesn't show Sprites, only images, i found out that i have to use script that change source image to make this animation but it make Unity lag
and animator just doesn't work
or i am doing something wrong
Well, the Animator definitely allows changing sprites in UI Images...
In other words: the GraphicsRaycaster's Blocking Mask DOESN'T DO ANYTHING!!! why?
huh, weird but not bad because it works
and i don't know why it didn't when i tried before...
No matter what value I set for the Graphic Raycaster's Blocking Mask, nothing changes!
I have two overlapping images, each with its own layer.
If I set the Blocking Mask to:
(1) one of the layers, the front one detects the click event, instead of the one with the same layer as the blocking mask.
(2) nothing, the image in front gets clicked, instead of both images ignoring the click event.
What am I missing?
i have several images on one canvas, how to set order for each image to fix hiding of image that shouldn't be hidden?
change the order of the images in the hierarchy
are you talking about the text size itself, like font size?
I've been trying to get my ui indicators to track world space objects using WorldToScreenPoint and finally realized it works perfectly if I set my game window to fixed 800x600 matching my CanvasScaler settings. but if I resize the window the tracking falls apart. I feel like I need the canvas scaler to keep my font ratios the same across resolutions. Is there a way to make WorldToScreenPoint work with a canvas scaler?
bump
Having a Button, how do I make its child, TMP Text, reveal the objects behind the Button?
Having a blue background and a black button, the text's color should be blue
guys why text on buttons has different color than it should be?
(it has to be almost black (#323232) but it's grey (#7a7a7a))
Do the buttons have a source image?
yes
what?
The default source image affects the opacity
but on another scene same button looks as it has to
Other objects may have the opacity reduced
but which? button image color, text color opacity is 255
Everything that contains the text may be causing the issue
I would check the sprites
tell me please which objects inspector windows should i send you
bc i don't know
yes
Remove the Image's source image?
same
and i just removed texture of the button
I'm not sure what is the opacity of your button
255
Could you put the text outside of the button and show it again?
it went behind the button
so button covers it
Remove the button
The same color as before?
yes
So, not the expected one?
yes, it's not the color i need
in dm i guess?
Yes
Anyoneone why this happens?
This is my game in game view
But in exported version looks like this
Set the game view scale to 1x
I have an asset with multiple "frames" I want to turn into 9slice sprites. Is there a way to carve them out of a single image/asset, cause I can't find it. I can make it a multiple sprite, but then I don't think I can run the sprite editor on an individual sprite?
turns out these are completely unrelated I thought a single sprite can be 9sliced, where single/multiple is just whether you want to carve out more sprites out of the asset or not, and the mesh type tight / full rect actually controls whether you get a 9slice or a simple rectangle.
Hello. I found this answer on Unity forum about inverting the UI Mask by changing the image's material, but I'm not sure how I can achieve this on a text, since changing the text's shader to UI/Default Font or TextMeshPro/Distance Field gives the result below, when characters are perceived as rectangles
check the video and u will see what happens here :
I want the text to keep the same size and as u see its not or I dont know
does anyone know how to fix loading animation lagging?
What's the best way to be able to use Canvas Group alpha fading without having topmost elements blending alpha with the background elements? Essentially fade everything out as if it were one whole image, rather than made of individual UI elements.
From researching the 2 methods:
- Manually masking elements to hide the portion of the background they cover (but it's too time-consuming).
- RenderTexture the whole UI popup into an image, and fade out that image.
I wonder if anyone has picked a solution for this problem, and their experience. I don't know if having to RenderTexture is good for performance. I hoped there would be an easy way since this seems like a common problem.
are there ANY pieces of code that can be used to force Text Mesh Pro text to always be pixel perfect? I have the font set up correctly, and set to the correct font size, and everything else, but it STILL looks corrupt and wrong, due to things like Layout Groups and parent scaling and all that stuff altering the position of text.
Did you set your canvas as pixel perfect
Does not work, Layout Groups appear to override it. I'll try messing withsettings more.
Make sure the scale of all UI elements (bar the canvas itself) are set to 1,1,1 and the font size is > 1
Yes, that is all done as expected.
Is there a way to deal with this, in TMPro?
I'm trying to add an outline to my text, but above .55 thickness it creates those weird dark backdrops around the text
IIRC that's caused by not enough .. spacing? in the SDF
Like I said, the issue is that Layout Groups ignore pixel perfect canvasses.
It might help if you show the issue too..
thanks, that fixed it - but it's still really weird with the outline
it's not a solid color, and makes the text really unreadable :(
When the width of the object changes, the Horizontal Layout Group overrides any sort of pixel-perfect displaying, and the text distorts accordingly.
The text is hinted raster, point filtered font, set to the correct font size and sized correctly for the render resolution
The only thing I can think of that it could be, other than the horizontal layout group, is that there's somehow non-pixel-perfect spacing between letters in the font asset itself, rather than the font, and I have no clue how I'd fix that,considering I've poured over the font asset and font and font material settings.
I've tried just making my own Layout Group from inheriting from Horizontal Layout Group or HorizontalOrVerticalLayoutGroup, but Unity throws a fit and bricks if I try to make anything inherit from those classes.
Hello, How I can make curved UI like in content warning?
You can just place the UI elements in that curved pattern and rotate accordingly but making the elements actually curve is something unity doesn't support. If you are not afraid of handling the inputs (button clicks etc.) yourself, you could consider either rendering the UI into render texture and rendering it then as a texture on top of curved surface or using custom shader for the UI elements to make them appear as curved (could be implemented as projection of vertices to that cylindrical shape + potentially a pixel shader to distort the UVs correctly)
idk why its not showing in game
Why'd you put a SpriteRenderer in your canvas
You should be using a UI Image component
Hello, I need help with making sure my design does not break or majorly get affected when I am swicthing from smartphones to tables for a mobile Unity game. How will I fix this problem and make sure assets do not break when I am making this switch?
I have set up my canvas to scale with screen size and I have set anchors in appropriate positions, however when I am using the tablet simulator, all the assets are breaking and being stretched alot
Take great care with the anchoring, layoutgroups, etc
The more complicated a UI, or the more UI there is.. the more likely you are to be better off just having two UI's and enable the correct one for the screen size
In the game view window you can change the resolution instantly to whatever you like. You can use that to test your UI layout on different resolutions without having to make a build each time you adjust something
It sounds like they're already using the Device Simulator, just used the wrong name for it
Hello
I create a 2D game and I want to create an inventory like in zela Ocarina of time. Is it possible to do this in 2D or I need to "turn" the canvas in 3D or something else ?
Exemple of the inventory : https://www.youtube.com/watch?v=Ul2ipeV5npQ&ab_channel=Zas
Place cursor on the item you want.
Press Z or R to move away from inventory.
Move back into the inventory screen (recommend using Z or R)
If coming from map screen tap up left and a C button right before the screen finishes scrolling.
If coming from equipment screen tap up right and a C button right before the screen finishes scrolling.
The topm...
Hello, Im not sure if this is the correct channel so let's hope so. I was wondering, how could i prevent the background video from going completely black when it loops? It's a Video Renderer with loop enabled, the video itself doesn't go black when it ends but in Unity it for some reason goes black for a split second before it loops. Is there any way to prevent that?
"Also sorry for low quality on the video"
Is there any way to use UI in 3d?
Like I have a tablet in my world, which has a canvas and a UI button on it. I have set it to world space
But I do not want the player to use his mouse to interact with it, (as it is a first person game) but rather use a raycast to detect the button and "simulate" a cursor
I thought about locking the cursor to the middle of the screen, but that would disable interactions with UI elements
This is the answer along with the Input Module modifications described here https://discussions.unity.com/t/cursor-cant-click-in-locked-mouse-state/855886
Thanks for providing the link, I read through it, but I don't quite understand it. Do you mind explaining what I should do?
Get the link of the first comment and change the Cursor Lock Behavior to Screen Center?
On your Event System object in the scene, you will see there is an InputModule component there
depending on your input system it's either StandaloneInputModule or InputSystemUIInputModule
The link contains some code that you can use to create your own overridden version of the input module
you will then replace the existing input module with this special input module
then you can interact with world space UI while the cursor is locked and invisible
is there any possibility that that change might break something I have already done?
In that case I would prefer to just leave out that gimmic
break something such as what
idk, anything? Movement, Interaction Systems, UI that I have already done. I have just gotten pretty paranoid as I have been working on this game for quite a few years 
Not sure why it would break any of that, but then wouldn't you be scared of writing any code at all?
Anyway if you've been working for years surely you're using version control right?
Surely I would be using version control...
is that a yes or a no lol
Sounds like an emergency that you should fix right now
If you're scared about losing your work, that's the #1 way to avoid losing your work
Invest a few hours to learn it
it's well worth it
A useful skill for the rest of your life
I recommend Git
i have a toggle button that is set to false by default when the scene loads but i have it set a public static bool to true and when i load back the scene i want it to still be true instead of reseting to false however when i try to access the isOn bool in the same way that i access pretty much any other value it doesnt work and i even tried to do getComponent<Toggle>() and it didnt work, does anyone know how to fix this?
Anyone know why I might be getting these artifacts in my textmeshpro objects?
How will I do this? I am confused
Okay thank you
And you recommended having different assets for different screens? Because currently I am building it on a Samsung andorid phone 16:9 aspect ratio, however if my games are played on a Samsung fold, the entire UI is out of place
If I had to guess, it might have to do with too small padding between the characters in the atlas. You could set the Padding unit to % and increase the Padding value itself in the Font Asset Creator and regenerate the font texture to see if that helps
Hmm, I already adjusted the padding but I'll see about turning it way up
Does anyone know latin?
No, you should use the anchoring system to make the UI fit to multiple aspects
Hello, how do I render sprites above 3D mesh? (No I don't want to physically move the sprites ahead of 3D meshes)