RealDocs

UKismetMathLibrary::BooleanNAND

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

Description

Returns false only when both A and B are true; returns true in all other cases (logical NOT AND). Use when you need to allow an action unless two conditions are simultaneously true.

Caveats & Gotchas

  • NAND is equivalent to NOT (A AND B), not to (NOT A) AND (NOT B) — a common point of confusion. Only the case where both inputs are true produces false.
  • Like BooleanAND, this node does not short-circuit in Blueprint graphs — both inputs are always evaluated.

Signature

static UE_INL_API bool BooleanNAND(bool A, bool B);

Parameters

Name Type Description Default
A bool First boolean operand.
B bool Second boolean operand.

Return Type

bool

Example

Allow movement unless both brakes and reverse are engaged C++
bool bCanMove = UKismetMathLibrary::BooleanNAND(bBrakeEngaged, bReverseEngaged);

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.