That is a bit confusing, GameModeBase does have BeginPlay in blueprint that works just fine.
ConstructionScript is not the c++ constructor .
Luckily I don’t have to deal much with manually placed things in the current project, I’m not a fan of configuring all kinds of stuff manually in a level. If I have to depend on BeginPlay for all manually placed actors to register themselves to a manager class then the manager will never know when all registrations are “done”, so it will have to start regardless of any registrations. This could be fragile when you have to make sure that registrations are done before you move from stage A to stage B which depends on them. Optimally the manager would spawn them in the first place, no issue there besides that it will make a designer or two furious . Worst case is that you need to scan the entire level per manager for those actors on BeginPlay AND have those actors register themselves. That’s what I’m trying to avoid now, all else looks beautiful. Currently it looks like this if I’d implement a soccer game:
- GameMode holds soccer rules.
- GameInstance holds stages (match, break time, replay, scoreboard).
- GameInstance OnBeginPlay scans for manually placed soccer characters, finds it got all its dependencies required to start a match, starts the match.
- SoccerCharacter registers (unique) itself on BeginPlay at any point to the GameInstance.
In that situation, the GameInstance knows if it’s OK or invalid at the moment of its own BeginPlay, any later registrations are either extra or procedural.
It does require the “GetAllActorsOf…” wherever you need to set up a manager, no way to avoid it I guess. So be it