PixelCrushers.DialogueSystem.PersistentPositionData Class Reference

The persistent position data component works with the PersistentDataManager to keep track of a game object's position when saving and loading games or changing levels. More...

Inheritance diagram for PixelCrushers.DialogueSystem.PersistentPositionData:
Collaboration diagram for PixelCrushers.DialogueSystem.PersistentPositionData:

Public Member Functions

void Start ()
 
void OnRecordPersistentData ()
 Listens for the OnRecordPersistentData message and records the game object's position and rotation into the Lua Actor[] table. More...
 
void OnApplyPersistentData ()
 Listens for the OnApplyPersistentData message and retrieves the game object's position and rotation from the Lua Actor[] table. More...
 

Static Public Member Functions

static string SanitizeLevelName (string levelName)
 

Public Attributes

string overrideActorName
 (Optional) Normally, this component uses the game object's name as the name of the actor in the Lua Actor[] table. More...
 
bool recordCurrentLevel = true
 If true, the object's current level is also recorded; and, on load, the position is only applied if the current level matches the recorded level. More...
 
bool restoreCurrentLevelPosition = true
 

Protected Member Functions

virtual void OnEnable ()
 
virtual void OnDisable ()
 

Detailed Description

The persistent position data component works with the PersistentDataManager to keep track of a game object's position when saving and loading games or changing levels.

Member Function Documentation

◆ OnApplyPersistentData()

void PixelCrushers.DialogueSystem.PersistentPositionData.OnApplyPersistentData ( )

Listens for the OnApplyPersistentData message and retrieves the game object's position and rotation from the Lua Actor[] table.

◆ OnDisable()

virtual void PixelCrushers.DialogueSystem.PersistentPositionData.OnDisable ( )
protectedvirtual

◆ OnEnable()

virtual void PixelCrushers.DialogueSystem.PersistentPositionData.OnEnable ( )
protectedvirtual

◆ OnRecordPersistentData()

void PixelCrushers.DialogueSystem.PersistentPositionData.OnRecordPersistentData ( )

Listens for the OnRecordPersistentData message and records the game object's position and rotation into the Lua Actor[] table.

◆ SanitizeLevelName()

static string PixelCrushers.DialogueSystem.PersistentPositionData.SanitizeLevelName ( string  levelName)
static

◆ Start()

void PixelCrushers.DialogueSystem.PersistentPositionData.Start ( )

Member Data Documentation

◆ overrideActorName

string PixelCrushers.DialogueSystem.PersistentPositionData.overrideActorName

(Optional) Normally, this component uses the game object's name as the name of the actor in the Lua Actor[] table.

If your actor is named differently in the Lua Actor[] table (e.g., the actor has a different name in Chat Mapper or the DialogueDatabase), then set this property to the Lua name.

◆ recordCurrentLevel

bool PixelCrushers.DialogueSystem.PersistentPositionData.recordCurrentLevel = true

If true, the object's current level is also recorded; and, on load, the position is only applied if the current level matches the recorded level.

◆ restoreCurrentLevelPosition

bool PixelCrushers.DialogueSystem.PersistentPositionData.restoreCurrentLevelPosition = true

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