type: 클래스의 데이터 타입에 대한 정보를 가져옴
Type type = slimeA.GetType();
FieldInfo[] fields = type.GetFields();
for(int i = -; i<fields.Length; i++)
{
Debug.Log(fields[i].Name);
}
Debug.Log(type.GetField("hp").GetValue(slimeA)); // slimeA에서 hp 필드를 가져옴
type.GetField("hp").SetValue(slimeA, 80);
함수 호출
type.GetMethods("Attack").Invoke(slimeA, null); // slimeA에 있는 Attack이라는 함수 호출(보내는 매개변수 없음)