资源简介
Unity编辑器语言开发的,拖入项目Assest目录下,点击Unity编辑器上方栏的“我的拓展编辑器”即可打开使用。项目展示写了一个博客:https://blog.csdn.net/qq_37835111/article/details/86083860
欢迎大家讨论

代码片段和文件信息
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;
using System;
using System.Linq;
using System.Text;
namespace MyHong
{
public class Hong : EditorWindow
{
private AllDefine allDefine;
private AllChannel allChannel;
private bool isEditing = false;
private string[] currentArrCurrentPresetStr = new string[] { };//设置模式下绘制预设所用
private int currentChooseIndex;//设置模式下绘制预设所用
private Channel currentChannel;//设置模式下的暂时变量,因为应用过后才改变txt,所以定义一个暂时变量
private Vector2 currentScrollPosition = Vector2.zero;//当前滚轴的位置,绘制宏列表所用
private AllChannel tempAllChannel;//编辑模式下的temp
private string tempNotice = ““;//编辑模式下添加或者移除的 警告
private string tempInputName;//编辑模式下输入的名称
private Channel tempChannel;//编辑模式下的temp预设
private string[] tempArrCurrentPresetStr = new string[] { };//编辑模式下temp
private int tempCurrentChooseIndex;//编辑模式下的temp
[MenuItem(“我的扩展工具/我的宏定义管理器“)]
private static void MenuInit()
{
//展示窗口
Hong window = EditorWindow.GetWindow(“宏定义管理器“);
window.minSize = new Vector2(500 500);
}
void OnEnable()
{
//读取Json格式的配置表
TextAsset defineTextAsset = Resources.Load(“Define“);
TextAsset presetTextAsset = Resources.Load(“Channel“);
try
{
allDefine = JsonUtility.FromJson(defineTextAsset.text) ?? new AllDefine();
}
catch (Exception)
{
allDefine = new AllDefine();
}
try
{
allChannel = JsonUtility.FromJson(presetTextAsset.text) ?? new AllChannel();
}
catch (Exception)
{
allChannel = new AllChannel();
}
currentArrCurrentPresetStr = new string[allChannel.lisChannel.Count];
for (int i = 0; i < allChannel.lisChannel.Count; i++)
{
currentArrCurrentPresetStr[i] = allChannel.lisChannel[i].channelName;
}
currentChooseIndex = allChannel.currentChooseIndex;
currentChannel = allChannel.lisChannel.Count > currentChooseIndex ? allChannel.lisChannel[currentChooseIndex] : null;
//allDefine.lisDefine.Add(new Define() { name = “TEST1“ describe = “Test1Describe“ });
//allDefine.lisDefine.Add(new Define() { name = “TEST2“ describe = “Test2Describe“ });
//allDefine.lisDefine.Add(new Define() { name = “TEST3“ describe = “Test3Describe“ });
//allDefine.lisDefine.Add(new Define() { name = “TEST4“ describe = “Test4Describe“ });
//allDefine.lisDefine.Add(new Define() { name = “TEST5“ describe = “Test5Describe“ });
//s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-05 16:35 hong\
目录 0 2019-01-07 17:46 hong\Editor\
文件 24872 2019-01-07 17:46 hong\Editor\Hong.cs
文件 284 2019-01-05 16:32 hong\Editor\Hong.cs.me
文件 213 2019-01-05 16:35 hong\Editor.me
目录 0 2019-01-07 17:35 hong\Resources\
文件 284 2019-01-08 16:25 hong\Resources\Channel.json
文件 199 2019-01-07 14:43 hong\Resources\Channel.json.me
文件 503 2019-01-07 14:43 hong\Resources\Define.json
文件 199 2019-01-07 14:43 hong\Resources\Define.json.me
文件 213 2019-01-05 16:35 hong\Resources.me
- 上一篇:并行粒子群优化算法的设计与实现
- 下一篇:基于改进烟花算法的web服务组合优化
相关资源
- XE7UP1Kg13_Unis.exe
- Uninstall_Cortana_WINCLIENT.CN.rar
- VisualStudioUninstaller vs卸载工具
- UNIX/LINUX编程实践教程的源码
- DXperienceUniversal 10.1.6(2010年8月13日版
- 使用 SoundPool 同时播放多个音频
- UNICODE GBK双向码表二进制文件
- ubuntu9.10 可加载内核模块和字符设备驱
- Unity3D登录界面工程
- 常用编码(UnicodeUTF-8GBK)转换工具
- unity3d反编译工具
- Junit4单元测试
- 中文转化unicoder码的方法
- 经典的Viterbi算法
- UnObSiDium.rar
- Ubuntu安装时磁盘分区图文教程
- Fundamentals of Data Structure in C
- 302 Found
- Furan-BDOPV Donor-Acceptor Polymers with Plana
-
UnityWebPla
yer及UnityWebPla yerFull -
UnityWebPla
yerFull - Effects of the cultured Cordyceps exopolysacch
- In vitro screening of lactobacilli with antago
- Effect of dietary nitrate dosage on gas produc
- 通过大型强子对撞机逐光散射的小曲
- SunnyUI.Net
- 小程序反编译文件wxappUnpacker.rar
- HslCommunication 7.0.1 免费版本 免费使用
-
Macromedia Flash MX Actionsc
ript for Fun an - 由国家自然科学基金委员会U1232105和中
评论
共有 条评论