Navigation
API > API/Runtime > API/Runtime/Engine
This class takes care of all of the details you need to worry about when modifying a UMaterial on the main thread. This class should always be used when doing so!
| Name | FMaterialUpdateContext |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/MaterialShared.h |
| Include Path | #include "MaterialShared.h" |
Syntax
class FMaterialUpdateContext
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMaterialUpdateContext
(
uint32 Options, |
Initialization constructor. | MaterialShared.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FMaterialUpdateContext() |
Destructor. | MaterialShared.h |
Structs
| Name | Remarks |
|---|---|
| EOptions | Options controlling what is done before/after the material is updated. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bSyncWithRenderingThread | bool | True if the SyncWithRenderingThread option was specified. | MaterialShared.h | |
| ComponentRecreateRenderStateContext | TUniquePtr< class FGlobalComponentRecreateRenderStateContext > | Active global component render state recreation context, if any. | MaterialShared.h | |
| ComponentReregisterContext | TUniquePtr< class FGlobalComponentReregisterContext > | Active global component reregister context, if any. | MaterialShared.h | |
| ShaderPlatform | EShaderPlatform | The shader platform that was being processed - can control if we need to update components | MaterialShared.h | |
| UpdatedMaterialInterfaces | TSet< UMaterialInterface * > | Materials updated within this context. | MaterialShared.h | |
| UpdatedMaterials | TSet< UMaterial * > | UMaterial parents of any UMaterialInterfaces updated within this context. | MaterialShared.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddMaterial
(
UMaterial* Material |
Add a material that has been updated to the context. | MaterialShared.h | |
void AddMaterialInstance
(
UMaterialInstance* Instance |
Adds a material instance that has been updated to the context. | MaterialShared.h | |
void AddMaterialInterface
(
UMaterialInterface* Instance |
Adds a material interface that has been updated to the context. | MaterialShared.h | |
const TSet< UMaterialInterface * > & GetUpdatedMaterials() |
MaterialShared.h |