zoukankan      html  css  js  c++  java
  • 自定义修改Unity脚本模板

    在Unity Editor中Create C# script后,会自动生成初始化脚本:

     1 using System.Collections;
     2 using System.Collections.Generic;
     3 using UnityEngine;
     4 
     5 public class ScriptName : MonoBehaviour {
     6 
     7     // Use this for initialization
     8     void Start () {
     9         
    10     }
    11     
    12     // Update is called once per frame
    13     void Update () {
    14         
    15     }
    16 }

    这个是Unity默认脚本模板生成的,模板位于:
    "C:Program FilesUnityEditorDataResourcesScriptTemplates81-C# Script-NewBehaviourScript.cs.txt"
    可根据自己需要自定义自己想要的模板,如以下例子:

     1 /*
     2 * ==============================================================================
     3 *
     4 * Filename: $safeitemname$
     5 * Description: 
     6 *
     7 * Version: 1.0
     8 * Created: $time$
     9 * Compiler: Visual Studio 2017
    10 *
    11 * Author: Your name
    12 * Company: Your company name
    13 *
    14 * ==============================================================================
    15 */
    16 
    17 using System.Collections;
    18 using System.Collections.Generic;
    19 using UnityEngine;
    20 
    21 /// <summary>
    22 ///
    23 /// <summary>
    24 public class #SCRIPTNAME# : MonoBehaviour {
    25 
    26     // Use this for initialization
    27     void Start () {
    28         #NOTRIM#
    29     }
    30     
    31     // Update is called once per frame
    32     void Update () {
    33         #NOTRIM#
    34     }
    35 }

    除此之外,C:Program FilesUnityEditorDataResourcesScriptTemplates目录下还有其他类型的脚本模板,可根据需要进行修改!

  • 相关阅读:
    Oracle序列使用:建立、删除
    struts1.x入门
    SQL的四种连接-左外连接、右外连接、内连接、全连接
    eclipse更改文件编码方式
    使用links方式安装Eclipse插件
    JAVA:Eclipse代码自动提示
    MyEclipse注释配置
    全面理解SQL
    一秒去除Win7快捷方式箭头
    Eclipse快捷键大全(转载)
  • 原文地址:https://www.cnblogs.com/MakeView660/p/12251764.html
Copyright © 2011-2022 走看看