RealDocs

UCurveLinearColor

class Engine Blueprint Since 4.0
#include "Curves/CurveLinearColor.h"

Description

A curve asset with four channels (R, G, B, A) that returns an FLinearColor when evaluated. Use for animating material parameters, UI colors, light colors, or any RGBA value over time.

Signature

class UCurveLinearColor : public UCurveBase

Caveats & Gotchas

  • Values are in linear color space, not gamma-corrected sRGB. If you're driving a material parameter, ensure the material interprets the value correctly.
  • Sample with GetLinearColorValue(Time).
  • For struct-embedded color curves, use FRuntimeCurveLinearColor.

Example

Drive a dynamic material color over time C++
UPROPERTY(EditDefaultsOnly)
UCurveLinearColor* FlashCurve;

void Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);
    FlashTime += DeltaTime;
    if (FlashCurve && DynamicMaterial)
    {
        FLinearColor Color = FlashCurve->GetLinearColorValue(FlashTime);
        DynamicMaterial->SetVectorParameterValue(TEXT("EmissiveColor"), Color);
    }
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.