Navigation
API > API/Runtime > API/Runtime/Engine
Asset class that contains a list of parameter names and their default values. Any number of materials can reference these parameters and get new values when the parameter values are changed.
| Name | UMaterialParameterCollection |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/Materials/MaterialParameterCollection.h |
| Include Path | #include "Materials/MaterialParameterCollection.h" |
Syntax
UCLASS (HideCategories=object, MinimalAPI, BlueprintType)
class UMaterialParameterCollection : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UMaterialParameterCollection
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMaterialParameterCollection
(
const FObjectInitializer& ObjectInitializer |
Materials/MaterialParameterCollection.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnCollectionChanged | TMulticastDelegate_NoParams< void > | Materials/MaterialParameterCollection.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ScalarParameters | TArray< FCollectionScalarParameter > | Materials/MaterialParameterCollection.h |
|
|
| StateId | FGuid | Used by materials using this collection to know when to recompile. | Materials/MaterialParameterCollection.h |
|
| VectorParameters | TArray< FCollectionVectorParameter > | Materials/MaterialParameterCollection.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Base | TObjectPtr< UMaterialParameterCollection > | Materials/MaterialParameterCollection.h |
|
|
| BaseStateId | FGuid | Materials/MaterialParameterCollection.h | ||
| CollectionChangedDelegate | FOnCollectionChanged | Delegate for when the collection changes and consummers may need to be updated | Materials/MaterialParameterCollection.h | |
| DefaultResource | FMaterialParameterCollectionInstanceResource * | Default resource used when no instance is available. | Materials/MaterialParameterCollection.h | |
| ReleasedByRT | FThreadSafeBool | Flag used to guarantee that the RT is finished using various resources in this UMaterial before cleanup. | Materials/MaterialParameterCollection.h | |
| ScalarParameterBaseOverrides | TMap< FGuid, float > | Overrides for scalar parameter values. | Materials/MaterialParameterCollection.h | |
| UniformBufferStruct | TUniquePtr< FShaderParametersMetadata > | Materials/MaterialParameterCollection.h | ||
| VectorParameterBaseOverrides | TMap< FGuid, FLinearColor > | Overrides for vector parameter values. | Materials/MaterialParameterCollection.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMaterialParameterCollection * GetBaseParameterCollection() |
Gets the base Material Parameter Collection for this one. Returns nullptr if not set. | Materials/MaterialParameterCollection.h |
|
| Materials/MaterialParameterCollection.h | |||
| Finds a parameter id given a name, returns the default guid if the parameter was not found. | Materials/MaterialParameterCollection.h | ||
void GetParameterIndex
(
const FGuid& Id, |
Gets a vector and component index for the given parameter, used when compiling materials, to know where to access a certain parameter. | Materials/MaterialParameterCollection.h | |
| Finds a parameter name given an Id, returns NAME_None if the parameter was not found. | Materials/MaterialParameterCollection.h | ||
| Populates an array with either scalar or vector parameter names. | Materials/MaterialParameterCollection.h | ||
const FCollectionScalarParameter * GetScalarParameterByName
(
FName ParameterName |
Utility to find a scalar parameter struct given a parameter name. Returns NULL if not found. | Materials/MaterialParameterCollection.h | |
float GetScalarParameterDefaultValue
(
FName ParameterName, |
Gets the default value of a scalar parameter from a material collection. | Materials/MaterialParameterCollection.h |
|
int32 GetScalarParameterIndexByName
(
FName ParameterName |
Get the index in the ScalarParameters array of the parameter matching the input parameter name, returns -1 if not found | Materials/MaterialParameterCollection.h | |
| Returns an array of the names of all the scalar parameters in this Material Parameter Collection | Materials/MaterialParameterCollection.h |
|
|
int32 GetTotalVectorStorage() |
Returns total vector storage of the parameter collection, used for math involving OutIndex returned by GetParameterIndex above, when compiling materials. | Materials/MaterialParameterCollection.h | |
const FShaderParametersMetadata & GetUniformBufferStruct() |
Accessor for the uniform buffer layout description. | Materials/MaterialParameterCollection.h | |
const FCollectionVectorParameter * GetVectorParameterByName
(
FName ParameterName |
Utility to find a vector parameter struct given a parameter name. Returns NULL if not found. | Materials/MaterialParameterCollection.h | |
FLinearColor GetVectorParameterDefaultValue
(
FName ParameterName, |
Gets the default value of a scalar parameter from a material collection. | Materials/MaterialParameterCollection.h |
|
int32 GetVectorParameterIndexByName
(
FName ParameterName |
Get the index in the VectorParameters array of the parameter matching the input parameter name, returns -1 if not found | Materials/MaterialParameterCollection.h | |
| Returns an array of the names of all the vector parameters in this Material Parameter Collection | Materials/MaterialParameterCollection.h |
|
|
bool HasValidUniformBufferStruct() |
Returns whether this instance loaded correctly and is in valid state. | Materials/MaterialParameterCollection.h | |
bool IsInstanceOf
(
const FGuid& CollectionStateId |
Materials/MaterialParameterCollection.h | ||
FOnCollectionChanged & OnCollectionChanged() |
Materials/MaterialParameterCollection.h | ||
bool SetScalarParameterDefaultValue
(
FName ParameterName, |
Set the default value of a scalar parameter on the Material Parameter Collection asset itself by name | Materials/MaterialParameterCollection.h | |
bool SetScalarParameterDefaultValueByInfo
(
FCollectionScalarParameter ScalarParameter |
Set the default value of a scalar parameter on the Material Parameter Collection asset itself by struct | Materials/MaterialParameterCollection.h | |
void SetupWorldParameterCollectionInstances() |
Create an instance for this collection in every world. | Materials/MaterialParameterCollection.h | |
bool SetVectorParameterDefaultValue
(
FName ParameterName, |
Set the default value of a vector parameter on the Material Parameter Collection asset itself by name | Materials/MaterialParameterCollection.h | |
bool SetVectorParameterDefaultValueByInfo
(
FCollectionVectorParameter VectorParameter |
Set the default value of a vector parameter on the Material Parameter Collection asset itself by struct | Materials/MaterialParameterCollection.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
Materials/MaterialParameterCollection.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Materials/MaterialParameterCollection.h | ||
virtual void PostInitProperties() |
Materials/MaterialParameterCollection.h | ||
virtual void PostLoad() |
Materials/MaterialParameterCollection.h | ||
virtual void PreEditChange
(
FProperty* PropertyThatWillChange |
Materials/MaterialParameterCollection.h |
Overridden from UObjectBaseUtility
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanBeInCluster() |
Materials/MaterialParameterCollection.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FName GetBaseParameterCollectionMemberName() |
Materials/MaterialParameterCollection.h |