I was trying to use Json and PlayerPrefs to save the final position of my player before quitting the play mode with the code logics in the following:
![8840461–1204486–9}1`FXC7Y%SDLE_)06ADV5.png|1892x912
The position of my player never changed after I re-entered the play mode as the player still started from the original position.
I just gave a shot at another way of coding, the playerprefs has the registry of the latest position saved but the player still failed to start at the position saved in the last play mode.
The saving process will be done by a button click with the method SaveGame() running, the data in the playerprefs is pushed to the registry but the player still failed to start at the position last saved.
Have you debugged what the value written and read from player-prefs is?
What kind of character controller is this, too? Components like the UnityEngine.CharacterController component need to be disabled before you can alter their transform’s position.
It’s also worth noting player prefs really shouldn’t be used for this save-game information.
‘Ideal’ is relative to the project. One project’s save system can be completely different to another project.
But it generally involves serialising data to JSON or similar and writing that out to a file on disk. There are no shortage of tutorials on how to do this.