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
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. |
| ContentDirectoryProviderType | The provider type to use for loading content directories. |
| GroupRootAssetEntryProviderType | The provider type to use for loading entries from group root assets. |
| GroupRootAssetProviderType | The provider type to use for loading group root assets from content directories. |
| IncludeInBuild | Gets or sets whether this group should be included in the Addressables build. When false, the group's content will not be built or included in the catalog. |
| 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 ICanIncludeInBuildSchema 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. |