UMaterialParameterCollectionInstance

Class that stores per-world instance parameter data for a given [UMaterialParameterCollection](API\Runtime\Engine\Materials\UMaterialParameterCollection) resource.

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UMaterialParameterCollectionInstance

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Materials/MaterialParameterCollectionInstance.h

Include

#include "Materials/MaterialParameterCollectionInstance.h"

Syntax

class UMaterialParameterCollectionInstance : public UObject

Remarks

Class that stores per-world instance parameter data for a given UMaterialParameterCollection resource. Instances of this class are always transient.

Variables

Name Description

Public variable

bool

 

bLoggedMissingParameterWarning

Tracks whether this instance has ever issued a missing parameter warning, to reduce log spam.

Protected variable

bool

 

bNeedsRenderStateUpdate

Tracks whether this instance needs to update the render state from the game thread

Protected variable

UMaterialParame...

 

Collection

Collection resource this instance is based off of.

Protected variable

FMaterialParame...

 

Resource

Instance resource which stores the rendering thread representation of this instance.

Protected variable

TMap< FName, fl...

 

ScalarParameterValues

Overrides for scalar parameter values.

Protected variable

TMap< FName, FL...

 

VectorParameterValues

Overrides for vector parameter values.

Protected variable

TWeakObjectPtr<...

 

World

World that owns this instance.

Constructors

Name Description

Public function

UMaterialParameterCollectionInstance

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

DeferredUpdateRenderState

(
    bool bRecreateUniformBuffer
)

Public function Const

const UMater...

 

GetCollection()

Protected function Const

void

 

GetParameterData

(
    TArray< FVector4 >& ParameterData
)

Boils down the instance overrides and default values into data to be set on the uniform buffer.

Public function

FMaterialPar...

 

GetResource()

Public function Const

bool

 

GetScalarParameterValue

(
    FName ParameterName,
    float& OutParameterValue
)

Gets parameter values, returns false if the parameter was not found.

Public function Const

bool

 

GetVectorParameterValue

(
    FName ParameterName,
    FLinearColor& OutParameterValue
)

Public function

void

 

SetCollection

(
    UMaterialParameterCollection* ...,
    UWorld* InWorld
)

Initializes the instance with the collection it is based off of and the world it is owned by.

Public function

bool

 

SetScalarParameterValue

(
    FName ParameterName,
    float ParameterValue
)

Sets parameter value overrides, returns false if the parameter was not found.

Public function

bool

 

SetVectorParameterValue

(
    FName ParameterName,
    const FLinearColor& ParameterValue
)

Public function

void

 

UpdateRenderState

(
    bool bRecreateUniformBuffer
)

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss