publicoverridevoidOnInspectorGUI(){// 注释这行代码可以把原本的数组给隐藏掉// base.OnInspectorGUI();// 把array里的数据更新到Inspector上serializedObject.Update();// Update the array property's representation in the inspector// 看了下C#源码, 这里绘制了Header, Element等内容, 好像是调用了DrawHeader...
public class InspectorExample : MonoBehaviour { //序列化 [SerializeField] public int[] intArray; [SerializeField] public List<string> stringList; } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. using UnityEditor; [CustomEditor(typeof(InspectorExample))] public class InspectorExampleEditor : Edit...
Disables reordering of an array or list in the Inspector window. By default, array or list script variables are presented with a UI control that allows array element reordering via drag handles to the left of element content. You can use [NonReorderable] attribute on a script array or list ...
Project: All the files in your project. You can drag and drop from Explorer into Unity to add files to your project. Scene: The currently open scene. Hierarchy: All the game objects in the scene. Note the use of the term GameObjects and the GameObjects dropdown menu. Inspector: The co...
A Unity Extension to Expose Properties in the the Unity Inspector for Monobehaviours unityunity3dunityengineasset UpdatedApr 7, 2018 C# Utilities to access the PackageManager Internal API (scopes registry, dependencie, registry) in Unity. apipackage-managerpackageunityunity-editorunityengineunity-toolpac...
整合: 只有在編輯器能夠通訊時,才會將啟動/停止命令傳送至 Unity。 已修正具有繼承訊息的 QuickInfo 文件。 已修正 CreateInspectorGUI 訊息的訊息範圍。 請勿在具有多型修飾元的方法上報告 UNT0001。 評估: 已修正使用別名的處理方式。4.5.1.02020 年 3 月 16 日發行新功能...
Editor; [CustomEditor(typeof(SampleBehaviour))] public class SampleEditor : ToolboxEditor { private void OnEnable() { } private void OnDisable() { } public override void DrawCustomInspector() { base.DrawCustomInspector(); //for custom properties: // - ToolboxEditorGui.DrawToolboxProperty(...
新建一个编辑器脚本文件TestListInspector.cs,代码如下: using UnityEditor; using UnityEditorInternal; using UnityEngine; [CustomEditor(typeof(TestList))] public class TestListInspector : Editor { private ReorderableList m_NameList; private void OnEnable() ...
Odin是目前最牛的编辑器定制化工具,可以轻松完成属性的可视化编辑. 开始使用 #ifUNITY_EDITORusing Sirenix.Utilities.Editor;#endif 基础 Title InfoBox [Title("Advanced List Customization")][InfoBox("Using [ListDrawerSettings], lists can be customized in a wide variety of ways.")] ...
In the Project window, selectNew Game Switch List Asset. This shows a list of toggles in the Inspector. You can reorder the list, collapse it, add entries to or remove entries from the list, and change the number of entries in the list. If you make changes in the Inspector UI, thesw...