Unity Addressables – Get started (Docs)

Addressables

https://docs.unity3d.com/Packages/com.unity.addressables@2.3/manual/index.html

Addressables package

The Addressables package provides tools and scripts to organize and package content for your application, and an API to load and release assets at runtime.
(Addressables package는 애플리케이션의 콘텐츠를 조작하고 패키지화하는 도구와 스크립트를 제공하며, 런타임에 자산을 로드하고 해제할 수 있는 API를 제공합니다.)

When you make an asset Addressable, you can use that asset’s address to load it from anywhere.
(자산을 Addressables로 만들면 해당 자산의 주소를 사용하여 어디서든 로드할 수 있습니다.)

Whether that asset resides in the local application or on a content delivery network, the Addressable system locates and returns it.
(이 Asset이 Local Application에 있든 Content 전송 네트워크에 있든, Addressables 시스템은 해당 자산을 찾아 반환합니다.)

Adopt the Addressables system to help improve your project in the following areas:
(Addressables 시스템을 채택하면 다음과 같은 영역에서 프로젝트를 개선할 수 있습니다.)

  • Flexibility: (유연성)
    Addressables give you the flexibility to adjust where you host your assets.
    (Addressables는 자산을 호스팅하는 위치를 조정할 수 있는 유연성을 제공합니다.)
    You can install assets with your application or download them on demand.
    (Application에서 자산을 설치하거나 필요할 때 다운로드할 수 있습니다.)
    You can change where you access a specific asset at any stage in your project without rewriting any game code.
    (프로젝트의 어느 단계에서는 특정 자산에 접근하는 위치를 변경할 수 있으며, 게임 코드를 다시 작성할 필요가 없습니다.)
  • Dependency management: (종속성 관리)
    The system automatically loads all dependencies of any assets you load, so that all meshes, shaders, animations, and other assets load before the system returns the content to you.
    (시스템을 로드하느 모든 Asset의 종속성을 자동으로 계산합니다, 모든 meshes, shaders, animations 및 기타 Asset이 로드된 후 콘텐츠를 반환합니다.)
  • Memory management: (메모리 관리)
    The system unloads and loads assets, and counts references automatically.
    (시스템은 Asset을 Unload하고 Load하며 참조를 자동으로 계산합니다.)
    The Addressables package also provides a Profiler to help you identify potential memory problems.
    (Addressables 패키지는 잠재적인 메모리 문제를 식별하는 데 도움이 되는 프로파일러도 제공합니다.)
  • Content packing: (콘텐츠 패킹)
    Because the system maps and understands complex dependency chains, it package AssetBundles efficiently, even when you move or rename assets.
    (시스템은 복잡한 종속성 체인을 매핑하고 이해하기 때문에 AssetBundles을 효율적으로 패키지합니다. 자산을 이동하거나 이름을 변경해도 효율적으로 작동합니다.)
    You can prepare assets for both local and remote deployment, to support downloadable content and reduced application size.
    (로컬 및 원격배포를 위해 자산을 준비하며 다운로드 가능한 콘텐츠 및 애플리케이션 크기 감소를 지원합니다.)

Note

The Addressables system builds on Unity’s AssetBundles.
(Adrressables 시스템은 AssetBundles을 기반으로 구축되었습니다.)
If you want to use AssetBundles in your projects without writing your own detailed management code, you should use Addressables.
(직접 관리 코드를 작성하지 않고 프로젝트에서 AssetBundles을 사용하려면 Addressables을 사용하는 것이 좋습니다.)


Get started

Contains getting started information to set up and use Addressables for the first time.
(Addressables을 처음 설정하고 사용하는데 필요한 정보를 포함하고 있습니다.)

TopicDescription
Addressables overview
Install AddressablesInstall the Addressables package.
(Addressables 패키지를 설치합니다.)
Make an asset AddressableMake assets Addressable.
(자산을 Addressable로 만듭니다.)
Configure your project to use AddressablesUpgrade an existing project to use Addressables.
(Addressables을 사용하도록 기존 프로젝트를 업그레이드합니다.)
Use an Addressable assetUnderstand the ways you can load and use Addressable assets.
(Addressable 자산을 로드하고 사용하는 방법을 이해합니다.)
Manage Addressable assetsManage Addressables with groups.
(그룹으로 Addressables를 관리합니다.)
Build Addressable assetsBuild and configure Addressables.
(Addressables을 빌드하고 구성합니다.)
Remote content distributionUnderstand how to distribute content remotely.
(원격으로 콘텐츠를 배포하는 방법을 이해합니다.)
Incremental content updatesUnderstand how to make a content update build.
(콘텐츠 업데이트 빌드를 만드는 방법을 이해합니다.)
Addressables samplesInformation about the samples contained in the Addressables package.
(Addressables 패키지에 포함된 샘플에 대한 정보입니다.)

Addressables overview

https://docs.unity3d.com/Packages/com.unity.addressables@2.3/manual/AddressableAssetsOverview.html

Addressables provides a system that can scale with your project.
(Addressables는 프로젝트와 함께 확장할 수 있는 시스템을 제공합니다.)

You can start with a simple setup and then reorganize as your project grows in complexity with minimal code changes.
(간단한 설정으로 시작한 후, 프로젝트가 복잡해짐에 따라 최소한의 코드 변경으로 재구성할 수 있습니다.)

For example, you can start with a single group of Addressable assets, which Unity loads as a set.
(예를 들어, 단일 그룹의 Addressables 자산으로 시작하여 Unity가 한 세트로 로드하게 할 수 있습니다. )

Then, as you add more content, you can split your assets into multiple groups so that you can load only the ones you need at a given time.
(이후 콘텐츠를 추가하면서 자산을 여러 그룹으로 분할하여 특정 시간에 필요한 자산만 로드할 수 있습니다.)

As your team grows in size, you can make separate Unity projects to develop different types of assets.
(팀이 커지면서, 다양한 유형의 자산을 개발하기 위해 별도의 Unity 프로젝트를 만들 수 있습니다.)

These auxiliary projects can produce their own Addressables content builds that you load from the main project.
(이러한 보조 프로젝트는 자체 Addressables 콘텐츠 빌드를 생성하여 메인 프로젝트에서 로드할 수 있습니다.)

Concepts (개념)

This overview discusses the following concepts to help you understand how to manage and use your assets with the Addressables system:
(이 개요에서 Addressables 시스템을 이용하여 자산을 관리하고 사용하는 방법을 이해하는데 도움이 되는 다음 개념을 논의 합니다.)

ConceptDescription
Addressables tools (Addressables 도구)The Addressables package has several windows and tools that you can use to organize, build, and optimize your content.
(Addressables 패키지에는 콘텐츠를 조직, 빌드 및 최적화하는 데 사용할 수 있는 여러 창과 도구가 있습니다.)
Asset address (Asset 주소)A string ID that identifies an Addressable asset. You can use an address as a key to load the asset.
(Addressable 자산을 식별하는 문자열 ID입니다. 주소를 키로 사용하여 Asset을 로드할 수 있습니다.)
Asset loading and unloading (Asset 로딩 및 해제)The Addressables API provides its own functions to load and release assets at runtime.
(Addressables API는 런타임에서 자산을 로드하고 해제하는 자체 함수를 제공합니다.)
Asset location (Asset 위치)A runtime object that describes how to load an asset and its dependencies.
(Asset 및 그 종속성을 로드하는 방법을 설명하는 런라임 객체입니다.)
You can use a location object as a key to load the asset.
(location 객체를 키로 사용하여 자산을 로드할 수 있습니다.)
AssetReferencesA type you can use to support the assignment of Addressable assets to fields in an Inspector window.
(인스펙터 창의 필드에 Addressables 자산을 할당하는 데 사용할 수 있는 유형입니다.)
You can use an AssetReference instance as a key to load the asset.
(AssetReference 인스턴스 키로 사용하여 자산을 로드할 수 있습니다.)
The AssetReference class also provides its own loading methods.
(AssetReference 클래스는 자체 로드 방법도 제공합니다.)
Content builds (콘텐츠 빌드)Use a content build to collate and package your assets as a separate step before you make a player build.
(플레이어 빌드를 만들기 전에 자산을 별도의 단계로 수집하고 패키지화 합니다.)
Content catalogs (콘텐츠 카탈로그)Addressables uses catalogs to map your assets to the resources that contain them.
(Addressables는 카탈로그를 사용하여 자산을 포함하는 리소스에 자산을 매핑합니다.)
Dependencies (종속성)An asset dependency is one asset used by another, such as a prefab used in a scene asset or a material used in a prefab asset.
(Asset 종속성은 다른 자산에서 사용되는 하나의 자산을 말합니다, 예를 들어, 씬 자산에서 사용되는 prefab 또는 prefab Asset에서 사용되는 소재 등이 있습니다.)
Dependency and resource management (종속성 및 리소스 관리)The Addressables system uses reference counting to track which assets and AssetBundles are in use, including whether the system loads or unloads dependencies (other referenced assets).
(Addressables 시스템은 참조 카운팅을 사용하여 어떤 Asset 및 AssetBundles이 사용중인지 추적합니다. 시스템이 종속성(다른 참조된 Asset)을 로드하거나 해제하는지를 포함합니다.)
GroupYou assign assets to groups in the Editor.
(에디터에서 자산을 그룹에 할당합니다.)
The group settings configure how Addressables packages the group assets into AssetBundles and how it loads them at runtime.
(그룹 설정은 Addressables이 AssetBundles에 그룹 자산을 패키지화하고 런타임에 로드하는 방식을 구성합니다.)
KeyAn object that identifies one or more Addressables.
(하나 이상의 Addressables을 식별하는 객체입니다.)
Keys include addresses, labels, AssetReference instances and location objects.
(Key에는 addresses, labels, AssetReference 인스턴스 및 위치 객체가 포함됩니다.)
LabelA tag that you can assign to multiple assets and use to load related assets together as a group.
(여러 Asset에 할당하고 관련 자산을 그룹으로 함께 로드하는 데 사용할 수 있는 테그입니다.)
You can use a label as a key to load the asset.
(label을 Key로 사용하여 Asset을 로드할 수 있습니다.)
Multiple platform support (다중 플랫폼 지원)The build system separates content built by platform and resolves the correct path at runtime.
(빌드 시스템은 플랫폼별로 콘텐츠를 분리하고 런타임에 올바른 경로를 해결합니다.)

By default, Addressables uses AssetBundles to package your assets. You can also implement your own IResourceProvider class to support other ways to access assets.
(기본적으로, Addressables는 자산을 패캐지화하기 위해 AssetBundles를 사용합니다. 자산에 접근하는 다른 방법을 지원하기 위해 자체 IResourceProvider 클래스를 구현할 수도 있습니다.)

Asset addresses (자산주소)

A key feature of the Addressables system is that you assign addresses to your assets and use those addresses to load them at runtime.
(Addressables 시스템의 주요 기능 중 하나는 자산에 주소를 할당하고 런타임에 해당 주소를 사용하여 자산을 로드하는 것입니다.)

The Addressables resource manager looks up the address in the content catalog to find out where the asset is stored.
(Addressables 리소스 관리자는 콘텐츠 카탈로그에서 주소를 찾아 자산이 저장된 위치를 확인합니다.)

Assets can be built-in to your application, cached locally, or hosted remotely.
(Asset은 Application에 내장되거나 local cache되거나, 원격으로 호스팅될 수 있습니다.)

The resource manager loads the asset and any dependencies, downloading the content first, if necessary.
(리소스 관리자는 자산 및 모든 종속성을 로드하며, 필요하다면 먼저 콘텐츠를 다운로드합니다.)

Addressables loads Assets by address no matter where they’re located
(Addressables은 자산이 어디에 있든지 주소를 통해 로드합니다)

Because an address isn’t tied to the physical location of the asset, you have several options to manage and optimize your assets, both in the Unity Editor and at runtime. 
(주소가 Asset의 물리적 위치와 연결되지 않기 떄문에, Unity 에디터와 런타임에서 자산을 관리하고 최적화할 수 있는 여러 가지 옵션이 있습니다.)

Catalogs map addresses to physical locations.
(Catalogs는 주소를 물리적 위치에 매핑합니다.)

Although it’s best practice to assign unique addresses to your assets, an asset address doesn’t have to be unique.
(Asset에 고유한 주소를 할당하는 것이 모범 사례이지만, Asset 주소는 고유할 필요가 없습니다.)

You can assign the same address string to more than one asset when useful.
(필요에 따라 동일한 주소 문자열을 여러 자산에 할당할 수 있습니다.)

For example, if you have variants of an asset, you can assign the same address to all the variants and use labels to distinguish between the variants:
(예를 들어, Asset의 변형이 있는 경우 동일한 주소를 모든 변형에 할당하고 라벨을 사용하여 변형을 구분할 수 있습니다.)

  • Asset 1: address: "plate_armor_rusty", label: "hd"
  • Asset 2: address: "plate_armor_rusty", label: "sd"

The Addressables API methods that only load a single asset, such as LoadAssetAsync, load the first instance found if you call them with an address assigned to multiple assets.
(한개의 Asset만 로드하는 Addressables API 매서드 (예: LoadAssetAsync)를 주소가 여러 Asset에 할당된 경우 호출하면 첫 번째 인스턴스를 로드합니다.)

Other methods, like LoadAssetsAsync, load multiple assets in one operation and load all the assets with the specified address.
(다른 매서드(예: LoadAssetsAsync)는 하나의 작업에서 여러 자산을 로드하며, 지정된 주소를 가진 모든 자산을 로드합니다.)

Tip

You can use the MergeMode parameter of LoadAssetsAsync to load the intersection of two keys.
(LoadAssetsAsyncMergeMode 매개변수를 사용하여 두 키의 교차점을 로드할 수 있습니다.)

In the earlier example, you can specify the address, "plate_armor_rusty", and the label, "hd", as keys and intersection as the merge mode to load Asset 1.
(이전 예제에서 주소 "plate_armor_rusty"와 라벨 “hd“를 키로 지정하고, 교차 모드를 병합 모드로 설정하여 Asset1을 로드할 수 있습니다.)

You can then change the label value to "sd" to load Asset 2.
(그런 다음 라벨 값을 "sd"로 변경하여 Asset2를 로드할 수 있습니다. )

For more information on how to assign addresses to assets, refer to Making an asset Addressable.
(Asset에 주소를 할당하는 방법에 대한 자세한 내용은 Making an asset Addressable을 참조하세요.)

For information on how to load assets by keys, including addresses, refer to Loading assets.
(키(주소 포함)를 사용하여 자산을 로드하는 방법에 대한 자세한 내용은 Loading assets를 참조하세요.)

AssetReference

An AssetReference is a type that you can set to any kind of Addressable asset.
(AssetReference은 어떤 종류의 Addressables Asset에도 설정할 수 있는 유형입니다.)

Unity doesn’t automatically load the asset assigned to the reference, so you have more control over when to load and unload it.
(Unity는 참조에 할당된 Asset을 자동으로 로드하지 않으므로, 언제 로드하고 해제할지 더 많이 제어할 수 있습니다.)

Use fields of type AssetReference in a MonoBehaviour or ScriptableObject to specify which Addressable asset to use for that field (instead of using the string that specifies the address).
(MonoBehaviour 또는 ScriptableObject 에서 AssetReference 유형의 필드를 사용하여 해당 필드에 사용할 Addressable Asset을 지정할 수 있습니다.(주소를 지정하는 문자열을 사용하는 대신) )

AssetReferences support drag-and-drop and object picker assignment, which makes them more convenient to use in an Editor Inspector.
(AssetReferences는 drag-and-drop 및 객체 선택 할당을 지원하므로, 에디터 인스펙터에서 더 편리하게 사용할 수 있습니다. )

Addressables also provides a few more specialized types, such as AssetReferenceGameObject and AssetReferenceTexture.
(Addressables은 AssetReferenceGameObjectAssetReferenceTexture와 같은 몇 가지 더 전문화된 유형도 제공합니다.)

You can use these specialized subclasses to prevent the possibility of assigning the wrong asset type to an AssetReference field.
(이러한 특수 하위 클래스를 사용하여 잘못된 자산 유형을 AssetReference 필드에 할당하는 가능성을 방지할 수 있습니다.)

You can also use the AssetReferenceUILabelRestriction attribute to limit assignment to assets with specific labels.
(또한 AssetReferenceUILabelRestriction 속성을 사용하여 특정 레벨이 있는 자산으로 할당을 제한할 수 있습니다.)

Refer to Using AssetReferences for more information.
(자세한 내용은 Using AssetReferences사용을 참조하세요.)

Asset loading and unloading (자산 로드 및 해제)

To load an Addressable asset, you can use its address or other key such as a label or AssetReference.
(Addressable Asset을 로드하려면 주소 또는 라벨이나 AssetReference와 같은 다른 키를 사용할 수 있습니다.)

Refer to Loading Addressable Assets for more information.
(자세한 내용은 Loading Addressable Assets를 참조하세요.)

You only need to load the main asset and Addressables loads any dependent assets automatically.
(Main Asset만 로드하면되고, Addressables은 모든 종속 Asset을 자동으로 로드합니다.)

When your application no longer needs access to an Addressable asset at runtime, you must release it so that Addressables can free the associated memory.
(Application이 런타임에 Addressables Asset에 더 이상 접근할 필요가 없을 때는 해당 Asset을 해제해야 Addressable이 관련 메모리를 해제할 수 있습니다.)

The Addressables system keeps a reference count of loaded assets, and doesn’t unload an asset until the reference count returns to zero.
(Addressables 시스템은 로드된 Asset의 참조 수를 유지하며, 참조 수가 0이 될 때까지 Asset을 해제하지 않습니다.)

As such, you don’t need to keep track of whether an asset or its dependencies are still in use.
(따라서, Asset이나 종속성이 여전히 사용 중인지 추적할 필요가 없습니다.)

You only need to make sure that any time you explicitly load an asset, you release it when your application no longer needs that instance.
(Asset을 명시적으로 로드할 때마다, Application에서 더 이상 해당 인스턴스를 필요로 하지 않으면 이를 해제해야 합니다.)

Refer to Releasing Addressable assets for more information.
(자세한 내용은 Releasing Addressable assets를 참조하세요.)

Dependency and resource management (종속성 및 리소스 관리)

One asset in Unity can depend on another. A scene might reference one or more prefabs, or a prefab might use one or more materials.
(Unity의 한 Asset은 다른 자산에 의존할 수 있습니다. 씬은 하나 이상의 프리팹을 참조할 수 있고, 프리팹은 하나 이상의 materials을 사용할 수 있습니다.)

One or more prefabs can use the same material, and those prefabs can exist in different AssetBundles.
(하나 이상의 프리팹이 동일한 Materials를 사용할 수 있으며, 이러한 프리팹은 서로 다른 AssetBundles에 존재할 수 있습니다.)

When you load an Addressable asset, the system automatically finds and loads any dependent assets that it references.
(Addressable Asset을 로드할 때, 시스템은 참조하는 모든 종속 Assert을 자동으로 찾아 로드합니다.)

When the system unloads an asset, it also unloads its dependencies, unless a different asset is still using them.
(시스템이 Asset을 해제할 때, 다른 Asset이 여전히 사용 중인 경우를 제외하고 종속 Asset도 함께 해제됩니다. )

As you load and release assets, the Addressables system keeps a reference count for each item. When an asset is no longer referenced, Addressables unloads it.
(Asset이 로드하고 해제할 때마다 Addressables 시스템은 각 항목의 참조 수를 유지합니다. Asset이 더 이상 참조되지 않으면 Addressables은 Asset을 해제합니다.)

If the asset was in a bundle that no longer has any assets that are in use, Addressables also unloads the bundle.
(만약 Asset이 사용되지 않는 번들에 포함되어 있는 경우, Addressables은 해당 번들도 함께 해제합니다.)

Refer to Memory management for more information.
(자세한 내용은 Memory management를 참조하세요.)

Addressables groups and labels (Addressables 그룹 및 라벨)

Use Addressables groups to organize your content. All Addressable assets belong to a group.
(Addressables 그룹을 사용하여 콘텐츠를 구성합니다. 모든 Addressable Asset들은 그룹에 속합니다. )

If you don’t explicitly assign an asset to a group, Addressables adds it to the default group.
(Asset을 명시적으로 그룹에 할당하지 않으면, Addresables은 이를 기본 그룹에 추가합니다.)

You can set the group settings to specify how the Addressables build system packages the assets in a group into bundles.
(그룹 설정을 통해 Addressables 빌드 시스템이 그룹 내 Asset을 번들로 패키지화하는 방식을 지정할 수 있습니다.)

For example, you can choose whether to pack all the assets in a group together in a single AssetBundle file.
(예를 들어, 그룹 내 모든 자산을 하나의 AssetBundle 파일에 함께 패키지화할지 선택할 수 있습니다.)

Use labels to tag content that you want to treat together in some way.
(라벨을 사용하여 특정 방식으로 함께 처리하는 콘텐츠에 태그를 지정합니다.)

For example, if you had labels defined for redhat, and feather, you can load all red hats with feathers in a single operation, whether they’re part of the same AssetBundle or not.
(예를들어,  redhat, and feather 라벨이 정의되어 있으면, 동일한 AssetBundle에 포함되지 않더라도 모든 빨간 모자에 깃털이 있는 Asset을 한 번에 로드할 수 있습니다,)

You can also use labels to decide how assets in a group are packed into bundles.
(또한 라벨을 사용하여 그룹 내 자산이 번들에 패키지화되는 방식을 결정할 수 있습니다.)

Add an asset to a group and move assets between groups using the Addressables Groups window.
Addressables Groups을 사용하여 자산을 그룹에 추가하고 그룹 간에 자산을 이동할 수 있습니다.)

You can also assign labels to your assets in the Groups window.
(그룹 창에서 자산에 라벨도 할당할 수 있습니다.)

Group schemas (그룹 스키마)

The schemas assigned to a group define the settings used to build the assets in a group.
(그룹에 할당된 스키마는 그룹 내 자산을 빌드하는 데 사용되는 설정을 정의합니다.)

Different schemas can define different groups of settings.
(다른 스키마는 다른 설정 그룹을 정의할 수 있습니다.)

For example, one standard schema defines the settings for how to pack and compress your assets into AssetBundles (among other options).
(예를 들어, 하나의 표준 스키마는 Asset을 AssetBundles로 패키지화하고 압축하는 설정을 정의합니다(기타 옵션 포함).)

Another standard schema defines which of the categories, Can Change Post Release and Cannot Change Post Release the assets in the group belong to.
(또 다른 표준 스키마는 그룹 내 Asset이 ‘ Can Change Post Release‘과 ‘ Cannot Change Post Release ‘ 중 어느 범주에 속하는지 정의합니다. )

You can define your own schemas to use with custom build scripts.
(사용자 지정 빌드 스크립트에서 사용할 스키마를 정의할 수 있습니다.)

Refer to Schemas for more information about group schemas.
(그룹 스키마에 대한 자세한 내용은 Schemas를 참조하세요 )

Content catalogs (콘텐츠 카탈로그)

The Addressables system produces a content catalog file that maps the addresses of your assets to their physical locations.
(Addressables 시스템은 Asset의 주소를 물리적 위치에 매핑하는 콘텐츠 카탈로그 파일을 생성합니다.)

It can also create a hash file containing the hash of the catalog.
(카탈로그의 해시를 포함하는 해시 파일을 생성할 수도 있습니다.)

If you’re hosting your Addressable assets remotely, the system uses this hash file to decide if the content catalog has changed and needs to download it.
(Addressable Asset을 원격으로 호스팅하는 경우, 시스템은 이 해시 파일을 사용하여 콘텐츠 카탈로그가 변경되었는지 확인하고 다운로드할 필요가 있는지 결정합니다.)

Refer to Content catalogs for more information.
(자세한 내용은 Content catalogs 참조하세요. )

The Profile selected when you perform a content build determines how the addresses in the content catalog map to resource loading paths.
(콘텐츠 빌드를 수행할 때 선택한 프로필은 콘텐츠 카탈로그의 주소가 리소스 로딩 경로에 매핑되는 방식을 결정합니다.)

Refer to Profiles for more information.
(자세한 내용은 Profiles를 참고하세요.)

For information about hosting content remotely, refer to Distributing content remotely.
(원격으로 콘텐츠를 호스팅하는 방법에 대한 자세한 내용은 Distributing content remotely를 참고하세요.)

Content builds (콘텐츠 빌드)

The Addressables system separates the building of Addressable content from the build of your player.
(Addressables 시스템은 Addressable 콘텐츠 빌드를 플레이어 빌드와 분리합니다.)

A content build produces the content catalog, catalog hash, and the AssetBundles containing your assets.
(콘텐츠 빌드는 콘텐츠 카탈로그, 카탈로그 해시 및 Asset이 포함된 AssetBundles를 생성합니다.)

Because asset formats are platform-specific, you must make a content build for each platform before building a player.
(Asset 형식이 플랫폼별이므로 플레이어 빌드를 만들기 전에 각 플랫폼에 대해 콘텐츠 빌드를 수행해야 합니다.)

Refer to Building Addressable content for more information.
(자세한 내용은 Building Addressable content를 참고하세요.)

Play mode scripts (플레이 모드 스크립트)

When you run your game or application in Play mode, it can be inconvenient and slow to always perform a content build before pressing the Play button.
(플레이 모드에서 게임이나 Application을 실행할 때, 플레이 버튼을 누르기 전에 항상 콘텐츠 빌드를 수행하는 것은 불편하고 느릴 수 있습니다.)

At the same time, you want to be able to run your game in a state as close to a built player as possible.
(동시에 빌드된 플레이어와 가능한 가까운 상태에서 게임을 실행할 수 있기를 원합니다.)

Addressables provides three options that decide how the Addressables system locates and loads assets in Play mode:
(Addressables은 플레이 모드에서 Asset을 찾고 로드하는 방식을 결정하는 세가지 옵션을 제공합니다.)

  • Use the Asset Database: (Asset 데이터베이스 사용)
    Addressables loads assets directly from the Asset Database.
    (Addressables는 Asset Database에서 직접 로드합니다.)
    This option typically provides the fastest iteration speed if you’re making both code and Asset changes, but also least resembles a production build.
    (해당 옵션은 코드와 자산을 모드 변경하는 경우 가장 빠른 반복 속도를 제공하지만, 제작 빌드와 가장 덜 유사합니다.)
  • Use existing build: (기존 빌드 사용)
    Addressables loads content from your last content build.
    (Addressables는 마지막 콘텐츠 빌드에서 콘텐츠를 로드합니다.)
    This option most resembles a production build and provides fast iteration turnaround if you aren’t changing assets.
    (해당 옵션은 제작 빌드와 가장 유사하며, Asset을 변경하지 않는 경우 빠른 반복 속도를 제공합니다.)

Refer to Play mode scripts for more information.
(자세한 내용은  Play mode scripts를 참조하세요.)

Addressables tools (Addressables 도구)

The Addressables system provides the following tools and windows to help you manage your Addressable assets:
(Addressables 시스템은 Addressable Asset을 관리하는 데 도움이 되는 다음 도구와 창을 제공합니다:)

  • Addressable Groups window: (Addressable 그룹 창)
    The main interface for managing assets, group settings, and making builds.
    (Asset, 그룹 설정 및 빌드를 관리하는 주요 인터페이스 입니다.)
  • Profiles window: (프로필 창)
    Helps set up paths used by your builds.
    (빌드에서 사용되는 경로를 설정하는 데 도움이 됩니다.)
  • Build layout report: (빌드 레이아웃 보고서)
    Describes the AssetBundles produced by a content build.
    (콘텐츠 빌드에서 생성된 Asset Bundles를 설명합니다.)
  • Analyze tool: (분석도구)
    the Analyze tool runs analysis rules that check whether your Addressables content conforms to the set of rules you have defined.
    (분석 도구는 정의한 규칙 세트에 Addressables 콘텐츠가 적합한지 확인하는 분석 규칙을 실행합니다.)
    The Addressables system provides some basic rules, such as checking for duplicate assets; you can add your own rules using the [AnalyzeRule] class.
    (Addressables 시스템은 중복 자산 확인과 같은 기본 규칙을 제공하며, [AnalyzeRule] 클래스를 사용하여 자체 규칙을 추가할 수 있습니다.)

Install Addressables

https://docs.unity3d.com/Packages/com.unity.addressables@2.3/manual/installation-guide.html

To install the Addressables package in your project, use the Package Manager:
(프로젝트에 Addressalbes 패키지를 설치하려면 Package Manager를 사용하세요:)

  1. Open the Package Manager (menu: Window > Package Manager).
    (Package Manager 열기: 메뉴에서 Window > Package Manager 선택.)
  2. Set the package list to display packages from the Unity Registry.
    (패키지 목록을 Unity Registry에서 표시되도록 설정.)
  3. Select the Addressables package in the list.
    (목록에서 Addressables 패키지 선택.)
  4. Click Install (at the bottom, right-hand side of the Package Manager window).
    (Package Manager 창의 오른쪽 하단에서 Install 클릭.)

To set up the Addressables system in your Project after installation, open the Addressables Groups window and click Create Addressables Settings.
(설치 후, 프로젝트에서 Addressables 시스템을 설정하려면 Addressables Groups 창을 열고 Create Addressables Settings 클릭.)

Before initializing the Addressables system in a Project
(프로젝트에서 Addressables system을 초기화하기 전)

When you run the Create Addressables Settings command, the Addressables system creates a folder called, AddressableAssetsData, in which it stores settings files and other assets it uses to keep track of your Addressables setup.
(Create Addressables Settings 명령을 실행하면, Addressables 시스템은 AddressableAssetsData라는 폴더를 생성하여 설정 파일과 기타 Asset을 저장하고 Addressables 설정을 추적합니다.)

You should add the files in this folder to your source control system.
(이 폴더의 파일들을 소스 컨트롤 시스템에 추가하세요.)

Note that Addressables can create additional files as you change your Addressables configuration.
(Addressables 설정을 변경하면 추가 파일이 생성될 수 있습니다. )

Refer to Addressables Settings for more information about the settings.
(자세한 정보는 Addressables Settings를 참고하세요.)

Note

For instructions on installing a specific version of Addressables or for general information about managing the packages in a Project, refer to Packages.
(특정 버전의 Addressables 설치나 프로젝트 내 패키지 관리에 대한 일반 정보는 Packages를 참조하세요.)

Configure your project to use Addressables
(프로젝트에 Addressables을 사용하도록 구성하기)

https://docs.unity3d.com/Packages/com.unity.addressables@2.3/manual/AddressableAssetsMigrationGuide.html

You can add Addressables to an existing Unity project by installing the Addressables package.
(Unity 프로젝트에 Addressables 패키지를 설치하여 Addressables를 추가할 수 있습니다.)

Once you’ve installed the package, you need to assign addresses to your assets and refactor any runtime loading code.
(패키지를 설치한 이후에, 자산에 주소를 할당하고 런타임 로딩 코드를 리팩터링해야 합니다.)

Although you can integrate Addressables at any stage in a project’s development, it’s best practice to start using Addressables immediately in new projects to avoid unnecessary code refactoring and content planning changes later in development.
(프로젝트의 개발의 어느 단계에서도 Addressables을 통합할 수 있지만, 불필요한 코드 리팩터링과 콘텐츠 계획 변경을 피하기 위해 새 프로젝트에서 바로 Addressables를 사용하는 것이 최선의 방법 입니다.)

Convert to Addressables
(Addressables로 변환하기)

Content built using Addressables only references other assets built in that Addressables build.
(Addressables를 사용하여 빌드된 콘텐츠는 해당 Addressables 빌드에서 빌드된 다른 Asset만 참조합니다.)

Content that’s used or referenced to which is included within both Addressables, and the Player build through the Scene data and Resource folders is duplicated on disk and in memory if they’re both loaded.
(Addressables와 Scene dataResource folders를 통해 플레이어 빌드에 포함된 콘텐츠가 디스크 및 메모리에서 중복됩니다.)

Because of this limitation, you must convert all Scene data and Resource folders to the Addressables build system.
(이러한 제한으로 인해 모든 Scene data와 Resource folders를 Addressables 빌드 시스템으로 변환해야 합니다.)

This reduces the memory overhead because of duplication and means you can manage all content with Addressables.
(이렇게 하면 중복으로 인한 메모리 오버헤드를 줄이고 모든 콘텐츠를 Addressables로 관리할 수 있습니다.)

This also means that the content can be either local or remote, and you can update it through content update builds.
(또한 콘텐트가 로컬이든 원격이든 상관없이 콘텐츠 업데이트 빌드를 통해 업데이트할 수 있습니다.)

To convert your project to Addressables, you need to perform different steps depending on how your current project references and loads assets:
(프로젝트를 Addressables로 변환하려면, 현재 프로젝트가 자산을 참조하고 로드하는 방식에 따라 다른 단계를 수행해야 합니다:)

  • Prefabs:
    Assets you create using GameObjects and components, and save outside a Scene.
    (GameObject와 컴포넌트를 사용하여 생성한 Asset으로, 씬 외부에 저장됩니다.)
    For information on how to upgrade prefab data to Addressables, refer to Convert prefabs.
    (Prefabs 데이터를 Addressables로 업그레이드하는 방법은 Convert prefabs를 참고하세요.)
  • AssetBundles:
    Assets you package in AssetBundles and load with the AssetBundle API.
    (AssetBundles API를 이용하여 패키지로 묶인 Asset입니다.)
    For information on how to upgrade AssetBundles to Addressables, refer to Convert AssetBundles
    (AssetBundles를 Addressables로 업그레이드하는 방법은 Convert AssetBundles를 참고하세요.)
  • StreamingAssets:
    Files you place in the StreamingAssets folder.
    (StreamingAssets  폴더에 배치한 파일입니다.)
    Unity includes any files in the StreamingAssets folder in your built player application as is.
    (Unity는 StreamingAssets 폴더의 모든 파일을 빌드된 플레이어 애플리케이션에 그대로 포함시킵니다.)
    For information, refer to Files in StreamingAssets
    (자세한 정보는 Files in StreamingAssets를 참고하세요.)

Convert scene data (Scene data 변환하기)

To convert scene data to Addressable, move the scenes out of the Build Settings list and make those scenes Addressable.
(Scene data를 Addressables로 변환하려면, Scene을 Build Settings 목록에서 제거하고 Addressalbles로 만들어야 합니다.)

You must have one scene in the list, which is the scene Unity loads at application startup.
(목록에 하나의 Scene이 있어야 하며, 이는 Application 시작 시 Unity가 로드하는 Scene입니다.)

You can make a new scene for this that does nothing else than load your first Addressable scene.
(이를 위해 첫 번째 Addressables Scene만 로드하는 새로운 Scene을 만들 수 있습니다.)

To convert your scenes:
(Scene을 변환하려면:)

  1. Create a new initialization scene.
    (새 초기화 Scene은 만듭니다.)
  2. Open the Build Settings window (menu: File > Build Settings).
    (Build Settings 창을 엽니다(메뉴:  File > Build Settings))
  3. Add the initialization scene to the scene list.
    (초기화 Scene을 Scene목록에 추가합니다.)
  4. Remove the other scenes from the list.
    (다른 Scene을 목록에서 제거합니다.)
  5. Select each scene in the project list and enable the Addressable option in its Inspector window.
    (프로젝트 목록의 각 Scene을 선택하고 Inspector 창에서 Addressable 옵션을 활성화합니다.)
    Or, you can drag scene assets to a group in the Addressables Groups window. Don’t make your new initialization scene Addressable.
    (또는 Addressables Groups 창에서 Scene Asset을 그룹으로 드래그할 수 있습니다. 새 초기화 Scene을 Addressable로 만들지 마세요.)
  6. Update the code you use to load Scenes to use the Addressables class scene loading methods rather than the SceneManager methods.
    (Scene 로드에 사용되는 코드를 SceneManager 메서드 대신 Addressables 클래스 Scene 로딩 메서드를 사용하도록 업데이트합니다.)

You can now split your one, large Addressable Scene group into multiple groups.
(이제 하나의 큰 Addressable Scene 그룹을 여러 그룹으로 나눌 수 있습니다.)

The best way to do that depends on the project goals.
(진행 방법은 프로젝트 목표에 따라 다릅니다.)

To proceed, you can move your Scenes into their own groups so that you can load and unload each of them independently of each other.
(프로젝트를 진행하려면, 각 Scene을 개별 그룹으로 이동하여 독립적으로 로드 및 해제할 수 있도록 합니다. )

You can avoid duplicating an asset referenced from two different bundles by making the asset itself Addressable.
(두 개의 다른 bundle에서 참조된 Asset이 중복되지 않도록 하려면, Asset 자체를 Addressable로 만드세요. )

It’s often better to move shared assets to their own group as well to reduce dependencies among AssetBundles.
(또한 AssetBundles 간의 종속성을 줄이기 위해 공유 Asset을 자체 그룹으로 이동하는 것이 좋습니다.)

To avoid duplicating an asset referenced from two different bundles, make the asset Addressable.
(두 개의 다른 번들에서 참조된 Asset이 중복되지 않도록 하려면, Asset 자체를 Addressable로 만드세요.)

It’s often better to move shared assets to their own group to reduce the amount of dependencies among your AssetBundles.
(또한 공유 Asset을 자체 그룹으로 이동하여 AssetBundles 간의 종속성을 줄이는 것이 좋습니다.)

Use Addressable assets in non-Addressable scenes
(Addressable이 아닌 scene에서 Addressable Asset 사용하기)

For any scenes that you don’t want to make Addressable, you can still use Addressable assets as part of the Scene data through AssetReferences.
(Addressable로 만들지 않은 Scene에서도 AssetReferences를 통해 Scene 데이터의 일부로 Addressable Asset을 사용할 수 있습니다. )

When you add an AssetReference field to a custom MonoBehaviour or ScriptableObject class, you can assign an Addressable asset to the field in the Unity Editor in a similar way that you assign an asset as a direct reference.
(사용자 정의 MonoBehaviour 또는 ScriptableObject 클래스에 AssetReference 필드를 추가하면, Unity Editor에서 자산을 직접 참조하는 것과 유사하게 해당 필드에 Addressable Asset을 할당할 수 있습니다.)

The main difference is that you need to add code to your class to load and release the asset assigned to the AssetReference field (whereas Unity loads direct references automatically when it instantiates your object in the Scene).
(주요 차이점은 클래스에 AssetReference 필드에 할당된 Asset을 로드하고 해제하는 코드를 추가해야 한다는 점입니다.
(Unity는 Scene에서 객체를 인스턴스화할 때 직접 참조를 자동으로 로드합니다))

NOTE

You can’t use Addressable assets for the fields of any UnityEngine components in a non-Addressable scene.
(Addressables Asset을 Addressable이 아닌 Scene의 UnityEngine 컴포넌트 필드에 사용할 수 없습니다.)

For example, if you assign an Addressable mesh asset to a MeshFilter component in a non-Addressable Scene, Unity doesn’t use the Addressable version of that mesh data for the Scene.
(예를 들어, Addressable 메시 자산을 Addressable이 아닌 씬의 MeshFilter 컴포넌트에 할당하면 Unity는 해당 메시 데이터의 Addressable 버전을 사용하지 않습니다. )

Instead, Unity copies the mesh asset and includes two versions of the mesh in your application:
(대신 Unity는 메시 자산을 복사하여 애플리케이션에 두 가지 버전의 메시를 포함시킵니다:)

one in the AssetBundle built for the Addressable group that contains the mesh, and one in the built-in Scene data of the non-Addressable scene.
(하나는 메시를 포함하는 Addressable 그룹용 AssetBundle에 포함되고, 다른 하나는 Addressable이 아닌 Scene 데이터에 포함됩니다.)

When used in an Addressable Scene, Unity doesn’t copy the mesh data and always loads it from the AssetBundle.
(Addressable Scene에서 사용될 때 Unity는 메시 데이터를 복사하지 않고 항상 AssetBundle에서 로드합니다.)

To replace direct references with AssetReferences in your custom classes, follow these steps:
(커스텀 클래스에서 직접 참조를 AssetReference로 대체하려면 다음 단계를 따르세요:)

  1. Replace your direct references to objects with asset references (for example, public GameObject directRefMember; becomes public AssetReference assetRefMember;).
    (객체에 대한 직접 참조를 Asset 참조로 대체합니다 (예: public GameObject directRefMember;를 public AssetReference assetRefMember;로 변경).)
  2. Drag assets onto the appropriate component’s Inspector, as you would for a direct reference.
    (직접 참조처럼 적절한 컴포넌트의 Inspector로 Asset을 드래그합니다.)
  3. Add runtime code to load the assigned asset using the Addressables API.
    (Addressables API를 사용하여 할당된 Asset을 로드하기 위한 런타임 코드를 추가합니다.)
  4. Add code to release the loaded asset when no longer needed.
    (더 이상 필요하지 않은 로드된 자산을 해제하는 코드를 추가합니다.)

For more information about using AssetReference fields, refer to Asset references.
(AssetReference 필드에 대한 자세한 정보는 Asset references를 참고하세요.)

For more information about loading Addressable assets, refer to Loading Addressable assets.
(Loading Addressable asset에 대한 자세한 정보는 Loading Addressable assets를 참고하세요.)

Convert prefabs (프리펩 변환)

To convert a prefab into an Addressable asset, enable the Addressables option in its Inspector window or drag it to a group in the Addressables Groups window.
(프리팹을 Addressable asset으로 변환하려면, Inspector 창에서 Addressables 옵션을 활성화하거나 Addressables Groups 창에서 그룹으로 드래그하세요.)

You don’t always need to make prefabs Addressable when used in an Addressable scene.
(Addressable Scene에서 사용할 때는 항상 프리팹을 Addressable로 만들 필요는 없습니다.)

Addressables automatically includes prefabs that you add to the scene hierarchy as part of the data contained in the scene’s AssetBundle.
(Addressables는 scene 계층 구조에 추가된 프리팹을 자동으로 scene의 AssetBundle에 포함된 데이터의 일부로 포함시킵니다.)

If you use a prefab in more than one scene, make the prefab into an Addressable asset so that the prefab data isn’t duplicated in each scene that uses it.
(만약 프리팹을 여러 scene에서 사용한다면, 각 scene에서 프리팹 데이터가 중복되지 않도록 Addressable asset으로 만들어야 합니다. )

You must also make a prefab Addressable if you want to load and instantiate it dynamically at runtime.
(런타임에 동적으로 로드하고 인스턴스화하려면 프리팹을 Addressable로 만들어야 합니다.)

Note

If you use a Prefab in a non-Addressable Scene, Unity copies the Prefab data into the built-in Scene data whether the Prefab is Addressable or not.
(Addressable이 아닌 Scene에서 프리팹을 사용할 경우, Unity는 프리팹 데이터를 Scene 데이터에 복사합니다. 
프리팹이 Addressable이든 아니든 상관없이 이 작업이 이루어집니다.)

Convert the Resources folder (Resources folder 변환하기)

If your project loads assets in Resources folders, you can migrate those assets to the Addressables system:
프로젝트에서 Resources 폴더의 asset을 로드하는 경우, 해당 asset을 Addressables 시스템으로 이동할 수 있습니다:

  1. Make the assets Addressable.
    (asset을 Addressable로 만드세요.)
    To do this, either enable the Addressable option in each asset’s Inspector window or drag the assets to groups in the Addressables Groups window.
    (이를 위해 각 자산의 Inspector 창에서 Addressable 옵션을 활성화하거나 Addressables Groups 창에서 그룹으로 드래그하세요.)
  2. Change any runtime code that loads assets using the Resources API to load them with the Addressables API.
    (Resources API를 사용하여 asset을 로드하는 모든 런타임 코드를 Addressables API를 사용하도록 변경하세요.)
  3. Add code to release loaded assets when no longer needed.
    (더 이상 필요하지 않을 때 로드된 asset을 해제하는 코드를 추가하세요.)

As with scenes, if you keep all the former Resources assets in one group, the loading and memory performance should be equivalent.
(Scene과 마찬가지로, 이전 Resources asset을 하나의 그룹에 유지하면 로딩 및 메모리 성능이 동일하게 유지됩니다. )

When you mark an asset in a Resources folder as Addressable, the system automatically moves the asset to a new folder in your project named Resources_moved.
(Resources 폴더의 asset을 Addressable로 표시하면, 시스템은 해당 asset을 프로젝트의 새로운 폴더인 Resources_moved로 자동 이동합니다.)

The default address for a moved asset is the old path, omitting the folder name. For example, your loading code might change from:
(이동된 asset의 기본 주소는 폴더 이름을 생략한 이전 경로입니다. 예를 들어, 로딩 코드가 다음과 같이 변경될 수 있습니다:)

Resources.LoadAsync\<GameObject\>("desert/tank.prefab");

to:

Addressables.LoadAssetAsync\<GameObject\>("desert/tank.prefab");.

You might have to implement some functionality of the Resources class differently after modifying your project to use the Addressables system.
(프로젝트를 Addressables 시스템으로 수정한 후, Resources 클래스의 일부 기능을 다르게 구현해야 할 수도 있습니다.)

For example, consider the Resources.LoadAll method.
(예를 들어, Resources.LoadAll 메서드를 생각해 보세요.)

Previously, if you had assets in a folder named Resources/MyPrefabs/, and ran Resources.LoadAll\<SampleType\>("MyPrefabs");, it would have loaded all the assets in Resources/MyPrefabs/ matching type SampleType.
(이전에는 Resources/MyPrefabs/ 라는 폴더에 자산이 있고 Resources.LoadAll\<SampleType\>("MyPrefabs");를 실행하면, SampleType과 일치하는 Resources/MyPrefabs/의 모든 asset을 로드했습니다.)

The Addressables system doesn’t support this exact functionality, but you can achieve similar results using Addressable labels.
(Addressables 시스템은 이 정확한 기능을 지원하지 않지만, Addressable labels을 사용하여 유사한 결과를 얻을 수 있습니다.)

Convert AssetBundles (AssetBundles 변환)

When you first open the Addressables Groups window, Unity offers to convert all AssetBundles into Addressables groups.
(처음 Addressables Groups 창을 열면, Unity는 모든 AssetBundles를 Addressables 그룹으로 변환할 것을 제안합니다. )

This is the easiest way to migrate your AssetBundle setup to the Addressables system.
(이는 AssetBundle 설정을 Addressables 시스템으로 마이그레이션하는 가장 쉬운 방법입니다.)

You must still update your runtime code to load and release assets using the Addressables API.
(여전히 Addressables API를 사용하여 런타임 코드에서 자산을 로드하고 해제하도록 업데이트해야 합니다.)

If you want to convert your AssetBundle setup manually, click the Ignore button.
(AssetBundle 설정을 수동으로 변환하려면 Ignore 버튼을 클릭하세요.)

The process for manually migrating your AssetBundles to Addressables is similar to that described for scenes and the Resources folder:
(AssetBundles를 Addressables로 수동 마이그레이션하는 과정은 Scene과 Resources 폴더에 대해 설명된 것과 유사합니다:)

  1. Make the assets Addressable by enabling the Addressable option on each asset’s Inspector window or by dragging the asset to a group in the Addressables Groups window.
    (각 자산의 Inspector 창에서 Addressable 옵션을 활성화하거나 Addressables Groups 창에서 자산을 그룹으로 드래그하여 asset을 Addressable로 만드세요.)
    The Addressables system ignores existing AssetBundle and label settings for an asset.
    (Addressables 시스템은 asset의 기존 AssetBundle 및 레이블 설정을 무시합니다.)
  2. Change any runtime code that loads assets using the AssetBundle or UnityWebRequestAssetBundle APIs to load them with the Addressables API.
    AssetBundle 또는 UnityWebRequestAssetBundle API를 사용하여 asset을 로드하는 모든 런타임 코드를 Addressables API를 사용하도록 변경하세요.)
    You don’t need to explicitly load AssetBundle objects themselves or the dependencies of an asset; the Addressables system handles those aspects automatically.
    (AssetBundle 객체 자체나 자산의 종속성을 명시적으로 로드할 필요는 없습니다; Addressables 시스템이 이 부분을 자동으로 처리합니다.)
  3. Add code to release loaded assets when no longer needed.
    (더 이상 필요하지 않을 때 로드된 asset을 해제하는 코드를 추가하세요.)

Note

The default path for the address of an asset is its file path.
(asset의 기본 경로는 파일 경로입니다.)

If you use the path as the asset’s address, you’d load the asset in the same manner as you would load from a bundle.
(경로를 asset의 주소로 사용할 경우, 번들에서 로드하는 것과 동일한 방식으로 asset을 로드할 수 있습니다. )

The Addressable asset system handles the loading of the bundle and all its dependencies.
(Addressable asset 시스템은 번들과 모든 종속성의 로딩을 처리합니다.)

If you chose the automatic conversion option or manually added your assets to equivalent Addressables groups, then, depending on your group settings, you end up with the same set of bundles containing the same assets.
(자동 변환 옵션을 선택했거나 asset을 수동으로 동일한 Addressables 그룹에 추가한 경우, 그룹 설정에 따라 동일한 asset을 포함하는 동일한 번들 세트를 얻게 됩니다.)

The bundle files themselves won’t be identical.
(번들 파일 자체는 동일하지 않습니다.)

Files in StreamingAssets (StreamingAssets의 파일)

You can continue to load files from the StreamingAssets folder when you use the Addressables system.
(Addressables 시스템을 사용할 때도 StreamingAssets 폴더에서 파일을 계속 로드할 수 있습니다.)

However, the files in this folder can’t be Addressable nor can they reference other assets in your project.
(그러나 이 폴더의 파일은 Addressable이 될 수 없으며 프로젝트의 다른 asset을 참조할 수 없습니다. )

The Addressables system places its runtime configuration files and local AssetBundles in the StreamingAssets folder during a build.
(Addressables 시스템은 빌드 중에 런타임 구성 파일 및 로컬 AssetBundles를 StreamingAssets 폴더에 배치합니다.)

Addressables removes these files at the conclusion of the build process and you won’t see them in the Editor.
(Addressables는 빌드 프로세스가 끝나면 이러한 파일을 제거하므로 Editor에서는 보이지 않습니다.)

Make an asset Addressable (Asset을 Addressable로 만들기)

You can make an asset as Addressable in the following ways:
(asset을 Addressable로 만드는 방법은 다음과 같습니다:)

– Enable the Addressable setting in the asset’s Inspector:
(asset의 Inspector에서 Addressable 설정 활성화:)

– Drag or assign the asset to an AssetReference field in an Inspector:
(Inspector에서 asset을 AssetReference 필드로 드래그하거나 할당:)

– Drag the asset into a group on the Addressables Groups window:
(Addressables Groups 창에서 그룹에 자산을 드래그:)

– Put the asset in a Project folder that’s marked as Addressable:
(Addressable로 표시된 프로젝트 폴더에 asset 배치:)

Once you make an asset Addressable, the Addressables system adds it to a default group, unless you place it in a specific group.
(asset을 Addressable로 만들면, Addressables 시스템이 기본 그룹에 추가합니다, 단, 특정 그룹에 배치하지 않은 경우에 한합니다. )

Addressables packs assets in a group into AssetBundles according to your group settings when you make a content build.
content build를 만들 때 Addressables는 그룹 설정에 따라 자산을 AssetBundles로 패킹합니다. )

You can load these assets using the Addressables API.
(이러한 자산은 Addressables API를 사용하여 로드할 수 있습니다.)

Note

If you make an asset in a Resources folder Addressable, Unity moves the asset out of the Resources folder.
(Resources folder에 있는 asset을 Addressable로 만들면, Unity는 해당 asset을 Resources folder에서 이동합니다.)

You can move the asset to a different folder in your Project, but you cannot store Addressable assets in a Resources folder.
(asset을 프로젝트의 다른 폴더로 이동할 수는 있지만, Resources folder에 Addressable asset을 저장할 수는 없습니다.)

Use an Addressable asset (Addressable asset 사용하기)

To load and use an Addressable asset, you can:
(Addressable asset을 로드하고 사용하려면 다음 방법을 사용할 수 있습니다:)

Refer to Loading assets for more detailed information about loading Addressable assets.
(Addressable asset 로드에 대한 자세한 정보는 Loading assets를 참조하세요.)

Loading Addressable assets uses asynchronous operations.
(Addressable asset 로드는 비동기 작업을 사용합니다)

Refer to Operations for information about the different ways to approach asynchronous programming in Unity scripts.
(Unity 스크립트에서 비동기 프로그래밍에 접근하는 다양한 방법에 대한 정보는 Operations를 참조하세요.)

Tip: You can find more involved examples of how to use Addressable assets in the Addressables Sample repository.
(팁: Addressable asset 사용에 대한 더 복잡한 예제는 Addressables Sample repository에서 찾을 수 있습니다.)

Use AssetReferences (AssetReferences 사용하기)

To use an AssetReference, add an AssetReference field to a MonoBehaviour or ScriptableObject.
(AssetReference 를 사용하려면, AssetReference 필드를 MonoBehaviour 또는 ScriptableObject 에 추가하세요.)

After you create an object of that type, you can assign an asset to the field in your object’s Inspector window.
(그런 유형의 객체를 만든 후, 객체의 Inspector 창에서 필드에 asset을 할당할 수 있습니다.)

Note

If you assign a non-Addressable asset to an AssetReference field, Unity automatically makes that asset Addressable and adds it to your default Addressables group.
(AssetReference 필드에 Addressable이 아닌 asset을 할당하면, Unity는 해당 자산을 자동으로 Addressable로 만들고 기본 Addressables 그룹에 추가합니다.)

AssetReferences also let you use Addressable assets in a Scene that isn’t itself Addressable.
(AssetReferences를 사용하면 Addressable이 아닌 Scene에서도 Addressable 자산을 사용할 수 있습니다.)

Unity doesn’t load or release the referenced asset automatically; you must load and release the asset using the Addressables API:
(Unity는 참조된 asset을 자동으로 로드하거나 해제하지 않습니다. Addressables API를 사용하여 자산을 로드하고 해제해야 합니다.)

using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;

internal class LoadWithReference : MonoBehaviour
{
    // 에디터에서 할당
    public AssetReference reference;

    // 시작 시 로드 작업 시작
    void Start()
    {
        // 비동기로 자산 로드 시작
        AsyncOperationHandle handle = reference.LoadAssetAsync<GameObject>();
        // 로드 작업 완료 시 이벤트 핸들러 연결
        handle.Completed += Handle_Completed;
    }

    // 로드된 프리팹을 인스턴스화
    private void Handle_Completed(AsyncOperationHandle obj)
    {
        if (obj.Status == AsyncOperationStatus.Succeeded)
        {
            // 로드 성공 시 프리팹 인스턴스화
            Instantiate(reference.Asset, transform);
        }
        else
        {
            // 로드 실패 시 에러 로그 출력
            Debug.LogError($"AssetReference {reference.RuntimeKey} failed to load.");
        }
    }

    // 부모 객체가 파괴될 때 자산 해제
    private void OnDestroy()
    {
        reference.ReleaseAsset();
    }
}

Refer to Loading an AssetReference for additional information about loading AssetReferences.
(AssetReference 로드에 대한 추가 정보는 Loading an AssetReference 를 참조하세요.)

Load by address (주소로 로드하기)

You can use the address string to load an asset:
(asset을 로드하기 위해 주소 문자열을 사용할 수 있습니다:)

using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;

internal class LoadWithAddress : MonoBehaviour
{
    // 에디터 또는 코드에서 할당
    public string address;

    // 자산과 작업을 해제하기 위해 핸들 유지
    private AsyncOperationHandle<GameObject> handle;

    // 시작 시 로드 작업 시작
    void Start()
    {
        // 비동기로 자산 로드 시작
        handle = Addressables.LoadAssetAsync<GameObject>(address);
        // 로드 작업 완료 시 이벤트 핸들러 연결
        handle.Completed += Handle_Completed;
    }

    // 로드된 프리팹을 인스턴스화
    private void Handle_Completed(AsyncOperationHandle<GameObject> operation)
    {
        if (operation.Status == AsyncOperationStatus.Succeeded)
        {
            // 로드 성공 시 프리팹 인스턴스화
            Instantiate(operation.Result, transform);
        }
        else
        {
            // 로드 실패 시 에러 로그 출력
            Debug.LogError($"Asset for {address} failed to load.");
        }
    }

    // 부모 객체가 파괴될 때 자산 해제
    private void OnDestroy()
    {
        handle.Release();
    }
}

Remember that every time you load an asset, you must also release it.
(asset을 로드할 때마다 반드시 해제해야 한다는 점을 기억하세요.)

Refer to Loading a single asset for more information.
(단일 asset 로드에 대한 자세한 정보는 Loading a single asset을 참조하세요.)

Load by label (레이블로 로드하기)

You can load sets of assets that have the same label in one operation:
(하나의 작업으로 동일한 레이블이 있는 asset 세트를 로드할 수 있습니다:)

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;

internal class LoadWithLabels : MonoBehaviour
{
    // 로드할 레이블 문자열 목록
    public List<string> keys = new List<string>() { "characters", "animals" };

    // 자산 로드 및 해제에 사용되는 작업 핸들
    AsyncOperationHandle<IList<GameObject>> loadHandle;

    // 레이블로 Addressables 로드
    void Start()
    {
        float x = 0, z = 0;
        // 여러 레이블 또는 단일 레이블 키를 사용하여 자산 비동기로 로드
        loadHandle = Addressables.LoadAssetsAsync<GameObject>(
            keys,
            addressable =>
            {
                // 로드된 모든 자산에 대해 호출됨
                if (addressable != null)
                {
                    Instantiate<GameObject>(addressable,
                        new Vector3(x++ * 2.0f, 0, z * 2.0f),
                        Quaternion.identity,
                        transform);
                    if (x > 9)
                    {
                        x = 0;
                        z++;
                    }
                }
            }, 
            Addressables.MergeMode.Union, // 여러 레이블을 결합하는 방법
            false // 어떤 자산이 로드 실패할 경우 실패 여부
        );
        // 로드 작업이 완료되면 이벤트 핸들러 연결
        loadHandle.Completed += LoadHandle_Completed;
    }

    // 로드된 프리팹을 인스턴스화
    private void LoadHandle_Completed(AsyncOperationHandle<IList<GameObject>> operation)
    {
        if (operation.Status != AsyncOperationStatus.Succeeded)
            Debug.LogWarning("Some assets did not load."); // 일부 자산이 로드되지 않음
    }

    // 부모 객체가 파괴될 때 로드된 모든 자산 해제
    private void OnDestroy()
    {
        loadHandle.Release();
    }
}

See Loading multiple assets for more information.
(자세한 정보는 Loading multiple assets를 참고하세요.)

Build Addressable assets (Addressable assets 빌드하기)

https://docs.unity3d.com/Packages/com.unity.addressables@2.3/manual/get-started-build-addressables.html

The Addressables content build step converts the assets in your Addressables groups into AssetBundles based on the group settings and the current platform set in the Unity Editor.
(Addressables 콘텐츠 빌드 단계는 Addressables 그룹의 자산을 group settings 및 Unity Editor에 설정된 현재 플랫폼에 따라 AssetBundles로 변환합니다.)

You can configure the Addressables system to build your Addressables content as part of every Player build or you can build your content separately before making a Player build.
(Addressables 시스템을 구성하여 모든 플레이어 빌드의 일부로 Addressables 콘텐츠를 빌드하거나, 플레이어 빌드를 만들기 전에 별도로 콘텐츠를 빌드할 수 있습니다.)

Refer to Building Addressables content with Player builds for more information about configuring these options.
(이러한 옵션을 구성하는 방법에 대한 자세한 정보는 Building Addressables content with Player builds를 참조하세요.)

If you configure Unity to build your content as part of the Player build, use the normal Build or Build and Run buttons in the Editor Build Settings window to start a build.
(Unity가 콘텐츠를 플레이어 빌드의 일부로 빌드하도록 구성한 경우, Editor Build Settings 창에서 일반적인 Build 또는 Build and Run 버튼을 사용하여 빌드를 시작하세요.)

Unity builds your Addressables content as a pre-build step before it builds the Player.
(Unity는 플레이어를 빌드하기 전에 Addressables 콘텐츠를 사전 빌드 단계로 빌드합니다.)

In earlier versions of Unity, or if you configure Unity to build your content separately, you must make an Addressables build using the Build menu on the Addressables Groups window.
(이전 버전의 Unity를 사용하거나, 콘텐츠를 별도로 빌드하도록 Unity를 구성한 경우, Addressables Groups 창의 Build 메뉴를 사용하여 Addressables 빌드를 수행해야 합니다.)

The next time you build the Player for your project, it uses the artifacts produced by the last Addressables content build run for the current platform.
(프로젝트의 플레이어를 다음에 빌드할 때, 현재 플랫폼에 대해 마지막으로 실행된 Addressables 콘텐츠 빌드의 아티팩트를 사용합니다.)

To start a content build from the Addressables Groups window:
(Addressables Groups 창에서 콘텐츠 빌드를 시작하려면:)

  1. Open the Addressables Groups window (menu: Windows > Asset Management > Addressables > Groups).
    (Addressables Groups 창을 열고 (메뉴: Windows > Asset Management > Addressables > Groups))
  2. Choose an option from the Build menu:
    (Build menu에서 옵션을 선택하세요:)
    • New Build:
      perform a build with a specific build script. Use the Default Build Script if you don’t have your own custom one.
      (특정 빌드 스크립트를 사용하여 빌드를 수행합니다. 사용자 정의 스크립트가 없는 경우 Default Build Script를 사용하세요.)
    • Update a Previous Build:
      builds an update based on an existing build.
      (기존 빌드를 기반으로 업데이트를 빌드합니다.)
      To update a previous build, the Addressables system needs the addressables_content_state.bin file produced by the earlier build.
      (이전 빌드를 업데이트하려면 Addressables 시스템이 이전 빌드에서 생성된 addressables_content_state.bin 파일이 필요합니다.)
      You can find this file in the Assets/AddressableAssetsData/Platform folder of your Unity Project.
      (이 파일은 Unity 프로젝트의 Assets/AddressableAssetsData/Platform 폴더에서 찾을 수 있습니다. )
      Refer to Content Updates for more information about updating content.
      (콘텐츠 업데이트에 대한 자세한 내용은 Content Updates를 참조하세요.)
    • Clean Build:
      deletes cached build files.
      (캐시된 빌드 파일을 삭제합니다.)

By default, the build creates files in the locations defined in your Profile settings for the LocalBuildPath and RemoteBuildPath variables.
(기본적으로 빌드는 LocalBuildPath 및 RemoteBuildPath 변수에 대해 Profile 설정에 정의된 위치에 파일을 생성합니다. )

The files that Unity uses for your player builds include AssetBundles (.bundle), catalog JSON and hash files, and settings files.
(플레이어 빌드에 사용되는 파일에는 AssetBundles(.bundle), 카탈로그 JSON 및 해시 파일, 설정 파일이 포함됩니다.)

Warning

Don’t change the local build or load paths from their default values.
(로컬 빌드 또는 로드 경로를 기본값에서 변경하지 마세요.)

If you do, you must copy the local build artifacts from your custom build location to the project’s StreamingAssets folder before making a Player build.
(변경할 경우, 플레이어 빌드를 만들기 전에 사용자 정의 빌드 위치에서 프로젝트의 StreamingAssets 폴더로 로컬 빌드 아티팩트를 복사해야 합니다.)

Altering these paths also precludes building your Addressables as part of the Player build.
(이러한 경로를 변경하면 Addressables를 플레이어 빌드의 일부로 빌드할 수 없습니다.)

If you have groups that you build to the RemoteBuildPath, you must upload those AssetBundles, catalog, and hash files to your hosting server.
(RemoteBuildPath에 빌드하는 그룹이 있는 경우, 해당 AssetBundles, 카탈로그 및 해시 파일을 호스팅 서버에 업로드해야 합니다.)

If your Project doesn’t use remote content, set all groups to use the local build and load paths.
(프로젝트가 원격 콘텐츠를 사용하지 않는 경우, 모든 그룹을 로컬 빌드 및 로드 경로를 사용하도록 설정하세요.)

A content build also creates the following files that Addressables doesn’t use directly in a player build:
(콘텐츠 빌드는 또한 Addressables가 플레이어 빌드에서 직접 사용하지 않는 다음 파일도 생성합니다:)

  • addressables_content_state.bin:
    used to make a content update build.
    (콘텐츠 업데이트 빌드를 만드는 데 사용됩니다. )
    If you support dynamic content updates, you must save this file after each content release.
    (동적 콘텐츠 업데이트를 지원하는 경우, 각 콘텐츠 릴리스 후 이 파일을 저장해야 합니다.)
    Otherwise, you can ignore this file.
    (그렇지 않으면 이 파일을 무시할 수 있습니다.)
  • AddressablesBuildTEP.json:
    logs build performance data. For more information, refer to Build Profiling.

Refer to Building Addressable content for more information about how to set up and perform a content build.
(빌드 성능 데이터를 기록합니다. 자세한 내용은 Building Addressable content하세요.)

Start a full content build (전체 콘텐츠 빌드 시작하기)

To make a full content build:
(전체 콘텐츠 빌드를 만들려면:)

  1. Set the desired Platform Target on the Build Settings window.
    (Build Settings 창에서 원하는  Platform Target 을 설정하세요.)
  2. Open the Addressables Groups window (menu: Asset Management > Addressables > Groups).
    (Addressables Groups 창을 엽니다 (Asset Management > Addressables > Groups).)
  3. Choose the New Build > Default Build Script command from the Build menu of the Groups window.
    (Groups 창의 Build 메뉴에서 New Build > Default Build Script 명령을 선택합니다.)

The build process starts.
(빌드 과정이 시작됩니다.)

After the build is complete, you can perform a player build and upload any remote files from your RemoteBuildPath to your hosting server.
(빌드가 완료되면 플레이어 빌드를 수행하고 RemoteBuildPath에서 원격 파일을 호스팅 서버로 업로드할 수 있습니다.)

Important

If you plan to publish remote content updates without rebuilding your application, you must preserve the addressables_content_state.bin file for each published build.
(application을 다시 빌드하지 않고 원격 콘텐츠 업데이트를 게시할 계획이라면, 각 게시된 빌드에 대해 addressables_content_state.bin 파일을 보존해야 합니다. )

Without this file, you can only create a full content build and player build, not an update.
(이 파일이 없으면 전체 콘텐츠 빌드 및 플레이어 빌드만 만들 수 있으며 업데이트는 할 수 없습니다. )

Refer to Content update builds for more information.
자세한 내용은 Content update builds 를 참조하세요.

Remote content distribution (원격 콘텐츠 배포)

You can use Addressables to support remote distribution of content through a Content Delivery Network (CDN) or other hosting service.
(Addressables를 사용하여 콘텐츠 전송 네트워크(CDN) 또는 기타 호스팅 서비스를 통해 원격 콘텐츠 배포를 지원할 수 있습니다.)

Unity provides the Unity Cloud Content Delivery (CCD) service for this purpose, but you can use any CDN or host you prefer.
(이 목적으로 Unity는 Unity Cloud Content Delivery(CCD) 서비스를 제공하지만, 선호하는 CDN이나 호스팅 서비스를 사용할 수 있습니다.)

Before building content for remote distribution, you must:
(원격 배포를 위해 콘텐츠를 빌드하기 전에 다음을 수행해야 합니다:)

  • Enable the Build Remote Catalog option in your AddressableAssetSettings (access using menu: Windows > Asset Management > Addressables > Settings).
    (AddressableAssetSettings에서 Build Remote Catalog 옵션을 활성화합니다(메뉴: Windows > Asset Management > Addressables > Settings).)
  • Configure the RemoteLoadPath in the Profile you use to publish content to reflect the remote URL at which you plan to access the content.
    (콘텐츠를 게시할 때 사용할 Profile의 RemoteLoadPath를 구성하여 콘텐츠에 액세스할 계획인 원격 URL을 반영합니다.)
  • For each Addressables group containing assets you want to deliver remotely, set the Build Path to RemoteBuildPath and the Load Path to RemoteLoadPath.
    (원격으로 제공하려는 asset을 포함하는 각 Addressables 그룹에 대해, Build Path를 RemoteBuildPath로 설정하고 Load Path를 RemoteLoadPath로 설정합니다.)
  • Set desired Platform Target on the Unity Build Settings window.
    (Unity Build Settings 창에서 원하는 Platform Target을 설정합니다.)

After you make a content build (using the Addressables Groups window) and a player build (using the Build Settings window), you must upload the files created in the folder designated by your profile’s RemoteBuildPath to your hosting service.
(콘텐츠 빌드(Addressables Groups 창 사용) 및 플레이어 빌드(Build Settings 창 사용)를 만든 후, profile’s  RemoteBuildPath 에 지정된 폴더에 생성된 파일을 호스팅 서비스에 업로드해야 합니다.)

The files to upload include:
(업로드할 파일에는 다음이 포함됩니다:)

  • AssetBundles (name.bundle)
  • Catalog (catalog_timestamp.json) (카탈로그)
  • Hash (catalog_timestamp.hash) (해시)

Refer to Distributing remote content for more information.
(원격 콘텐츠 배포에 대한 자세한 내용은 Distributing remote content를 참조하세요.)

Incremental content updates (Incremental 콘텐츠 업데이트)

https://docs.unity3d.com/Packages/com.unity.addressables@2.3/manual/get-started-incremental-update.html

When you distribute content remotely, you can reduce the amount of data your users need to download for an update by publishing incremental content update builds.
(원격으로 콘텐츠를 배포할 때, Incremental 콘텐츠 업데이트 빌드를 게시하여 사용자가 업데이트를 다운로드해야 하는 데이터 양을 줄일 수 있습니다.)

An incremental update build allows you to publish remote bundles which contain only the assets that have changed since you last published an update rather than republishing everything.
(Incremental 업데이트 빌드는 모든 것을 다시 게시하는 대신, 마지막 업데이트 이후 변경된 asset만 포함하는 원격 번들을 게시할 수 있게 합니다.)

The assets in these smaller, updated bundles override the existing assets.
(이러한 작은 업데이트 번들의 asset은 기존 asset을 덮어씁니다.)

Important

You must enable the Build Remote Catalog option before you publish a player build if you want to have the option to publish incremental updates.
(플레이어 빌드를 게시하기 전에 incremental 업데이트를 게시할 수 있는 옵션을 가지려면 Build Remote Catalog 옵션을 활성화해야 합니다.)

Without a remote catalog, an installed application doesn’t check for updates.
(원격 카탈로그가 없으면 설치된 애플리케이션은 업데이트를 확인하지 않습니다. )

For more detailed information about content updates, including examples, refer to Content update builds.
(콘텐츠 업데이트에 대한 자세한 정보와 예제는 Content update builds를 참조하세요.)

Start a content update build (콘텐츠 업데이트 빌드 시작하기)

To make a content update, rather than a full build:
(전체 빌드가 아닌 콘텐츠 업데이트를 수행하려면 다음 단계를 따르세요:)

  1. In the Build Settings window, set the Platform Target to match the target of the previous content build that you are now updating.
    (Build Settings 창에서 이전 콘텐츠 빌드의 Platform Target과 일치하도록 플랫폼 타겟을 설정합니다.)
  2. Open the Addressables Groups window (menu: Asset Management > Addressables > Groups).
    (Addressables Groups 창을 엽니다. (메뉴: Asset Management > Addressables > Groups))
  3. From the Tools menu, run the Check for Content Update Restrictions command. The Build Data File browser window opens.
    (Tools 메뉴에서 Check for Content Update Restrictions 명령을 실행합니다. Build Data File 브라우저 창이 열립니다.)
  4. Locate the addressables_content_state.bin file produced by the previous build.
    (이전 빌드에서 생성된 addressables_content_state.bin 파일을 찾습니다.)
    This file is in a subfolder of Assets/AddressableAssestsData named for the target platform.
    (이 파일은 타겟 플랫폼의 이름을 가진 Assets/AddressableAssestsData 의 하위 폴더에 있습니다.)
  5. Select Open. The Content Update Preview window searches for changes and identifies assets that must be moved to a new group for the update.
    (Open을 선택합니다. Content Update Preview 창은 변경 사항을 검색하고 업데이트를 위해 새 그룹으로 이동해야 하는 자산을 식별합니다.)
    If you have not changed any assets in groups set to “Cannot Change Post Release,” then no changes will be listed in the preview.
    (“Cannot Change Post Release”로 설정된 그룹의 자산을 변경하지 않은 경우, 미리 보기에서 변경 사항이 나열되지 않습니다.)
    (When you change an asset in a group set to “Can Change Post Release,” then Addressables rebuilds all the AssetBundles for the group; Addressables does not move the changed assets to a new group in this case.)
    (“Can Change Post Release”로 설정된 그룹의 자산을 변경하면, Addressables는 해당 그룹의 모든 AssetBundles를 다시 빌드합니다; 이 경우 변경된 자산을 새 그룹으로 이동하지 않습니다.)
  6. Select Apply Changes to accept any changes.
    (Apply Changes 를 선택하여 변경 사항을 적용합니다.)
  7. From the Build menu, run the Update a Previous Build command.
    (Build 메뉴에서 Update a Previous Build 명령을 실행합니다.)
  8. Open the addressables_content_state.bin file produced by the previous build.
    (이전 빌드에서 생성된 addressables_content_state.bin 파일을 엽니다.)

The build process starts.
(빌드 과정이 시작됩니다.)

After the build is complete, you can upload the files from your RemoteBuildPath to your hosting server.
(빌드가 완료되면 RemoteBuildPath에서 파일을 호스팅 서버에 업로드할 수 있습니다.)

Important

Addressables uses the addressables_content_state.bin file to identify which assets you changed.
(Addressables는 addressables_content_state.bin 파일을 사용하여 변경된 asset을 식별합니다.)

You must preserve a copy of this file for each published build. Without the file, you can only create a full content build, not an update.
(각 게시된 빌드에 대해 이 파일의 복사본을 보존해야 합니다. 파일이 없으면 전체 콘텐츠 빌드만 만들 수 있으며 업데이트는 할 수 없습니다.)

Addressables samples (Addressables 샘플)

https://docs.unity3d.com/Packages/com.unity.addressables@2.3/manual/SamplesOverview.html

The Addressables package contains samples that you can download into your project. To access the samples go to Window > Package Manager > Addressables.
(Addressables 패키지에는 프로젝트에 다운로드할 수 있는 샘플이 포함되어 있습니다. 샘플에 액세스하려면 Window > Package Manager > Addressables로 이동하세요.)

These samples include examples on how to disable asset importing during a build, creating custom build and Play mode scripts, and providing an AddressableUtility class.
(이러한 샘플에는 빌드 중 자산 가져오기 비활성화, 사용자 정의 빌드 및 플레이 모드 스크립트 생성, AddressableUtility  클래스 제공 방법에 대한 예제가 포함되어 있습니다. )

When you download and import a sample, it’s placed inside the Assets/Samples/Addressables/{AddressablesVersionNumber} path of your project.
(샘플을 다운로드하고 가져오면 프로젝트의 Assets/Samples/Addressables/{AddressablesVersionNumber} 경로에 배치됩니다.)

SampleDescription
Addressables UtilityContains a set of utility functions for Addressables.
(Addressables에 대한 일련의 유틸리티 함수가 포함되어 있습니다.)
The script contains a static method GetAddressFromAssetReference which provides the Addressable address used to reference a given AssetRefence internally.
(이 스크립트에는 주어진 AssetRefence를 내부적으로 참조하는 데 사용되는 Addressable 주소를 제공하는 정적 메서드 GetAddressFromAssetReference 가 포함되어 있습니다.)
ComponentReferenceCreates an AssetReference that’s restricted to having a specific component.
(특정 컴포넌트를 가지도록 제한된 AssetReference를 생성합니다.)
For more information see the ComponentReference sample project located in the Addressables Samples repository.
(자세한 내용은 Addressables Samples 리포지토리에 있는 ComponentReference 샘플 프로젝트를 참조하세요.)
Custom Build and Playmode ScriptsIncludes two custom scripts:
(두 가지  custom scripts가 포함되어 있습니다:)

– A custom Play mode script located in Editor/CustomPlayModeScript.cs of the sample.
(샘플의 Editor/CustomPlayModeScript.cs에 위치한 사용자 정의 플레이 모드 스크립트입니다.)
This script works similarly to the Use Existing Build (requires built groups) play mode script already included.
(이 스크립트는 이미 포함된 ‘Use Existing Build (requires built groups)’ 플레이 모드 스크립트와 유사하게 작동합니다.)
The methods added to accomplish this are CreateCurrentSceneOnlyBuildSetup and RevertCurrentSceneSetup
 on the CustomBuildScript.
(이를 수행하는 방법으로 CustomBuildScript의 CreateCurrentSceneOnlyBuildSetup  및 RevertCurrentSceneSetup 메서드가 추가되었습니다.)

– A custom build script located in Editor/CustomBuildScript.cs of the sample.
(샘플의 Editor/CustomBuildScript.cs 에 위치한 사용자 정의 빌드 스크립트입니다.)
This custom build script creates a build that only includes the currently open scene.
(이 사용자 정의 빌드 스크립트는 현재 열려 있는 씬만 포함하는 빌드를 생성합니다.)
A bootstrap scene is automatically created and a script is added that loads the built scene on startup.
(부트스트랩 씬이 자동으로 생성되며 시작 시 빌드된 씬을 로드하는 스크립트가 추가됩니다.)
For these examples, the build and load paths used by default are [UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget] and {UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget] respectively.
(이러한 예제의 기본 빌드 및 로드 경로는 각각 [UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget] 및 {UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]입니다. )

The ScriptableObject of the class has already been created, but you can use the Create menu to make another ScriptableObject.
(이 클래스의 ScriptableObject 는 이미 생성되었지만, Create 메뉴를 사용하여 다른 ScriptableObject 를 만들 수 있습니다)
For this CustomPlayModeScript the create menu path is Addressables > Content Builders > Use CustomPlayMode Script.
(CustomPlayModeScript의 경우 Create 메뉴 경로는 Addressables > Content Builders > Use CustomPlayMode Script입니다.)
By default, this creates a CustomPlayMode.asset ScriptableObject.
(기본적으로 CustomPlayMode.asset ScriptableObject가 생성됩니다.)
The same goes for the CustomBuildScript.
(CustomBuildScript도 동일합니다.)
Disable Asset Import on BuildProvides a script that disables asset importing during a player build.
(플레이어 빌드 중 자산 가져오기를 비활성화하는 스크립트를 제공합니다.)
This improves build performance because AssetBundles are copied into StreamingAssets at build time.
(AssetBundles가 빌드 시간에 StreamingAssets로 복사되기 때문입니다. )
This sample is only relevant for Editor versions below 2021.2.
(이 샘플은 2021.2 이하의 Editor 버전에만 관련이 있습니다.)
In 2021.2+, the Editor provides the ability to include folders outside of Assets/ into StreamingAssets.
(2021.2+에서는 Editor가 Assets/ 외부 폴더를 StreamingAssets에 포함할 수 있는 기능을 제공합니다.)


When the sample is imported into the project, a player build without asset importing can be triggered by the new menu item Build/Disabled Importer Build.
(프로젝트에 샘플이 가져오면 새로운 메뉴 항목 Build/Disabled Importer Build를 통해 자산 가져오기가 없는 플레이어 빌드를 트리거할 수 있습니다.)
The build output is placed into DisabledImporterBuildPath/{EditorUserBuildSettings.activeBuildTarget}/ by default.
(빌드 출력은 기본적으로 DisabledImporterBuildPath/{EditorUserBuildSettings.activeBuildTarget}/에 배치됩니다.)
The sample class DisableAssetImportOnBuild can be edited to alter the build path.
(샘플 클래스 DisableAssetImportOnBuild는 빌드 경로를 변경하도록 편집할 수 있습니다.)
Import Existing GroupContains a tool that imports group assets, for example from a custom package, to the current project.
(그룹 asset을 현재 프로젝트로 가져오는 도구를 포함합니다.)
The tool is located under Window/Asset Management/Addressables/Import Groups.
(도구는 Window/Asset Management/Addressables/Import Groups에서 찾을 수 있습니다.)
The window requires a path to the AddressableAssetGroup.asset scriptable object, a name for the group, and a folder for any schemas related to the imported AddressableAssetGroup.
(창은 AddressableAssetGroup.asset 스크립트 오브젝트에 대한 경로, 그룹 이름, 가져온 AddressableAssetGroup 과 관련된 스키마에 대한 폴더를 필요로 합니다.)
Prefab SpawnerProvides a basic script that instantiates and destroys a prefab AssetReference.
(프리팹 AssetReference를 인스턴스화하고 파괴하는 기본 스크립트를 제공합니다.)
To use the sample, attach the provided script, PrefabSpawnerSample, to a GameObject in your scene.
(샘플을 사용하려면 제공된 스크립트 PrefabSpawnerSample을 씬의 GameObject 에 부착하세요.)
Assign an AdressableAsset to the AssetReference field of that script.
(스크립트의 AssetReference 필드에 AdressableAsset을 할당하세요. )
If you’re using the Use Existing Build playmode script, ensure that your Addressable content is built.
(Use Existing Build 플레이모드 스크립트를 사용하는 경우, Addressable 콘텐츠가 빌드되었는지 확인하세요. )
Then, enter Play mode.
(그런 다음, 플레이 모드로 들어갑니다.)
Custom Analyze RulesThis sample shows how to create custom AnalyzeRules for use within the Analyze window.
(Analyze 창 내에서 사용할 사용자 정의 AnalyzeRules를 만드는 방법을 보여줍니다.)
Both rules follow the recommended pattern for adding themselves to the UI.
(두 규칙 모두 UI에 자신을 추가하는 권장 패턴을 따릅니다.)

댓글 달기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

위로 스크롤