public void RestoreDeletedSceneObject(SceneObject so) { if (vDeleted.Find((x) => x == so) == null) { return; } vDeleted.Remove(so); vObjects.Add(so); so.RootGameObject.SetVisible(true); scene_objects.AddChild(so.RootGameObject, true); so.SetCurrentTime(currentTime); so.Connect(true); OnSceneChanged(so, SceneChangeType.Added); }
// add new SO to scene public void AddSceneObject(SceneObject so, bool bUseExistingWorldPos = false) { DebugUtil.Log(4, "[Scene.AddSceneObject] adding {0}", so.Name); vObjects.Add(so); so.SetScene(this); so.RootGameObject.SetParent(scene_objects, bUseExistingWorldPos); so.Parent = this; so.SetCurrentTime(currentTime); so.Connect(false); OnSceneChanged(so, SceneChangeType.Added); }