コード例 #1
0
ファイル: LuaProfiler.cs プロジェクト: midgithub/unity3d-lolo
        /// <summary>
        /// 结束数据收集
        /// </summary>
        public static void End()
        {
            GameObject  go       = Common.go;
            LuaProfiler profiler = go.GetComponent <LuaProfiler> ();

            if (profiler == null || !profiler.enabled)
            {
                return;
            }

            profiler.enabled = false;
            if (s_isUDP)
            {
                if (s_udp != null)
                {
                    s_udp.Close();
                }
            }
            else
            {
                if (s_tcp != null)
                {
                    s_tcp.Close();
                }
            }

            s_luaEnd.BeginPCall();
            s_luaEnd.PCall();
            s_luaEnd.EndPCall();

            Debug.Log("Lua Profiler - Stopped!");
        }
コード例 #2
0
 static int Close(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         ShibaInu.UdpSocket obj = (ShibaInu.UdpSocket)ToLua.CheckObject <ShibaInu.UdpSocket>(L, 1);
         obj.Close();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }