MaterialInstance Class
Namespace: Stride.RenderingAssembly: 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) |
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. |
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 |
Material
Gets or sets the material.
[DataMember(10)]
public Material Material { get; set; }
Property Value
Type | Description |
---|---|
Material | The material. |
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 |