Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Materials
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UMaterialParameterCollection
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Materials/MaterialParameterCollection.h |
Include | #include "Materials/MaterialParameterCollection.h" |
Syntax
class UMaterialParameterCollection : public UObject
Remarks
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.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TArray< FCollectionScalarParameter > | ScalarParameters | |
![]() |
FGuid | StateId | Used by materials using this collection to know when to recompile. |
![]() |
TArray< FCollectionVectorParameter > | VectorParameters |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UMaterialParameterCollection
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FGuid | GetParameterId
(
FName ParameterName |
Finds a parameter id given a name, returns the default guid if the parameter was not found. |
![]() ![]() |
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. |
![]() ![]() |
FName | GetParameterName
(
const FGuid& Id |
Finds a parameter name given an Id, returns NAME_None if the parameter was not found. |
![]() ![]() |
void | GetParameterNames
(
TArray< FName >& OutParameterNames, |
Populates an array with either scalar or vector parameter names. |
![]() ![]() |
const FCollectionScalarParameter * | GetScalarParameterByName
(
FName ParameterName |
Utility to find a scalar parameter struct given a parameter name. Returns NULL if not found. |
![]() ![]() |
float | GetScalarParameterDefaultValue
(
FName ParameterName, |
Gets the default value of a scalar parameter from a material collection. |
![]() ![]() |
int32 | GetScalarParameterIndexByName
(
FName ParameterName |
Get the index in the ScalarParameters array of the parameter matching the input parameter name, returns -1 if not found |
![]() ![]() |
TArray< FName > | Returns an array of the names of all the scalar parameters in this Material Parameter Collection | |
![]() ![]() |
const FShaderParametersMetadata & | Accessor for the uniform buffer layout description. | |
![]() ![]() |
const FCollectionVectorParameter * | GetVectorParameterByName
(
FName ParameterName |
Utility to find a vector parameter struct given a parameter name. Returns NULL if not found. |
![]() ![]() |
FLinearColor | GetVectorParameterDefaultValue
(
FName ParameterName, |
Gets the default value of a scalar parameter from a material collection. |
![]() ![]() |
int32 | GetVectorParameterIndexByName
(
FName ParameterName |
Get the index in the VectorParameters array of the parameter matching the input parameter name, returns -1 if not found |
![]() ![]() |
TArray< FName > | Returns an array of the names of all the vector parameters in this Material Parameter Collection | |
![]() |
bool | SetScalarParameterDefaultValue
(
FName ParameterName, |
Set the default value of a scalar parameter on the Material Parameter Collection asset itself by name |
![]() |
bool | SetScalarParameterDefaultValueByInfo
(
FCollectionScalarParameter ScalarParameter |
Set the default value of a scalar parameter on the Material Parameter Collection asset itself by struct |
![]() |
void | Create an instance for this collection in every world. | |
![]() |
bool | SetVectorParameterDefaultValue
(
FName ParameterName, |
Set the default value of a vector parameter on the Material Parameter Collection asset itself by name |
![]() |
bool | SetVectorParameterDefaultValueByInfo
(
FCollectionVectorParameter VectorParameter |
Set the default value of a vector parameter on the Material Parameter Collection asset itself by struct |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | BeginDestroy () |
Called before destroying the object. |
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
![]() ![]() |
void | PreEditChange
(
FProperty* PropertyAboutToChange |
This is called when a property is about to be modified externally |
Overridden from UObjectBaseUtility
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | Called during cluster construction if the object can be added to a cluster |