I’ve been trying to figure this out for a very long time now. Like, weeks. Anyways, the issue I’m running into is when I load a small scene with an NPC using a NavMesh component on top of a NavMesh surface, the NPC gets totally messed up. This ONLY happens in builds of the game, too. This does not happen within the Unity inspector. Here are the things affected in the NPC:
- The spawn location of the NPC is completely off, and seemingly random. It always spawns off of the map and way off in the distance, too.
- The health is somehow affected by this, because the NPC spawns in with only 100 health compared to its normal amount.
- The AI Conversant component on the character changes its dialogue to the last dialogue I had open, regardless of whom it was with (could have been a completely different person in a different scene).
I’m completely lost, and I have no idea where to start when it comes to fixing this issue. I’ve already tried raising the character up a little bit above the NavMesh surface, but that didn’t seem to have an effect. I’ve also already figured out that I could just warp the NPC back to its intended location, and that’s fine, but the health being changed is weird, and the dialogue is the biggest issue with this because it prevents me from progressing in the game. Any ideas on how this could work?