docs.unity.cn
    Show / Hide Table of Contents

    Class CatalogBuilder

    The builder of all the runtime static data of Game Foundation. It is given to the data layer so it can configure the data based on its internal data structure, that Game Foundation doesn't need to know.

    Inheritance
    Object
    CatalogBuilder
    Namespace: UnityEngine.GameFoundation
    Syntax
    public class CatalogBuilder

    Methods

    Build()

    Aggregate current data of this builder to create new catalogs.

    Declaration
    public Deferred<(Catalog, TagCatalog)> Build()
    Returns
    Type Description
    Deferred<ValueTuple<Catalog, TagCatalog>>

    Return a promise handle to track the operation's status. The operation's result is a tuple of a new Catalog and a new TagCatalog if it is successful.

    Create<TCatalogItem>(String)

    Creates a new TCatalogItem instance.

    Declaration
    public TCatalogItem Create<TCatalogItem>(string key)
        where TCatalogItem : CatalogItemConfig, new()
    Parameters
    Type Name Description
    String key

    The identifier of the TCatalogItem instance to create.

    Returns
    Type Description
    TCatalogItem

    The new TCatalogItem instance.

    Type Parameters
    Name Description
    TCatalogItem

    The type of the item to create.

    GetTag(String, Boolean)

    Gets a new Tag instance by its key.

    Declaration
    public TagConfig GetTag(string key, bool create = true)
    Parameters
    Type Name Description
    String key

    The identifier of the tag.

    Boolean create

    Creates the tag config if not found.

    Returns
    Type Description
    TagConfig

    The Tag instance.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 16 June 2021