Exemplo n.º 1
0
        void Awake()
        {
            DontDestroyOnLoad(gameObject);
            instance = this;

            this.luaMain            = "return require(\"" + enterLua + "\") \n";
            luacache                = new Dictionary <string, byte[]>();
            svr                     = new LuaSvr();
            LuaState.loaderDelegate = Loader;
        }
Exemplo n.º 2
0
 void OnDestroy()
 {
     if (onDestroyFn != null)
     {
         onDestroyFn.call();
     }
     svr      = null;
     instance = null;
     luacache.Clear();
 }