Loading...
Searching...
No Matches
PixelCrushers.SpawnedObject Class Reference

A spawned object or spawnable prefab. More...

Inheritance diagram for PixelCrushers.SpawnedObject:
Collaboration diagram for PixelCrushers.SpawnedObject:

Public Types

enum  Mode { OnDisable , OnDestroy }
 

Public Member Functions

override void Awake ()
 
override void Start ()
 
override void OnBeforeSceneChange ()
 The Save System will call this method before scene changes.
 
override void OnDisable ()
 
override void OnDestroy ()
 
override string RecordData ()
 
override void ApplyData (string data)
 
- Public Member Functions inherited from PixelCrushers.Saver
virtual void Reset ()
 
virtual void OnEnable ()
 
string RecordData ()
 This method should return a string that represents the data you want to save.
 
void ApplyData (string s)
 This method should process the string representation of saved data and apply it to the current state of the game.
 
virtual void ApplyDataImmediate ()
 If the Saver needs to pull data from the Save System immediately after loading a scene, instead of waiting for ApplyData to be called at it its normal time, it can implement this method.
 
virtual void OnRestartGame ()
 The Save System will call this method when restarting the game.
 

Protected Member Functions

virtual void AddGuidToSaverKeys ()
 
virtual void RecordDestruction ()
 

Properties

Mode despawnMode [get, set]
 
Mode mode [get, set]
 
bool saveUniqueSaverData [get, set]
 
string guid [get, set]
 
- Properties inherited from PixelCrushers.Saver
bool appendSaverTypeToKey [get, set]
 Append the name of this saver type to the key.
 
virtual string key [get, set]
 Save data under this key.
 
string _internalKeyValue [get, set]
 Accesses the internal key value.
 
virtual bool saveAcrossSceneChanges [get, set]
 Save when changing scenes to be able to restore saved state when returning to scene.
 
virtual bool restoreStateOnStart [get, set]
 

Additional Inherited Members

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

Detailed Description

A spawned object or spawnable prefab.

Member Enumeration Documentation

◆ Mode

Enumerator
OnDisable 
OnDestroy 

Member Function Documentation

◆ AddGuidToSaverKeys()

virtual void PixelCrushers.SpawnedObject.AddGuidToSaverKeys ( )
inlineprotectedvirtual

◆ ApplyData()

override void PixelCrushers.SpawnedObject.ApplyData ( string  data)
inline

◆ Awake()

override void PixelCrushers.SpawnedObject.Awake ( )
inlinevirtual

Reimplemented from PixelCrushers.Saver.

◆ OnBeforeSceneChange()

override void PixelCrushers.SpawnedObject.OnBeforeSceneChange ( )
inlinevirtual

The Save System will call this method before scene changes.

If your saver listens for OnDisable or OnDestroy messages (see DestructibleSaver for example), it can use this method to ignore the next OnDisable or OnDestroy message since they will be called because the entire scene is being unloaded.

Reimplemented from PixelCrushers.Saver.

◆ OnDestroy()

override void PixelCrushers.SpawnedObject.OnDestroy ( )
inlinevirtual

Reimplemented from PixelCrushers.Saver.

◆ OnDisable()

override void PixelCrushers.SpawnedObject.OnDisable ( )
inlinevirtual

Reimplemented from PixelCrushers.Saver.

◆ RecordData()

override string PixelCrushers.SpawnedObject.RecordData ( )
inline

◆ RecordDestruction()

virtual void PixelCrushers.SpawnedObject.RecordDestruction ( )
inlineprotectedvirtual

◆ Start()

override void PixelCrushers.SpawnedObject.Start ( )
inlinevirtual

Reimplemented from PixelCrushers.Saver.

Property Documentation

◆ despawnMode

Mode PixelCrushers.SpawnedObject.despawnMode
getset

◆ guid

string PixelCrushers.SpawnedObject.guid
getset

◆ mode

Mode PixelCrushers.SpawnedObject.mode
getset

◆ saveUniqueSaverData

bool PixelCrushers.SpawnedObject.saveUniqueSaverData
getset

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