Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change canvas position in Unity?

Tags:

unity3d

I'm very new in Unity and in GameDevelopment at all. So I've started with Roll-a-Ball tutorial. And now I have a trouble with UI Lesson. When I create Text element Canvas parent creates in strange position.

screenshot

But in lesson I see that Canvas is near Player object. How can I move it?

like image 873
Dmitriy Demidov Avatar asked Aug 27 '15 10:08

Dmitriy Demidov


3 Answers

See the bit in your canvas inspector about it being "screen space - overlay"?

That means:

"This render mode places UI elements on the screen rendered on top of the scene. "

And what THAT means, is that you don't have to worry about where the Canvas and child Text show up in your scene view. When you run the game the UI elements will overlay on the background world objects and it'll all be fine.

Source: http://docs.unity3d.com/Manual/UICanvas.html

like image 57
slumtrimpet Avatar answered Oct 18 '22 03:10

slumtrimpet


If you want to see the canvas fit inside your scene camera's view, change the Canvas's Render Mode to Screen Space - Camera; then drag the Main Camera onto the newly visible Render Camera field in the inspector.

like image 44
user3071284 Avatar answered Oct 18 '22 02:10

user3071284


It shouldn't matter where the canvas is located, but you can select the child object called 'text' and change the X and Y values to move it around the screen. I hope this helps!

like image 4
Calvin Avatar answered Oct 18 '22 03:10

Calvin