banner1.jpg gimp.jpg dice_render_1.jpg tips_and_tricks.jpg unity_hot_keys.jpg unity_robotlab.jpg Blender.jpg
Tips&Tricks: Change script template for C#, UnityScript and Boo
Tips&Tricks: Change script template for C#, UnityScript and Boo
By: Scarpelius on Jul, 28 2013
Bookmark this

When creating a new script in Unity, the editor will open a template file, a skeleton class for you to build on it.

If you are like me and don't like the code notation where the function accolade is placed on the same line with the function name, then you are forced at the beginning of each new file to move the accolades to the right places and also to delete the comments for Start and Update functions. This is a bit of annoyance, which can be solved in Visual Studio by pressing CTRL+K+D to format the code. Not much energy wasted here, just the annoyance of this operation.

But then again, why not get rid of this format and even more, improve the format of the file, based on your habbits? Well guess what it is possible by changing the template file for C# scripts. Under Windows with the default install location of Unity, this file is located in C:Program Files (x86)Unity4EditorDataResourcesScriptTemplates81-C# Script-NewBehaviourScript.cs.txt.

Bellow is the customization of the template file for C# I use:

123456789101112131415161718192021222324
using UnityEngine;
using System.Collections;

public class #SCRIPTNAME# : MonoBehaviour 
{
	#region Public Members
	#endregion

	#region Private Members
	#endregion

	#region Properties
	#endregion

	void Start () 
	{
	
	}
	
	void Update () 
	{
	
	}
}

 

Discussions:
KelUrifyPar
Location: Planet Earth
Posts:
Sunday, June 18, 2017 - 13:45
Keflex For Staff Infection [url=http://where-to-order-viagra.via100mg.com]Where To Order Viagra[/url] Farmaco Equivalente Priligy Cialis Dosificacion [url=http://buy-cheap-generic-kamagra.kamagpills.com]Buy Cheap Generic Kamagra[/url] Viagra Dove Si Acquista Comprar Cialis Espana Online [url=http://inderal.ccrpdc.com/inderal-order.php]Inderal Order[/url] Keflex Staphylococcus Furuncle Levitra Tradizionale [url=http://dapoxetine-priligy-price.priliorder.com]Dapoxetine Priligy Price[/url] Priligy Eyaculacion Precoz Order Levothyroxine 125mcg Online [url=http://viacheap.com]viagra[/url] Suhagra India Live Time Buying Generic On Line Zentel Ups Overnight Shipping [url=http://generic-levitra.buylevi.com]Generic Levitra[/url] Seismic Loop Keflex Il Cialis E Mutuabile [url=http://cial40mg.com/order-cialis.php]Order Cialis[/url] Indications Amoxicillin
KelUrifyPar
Location: Planet Earth
Posts:
Sunday, June 25, 2017 - 22:08
Is Trimox And Amoxicillin The Same [url=http://viaprices.com]viagra[/url] Cialis Mezza Pasticca
KelUrifyPar
Location: Planet Earth
Posts:
Friday, June 30, 2017 - 07:33
Buy Propecia Online Uk No Prescription [url=http://priceofvia.com]viagra[/url] buy accutane no rx
TimothyMairm
Location: Planet Earth
Posts:
Friday, June 30, 2017 - 09:27
301 Moved Permanently
[url=https://www.viagrapascherfr.com/]More info>>>[/url]
KelUrifyPar
Location: Planet Earth
Posts:
Sunday, July 02, 2017 - 14:49
How Much Amoxicillin Do I [url=http://priceofvia.com]generic viagra[/url] Zithromax 500 Mg
ReviaTax
Location: Planet Earth
Posts:
Thursday, August 10, 2017 - 19:29
buy revia 25 mg
[url=http://phartesdomusa.org/]buy generic revia online next day delivery uk[/url]
generic naltrexone tablets

buy revia online generic next day delivery

http://phartesdomusa.org/
http://phartesdomusa.org/kart1.html
[url=http://phartesdomusa.org/]where can i buy revia[/url]

how to buy naltrexone online

revia online purchase
naltrexone price online
ReviaTax
Location: Planet Earth
Posts:
Thursday, August 10, 2017 - 22:26
buy revia online australia
[url=http://phartesdomusa.org/]buy revia generic[/url]
low dose naltrexone order online

buy generic revia online

http://phartesdomusa.org/
http://phartesdomusa.org/kart1.html
[url=http://phartesdomusa.org/]buy naltrexone[/url]

buy revia 100mg

low dose naltrexone online purchase
generic naltrexone online
Larrytof
Location: Planet Earth
Posts:
Tuesday, August 15, 2017 - 08:49
[url=http://rilitthe.org/]cialis 5mg best price[/url]
cialis 2.5mg price
best price on cialis 20mg
what is the price of cialis at walmart
Leroyseino
Location: Planet Earth
Posts:
Tuesday, August 15, 2017 - 08:51
[url=http://ettinti.org/]order viagra online safely[/url]
viagra online order india
how to order viagra pills
viagra mail order usa
Add comment:


Match the word in captcha image