VisualShaderNodeParameter
A base type for the parameters within the visual shader graph.
A base type for the parameters within the visual shader graph.
A parameter represents a variable in the shader which is set externally, i.e. from the ShaderMaterial. Parameters are exposed as properties in the ShaderMaterial and can be assigned from the Inspector or from a script.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties3
InstanceIndexProperty
public int InstanceIndex { get; set; }Explicit instance-parameter index from 0 through 15; initially 0. Used with the InstanceIndex qualifier. Setting the index neither switches the qualifier nor assigns a per-instance parameter value.
ParameterNameProperty
public string ParameterName { get; set; }Uniform name in generated code, distinct from a node ID or caption. Use a valid unique name. After renaming, update SetShaderParameter calls and saved materials. The setter stores the string; the editor can normalize the name. Calling AddNode from C# does not perform that validation by itself.
QualifierProperty
public VisualShaderNodeParameter.QualifierEnum Qualifier { get; set; }Parameter scope: an ordinary uniform, global, or instance, including the explicit-index variant. Defaults to None. It is neither the shader mode nor graph stage. Support depends on node type; global requires a registry entry and instance requires per-instance parameter setup.
Methods6
GetInstanceIndexint
public int GetInstanceIndex();Explicit instance-parameter index from 0 through 15; initially 0. Used with the InstanceIndex qualifier. Setting the index neither switches the qualifier nor assigns a per-instance parameter value.
intGetParameterNamestring
public string GetParameterName();Uniform name in generated code, distinct from a node ID or caption. Use a valid unique name. After renaming, update SetShaderParameter calls and saved materials. The setter stores the string; the editor can normalize the name. Calling AddNode from C# does not perform that validation by itself.
stringGetQualifierVisualShaderNodeParameter.QualifierEnum
public VisualShaderNodeParameter.QualifierEnum GetQualifier();Parameter scope: an ordinary uniform, global, or instance, including the explicit-index variant. Defaults to None. It is neither the shader mode nor graph stage. Support depends on node type; global requires a registry entry and instance requires per-instance parameter setup.
VisualShaderNodeParameter.QualifierEnumSetInstanceIndexvoid
public void SetInstanceIndex(int instanceIndex);Explicit instance-parameter index from 0 through 15; initially 0. Used with the InstanceIndex qualifier. Setting the index neither switches the qualifier nor assigns a per-instance parameter value.
| Name | Type | Default |
|---|---|---|
instanceIndex | int | — |
instanceIndexIndex from 0 through 15 inclusive.
SetParameterNamevoid
public void SetParameterName(string name);Uniform name in generated code, distinct from a node ID or caption. Use a valid unique name. After renaming, update SetShaderParameter calls and saved materials. The setter stores the string; the editor can normalize the name. Calling AddNode from C# does not perform that validation by itself.
| Name | Type | Default |
|---|---|---|
name | string | — |
nameUniform name, such as tint.
SetQualifiervoid
public void SetQualifier(VisualShaderNodeParameter.QualifierEnum qualifier);Parameter scope: an ordinary uniform, global, or instance, including the explicit-index variant. Defaults to None. It is neither the shader mode nor graph stage. Support depends on node type; global requires a registry entry and instance requires per-instance parameter setup.
| Name | Type | Default |
|---|---|---|
qualifier | VisualShaderNodeParameter.QualifierEnum | — |
qualifierParameter scope supported by this node type.
VisualShaderNodeParameter.QualifierEnum
| Value | Description |
|---|---|
Global = 1 | The parameter will use a global value, defined in Project Settings. |
Instance = 2 | The parameter will be tied to the node with attached |
InstanceIndex = 3 | The parameter will be tied to the node with attached |
Max = 4 | Represents the size of the |
None = 0 | The parameter will be tied to the |