I really don’t know how to save my game progress on a FPS game. Example: If I press the “save” button then it should save what gun I’m currently holding and magazine etc, health and position. And also load the game from what I saved. Is it possible? If so, please tell me how! I’ve been googling around but no answers
PlayerPrefs.SetString(//insert any information you want saved)
My PlayerPrefs looks like this:
void SaveCharacterData(){
GameObject pc = GameObject.Find ("pc");
PlayerCharacter pcClass = pc.GetComponent<PlayerCharacter>();
PlayerPrefs.SetString("PlayerName", pcClass.Name);
}
as of right now anyway. Everytime you add something that needs to be saved (i.e. Inventory, equipment, etc) you have to add it to the string along with the location of where to find the reference.