Пример #1
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey           = GetPrefsKey(() => m_ConnectionsView);
            m_ConnectionsView.showReferencesAsExcluded = snapshot.header.nativeObjectFromConnectionsExcluded;

            m_RootPathView = CreateView <RootPathView>();
            m_RootPathView.editorPrefsKey = GetPrefsKey(() => m_RootPathView);

            // The list at the left that contains all native objects
            m_NativeObjectsControl = new NativeObjectsControl(window, GetPrefsKey(() => m_NativeObjectsControl), new TreeViewState());
            m_NativeObjectsControl.onSelectionChange += OnListViewSelectionChange;
            //m_NativeObjectsControl.gotoCB += Goto;

            m_SearchField = new HeSearchField(window);
            m_SearchField.downOrUpArrowKeyPressed += m_NativeObjectsControl.SetFocusAndEnsureSelectedItem;
            m_NativeObjectsControl.findPressed    += m_SearchField.SetFocus;

            // The list at the right that shows the selected native object
            m_NativeObjectControl = new NativeObjectControl(window, GetPrefsKey(() => m_NativeObjectControl), new TreeViewState());
            m_PreviewView         = CreateView <NativeObjectPreviewView>();

            m_SplitterHorz         = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorz), m_SplitterHorz);
            m_SplitterVert         = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVert), m_SplitterVert);
            m_PreviewSplitterVert  = EditorPrefs.GetFloat(GetPrefsKey(() => m_PreviewSplitterVert), m_PreviewSplitterVert);
            m_RootPathSplitterVert = EditorPrefs.GetFloat(GetPrefsKey(() => m_RootPathSplitterVert), m_RootPathSplitterVert);

            OnRebuild();
        }
Пример #2
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey = GetPrefsKey(() => m_ConnectionsView);

            m_RootPathView = CreateView <RootPathView>();
            m_RootPathView.editorPrefsKey = GetPrefsKey(() => m_RootPathView);

            m_PropertyGridView = CreateView <PropertyGridView>();
            m_PropertyGridView.editorPrefsKey = GetPrefsKey(() => m_PropertyGridView);

            m_ObjectsControl = CreateObjectsTreeView(GetPrefsKey(() => m_ObjectsControl), new TreeViewState());
            m_ObjectsControl.onSelectionChange += OnListViewSelectionChange;
            m_ObjectsControl.SetTree(m_ObjectsControl.BuildTree(snapshot));

            m_ObjectsSearchField = new HeSearchField(window);
            m_ObjectsSearchField.downOrUpArrowKeyPressed += m_ObjectsControl.SetFocusAndEnsureSelectedItem;
            m_ObjectsControl.findPressed += m_ObjectsSearchField.SetFocus;

            m_SplitterHorzPropertyGrid = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorzPropertyGrid), m_SplitterHorzPropertyGrid);
            m_SplitterVertConnections  = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVertConnections), m_SplitterVertConnections);
            m_SplitterVertRootPath     = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVertRootPath), m_SplitterVertRootPath);
        }
        protected override void OnCreate()
        {
            base.OnCreate();

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey = GetPrefsKey(() => m_ConnectionsView);

            m_RootPathView = CreateView <RootPathView>();
            m_RootPathView.editorPrefsKey = GetPrefsKey(() => m_RootPathView);

            m_PropertyGridView = CreateView <PropertyGridView>();
            m_PropertyGridView.editorPrefsKey = GetPrefsKey(() => m_PropertyGridView);

            m_ObjectsControl = new ManagedObjectDuplicatesControl(window, GetPrefsKey(() => m_ObjectsControl), new TreeViewState());
            m_ObjectsControl.onSelectionChange += OnListViewSelectionChange;

            m_ObjectsSearchField = new HeSearchField(window);
            m_ObjectsSearchField.downOrUpArrowKeyPressed += m_ObjectsControl.SetFocusAndEnsureSelectedItem;
            m_ObjectsControl.findPressed += m_ObjectsSearchField.SetFocus;

            m_SplitterHorzPropertyGrid = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorzPropertyGrid), m_SplitterHorzPropertyGrid);
            m_SplitterVertConnections  = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVertConnections), m_SplitterVertConnections);
            m_SplitterVertRootPath     = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVertRootPath), m_SplitterVertRootPath);

            var job = new Job();

            job.snapshot = snapshot;
            job.control  = m_ObjectsControl;
            ScheduleJob(job);
        }
Пример #4
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey = GetPrefsKey(() => m_ConnectionsView);

            m_RootPathView = CreateView <RootPathView>();
            m_RootPathView.editorPrefsKey = GetPrefsKey(() => m_RootPathView);

            m_HandlesControl = new GCHandlesControl(window, GetPrefsKey(() => m_HandlesControl), new TreeViewState());
            m_HandlesControl.SetTree(m_HandlesControl.BuildTree(snapshot));
            m_HandlesControl.onSelectionChange += OnListViewSelectionChange;

            m_HandlesSearchField = new HeSearchField(window);
            m_HandlesSearchField.downOrUpArrowKeyPressed += m_HandlesControl.SetFocusAndEnsureSelectedItem;
            m_HandlesControl.findPressed += m_HandlesSearchField.SetFocus;

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