public void Init(Action <int> tick, Action complete, LuaSvrFlag flag = LuaSvrFlag.LSF_BASIC | LuaSvrFlag.LSF_EXTLIB) { IntPtr ptr = MainState.StatePointer; LuaObject.Init(ptr); #if UNITY_EDITOR if (!UnityEditor.EditorApplication.isPlaying) { DoBind(ptr); DoInit(MainState, flag); complete(); MainState.CheckTop(); } else { #endif MainState.gameObject.StartCoroutine(DoBind(ptr, tick, () => { DoInit(MainState, flag); complete(); MainState.CheckTop(); })); #if UNITY_EDITOR } #endif }