Class GameFoundationSdk
Manage the initialization and the persistence of Game Foundation's systems.
Namespace: UnityEngine.GameFoundation
Syntax
public static class GameFoundationSdk
Properties
catalog
The complete collection of all items you created in the GameFoundation editor. This contains: GameParameters, Currencies, InventoryItemDefinitions, VirtualTransactions, IAPTransactions, Stores, and Rewards.
Declaration
public static Catalog catalog { get; }
Property Value
| Type | Description |
|---|---|
| Catalog |
currentVersion
The current version of the Game Foundation SDK
Declaration
public static string currentVersion { get; }
Property Value
| Type | Description |
|---|---|
| String |
dataLayer
The current Data Access Layer used by GameFoundation.
Declaration
public static IDataAccessLayer dataLayer { get; }
Property Value
| Type | Description |
|---|---|
| IDataAccessLayer |
inventory
The inventory manager.
Declaration
public static IInventoryManager inventory { get; }
Property Value
| Type | Description |
|---|---|
| IInventoryManager |
IsInitialized
Check if the Game Foundation is initialized.
Declaration
public static bool IsInitialized { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | Whether the Game Foundation is initialized or not. |
rewards
The reward manager.
Declaration
public static IRewardManager rewards { get; }
Property Value
| Type | Description |
|---|---|
| IRewardManager |
tags
The collection of all tags created within Game Foundation. Find Tags here and keep references of them around to improve performance when finding other things by tag.
Declaration
public static TagCatalog tags { get; }
Property Value
| Type | Description |
|---|---|
| TagCatalog |
transactions
The transaction manager.
Declaration
public static ITransactionManager transactions { get; }
Property Value
| Type | Description |
|---|---|
| ITransactionManager |
wallet
The wallet manager.
Declaration
public static IWalletManager wallet { get; }
Property Value
| Type | Description |
|---|---|
| IWalletManager |
Methods
Initialize(IDataAccessLayer)
Initialize GameFoundation systems.
Declaration
public static Deferred Initialize(IDataAccessLayer dataLayer)
Parameters
| Type | Name | Description |
|---|---|---|
| IDataAccessLayer | dataLayer | The data provider for the inventory manager. |
Returns
| Type | Description |
|---|---|
| Deferred | A promise handle which can be used to get the result of the initialization. Deferred |
Uninitialize()
Frees the resources of the GameFoundationSdk.
Declaration
public static void Uninitialize()
Events
initializationFailed
Event raised when GameFoundation failed its initialization. The provided exception is the reason of the failure.
Declaration
public static event Action<Exception> initializationFailed
Event Type
| Type | Description |
|---|---|
| Action<Exception> |
initialized
Event raised when GameFoundation is successfully initialized.
Declaration
public static event Action initialized
Event Type
| Type | Description |
|---|---|
| Action |
uninitialized
Event raised immediately after GameFoundation is uninitialized.
Declaration
public static event Action uninitialized
Event Type
| Type | Description |
|---|---|
| Action |
willUninitialize
Event raised immediately before GameFoundation is uninitialized.
Declaration
public static event Action willUninitialize
Event Type
| Type | Description |
|---|---|
| Action |