UBlueprintMapLibrary::Map_Length
#include "Kismet/BlueprintMapLibrary.h"
Access: public
Specifiers: staticBlueprintPureCustomThunk
Description
Returns the number of key/value pairs currently stored in the map.
Caveats & Gotchas
- • Backs the Blueprint 'Length' node (searchable via the num/size/count keywords); in C++ call TMap::Num() directly instead of this wildcard wrapper.
- • O(1) — reads the map's cached element count rather than counting entries on each call.
Signature
static int32 Map_Length(const TMap<int32, int32>& TargetMap); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| TargetMap | const TMap<int32, int32>& | Wildcard placeholder for the map in question. | — |
Return Type
int32 Example
Get entry count C++
TMap<FName, int32> Scores;
Scores.Add(TEXT("Player1"), 100);
int32 Count = Scores.Num(); // native TMap::Num — the direct equivalent of the Map_Length node Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?