Script running perfectly fine in preview mode, but not updating during the build

Hi All,

I have a script UFSMGui, that represents the HUD of the player. When I run it in preview mode, it runs perfectly fine. However, when I build the scene and try to run it, the HUD reflects a much older version of the same script. Any ideas on what could be causing this?

I have tried reimporting, refreshing, even changing the script repeatedly, and nothing works. The preview is absolutely perfect so its hard to determine where I'm going wrong. No errors in the debug log either.


I struggled with this same bug myself. I. Found the solution was to delete all older builds and their data. If you have numerous builds or previous ones, some reason it will mess up current builds. Just get rid of the previous applications and their data in your asset folder.