Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Materials
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UMaterialInterface
- UMaterialInstance
- UMaterialInstanceConstant
- ULandscapeMaterialInstanceConstant
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Materials/MaterialInstanceConstant.h |
Include | #include "Materials/MaterialInstanceConstant.h" |
Syntax
class UMaterialInstanceConstant : public UMaterialInstance
Remarks
Material Instances may be used to change the appearance of a material without incurring an expensive recompilation of the material. General modification of the material cannot be supported without recompilation, so the instances are limited to changing the values of predefined material parameters. The parameters are statically defined in the compiled material by a unique name, type and default value.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
FGuid | ParameterStateId | Unique ID for this material instance's parameter set Updated on changes in the editor to allow those changes to be detected |
![]() |
TObjectPtr< class UPhysicalMaterialMask > | PhysMaterialMask | Physical material mask to use for this graphics material. Used for sounds, effects etc. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UMaterialInstanceConstant
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Clear all parameter overrides on this material instance. | |
![]() |
void | CopyMaterialUniformParametersEditorOnly
(
UMaterialInterface* Source, |
Copies the uniform parameters (scalar, vector and texture) from a material or instance hierarchy. |
![]() |
float | K2_GetScalarParameterValue
(
FName ParameterName |
Get the scalar (float) parameter value from an MIC |
![]() |
UTexture * | K2_GetTextureParameterValue
(
FName ParameterName |
Get the MIC texture parameter value |
![]() |
FLinearColor | K2_GetVectorParameterValue
(
FName ParameterName |
Get the MIC vector parameter value |
![]() |
void | SetFontParameterValueEditorOnly
(
const FMaterialParameterInfo& ParameterInfo, |
|
![]() |
void | SetNaniteOverrideMaterial
(
bool bInEnableOverride, |
Set an override material which will be used when rendering with nanite. |
![]() |
void | SetParentEditorOnly
(
UMaterialInterface* NewParent, |
Set the parent of this material instance. |
![]() |
void | SetRuntimeVirtualTextureParameterValueEditorOnly
(
const FMaterialParameterInfo& ParameterInfo, |
|
![]() |
void | SetScalarParameterAtlasEditorOnly
(
const FMaterialParameterInfo& ParameterInfo, |
|
![]() |
void | SetScalarParameterValueEditorOnly
(
const FMaterialParameterInfo& ParameterInfo, |
|
![]() |
void | SetSparseVolumeTextureParameterValueEditorOnly
(
const FMaterialParameterInfo& ParameterInfo, |
|
![]() |
void | SetTextureParameterValueEditorOnly
(
const FMaterialParameterInfo& ParameterInfo, |
|
![]() |
void | SetVectorParameterValueEditorOnly
(
const FMaterialParameterInfo& ParameterInfo, |
Set the value parameters. |
Overridden from UMaterialInstance
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void |
Overridden from UMaterialInterface
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
uint32 | ||
![]() ![]() ![]() |
UPhysicalMaterialMask * | Return a pointer to the physical material mask used by this material instance. |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Called to finish destroying the object. | |
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |