Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Unity Game Foundation 0.3.0 Now Available!

Discussion in 'Game Foundation' started by mingz-unity, Feb 21, 2020.

  1. mingz-unity


    Unity Technologies

    Oct 12, 2017
    • Transaction System: as the first step in our multi-release rollout plan for the Store Module in Game Foundation, the newly released purchase transaction system provides users with an out-of-box component to process virtual purchases (priced in virtual currency or virtual goods) and automatically grant item to player inventories, according to the payout definition
    • Purchasable Detail: a new Detail is introduced in this release that works together with the transaction system to define a purchase transaction with price and payout information.
    • New data access layer: in this release we included a new data access layer that support asynchronous read/write to a remote data store for storing player data, paving the way to a seamless integration with cloud save support (in an upcoming release)
    • GameFoundation's Initialization changed to take an IDataAccessLayer as an argument instead of a persistence object.
    • GameFoundationSettings ScriptableObject is now split into GameFoundationDatabaseSettings, which holds the reference to the database for the editor, and GameFoundationSettings, which continues to hold the other settings, like analytics flags.
    • CatalogManager now holds the reference to the catalogs at Runtime. Any runtime code that was previously written as GameFoundationSettings.database.xCatalog should now be written as CatalogManager.xCatalog.
    • Persistence and Serializer interfaces changed to handle only GameFoundation's data.
    Notes on Migrating to New Release:

    If you already use Game Foundation in your existing projects, make sure to follow these instructions upgrading your code, since we made a few breaking changes that were necessary to introduce a new Data Access Layer:

    1. Initialization:

    Code (CSharp):
    2. GameFoundation.Initialize();
    3. // or
    4. GameFoundation.Initialize(null);
    5. // or
    6. GameFoundation.Initialize(new LocalPersistence(new JsonDataSerializer()));
    After this release, you should use one of the persistence data layer during init:

    Code (CSharp):
    1. GameFoundation.Initialize(new MemoryDataLayer());
    2. // or
    3. m_DataLayer = new PersistenceDataLayer(new LocalPersistence("DataPersistenceSample", new JsonDataSerializer()));
    4. GameFoundation.Initialize(m_DataLayer, OnGameFoundationInitialized, Debug.LogError);
    5. // (see the DataPersistence sample for the full example)
    2. Accessing the database:


    Code (CSharp):
    1. var myGameItemDefinition = GameFoundationSettings.database.gameItemCatalog.GetGameItemDefinition("apple");
    After this release, you should use the CatalogManager instead:

    Code (CSharp):
    1. var myGameItemDefinition = CatalogManager.gameItemCatalog.GetGameItemDefinition("apple");

    Sample Project
    • You can import them under Package Manager (by clicking on 'Import in project' button) if you're on unity version 2019.x.
    • If you're on 2018.3 / 4, we have made a standalone unity package you can download in the attachment of this post (note that you still need to install the Game Foundation package first before importing this package)

    Attached Files:

    Last edited: Feb 22, 2020
    mk0a1a likes this.