コード例 #1
0
        public static unsafe void Initialize()
        {
            if (Managed.init)
            {
                return;
            }

            mode.Data = ProfilerModes.ProfileDisabled;

            Connection.RegisterMessage(EditorMessageIds.kProfilerSetMode, (MessageEventArgs a) =>
            {
                bool oldEnabled = Enabled;
                fixed(byte *d   = a.data)
                {
                    mode.Data = (ProfilerModes)(*(int *)d);
                }
                if (Enabled && !oldEnabled)
                {
                    ProfilerProtocolSession.SendProfilingCapabilityMessage();
                    ProfilerProtocolSession.SendProfilingSessionInfo();
                }
            });

            Connection.RegisterMessage(EditorMessageIds.kProfilerSetMemoryRecordMode, (MessageEventArgs a) =>
            {
                fixed(byte *d = a.data)
                {
                    Managed.memoryRecordMode = (ProfilerMemoryRecordMode)(*(int *)d);
                }
            });

            Managed.init = true;
        }
コード例 #2
0
        public static unsafe void Initialize()
        {
            if (initialized)
            {
                return;
            }
            PlayerConnectionProfiler.Initialize();
            ProfilerProtocolSession.Initialize();
            ProfilerProtocolThread.Initialize();

            ThreadSetInfo((ulong)Baselib_Thread_GetCurrentThreadId(), GetProfilerTime(), false, "", "Main Thread");

            initialized = true;
        }