public void AddChild(TransformableSO so) { if (!vChildren.Contains(so)) { vChildren.Add(so); parentScene.AddSceneObjectToParentSO(so, this); update_shared_origin(); increment_timestamp(); //so.OnTransformModified += childTransformModified; } }
public void AddChild(SceneObject so, bool bMaintainOrigin = false) { Util.gDevAssert(so != this); if (!vChildren.Contains(so)) { vChildren.Add(so); if (parentScene != null) { if (so.Parent == null) { throw new Exception("GroupSO.AddChild: tried to re-parent SO to group that has no parent!"); } parentScene.AddSceneObjectToParentSO(so, this); } if (bMaintainOrigin == false) { update_shared_origin(); } increment_timestamp(); //so.OnTransformModified += childTransformModified; } }