::Thanks for bringing this to my attention, the issue with the code is that LoadPlayerData()
is being called by PlayerController.cs on Start()
but no data has been saved in SavePlayerData()
to retrieve. this causes an error where the data is not loaded. As such, the rest of Start()
, which contains your rb,gravityScale
code, is not completed. Thus, your player cannot land on the ground and therefore cannot jump.
This is easily fixed by saving your game at least once.
However, considering you are just starting, What should work is that you can move your LoadPlayerData()
code in PlayerController.cs to the bottom of Start()
. You will still get the error message, but your game is still playable until you have saved.