반응형
- 코드 작성
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;
}
}
반응형