Class InteractableThemeShaderUtils
Collection of shader and material utilities
Inheritance
InteractableThemeShaderUtils
Assembly: cs.temp.dll.dll
public static class InteractableThemeShaderUtils
Methods
Get the MaterialPropertyBlock from a renderer on a gameObject
Declaration
public static MaterialPropertyBlock GetPropertyBlock(GameObject gameObject)
Parameters
Type |
Name |
Description |
GameObject |
gameObject |
|
Returns
Type |
Description |
MaterialPropertyBlock |
|
Get the MaterialPropertyBlock from a renderer on a gameObject
Declaration
public static MaterialPropertyBlock GetPropertyBlock(GameObject gameObject)
Parameters
Type |
Name |
Description |
GameObject |
gameObject |
|
Returns
Type |
Description |
MaterialPropertyBlock |
|
Grab the shared material to avoid creating new material instances and breaking batching.
Because MaterialPropertyBlocks are used for setting material properties the shared material is
used to set the initial state of the MaterialPropertyBlock(s) before mutating state.
Declaration
public static Material GetValidMaterial(Renderer renderer)
Parameters
Type |
Name |
Description |
Renderer |
renderer |
|
Returns
Type |
Description |
Material |
|
Grab the shared material to avoid creating new material instances and breaking batching.
Because MaterialPropertyBlocks are used for setting material properties the shared material is
used to set the initial state of the MaterialPropertyBlock(s) before mutating state.
Declaration
public static Material GetValidMaterial(Renderer renderer)
Parameters
Type |
Name |
Description |
Renderer |
renderer |
|
Returns
Type |
Description |
Material |
|
Get a MaterialPropertyBlock and copy the designated properties
Declaration
public static MaterialPropertyBlock InitMaterialPropertyBlock(GameObject gameObject, List<ThemeStateProperty> props)
Parameters
Returns
Type |
Description |
MaterialPropertyBlock |
|
Get a MaterialPropertyBlock and copy the designated properties
Declaration
public static MaterialPropertyBlock InitMaterialPropertyBlock(GameObject gameObject, List<ThemeStateProperty> props)
Parameters
Returns
Type |
Description |
MaterialPropertyBlock |
|