Thanks, but that didnt work. What i’m doing to work around it is to use the structure anyway ( because it does compile without the UProperty,) but I also make a function with parameters to access the data. more work but whatever.
Creating a TQueue as a UPROPERTY() is currently not supported, but there are some things you can do if you want to expose it’s functionality and values to Blueprints and Serialization. First and foremost, understand what TQueue’s intended use is for. It is a thread safe concurrent Queue of elements that can be enqueued and dequeued from on multiple threads.
Should give you all the search terms you will need to fully understand its function. If you just want a FIFO or a Stack, using the standard TArray is likely a better option, and more optimal.
Create a USTRUCT() or UCLASS() that will encapsulate the TQueue, for the purposes of illustration this will go over making the USTRUCT()
Ensure that you have the correct specifiers to make this a blueprint struct
Add a TQueue of the desired type as a member, then write several public functions to wrap it’s functions if it is a private member ie. Enqueue(), Dequeue(), IsEmpty(), and Empty()
If it is a public member or you have already exposed the functionality with public functions on your USTRUCT() add a few static UFUNCTION() functions to a blueprint function library to expose it to blueprints.
You are done, your custom USTRUCT can now be interacted with in blueprints the same way c++ iteracts with the TQueue.
Simply ensure you add a TArray UPROPERTY to your custom struct that will hold all of the same data the TQueue holds, then when the serializer looks for data, it can find it there, on deserialization you can find the data from that TArray and enqueue it all to the TQueue at that time.
I hope you found this post illuminating. Please ask any questions you may still have.