AvinZarlez / unity-tools

A Visual Studio Code Extension to provide some tools for Unity development
https://marketplace.visualstudio.com/items?itemName=Tobiah.unity-tools
MIT License
31 stars 8 forks source link

Autosave VSC source code when run Unity3d #50

Closed wyattbiker closed 5 years ago

wyattbiker commented 5 years ago

Would be nice to have the ability to autosave a source file before running the Unity game project. Is that something that can be done?

AvinZarlez commented 5 years ago

Autosave is actually just a feature of VSCode. Add a setting to either your folder or your global vscode settings depending on your preference.

  // Controls auto save of dirty files. Read more about autosave [here](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save).
  //  - off: A dirty file is never automatically saved.
  //  - afterDelay: A dirty file is automatically saved after the configured `files.autoSaveDelay`.
  //  - onFocusChange: A dirty file is automatically saved when the editor loses focus.
  //  - onWindowChange: A dirty file is automatically saved when the window loses focus.
  "files.autoSave": "off",