Class AddressableAssetGroupTemplate
Used to create template groups to make it easier for the user to create new groups.
Inherited Members
Namespace: UnityEditor.AddressableAssets.Settings
Syntax
[CreateAssetMenu(fileName = "AddressableAssetGroupTemplate.asset", menuName = "Addressables/Group Templates/Blank Group Template")]
public class AddressableAssetGroupTemplate : ScriptableObject, IGroupTemplate
Properties
Description
The description of the AddressableAssetGroupTemplate
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
Implements
Name
The name of the AddressableAssetGroupTemplate
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
Implements
SchemaObjects
Returns the list of Preset objects of AddressableAssetGroupSchema associated with this template
Declaration
public List<AddressableAssetGroupSchema> SchemaObjects { get; }
Property Value
Type | Description |
---|---|
List<AddressableAssetGroupSchema> |
Methods
AddSchema(Type, Boolean)
Adds the AddressableAssetGroupSchema of type to the template.
Declaration
public bool AddSchema(Type type, bool postEvent = true)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The Type for the AddressableAssetGroupSchema to add to this template. |
Boolean | postEvent | If true, the event is propagated to callbacks. |
Returns
Type | Description |
---|---|
Boolean | If true, the type was added successfully. |
ApplyToAddressableAssetGroup(AddressableAssetGroup)
Applies schema values for the group to the schema values found in the template
Declaration
public void ApplyToAddressableAssetGroup(AddressableAssetGroup group)
Parameters
Type | Name | Description |
---|---|---|
AddressableAssetGroup | group | The AddressableAssetGroup to apply the schema settings to |
FindSchema(Type)
Gets the index of a schema based on its specified type.
Declaration
public int FindSchema(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The schema type. |
Returns
Type | Description |
---|---|
Int32 | Valid index if found, otherwise returns -1. |
GetSchemaByType(Type)
Gets an added schema of the specified type.
Declaration
public AddressableAssetGroupSchema GetSchemaByType(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The schema type. |
Returns
Type | Description |
---|---|
AddressableAssetGroupSchema | The schema if found, otherwise null. |
GetTypes()
Gets the types of the AddressableAssetGroupSchema associated with this template
Declaration
public Type[] GetTypes()
Returns
Type | Description |
---|---|
Type[] | AddressableAssetGroupSchema types for schema on this template |
HasSchema(Type)
Checks if the group contains a schema of a given type.
Declaration
public bool HasSchema(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The schema type. |
Returns
Type | Description |
---|---|
Boolean | True if the schema type or subclass has been added to this group. |
RemoveSchema(Type, Boolean)
Removes the AddressableAssetGroupSchema of the type from the template.
Declaration
public bool RemoveSchema(Type type, bool postEvent = true)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type of AddressableAssetGroupSchema to be removed. |
Boolean | postEvent | If true, the event is propagated to callbacks. |
Returns
Type | Description |
---|---|
Boolean | If true, the type was removed successfully. |
SetDirty(AddressableAssetSettings.ModificationEvent, Object, Boolean)
Marks the object as modified.
Declaration
public void SetDirty(AddressableAssetSettings.ModificationEvent modificationEvent, object eventData, bool postEvent)
Parameters
Type | Name | Description |
---|---|---|
AddressableAssetSettings.ModificationEvent | modificationEvent | The event type that is changed. |
Object | eventData | The object data that corresponds to the event. |
Boolean | postEvent | If true, the event is propagated to callbacks. |