Class ContentDirectoryGroupSchema
Schema for configuring groups to be built as Content Directories. Content Directories provide an alternative to AssetBundles for organizing and loading addressable content.
Implements
Inherited Members
Namespace: UnityEditor.AddressableAssets.Settings.GroupSchemas
Assembly: Unity.Addressables.Editor.dll
Syntax
[AddressablesHelpURL("GroupSchemas.html")]
public class ContentDirectoryGroupSchema : AddressableAssetGroupSchema, ISerializationCallbackReceiver
Properties
| Name | Description |
|---|---|
| BuildPath | The path to copy the built content directory to. |
| CatalogId | Gets or sets the catalog identifier for this content directory group. Groups with the same CatalogId will be built into the same catalog. |
| GroupAssetEntryProviderType | The provider type to use for loading entries from group root assets. |
| IncludeAddressesForFolderChildren | Gets or sets whether assets inside an addressable folder keep their own individual address in the catalog, in addition to the folder's shared key (see IncludeFolderKeysInCatalog). GUIDs are unaffected. Only takes effect when IncludeFolderKeysInCatalog is enabled. Disable to reduce catalog size when assets are always loaded via the folder key. |
| IncludeFolderKeysInCatalog | Gets or sets whether each addressable folder's own address is included as an extra shared key on every asset within that folder. This allows loading every asset in an addressable folder with a single call, for example Addressables.LoadAssetsAsync(folderAddress, ...), similar to Resources.LoadAll. |
| IncludeInBuild | If true, the group's content will be included in the Addressables build. |
| IncludeLabelsInCatalog | Gets or sets whether labels are included in the content catalog for this content directory group. This is required if labels are used at runtime to load assets. |
| IsEnabled | Determines whether a given schema will be included in a Schema Driven build. This is particularly useful if you want to alternate between building AssetBundles and ContentDirectories. Only one buildable schema can be enabled on a group at a time. If you attempt to enable multiple at once, an error will be thrown. |
| LoadPath | The path to load the content directory from at runtime. |
| SelectedPathPairIndex | The selected path pair in use. Use this with care, as it could change when path pairs are added ore removed. It is generally more valid to lookup the path pair by Id for the current profile. |
Methods
| Name | Description |
|---|---|
| CanEnableSchema() | Determines whether the ContentDirectorySchema can be enabled or not. A ContentDirectorySchema can be enabled if there are no other buildable schemas (such as a Content Packing & Loading Schema) enabled. Used e.g. when adding a schema via Add Schema so the new schema is defaulted to disabled when the other is already enabled. The user can still manually enable both in the inspector; the group inspector then shows an error. |
| OnAfterDeserialize() | Implementation of ISerializationCallbackReceiver. Used to set callbacks for ProfileValueReference changes and default provider types. |
| OnBeforeSerialize() | Implementation of ISerializationCallbackReceiver. Does nothing. |
| OnGUI() | Used to display the GUI of the schema. |
| OnGUIMultiple(List<AddressableAssetGroupSchema>) | Used to display the GUI of multiple selected groups. |