QFramework.LuaMain.Dispose C# (CSharp) Method

Dispose() public static method

public static Dispose ( ) : void
return void
		public static void Dispose(){
			mInstance = null;
			if (luaCoroutine != null) {
				GameObject.Destroy (luaCoroutine);
			}
			if (mLuaState != null) {
				mLuaState.Dispose ();
				mLuaState = null;
			}

//			UnityEngine.SceneManagement.SceneManager.LoadScene ("ARBookFramework_BookMenu");
//			LuaMain.assetBundleLoaded = false;
//			LuaMain.getDisposeInstance().Destroy ();

		}
			

Usage Example

Example #1
0
        void Awake()
        {
#if UNITY_EDITOR
            QLuaComponent.isFirstLaunch = false;
#endif
            if (LuaMain.nextClearBundles)
            {
                LuaMain.Dispose();
                LuaMain.nextClearBundles = false;
            }
            if (LuaMain.loadBundles != null && LuaMain.loadBundles.Length > 0)
            {
                bundles = LuaMain.loadBundles;
            }
            for (int i = 0; i < bundles.Length; i++)
            {
                AddBundle(bundles [i]);
            }
        }