RealDocs

UKismetMaterialLibrary::GetVectorParameterValue

function Engine Blueprint Since unknown
#include "Kismet/KismetMaterialLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallable

Description

Reads the current value of a vector (FLinearColor) parameter from a Material Parameter Collection instance. Logs a warning and returns black if ParameterName doesn't exist.

Caveats & Gotchas

  • Despite the name, the return type is FLinearColor, not FVector — treat it as an RGBA color, including HDR values outside the 0-1 range.
  • Returns FLinearColor::Black without a visible error if ParameterName is invalid — check the log to confirm the parameter exists on the collection.
  • Values reflect the current world's collection instance, which can differ from the collection asset's authored defaults once SetVectorParameterValue has been called at runtime.

Signature

static ENGINE_API FLinearColor GetVectorParameterValue(UObject* WorldContextObject, UMaterialParameterCollection* Collection, FName ParameterName);

Parameters

Name Type Description Default
WorldContextObject UObject* World context used to resolve the current world's collection instance.
Collection UMaterialParameterCollection* The Material Parameter Collection asset containing the vector parameter.
ParameterName FName Name of the vector parameter to read, as defined on the collection.

Return Type

FLinearColor

Example

Read back an MPC color parameter C++
const FLinearColor FogColor = UKismetMaterialLibrary::GetVectorParameterValue(this, WeatherCollection, TEXT("FogColor"));

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.