Properties (Shader)

From Unify Community Wiki
Jump to: navigation, search

Properties allow variables inside the shader code to be accessed outside of the shader code (such as in a script or in the inspector).


Properties must appear inside a

Properties{}

block.

Each property must have the following syntax:

_Variable_Name_in_CG_Shader_Code ("Name that appears in the inspector", VariableType) = DefaultValue

Note that the line does not end with a semicolon, as it does in the CG shader code.


Unity docs on properties

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox