UKismetMathLibrary::EqualEqual_ByteByte
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if byte A equals byte B (A == B). This is the Blueprint equality node for byte variables.
Caveats & Gotchas
- • Equality on bytes that originated from floating-point conversions (e.g. FMath::RoundToInt → uint8) can fail due to rounding; compare with a tolerance or use integer arithmetic throughout.
- • In C++ `A == B` compiles to the same instruction; this function exists purely for the Blueprint visual scripting layer.
Signature
static UE_INL_API bool EqualEqual_ByteByte(uint8 A, uint8 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | uint8 | First value. | — |
| B | uint8 | Second value. | — |
Return Type
bool Example
Matching an enum-backed byte C++
if (UKismetMathLibrary::EqualEqual_ByteByte(TeamID, static_cast<uint8>(ETeam::Red)))
{
// handle red team
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?