public void Shuntdown() { if (envBehaviour != null) { UnityObject.Destroy(envBehaviour.gameObject); envBehaviour = null; } if (IsValid) { if (localLanguage != null) { localLanguage.Dispose(); } LuaFunction destroyFunc = GameTable.Get <LuaFunction>(LuaUtility.DESTROY_FUNCTION_NAME); destroyFunc.Action(); destroyFunc.Dispose(); instanceWithFunc.Dispose(); OOPTable.Dispose(); GameTable.Dispose(); } localLanguage = null; updateAction = null; lateUpdateAction = null; usingFunc = null; instanceFunc = null; instanceWithFunc = null; GameTable = null; OOPTable = null; if (IsValid) { Env.FullGc(); Env.Dispose(); } Env = null; manager = null; }