docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CreateEngineMaterial

    CreateEngineMaterial(string)

    Creates a Material with the provided shader path. hideFlags will be set to HideFlags.HideAndDontSave.

    Declaration
    public static Material CreateEngineMaterial(string shaderPath)
    Parameters
    Type Name Description
    string shaderPath

    Path of the shader used for the material.

    Returns
    Type Description
    Material

    A new Material instance using the shader found at the provided path.

    CreateEngineMaterial(Shader)

    Creates a Material with the provided shader. hideFlags will be set to HideFlags.HideAndDontSave.

    Declaration
    public static Material CreateEngineMaterial(Shader shader)
    Parameters
    Type Name Description
    Shader shader

    Shader used for the material.

    Returns
    Type Description
    Material

    A new Material instance using the provided shader.

    In This Article
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 06 October 2023