はじめに
https://gist.github.com/LotteMakesStuff/b8853a16de3e680dc1c326fe6f5ebd7e
「StatsBarAttribute」は Inspector にゲージを表示する PropertyAttribute です
使用例
using UnityEngine; public class Example : MonoBehaviour { [StatsBar( "max", StatsBarColor.Green )] public float hp; [StatsBar( "max", StatsBarColor.Blue )] public float mp; public float max; }