ShaderUtil

Utility functions to assist with working with shaders from the editor.

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.

Class Functions
GetPropertyCount

Get the number of properties in Shader s.

GetPropertyDescription

Get the description of the shader propery at index propertyIdx of Shader s.

GetPropertyName

Get the name of the shader propery at index propertyIdx of Shader s.

GetPropertyType

Get the ShaderProperyType of the shader propery at index propertyIdx of Shader s.

GetRangeLimits

Get Limits for a range property at index propertyIdx of Shader s.

GetTexDim

Representation of the texture dimensions.

IsShaderPropertyHidden

Is the shader propery at index propertyIdx of Shader s hidden?