public void RemoveUIElement(SceneUIElement e, bool bDestroy) { e.Disconnect(); e.Parent = null; vUIElements.Remove(e); if (e.RootGameObject != null && bDestroy) { e.RootGameObject.SetParent(null); e.RootGameObject.Destroy(); } }
public void RemoveUIElement(SceneUIElement e, bool bDestroy) { e.Disconnect(); e.Parent = null; vUIElements.Remove(e); if (e.RootGameObject != null && bDestroy) { e.RootGameObject.transform.parent = null; UnityEngine.Object.Destroy(e.RootGameObject); } }