Open 3D Engine AtomLyIntegration Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Render::MaterialAssignment Struct Referencefinal

Public Member Functions

 AZ_RTTI (AZ::Render::MaterialAssignment, "{C66E5214-A24B-4722-B7F0-5991E6F8F163}")
 
 AZ_CLASS_ALLOCATOR (AZ::Render::MaterialAssignment, SystemAllocator)
 
 MaterialAssignment (const AZ::Data::AssetId &materialAssetId)
 
 MaterialAssignment (const Data::Asset< RPI::MaterialAsset > &asset)
 
 MaterialAssignment (const Data::Asset< RPI::MaterialAsset > &asset, const Data::Instance< RPI::Material > &instance)
 
void RebuildInstance ()
 
void Release ()
 Release asset and instance references.
 
bool RequiresLoading () const
 Return true if contained assets have not been loaded.
 
bool ApplyProperties ()
 Applies property overrides to material instance.
 
AZStd::string ToString () const
 Returns a string composed of the asset path.
 

Static Public Member Functions

static void Reflect (ReflectContext *context)
 

Public Attributes

Data::Asset< RPI::MaterialAsset > m_materialAsset
 
Data::Asset< RPI::MaterialAsset > m_defaultMaterialAsset
 
Data::Instance< RPI::Material > m_materialInstance
 
MaterialPropertyOverrideMap m_propertyOverrides
 
RPI::MaterialModelUvOverrideMap m_matModUvOverrides
 
bool m_materialInstancePreCreated = false
 
bool m_materialInstanceMustBeUnique = false
 

Member Function Documentation

◆ RebuildInstance()

void AZ::Render::MaterialAssignment::RebuildInstance ( )

Recreates the material instance from the asset if it has been loaded. If amy property overrides have been specified then a unique instance will be created. Otherwise an attempt will be made to find or create a shared instance.


The documentation for this struct was generated from the following file: