[Unity C#_Menu Window Development Series_Inspector Component UnityEditor Development]

GUI series operations 1. Enumeration menu implementation File 1: Assets/MyScript/Test1.cs code show as below: File 2: Assets/MyScript/Editor/Test1Editor.cs code show as below: have a test Create a new scene and create an Empty node to test the enumerated components. Drag file 1: Assets/MyScript/Test1.cs to the Game Object’s Inspector panel. Implemented a simple enumeration menu: 2.Window menu […]

Draw the Inspector panel of Unity custom components with GUI

/// <summary> /// The implementation script for drawing the GUI of the Inspector panel of the AllAttributeText component /// </summary> using UnityEngine; using UnityEditor; using UnityEditorInternal; [CanEditMultipleObjects] //If there is a drawn GUI, you need to add this feature to the script before you can change the same attribute of multiple objects AllAttributeText components on […]

Odin-2. Extend the Inspector window

Odin extends the Inspector window The biggest application is to combine with the extended EditorWindow to make some editor tools Refer to https://odininspector.com/tutorials/using-attributes/simple-attribute-examples Selection and validation of extended attributes public class OdinChecker : MonoBehaviour {<!– –> [Range(0, 10)] public int Field = 2; [MinValue(0), MaxValue(100)] public int Health; [ChildGameObjectsOnly] public GameObject Child; // Verify that […]

[Solved] An error occurred in hook ‘getInspectorState’ registered by plugi, and namespace usage

close namespace export default { namespaced: true, //close state, mutations, actions } Error message An error occurred in hook getInspectorState’ registered by plugin org.vuejs.vue2-internal’ with payload: Vuex usage When a variable is required to be a global variable, Vuex can be used to implement it. Simple case description: 1. If you install Vuex, you can […]

[Solved] Unity override OnInspectorGUI multi-select button does not work solution

I want to add a button to the original script to do some checks. The initial code is like this [CustomEditor(typeof(AddCartBtn))] class AddCartBtnEditor : Editor {<!– –> public override void OnInspectorGUI() {<!– –> base.OnInspectorGUI(); AddCartBtn addCartBtn = (AddCartBtn)target; if (GUILayout.Button(“check”)) {<!– –> addCartBtn.Check(); EditorUtility.SetDirty(addCartBtn); } } } Then I found that when I wanted to […]

[Solved] An error occurred in hook ‘getInspectorState’ registered by plugi, and namespace usage

close namespace export default { namespaced: true, //close state, mutations, actions } Error message An error occurred in hook getInspectorState’ registered by plugin org.vuejs.vue2-internal’ with payload: Vuex usage When a variable is required to be a global variable, Vuex can be used to implement it. Simple case description: 1. If you install Vuex, you can […]

[Solved] [Solved] Appium+Java controls the real machine (Xiaomi 12X), and an error occurs when running Appium Inspector or Java test script Error executing adbExec

refer to: appium cannot control the real machine problem, Error executing adbExec appium starts the start session and reports an error record Error executing adbExec 1. Set background and error message 1.1 Setting Background The phone has entered developer mode and USB debugging has been turned on; adb devices can capture the UDID of the […]