Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            serializedObject.DrawScript();
            m_setter.Clear();

            using (EditorGUILayout.VerticalScope box = new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
            {
                switch (m_sdfOperation.Type)
                {
                case SDFOperationType.Elongate:
                    m_setter.DrawVector3Setting(Labels.Elongation, m_serializedProperties.Data, min: 0f);
                    break;

                case SDFOperationType.Onion:
                    m_setter.DrawVectorSettingX(Labels.Rounding, m_serializedProperties.Data, min: 0f);
                    m_setter.DrawVectorSettingYInt(Labels.Layers, m_serializedProperties.Data, min: 0);
                    break;

                case SDFOperationType.Round:
                    m_setter.DrawVectorSettingX(Labels.Rounding, m_serializedProperties.Data, min: 0f);
                    break;
                }
            }

            m_setter.Update();
        }