I have a script that saves how many points a player has between scenes, but i wonder if it’s possible to make it so it saves the state of a image. The image is gone be “SetActive” from another scene, and then i need a script that remember which state the image is in.
Thanks in advance
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class GameStatus : MonoBehaviour {
public int score = 0;
void Start () {
score = PlayerPrefs.GetInt ("score", 0);
}
void Update () {
}
void OnDestroy(){
Debug.Log ("Fail");
PlayerPrefs.SetInt ("score", score);
}
public int GetScore(){
return score;
}
}