Exemple #1
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_HexView   = CreateView <HexView>();
            m_ShowAsHex = EditorPrefs.GetBool(GetPrefsKey(() => m_ShowAsHex), false);

            m_PropertyGrid = new PropertyGridControl(window, GetPrefsKey(() => m_PropertyGrid), new TreeViewState());
        }
        protected override void OnCreate()
        {
            base.OnCreate();

            ReleaseTextures();

            m_HexView   = CreateView <HexView>();
            m_ShowAsHex = EditorPrefs.GetBool(GetPrefsKey(() => m_ShowAsHex), false);

            m_SectionFragTexture      = new Texture2D(ManagedHeapSectionsUtility.k_TextureWidth, ManagedHeapSectionsUtility.k_TextureHeight, TextureFormat.ARGB32, false);
            m_SectionFragTexture.name = "HeapExplorer-MemorySectionFragmentation-Texture";

            m_HeapFragTexture      = new Texture2D(ManagedHeapSectionsUtility.k_TextureWidth, ManagedHeapSectionsUtility.k_TextureHeight, TextureFormat.ARGB32, false);
            m_HeapFragTexture.name = "HeapExplorer-HeapFragmentation-Texture";
            ScheduleJob(new HeapFragmentationJob()
            {
                snapshot = snapshot, texture = m_HeapFragTexture, sections = GetMemorySections(), addressSpace = GetHeapAddressSpace()
            });

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey             = GetPrefsKey(() => m_ConnectionsView);
            m_ConnectionsView.showReferencedBy           = false;
            m_ConnectionsView.afterReferencesToolbarGUI += OnToggleHexViewGUI;

            m_SectionsControl = new ManagedHeapSectionsControl(window, GetPrefsKey(() => m_SectionsControl), new TreeViewState());
            m_SectionsControl.SetTree(m_SectionsControl.BuildTree(snapshot, GetMemorySections()));
            m_SectionsControl.onSelectionChange += OnListViewSelectionChange;

            m_SectionsSearchField = new HeSearchField(window);
            m_SectionsSearchField.downOrUpArrowKeyPressed += m_SectionsControl.SetFocusAndEnsureSelectedItem;
            m_SectionsControl.findPressed += m_SectionsSearchField.SetFocus;

            m_SplitterHorz = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorz), m_SplitterHorz);

            m_ShowInternalSections = s_ShowInternalSections;
        }