- Home /
How can i change the script format when creating a new one ?
The default format is:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
But i like it more to be in this format:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
}
}
I'm just used to the second format but instead changing it each time i create a new script maybe therei s away to change it once and set it as default format ?
Answer by XaloX · Aug 08, 2017 at 07:58 PM
Hello @Chocolade,
I don't think Unity has that default change, if you copy it on a clipboard (or notes), maybe that would help?
Cheers! NuclearRasberry
Yeah, VS or ID$$anonymous$$ Thanks!
Cheers!! NuclearRasberry
Answer by ShadyProductions · Aug 08, 2017 at 08:06 PM
When you use visual studio, you can simply remove the last } and replace it, and it will order all the brackets accordingly. (unless this is a resharper thingy)
Answer by NoseKills · Aug 09, 2017 at 04:01 PM
You mean the layout of newly created scripts?
You can edit them as described here. Updating Unity overwrites the changes so make a backup when you have it like you want.