I'm new on unity and am trying to create a top-down game.
My Main camera projection set to Orthographic.
I added a canvas with Render Mode of "Screen Space - Camera" and UI Scale Mode of "Scale With Screen Size" to hold my joystick and other UI element to support different resolutions. Also I added another canvas with the same settings to hold the walls and doors (Because they should be at the border or edge of screen along with different resolution!). I need to place some objects to the screen, I can do it by random with specific distance or by creating empty game objects on screen (inside canvas) and bind them to the script then place my Prefabs to their (empty GameObject
) location.
The issue is I can't understand the object position in Canvas and Screen, I instantiate my prefabs to the empty gameobject position on Canvas, but it's been placed some where else.
Here's the 3d view of my scene: