RealDocs

UKismetMathLibrary::BooleanAND

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

Description

Returns true only when both A and B are true (logical AND). In Blueprints this is the 'AND Boolean' node and supports the CommutativeAssociativeBinaryOperator meta, allowing multiple inputs on a single node.

Caveats & Gotchas

  • The CommutativeAssociativeBinaryOperator meta tag means Blueprint will auto-collapse multiple sequential AND nodes into a single multi-input node. This is a Blueprint editor behaviour only — in C++ you get normal two-operand evaluation.
  • Blueprint's AND node does NOT short-circuit: both input pins are evaluated before the result is computed. If you need short-circuit behaviour, use a Branch node chain instead.

Signature

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

Parameters

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

Return Type

bool

Example

Check both conditions before proceeding C++
bool bCanInteract = UKismetMathLibrary::BooleanAND(bPlayerInRange, bObjectActive);

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.