Class BuildScriptSchemaDriven
Build scripts used for player builds and running with bundles in the editor.
Implements
Inherited Members
Namespace: UnityEditor.AddressableAssets.Build.DataBuilders
Assembly: Unity.Addressables.Editor.dll
Syntax
[CreateAssetMenu(fileName = "BuildScriptSchemaDriver.asset", menuName = "Addressables/Content Builders/Default Build Schema Driven")]
[AddressablesHelpURL("Builds.html")]
public class BuildScriptSchemaDriven : BuildScriptBase, IDataBuilder
Remarks
This is the preferred base class for custom Addressables build scripts. Subclass it and override CreateSchemaBuilders() to add, replace, or wrap the schema builders that drive the build. Most build customisations — bundle packing, catalog generation, content update logic — should be implemented by subclassing the relevant ISchemaBuilder (e.g. BundledAssetSchemaBuilder) and returning it from CreateSchemaBuilders(), rather than overriding methods on the build script itself.
BuildScriptPackedMode extends this class with additional virtual hooks
(ProcessBundledAssetSchema, ConstructAssetBundleName) for compatibility with
earlier extension patterns. New code should prefer schema-builder overrides instead.
Properties
| Name | Description |
|---|---|
| Name | The descriptive name used in the UI. |
| SchemaBuilders | Gets the schema builders used by this build script to process different group schemas. Schema builders are created lazily via CreateSchemaBuilders(). |
Methods
| Name | Description |
|---|---|
| BuildDataImplementation<TResult>(AddressablesDataBuilderInput) | The implementation of BuildData<TResult>(AddressablesDataBuilderInput). That is the public entry point, this is the home for child class overrides. |
| CanBuildData<T>() | Used to determine if this builder is capable of building a specific type of data. |
| ClearCachedData() | Used to clean up any cached data created by this builder. |
| ConstructAssetBundleName(AddressableAssetGroup, BundledAssetGroupSchema, BundleDetails, string) | Creates a name for an asset bundle using the provided information. |
| CreateSchemaBuilders() | Creates and returns the schema builders used to process group schemas during the build. Override this method to provide custom schema builders. |
| DoBuild<TResult>(AddressablesDataBuilderInput, AddressableAssetsBuildContext) | The method that does the actual building after all the groups have been processed. |
| IsDataBuilt() | Checks to see if the data is built for the given builder. |
| PrepGroupBundlePacking(AddressableAssetGroup, List<AssetBundleBuild>, BundledAssetGroupSchema, Func<AddressableAssetEntry, bool>) | Processes an AddressableAssetGroup and generates AssetBundle input definitions based on the BundlePackingMode. |
| ProcessBundledAssetSchema(BundledAssetGroupSchema, AddressableAssetGroup, AddressableAssetsBuildContext) | The processing of the bundled asset schema. This is where the bundle(s) for a given group are actually setup. |
| ProcessGroup(AddressableAssetGroup, AddressableAssetsBuildContext) | Build processing of an individual group. |
| ProcessGroupSchema(AddressableAssetGroupSchema, AddressableAssetGroup, AddressableAssetsBuildContext) | Called per group per schema to evaluate that schema. This can be an easy entry point for implementing the build aspects surrounding a custom schema. Note, you should not rely on schemas getting called in a specific order. |