public void ClearChildren(bool wipe = true) { if (IsDetached) { return; } _children.Lock(); foreach (Transform child in _children) { if (child.IsDetached) { continue; } child.OnParentRemoved(); child._parent = null; if (child.Entity.IsSceneFromTransformAncestor && child.Scene != null) { child.Entity.SceneRemoved(wipe); } OnChildRemoved(child); } _children.Unlock(); _children.Clear(); }
public void Clear() { foreach (Coroutine c in _coroutines) { c.Stop(); } _coroutines.Clear(); }
/// <summary> /// Remove all IUpdatable, IRenderables and ISceneObject from Scene. /// </summary> /// <param name="wipe">Allow ISceneObject to be wiped after removed.</param> public void Clear(bool wipe = true) { _updatables.Clear(); _renderables.Clear(); foreach (ISceneObject sceneObject in _sceneObjects) { sceneObject.SceneRemoved(wipe); } _sceneObjects.Clear(); }
public void ClearAll() { foreach (Coroutine coroutine in _runningCoroutines) { coroutine.Stop(); } foreach (Coroutine coroutine in _pausedCoroutines) { coroutine.Stop(); } _runningCoroutines.Clear(); _pausedCoroutines.Clear(); }