API
The following section describes the exposed properties of the shader. You can use those properties to dynamically change various shader options from your own scripts.
_Color
The albedo color of the texture.
See Albedo Color for more information.
Usage
With
material being the material of the object's sprite renderer,
and newColor being the albedo color you would like to apply to the object,
set the value like so:material.SetColor("_Color", newColor);
and read it like so:
Color color = material.GetColor("_Color");
_Cutoff
The alpha cutoff value.
See Alpha Cutoff for more information.
Usage
With
material being the material of the object's sprite renderer,
and newCutoff being the cutoff value you would like to apply to the object,
set the value like so:material.SetFloat("_Cutoff", newCutoff);
and read it like so:
float cutoff = material.GetFloat("_Cutoff");
_EmissionColor
The color of the emission.
See Emission Color for more information.
Usage
With
material being the material of the object's sprite renderer,
and newColor being the emission color you would like to apply to the object,
set the value like so:material.SetColor("_EmissionColor", newColor);
and read it like so:
Color color = material.GetColor("_EmissionColor");
_EmissionStrength
The strength of the emission. This allows you to make your emission stronger or weaker, regardless of color.
See Emission Strength for more information.
Usage
With
material being the material of the object's sprite renderer,
and newStrength being the emission strength value you would like to apply to the object,
set the value like so:material.SetFloat("_EmissionStrength", newStrength);
and read it like so:
float strength = material.GetFloat("_EmissionStrength");
_WaveController
The controller value for the wave effect.
See Wave Controller for more information.
Usage
With
material being the material of the object's sprite renderer,
and controller being the controller value you would like to apply to the object,
set the value like so:material.SetFloat("_WaveController", controller);
and read it like so:
float controller = material.GetFloat("_WaveController");
_WaveThickness
The thickness of the wave
See Wave Thickness for more information.
Usage
With
material being the material of the object's sprite renderer,
and thickness being the thickness value you would like to apply to the object,
set the value like so:material.SetFloat("_WaveThickness", thickness);
and read it like so:
float thickness = material.GetFloat("_WaveThickness");
_WaveStrength
The overall feel of the wave.
See Wave Strength for more information.
Usage
With
material being the material of the object's sprite renderer,
and strength being the strength value you would like to apply to the object,
set the value like so:material.SetFloat("_WaveStrength", strength);
and read it like so:
float strength = material.GetFloat("_WaveStrength");
_Angle
The angle of the highlight wave in degrees of rotation on the z-axis.
See Angle for more information.
Usage
With
material being the material of the object's sprite renderer,
and angle being the angle value in degrees you would like to apply to the object,
set the value like so:material.SetFloat("_Angle", angle);
and read it like so:
float angle = material.GetFloat("_Angle");