Getting "Creating UObjects while Collecting Garbage is not allowed!" when dispatching lambda in a separate thread

It’s not safe to create UObjects on any thread other than the Game thread or the Async Loading thread.

The solution would be to create the UObject on the Game Thread, and prevent it being GC’d until your thread has done whatever other work it needs to do.

2 Likes