Whenever I save my script in Visual Studios, I go into Unity and it decides not to update to the new version I just compiled. So yeah my scripts are not updating in Unity (2017.1), the only fix I found was to restart my computer several times and eventually it will update.
Never had this problem with Unity 5.6(or any previous version), this started only after I updated to Unity 2017 a month or so ago. I tried looking through the Unity forums for a fix but nothing seems to fix it:(
What might be causing this problem? I thought I could just forget about it, but I canât, Its KILLING ME!
The âAuto refreshâ is already checked. I unchecked it, closed unity and rechecked it, closed unity again and it didnât fix it.
when I reimport the script it doesnât update it either.
No there are no compile errors, but looking through that thread, looks like they have a possible fix in an upcoming patch (2017.1.1f2), I guess Iâll just hold off on Unity until then and work on my networking:) Thanks!
Managed to figure out that my build was building correctly (the usual scripts used by others to show a loading bar showing synced values as integers as the bar loads does not work I had to use a different round method which was bizzar, the Mathf.RoundToInt(Value * 100) +â%â however there is an issue with the animator not displaying correct state changes. E.g. from and Idol to death state the death animation plays repeatedly (even with loop turned off on the animation). To by pass this as a poor workaround I have hashed out the animator bool on the script. I still have not found out why this should play fine in the game window but not in the build; does there need to be a script line to force back to the âavatarâ from the animation mode? (But I donât think this is for this thread).
I know Iâm late to the party but Iâve had this same problem. For me saving the script updates it to Unity. I do have Auto Refresh on, but it doesnât seem to be working.
If that happens and you have Edit->Preferences->Auto-refresh on.
If the script is actually showing up in Unity updated but not working as expected to go to the GameObject where the script is attached and right click on the script component choosing the reset option.
It will work. Here is a video showing step by step.
Same problem. The scripts compile, and the changes even show up in the code preview in the inspector, but when I hit play, it runs like it hasnât updated. Only way I can get it to respond to changes in my code is by closing the Unity editor and reopening it.
I had the same problem. It turned out that when I copied my script (A.cs, class A) to create a new script(B.cs), I renamed the old class (A.cs, class B) leaving the old class name to the new script (B.cs, class A)
fixed when I fixed the class names to match the filenames
I have the same problem, have even run debugger to see if everything was doing what it is supposed to do and it is. The editor is not updating the values in the editor in play mode. The debugger is showing they actually changed. I have auto refresh on and have restarted laptop and unity several times. I also have reimported everything and reset the scripts themselves to no avail. They are mono scripts showing a serialized class with a string and a set of Vector2âs thatâs all.
The only solution i Found was to make the variables constant but it wonât show up on the inspector, otherwise it will always compile and change. Do it only for the constant values in your projects
Edit : The other one is if you donât want to make your variable constant, then youâll have to click on the 3 dots of your component and then click reset, it resets the values to the newest ones in the script, the downside is it also resets the values of other parameters, such as linked scripts, rigidbody, etc.