Search Results for

    Show / Hide Table of Contents

    Class MaterialUtils

    Collection of utility functions for setting material properties.

    Inheritance
    Object
    MaterialUtils
    Namespace: nickmaltbie.OpenKCC.Utils
    Assembly: cs.temp.dll.dll
    Syntax
    public static class MaterialUtils

    Methods

    RecursiveSetColorProperty(GameObject, String, Color, Boolean)

    Recursively set a Color property for each Renderer components' materials for a given object and its children.

    Declaration
    public static void RecursiveSetColorProperty(GameObject original, string property, Color value, bool sharedMaterial = false)
    Parameters
    Type Name Description
    GameObject original

    Base game object to start operation from.

    String property

    Name of property to modify.

    Color value

    Value to set for color property.

    Boolean sharedMaterial

    Should the shared materials be modified.

    RecursiveSetFloatProperty(GameObject, String, Single, Boolean)

    Recursively set a float property for each Renderer components' materials for a given object and its children.

    Declaration
    public static void RecursiveSetFloatProperty(GameObject original, string property, float value, bool sharedMaterial = false)
    Parameters
    Type Name Description
    GameObject original

    Base game object to start operation from.

    String property

    Name of property to modify.

    Single value

    Value to set for float property.

    Boolean sharedMaterial

    Should the shared materials be modified.

    RecursiveSetShadowCastingMode(GameObject, ShadowCastingMode)

    Recursively set the ShadowCastingMode for each Renderer component in the object and its children.

    Declaration
    public static void RecursiveSetShadowCastingMode(GameObject original, ShadowCastingMode shadowCastingMode)
    Parameters
    Type Name Description
    GameObject original

    Base game object to start operation from.

    ShadowCastingMode shadowCastingMode

    Shadow casting mode to set for Renderer component.

    In This Article
    Back to top OpenKCC Documentation