This component should usually be added to the Dialogue Manager object, not the player object! This is because it needs to persist across level loads.
More...
This component should usually be added to the Dialogue Manager object, not the player object! This is because it needs to persist across level loads.
This component syncs the player's saved Lua data to the UFPS player components after a level has loaded. The player's position is not sync'ed, but stats and inventory are.
◆ HandlePostLevelLoad()
virtual void PixelCrushers.DialogueSystem.UFPS.FPSyncLuaPlayerOnLoadLevel.HandlePostLevelLoad |
( |
| ) |
|
|
virtual |
After a level is loaded, reapply the recorded persistent data from Lua.
- Parameters
-
◆ OnDisable()
virtual void PixelCrushers.DialogueSystem.UFPS.FPSyncLuaPlayerOnLoadLevel.OnDisable |
( |
| ) |
|
|
virtual |
◆ OnEnable()
virtual void PixelCrushers.DialogueSystem.UFPS.FPSyncLuaPlayerOnLoadLevel.OnEnable |
( |
| ) |
|
|
virtual |
◆ OnSceneLoaded()
void PixelCrushers.DialogueSystem.UFPS.FPSyncLuaPlayerOnLoadLevel.OnSceneLoaded |
( |
UnityEngine.SceneManagement.Scene |
scene, |
|
|
UnityEngine.SceneManagement.LoadSceneMode |
mode |
|
) |
| |
◆ dontApplyLuaNextLoadLevel
bool PixelCrushers.DialogueSystem.UFPS.FPSyncLuaPlayerOnLoadLevel.dontApplyLuaNextLoadLevel = false |
Set true
to skip applying the player's saved info from Lua on the next level load.
Normally you want to apply the saved info so the player's health, inventory, etc., persist across levels. However, if you're restarting the level with a fresh instance of the player (e.g., the player died and is respawning), set this true
or the player will receive his old stats, such as zero health.
◆ includePlayerPosition
bool PixelCrushers.DialogueSystem.UFPS.FPSyncLuaPlayerOnLoadLevel.includePlayerPosition = true |
Set true
to include player position when applying Lua info, or false
to skip position.
The documentation for this class was generated from the following file:
- D:/Documents/Unity Projects/Dialogue System/Dev/Integration/UFPS Integration/Assets/Dialogue System/Third Party Support/UFPS/Scripts/FPSyncLuaPlayerOnLoadLevel.cs