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.
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 |
Returns
Type | Description |
---|---|
TCatalogItem | The new |
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. |