Unity默认脚本模板
2019-01-19 本文已影响0人
郭昊峰
在Unity3D中,我们的脚本经常有比较通用的代码
例如:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
void Start () {}
void Update () {}
等。
又不想每次重新添加,怎么办呢?
我们可以打开以下路径:

以C# 为例,打开文档,输入代码,例如:

那么每次我们在Unity3D新建一个脚本,都会自带默认脚本了。