[Unity] Script Tempate 1 – Unity Defualt Script Template



Overview

1. Find Unity default script templates
2. Modify or create your own template
3. Restart Unity


1. Find Unity default script templates

Mac:
/Applications/Unity/Unity.app/Contents/Resources/ScriptTemplates/

Windows:
C:/Program Files (x86)/Unity/Editor/Data/Resources/ScriptTemplates

2. Modify or create your own template

If you don't coding by JavaScript, you can just replace the JavaScript template to your own. And if you want your script at the top of the list, you should modify the default C# Script into number 82, and set your custom template 81.

[Unity] Script Templates

For example, add your own MIT License

//
// Copyright (C) 2017 Scissor Lee
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

using UnityEngine;

public class #SCRIPTNAME#
{
}
3. Restart Unity

Enjoy!

[Unity] Script Templates




歡迎您留言與分享!(Welcome for comments or sharing!)

Related Post:

Tagged on: ,