RealDocs

UKismetMathLibrary::NotEqual_LinearColorLinearColor

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns true if A and B differ on any channel (A != B). This is the Blueprint != operator for LinearColor.

Caveats & Gotchas

  • Like EqualEqual_LinearColorLinearColor, this uses exact floating-point comparison — two colors that should be "the same" after arithmetic operations may still return true here due to floating-point error.
  • Checking inequality before branching on a color is a code smell in most gameplay contexts; prefer a tolerance-based check with LinearColor_IsNearEqual.

Signature

static UE_INL_API bool NotEqual_LinearColorLinearColor(FLinearColor A, FLinearColor B);

Parameters

Name Type Description Default
A FLinearColor First color.
B FLinearColor Second color.

Return Type

bool

Example

Dirty-check before applying a material update C++
if (UKismetMathLibrary::NotEqual_LinearColorLinearColor(CachedColor, NewColor))
{
    CachedColor = NewColor;
    DynamicMaterial->SetVectorParameterValue(TEXT("Tint"), NewColor);
}

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.