Creating a Singleton from a C++ blueprint class

Does any documentation exist about spinning up a Singleton thread from a Blueprint class in C++? I’ve been looking into FThreadSingleton, and TThreadSingleton but haven’t had any luck finding some good examples of using these online.

Essentially my singleton class is intended to handle communications with external systems where one or more blueprint instances can be feeding it.

Steps to Reproduce
N/A

Hello Jerry,

There’s less information on singletons in the documentation because Unreal has its own approach to singletons called Subsystems.

These are automatically managed by Unreal, and should satisfy your project’s needs.

Here is a great guide on how these subsystems work, alongside their own pros and cons (and why singletons in Unreal are not recommended).

This site also has a good example of a way a C++ singleton could be implemented. Though just like the other page, highly recommends against it.

Let me know if this is helpful!

Thanks,

Kyle B.

Thanks Kyle. I think the Subsystems approach may be what I was looking for.

Glad to help!

If you have any other questions feel free to ask them here. I will be closing this case for the time being.

Thanks,

Kyle B.