• Manual
  • API Documentation
  • The Save System API

    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

    The Save System API

    Note

    This article is mostly for intermediate users who can understand code and programming.

    Introduction

    The Save System API allows you to manually manage your data easily by accessing a few methods, but before using the API you need to know a few things:

    • What is an identifier?
    • What is the catalog?
    • What is the meta data?

    What is an identifier?

    An identifier is a string that lets you specify the file name, entity name, or path of your data in the specified Storage.

    For example, in a File storage the identifier is the path to the file, that means you can provide an absolute path to the file or a relative path which is relative to the Unity's persistent data path.

    But in a web based storage, the identifier might indicate the key inside a database or again a path to a file which depends on the storage implementation.

    What is the catalog?

    The catalog is a file created at the storage's base path that holds a list of all the saved items and identifiers for performing certain actions on them later using different API methods such as Listing items or restoring backups.

    What is the meta data?

    The meta data is an identifier created alongside the provided identifier which often has a .meta suffix at the end of the original identifier that holds special information and details about the data, the default Storages contain the below meta data:

    • CreationTimeUtc: the creation time of the original identifier in UTC
    • LastModificationTimeUtc: the last modification time of the original identifier in UTC (only by the Save System)
    • LastAccessTimeUtc: the last access time of the original identifier in UTC (only by the Save System)
    • Encrypted: whether or not the original identifier is encrypted
    • ApplicationVersion: the unity application version Application.version

    The meta data suffix is defined by the Storage implementation, so if you want to have a custom meta suffix, you need to implement a custom storage and then use a custom suffix.

    Learn more about Meta Data >

    Usage

    The Save System API is Asynchronous and uses the C# Async/Await system, so in order to use the API methods, you need to use await keyword usually:

    await SaveSystemAPI.SaveAsync(identifier, obj);
    

    By the given example above, the SaveAsync method saves the given object obj to the specified identifier (it would be a file path if the storage is local disk).

    You can also pass a SaveSystemSettings parameter to the most of the API methods as the last parameter:

    await SaveSystemAPI.SaveAsync(identifier, obj, mySettings);
    

    Learn more about the SaveSystemAPI class >

    • Improve this Doc
    • 0 Comments
    In This Article
    • Introduction
    • What is an identifier?
    • What is the catalog?
    • What is the meta data?
    • Usage