Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?
    Twitter

  • #2
    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.

    Comment


    • #3
      That's works really nice, thanks!

      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"

      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.
      Twitter

      Comment

      Working...
      X