unity add an object as a child

1.7k Views Asked by At

I have a moving object containing some objects.

When i'm creating some of the child objects and setting the parent to parent object, the created object does not move with parent.

I checked the hierarchy panel. but the created objects are not in the parents as a child.

this is my code:

GameObject parent = GameObject.Find ("Ground");
clone.transform.parent = parent.transform;

What is the problem?

0

There are 0 best solutions below