はじめに
「MyBox」を Unity プロジェクトに導入することで
便利なエディタ拡張がたくさん使用できるようになります
使用例
ConditionalField
using UnityEngine; public class Example : MonoBehaviour { public bool m_enabled; [ConditionalField( "m_enabled" )] public float m_name; }
DefinedValues
using UnityEngine; public class Example : MonoBehaviour { [DefinedValues( 1, 3, 5 )] public int m_value; }
DisplayInspector
using UnityEngine; [CreateAssetMenu] public class Settings : ScriptableObject { public int m_id; public string m_name; }
using UnityEngine; public class Example : MonoBehaviour { [DisplayInspector] public Settings m_settings; }
Layer
using UnityEngine; public class Example : MonoBehaviour { [Layer] public int m_layer; }
MinMaxRange
using UnityEngine; public class Example : MonoBehaviour { [MinMaxRange( 80, 120 )] public RangedFloat m_value; }
ReadOnly
using UnityEngine; public class Example : MonoBehaviour { [ReadOnly] public float m_value; }
SearchableEnum
using UnityEngine; public class Example : MonoBehaviour { [SearchableEnum] public KeyCode m_keyCode; }
Separator
using UnityEngine; public class Example : MonoBehaviour { [Separator] public int m_id1; public string m_name1; [Separator] public int m_id2; public string m_name2; }