- 苦恼
- 一、查找目录
- 二、修改NewBehaviourScripts内容
- 默认
- 修改后
- 三、最简模板
- **效果**
- 四、完毕
有没有强迫症的盆友和我一样,用Unity创建一个新脚本,为其自带方法而苦恼!如下:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
所以,今天就把他修改掉,还要加上我自己的标注/记
一、查找目录找到Unity指定安装目录下的这个文件夹,“Unity2019.4.9EditorDataResourcesScriptTemplates”
本地安装的unity路径下找到这个文件,修改里面的内容
默认 修改后 三、最简模板 效果
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
}
四、完毕
Bingo,就这么简单~
原创不易,若转载请注明出处,感谢大家~
喜欢我的可以点赞、关注、收藏,如果有什么技术上的疑问,欢迎留言或私信~



