Mad Level Manager

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Enumerations Enumerator Properties Events
Classes | Static Public Member Functions | Public Attributes | Properties | List of all members
_NAMESPACE_.MadLevelProfile Class Reference

Manages player profiles and game progress (save & load). More...

## Static Public Member Functions
static void | LoadProfileFromString (string str)
static void | Reload ()
| Forces reload of profile data. Useful for testing purposes. More...
static string | SaveProfileToString ()
static void | RegisterProfile (string profileName)
| Registers profile if not yet registered. Registration of profile is optional. If you try to use profile for the first time by assigning profile name to 'profile' field then new profile will be created. More...
static void | UnregisterProfile (string profileName)
| Unregisters the given profile name. All profile data will be permanently removed from the device. If current profile is profile that is given to be unregistered, current profile will be changed to defualt. More...
static string | GetLevelAny (string levelName, string property)
| Gets level-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type. More...
static string | GetProfileAny (string property)
| Gets global-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type. More...
static bool | GetLevelBoolean (string levelName, string property)
| Gets level-scoped property value as boolean type. You can get value of properties only set using SetLevelBoolean method. More...
static bool | GetLevelBoolean (string levelName, string property, bool def)
| Gets level-scoped property value as boolean type. You can get value of properties only set using SetLevelBoolean method. More...
static void | SetLevelBoolean (string levelName, string property, bool val)
| Sets level-scoped property as boolean type. You can access it later using GetLevelBoolean or GetLevelAny methods. More...
static void | SetProfileBoolean (string property, bool val)
| Sets profile-scoped property as boolean type. You can access it later using GetProfileBoolean or GetProfileAny methods. More...
static bool | GetProfileBoolean (string property)
| Gets global-scoped property value as boolean type. You can get value of properties only set using SetProfileBoolean method. More...
static bool | GetProfileBoolean (string property, bool def)
| Gets global-scoped property value as boolean type. You can get value of properties only set using SetProfileBoolean method. More...
static int | GetLevelInteger (string levelName, string property)
| Gets level-scoped property value as integer type. You can get value of properties only set using SetLevelInteger method. More...
static int | GetLevelInteger (string levelName, string property, int def)
| Gets level-scoped property value as integer type. You can get value of properties only set using SetLevelInteger method. More...
static void | SetLevelInteger (string levelName, string property, int val)
| Sets level-scoped property as integer type. You can access it later using GetLevelInteger or GetLevelAny methods. More...
static void | SetProfileInteger (string property, int val)
| Sets profile-scoped property as integer type. You can access it later using GetProfileInteger or GetProfileAny methods. More...
static int | GetProfileInteger (string property)
| Gets global-scoped property value as integer type. You can get value of properties only set using SetProfileInteger method. More...
static int | GetProfileInteger (string property, int def)
| Gets global-scoped property value as integer type. You can get value of properties only set using SetProfileInteger method. More...
static float | GetLevelFloat (string levelName, string property)
| Gets level-scoped property value as float type. You can get value of properties only set using SetLevelFloat method. More...
static float | GetLevelFloat (string levelName, string property, float def)
| Gets level-scoped property value as float type. You can get value of properties only set using SetLevelFloat method. More...
static void | SetLevelFloat (string levelName, string property, float val)
| Sets level-scoped property as float type. You can access it later using GetLevelFloat or GetLevelAny methods. More...
static void | SetProfileFloat (string property, float val)
| Sets profile-scoped property as float type. You can access it later using GetProfileFloat or GetProfileAny methods. More...
static float | GetProfileFloat (string property)
| Gets global-scoped property value as float type. You can get value of properties only set using SetProfileFloat method. More...
static float | GetProfileFloat (string property, float def)
| Gets global-scoped property value as float type. You can get value of properties only set using SetProfileFloat method. More...
static string | GetLevelString (string levelName, string property)
| Gets level-scoped property value as string type. You can get value of properties only set using SetLevelString method. More...
static string | GetLevelString (string levelName, string property, string def)
| Gets level-scoped property value as string type. You can get value of properties only set using SetLevelString method. More...
static void | SetLevelString (string levelName, string property, string val)
| Sets level-scoped property as string type. You can access it later using GetLevelString or GetLevelAny methods. More...
static void | SetProfileString (string property, string val)
| Sets profile-scoped property as string type. You can access it later using GetProfileString or GetProfileAny methods. More...
static string | GetProfileString (string property)
| Gets global-scoped property value as string type. You can get value of properties only set using SetProfileString method. More...
static string | GetProfileString (string property, string def)
| Gets global-scoped property value as string type. You can get value of properties only set using SetProfileString method. More...
static bool | IsPropertyEnabled (string levelName, string property)
static void | SetPropertyEnabled (string levelName, string property, bool enabled)
static bool | IsProfilePropertySet (string property)
static bool | IsLevelPropertySet (string levelName, string property)
static bool | IsPropertySet (string levelName, string property)
static bool | IsCompleted (string levelName)
static bool | IsCompleted (string levelName, bool def)
static void | SetCompleted (string levelName, bool completed)
static bool | IsCompletedSet (string levelName)
static bool | IsLocked (string levelName)
static bool | IsLocked (string levelName, bool def)
static void | SetLocked (string levelName, bool locked)
static bool | IsLockedSet (string levelName)
static bool | IsLevelSet (string levelName)
static void | RenameLevel (string oldName, string newName)
static void | Save ()
static void | Reset ()

## Public Attributes
const string | DefaultProfile = "_default"

## Properties
static string | profile`[get, set]`
static string[] | profileList`[get, set]`
static string | recentLevelSelected`[get, set]`
| Gets or sets the name of recently choosen level. This is NOT a scene name but the name of icon game object. More...

## Detailed Description

Manages player profiles and game progress (save & load).

## Member Function Documentation

static string _NAMESPACE_.MadLevelProfile.GetLevelAny | ( | string | levelName,
|  | string | property
| ) |  |
| static

Gets level-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type.

Returns
  String representation of property value. Empty string if value is unset.

Parameters

  levelName | Level name.
  property | Property name.

static bool _NAMESPACE_.MadLevelProfile.GetLevelBoolean | ( | string | levelName,
|  | string | property
| ) |  |
| static

Gets level-scoped property value as boolean type. You can get value of properties only set using SetLevelBoolean method.

Returns
  Boolean representation of property value or false if value is unset.

Parameters

  levelName | Level name.
  property | Property name.

static bool _NAMESPACE_.MadLevelProfile.GetLevelBoolean | ( | string | levelName,
|  | string | property,
|  | bool | def
| ) |  |
| static

Gets level-scoped property value as boolean type. You can get value of properties only set using SetLevelBoolean method.

Returns
  Boolean representation of property value or given default value if unset.

Parameters

  levelName | Level name.
  property | Property name.
  def | Default value to return if value is unset.

static float _NAMESPACE_.MadLevelProfile.GetLevelFloat | ( | string | levelName,
|  | string | property
| ) |  |
| static

Gets level-scoped property value as float type. You can get value of properties only set using SetLevelFloat method.

Returns
  Float representation of property value or 0 if value is unset.

Parameters

  levelName | Level name.
  property | Property name.

static float _NAMESPACE_.MadLevelProfile.GetLevelFloat | ( | string | levelName,
|  | string | property,
|  | float | def
| ) |  |
| static

Gets level-scoped property value as float type. You can get value of properties only set using SetLevelFloat method.

Returns
  Float representation of property value or given default value if unset.

Parameters

  levelName | Level name.
  property | Property name.
  def | Default value to return if value is unset.

static int _NAMESPACE_.MadLevelProfile.GetLevelInteger | ( | string | levelName,
|  | string | property
| ) |  |
| static

Gets level-scoped property value as integer type. You can get value of properties only set using SetLevelInteger method.

Returns
  Integer representation of property value or 0 if value is unset.

Parameters

  levelName | Level name.
  property | Property name.

static int _NAMESPACE_.MadLevelProfile.GetLevelInteger | ( | string | levelName,
|  | string | property,
|  | int | def
| ) |  |
| static

Gets level-scoped property value as integer type. You can get value of properties only set using SetLevelInteger method.

Returns
  Integer representation of property value or given default value if unset.

Parameters

  levelName | Level name.
  property | Property name.
  def | Default value to return if value is unset.

static string _NAMESPACE_.MadLevelProfile.GetLevelString | ( | string | levelName,
|  | string | property
| ) |  |
| static

Gets level-scoped property value as string type. You can get value of properties only set using SetLevelString method.

Returns
  String representation of property value or empty string if value is unset.

Parameters

  levelName | Level name.
  property | Property name.

static string _NAMESPACE_.MadLevelProfile.GetLevelString | ( | string | levelName,
|  | string | property,
|  | string | def
| ) |  |
| static

Gets level-scoped property value as string type. You can get value of properties only set using SetLevelString method.

Returns
  String representation of property value or given default value if unset.

Parameters

  levelName | Level name.
  property | Property name.
  def | Default value to return if value is unset.

static string _NAMESPACE_.MadLevelProfile.GetProfileAny | ( | string | property | ) |
| static

Gets global-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type.

Returns
  String representation of property value. Empty string if value is unset.

Parameters

  property | Property name.

static bool _NAMESPACE_.MadLevelProfile.GetProfileBoolean | ( | string | property | ) |
| static

Gets global-scoped property value as boolean type. You can get value of properties only set using SetProfileBoolean method.

Returns
  Boolean representation of property value or false if value is unset.

Parameters

  property | Property name.

static bool _NAMESPACE_.MadLevelProfile.GetProfileBoolean | ( | string | property,
|  | bool | def
| ) |  |
| static

Gets global-scoped property value as boolean type. You can get value of properties only set using SetProfileBoolean method.

Returns
  Boolean representation of property value or given default if value is unset.

Parameters

  property | Property name.
  def | Default value to return if value is unset.

static float _NAMESPACE_.MadLevelProfile.GetProfileFloat | ( | string | property | ) |
| static

Gets global-scoped property value as float type. You can get value of properties only set using SetProfileFloat method.

Returns
  Float representation of property value or 0 if value is unset.

Parameters

  property | Property name.

static float _NAMESPACE_.MadLevelProfile.GetProfileFloat | ( | string | property,
|  | float | def
| ) |  |
| static

Gets global-scoped property value as float type. You can get value of properties only set using SetProfileFloat method.

Returns
  Float representation of property value or given default if value is unset.

Parameters

  property | Property name.
  def | Default value to return if value is unset.

static int _NAMESPACE_.MadLevelProfile.GetProfileInteger | ( | string | property | ) |
| static

Gets global-scoped property value as integer type. You can get value of properties only set using SetProfileInteger method.

Returns
  Integer representation of property value or 0 if value is unset.

Parameters

  property | Property name.

static int _NAMESPACE_.MadLevelProfile.GetProfileInteger | ( | string | property,
|  | int | def
| ) |  |
| static

Gets global-scoped property value as integer type. You can get value of properties only set using SetProfileInteger method.

Returns
  Integer representation of property value or given default if value is unset.

Parameters

  property | Property name.
  def | Default value to return if value is unset.

static string _NAMESPACE_.MadLevelProfile.GetProfileString | ( | string | property | ) |
| static

Gets global-scoped property value as string type. You can get value of properties only set using SetProfileString method.

Returns
  String representation of property value or empty string if value is unset.

Parameters

  property | Property name.

static string _NAMESPACE_.MadLevelProfile.GetProfileString | ( | string | property,
|  | string | def
| ) |  |
| static

Gets global-scoped property value as string type. You can get value of properties only set using SetProfileString method.

Returns
  String representation of property value or given default if value is unset.

Parameters

  property | Property name.
  def | Default value to return if value is unset.

static void _NAMESPACE_.MadLevelProfile.RegisterProfile | ( | string | profileName | ) |
| static

Registers profile if not yet registered. Registration of profile is optional. If you try to use profile for the first time by assigning profile name to 'profile' field then new profile will be created.

Parameters

  profileName | Profile name.

static void _NAMESPACE_.MadLevelProfile.Reload | ( |  | ) |
| static

Forces reload of profile data. Useful for testing purposes.

static void _NAMESPACE_.MadLevelProfile.SetLevelBoolean | ( | string | levelName,
|  | string | property,
|  | bool | val
| ) |  |
| static

Sets level-scoped property as boolean type. You can access it later using GetLevelBoolean or GetLevelAny methods.

Parameters

  levelName | Level name.
  property | Property name.
  val | Value to set.

static void _NAMESPACE_.MadLevelProfile.SetLevelFloat | ( | string | levelName,
|  | string | property,
|  | float | val
| ) |  |
| static

Sets level-scoped property as float type. You can access it later using GetLevelFloat or GetLevelAny methods.

Parameters

  levelName | Level name.
  property | Property name.
  val | Value to set.

static void _NAMESPACE_.MadLevelProfile.SetLevelInteger | ( | string | levelName,
|  | string | property,
|  | int | val
| ) |  |
| static

Sets level-scoped property as integer type. You can access it later using GetLevelInteger or GetLevelAny methods.

Parameters

  levelName | Level name.
  property | Property name.
  val | Value to set.

static void _NAMESPACE_.MadLevelProfile.SetLevelString | ( | string | levelName,
|  | string | property,
|  | string | val
| ) |  |
| static

Sets level-scoped property as string type. You can access it later using GetLevelString or GetLevelAny methods.

Parameters

  levelName | Level name.
  property | Property name.
  val | Value to set.

static void _NAMESPACE_.MadLevelProfile.SetProfileBoolean | ( | string | property,
|  | bool | val
| ) |  |
| static

Sets profile-scoped property as boolean type. You can access it later using GetProfileBoolean or GetProfileAny methods.

Parameters

  property | Property name.
  val | Value to set.

static void _NAMESPACE_.MadLevelProfile.SetProfileFloat | ( | string | property,
|  | float | val
| ) |  |
| static

Sets profile-scoped property as float type. You can access it later using GetProfileFloat or GetProfileAny methods.

Parameters

  property | Property name.
  val | Value to set.

static void _NAMESPACE_.MadLevelProfile.SetProfileInteger | ( | string | property,
|  | int | val
| ) |  |
| static

Sets profile-scoped property as integer type. You can access it later using GetProfileInteger or GetProfileAny methods.

Parameters

  property | Property name.
  val | Value to set.

static void _NAMESPACE_.MadLevelProfile.SetProfileString | ( | string | property,
|  | string | val
| ) |  |
| static

Sets profile-scoped property as string type. You can access it later using GetProfileString or GetProfileAny methods.

Parameters

  property | Property name.
  val | Value to set.

static void _NAMESPACE_.MadLevelProfile.UnregisterProfile | ( | string | profileName | ) |
| static

Unregisters the given profile name. All profile data will be permanently removed from the device. If current profile is profile that is given to be unregistered, current profile will be changed to defualt.

Parameters

  profileName | Profile name to unregister.

## Property Documentation

string _NAMESPACE_.MadLevelProfile.recentLevelSelected
| static get set

Gets or sets the name of recently choosen level. This is NOT a scene name but the name of icon game object.

The recent level selected name (NOT a scene name).

The documentation for this class was generated from the following file:

- Assets/Mad Level Manager/Scripts/Base/MadLevelProfile.cs