UKismetMathLibrary::Or_IntInt
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Bitwise OR of two integers (A | B). Used to set specific flag bits without disturbing the rest.
Caveats & Gotchas
- • OR-ing can only set bits — it can never clear them. Use And_IntInt with a negated mask (via Not_Int) to clear bits.
- • Like all Kismet bitwise functions, this operates on signed int32. Setting the sign bit (bit 31) will cause the result to appear as a large negative number, which may surprise Blueprint users who see -2147483648 instead of 2147483648.
Signature
static UE_INL_API int32 Or_IntInt(int32 A, int32 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | int32 | First operand. | — |
| B | int32 | Second operand (typically the bits to set). | — |
Return Type
int32 Example
Set a status flag C++
const int32 FLAG_BURNING = 0x08;
StatusFlags = UKismetMathLibrary::Or_IntInt(StatusFlags, FLAG_BURNING); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?