I have UI widgets that call on the GameMode in order to display information about the game. When I run my game in the editor, everything works fine. When I package my game and run the executable, the widgets don’t display proper data (or any data at all). After digging into it, I’ve found that the order of BeginPlay() calls differs between playing in-editor and in an exe – the left image are a series of debug messages for BeginPlay() calls when running in the editor. The one on the right is running in a packaged exe. Order is from bottom to top. The one in green is the GameMode’s BeginPlay() –
Note that the GameMode’s BeginPlay() fires first when playing in the editor, but fires last when playing in the executable. So, the reason why my widgets look wrong in the exe is because they’re trying to grab data that doesn’t exist because the GameMode hasn’t fired its BeginPlay() yet. Now, I think I know how I’m going to handle this discrepancy between editor and exe, but I’m curious as to why this difference is happening in the first place. Why would the order of BeginPlay() calls change for a packaged exe?