I’m using Unity 2017.1.1
Now that UnityScript is being phased out, I received my first notice that one asset I’m using was updated. The asset store seller changed the UnityScript file to a C-Sharp script. I verified in the item listing that the file in the package was replaced with a .cs file from a .js file. The following issues happened when importing the new version of the unity package:
- Unity retained the file extension of .js. This resulted in the many compiler errors as the code in the file was updated to CS code, but the file extension was remained as .js. Unity was still trying to compile the file as a .js. Then manually changing the file from .js to .cs resulted in loosing the reference to the script in the scene. The script then had to be dragged into the “Script” field in the inspector to complete the task and retain the serialization
The process was not as automated as I thought it would be. It would panic some users to experience this. I did it in a sandbox first because I was wary of what might happen during the process.
So the process for me was:
- After importing the new version of the Unity package, go to the file in the assets folder and manually change the file from a .js extension to a .cs extension. This results in the file being compiled as a .cs file.
- Drag the file back into any “script” field if it says “Missing (Mono Script)”
.
Just to show that there’s nothing wrong with the actual package downloaded from the asset store, here is trying to import the asset when the asset does not currently exist in the asset folder:

Notice the import dialog indicates the file will be a .cs file, not a .js file as shown above.
.

