Add

Adds a key-value pair to a Map.

Choose your operating system:

Windows

macOS

Linux

Map_AddNode.png

The Add node adds a key and a value (key-value pair) to a Map, thereby increasing the length of the Map. When adding a key-value pair to a Map, the node checks whether the added key is equal to an existing key in the Map. If the new key is equal to a key that's already in the Map, the existing value associated with the key will be overwritten with the new value. After this node has completed its operation, the key is guaranteed to be associated with its corresponding value until a subsequent mutation of the Map.

Inputs

Pin Location

Name

Description

Map_AddNode_1.png

(In) Exec

Input execution pin.

Map_AddNode_2.png

Target Map

The Map that you want to add a new key-value pair to.

Map_AddNode_3.png

Key

The key being used to lookup a value in the Map.

If the same key already exists, the existing value associated with the key will be overwritten.

Map_AddNode_4.png

Value

The value being stored in the Map for subsequent retrieval.

Outputs

Pin Location

Name

Description

Map_AddNode_5.png

(Out) Exec

Output execution pin.

Map_AddNode_6.png

Boolean Return Value

If the value was added, the node returns true. Otherwise, if the key was already present, resulting in its associated value being overwritten, the node returns false.

Example Usage

Map_AddUsage.png

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss