docs.unity3d.com
    Show / Hide Table of Contents

    Class MaterialSample

    Inheritance
    Object
    SampleBase
    MaterialSample
    Inherited Members
    SampleBase.Free()
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: USD.NET.Unity
    Syntax
    [Serializable]
    [UsdSchema("Material")]
    public class MaterialSample : SampleBase

    Constructors

    MaterialSample()

    Declaration
    public MaterialSample()

    MaterialSample(String)

    Declaration
    public MaterialSample(string surfacePath)
    Parameters
    Type Name Description
    String surfacePath

    MaterialSample(String, String)

    Declaration
    public MaterialSample(string surfacePath, string displacementPath)
    Parameters
    Type Name Description
    String surfacePath
    String displacementPath

    Fields

    displacement

    Declaration
    [UsdNamespace("outputs")]
    public Connectable<TfToken> displacement
    Field Value
    Type Description
    Connectable<TfToken>

    requiredKeywords

    Declaration
    public string[] requiredKeywords
    Field Value
    Type Description
    String[]

    surface

    Declaration
    [UsdNamespace("outputs")]
    public Connectable<TfToken> surface
    Field Value
    Type Description
    Connectable<TfToken>

    Methods

    Bind(Scene, String, String)

    Binds the prim to the given material. https://graphics.pixar.com/usd/docs/api/class_usd_shade_material.html#a116ed8259600f7a48f3792364252a4e1

    Declaration
    public static void Bind(Scene scene, string primPath, string materialPath)
    Parameters
    Type Name Description
    Scene scene
    String primPath
    String materialPath

    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
    Boolean

    Unbind(Scene, String)

    Unbinds the prim from all materials. https://graphics.pixar.com/usd/docs/api/class_usd_shade_material.html#a6fc9d56d2e2e826aa3d96711c7b0e605

    Declaration
    public static void Unbind(Scene scene, string primPath)
    Parameters
    Type Name Description
    Scene scene
    String primPath
    Back to top
    Copyright © 2023 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on Thursday, October 19, 2023