示例#1
0
        public static bool BeginFold(string foldName)
        {
            EditorGUILayout.BeginVertical(EditorStyles.helpBox);
            GUILayout.Space(3);
            EditorGUI.indentLevel++;

            Foldout fold      = Foldout.Get(foldName);
            bool    foldState = EditorGUI.Foldout(EditorGUILayout.GetControlRect(),
                                                  fold.state, fold.title, true, foldoutStyle);

            fold.state = foldState;

            EditorGUI.indentLevel--;
            if (foldState)
            {
                GUILayout.Space(5);
            }
            //EditorGUI.indentLevel++;

            EditorGUILayout.BeginHorizontal();
            GUILayout.Space(1);
            EditorGUILayout.BeginVertical();

            return(foldState);
        }
示例#2
0
 public static void Initialize(MaterialEditor materialEditor)
 {
     Layout.materialEditor = materialEditor;
     Foldout.Initialize(materialEditor.target as Material);
 }