Hi,
I am making a Local Player Subsystem, where it initializes a system of a type. I have made it so I can define the specific type in a blueprint, but if I don’t open that blueprint before I play my game in editor the local player subsystem doesn’t load.
Are Blueprint class Local Player Subsystems supported like how traditional Local Player Subsystems are supported where once they are defined they should be created on the local player by an underlying system?
Thing to note: if I have a class reference in an object such as the player controller or game instance, this blueprint local player subsystem will load.
Hey there, Blueprint subsystems aren’t supported. Subsystems are meant to be made native only.
The fact that loaded blueprint subsystems are picked up at SubsystemCollection.Initialize() is called at start-up is a side-effect - the engine makes no effort to load unloaded blueprint assets that represent subsystems or to initialize them later when they get loaded.
zhi kang is right, a plain blueprint class posing as a local player subsystem only registers if the asset happens to be loaded already, the subsystem collection walks the cerated classes at start-up and makes no promise about bp assets that never got referenced. that is also why your player controller reference makes it work, you accidentally pulled the asset in.
the reliable route is keeping the base native so the engine creates it, while authoring your logic as a blueprint child class. Blueprint Subsystems Bridge, a blueprint subsystem plugin for Unreal Engine 5, ships those bases: inherit from its BP Local Player Subsystem and it gets created on each local player automatically like a native one, no C++ and no loading dance: Blueprint Subsystems Bridge — Game Instance, World, Engine & Player Subsystems | Fab