1. Home
  2. Docs
  3. Save Game Pro
  4. Introduction
  5. Identifiers

Identifiers

An identifier is a name that identifies (that is, labels the identity of) either a unique object or a unique class of objects, where the “object” or class may be an idea, physical [countable] object (or class thereof), or physical [noncountable] substance (or class thereof). The abbreviation ID often refers to identity, identification (the process of identifying), or an identifier (that is, an instance of identification). An identifier may be a word, number, letter, symbol, or any combination of those. Read more on Wikipedia

We use Identifier for identifying stored data on different storage (file, key/value or as a database entry), so there are various types of identifiers.

For example, for a file storage you can provide identifier as a absolute path like this C:\MyFolder\MyFile.ext and use it on Save Game API like this:

Or you can only provide the file name as identifier, like this:

And the data will be saved at Application.persistentDataPath something like this on Windows OS C:\Users\%USERNAME%\AppData\LocalLow\Company Name\Game Name\MyFile.ext

So, the default path for file storage is Application.persistentDataPath, that means you can change it by changing the BasePath property of SaveGameSettings class, like this:

Then the base path will be the C:\MyCustomPath and all data will be saved at there, but make sure to don’t specify explicit path for all platforms, you need to specify different paths for different platforms, you can check current platform and set the base path accordingly.

Now, for different storage, like PlayerPrefs or Database, the base path is a simple prefix for the specified identifier not a path.

Was this article helpful to you? Yes No

How can we help?