Exemplo n.º 1
0
        private void OnGUI()
        {
            var setting = HookLuaSetup.setting;

            if (GUI.Button(new Rect(0, 0, 200, 100), "Connect"))
            {
                LPNetWorkClient.ConnectServer(setting.ip, setting.port);
            }

            setting.ip = GUI.TextField(new Rect(210, 20, 200, 60), setting.ip);

            if (GUI.Button(new Rect(0, 110, 200, 100), "Disconnect"))
            {
                LPNetWorkClient.Close();
            }
            if (setting.discardInvalid)
            {
                if (GUI.Button(new Rect(0, 220, 200, 100), "ShowAll"))
                {
                    setting.discardInvalid = false;
                }
            }
            else
            {
                if (GUI.Button(new Rect(0, 220, 200, 100), "HideUseless"))
                {
                    setting.discardInvalid = true;
                }
            }
        }
Exemplo n.º 2
0
 private void WaitDestory()
 {
     desotryCount++;
     if (desotryCount > 10)
     {
         UnityEditor.EditorApplication.update -= WaitDestory;
         if (LPLuaProfiler.mainL != IntPtr.Zero)
         {
             LuaDLL.lua_close(LPLuaProfiler.mainL);
         }
         LPLuaProfiler.mainL = IntPtr.Zero;
         LPNetWorkClient.Close();
         desotryCount = 0;
     }
 }