{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} 에셋 레퍼런스 소개 | Addressables | 1.21.17
docs.unity3d.com
"{0}"의 검색 결과

    목차 표시/숨기기

    에셋 레퍼런스 소개

    AssetReference는 어드레서블 에셋을 참조할 수 있는 유형입니다.

    MonoBehaviour 또는 ScriptableObject에서 AssetReference 클래스를 사용하십시오. 이러한 클래스 중 하나에 직렬화 가능한 AssetReference 필드를 추가하면 인스펙터 창에서 필드에 값을 할당할 수 있습니다. 필드에 할당할 수 있는 에셋을 유형 및 레이블별로 제한할 수 있습니다.

    이미지 대체 텍스트
    여러 AssetReference 필드가 표시된 인스펙터 창

    값을 할당하려면 에셋을 필드로 드래그하거나 오브젝트 피커 아이콘을 선택하여 어드레서블 에셋을 선택할 수 있는 다이얼로그를 엽니다.

    비 어드레서블 에셋을 AssetReference 필드에 드래그하면 시스템이 자동으로 해당 에셋을 어드레서블로 만들고 기본 어드레서블 그룹에 추가합니다. Sprite 및 SpriteAtlas 에셋은 서브 오브젝트를 가질 수 있습니다. 이러한 유형의 에셋에 할당된 AssetReference에는 참조할 서브 오브젝트를 지정하는 데 사용할 수 있는 추가 오브젝트 피커가 표시됩니다.

    프로젝트에서 AssetReference 유형을 사용하는 예시는 Addressables-Sample 저장소에서 기본 AssetReference, 컴포넌트 레퍼런스, Sprite Land 프로젝트를 참조하십시오.

    [!중요] 그룹의 에셋을 AssetReference 필드에 할당하려면 그룹의 Advanced Options에서 Include GUIDs in Catalog 프로퍼티를 활성화해야 합니다. Include GUIDs in Catalog 옵션은 기본적으로 활성화되어 있습니다. 자세한 내용은 콘텐츠 패킹 및 로딩 스키마 레퍼런스를 참조하십시오.

    AssetReference 유형

    어드레서블 API는 일반적인 에셋 유형에 대해 AssetReference 서브 클래스를 제공합니다. 일반 서브 클래스 AssetReferenceT<TObject>를 사용하여 AssetReference 필드를 다른 에셋 유형으로 제한할 수 있습니다.

    AssetReference 유형에는 다음이 포함됩니다.

    AssetReference 유형 설명
    AssetReference 모든 에셋 유형을 참조할 수 있습니다.
    AssetReferenceT<TObject> Can reference assets that are the same type as TObject
    AssetReferenceTexture Texture 에셋을 참조할 수 있습니다.
    AssetReferenceTexture2D Texture2D 에셋을 참조할 수 있습니다.
    AssetReferenceTexture3D Texture3D 에셋을 참조할 수 있습니다.
    AssetReferenceGameObject Prefab 에셋을 참조할 수 있습니다.
    AssetReferenceAtlasedSprite SpriteAtlas 에셋을 참조할 수 있습니다.
    AssetReferenceSprite 단일 Sprite 에셋을 참조할 수 있습니다.

    [!참고] 일반 AssetReferenceT와 함께 CustomPropertyDrawer를 사용하려고 하거나 2020.1 이전 버전의 Unity를 사용하고 있는 경우, 구체적인 서브 클래스를 생성하여 커스텀 AssetReference 유형을 지원해야 합니다.

    문서 개요
    맨 위로
    Copyright © 2023 Unity Technologies — 상표 및 이용약관
    • 법률정보
    • 개인정보처리방침
    • 쿠키
    • 내 개인정보 판매 금지
    • Your Privacy Choices (Cookie Settings)