![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MaterialOverrideNanite.h>
Public Member Functions | |
| UMaterialInterface * | GetOverrideMaterial () const |
| void | SetOverrideMaterial (UMaterialInterface *InMaterial, bool bInOverride) |
| bool | Serialize (FArchive &Ar) |
| bool | FixupLegacySoftReference (UObject *OptionalOwner=nullptr) |
Public Attributes | |
| bool | bEnableOverride = true |
Protected Attributes | |
| TObjectPtr< UMaterialInterface > | OverrideMaterial |
| TSoftObjectPtr< UMaterialInterface > | OverrideMaterialRef |
Storage for nanite material override. An override material can be selected, and the override material can be used according to the current settings. We handle removing the override material and its dependencies from the cook on platforms where we can determine that the override material can never be used.
Resolve and fixup anylegacy soft pointer. Call this from the owning object's PostLoad(). Returns true if any fixup was done.
|
inline |
This will return the cached override material pointer, if the override material is set, or nullptr otherwise. In a cooked game this will always return nullptr if the platform can't support nanite.
Serialize function as declared in the TStructOpsTypeTraits.
| void FMaterialOverrideNanite::SetOverrideMaterial | ( | UMaterialInterface * | InMaterial, |
| bool | bInOverride | ||
| ) |
Setup the object directly.
Stored flag to set whether we apply this override.
This is useful when evaluating an override along a hierachy of settings. We default to true to always override.
|
protected |
Reference to our override material. This is only non-null in cooked packages, and is only non-null for cooked platforms that support nanite.
Note that we skip default serialization and use special logic inside Serialize().
|
protected |
Legacy editor soft reference that has been replaced by OverrideMaterialEditor.