UMaterialFunctionInterface

A Material Function is a collection of material expressions that can be reused in different materials

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "Materials/MaterialFunctionInterface.h"

Syntax

class UMaterialFunctionInterface : public UObject

Remarks

A Material Function is a collection of material expressions that can be reused in different materials

Variables

Name Description

Public variable

uint32

 

CombinedInputTypes

Public variable

uint32

 

CombinedOutputTypes

Protected variable

EMaterialFuncti...

 

MaterialFunctionUsage

The intended usage of this function, required for material layers.

Public variable

FGuid

 

StateId

Used by materials using this function to know when to recompile.

Public variable

TObjectPtr< cla...

 

ThumbnailInfo

Information for thumbnail rendering

Constructors

Name Description

Public function

UMaterialFunctionInterface

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

FMaterialHLS...

 

AcquireHLSLTree

(
    FMaterialHLSLGenerator& Generator
)

Public function Virtual

int32

 

Compile

(
    FMaterialCompiler* Compiler,
    const FFunctionExpressionOutput& O...
)

Public function Virtual

void

 

ForceRecompileForRendering

(
    FMaterialUpdateContext& UpdateCont...,
    UMaterial* InPreviewMaterial
)

Public function

void

 

GetAllExpressionsOfType

(
    TArray< ExpressionType* >& Ou...,
    const bool bRecursive
)

Get all expressions of the requested type, recursing through any function expressions in the function

Public function Virtual

UMaterialFun...

 

GetBaseFunction()

Public function Virtual Const

const UMater...

 

GetBaseFunction()

Public function Virtual Const

void

 

GetDependentFunctions

Returns an array of the functions that this function is dependent on, directly or indirectly.

Public function Virtual Const

const FStrin...

 

GetDescription()

Public function Virtual Const

const TArray...

 

GetFunctionExpressions()

Public function Virtual Const

void

 

GetInputsAndOutputs

(
    TArray< struct FFunctionExpressionI...,
    TArray< struct FFunctionExpressionO...
)

Public function Virtual

EMaterialFun...

 

GetMaterialFunctionUsage()

Public function

bool

 

GetNamedParameterOfType

(
    const FHashedMaterialParameterInfo ...,
    ExpressionType*& Parameter,
    UMaterialFunctionInterface*...
)

Finds the first matching parameter by name and type

Public function Virtual Const

bool

 

GetParameterOverrideValue

(
    EMaterialParameterType Type,
    const FName& ParameterName,
    FMaterialParameterMetadata& OutVal...
)

Public function Virtual

UMaterialInt...

 

GetPreviewMaterial()

Public function Virtual Const

bool

 

GetReentrantFlag()

Public function

bool

 

HasAnyExpressionsOfType()

Get all expressions of the requested type, recursing through any function expressions in the function

Public function Virtual Const

bool

 

HasFlippedCoordinates()

Checks whether a Material Function is arranged in the old style, with inputs flowing from right to left

Public function Virtual

bool

 

IsDependent

(
    UMaterialFunctionInterface* Ot...
)

Public function Virtual Const

bool

 

IterateDependentFunctions

(
    TFunctionRef< bool...
)

Iterates all functions that this function is dependent on, directly or indrectly.

Public function Virtual

void

 

LinkIntoCaller

(
    const TArray< FFunctionExpressionIn...
)

Public function

bool

 

OverrideNamedFontParameter

(
    const FHashedMaterialParameterInfo ...,
    UFont*& OutFontValue,
    int32& OutFontPage
)

Public function

bool

 

OverrideNamedRuntimeVirtualTextureParameter

(
    const FHashedMaterialParameterInfo ...,
    URuntimeVirtualTexture*& OutVa...
)

Public function

bool

 

OverrideNamedScalarParameter

(
    const FHashedMaterialParameterInfo ...,
    float& OutValue
)

Public function

bool

 

OverrideNamedStaticComponentMaskParameter

(
    const FHashedMaterialParameterInfo ...,
    bool& OutR,
    bool& OutG,
    bool& OutB,
    bool& OutA,
    FGuid& OutExpressionGuid
)

Public function

bool

 

OverrideNamedStaticSwitchParameter

(
    const FHashedMaterialParameterInfo ...,
    bool& OutValue,
    FGuid& OutExpressionGuid
)

Public function

bool

 

OverrideNamedTextureParameter

(
    const FHashedMaterialParameterInfo ...,
    UTexture*& OutValue
)

Public function

bool

 

OverrideNamedVectorParameter

(
    const FHashedMaterialParameterInfo ...,
    FLinearColor& OutValue
)

Public function Virtual

void

 

SetReentrantFlag

(
    const bool bIsReentrant
)

Public function Virtual

void

 

UnlinkFromCaller()

Public function Virtual

void

 

UpdateFromFunctionResource()

Public function Virtual

void

 

UpdateInputOutputTypes()

Public function

bool

 

UpdateParameterSet

(
    ParameterType& Parameter
)

Returns if any of the matching parameters have changed

Public function Virtual

bool

 

ValidateFunctionUsage

(
    FMaterialCompiler* Compiler,
    const FFunctionExpressionOutput& O...
)

Overridden from UObject

Name Description

Public function Virtual Const

void

 

GetAssetRegistryTags

(
    TArray< FAssetRegistryTag >& OutTa...
)

Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInitProperties()

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

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Deprecated Functions

Name Description

Public function Const

void

 

GetAllParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds,
    const FMaterialParameterInfo& InBa...
)

Use GetAllParameterInfoOfType or GetAllParametersOfType