Unreal Engine Blueprints Managing Data Structures 3 — Questions and Answers
Question 1: In a Blueprint Struct, what must you do before modifying an individual member variable of a struct stored inside an array?
- Copy the struct out, modify it, then set it back with 'Set Array Elem' (Correct answer)
- Use 'Get Array Elem' and modify it directly via reference
- Structs inside arrays are read-only and cannot be modified
- Call 'Break Struct' and rebuild the array from scratch
Correct answer: Copy the struct out, modify it, then set it back with 'Set Array Elem'
Blueprint arrays of structs pass by value, so you must get a copy, modify it, and write it back using 'Set Array Elem'.
Question 2: What is the purpose of the 'Intersection' node when working with Blueprint Sets?
- Combines two sets into one larger set with all unique elements
- Returns only elements that appear in BOTH sets (Correct answer)
- Removes elements from set A that are also in set B
- Checks if one set is a subset of another
Correct answer: Returns only elements that appear in BOTH sets
Intersection returns a new Set containing only the elements that are present in both input Sets.
Question 3: Which node allows you to sort a Blueprint Array of floats in ascending order?
- Order Array
- Sort Array
- Array Sort Ascending
- There is no built-in sort node; you must use a custom macro (Correct answer)
Correct answer: There is no built-in sort node; you must use a custom macro
Unreal Engine's Blueprint node library does not include a built-in sort node; sorting requires a custom macro, plugin, or C++ function exposed to Blueprints.
Question 4: When a Blueprint function takes an Array parameter, how is it passed by default?
- By reference, so changes inside the function affect the original
- By value, so a copy is made and the original is unaffected (Correct answer)
- Arrays are always passed as const and cannot be modified
- It depends on whether the array is local or a variable
Correct answer: By value, so a copy is made and the original is unaffected
By default Blueprint function parameters are passed by value (copy), so modifying the array inside the function does not change the caller's array.
Question 5: What does 'Union' do when applied to two Blueprint Sets A and B?
- Returns elements in A that are not in B
- Returns elements present in both A and B only
- Returns all unique elements from both A and B combined (Correct answer)
- Checks whether A and B share any elements
Correct answer: Returns all unique elements from both A and B combined
Union merges two Sets into one Set containing every unique element from both, removing all duplicates.
Question 6: You want to store the top 10 high scores in order. Which data structure best supports this in Blueprints?
- Map with rank as key
- Set of integers
- Array of integers (Correct answer)
- Struct with 10 individual integer fields
Correct answer: Array of integers
An ordered Array lets you maintain score order, insert at specific indices, and access scores by rank position.
Question 7: Which Blueprint node returns TRUE if a Map already contains a specific key?
- Contains Key (Correct answer)
- Has Key
- Is Valid Key
- Find (check the boolean output)
Correct answer: Contains Key
'Contains' (often labeled 'Contains Key' for Maps) returns a boolean indicating whether the given key exists in the map.
In a Blueprint Struct, what must you do before modifying an individual member variable of a struct stored inside an array?