//call after instantiating prefab public void Initialize(IView parent = null, string instantiatingPath = null) { if (instantiatingPath != null) { InstantiatePath = instantiatingPath; } //"go" //"go/go1" var childs = InstantiatePath.Split('/'); Transform currentNode = parent != null ? parent.GetTransform() : UnityHelper.GetContextRootGameObject().transform; foreach (var child in childs) { currentNode = currentNode.FindChild(child) ?? currentNode.AddEmptyChild(child); } GetTransform().SetParent(currentNode, false); //GetTransform().parent = currentNode; }