Class AddressableAssetGroupSchemaSet | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class AddressableAssetGroupSchemaSet

    Collection of AddressableAssetGroupSchema objects

    Inheritance
    System.Object
    AddressableAssetGroupSchemaSet
    Namespace: UnityEditor.AddressableAssets.Settings
    Syntax
    [Serializable]
    public class AddressableAssetGroupSchemaSet

    Properties

    Schemas

    List of schemas for this group.

    Declaration
    public List<AddressableAssetGroupSchema> Schemas { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<AddressableAssetGroupSchema>

    Types

    Get the list of schema types.

    Declaration
    public List<Type> Types { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<System.Type>

    Methods

    AddSchema(Type, Func<Type, String>)

    Creates and adds a schema of a given type to this group. The schema asset will be created in the GroupSchemas directory relative to the settings asset.

    Declaration
    public AddressableAssetGroupSchema AddSchema(Type type, Func<Type, string> pathFunc)
    Parameters
    Type Name Description
    System.Type type

    The schema type. This type must not already be added.

    System.Func<System.Type, System.String> pathFunc

    A function that returns the path where this method can save the schema asset. Set to null to not create an in-project asset.

    Returns
    Type Description
    AddressableAssetGroupSchema

    The created schema object.

    AddSchema(AddressableAssetGroupSchema, Func<Type, String>)

    Adds a copy of the provided schema object.

    Declaration
    public AddressableAssetGroupSchema AddSchema(AddressableAssetGroupSchema schema, Func<Type, string> pathFunc)
    Parameters
    Type Name Description
    AddressableAssetGroupSchema schema

    The schema to copy.

    System.Func<System.Type, System.String> pathFunc

    A function that returns the path where this method can save the schema asset. Set to null to not create an in-project asset.

    Returns
    Type Description
    AddressableAssetGroupSchema

    The created schema object.

    ClearSchemas(Boolean)

    Removes all schemas and optionally deletes the assets associated with them.

    Declaration
    public void ClearSchemas(bool deleteAssets)
    Parameters
    Type Name Description
    System.Boolean deleteAssets

    If true, the schema assets will also be deleted.

    GetSchema(Type)

    Gets an added schema of the specified type.

    Declaration
    public AddressableAssetGroupSchema GetSchema(Type type)
    Parameters
    Type Name Description
    System.Type type

    The schema type.

    Returns
    Type Description
    AddressableAssetGroupSchema

    The schema if found, otherwise null.

    RemoveSchema(Type)

    Remove a given schema from this group.

    Declaration
    public bool RemoveSchema(Type type)
    Parameters
    Type Name Description
    System.Type type

    The schema type.

    Returns
    Type Description
    System.Boolean

    True if the schema was found and removed, false otherwise.

    Back to top Copyright © 2015-2018 Unity
    Generated by DocFX