MaterialInstance

View source

Abstract component for associating an entity with a typed Material asset.

Extend this class for a concrete material component. Its generic parameter identifies the Material type associated with that component, as in BasicMaterialInstance.

Constructor


constructor<T extends Material>(handle: Handle<T>)

View source

Creates a material component from a typed material handle.

The supplied handle is stored directly and is not copied or resolved. Concrete material components pass their material handle to super.

Type Parameters

T extends Material

Parameters

NameDescriptionDefault
handle——

Properties


handle: Handle<T>

View source

Handle for the material asset associated with this component.

The generic T keeps the handle aligned with the component’s material type. The supplied handle is retained as the component’s live asset reference.