コード例 #1
0
        private void Update()
        {
            if (Input.GetKeyDown(KeyCode.Space))
            {
                m_obj.SetParent(m_parent, true);
                m_treeView.ChangeParent(m_parent.gameObject, m_obj.gameObject);

                VirtualizingScrollRect scrollRect = m_treeView.GetComponentInChildren <VirtualizingScrollRect>();
                scrollRect.Index = m_treeView.IndexOf(m_parent.gameObject);
            }
        }
コード例 #2
0
        protected override void AwakeOverride()
        {
            WindowType = RuntimeWindowType.Console;

            base.AwakeOverride();

            DockPanel dockPanelsRoot = GetComponent <DockPanel>();

            if (dockPanelsRoot != null)
            {
                dockPanelsRoot.CursorHelper = Editor.CursorHelper;
            }

            m_treeView.CanDrag    = false;
            m_treeView.CanReorder = false;
            m_treeView.CanRemove  = false;
            m_treeView.CanEdit    = false;

            m_treeView.ItemDataBinding  += OnItemDataBinding;
            m_treeView.SelectionChanged += OnSelectionChanged;

            m_scrollRect = m_treeView.GetComponentInChildren <VirtualizingScrollRect>();

            if (m_btnClear != null)
            {
                m_btnClear.onClick.AddListener(OnClearClick);
            }

            if (m_togInfo != null)
            {
                m_txtInfoCount = m_togInfo.GetComponentInChildren <TextMeshProUGUI>();
                m_togInfo.onValueChanged.AddListener(OnTogInfoValueChanged);
            }

            if (m_togWarning != null)
            {
                m_txtWarningCount = m_togWarning.GetComponentInChildren <TextMeshProUGUI>();
                m_togWarning.onValueChanged.AddListener(OnTogWarningValueChange);
            }

            if (m_togError != null)
            {
                m_txtErrorCount = m_togError.GetComponentInChildren <TextMeshProUGUI>();
                m_togError.onValueChanged.AddListener(OnTogErrorValueChanged);
            }
        }