コード例 #1
0
        public void UnregisterDebug()
        {
            DebugManager debugManager = DebugManager.instance;

            foreach (IDebugDisplaySettingsPanelDisposable disposableSettingsPanel in m_DisposablePanels)
            {
                DebugUI.Widget[] panelWidgets = disposableSettingsPanel.Widgets;
                string           panelId      = disposableSettingsPanel.PanelName;
                DebugUI.Panel    panel        = debugManager.GetPanel(panelId, true);
                ObservableList <DebugUI.Widget> panelChildren = panel.children;

                disposableSettingsPanel.Dispose();
                panelChildren.Remove(panelWidgets);
            }

            m_DisposablePanels = null;

            debugManager.UnregisterData(this);
        }
コード例 #2
0
        public void RegisterDebug(DebugDisplaySettings settings)
        {
            DebugManager debugManager = DebugManager.instance;
            List <IDebugDisplaySettingsPanelDisposable> panels = new List <IDebugDisplaySettingsPanelDisposable>();

            debugManager.RegisterData(this);

            m_Settings         = settings;
            m_DisposablePanels = panels;

            Action <IDebugDisplaySettingsData> onExecute = (data) =>
            {
                IDebugDisplaySettingsPanelDisposable disposableSettingsPanel = data.CreatePanel();
                DebugUI.Widget[] panelWidgets = disposableSettingsPanel.Widgets;
                string           panelId      = disposableSettingsPanel.PanelName;
                DebugUI.Panel    panel        = debugManager.GetPanel(panelId, true);
                ObservableList <DebugUI.Widget> panelChildren = panel.children;

                panels.Add(disposableSettingsPanel);
                panelChildren.Add(panelWidgets);
            };

            m_Settings.ForEach(onExecute);
        }
コード例 #3
0
 internal void SetPanel(DebugUI.Panel panel)
 {
     m_Panel        = panel;
     nameLabel.text = "< " + panel.displayName + " >";
 }