• Manual
  • API Documentation
  • Storage
  • Third-party Storages
  • Google Play
  • Saved Game

    Show / Hide Table of Contents
    • Introduction
    • Installation
    • Getting Started
    • Demos
    • The Save System API
    • Auto Save
    • Platforms
    • Security
    • Serialization
    • Supported Data Types
    • Migration
    • FAQ
    • Changelog
    • Extend
      • Overview
      • Converter
      • Encryption
      • Storage
    • Guides
      • Overview
      • Configuring Settings
      • Using Auto Save
      • Basic Saving and Loading
      • Saving and Loading Raw Data
      • Deleting the Data
      • Saving and Loading Images
      • Saving and Loading Scene Objects
      • Saving and Loading Assets
      • Saving and Loading Readonly Properties
    • Integrations
      • Overview
      • Google Play Games
      • Xbox Live
      • Bolt
      • Firebase
      • PlayFab
      • PlayMaker
      • Steam Auto-Cloud
      • Steamworks .NET
      • Facepunch Steamworks
      • Text Mesh Pro
    • Storage
      • Overview
      • Backup
      • Catalog
      • Meta Data
      • Built-in Storages
        • File
        • PlayerPrefs
        • Memory
      • Third-party Storages
        • Firebase
          • Realtime Database
          • Cloud Storage
          • Firestore
        • PlayFab
          • Entity Objects
          • Entity Files
          • User Data
        • Steam
          • Steamworks .NET
          • Facepunch Steamworks
        • Google Play
          • Saved Game
        • Xbox Live
          • Connected Storage

    Google Play Games - Saved Game

    This storage implementation uses Google Play Games Saved Game feature.

    • Download Google Play Games Integration
    • Google Play Games Integration Page
    • Google Play Games plugin for Unity
    • Google Play Games Services

    If you use Manual Conflict Resolution, then you would have to subscribe to the ManualConflict event of the GooglePlaySavedGameStorage to resolve conflicts manually, check the example below:

    Syntax

    googleplaygames://<Parameter Name>=<Parameter Value>; ...
    

    Or

    google-play-games://<Parameter Name>=<Parameter Value>; ...
    

    Parameters

    Name Type Description Aliases
    encoding string The text encoding text-encoding, encoding-name
    usebase64 bool Whether to use base64 encoding for strings or not use-base64
    writeuititle string Specifies the UI title for the ShowSelectSavedGameUI during the write operation write-ui-title
    readuititle string Specifies the UI title for the ShowSelectSavedGameUI during the read operation read-ui-title
    deleteuititle string Specifies the UI title for the ShowSelectSavedGameUI during the delete operation delete-ui-title
    openmode int Specifies mode for opening the Saved Games, 0 = Automatic Conflict Resolution, 1 = Show Selection UI, 2 = Manual Conflict Resolution open-mode
    datasource int Specifies the data source for Saved Games, 0 = ReadCacheOrNetwork, 1 = ReadNetworkOnly data-source
    conflictresolutionstrategy int Specifies the conflict resolution strategy to be used with Automatic conflict resolution open mode, 0 = UseLongestPlaytime, 1 = UseOriginal, 2 = UseUnmerged, 3 = UseManual, 4 = UseLastKnownGood, 5 = UseMostRecentlySaved conflict-resolution-strategy
    showcreatesaveui bool Whether to show the create save UI in saved game selection UI show-create-save-ui
    showdeletesaveui bool Whether to show the delete save UI in saved game selection UI show-delete-save-ui
    prefetchdataonconflict bool Whether to prefetch data on conflict (used for Manual Conflict Resolution) prefetch-data-on-conflict, prefetch
    maxdisplayedsavedgames int The maximum amount of displayed saved games on selection UI max-displayed-saved-games, max-displayed

    Examples

    Manual Conflict Resolution

    private void Start () {
        var settings = SaveSystemSettings.DefaultSettings;
        var savedGameStorage = (GooglePlaySavedGameStorage)settings.Storage;
    
        savedGameStorage.ManualConflict += OnConflict;
    }
    
    private void OnConflict(IConflictResolver resolver, ISavedGameMetadata original, byte[] originalData, ISavedGameMetadata unmerged, byte[] unmergedData) {
    
        // Then use the conflict resolver to choose a saved game
        resolver.ChooseMetadata(original);
    }
    
    • Improve this Doc
    • 0 Comments
    In This Article
    • Syntax
    • Parameters
    • Examples
      • Manual Conflict Resolution