Class ContentUpdateScript
Contains methods used for the content update workflow.
Inheritance
Inherited Members
Namespace: UnityEditor.AddressableAssets
Syntax
public static class ContentUpdateScript
Methods
BuildContentUpdate(AddressableAssetSettings, String)
Builds player content using the player content version from a specified cache file.
Declaration
public static AddressablesPlayerBuildResult BuildContentUpdate(AddressableAssetSettings settings, string contentStateDataPath)
Parameters
Type | Name | Description |
---|---|---|
AddressableAssetSettings | settings | The settings object to use for the build. |
System.String | contentStateDataPath | The path of the cache data to use. |
Returns
Type | Description |
---|---|
AddressablesPlayerBuildResult | The build operation. |
CreateContentUpdateGroup(AddressableAssetSettings, List<AddressableAssetEntry>, String)
Create a new AddressableAssetGroup with the items and mark it as remote.
Declaration
public static void CreateContentUpdateGroup(AddressableAssetSettings settings, List<AddressableAssetEntry> items, string groupName)
Parameters
Type | Name | Description |
---|---|---|
AddressableAssetSettings | settings | The settings object. |
System.Collections.Generic.List<AddressableAssetEntry> | items | The items to move. |
System.String | groupName | The name of the new group. |
GetCacheDataPath(Boolean)
[obsolete] Gets the path of the cache data from a selected build.
Declaration
[Obsolete("Use GetContentStateDataPath instead. (UnityUpgradable) -> GetContentStateDataPath")]
public static string GetCacheDataPath(bool browse)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | browse | If true, the user is allowed to browse for a specific file. |
Returns
Type | Description |
---|---|
System.String |
GetContentStateDataPath(Boolean)
Gets the path of the cache data from a selected build.
Declaration
public static string GetContentStateDataPath(bool browse)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | browse | If true, the user is allowed to browse for a specific file. |
Returns
Type | Description |
---|---|
System.String |
LoadCacheData(String)
Loads cache data from a specific location
Declaration
public static AddressablesContentState LoadCacheData(string contentStateDataPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentStateDataPath |
Returns
Type | Description |
---|---|
AddressablesContentState |
LoadContentState(String)
Loads cache data from a specific location
Declaration
public static AddressablesContentState LoadContentState(string contentStateDataPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | contentStateDataPath |
Returns
Type | Description |
---|---|
AddressablesContentState |
SaveCacheData(List<AddressableAssetEntry>, IBuildCache, String)
[Obsolete] Save the content update information for a set of AddressableAssetEntry objects.
Declaration
[Obsolete("Use SaveContentState instead. (UnityUpgradable) -> SaveContentState")]
public static string SaveCacheData(List<AddressableAssetEntry> entries, IBuildCache buildCache, string playerVersion)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<AddressableAssetEntry> | entries | The entries to save. |
IBuildCache | buildCache | The cache dependency information generated from the build. |
System.String | playerVersion | The player version to save. This is usually set to AddressableAssetSettings.PlayerBuildVersion. |
Returns
Type | Description |
---|---|
System.String |
SaveContentState(String, List<AddressableAssetEntry>, IBuildCache, String)
Save the content update information for a set of AddressableAssetEntry objects.
Declaration
public static bool SaveContentState(string path, List<AddressableAssetEntry> entries, IBuildCache buildCache, string playerVersion)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | File to write content stat info to. If file already exists, it will be deleted before the new file is created. |
System.Collections.Generic.List<AddressableAssetEntry> | entries | The entries to save. |
IBuildCache | buildCache | The cache dependency information generated from the build. |
System.String | playerVersion | The player version to save. This is usually set to AddressableAssetSettings.PlayerBuildVersion. |
Returns
Type | Description |
---|---|
System.Boolean | True if the file is saved, false otherwise. |