fade to correct scene when current scene doesn't match save file on load

This commit is contained in:
2026-04-17 21:21:42 -05:00
parent db47bc3768
commit 8dd61407cd
4 changed files with 41 additions and 63 deletions
+9 -7
View File
@@ -17,14 +17,16 @@ public void SavePlayerData(ref PlayerSaveData data)
public void LoadPlayerData(PlayerSaveData data)
{
/*if (data.currentScene != null && data.currentScene != SceneManager.GetActiveScene().name)
if (data.currentScene != null && data.currentScene != SceneManager.GetActiveScene().name)
{
SceneManager.LoadScene(data.currentScene);
}*/
GameManager.Instance.PlayerManager.CurrentToolIndex = data.activeToolIndex;
GameManager.Instance.PlayerController.cameraController.SnapToRotation(data.camRotation);
GameManager.Instance.PlayerController.transform.position = data.dougPosition;
GameManager.Instance.GoToMapPoint(new MapPoint(data.currentScene, data.dougPosition), true);
}
else
{
GameManager.Instance.PlayerManager.CurrentToolIndex = data.activeToolIndex;
GameManager.Instance.PlayerController.cameraController.SnapToRotation(data.camRotation);
GameManager.Instance.PlayerController.transform.position = data.dougPosition;
}
}
#endregion
}