Ejemplo n.º 1
0
        public static void OnStartGame()
        {
#if UNITY_EDITOR
            if (!Application.isPlaying)
            {
                return;
            }
#endif
            if (isInite)
            {
                return;
            }
            LuaDeepProfilerSetting.MakeInstance();
            isInite = true;
            setting = LuaDeepProfilerSetting.Instance;
            LuaProfiler.mainThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId;
            if (setting.isNeedCapture)
            {
                Screen.SetResolution(480, 270, true);
            }

#if UPR_LUA_PROFILER
#if DEPLICATED
            LuaDLL.Install();
#endif

            GameObject go = new GameObject();
            go.name      = "UPRLuaProfiler";
            go.hideFlags = HideFlags.HideAndDontSave;
            DontDestroyOnLoad(go);
            go.AddComponent <HookLuaSetup>();
            NetWorkClient.ConnectServer(setting.ip, setting.port);
#endif
        }