1. 캐릭터 정보
- 캐릭터 별PID
- 이름 -> object를 클릭하면 자동 바인딩
- 이미지 -> Texture2D
- 레벨 -> int
- 등급 -> dropdown string
- 타입(공격, 방어, 민첩 등) -> dropdown string
- 사운드
- 설명(Description)
- 기존에 있던 값(HP, ATK, ATKRange, Weight, exp) -> float
2. 바인딩 예제 참고
https://docs.unity3d.com/Manual/UIE-binding-examples.html
3. 자동 바인딩
CharacterData.cs를 CharacterBuilder.cs에서 자동 바인딩
https://ansohxxn.github.io/unity%20lesson%202/ch7-4/
4. 수정
5. type 관련 코드 간결화
key, value 로 저장해서 switch-case문을 사용할 수 있다는 것이 놀라웠음.
https://stackoverflow.com/questions/708911/using-case-switch-and-gettype-to-determine-the-object
Using Case/Switch and GetType to determine the object
Possible Duplicate: C# - Is there a better alternative than this to ‘switch on type’? If you want to switch on a type of object, what is the best way to do this? Code snippet private int GetNodeType(
stackoverflow.com
'Unity > 게임 개발 스터디' 카테고리의 다른 글
게임 개발 스터디 16 : Directory (0) | 2022.12.01 |
---|---|
게임 개발 스터디 15 : Addressable (0) | 2022.11.25 |
게임 개발 스터디 13 : UQuery (0) | 2022.11.16 |
게임 개발 스터디 12 : Tool에 SO 파일 적용, tap 메뉴 생성 (0) | 2022.11.01 |
게임 개발 스터디 11 : UI Toolkit - Object Field (0) | 2022.10.11 |