Unity Script Templates

It’s feature that almost every Unity user used but not everyone realize it’s full potential.
So what exactly we are talking about?
The “Create Asset Menu” that can be opened in few different ways like:

  • Top bar “Assets” menu
  • Project window -> “Create” button
  • Project window -> right mouse button and by selecting “Create”

Almost every time we want to add some logic to our game we open “Create Asset Menu” and click on “C# Script” that looks like this:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class #SCRIPTNAME# : MonoBehaviour {

    // Use this for initialization
    void Start () {
        
    }
    
    // Update is called once per frame
    void Update () {
        
    }
}

And while it’s your first steps with Unity that comment lines with explanation what is Start & Update might be nice? When you’re already in for months or years you can be already really bored of deleting them…

But it’s really easy to remove that comments and do many more things, like: modifying any current template, adding own templates eg. scriptable object or custom inspector, adding sub category for templates.

Continue reading “Unity Script Templates”