Answer by damagefilter · Aug 08, 2016 at 02:19 PM
That would be
this.gameObject.SetActive(false)
Here's a good read to get started with managing GameObjects: https://docs.unity3d.com/ScriptReference/GameObject.html
I got this script to save the status of the score across my scenes, is it possible to make it so it saves the status of the image(If its false/True) ?
using UnityEngine; using System.Collections; using UnityEngine.Scene$$anonymous$$anagement;
public class PointStatus : $$anonymous$$onoBehaviour {
public int point = 0;
void Start () {
point = PlayerPrefs.GetInt ("point", 10);
}
void Update () {
}
void OnDestroy(){
Debug.Log ("Fail");
PlayerPrefs.SetInt ("point", point);
}
public void AddPoint(int s){
point += s;
}
public int GetPoint(){
return point;
}
public void LoadScene(string sceneName){
Scene$$anonymous$$anager.LoadScene (sceneName);
}
}
Your answer
Follow this Question
Related Questions
Saving an image's state 2 Answers
Save a Image's state 1 Answer
Making an image appear 0 Answers
Save Image state between scenes 0 Answers
How can I modify/change a prefab? 1 Answer