logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class PlayerPrefsPersistenceInstaller

    Unity-specific installer for PlayerPrefs-backed persistence.

    Inheritance
    object
    PlayerPrefsPersistenceInstaller
    Implements
    IFoundationInstaller
    IInstaller
    Namespace: Serenity.PlayerPrefsPersistence.Installation.Installers
    Assembly: Serenity.UnityPlayerPrefsPersistence.Installation.dll
    Syntax
    public class PlayerPrefsPersistenceInstaller : PersistenceInstaller, IFoundationInstaller, IInstaller
    Remarks

    Extends PersistenceInstaller and implements IFoundationInstaller to register a UnityPlayerPrefsKeyValueStore as the IKeyValueStore implementation in the composition root.

    Constructors

    PlayerPrefsPersistenceInstaller(string, string)

    Initializes a new instance of the PlayerPrefsPersistenceInstaller class.

    Declaration
    public PlayerPrefsPersistenceInstaller(string keyPrefix = "Serenity_", string @namespace = "playerprefs")
    Parameters
    Type Name Description
    string keyPrefix

    Optional prefix prepended to every PlayerPrefs key. Defaults to "Serenity_".

    string namespace

    Logical namespace for diagnostics/telemetry. Defaults to "playerprefs".

    Methods

    Install(PersistenceInstallerInstallInput)

    Installs the PlayerPrefs persistence components by creating a UnityPlayerPrefsKeyValueStore.

    Declaration
    public override void Install(PersistenceInstallerInstallInput input)
    Parameters
    Type Name Description
    PersistenceInstallerInstallInput input

    The installation input parameters.

    InstallKeyValueStore(PersistenceInstallerInstallInput)

    Declaration
    protected override IKeyValueStore InstallKeyValueStore(PersistenceInstallerInstallInput input)
    Parameters
    Type Name Description
    PersistenceInstallerInstallInput input
    Returns
    Type Description
    IKeyValueStore

    Implements

    IFoundationInstaller
    IInstaller
    In this article
    © 2026 Serenity. All Rights Reserved