protected void doinit(IntPtr L, LuaSvrFlag flag) { #if !SLUA_STANDALONE LuaTimer.reg(L); #if UNITY_EDITOR if (UnityEditor.EditorApplication.isPlaying) #endif LuaCoroutine.reg(L, lgo); #endif Lua_SLua_ByteArray.reg(L); Helper.reg(L); LuaValueType.reg(L); if ((flag & LuaSvrFlag.LSF_EXTLIB) != 0) { LuaDLL.luaS_openextlibs(L); } if ((flag & LuaSvrFlag.LSF_3RDDLL) != 0) { Lua3rdDLL.open(L); } #if !SLUA_STANDALONE #if UNITY_EDITOR if (UnityEditor.EditorApplication.isPlaying) { #endif lgo.state = luaState; lgo.onUpdate = this.tick; lgo.init(); #if UNITY_EDITOR } #endif #endif inited = true; }
public void OpenLibrary() { LuaTimer.Register(StatePointer); LuaCoroutine.Register(StatePointer, gameObject); }