Any way to spawn an actor from plugin at the game start?

I’d love to spawn manager object as actor (i.e. it could receive input events) directly from plugin’s module.
Is there any event in module’s logic allowing to perform operation while the game is starting?

You can register a callback to one of the events in the FWorldDelegates class. Do it in the StartupModule method of your plugin’s module.

That’s works really nice, thanks! :slight_smile:

Just one more small question here… Spawned actor belongs to the world, right? And should be destroyed when world is being changed.
Is it any clean way to keep this actor? What would be best practice here if I spawn it from module? Maybe there’s better way to manage such singleton.
I just started digging into C++ with UE4 and I hope question is “silly and easy” :slight_smile:

What’s I’m try to achieve is to have my custom actor serving as UI manager, available during entire game. For now I’m using a HUD instance (that one managed by game mode) to be my UI Manager, but I’d like to move it to its own class. It needs to be an actor so I can read input there.