https://blog.csdn.net/e295166319/article/details/52370575 需要两个类:树节点类和界面实现类 1:树节点类(TreeNode) using UnityEngine; using System.Collections; using System.Collections.Generic; public class TreeNode { public enum TreeNodeType { Item, Switch } public string…
需求 为Unity的Editor窗口添加右键菜单 实现代码 // This example shows how to create a context menu inside a custom EditorWindow. class MyGenericMenu extends EditorWindow { @MenuItem("Game/Open Window") static function Init () { var window = GetWindow (MyGenericMe…
1.首先定义一个需要控制数值的类,类中定义若干个变量 using UnityEngine;using System.Collections; using UnityEngine; using System.Collections; // This is not an editor script. public class MyPlayer : MonoBehaviour { public int Jump; void Update () { // Update logic here... } }…