UKismetMathLibrary::LinearColor_Set
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Overwrites a LinearColor variable with the contents of another. This is the Blueprint-friendly equivalent of a direct assignment, since Blueprint cannot assign struct variables directly via the = operator on a reference.
Caveats & Gotchas
- • The function mutates InOutColor in-place via UPARAM(ref). In Blueprint this shows as a pass-by-reference pin; forgetting to wire a variable (instead of a literal) will silently do nothing.
- • This is a pure copy — it does not perform any color-space conversion. If InColor is in HSV or sRGB space, the stored values will be wrong unless you convert first.
Signature
static UE_INL_API void LinearColor_Set(UPARAM(ref) FLinearColor& InOutColor, FLinearColor InColor) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InOutColor | FLinearColor& | The color variable to overwrite in-place. | — |
| InColor | FLinearColor | The source color whose values are copied into InOutColor. | — |
Return Type
void Example
Copy one LinearColor into another C++
FLinearColor Target = FLinearColor::White;
FLinearColor Source = FLinearColor(0.2f, 0.8f, 0.4f, 1.0f);
UKismetMathLibrary::LinearColor_Set(Target, Source);
// Target is now (0.2, 0.8, 0.4, 1.0) See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?