Hey everybody. This is a weird one, and I had trouble picking out how to put a title on this question.
Our playful sports game uses destructible meshes for our goals — think of “breaking the backboard” and you’ll get the idea of what we’re doing when goals are scored. Over the past week, we’ve been running into this severe and strange destructible mesh bug that is ruining our goals, even though we’ve only been working on other systems during that time — that is, we haven’t touched the way the goals function since our last playtest 9 days ago, and everything was working fine then.
In short, the issue is, in packaged builds, the goal’s destructible mesh spawns in looking like it’s already shattered — or, in more technical terms, it spawns in displaying depth 1 along with depth 0. Even so, the depth 1 chunks are not simulating as they would be if the mesh were actually shattered. Rather, the chunks remain in place, just oddly occupying the same space as the depth 0 mesh (which is hard to see as a result). In this state, any attempt to apply damage to the destructible mesh and cause it to actually shatter/simulate fails silently, meaning the chunks won’t fall or respond to physics interactions — they just hang there, ugly and useless. Worse, any attempt to “reset” the destructible mesh by calling Set Destructible Mesh
(which is how we’ve been resetting the goal after each score for a long time now) will, in this invalid state, crash the game.
Complicating matters, as this question’s title implies, the issue only appears in packaged builds. Play-in-Editor does not express the problem, which makes this one particularly annoying to troubleshoot. (Lots of experimental packaging.)
We had such trouble with this issue by mid-last week, that we opted to roll the project back several days just to get rid of it. The rollback solved the problem for a time, but it has since reappeared. Again, the work we’ve done over that time has not involved the goal’s destructible mesh, or even the goal BP itself — we’ve been working on art and UI assets for the most part.
I tried upgrading engine versions to the latest, 4.24.1, and that did not solve the issue.
Here’s what the issue looks like in PIE versus in the packaged-build:
(The apparent “reflection” in the second image is due to the shattered pieces using a refractive material.)
Again, prior to this past week, we had never seen this issue before. So far, I’ve tried using different destructible meshes, including re-importing and re-creating the desired DM from scratch — this did not solve the issue. I’ve searched the internet high and low for similar issues without any real luck. I’m stumped!
I suspect the issue must have something to do with our project, because migrating the busted DM to a new fresh project seems to work fine. But it also seems to be very temperamental, coming and going at different times and affecting different DMs all throughout my troubleshooting attempts last week. (Hence why we gave up and rolled back the entire project once already.)
Any suggestions for what to try next, or tips of any sort would be appreciated. We’ve got an event coming up very soon and we’d love to feel confident that everything will work as it should during the show!
Thanks for any help!