Creation of UObjects outside the game thread

This tutorial explains how to properly create UObject asynchronously, including clean-up of the Async flag and other GC caveats.

The tutorial is using UTexture2D as example, but the Async flag is automatically set in any UObject created outside the GameThread. See UObjectBase::AddObject. This function is called on the constructor of UObjectBase, so it’s not only for UTexture2D.

The tutorial also mentions issues that existed in UE4 but are fortunately fixed in UE5. And, indeed, I’m not having problems with async UObjects on a UE5 project.

1 Like