- Home /
Question by
StevenBrooks · May 25, 2014 at 01:19 AM ·
c#monobehaviour
Can I change the initial contents of a C# script.
Normally a C# script starts like this:
using UnityEngine;
using System.Collections;
public class MainPlayer : MonoBehaviour {
void Start () {
}
void Update () {
}
}
But I would like it to start with specific regions already included to save time. Example:
using UnityEngine;
using System.Collections;
public class MainPlayer : MonoBehaviour {
#region Variables
#endregion
void Start () {
}
void Update () {
}
}
Is this possible?
EDIT: When I Create a NEW C# Script, I want it to automatically start with predefined regions, is this possible?
Comment
Best Answer
Answer by ericdl · May 25, 2014 at 02:55 AM
The default script templates are text files.
On Windows they are found in C:\Program Files (x86)\Unity\Editor\Data\Resources\ScriptTemplates
On Mac they are found in Applications/Unity/Unity.app/Contents/Resources/ScriptTemplates