docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ReadMaterial

    ReadMaterial(Scene, string, MaterialSample, out string)

    Reads the material associated with the geometry at the target path. If a valid material is bound, the "surface" shader is inspected, if valid, the shader ID is queried and returned via the shaderId output parameter. Returns true when shaderId is set.

    Declaration
    public static bool ReadMaterial(Scene scene, string geometryPath, MaterialSample materialSample, out string shaderId)
    Parameters
    Type Name Description
    Scene scene
    string geometryPath
    MaterialSample materialSample
    string shaderId
    Returns
    Type Description
    bool
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)