UnityEditor.ShaderVariantCollectionInspector.OnInspectorGUI C# (CSharp) Method

OnInspectorGUI() public method

public OnInspectorGUI ( ) : void
return void
        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            for (int i = 0; i < this.m_Shaders.arraySize; i++)
            {
                this.DrawShaderEntry(i);
            }
            if (GUILayout.Button("Add shader", new GUILayoutOption[0]))
            {
                ObjectSelector.get.Show(null, typeof(Shader), null, false);
                ObjectSelector.get.objectSelectorID = "ShaderVariantSelector".GetHashCode();
                GUIUtility.ExitGUI();
            }
            if ((Event.current.type == EventType.ExecuteCommand) && ((Event.current.commandName == "ObjectSelectorClosed") && (ObjectSelector.get.objectSelectorID == "ShaderVariantSelector".GetHashCode())))
            {
                Shader currentObject = ObjectSelector.GetCurrentObject() as Shader;
                if (currentObject != null)
                {
                    ShaderUtil.AddNewShaderToCollection(currentObject, base.target as ShaderVariantCollection);
                }
                Event.current.Use();
                GUIUtility.ExitGUI();
            }
            base.serializedObject.ApplyModifiedProperties();
        }