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

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.

References

Module

Engine

Header

Runtime/Engine/Classes/Materials/MaterialParameterCollectionInstance.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback