Inspector GUI
- fang ma

- 2022年3月17日
- 讀畢需時 1 分鐘
public variables shown in the Inspector when inheriting
Class used on game object
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System;
[Serializable]
public class UIButton : Button
{
public enum TestEnum { ON, OFF }
public int testInt;
public TestEnum testEnumVar;
}Class used to override the inspectorGUI
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor(typeof(UIButton))]
public class UIButtonEditor : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
UIButton t = (UIButton)target;
}
}
![[Openface] Face Animator](https://static.wixstatic.com/media/64c63b_b6639cbbec0f45549d95718d8f2fd6ed~mv2.png/v1/fill/w_686,h_822,al_c,q_90,enc_avif,quality_auto/64c63b_b6639cbbec0f45549d95718d8f2fd6ed~mv2.png)
留言