UKismetMathLibrary::NotEqual_BoolBool
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns true if the two boolean values are not equal — i.e., one is true and the other is false. This is the Blueprint '!=' operator for booleans and is mathematically equivalent to XOR.
Caveats & Gotchas
- • NotEqual_BoolBool and BooleanXOR produce identical results for boolean inputs. They exist as separate nodes for Blueprint readability — use whichever conveys intent more clearly in the graph.
- • In C++ use '!=' or '^' directly; this function exists primarily for Blueprint graph exposure.
Signature
static UE_INL_API bool NotEqual_BoolBool(bool A, bool B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | bool | First boolean operand. | — |
| B | bool | Second boolean operand. | — |
Return Type
bool Example
Detect when two states diverge C++
if (UKismetMathLibrary::NotEqual_BoolBool(bWasVisible, bIsVisible))
{
OnVisibilityChanged();
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?