Follow

Classic C++ static singletons are a huge pain in the butt in .
❌Require care to work in-editor and with with class default objects.
Instead have you considered using 🌠Subsystems✨?
♻Clear lifecycle
🗺Clean Blueprint & Python interface
benui.ca/unreal/subsystem-sing

@_benui We started using them recently.
Still needed a couple of tweaks but definitely better than singletons :)
We're replacing all the managers we had in Sifu by subsystems for game flow, debug tools etc

@booblito oooh you worked on Sifu?? I forgot that was Unreal Engine :o

@_benui The AIModule has a readme about design patterns of when they use subsystems and the scope (world, game, etc.) based on intended usage.

Sign in to participate in the conversation
Gamedev Mastodon

Mastodon server focused on game development and related topics.