I created a save and load function and they work fine
I Just want when I’m saving ,a screenshot of scene saves on my pc and when I’m want to load it
I can see it , any idea?
void OnTriggerEnter2D(Collider2D other){
if (other.name == "player") {
score = PlayerPrefs.GetInt ("EMTIAZ");
playerHealth = PlayerPrefs.GetInt ("PLAYERHEALTH");
Maxhealth = PlayerPrefs.GetInt ("MAXHEALTH");
Lives = PlayerPrefs.GetInt ("LIFE");
}
}
public void LOAD(){
SceneManager.LoadScene ("sceneName");
score = PlayerPrefs.GetInt ("EMTIAZ");
playerHealth = PlayerPrefs.GetInt ("PLAYERHEALTH");
Maxhealth = PlayerPrefs.GetInt ("MAXHEALTH");
Lives = PlayerPrefs.GetInt ("LIFE");
Time.timeScale = 1;
}
it’s my code.I also don’t know how to get name of current scene.