Do List<T> and queue<T> exist in blueprints?

Maybe it has another name, but I am struggling to find the equivalent in blueprints.
I come from Unity and I am used to manage Lists and Queues to manage classes or variables (like an enemy pool or the steps of a Simon-like Game).

Please, comment if you know something about it. Thanks in advance :slight_smile:

You already have template variants of queue called TQueue and Lists in unreal are called TList. Both are abstract classes that are templated and can hold specific classes.

You can define for instance TQueue<AActor*> actorQueue;

From what I know they are not exposed to blueprints though (will cause a compile error). You would have to keep this portion of the code in c++.
You can expose TArrays though.

You can also leverage TSubclassOf in TArrays
example

TArray<TSubclassOf<ACharacter*>> MyCharacters

MyCharactersArray can contain all classes that derive from ACharacter (and ACharacter implementations too)

To have a larger mixed List you can pass in UObject that is the basis for nearly all instatiable classes.

1 Like

Didn’t want to get into C++, but I guess I’ll have to.
Thanks for the quick and clear answer

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.