Move GameObject to the left of the screen (For different aspect ratio)

(Sorry, maybe my English isn´t perfect)

Hi, is it possible to move a GameObject (Not a GUI object) to the left of the screen with a custom inset? It should work on every aspect ratio (16:9, 3:2 or 21:9).


You can use ScreenToWorldPoint to convert a point on the screen into world space. Find the position of where you want the object on the screen (e.g new Vector3(Screen.width * 0.1f, Screen.height * 0.5f, 0.0f), convert it and then assign the result to the GameObject.