Exemple #1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            if (!BlendModeEffect.IsComponentExtensionValid)
            {
                EditorGUILayout.HelpBox($"`{BlendModeEffect.gameObject.name}` game object doesn't have a supported component.", MessageType.Warning);
                EditorGUILayout.HelpBox("You can add your own component extensions; see `Adding component extensions` in the docs for more info.", MessageType.Info);
                serializedObject.ApplyModifiedProperties();
                return;
            }

            if (!BlendModeEffect.IsShaderFamilySupported(BlendModeEffect.ShaderFamily))
            {
                ShaderFamilyGUI();
                InstallShaderExtensionGUI();
                serializedObject.ApplyModifiedProperties();
                return;
            }

            BlendModeGUI();
            ShaderFamilyGUI();
            RenderModeGUI();
            MaskingGUI();
            OptimizationsGUI();

            if (shaderPropertiesList != null)
            {
                shaderPropertiesList.DrawList();
            }

            serializedObject.ApplyModifiedProperties();
        }
Exemple #2
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            if (!BlendModeEffect.IsComponentExtensionValid)
            {
                InstallComponentExtensionGUI();
                serializedObject.ApplyModifiedProperties();
                return;
            }

            if (!BlendModeEffect.IsShaderFamilySupported(BlendModeEffect.ShaderFamily))
            {
                ShaderFamilyGUI();
                InstallShaderExtensionGUI();
                serializedObject.ApplyModifiedProperties();
                return;
            }

            BlendModeGUI();
            ShaderFamilyGUI();
            RenderModeGUI();
            MaskingGUI();
            OptimizationsGUI();

            if (shaderPropertiesList != null)
            {
                shaderPropertiesList.DrawList();
            }

            serializedObject.ApplyModifiedProperties();
        }