摘要:unity 中,二维以上的数量是不支持序列化的,如: using System.Collections.Generic; using UnityEngine; public class TestArray : MonoBehaviour { // 不支持序列化(在Inspector面板无法显示) p
阅读全文
摘要:using System.IO; using UnityEditor; using UnityEngine; public class ConvertIconToMultipleSizes : Editor { [MenuItem("Assets/Convert Icon To Multiple S
阅读全文
摘要:为包命名 xxx.xxx.xxx...@v.v.v (字母要小写,@后是包版本号) 包的布局 Packages ├── package.json ├── README.md ├── CHANGELOG.md ├── LICENSE.md ├── Third Party Notices.md ├──
阅读全文
摘要:最重要的几项操作如下所述: 修改单个属性: Undo.RecordObject (myGameObject.transform, "Zero Transform Position"); myGameObject.transform.position = Vector3.zero; 添加组件: Und
阅读全文
摘要:Object[] UnityAssets = AssetDatabase.LoadAllAssetsAtPath("Resources/unity_builtin_extra"); foreach (var asset in UnityAssets) { Debug.Log(asset); } De
阅读全文
摘要:private static int GetLocalIdentfierInFile(UnityEngine.Object obj) { PropertyInfo info = typeof(SerializedObject).GetProperty("inspectorMode", Binding
阅读全文
摘要:GUIUtility.keyboardControl = 0;
阅读全文
摘要:string str="acd12335"; TextEditor textEditor = new TextEditor(); textEditor.text = str; textEditor.SelectAll(); textEditor.Copy();
阅读全文
摘要:例:执行 Edit/Duplicate 菜单 [MenuItem("Tools/Duplicate")] private static void ExecuteDuplicate() { bool isExecute = EditorApplication.ExecuteMenuItem("Edit
阅读全文
摘要:TestHierarchyPopupMenuEditor.cs using UnityEditor; using UnityEngine; public class TestHierarchyPopupMenuEditor : ScriptableObject { [MenuItem("GameOb
阅读全文