Why aren't my scripts updating in my project?

I installed Unity fresh a couple of days ago and started a new project. Scripts updated just fine for the first day and a half. I have been using Visual Studio as my IDE but have confirmed that this issue also occurs in MonoDevelop. Currently, anytime I make a change to a script, the script does not update inside of Unity. This also happens in another project that I created.

For example, if I change “public float projectileCollsionOffset = 4.0f;” to “public float projectileCollsionOffset = 5.0f;” in my script, I can look in the inspector and it will still be set to 4. Setting the number in the inspector also does not reflect the change in the script.

Removing the script completely from my player object and re-adding it after the changes are made does in fact work. However this is extremely tedious.

Can someone explain why this occurs and how to fix it?

I have read that it may have something to do with the meta files but haven’t found any useful information on what to change with the meta files so that it fixes the issue. It may not even be related to meta files, but that’s what I found so far.

I’m really surprised there hasn’t been an answer to this. Anyway, I had this problem today and I had no idea it was occurring until I asked myself if it was. I was going nuts thinking certain code wasn’t accessible due to scope, etc… Nope, it was that VS and Unity weren’t actively syncing.

How it happened:

Had 5.6 project.
Upgraded Unity to 2017.
Upgraded VS to 2017.
Updated 5.6 project to 2017.


Reimported all assets.

The test:

Added simple Debug.Log statement to a Start function attached to a GameOjbect, pressed play in the editor, changed the parameter in the Debug statement, pressed play in the editor again, saw changes, changed the parameter in the Debug statement, pressed play in the editor again, saw changes, changed the Debug parameter and updated while playing in the editor, pressed stop, and finally pressed play again to see the changes.

Looks good to me so far. Of course, I’ll come back here first thing if there are any problems.