public static void destroyWindowSingle(txUIObject window, bool destroyReally) { window.destroyAllComponents(); mGlobalTouchSystem.unregisteBoxCollider(window); window.mLayout?.unregisterUIObject(window); window.mLayout = null; mAllowDestroyWindow = true; window.destroy(); mAllowDestroyWindow = false; if (destroyReally) { destroyGameObject(ref window.mObject, window.mDestroyImmediately); } window.mObject = null; }