How to extract an element by index from an Array in Unreal Engine

- by

I know how to get an element by its index from an array in C, but I had no idea how this simple feat would work in Unreal Engine Blueprints. Turns out it’s a simple Get Node, however drawing it out and finding it is not so simple. Consider this code, which takes the first element in an array and promotes it to a variable:

Really not that difficult: grab element at index 0 (the first one). But how do we end up here? Here’s how: drag out from the array (9 little blue dots icon) and search for “get copy”.

Pick the Get (a copy) node under Utilities – Array. Now specify the index as an integer on the green pin, or pop in a variable. Easy and complicated at the same time 😁

Add your voice