Exemplo n.º 1
0
        public static int Destroy(IntPtr L)
        {
            int udata = LuaDLL.tolua_rawnetobj(L, 1);
            ObjectTranslator translator = ObjectTranslator.Get(L);

            translator.Destroy(udata);
            return(0);
        }
Exemplo n.º 2
0
 public void Close()
 {
     if (L != IntPtr.Zero)
     {
         translator.Destroy();
         LuaDLL.lua_close(L);
     }
 }
Exemplo n.º 3
0
        public void ClearLuaRef(ObjectTranslator _translator)
        {
#if UNITY_EDITOR
            StringBuilder sb = new StringBuilder("ClearLuaRef:\n");
#endif
            for (int i = 0; i < count; i++)
            {
                if (list[i].obj is UnityEngine.Object)
                {
                    if (list[i].obj.Equals(null))
                    {
#if UNITY_EDITOR
                        sb.Append(i + ":dispose," + list[i].debugLog + "\n");
#endif
                        _translator.Destroy(i);
                    }
                }
            }
#if UNITY_EDITOR
            Debugger.Log(sb.ToString());
#endif
        }