Lag in Unity editor (windows) after saving script

When I save a .cs script (VB or sublime text), the unity editor (Windows PC) becomes unresponsive for a few seconds. This happens even with a basic project. Any solution?

This is because the project is recompiling code every time you add a new script to the system. It is perfectly normal for it to take a second.

Check out this answer for disabling auto refresh and updating recompiling settings: Can you disable the autorecompile? - Questions & Answers - Unity Discussions


Basically, there is an option in Unity to turn this off:


Basically, there is an option in Unity to turn this off:

  • Auto Recompile - Edit Mode ( Edit > Preferences > General > Auto Refresh )
  • Auto Recompile - Play Mode ( Edit > Preferences > General > Script Changes While Playing )