I'm trying to set an Image gameobject's transform.position. My canvas is "screen space - camera" because I needed to use a line renderer.
However, when I set the position, say to new Vector3(-320, -240); the object (in play mode) gets positioned at -16266.44, y: -15360, way off-screen.
I've tried to reset the localPosition and such based on some other answers but it doesn't help. What else could be translating my pixel coords?
var go = Instantiate(HexTilePrefab, this.transform); go.transform.localPosition = Vector3.zero; go.transform.localRotation = Quaternion.identity; go.transform.localScale = Vector3.one; go.transform.position = new Vector3(screenX, screenY);