FGantryHandle
A handle to a record a Gantry system keeps for you, which can tell when that record is gone.
A plain index goes stale silently: slot 7 is freed, slot 7 is reused, and the old index now points at a different record. A handle also carries the slot's generation (Serial), which the owner bumps each time the slot is freed. A handle to a freed record therefore no longer matches, and the system that issued it can tell the handle is stale.
Treat a handle as opaque: keep it, pass it back to the system that gave it, and compare handles. IsValid only says the handle points at a slot at all. Only the issuing system can say whether the record is still live.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
Index read-only | int32 | -1 | Slot in the owning array, or INDEX_NONE for an invalid handle. |
Serial read-only | int32 | 0 | Generation of the slot when the handle was issued. A mismatch with the slot means stale. |
C++
Public C++ members that Blueprint does not see.
FGantryHandle
An invalid handle, addressing no slot.
FGantryHandle
A handle to a specific slot and generation.
Normally made by the array's owner, not by callers.
InIndex:Slot in the owner's array.
InSerial:The slot's generation at the time the handle was issued.
IsValid
bool
True when the handle addresses a slot.
Says nothing about whether that slot is still live.
Reset
void
Makes the handle invalid, addressing no slot.
operator==
bool
True when both handles address the same slot in the same generation.
operator!=
bool
True when the handles differ in slot or generation.
ToString
FString
"[7:3]" or "[invalid]".