using System;
namespace Ubisoft
{
///
/// Class responsible for storing the configuration to use to instantiate a particular implementation of an IHtPlayerConfig.
///
public class HtPlayerPrefsConfig
{
// Implementations available out-of-the-box.
public enum EImplementationId
{
// Use UnityEngine.PlayerPrefs to store preferences (only works from the main thread).
UnityPlayerPrefs,
// Use UnityEngine.PlayerPrefs to store preferences (works from secondary threads).
UnityPlayerPrefsCached,
// Use this implementation when you don't need to persist preferences
MemoryPlayerPrefs
}
///
/// Channel to save preferences to.
///
public string Channel { get; }
///
/// Id of the implementation to use for instantiating. Pass in an EImplementationId value or
/// one of your own enum type if you want to use your own implementation.
///
public Enum ImplementationId { get; }
///
/// Logger channel to log debug information to.
///
public HtLogger.Channel Logger { get; }
///
/// Whether or not verbose information should be used when debugging.
///
public bool IsVerbose { get; set; }
///
/// Instantiate an HtPlayerPrefs config.
///
/// Channel to save preferences to.
/// Id of the implementation to use for instantiating.
/// Logger channel to log debug information to. Pass in null if you want to use the one by default.
/// true for debugging verbosely.
public HtPlayerPrefsConfig(string channel, Enum implementationId, HtLogger.Channel logger = null, bool isVerbose = false)
{
Channel = channel;
ImplementationId = implementationId;
Logger = logger;
IsVerbose = isVerbose;
}
}
}