Class MaterialComponent
A material used to render meshes.
Inheritance
MaterialComponent
Implements
Inherited Members
Namespace: Evergine.Components.Graphics3D
Assembly: Evergine.Framework.dll
Syntax
public class MaterialComponent : Component, IDependencyObject
Constructors
MaterialComponent()
Initializes a new instance of the MaterialComponent class.
Declaration
public MaterialComponent()
Properties
AsignedTo
Gets or sets the specified material included in the FBX file.
Declaration
public string AsignedTo { get; set; }
Property Value
Type | Description |
---|---|
string |
Material
Gets or sets the material.
Declaration
public Material Material { get; set; }
Property Value
Type | Description |
---|---|
Material |
UseCopy
Gets or sets a value indicating whether the component will use an individual copy of the material file instead of sharing the material instance.
Declaration
[RenderProperty(Tooltip = "The component will use an individual copy of the material asset, instead of sharing the material instance.")]
public bool UseCopy { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if everything is OK. |
Overrides
OnDestroy()
Invoked when the object is about to be disposed.
Declaration
protected override void OnDestroy()
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
Events
ChangedMaterial
Event is fired when the material is changed.
Declaration
public event EventHandler<Material> ChangedMaterial
Event Type
Type | Description |
---|---|
EventHandler<Material> |