public ProfilerTimelineGUI(IProfilerWindowController window)
 {
     this.m_Window = window;
     this.groups   = new List <ProfilerTimelineGUI.GroupInfo>(new ProfilerTimelineGUI.GroupInfo[]
     {
         new ProfilerTimelineGUI.GroupInfo
         {
             name     = "",
             height   = 20f,
             expanded = true,
             threads  = new List <ProfilerTimelineGUI.ThreadInfo>()
         },
         new ProfilerTimelineGUI.GroupInfo
         {
             name     = "Unity Job System",
             height   = 20f,
             expanded = true,
             threads  = new List <ProfilerTimelineGUI.ThreadInfo>()
         },
         new ProfilerTimelineGUI.GroupInfo
         {
             name     = "Loading",
             height   = 20f,
             expanded = false,
             threads  = new List <ProfilerTimelineGUI.ThreadInfo>()
         }
     });
     this.m_LocalizedString_Total     = LocalizationDatabase.GetLocalizedString("Total");
     this.m_LocalizedString_Instances = LocalizationDatabase.GetLocalizedString("Instances");
 }
Beispiel #2
0
        public ProfilerTimelineGUI(IProfilerWindowController window)
        {
            m_Window = window;
            // Configure default groups
            groups = new List <GroupInfo>(new GroupInfo[]
            {
                new GroupInfo()
                {
                    name = "", height = 0, expanded = true, threads = new List <ThreadInfo>()
                },
                new GroupInfo()
                {
                    name = "Unity Job System", height = kGroupHeight, expanded = SessionState.GetBool("Unity Job System", false), threads = new List <ThreadInfo>()
                },
                new GroupInfo()
                {
                    name = "Loading", height = kGroupHeight, expanded = SessionState.GetBool("Loading", false), threads = new List <ThreadInfo>()
                },
            });

            m_LocalizedString_Total     = LocalizationDatabase.GetLocalizedString("Total");
            m_LocalizedString_Instances = LocalizationDatabase.GetLocalizedString("Instances");

            m_HTicks = new TickHandler();
            m_HTicks.SetTickModulos(k_TickModulos);
        }
 public ProfilerHierarchyGUI(IProfilerWindowController window, string columnSettingsName, ProfilerColumn[] columnsToShow, string[] columnNames, bool detailPane, ProfilerColumn sort)
 {
     this.m_Window = window;
     this.m_ColumnNames = columnNames;
     this.m_ColumnSettingsName = columnSettingsName;
     this.m_ColumnsToShow = columnsToShow;
     this.m_DetailPane = detailPane;
     this.m_SortType = sort;
     this.m_HeaderContent = new GUIContent[columnNames.Length];
     this.m_Splitter = null;
     for (int i = 0; i < this.m_HeaderContent.Length; i++)
     {
         this.m_HeaderContent[i] = !this.m_ColumnNames[i].StartsWith("|") ? new GUIContent(this.m_ColumnNames[i]) : EditorGUIUtility.IconContent("ProfilerColumn." + columnsToShow[i].ToString(), this.m_ColumnNames[i]);
     }
     if (columnsToShow.Length != columnNames.Length)
     {
         throw new ArgumentException("Number of columns to show does not match number of column names.");
     }
     this.m_SearchHeader = new GUIContent("Search");
     this.m_VisibleColumns = new bool[columnNames.Length];
     for (int j = 0; j < this.m_VisibleColumns.Length; j++)
     {
         this.m_VisibleColumns[j] = true;
     }
     this.m_SearchResults = new SearchResults();
     this.m_SearchResults.Init(100);
     this.m_Window.Repaint();
 }
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            base.OnEnable(profilerWindow);

            m_ShowDetailedAudioPane     = (ProfilerAudioView)EditorPrefs.GetInt(k_ViewTypeSettingsKey, (int)ProfilerAudioView.Channels);
            m_ShowInactiveDSPChains     = EditorPrefs.GetBool(k_ShowInactiveDSPChainsSettingsKey, m_ShowInactiveDSPChains);
            m_HighlightAudibleDSPChains = EditorPrefs.GetBool(k_HighlightAudibleDSPChainsSettingsKey, m_HighlightAudibleDSPChains);
            m_DSPGraphZoomFactor        = SessionState.GetFloat(k_DSPGraphZoomFactorSettingsKey, m_DSPGraphZoomFactor);
            var restoredAudioProfilerGroupTreeViewState = SessionState.GetString(k_AudioProfilerGroupTreeViewStateSettingsKey, string.Empty);

            if (!string.IsNullOrEmpty(restoredAudioProfilerGroupTreeViewState))
            {
                try
                {
                    m_AudioProfilerGroupTreeViewState = JsonUtility.FromJson <AudioProfilerGroupTreeViewState>(restoredAudioProfilerGroupTreeViewState);
                }
                catch {} // Never mind, we'll fall back to the default
            }
            var restoredAudioProfilerClipTreeViewState = SessionState.GetString(k_AudioProfilerClipTreeViewStateSettingsKey, string.Empty);

            if (!string.IsNullOrEmpty(restoredAudioProfilerClipTreeViewState))
            {
                try
                {
                    m_AudioProfilerClipTreeViewState = JsonUtility.FromJson <AudioProfilerClipTreeViewState>(restoredAudioProfilerClipTreeViewState);
                }
                catch {} // Never mind, we'll fall back to the default
            }
        }
        // Used with via Reflection (see MemoryProfilerModuleBridge.cs) from the Profiler Memory Profiler Package for the Memory Profiler Module UI Override. (To avoid pulling platform specifics into the package)
        static string GetPlatformSpecificText(RawFrameDataView f, IProfilerWindowController profilerWindow)
        {
            if (f.valid)
            {
                var totalReservedMemoryId = GetCounterValue(f, "Total Reserved Memory");
                if (totalReservedMemoryId != -1)
                {
                    StringBuilder stringBuilder        = new StringBuilder(1024);
                    var           garlicHeapUsedMemory = GetCounterValue(f, "GARLIC heap used");
                    if (garlicHeapUsedMemory != -1)
                    {
                        var garlicHeapAvailable = GetCounterValue(f, "GARLIC heap available");
                        stringBuilder.Append($"\n\nGARLIC heap used: {EditorUtility.FormatBytes(garlicHeapUsedMemory)}/{EditorUtility.FormatBytes(garlicHeapAvailable + garlicHeapUsedMemory)}   ");
                        stringBuilder.Append($"({EditorUtility.FormatBytes(garlicHeapAvailable)} available)   ");
                        stringBuilder.Append($"peak used: {GetCounterValueAsBytes(f, "GARLIC heap peak used")}   ");
                        stringBuilder.Append($"num allocs: {GetCounterValue(f, "GARLIC heap allocs")}\n");

                        stringBuilder.Append($"ONION heap used: {GetCounterValueAsBytes(f, "ONION heap used")}   ");
                        stringBuilder.Append($"peak used: {GetCounterValueAsBytes(f, "ONION heap peak used")}   ");
                        stringBuilder.Append($"num allocs: {GetCounterValue(f, "ONION heap allocs")}");
                        return(stringBuilder.ToString());
                    }
                }
            }
            return(null);
        }
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            base.OnEnable(profilerWindow);

            m_TimelineGUI = new ProfilerTimelineGUI(m_ProfilerWindow);
            m_TimelineGUI.viewTypeChanged += CPUOrGPUViewTypeChanged;
        }
 public ProfilerHierarchyGUI(IProfilerWindowController window, string columnSettingsName, ProfilerColumn[] columnsToShow, string[] columnNames, bool detailPane, ProfilerColumn sort)
 {
     this.m_Window             = window;
     this.m_ColumnNames        = columnNames;
     this.m_ColumnSettingsName = columnSettingsName;
     this.m_ColumnsToShow      = columnsToShow;
     this.m_DetailPane         = detailPane;
     this.m_SortType           = sort;
     this.m_HeaderContent      = new GUIContent[columnNames.Length];
     this.m_Splitter           = (SplitterState)null;
     for (int index = 0; index < this.m_HeaderContent.Length; ++index)
     {
         this.m_HeaderContent[index] = !this.m_ColumnNames[index].StartsWith("|") ? new GUIContent(this.m_ColumnNames[index]) : EditorGUIUtility.IconContent("ProfilerColumn." + columnsToShow[index].ToString(), this.m_ColumnNames[index]);
     }
     if (columnsToShow.Length != columnNames.Length)
     {
         throw new ArgumentException("Number of columns to show does not match number of column names.");
     }
     this.m_SearchHeader   = new GUIContent("Search");
     this.m_VisibleColumns = new bool[columnNames.Length];
     for (int index = 0; index < this.m_VisibleColumns.Length; ++index)
     {
         this.m_VisibleColumns[index] = true;
     }
     this.m_SearchResults = new ProfilerHierarchyGUI.SearchResults();
     this.m_SearchResults.Init(100);
     this.m_Window.Repaint();
 }
Beispiel #8
0
 public ProfilerHierarchyGUI(IProfilerWindowController window, string columnSettingsName, ProfilerColumn[] columnsToShow, string[] columnNames, bool detailPane, ProfilerColumn sort)
 {
     this.m_Window             = window;
     this.m_ColumnNames        = columnNames;
     this.m_ColumnSettingsName = columnSettingsName;
     this.m_ColumnsToShow      = columnsToShow;
     this.m_DetailPane         = detailPane;
     this.m_SortType           = sort;
     this.m_HeaderContent      = new GUIContent[columnNames.Length];
     this.m_Splitter           = null;
     for (int i = 0; i < this.m_HeaderContent.Length; i++)
     {
         this.m_HeaderContent[i] = EditorGUIUtility.TextContent(this.m_ColumnNames[i]);
     }
     if (columnsToShow.Length != columnNames.Length)
     {
         throw new ArgumentException("Number of columns to show does not match number of column names.");
     }
     this.m_SearchHeader   = new GUIContent("Search");
     this.m_VisibleColumns = new bool[columnNames.Length];
     for (int j = 0; j < this.m_VisibleColumns.Length; j++)
     {
         this.m_VisibleColumns[j] = true;
     }
     this.m_SearchResults = new ProfilerHierarchyGUI.SearchResults();
     this.m_SearchResults.Init(100);
     this.m_Window.Repaint();
 }
Beispiel #9
0
 public ProfilerTimelineGUI(IProfilerWindowController window)
 {
     this.m_Window = window;
     this.groups   = new List <ProfilerTimelineGUI.GroupInfo>(new ProfilerTimelineGUI.GroupInfo[]
     {
         new ProfilerTimelineGUI.GroupInfo
         {
             name     = "",
             height   = 0f,
             expanded = true,
             threads  = new List <ProfilerTimelineGUI.ThreadInfo>()
         },
         new ProfilerTimelineGUI.GroupInfo
         {
             name     = "Unity Job System",
             height   = 20f,
             expanded = SessionState.GetBool("Unity Job System", false),
             threads  = new List <ProfilerTimelineGUI.ThreadInfo>()
         },
         new ProfilerTimelineGUI.GroupInfo
         {
             name     = "Loading",
             height   = 20f,
             expanded = SessionState.GetBool("Loading", false),
             threads  = new List <ProfilerTimelineGUI.ThreadInfo>()
         }
     });
     this.m_LocalizedString_Total     = LocalizationDatabase.GetLocalizedString("Total");
     this.m_LocalizedString_Instances = LocalizationDatabase.GetLocalizedString("Instances");
     this.m_HTicks = new TickHandler();
     this.m_HTicks.SetTickModulos(ProfilerTimelineGUI.k_TickModulos);
 }
Beispiel #10
0
        internal void DrawUIPane(IProfilerWindowController win)
        {
            if (win.IsRecording())
            {
                GUILayout.Label("Cannot analyze FileIO markers while profiler is recording.");
            }
            else
            {
                if (!DataPulled)
                {
                    GUILayout.Label("Select 'Analyze Markers' to view detailed File Access metrics for the captured Profiler data.");
                    return;
                }

                int visibleFrameIndex = win.GetActiveVisibleFrameIndex();

                if (GetSelectedFrame() != visibleFrameIndex || m_CaptureData.m_FileAccessData.Count == 0 || NewData || ViewSelectionChanged || FrameSelectionChanged)
                {
                    SetSelectedFrame(visibleFrameIndex);
                    if (selectedViewType == FileIOViewType.Accesses)
                    {
                        UpdateFileAccessTable();
                    }
                    else if (selectedViewType == FileIOViewType.FileSummary)
                    {
                        CalculateFileSummaries();
                        UpdateFileSummaryTable();
                    }
                    ViewSelectionChanged  = false;
                    FrameSelectionChanged = false;
                    NewData = false;
                }

                string text;

                if (selectedViewType == FileIOViewType.Accesses)
                {
                    text = "File accesses: " + m_FileAccessTreeView.GetCount();
                }
                else
                {
                    text = "Files accessed: " + m_FileSummaryTreeView.GetCount();
                }

                GUILayout.Label(text);

                GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));

                if (selectedViewType == FileIOViewType.Accesses)
                {
                    DrawFileAccesses();
                }
                else if (selectedViewType == FileIOViewType.FileSummary)
                {
                    DrawFileSummaries();
                }
                GUILayout.EndHorizontal();
            }
        }
Beispiel #11
0
 public MemoryTreeList(IProfilerWindowController profilerWindow, MemoryTreeList detailview)
 {
     m_MemorySelection = new MemoryElementSelection();
     m_ProfilerWindow  = profilerWindow;
     m_DetailView      = detailview;
     m_ControlID       = GUIUtility.GetPermanentControlID();
     SetupSplitter();
 }
 public override void OnEnable(CPUOrGPUProfilerModule cpuModule, IProfilerWindowController profilerWindow, bool isGpuView)
 {
     base.OnEnable(cpuModule, profilerWindow, isGpuView);
     m_FrameIndex = FrameDataView.invalidOrCurrentFrameIndex;
     m_DetailedObjectsView?.OnEnable(cpuModule, this);
     m_DetailedCallsView?.OnEnable(cpuModule, this);
     profilerWindow.frameDataViewAboutToBeDisposed += OnFrameDataViewAboutToBeDisposed;
 }
 public override void OnEnable(IProfilerWindowController profilerWindow)
 {
     base.OnEnable(profilerWindow);
     m_FrameDataHierarchyView.gpuView = true;
     if (m_ViewType == ProfilerViewType.Timeline)
     {
         m_ViewType = ProfilerViewType.Hierarchy;
     }
 }
Beispiel #14
0
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            base.OnEnable(profilerWindow);

            if (m_NetworkSplit == null || m_NetworkSplit.relativeSizes == null || m_NetworkSplit.relativeSizes.Length < 2)
            {
                m_NetworkSplit = new SplitterState(new[] { 20f, 80f }, new[] { 100, 100 }, null);
            }
        }
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            base.OnEnable(profilerWindow);

            if (m_NetworkSplit == null || !m_NetworkSplit.IsValid())
            {
                m_NetworkSplit = SplitterState.FromRelative(new[] { 20f, 80f }, new[] { 100f, 100f }, null);
            }
        }
 public override void OnEnable(IProfilerWindowController profilerWindow)
 {
     base.OnEnable(profilerWindow);
     m_FrameDataHierarchyView.OnEnable(this, true);
     m_FrameDataHierarchyView.dataAvailabilityMessage = null;
     if (m_ViewType == ProfilerViewType.Timeline)
     {
         m_ViewType = ProfilerViewType.Hierarchy;
     }
 }
 public ProfilerFrameDataTreeView(TreeViewState state, ProfilerFrameDataMultiColumnHeader multicolumnHeader, IProfilerSampleNameProvider profilerSampleNameProvider, IProfilerWindowController profilerWindowController)
     : base(state, multicolumnHeader)
 {
     Assert.IsNotNull(multicolumnHeader);
     deselectOnUnhandledMouseDown                  = true;
     m_ProfilerSampleNameProvider                  = profilerSampleNameProvider;
     m_ProfilerWindowController                    = profilerWindowController;
     m_MultiColumnHeader                           = multicolumnHeader;
     m_MultiColumnHeader.sortingChanged           += OnSortingChanged;
     profilerWindowController.currentFrameChanged += FrameChanged;
 }
Beispiel #18
0
 public override void OnEnable(IProfilerWindowController profilerWindow)
 {
     base.OnEnable(profilerWindow);
     if (m_FrameDataHierarchyView == null)
     {
         m_FrameDataHierarchyView = new ProfilerFrameDataHierarchyView();
     }
     m_FrameDataHierarchyView.gpuView           = false;
     m_FrameDataHierarchyView.viewTypeChanged  += CPUOrGPUViewTypeChanged;
     m_FrameDataHierarchyView.selectionChanged += CPUOrGPUViewSelectionChanged;
     m_ProfilerWindow.selectionChanged         += m_FrameDataHierarchyView.SetSelectionFromLegacyPropertyPath;
 }
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            // Automatic Serialization on Domain Reload does not work yet as the base is abstract and the array on the ProfilerWindwo is of type ProfilerModuleBase
            base.OnEnable(profilerWindow);

            m_ShowDetailedAudioPane     = (ProfilerAudioView)EditorPrefs.GetInt(k_ViewTypeSettingsKey, (int)ProfilerAudioView.Channels);
            m_ShowInactiveDSPChains     = EditorPrefs.GetBool(k_ShowInactiveDSPChainsSettingsKey, m_ShowInactiveDSPChains);
            m_HighlightAudibleDSPChains = EditorPrefs.GetBool(k_HighlightAudibleDSPChainsSettingsKey, m_HighlightAudibleDSPChains);
            m_DSPGraphZoomFactor        = SessionState.GetFloat(k_DSPGraphZoomFactorSettingsKey, m_DSPGraphZoomFactor);
            EditorJsonUtility.FromJsonOverwrite(SessionState.GetString(k_AudioProfilerGroupTreeViewStateSettingsKey, EditorJsonUtility.ToJson(m_AudioProfilerGroupTreeViewState)), m_AudioProfilerGroupTreeViewState);
            EditorJsonUtility.FromJsonOverwrite(SessionState.GetString(k_AudioProfilerClipTreeViewStateSettingsKey, EditorJsonUtility.ToJson(m_AudioProfilerClipTreeViewState)), m_AudioProfilerClipTreeViewState);
        }
 public override void OnEnable(IProfilerWindowController profilerWindow)
 {
     base.OnEnable(profilerWindow);
     if (m_FrameDataHierarchyView == null)
     {
         m_FrameDataHierarchyView = new ProfilerFrameDataHierarchyView(HierarchyViewSettingsKeyPrefix);
     }
     m_FrameDataHierarchyView.gpuView           = false;
     m_FrameDataHierarchyView.viewTypeChanged  += CPUOrGPUViewTypeChanged;
     m_FrameDataHierarchyView.selectionChanged += CPUOrGPUViewSelectionChanged;
     m_ProfilerWindow.selectionChanged         += m_FrameDataHierarchyView.SetSelectionFromLegacyPropertyPath;
     m_ViewType = (ProfilerViewType)EditorPrefs.GetInt(ViewTypeSettingsKey, (int)DefaultViewTypeSetting);
 }
Beispiel #21
0
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            if (this.GetType() == typeof(UIProfilerModule))
            {
                instance = new WeakReference(this);
            }

            base.OnEnable(profilerWindow);

            if (m_UISystemProfiler == null)
            {
                m_UISystemProfiler = new UISystemProfiler();
            }
        }
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            base.OnEnable(profilerWindow);

            instance = new WeakReference(this);

            if (m_ReferenceListView == null)
            {
                m_ReferenceListView = new MemoryTreeList(profilerWindow, null);
            }
            if (m_MemoryListView == null)
            {
                m_MemoryListView = new MemoryTreeListClickable(profilerWindow, m_ReferenceListView);
            }
        }
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            base.OnEnable(profilerWindow);
            if (m_FrameDataHierarchyView == null)
            {
                m_FrameDataHierarchyView = new ProfilerFrameDataHierarchyView();
            }
            m_FrameDataHierarchyView.gpuView           = false;
            m_FrameDataHierarchyView.viewTypeChanged  += CPUOrGPUViewTypeChanged;
            m_FrameDataHierarchyView.selectionChanged += CPUOrGPUViewSelectionChanged;
            m_ProfilerWindow.selectionChanged         += m_FrameDataHierarchyView.SetSelectionFromLegacyPropertyPath;

            // Automatic Serialization on Domain Reload does not work yet as the base is abstract and the array on the ProfilerWindwo is of type ProfilerModuleBase
            m_ViewType = (ProfilerViewType)EditorPrefs.GetInt(ViewTypeSettingsKey, (int)DefaultViewTypeSetting);
        }
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            base.OnEnable(profilerWindow);

            instance = new WeakReference(this);

            if (m_ReferenceListView == null)
            {
                m_ReferenceListView = new MemoryTreeList(profilerWindow, null);
            }
            if (m_MemoryListView == null)
            {
                m_MemoryListView = new MemoryTreeListClickable(profilerWindow, m_ReferenceListView);
            }

            m_ShowDetailedMemoryPane = (ProfilerMemoryView)EditorPrefs.GetInt(k_ViewTypeSettingsKey, (int)ProfilerMemoryView.Simple);
            m_GatherObjectReferences = EditorPrefs.GetBool(k_GatherObjectReferencesSettingsKey, true);
        }
 // Used with via Reflection (see MemoryProfilerModuleBridge.cs) from the Profiler Memory Profiler Package for the Memory Profiler Module UI Override. (Only when showing old (pre-2020.2 aka pre-memory-counters) profiler data)
 static string GetSimpleMemoryPaneText(RawFrameDataView f, IProfilerWindowController profilerWindow, bool summary = true)
 {
     if (f.valid)
     {
         var totalReservedMemoryId = GetCounterValue(f, "Total Reserved Memory");
         if (totalReservedMemoryId != -1)
         {
             // Counter Data is available, a text form display is not needed
             return(string.Empty);
         }
         else
         {
             // Old data compatibility.
             return(ProfilerDriver.GetOverviewText(ProfilerArea.Memory, profilerWindow.GetActiveVisibleFrameIndex()));
         }
     }
     return(string.Empty);
 }
Beispiel #26
0
        internal void DrawUIPane(IProfilerWindowController win)
        {
            if (win.IsRecording())
            {
                GUILayout.Label("Cannot analyze Asset Loading markers while profiler is recording.");
            }
            else
            {
                if (!DataPulled)
                {
                    GUILayout.Label("Select 'Analyze Markers' to view detailed Asset Loading metrics for the captured Profiler data.");
                    return;
                }

                int visibleFrameIndex = win.GetActiveVisibleFrameIndex();

                if (GetSelectedFrame() != visibleFrameIndex || m_CaptureData.m_AssetLoadMarkers.Count == 0 || FrameSelectionChanged || NewData /*|| ViewSelectionChanged*/)
                {
                    SetSelectedFrame(visibleFrameIndex);
                    FrameSelectionChanged = false;
                    NewData = false;
                    UpdateAssetMarkerTable();
                }

                string text;

                if (m_AssetMarkerTreeViewState != null)
                {
                    text = "Asset Load Markers: " + m_AssetMarkerTreeView.GetCount();
                }
                else
                {
                    text = "";
                }

                GUILayout.Label(text);

                GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));

                DrawAssetMarkers();

                GUILayout.EndHorizontal();
            }
        }
Beispiel #27
0
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            base.OnEnable(profilerWindow);

            instance = new WeakReference(this);

            if (m_ReferenceListView == null)
            {
                m_ReferenceListView = new MemoryTreeList(profilerWindow, null);
            }
            if (m_MemoryListView == null)
            {
                m_MemoryListView = new MemoryTreeListClickable(profilerWindow, m_ReferenceListView);
            }

            // Automatic Serialization on Domain Reload does not work yet as the base is abstract and the array on the ProfilerWindwo is of type ProfilerModuleBase
            m_ShowDetailedMemoryPane = (ProfilerMemoryView)EditorPrefs.GetInt(k_ViewTypeSettingsKey, (int)ProfilerMemoryView.Simple);
            m_GatherObjectReferences = EditorPrefs.GetBool(k_GatherObjectReferencesSettingsKey, true);
        }
Beispiel #28
0
        public override void OnEnable(IProfilerWindowController profilerWindow)
        {
            base.OnEnable(profilerWindow);

            instance = new WeakReference(this);

            if (m_ReferenceListView == null)
            {
                m_ReferenceListView = new MemoryTreeList(profilerWindow, null);
            }
            if (m_MemoryListView == null)
            {
                m_MemoryListView = new MemoryTreeListClickable(profilerWindow, m_ReferenceListView);
            }
            if (m_ViewSplit == null || !m_ViewSplit.IsValid())
            {
                m_ViewSplit = SplitterState.FromRelative(new[] { EditorPrefs.GetFloat(k_SplitterRelative0SettingsKey, 70f), EditorPrefs.GetFloat(k_SplitterRelative1SettingsKey, 30f) }, k_SplitterMinSizes, null);
            }

            m_ShowDetailedMemoryPane = (ProfilerMemoryView)EditorPrefs.GetInt(k_ViewTypeSettingsKey, (int)ProfilerMemoryView.Simple);
            m_GatherObjectReferences = EditorPrefs.GetBool(k_GatherObjectReferencesSettingsKey, true);
        }
Beispiel #29
0
 public ProfilerTimelineGUI(IProfilerWindowController window)
 {
     this.m_Window = window;
 }
 public ProfilerTimelineGUI(IProfilerWindowController window)
 {
   this.m_Window = window;
   this.groups = new List<ProfilerTimelineGUI.GroupInfo>();
 }
Beispiel #31
0
 // used by Tests/PerformanceTests/Profiler to avoid brittle tests due to reflection
 internal static T GetProfilerModuleByType <T>(this IProfilerWindowController controller) where T : ProfilerModule => controller.GetProfilerModuleByType(typeof(T)) as T;
Beispiel #32
0
 internal static void SetActiveVisibleFrameIndex(this IProfilerWindowController controller, int frame) => controller.selectedFrameIndex = frame;
 public ProfilerTimelineGUI(IProfilerWindowController window)
 {
     this.m_Window = window;
 }