UKismetMathLibrary::Add_IntInt
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Adds two integers and returns the sum. The default B=1 makes it a convenient increment node in Blueprint graphs.
Caveats & Gotchas
- • No overflow protection: INT_MAX + 1 wraps to INT_MIN silently. Use int64 or checked arithmetic when summing values that could approach 2.1 billion.
- • The default B=1 is invisible in Blueprint unless you inspect the node — a disconnected B pin silently adds 1, which can cause subtle bugs when B is intentionally 0.
Signature
static UE_INL_API int32 Add_IntInt(int32 A, int32 B = 1); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | int32 | First operand. | — |
| B | int32 | Second operand. | 1 |
Return Type
int32 Example
Counting kills C++
KillCount = UKismetMathLibrary::Add_IntInt(KillCount, 1); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?