All Classes Namespaces Functions Variables Enumerations Enumerator Properties
plyGame.PersistableObject Class Reference

This component is added to any GameObject that should be saved or restored via the LoadSave System. More...

Inherits MonoBehaviour.

Public Member Functions

void Save (object sender, object[] args)
 
void Load ()
 
void DeleteSaveData ()
 
void UseCustomKey (string key)
 Set this to make the object use this key rather than the ID it generated. Set to null or empty string to stop using custom key. More...
 

Static Public Member Functions

static void SaveBloxLovalVars (string key, plyBlox blox)
 
static void LoadBloxLovalVars (string key, plyBlox blox)
 
static void DeleteSavedBloxLovalVars (string key, plyBlox blox)
 
static void DisablePersistenceOn (GameObject go)
 

Public Attributes

UniqueID id = new UniqueID()
 
bool objectStartsActive = true
 
bool persistBloxLocalVars = true
 
bool persistPosition = true
 
bool persistRotation = false
 
bool persistScale = false
 
bool persistActiveState = false
 
bool persistDestroyedState = true
 

Protected Member Functions

void Reset ()
 
IEnumerator Start ()
 
void OnDestroy ()
 

Detailed Description

This component is added to any GameObject that should be saved or restored via the LoadSave System.

Member Function Documentation

void plyGame.PersistableObject.UseCustomKey ( string  key)

Set this to make the object use this key rather than the ID it generated. Set to null or empty string to stop using custom key.

This is useful when you have something specific, like a player, to save data for. Player Manager for example uses this to set the player object's save key to "player" by default.