I realise this has been asked many times already, but I’ve just come from FOUR other threads with similar titles, tried what they said, and couldn’t get it to work.
I have a script attached to an empty Game Object (with box collider attached). I want to instantiate a terrain piece as a child of the object.
So far I have:
var tile; tile = Instantiate (fHigh1, Vector3(r, 0, c), transform.rotation); tile.transform.parent = this;
A multitude of different errors pop up with every combination I try.
I’ve also tried:
tile.transform.parent = transform; tile.transform.parent = Transform; tile.Transform.parent = transform; tile.Transform.parent = Transform; tile.transform.this = transform;