---
title: "How do you customize script templates in Unity?"
description: "Copy Unity's script template into an Assets/ScriptTemplates folder and edit it. New scripts then use your layout, with placeholders such as SCRIPTNAME."
url: "https://bugsee.com/answers/unity/unity-script-templates/"
---

# How do you customize script templates in Unity?

Copy a template from the editor's `ScriptTemplates` folder into `Assets/ScriptTemplates` in your project, edit it, and Unity uses your version for new scripts.

Unity builds the Assets > Create menu from template files. A template is a text file with placeholders that are replaced when a script is created.

- Find the originals in the Unity installation: `Editor/Data/Resources/ScriptTemplates` (on macOS, inside the app bundle under Contents/Resources/ScriptTemplates).
- Copy the one you want, for example `81-C# Script-NewBehaviourScript.cs.txt`, into `Assets/ScriptTemplates`.
- The file name controls the menu: a priority number, the menu name, then the default file name and extension.
- Reopen the project or reimport if the menu does not update.

```csharp
using UnityEngine;

public class #SCRIPTNAME# : MonoBehaviour
{
    void Start()
    {
        #NOTRIM#
    }

    void Update()
    {
        #NOTRIM#
    }
}
```

`#SCRIPTNAME#` becomes the file name without extension, and `#NOTRIM#` keeps empty lines from being removed. A template stored in the project is shared with the team through version control.

## Related questions

- [How do you add a script to a GameObject in Unity?](https://bugsee.com/answers/unity/unity-add-script-to-gameobject/)
