UnityEditor.PackageExportTreeView.SetAllEnabled C# (CSharp) Method

SetAllEnabled() public method

public SetAllEnabled ( EnabledState enabled ) : void
enabled EnabledState
return void
        public void SetAllEnabled(EnabledState enabled)
        {
            this.EnableChildrenRecursive(this.m_TreeView.data.root, enabled);
            this.ComputeEnabledStateForFolders();
        }

Usage Example

示例#1
0
        void BottomArea()
        {
            // Background
            GUILayout.BeginVertical(Styles.bottomBarBg);

            GUILayout.Space(8);
            GUILayout.BeginHorizontal();
            GUILayout.Space(10);
            if (GUILayout.Button(Styles.allText, GUILayout.Width(50)))
            {
                m_Tree.SetAllEnabled(PackageExportTreeView.EnabledState.All);
            }

            if (GUILayout.Button(Styles.noneText, GUILayout.Width(50)))
            {
                m_Tree.SetAllEnabled(PackageExportTreeView.EnabledState.None);
            }

            GUILayout.Space(10);

            EditorGUI.BeginChangeCheck();
            m_IncludeDependencies = GUILayout.Toggle(m_IncludeDependencies, Styles.includeDependenciesText);
            if (EditorGUI.EndChangeCheck())
            {
                RefreshAssetList();
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button(EditorGUIUtility.TrTextContent("Export...")))
            {
                Export();
                GUIUtility.ExitGUI();
            }
            GUILayout.Space(10);
            GUILayout.EndHorizontal();
            GUILayout.Space(5);
            GUILayout.EndVertical();
        }
All Usage Examples Of UnityEditor.PackageExportTreeView::SetAllEnabled