Steps to reproduce:
- Create a new level that is not Empty
- Create a GameMode BP
- Hook up the GM’s ConstructionScript to the default print string action
- Set the World Settings Game Mode for PIE to the GameMode BP
- Press Simulate
- The ‘Hello’ statement will be printed twice
Retrying the same on an Empty level will cause it to be called and printed only once. I’m trying to see what’s different about the Empty level compared to the Default or Primitives levels to make it be called twice, but I can’t discover why.
I should probably be using the InitGame event on the GM instead of using its constructionscript, but since I cannot find it in the graph palette, I am guessing the InitGame event is not exposed in the GM’s event graph.
The documentation about GM BPs seems to suggest they are only good for setting the defaults and offer no hints on how to use them for game initialization. I guess another good place for game initialization is the Persistent Level’s Level BP, so I probably will end up using that.