Components deleted from actor in Standalone/Packaged Game
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.
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?
asked Jan 03 '15 at 03:15 AM in Packaging & Deployment
Well after a lot of debugging, the answer was fairly simple once I took a better look at the logs.
It seems that Play In Editor will let a lot of errors go through, that Standalone will not. There was a problem in one blueprint that I don't really use but that my Unit blueprint had an unused reference to. PIE did not seem to care about this reference and would compile the Unit BP anyway, but Standalone would fail to compile the Unit BP because of the error and so it wasn't so much that my components were getting deleted, but that the BP wasn't even being compiled at all.
answered Jan 04 '15 at 02:46 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here