- When I create a new script, the Unity Editor generates its content. For C# scripts, it uses the file name as the class name.
Customs scripts templates are stored in %EDITOR_PATH%\Data\Resources\ScriptTemplates.
If you want to create a custom template for your scripts, you can add a script template following these steps:
1) Create a folder inside of your Asset folder called ScriptTemplates
2) create a file inside the ScriptTemplates with the following format: [TemplateName].cs.txt
2) Put your template in the file with the #SCRIPTNAME# placeholder to make sure your script generates with a correct class name
3) Restart Unity
You can create scripts using your custom templates by right-clicking on project view Create->Template Name.