How align GUI with game objects?

I am trying out the GUI system in Unity. As others have stated, the canvas appears incredibly large compared to the rest of the scene and your game objects.

The problem is, I want to visually lay out my GUI elements with the game and its game objects. For example, a button that appears near an animating game sprite.

Why can’t I scale the canvas down to the actual size of the game so I can align elements visually?
If I use a different world space / screen space then the canvas gets hidden behind other game objects, even if the Z position is closer to the camera.

You can, the easiest way i think is by building you’re canvas by code.
Try something like:

**var canvas = new GameObject (“canvas”, Canvas);

//// Screen size to make the canvas the size of you’re screen.
canvas.RectTransform.width = screen.width;
canvas.RectTransform.height = screen.height;**