How to properly instantiate a 2.5/3D gameobject as a child for a Plane prefab?

Hi guys,

I’m back with (hopefully) a simple question.

I’ve created a little script that allows me to instantiate a certain gameObject(which is a cube) as a child to another gameobject(which is a plane) but I’ve encountered an issue.

It seems that whenever the child is instantiated, the cube loses its form, its modified almost to appear stretched as the plane is and it doesn’t seem to be 3D anymore… any ideas on how I could change this?


Like agoiwaldrop said, this is because scaling, the childs objects inherit the father’s object scale.

Example: If you create a plane with scale x=2, y=2, z=2 and make a regular cube as a child, you may notice that the cube scale change to x=0.5, y=0.5 and z=0.5

There two ways to fix this:

1-Make a common father object and instantiate the cube as a child, or even: Object1 (with the plane and object2 as child) and the cube as a child of object2.

2-This is less practical: When you instantiate the cube, scale it as the reverse of plane scale. This probably won’t work with non-linear scaling.