- Home /
Prefab "Disappears" On Game Restart [Fixed!]
In my scene are several instances of a prefab which contains an FBX file exported from Blender. It's just a mesh, nothing fancy. The prefab was rotated on the X axis to align properly with the world, and it was scaled up by 5 on xyz.
Whenever I ran the game for the first time, they appeared in place, as expected.
If I were to stop the game and immediately restart, they would all "disappear". Actually, on investigating, they were teleported to the origin and scaled down to 1, but the impact was the same. There were no error messages.
I thought the issue was a script I had attached to it, because for a while the only way I could get them to show up properly was by resetting the script component and saving the scene.
As it turns out, though, the prefab still had an animation component left over from the FBX export. I'm not sure why, but removing that from the prefab resolved the issue.
I'm unsettled that the game does not load into the same state every time. This was a visible bug, and therefore easy to notice and track down, but what else could be lurking under the hood? shudder