🌍 Unity/유니티 프로그래밍
유니티 구조체 인스펙터 창에서 보기 Unity struct inspector
맨텀
2018. 11. 11. 16:38
구조체는 선언할 때 Serializable을 선언해야 인스펙터에 노출됨.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | using System; [Serializable] public struct CardSt { public int num; public string name; public ActiveType ActiveType; public CardType CardType; public string explain; public Sprite sprite; public CardSt(int _num, string _name, ActiveType _ActiveType, CardType _CardType, string _explain, Sprite _sprite) { num = _num; name = _name; ActiveType = _ActiveType; CardType = _CardType; explain = _explain; sprite = _sprite; } } | cs |