public override void OnInspectorGUI()
    {
        serializedObject.Update();

        if (OnSelect())
        {
            m_editorObject.CutVolumes.FindAllFreeFormBoxes();
        }

        m_editorObject.DrawInspector();
        texSetEditor.DrawInspector();

        EditorGUILayout.Space();
        EditorUIElements.Separator();
        EditorGUILayout.Space();

        objColEditor.DrawInspector();

        EditorGUILayout.Space();
        EditorUIElements.Separator();
        EditorGUILayout.Space();

        objColsEditor.DrawInspector();

        EditorGUILayout.Space();
        EditorUIElements.Separator();
        EditorGUILayout.Space();

        serializedObject.ApplyModifiedProperties();
    }
Exemplo n.º 2
0
        //public int TexturePriorityLevel { get { return m_texturePriority; } private set { m_texturePriority = value; } }

        //public float BaseTextureScale { get { return 1f / (float)m_baseTextureScale; } }

        #endregion


        #region Public methods

        public void DrawInspector()
        {
            EditorGUI.BeginChangeCheck();

            Info.DrawInspector();

            EditorGUILayout.Space();
            EditorUIElements.Separator();
            EditorGUILayout.Space();

            ExtraRig.DrawInspector();

            EditorGUILayout.Space();
            EditorUIElements.Separator();
            EditorGUILayout.Space();

            CutVolumes.DrawInspector(transform);

            EditorGUILayout.Space();
            EditorUIElements.Separator();
            EditorGUILayout.Space();

            //DrawTexturesInspector();
            TextureSet.DrawInspector();

            EditorGUILayout.Space();
            EditorUIElements.Separator();
            EditorGUILayout.Space();

            ObjColors.DrawInspector();

            EditorGUILayout.Space();
            EditorUIElements.Separator();
            EditorGUILayout.Space();

            EditorGUILayout.Space();

            if (EditorGUI.EndChangeCheck())
            {
                EditorUtility.SetDirty(this);
            }
        }
Exemplo n.º 3
0
    public void DrawInspector()
    {
        EditorUIElements.Separator();
        EditorGUILayout.LabelField("obj color editor version:");
        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Textures atlas scale:", GUILayout.MaxWidth(150));
        m_baseTextureScale.intValue = (int)EditorGUILayout.IntPopup(m_baseTextureScale.intValue,
                                                                    new string[] { "1", "0.5", "0.25", "0.125", "0,015625" },
                                                                    new int[] { 1, 2, 4, 8, 16 });
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Textures priority level:", GUILayout.MaxWidth(150));
        //TexturePriorityLevel.intValue = (int)EditorGUILayout.Slider(TexturePriorityLevel.intValue, 0, 5);
        textureSettings.TexturePriorityLevel = (int)EditorGUILayout.Slider(textureSettings.TexturePriorityLevel, 0, 5);

        EditorGUILayout.EndHorizontal();

        EditorGUILayout.PropertyField(m_colors);
        for (int i = 0; i < m_colors.arraySize; i++)
        {
            EditorGUILayout.PropertyField(m_colors.GetArrayElementAtIndex(i));
        }

        //EditorGUILayout.PropertyField(m_dict);
        //for (int i = 0; i < m_dict.arraySize; i++)
        //{
        //    EditorGUILayout.PropertyField(m_dict.GetArrayElementAtIndex(i));
        //}

        foreach (var pair in m_dict)
        {
            EditorGUILayout.LabelField("pair:" + pair.ToString(), GUILayout.MaxWidth(150));
        }

        EditorGUILayout.PropertyField(gType);

        EditorUIElements.Separator();
    }