Class InteractableThemeShaderUtils
Collection of shader and material utilities
Inheritance
InteractableThemeShaderUtils
Assembly: cs.temp.dll.dll
public class InteractableThemeShaderUtils : MonoBehaviour
Methods
Get a MaterialPropertyBlock and copy the designated properties
Declaration
public static MaterialPropertyBlock GetMaterialPropertyBlock(GameObject gameObject, ShaderProperties[] props)
Parameters
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 |
|