I just downloaded Unity3D 4.6.* and got started playing around with the new UGUI system. However, I’ve noticed that it generates a Canvas element when you create various items, but this object seems to be locked at 0,0,0 in World Space. Personally, I almost always start building my worlds around 0,0,0 - so this is a annoyance to me. It doesn’t seem possible to move the Canvas, but I’d like to at least get it out of the way. Does anyone know a method? If there isn’t any, I may just go back to NGUI.
In the editor you can hide the canvas layer:
found this anwser on redddit in the top comment:
http://www.reddit.com/r/Unity3D/comments/2hybic/this_darn_giant_canvas_is_in_my_way_editor/
I just made that script and attached it to the canvas. So when in the editor it pushes it away.
You can replace OnEnable with Update if the it keeps coming back when you change something.
Don’t move it on the X or Y though as it’ll move away from the viewpoint.
@script ExecuteInEditMode()
function OnEnable () {
if(Application.isEditor&&!Application.isPlaying) //only run it if we are in edit mode.
this.transform.position.z=585;
else{
this.transform.position.z=0;
}
}
So by default the Unity canvas is an “Overlay” camera. That is locked in position. You can also have a “Camera” canvas, in which case it will display in front of your camera always. Or a world camera, you can move around freely in the scene and have it be a part of the scene. So if you’re looking for something that just exists over top the camera all the time, why not use the overlay, and then just disable it when you’re working on the scene so it’s not in the way, and then enable it before building? Or you can put it on the camera and move the camera out of the way.