Hey, I’m running into a consistent problem when debugging my scripts.
I will make a change to an input script, save it, reset, and test it in the editor’s Play Mode and it will work fine.
However, once I build it (I’ve tried web player, streamed, and windows standalone), the changes are gone and I’m still playing the previous version.
Anyone have this issue? Know something that I’m missing?
Thanks!
Welcome to the forums and to Unity!
If you’re playing your content in the editor and making changes in the inspector for scripts you’ve attached, then those changes will be thrown out once you stop playback (and thus not be present in your build).
Hey, thanks for your quick reply!
Hmm… so I tried again, and didn’t touch play mode this time, but my changes still aren’t working. I’m sure the code is right, it was a simple change. And the changes are still there when I reload my scene.
Are there differences in the ways the editor play mode and final build interpret the scripts? Or something else I’m missing?
Thanks again for your help.
I seem to have fixed the problem, although the exact cause is still mysterious to me.
For some reason, the scripts were not being updated properly. I viewed them in Notepad and the changes hadn’t been applied. So I re-imported them manually in Unity and after that, it seems to be working.
If this is unclear, let me know. In any case I reported the bug and hopefully no one else has this problem.
I’m having a similar issue. The changes to the script in my case are being applied. The changes test properly on the game objects in the editor player, but when built the web player fails to use the updated scripts. Its as if some temp files aren’t being cleaned up internally.
I also tried checking in everything, and checking out from the asset server into a new project. The build issue is still there… ugh. Next is scouring through the player debug logs?