Beispiel #1
0
        void OnGUI()
        {
            //Header
            GUILayout.Box("Mesh Painter", curSkin.box, GUILayout.Height(60), GUILayout.ExpandWidth(true));

            //Body
            EditorGUILayout.BeginVertical(curSkin.GetStyle("Body"), GUILayout.ExpandHeight(false));
            EditorGUILayout.LabelField("Info", curSkin.label);

            string curObjectName = "None";

            if (m_CurrentGO && m_CurrentMesh)
            {
                curObjectName = m_CurrentGO.name;
                curObjectName = m_CurrentMesh.name;
            }
            EditorGUILayout.LabelField("GameObject: " + curObjectName, curSkin.GetStyle("h3"));
            EditorGUILayout.LabelField("Mesh: " + curObjectName, curSkin.GetStyle("h3"));
            EditorGUILayout.LabelField("State: " + m_CurrentState.ToString(), curSkin.GetStyle("h3"));
            EditorGUILayout.Space();
            EditorGUILayout.EndVertical();


            if (m_CurrentState != EF_VTXPainterState.None)
            {
                EditorGUILayout.BeginVertical(curSkin.GetStyle("Body"), GUILayout.ExpandHeight(true));
                EditorGUILayout.LabelField("Actions", curSkin.label);

                DrawActionUI();

                EditorGUILayout.Space();
                EditorGUILayout.EndVertical();
            }


            EditorGUILayout.BeginVertical(curSkin.GetStyle("Body"), GUILayout.ExpandHeight(true));
            EditorGUILayout.LabelField("Tools", curSkin.label);
            EditorGUILayout.Space();

            DrawToolUI();

            EditorGUILayout.EndVertical();

            //Footer
            GUILayout.Box("", curSkin.box, GUILayout.Height(30f), GUILayout.ExpandWidth(true));

            //Update the GUI
            Repaint();
        }