유니티 C# Enum Count 길이 간단 구하기


유니티 C# Enum Count 길이 간단 구하기

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public enum MoneyType { Gold = 0, Crystal } public class ExampleEnum : MonoBehaviour { public MoneyType moneyType = MoneyType.Gold; void GetEnumCount() { int count = System.Enum.GetValues(typeof(MoneyType)).Length; } }


원문링크 : 유니티 C# Enum Count 길이 간단 구하기