UCurveLinearColor
#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.
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.
Signature
class UCurveLinearColor : public UCurveBase 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);
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?