Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    MaterialInstance Class

    Namespace: Stride.Rendering
    Assembly: Stride.Rendering.dll

    A Material instance.

    System.Object → MaterialInstance
    Derived from MaterialInstance:

    [DataContract("MaterialInstance")]
    public class MaterialInstance : IEquatable<MaterialInstance>
    Name Description
    Constructors
    MaterialInstance()

    Initializes a new instance of the MaterialInstance class.

    MaterialInstance(Material)

    Initializes a new instance of the MaterialInstance class.

    Properties
    IsShadowCaster

    Gets or sets if this instance is casting shadows.

    Material

    Gets or sets the material.

    Methods
    Equals(MaterialInstance)
    Equals(Object)
    GetHashCode()
    Operators
    Equality(MaterialInstance, MaterialInstance)
    Implicit(Material to MaterialInstance)

    Performs an explicit conversion from Material to MaterialInstance.

    Inequality(MaterialInstance, MaterialInstance)
    | Improve this Doc View Source

    Constructors


    MaterialInstance()

    Initializes a new instance of the MaterialInstance class.

    public MaterialInstance()

    MaterialInstance(Material)

    Initializes a new instance of the MaterialInstance class.

    public MaterialInstance(Material material)
    Parameters
    Type Name Description
    Material material

    The material.

    | Improve this Doc View Source

    Properties


    IsShadowCaster

    Gets or sets if this instance is casting shadows.

    [DataMember(20)]
    [Display("Cast Shadows?", null)]
    public bool IsShadowCaster { get; set; }
    Property Value
    Type Description
    System.Boolean

    A boolean indicating whether this instance is casting shadows. Default is true.


    Material

    Gets or sets the material.

    [DataMember(10)]
    public Material Material { get; set; }
    Property Value
    Type Description
    Material

    The material.

    | Improve this Doc View Source

    Methods


    Equals(MaterialInstance)

    public bool Equals(MaterialInstance other)
    Parameters
    Type Name Description
    MaterialInstance other
    Returns
    Type Description
    System.Boolean

    Equals(Object)

    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    Operators


    Equality(MaterialInstance, MaterialInstance)

    public static bool operator ==(MaterialInstance left, MaterialInstance right)
    Parameters
    Type Name Description
    MaterialInstance left
    MaterialInstance right
    Returns
    Type Description
    System.Boolean

    Implicit(Material to MaterialInstance)

    Performs an explicit conversion from Material to MaterialInstance.

    public static implicit operator MaterialInstance(Material material)
    Parameters
    Type Name Description
    Material material

    The material.

    Returns
    Type Description
    MaterialInstance

    The result of the conversion.


    Inequality(MaterialInstance, MaterialInstance)

    public static bool operator !=(MaterialInstance left, MaterialInstance right)
    Parameters
    Type Name Description
    MaterialInstance left
    MaterialInstance right
    Returns
    Type Description
    System.Boolean

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation