public void RemoveChild(NodeBehaviour child) { Debug.Assert(child.parent == this, "childs parent is not this"); this.children.Remove(child); child.parent = null; NodeHelper.SetParentKeepLocals(child.transform, null); }
public void AddChild(NodeBehaviour child) { Debug.Assert(child.parent == null, "child already has a parent"); this.children.Add(child); child.parent = this; NodeHelper.SetParentKeepLocals(child.transform, child.parent.transform); }