很多时候 许多类 的 格式 都是重复的,比如 从配置文件中映射出来的类。

这个时候写一个 类模板 就很节省时间了。

Code

     public static string TestPath = "Assets/Test.cs";
public static string TestValue = "\"test\"";
public static string TestCode =
@"
using UnityEngine;
using System;
using System.Text;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using com.kuxiong.battlemodule;
using System.Linq; namespace com.kuxiong.battlemodule
{
public class Test
{
public string name = " + TestValue + @";
}
}"; [MenuItem("MyTest/Test")]
public static void Test()
{
Debug.Log("Creating Test Vo"); System.IO.File.WriteAllText(TestPath, TestCode); AssetDatabase.ImportAsset(TestPath);
AssetDatabase.Refresh();
}

Create Script Template In Edit Mode的更多相关文章

  1. Jmeter录制脚本过程及Could not create script recorder报错、您的连接不是私密连接报错

    转载自    https://www.cnblogs.com/wwho/p/7173172.html Jmeter录制脚本过程及Could not create script recorder报错.您 ...

  2. 二、Jmeter录制脚本过程及Could not create script recorder报错、您的连接不是私密连接报错

    两个报错:Could not create script recorder报错和您的连接不是私密连接报错 1.录制过程 * 打开jmeter * 点击Templated,选择Recoding模版 * ...

  3. 今天再给大家带点html5前端开发的干货模板“text/tpl”怎么用 script template怎么用

    text/tpl 顾名思义就是模板,其实和C++模板函数类似的作用,就是利用他生成一个HMTL内容,然后append或者替换html里面 有什么好处,假如后端返回来的数据都是一样的,但是需要生成不同的 ...

  4. [Angular] Using ngTemplateOutlet to create dynamic template

    I can use <tamplete> syntax and a entry component as a container to create a dynamic component ...

  5. [Angular Directive] Create a Template Storage Service in Angular 2

    You need to define a <template> to be able to use it elsewhere in your app as a TemplateRef. Y ...

  6. 小白学习vue第五天-第二弹(全局局部、父子、注册语法糖,script/template抽离模板)

    全局组件: 就是注册的位置在实例对象的外面 并且可以多个实例对象使用 而局部: 就是在实例对象的内部注册 父组件和子组件的关系 子组件就是在另一个组件里面注册的组件 组件注册语法糖: 就不用Vue.e ...

  7. MS-DOS Batch Script Template

    @echo off @setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION @rem Name: @rem Purpose: @rem @rem Autho ...

  8. Umbraco(5)-Creating Master Template Part 1(翻译文档)

    原文地址:http://www.ncloud.hk/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/umbraco5-creating-master-template-par ...

  9. Edit Individual GridView Cells in ASP.NET

    Edit individual GridView cells without putting the entire row into edit mode.Examples using the SqlD ...

随机推荐

  1. 向Windows 日志管理器写入系统程序日志信息

    标准样例代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Da ...

  2. hadoop-cdh with snappy

    hadoop: 2.5.0-cdh5.3.6 snappy: 1.1.3 hadoop 2.*不需要hadoop-snappy.只要机器上安装好snappy, 直接编译就可以 编译命令: mvn cl ...

  3. Python Ogre Blender(转载)

    http://www.cppblog.com/Charlib/archive/2010/05/31/python_ogre_blender_1.html PyOgre入门以及如何使用Blender制作 ...

  4. 转 在SQL Server中创建用户角色及授权(使用SQL语句)

     目录 要想成功访问 SQL Server 数据库中的数据 我们需要两个方面的授权 完整的代码示例 使用存储过程来完成用户创建 实例 要想成功访问 SQL Server 数据库中的数据, 我们需要两个 ...

  5. Android:ViewPager实现屏幕轮转和使用PagerTabStrip

    ① ViewPager类直接继承了ViewGroup类,所有它是一个容器类,可以在其中添加其他的view类. ② ViewPager类需要一个PagerAdapter适配器类给它提供数据. ③ Vie ...

  6. hdu 2141 Can you find it?

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=2141 Can you find it? Description Give you three sequ ...

  7. 管理员必备的20个Linux系统监控工具

    需要监控Linux服务器系统性能吗?尝试下面这些系统内置或附件的工具吧.大多数Linux发行版本都装备了大量的监控工具.这些工具提供了能用作取得相关信息和系统活动的量度指标.你能使用这些工具发现造成性 ...

  8. zookeeper的一些异常总结

    1.Could not find the main class: org.apache.zookeeper.server.quorum.QuorumPeerMain.  Program will ex ...

  9. VS2012 常用web.config配置解析之自定义配置节点

    在web.config文件中拥有一个用户自定义配置节点configSections,这个节点可以方便用户在web.config中随意的添加配置节点,让程序更加灵活(主要用于第三方插件的配置使用) 自定 ...

  10. GPIO初始化之PB3/PB4/PA13/PA14/PA15引脚的复用--寄存器版本

    为了节省IO资源单片机会在一个IO上复用很多功能,一般的单片机用到 一个功能后就能再用两外复用的功能了,这就体现出了STM32 GPIO的强大功能了,我们用重映射的方法把其中一个外设映射到其他IO脚上 ...