ScriptableObject
ZepetoScriptableObject는 Unity ScriptableObject를 지원합니다. ZepetoScriptableObject는 월드 데이터 설정 및 캐릭터 옵션과 같은 대량의 데이터를 저장하는 데이터 컨테이너입니다.
새로운 ZepetoScriptableObject 파일을 만들려면 프로젝트 패널의 왼쪽 상단 모서리에 있는 [+] 아이콘을 클릭하거나 자산 → 만들기 → ZEPETO → ScriptableObject를 클릭하세요.

새로 생성된 ZepetoScriptableObject는 정의된 데이터 클래스를 사용하여 스크립트를 생성하여 연결해야 합니다.

새로운 ZEPETOScript 파일을 만들고 사용할 데이터를 멤버 변수로 선언하세요.
여기 데이터로 사용할 수 있는 샘플 코드가 있습니다.
ZEPETOScript를 정의된 데이터 클래스와 연결하면 ZepetoScriptableObjects에서 해당 데이터를 검사기 창에서 볼 수 있습니다. 아래와 같이 표시됩니다.

ZepetoScriptableObject에서 데이터를 호출하기 위해 ZEPETOScript 파일을 생성합니다.
ZEPETOScript에서 ZepetoScriptableObject를 가져오고, 선언한 데이터 유형도 가져옵니다.

ZepetoScriptableObject를 ZEPETOScript의 속성으로 선언합니다.
ZEPETOScript에서 Inspector 창을 열고 아래와 같이 ZepetoScriptableObject 속성의 값을 할당합니다.

이 샘플은 ZepetoScriptableObject를 사용하고 그 값을 접근하는 방법을 보여줍니다.
원시 타입의 멤버 변수를 접근하려면, 제네릭 타입으로 선언하거나 아래 예제와 같이 타입 캐스팅을 사용하여 변환하세요.
ScriptableObject의 전체 코드 예제를 확인하세요.