赞
踩
这里举两个简单的例子(非原创,不选原创发布不了)
第一个例子是知乎上的例子:
https://zhuanlan.zhihu.com/p/30716595
自动给UI组件绑定
第二个例子是自己的需求,需要根据字符串数组自动生成对应枚举脚本
我只能说例子虽然简单,但是如果再往上拓展,会极大的减少重复性的代码开发操作
using UnityEngine;
using UnityEditor;
using System.Linq;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using System.Text;
public class AutoBuildTemplate
{
public static string UIClass =
@"using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventS
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。