- Home /
How can I get my scripts to update using Unity 2017.3.1f1 and Visual Studio 2017?
I am using Unity 2017.3.1f1 and Visual Studio 2017 to edit my scripts, but when I save them in visual studio they do not update in Unity and use the old scripts instead. They compile and appear changed in Unity (all the code appears the same), but the variable values do not change, I have tried refreshing my assets, deleting the ScriptAssemblies folder, but nothing has worked. Please help!,I am using Unity 2017.3.1f1 and Visual Studio 2017 to edit my scripts, but when I save them in visual studio they do not update in Unity and use the old scripts instead. I have tried refreshing my assets, deleting the ScriptAssemblies folder, but nothing has worked. Please help!
Answer by FuzzyLogic · Mar 01, 2018 at 06:34 AM
If the behaviour of the scripts are not updating, that is a different issue but it sounds like you are just talking about the values in the inspector.
This is a common gotchya in Unity.
So that the component doesn't reset every time you make a change in the script (and so they can be remembered between sessions), Unity saves/serializes the values that were modified in the inspector and restores them after the script is updated. In most cases it works fine but you might need to manually reset the values in the inspector after updating the script, if you change the default values in the script for example.