RealDocs

UBlueprintSetLibrary::Set_ToArray

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

Description

Copies the contents of a set into an array, useful whenever you need index-based access or a fixed iteration order.

Caveats & Gotchas

  • The resulting array order matches the set's internal iteration order, not insertion order, and is not guaranteed to stay stable across further mutations of the set.
  • In C++, construct the array with TSet::Array() instead of routing through this wildcard node.

Signature

static void Set_ToArray(const TSet<int32>& A, TArray<int32>& Result);

Parameters

Name Type Description Default
A const TSet<int32>& Wildcard placeholder for the source set.
Result TArray<int32>& Output array populated with a copy of every element in A.

Return Type

void

Example

Convert a set to an array C++
TSet<FName> UnlockedLevels = { TEXT("Level01"), TEXT("Level02") };
TArray<FName> LevelArray = UnlockedLevels.Array(); // native TSet::Array — the direct equivalent of the Set_ToArray node

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.