Beispiel #1
0
        private static void OnDbgGUI_ProfilerControl()
        {
            if (GUILayout.Button("Clear Profiler Cache"))
            {
                NetDebuger.ClearSample();
                m_dbgFileName = null;
            }

            if (string.IsNullOrEmpty(m_dbgFileName))
            {
                m_dbgFileName = GetDefaultFileName();
            }

            GUILayout.Label("Input Profiler FileName:");
            m_dbgFileName = GUILayout.TextField(m_dbgFileName);

            if (GUILayout.Button("Save Profiler File"))
            {
                NetDebugFile file = new NetDebugFile();
                file.Content.profiler_samples.AddRange(NetDebuger.SampleList);
                file.Save(NetDebuger.DbgFileDir, m_dbgFileName);

                NetDebuger.ClearSample();
                m_dbgFileName = null;

                CheckFileList();
            }
        }