Link Search Menu Expand Document

Script Templates

Script templates are plain text documents that contains a simple script functionally that let’s you get started with script faster.

Here we have bunch of script templates that makes your scripting more fun.

Installation

Download the script template(s) you want and copy them to: (Choose your current operating system)

  • Windows: C:\Program Files\Unity\Editor\Data\Resources\ScriptTemplates
  • Mac: /Applications/Unity/Editor/Data/Resources/ScriptTemplates
  • Mac (since 5.2.1f1): /Applications/Unity/Unity.app/Contents/Resources/ScriptTemplates

And paste them. (Some script templates may need replace confirmation)

All done, now restart the Unity Editor and enjoy.

Modification

Every script template has a special format, this format consists of:

Format: {Order in menu}-{Menu item name}-{Initial script name}.txt

Example: 81a-C# Editor Script-NewEditorScript.cs.txt

Also the content of the file contains a simple script that replaces it’s class name with the entered name for the file. you can find it in the file by #SCRIPTNAME# tag.

More information