Class BuildScriptPlayAssetDelivery
In addition to the Default Build Script behavior (building AssetBundles), this script assigns Android bundled content to
"install-time", fast-follow" or "on-demand" asset packs using data from PlayAssetDeliverySchema.
All "install-time" content is being assigned to the 'AddressablesAssetPack' which is guaranteed to be "install-time".
We will generate some files to create asset packs in Gradle project using PlayAssetDeliveryModifyProjectScript and
to store build and runtime data. These files are located in 'Assets/PlayAssetDelivery/Build/aa*' folders:
- Create a 'BuildProcessorData.json' file to store the build paths and Gradle project paths for bundles that should be copied to asset packs.
When building Player this will be used by the PlayAssetDeliveryModifyProjectScript to copy bundles to their corresponding Gradle project paths.
- Create a 'CustomAssetPacksData.json' file to store custom asset pack information to be used at runtime. See PlayAssetDeliveryInitialization.
Also when building Player Addressables 'catalog.json' and 'settings.json' files are being relocated to the 'AddressablesAssetPack'.
Any content of Addressables.BuildPath directory which is not assigned to asset packs will be included in the streaming assets pack.
This happens with the groups which don't have PlayAssetDeliverySchema and Build path in their Content Packing & Loading schema is set to Local,
and also with the groups with delivery type set to "None" in PlayAssetDeliverySchema.
Inheritance
BuildScriptBase
BuildScriptPackedMode
BuildScriptPlayAssetDelivery
Inherited Members
BuildScriptPackedMode.CanBuildData<T>()
BuildScriptPackedMode.ProcessGroup(AddressableAssetGroup, AddressableAssetsBuildContext)
BuildScriptPackedMode.ProcessGroupSchema(AddressableAssetGroupSchema, AddressableAssetGroup, AddressableAssetsBuildContext)
BuildScriptPackedMode.ProcessBundledAssetSchema(BundledAssetGroupSchema, AddressableAssetGroup, AddressableAssetsBuildContext)
BuildScriptPackedMode.IsDataBuilt()
BuildScriptBase.BuiltInBundleBaseName
BuildScriptBase.instanceProviderType
BuildScriptBase.sceneProviderType
BuildScriptBase.Log
BuildScriptBase.BuildData<TResult>(AddressablesDataBuilderInput)
BuildScriptBase.ProcessAllGroups(AddressableAssetsBuildContext)
BuildScriptBase.NotifyUserAboutBuildReport()
BuildScriptBase.DisplayBuildReport()
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetHashCode()
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Assembly: Unity.Addressables.Android.Editor.dll
Syntax
[CreateAssetMenu(fileName = "BuildScriptPlayAssetDelivery.asset", menuName = "Addressables/Custom Build/Play Asset Delivery")]
public class BuildScriptPlayAssetDelivery : BuildScriptPackedMode, IDataBuilder
Properties
Name
The descriptive name used in the UI.
Declaration
public override string Name { get; }
Property Value
Overrides
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.Name
Methods
Android specific implementation of BuildData<TResult>.
When building for Android, actual builds happen for all target texture compressions.
Declaration
protected override TResult BuildDataImplementation<TResult>(AddressablesDataBuilderInput builderInput) where TResult : IDataBuilderResult
Parameters
Type |
Name |
Description |
AddressablesDataBuilderInput |
builderInput |
The builderInput object used in the build
|
Returns
Type |
Description |
TResult |
The build data result
|
Type Parameters
Name |
Description |
TResult |
The type of data to build
|
Overrides
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.BuildDataImplementation<TResult>(UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput)
ClearCachedData()
Used to clean up any cached data created by this builder.
Declaration
public override void ClearCachedData()
Overrides
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.ClearCachedData()
DoBuild<TResult>(AddressablesDataBuilderInput, AddressableAssetsBuildContext)
The method that actually builds Addressables for the specific texture compression and creates json files required to prepare Android Gradle project.
Declaration
protected override TResult DoBuild<TResult>(AddressablesDataBuilderInput builderInput, AddressableAssetsBuildContext aaContext) where TResult : IDataBuilderResult
Parameters
Type |
Name |
Description |
AddressablesDataBuilderInput |
builderInput |
The builderInput object used in the build
|
AddressableAssetsBuildContext |
aaContext |
Context object for passing data through SBP, between different sections of Addressables code
|
Returns
Type |
Description |
TResult |
The build data result for the specific texture compression
|
Type Parameters
Name |
Description |
TResult |
The type of data to build
|
Overrides
UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.DoBuild<TResult>(UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput, UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext)
Implements
UnityEditor.AddressableAssets.Build.IDataBuilder
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.