Class MaterialModifier
- Namespace
- Nautilus.Utility.MaterialModifiers
- Assembly
- Nautilus.dll
Base class for material modifiers. Can be overriden to implement custom behaviour.
public abstract class MaterialModifier
- Inheritance
-
MaterialModifier
- Derived
- Inherited Members
- Extension Methods
Methods
BlockShaderConversion(Material, Renderer, MaterialType)
Method called before any shader conversions and material modifiers are applied. By default returns false.
If true is returned from ANY MaterialModifier, the shader of
If true is returned from ANY MaterialModifier, the shader of
material
will not be converted to MarmosetUBER. However, all modifiers will still be applied normally.public virtual bool BlockShaderConversion(Material material, Renderer renderer, MaterialUtils.MaterialType materialType)
Parameters
material
Material- The material being evalauted.
renderer
Renderer- The renderer using the
material
. materialType
MaterialUtils.MaterialType- The type of material that this can be expected to be. Determined in ApplySNShaders(GameObject, float, float, float, params MaterialModifier[]) based on specific keywords.
Returns
EditMaterial(Material, Renderer, int, MaterialType)
Method called after all other material conversions have finished.
public abstract void EditMaterial(Material material, Renderer renderer, int materialIndex, MaterialUtils.MaterialType materialType)
Parameters
material
Material- The material being modified.
renderer
Renderer- The renderer using the
material
. materialIndex
int- The index of the given
material
in its UnityEngine.Renderer. materialType
MaterialUtils.MaterialType- The type of material that this can be expected to be. Determined in ApplySNShaders(GameObject, float, float, float, params MaterialModifier[]) based on specific keywords.