以下の内容はhttps://baba-s.hatenablog.com/entry/2022/06/20/090000より取得しました。


【Unity】const や static readonly を Inspector のドロップダウンで選択できる「Drop-down with objects of any type in Unity Inspector」紹介

はじめに

「Drop-down with objects of any type in Unity Inspector」を
Unity プロジェクトに導入することで
const や static readonly を Inspector のドロップダウンで選択できるようになります

使用例

using StructDropDown;
using UnityEngine;

public static class Const
{
    public const int MAX = 100;
    public const int MIN = 0;
}

public static class StaticReadOnly
{
    public static readonly Vector2 Zero = Vector2.zero;
    public static readonly Vector2 One  = Vector2.one;
}

public class Example : MonoBehaviour
{
    [DropDown( typeof( Const ) )]
    public int m_value;

    [DropDown( typeof( StaticReadOnly ) )]
    public Vector2 m_vector;
}




以上の内容はhttps://baba-s.hatenablog.com/entry/2022/06/20/090000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14