PixelCrushers.SpawnedObjectManager Class Reference

Manages spawned objects for a scene. More...

Inheritance diagram for PixelCrushers.SpawnedObjectManager:
Collaboration diagram for PixelCrushers.SpawnedObjectManager:

Classes

class  SpawnedObjectData
 
class  SpawnedObjectDataList
 

Public Member Functions

override void Reset ()
 
override void Awake ()
 
override string RecordData ()
 This method should return a string that represents the data you want to save. More...
 
override void ApplyData (string data)
 This method should process the string representation of saved data and apply it to the current state of the game. More...
 
- Public Member Functions inherited from PixelCrushers.Saver
virtual void Start ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void OnDestroy ()
 
virtual void OnBeforeSceneChange ()
 The Save System will call this method before scene changes. More...
 

Static Public Member Functions

static void AddSpawnedObjectData (SpawnedObject spawnedObject)
 
static void RemoveSpawnedObjectData (SpawnedObject spawnedObject)
 

Properties

List< SpawnedObjectspawnedObjectPrefabs [get, set]
 
List< SpawnedObjectspawnedObjects [get, set]
 
override string key [get, set]
 
- Properties inherited from PixelCrushers.Saver
bool appendSaverTypeToKey [get, set]
 Append the name of this saver type to the key. More...
 
virtual string key [get, set]
 Save data under this key. More...
 
string _internalKeyValue [get, set]
 Accesses the internal key value. More...
 
virtual bool saveAcrossSceneChanges [get, set]
 Save when changing scenes to be able to restore saved state when returning to scene. More...
 

Additional Inherited Members

- Protected Attributes inherited from PixelCrushers.Saver
string m_runtimeKey = null
 

Detailed Description

Manages spawned objects for a scene.

Member Function Documentation

static void PixelCrushers.SpawnedObjectManager.AddSpawnedObjectData ( SpawnedObject  spawnedObject)
static
override void PixelCrushers.SpawnedObjectManager.ApplyData ( string  s)
virtual

This method should process the string representation of saved data and apply it to the current state of the game.

You can use SaveSystem.Deserialize() to deserialize the string to an object that specifies the state to apply to the game.

Implements PixelCrushers.Saver.

override void PixelCrushers.SpawnedObjectManager.Awake ( )
virtual

Reimplemented from PixelCrushers.Saver.

override string PixelCrushers.SpawnedObjectManager.RecordData ( )
virtual

This method should return a string that represents the data you want to save.

You can use SaveSystem.Serialize() to serialize a serializable object to a string. This will use the serializer component on the Save System GameObject, which defaults to JSON serialization.

Implements PixelCrushers.Saver.

static void PixelCrushers.SpawnedObjectManager.RemoveSpawnedObjectData ( SpawnedObject  spawnedObject)
static
override void PixelCrushers.SpawnedObjectManager.Reset ( )
virtual

Reimplemented from PixelCrushers.Saver.

Property Documentation

override string PixelCrushers.SpawnedObjectManager.key
getset
List<SpawnedObject> PixelCrushers.SpawnedObjectManager.spawnedObjectPrefabs
getset
List<SpawnedObject> PixelCrushers.SpawnedObjectManager.spawnedObjects
getset

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