After you’ve developed in Unity for a while, you’ll be well aware that MonoBehaviour’s Start() will be used for initialization and Update() will be called once per frame. I found that I started erasing the two comment lines that point this out from new classes, so I looked for a way to change Unity’s C# template. This also proved handy for adding “using” statements for frequently used namespaces (System.Collections.Generic in my case).
On Mac, you can edit the default code templates by changing the files in /Applications/Unity/Unity.app/Contents/Resources/ScriptTemplates
(If you’re new to OS X, this means you right-click the Unity app in Finder and select “Show package contents” to get to the Contents folder.)
On Windows, the templates are supposedly in [Unity install path]/Unity/Editor/Data/Resources/ScriptTemplates/ – however I haven’t verified this as I don’t have a Windows machine with Unity on it.
(If you’re a Windows user, please leave a comment and I’ll update this post.) – Update: Brent says this is indeed where the templates are.
This is for creating C#, JS and Shader files from inside the Unity editor, which I still find myself preferring to creating new files in MonoDevelop. If you’re looking for a way to change MonoDevelop’s own templates, this blog post should be helpful.
Shameless PlugCheck out my 80s cartoon space operetta "Ace Ferrara And The Dino Menace"!