My game works just fine in PIE or New Editor Window mode, however I tried it for the first time in Standalone mode today and several components are missing from some of my actors.
I use Text Renders on my units (this is a top-down tactical game) to display some info like their name, etc, as well as a UMG widget component as health bar.
I also use boxes and capsules on my units to detect overlaps with the tiles on the ground, and mouseover events.
All of these components appear to get deleted when I boot the game in Standalone Game mode. The only thing that remains is the mesh.
- My actors are spawned by my level blueprint on Begin Play
- I have made sure my default GameMode, GameState, etc are set in both World Settings and Project Settings
- All of the components on my unit are changed in some way by variables on the unit, but I have tried adding a new text render component that does not get changed and it was still getting destroyed in Standalone.
- I tried reproducing this by adding a component to the Top-Down Template character in a new project and the component showed up correctly.
One thing I have noticed while trying to figure this out (by getting the Display Name of all my components and printing them on screen) is that there’s a difference between units spawned via blueprint, and units that were placed in the map directly:
This is from Play in New Editor Window. You can see that both the Scout (placed manually) and the Grunt (spawned by the level blueprint) have all their components.
However, in Standalone Game, the Scout’s components show ‘TRASH’ in their name, and the Grunt has lost all its components. Visually, all the components are gone from both units.
What could be causing this?