void ShutdownState() { if (currentAppState != null) { if (currentAppState.transform == transform) { currentAppState.transform.parent = null; } currentAppState.AtShutdown(); currentAppState = null; } }