Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.21.10] - 2023-04-10
- Fixed Addressables profiler not correctly displaying loaded Asset subObjects where a Asset was loaded due to a direct reference to one of its subObjects.
- Fixed an issue where bundles built with the Append Hash to FIlename bundle naming option had strange interactions with the Prevent Updates option
- Improved performance of BuildLayoutGenerationTask
  • Loading branch information
Unity Technologies committed Apr 10, 2023
1 parent e490fc9 commit 860e5f3
Show file tree
Hide file tree
Showing 44 changed files with 428 additions and 187 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.21.10] - 2023-04-10
- Fixed Addressables profiler not correctly displaying loaded Asset subObjects where a Asset was loaded due to a direct reference to one of its subObjects.
- Fixed an issue where bundles built with the Append Hash to FIlename bundle naming option had strange interactions with the Prevent Updates option
- Improved performance of BuildLayoutGenerationTask

## [1.21.9] - 2023-03-07
- Removed code within WriteObjectToByteList that would never be reached
- Fixed an issue where SceneOps would have update called on them twice per frame
Expand Down
3 changes: 2 additions & 1 deletion Documentation~/TableOfContents.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@
* [Getting addresses at runtime](runtime/GetRuntimeAddress.md)
* [Modification events](editor/ModificationEvents.md)
* [Diagnostic Tools](editor/tools/DiagnosticTools.md)
* * [Profiler Module](editor/tools/ProfilerModule.md)
* [Profiler Module](editor/tools/ProfilerModule.md)
* [Event viewer](editor/tools/EventViewer.md)
* [Analyze tool](editor/tools/AnalyzeTool.md)
* [Addressables Report](editor/tools/AddressablesReport.md)
* [Common Project Goals](common-workflows/CommonProjectGoals.md)
* [Loading Content from Multiple Projects](common-workflows/MultiProject.md)
* [Using Addressables and CI pipelines](common-workflows/ContinuousIntegration.md)
Expand Down
37 changes: 25 additions & 12 deletions Documentation~/editor/AddressableAssetSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ uid: addressables-asset-settings

# Addressable Asset Settings

You can access the main Addressable system option on the __Addressable Asset Settings__ Inspector (menu: __Window > Asset Management > Addressables > Settings__).
You can access the main Addressable system option on the __Addressable Asset Settings__ Inspector (menu: __Window > Asset Management > Addressables > Settings__).

The Addressables system stores the settings asset in the AddressableSettingsData folder (under your Project Assets folder). If this folder doesn't exist yet, you must initialize the Addressables system from the __Groups__ window (menu: __Window > Asset Management > Addressables > Groups__).
The Addressables system stores the settings asset in the AddressableSettingsData folder (under your Project Assets folder). If this folder doesn't exist yet, you must initialize the Addressables system from the __Groups__ window (menu: __Window > Asset Management > Addressables > Groups__).

![](../images/addr_settings_0.png)

Expand All @@ -17,7 +17,7 @@ The Inspector contains the following sections:
* [Profile](#profile)
* [Diagnostics]
* [Catalog]
* [Content Update]
* [Update a Previous Build](#update-a-previous-build)
* [Downloads]
* [Build]
* [Build and Play Mode Scripts]
Expand All @@ -30,7 +30,7 @@ You can click the __Manage Groups__ button to open the [Groups window].

![](../images/addr_settings_profiles.png)<br/>*Profile settings*

Use the __Profile in Use__ list to choose the active profile. The active profile determines the value of variables used by the Addressables build scripts.
Use the __Profile in Use__ list to choose the active profile. The active profile determines the value of variables used by the Addressables build scripts.

Click the __Manage Profiles__ button to open the __Profiles__ window where you can create new profiles and change profile variables.

Expand All @@ -46,6 +46,7 @@ See [Profiles] for more information about profiles.
| __Log Runtime Exceptions__| Logs runtime exceptions for asset loading operations (in addition to recording the error to the [AsyncOperationHandle.OperationException] property). |

### Enable all logging

By default, Addressable Assets only logs warnings and errors. You can enable detailed logging by opening the **Player** settings window (menu: **Edit** > **Project Settings...** > **Player**), navigating to the **Other Settings** > **Configuration** section, and adding "`ADDRESSABLES_LOG_ALL`" to the **Scripting Define Symbols** field.

## Catalog
Expand All @@ -58,22 +59,22 @@ Settings related to the Addressables Catalog, which maps the address of an asset
|:---|:---|
| __Player Version Override__| Overrides the timestamp used to formulate the remote catalog name. If set, the remote catalog is named, `Catalog_<Player Version Override>.json`. If left blank, then the timestamp is used. Note that when you use a unique remote catalog name for every new build, you can host multiple versions of your content at the same base URL. If you use the same override string for every build, then all players will load the new catalog. Note also that player update builds always use the same remote catalog name as the build they are updating (see [Content update builds]). |
| __Compress Local Catalog__| Builds the catalog in a compressed AssetBundle file.<br/>Reduces the storage size of the catalog, but increases the time to build and to load the catalog. |
| _Optimize Catalog Size_| Reduces the size of the catalog by creating a lookup table for internal IDs. Can increase the time required to load the catalog. |
| __Build Remote Catalog__| Enable to build a remote catalog. |
| __Build & Load Paths__ | Where to build and load the remote catalog. Choose a [Profile] path pair from the list or select `<custom>` if you want to set the build and load paths separately.<br/>Only visible when you enable **Build Remote Catalog**.|
| __Build Path__| Where to build the remote catalog. Typically, you should use the _RemoteBuildPath_ [Profile] variable.<br/></br/>Only shown if you set __Build & Load Paths__ to `<custom>`.|
| __Load Path__| The URL at which to access the remote catalog. Typically, you should use the _RemoteLoadPath_ [Profile] variable.<br/></br/>Only shown if you set __Build & Load Paths__ to `<custom>`.|
| __Only update catalogs manually__| Disables the automatic check for an updated remote catalog when the Addressables system initializes at runtime. You can manually [check for an updated catalog]. |

## Content Update
## Update a Previous Build

![](../images/addr_settings_content_update.png)<br/>*Content update settings*

Settings that control remote content builds and updates.

| Property| Function |
|:---|:---|
| __Only update catalogs manually__| Disables the automatic check for an updated remote catalog when the Addressables system initializes at runtime. You can manually [check for an updated catalog]. |

| __Content State Build Path__|Where to build the content state file produced by the default build script.|
| __Build Remote Catalog__| Enable to build a remote catalog. |
| __Build & Load Paths__ | Where to build and load the remote catalog. Choose a [Profile] path pair from the list or select `<custom>` if you want to set the build and load paths separately.<br/>Only visible when you enable **Build Remote Catalog**.|
| __Build Path__| Where to build the remote catalog. Typically, you should use the _RemoteBuildPath_ [Profile] variable.<br/></br/>Only shown if you set __Build & Load Paths__ to `<custom>`.|
| __Load Path__| The URL at which to access the remote catalog. Typically, you should use the _RemoteLoadPath_ [Profile] variable.<br/></br/>Only shown if you set __Build & Load Paths__ to `<custom>`.|

## Downloads

Expand Down Expand Up @@ -140,7 +141,7 @@ See [Group templates] for information on creating custom templates.

![](../images/addr_settings_init_objects.png)<br/>*Configured InitializationObjects*

Configures the initialization objects for the project. Initialization objects are ScriptableObject classes that implement the [IObjectInitializationDataProvider] interface. You can create these objects to pass data to the Addressables initialization process at runtime.
Configures the initialization objects for the project. Initialization objects are ScriptableObject classes that implement the [IObjectInitializationDataProvider] interface. You can create these objects to pass data to the Addressables initialization process at runtime.

> [!NOTE]
> Initialization objects are ScriptableObject assets. Follow the instructions in the [ScriptableObject manual page] to create a ScriptableObject asset for a initialization object.
Expand All @@ -149,6 +150,17 @@ To add an initialization object, click on the __+__ button and select the Script

See [Customizing initialization] for more information.

## Cloud Content Delivery

![](../images/addr_settings_enable_ccd.png)<br/>*Enable CCD Features checkbox*

| Property| Function |
|:---|:---|
| __Enable CCD Features__| Use features from the Cloud Content Delivery package to build and upload Addressables content to the cloud. |

Enable this property to use Cloud Content Delivery features with Addressables. These features enable you to integrate an asset pipeline from the Unity Editor into a Cloud Content Delivery space. This requires the [CCD Management](https://docs.unity3d.com/Packages/com.unity.services.ccd.management@latest/index.html?subfolder=/manual/index.html) package to be installed.

For more information, see [Welcome to Cloud Content Delivery](https://docs.unity.com/ccd/en/manual/UnityCCD) and [CCD + Addressables Walkthrough](https://docs.unity.com/ccd/en/manual/UnityCCDWalkthrough).

[Diagnostics]: #diagnostics
[Content Update]: #content-update
Expand Down Expand Up @@ -183,3 +195,4 @@ See [Customizing initialization] for more information.
[Custom Build Scripting]: xref:addressables-api-build-player-content#custom-build-scripting
[Unity Editor Preferences]: xref:addressables-configuration#unity-preferences
[Building content]: xref:addressables-builds#build-with-player

13 changes: 6 additions & 7 deletions Documentation~/editor/building-content/BuildArtifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ For a full list of platform names, see [AddressablesPlatform].
Files used for remote content should be uploaded to a hosting server. By default these files are located in the `ServerData` folder.

The files are:

* Remote AssetBundles (`.bundle`): according to your group, profile, and platform settings. By default these files are located in the [BuildTarget] subfolder. To change the build location of the files produced by a group, modify the [Build & Load Paths] setting.
* `catalog_{timestamp or player version}.json`: a remote catalog which when downloaded will override the local catalog. This file is only created if the __Build Remote Catalogs__ option in [Content update settings] is enabled. To change the build location of this file modify the __Build & Load Paths__ in Content update settings. By default the filename includes the timestamp of the build. To use a version number instead, specify the value of the __Player Version Override__ in [Catalog settings]. For more information about catalogs, see [Content catalogs].
* `catalog_{timestamp or player version}.hash`: a file used to check whether the remote catalog has changed since the last time a client app downloaded it. Just like the remote catalog file, this file is only created if the __Build Remote Catalogs__ option in [Content update settings] is enabled. To change the build location of this file modify the __Build & Load Paths__ in Content update settings. By default the filename includes the timestamp of the build. To use a version number instead, specify the value of the __Player Version Override__ in [Catalog settings]. For more information about catalogs, see [Content catalogs].
* `catalog_{timestamp or player version}.json`: a remote catalog which when downloaded will override the local catalog. This file is only created if the __Build Remote Catalogs__ option in [Catalog settings] is enabled. To change the build location of this file modify the __Build & Load Paths__ in [Catalog settings]. By default, the filename includes the timestamp of the build. To use a version number instead, specify the value of the __Player Version Override__ in [Catalog settings]. For more information about catalogs, see [Content catalogs].
* `catalog_{timestamp or player version}.hash`: a file used to check whether the remote catalog has changed since the last time a client app downloaded it. Just like the remote catalog file, this file is only created if the __Build Remote Catalogs__ option in [Catalog settings] is enabled. To change the build location of this file, modify the __Build & Load Paths__ in [Catalog settings]. By default, the filename includes the timestamp of the build. To use a version number instead, specify the value of the __Player Version Override__ in [Catalog settings]. For more information about catalogs, see [Content catalogs].

### Content State File

The `addressables_content_state.bin` file is used for making a [content update build]. If you are supporting dynamic content updates, you must save this file after each full content build that you release. Otherwise, you can ignore this file.

By default this file is located in `Assets/AddressableAssetsData/<AddressablesPlatform>`. See [AddressablesPlatform] for all platform names. To change the build location of the file specify the value of the __Content State Build Path__ in [Content update settings].
By default this file is located in `Assets/AddressableAssetsData/<AddressablesPlatform>`. See [AddressablesPlatform] for all platform names. To change the build location of the file specify the value of the __Content State Build Path__ in [Update a Previous Build].

> [!NOTE]
> It is recommended to check this file into version control and create a new branch each time a player build is released.
Expand All @@ -59,9 +60,7 @@ Although Addressables produces one content catalog per project, you can load cat

### Catalog settings

There are a variety of settings used for catalogs:
* [Catalog settings]: options used to configure local and remote catalogs
* [Content update settings]: options used to configure the remote catalog only
Use [Catalog settings] to configure local and remote catalogs.

To minimize the catalog size, use the following settings:
1. Compress the local catalog. If your primary concern is how big the catalog is in your build, there is an option in [Catalog settings] called **Compress Local Catalog**. This option builds catalog that ships with your game into an AssetBundle. Compressing the catalog makes the file itself smaller, but note that this does increase catalog load time.
Expand Down Expand Up @@ -90,11 +89,11 @@ Shared AssetBundles derive their build options from the default `AddressableAsse
[content build]: xref:addressables-builds
[Content catalogs]: #content-catalogs
[content update build]: xref:addressables-content-update-builds
[Content update settings]: xref:addressables-asset-settings#content-update
[Enabling the remote catalog]: xref:addressables-remote-content-distribution#enabling-the-remote-catalog
[Importing assets]: xref:ImportingAssets
[Managed Code Stripping]: xref:ManagedCodeStripping
[Managing catalogs at runtime]: xref:addressables-api-load-content-catalog-async
[Profiles]: xref:addressables-profiles
[StreamingAssets]: xref:StreamingAssets
[Update a Previous Build]: xref:addressables-asset-settings#update-a-previous-build
[Update Restriction]: xref:addressables-content-update-builds#group-update-restriction-settings
2 changes: 1 addition & 1 deletion Documentation~/editor/building-content/BuildingShaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ uid: addressables-shaders

By default, Unity [strips shaders variants] that aren't used in any scenes. This can exclude variants that are only used in AssetBundles. To ensure that certain variants are not stripped, include them in the **Shader Stripping** properties in [Graphics Settings].

For example, if you have Addressable assets that use lightmap-related shaders such as [Mixed Lights], go to **Edit** &gt **Project Settings** &gt **Graphics** &gt **Shader Stripping** and set the **Lightmap Mode** property to **Custom**.
For example, if you have Addressable assets that use lightmap-related shaders such as [Mixed Lights], go to **Edit** &gt; **Project Settings** &gt; **Graphics** &gt; **Shader Stripping** and set the **Lightmap Mode** property to **Custom**.

[Quality Settings] also affect shader variants used in AssetBundles.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ As your project grows larger, keep an eye on the following aspects of your asset
* __Total bundle size__: Historically Unity has not supported files larger than 4GB. This has been fixed in some recent editor versions, but there can still be issues. It is recommended to keep the content of a given bundle under this limit for best compatibility across all platforms.
* __Bundle layout at scale__: The memory and performance trade-offs between the number of AssetBundles produced by your content build and the size of those bundles can change as your project grows larger.
* __Bundle dependencies__: When an Addressable asset is loaded, all of its bundle dependencies are also loaded. Be aware of any references between assets when creating Addressable groups. See [Asset and AssetBundle dependencies] for more information.
* __Sub assets affecting UI performance__: There is no hard limit here, but if you have many assets, and those assets have many subassets, it may be best to turn off sub-asset display. This option only affects how the data is displayed in the Groups window, and does not affect what you can and cannot load at runtime. The option is available in the groups window under __Tools__ > __Show Sprite and Subobject Addresses__. Disabling this will make the UI more responsive.
* __Sub assets affecting UI performance__: There is no hard limit here, but if you have many assets, and those assets have many subassets, it may be best to turn off sub-asset display. This option only affects how the data is displayed in the Groups window, and does not affect what you can and cannot load at runtime. The option is available in the groups window under __Tools__ &gt; __Group View__ &gt; __Show Sprite and Subobject Addresses__. Disabling this will make the UI more responsive.
* __Group hierarchy display__: Another UI-only option to help with scale is __Group Hierarchy with Dashes__. This is available within the inspector of the top level settings. With this enabled, groups that contain dashes '-' in their names will display as if the dashes represented folder hierarchy. This does not affect the actual group name, or the way things are built. For example, two groups called "x-y-z" and "x-y-w" would display as if inside a folder called "x", there was a folder called "y". Inside that folder were two groups, called "x-y-z" and "x-y-w". This will not really affect UI responsiveness, but simply makes it easier to browse a large collection of groups.

[Advanced Group Settings]: xref:addressables-content-packing-and-loading-schema#build-and-load-paths
Expand Down
Loading

0 comments on commit 860e5f3

Please sign in to comment.