position is a new Vector3 calculated on the fly, could be 0,0,0
If drag the prefab into the scene, outside of the canvas (screenspace - camera), it become really tiny.
If i then drag it inside the canvas, it gets scaled up to 489, which is roughly 80 times larger than it has to be. (original prefab scale is 1,1,1)
However if i drag the prefab from the project overview directly into the canvas, it shows up with a correct scale as designed.
The problem with my code is that i can’t find a way to instantiate a prefab directly into the canvas, and stuck with this weird scaling issue. (+offset and size)
You’ll notice when you drag it directly into the canvas, the objects local scale changes (probably to something ridiculously tiny like 0.000024124). You need to use SetParent method to avoid this: