RealDocs

UBlueprintMapLibrary::Map_Find

function Engine Blueprint Since unknown
#include "Kismet/BlueprintMapLibrary.h"
Access: public Specifiers: staticBlueprintPureCustomThunkBlueprintThreadSafe

Description

Looks up the value associated with a key in a map, writing it to Value and returning whether the key was found.

Caveats & Gotchas

  • Value is default-constructed (not left untouched) when the key isn't found, so downstream logic that ignores the returned bool will silently read a default value rather than any prior contents of Value.
  • The int32 types shown here are wildcard placeholders — CustomThunk resolves the real map, key, and value types from the Blueprint VM stack at the call site.

Signature

static bool Map_Find(const TMap<int32, int32>& TargetMap, const int32& Key, int32& Value);

Parameters

Name Type Description Default
TargetMap const TMap<int32, int32>& The map to perform the lookup on. Wildcard placeholder.
Key const int32& Wildcard key to look up.
Value int32& Receives a copy of the value associated with Key, or a default-constructed value if the key was not found.

Return Type

bool

Example

Look up a value by key C++
TMap<FName, int32> Scores;
Scores.Add(TEXT("Player1"), 100);
if (const int32* Found = Scores.Find(TEXT("Player1"))) // native TMap::Find — the direct C++ equivalent of the Map_Find Blueprint node
{
	const int32 Score = *Found;
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.