Hello all, forgive the n00b question. I’m sure this is an easy fix, but I’m going through this tutorial.
Only when I try to move things in my canvas they don’t show up in the same place when I activate the game as they do in the 2D view, and the panel scale and location is off too.
Here’s what I mean.
2D
Game
Notice how the panel is tiny in 2D and fine in the Game and how I have to move the slider way over to the left, outside the canvas to get it inside the panel? I can get it to look OK on screen by trial and error, but then I duplicated as the tutorial instructed and it messed it all up again. I’m just wondering if there’s some setting I’ve got turned on or off or something or how I can fix this so that it shows up the same in both places.
Thanks for your time.
What is your health bar widget anchoredto? (should probably be anchored to the lower left corner of the screen.)
Why is the health-bar outside of you canvas in the 2d view?
It was to the center, I tried setting it to lower left as well.
When I place it inside the canvas it doesn’t go where I want it to. For example if I place it inside the canvas on the bottom left it ends up in like the middle of the screen when I go to the Game window. It’s like it’s offset for some reason.
Try setting a fixed resolution for your game view (like 1920 X 1080) or whatever your target resolution might be.
That will help with the ui. Working with it to free aspect can be sometimes difficult.
The probem is your anchoring.
If you have the widget anchord to the center of the screen but the screen resolution changes it will remain at the fix offset to the center of the screen.
What you want is to anchor it to the lower left of the screen and place the widget inside the canvas visibel space.