The question is answered, right answer was accepted
Save/Load Serialization by @Cherno
So i've been using the save/load serialization system of sir @Cherno . But the thing is i can't figure it out how can i use it properly with my quest . Here's what it looks like.
So in this image i made my TestObject1,TestObject2,TestObject3 as a prefab.
And this image i dropped the TestObject2 to the white plane and setactive it to false and it will count a score and then saved it and when i exit and load my game the testobject 1 and 3 would not disappear anymore. Could someone please point out what i am doing wrong .
In my white plane here is my code:
public GameObject q1;
public GameObject q2;
public GameObject q3;
public GameObject count;
void Start(){
}
void OnCollisionEnter(Collision col){
if(col.gameObject.CompareTag("Try1")){
q1.gameObject.SetActive (false);
count.GetComponent<AddIntegers>().counter++;
}
else if(col.gameObject.CompareTag("Try2")){
q2.gameObject.SetActive(false);
count.GetComponent<AddIntegers> ().counter++;
}
else if(col.gameObject.CompareTag("Try3")){
q3.gameObject.SetActive (false);
count.GetComponent<AddIntegers> ().counter++;
}
}
Follow this Question
Related Questions
Why Does My Saved Data Not Load? 0 Answers
Unity How to Save Serialized Levels 1 Answer
Is there a way to make a script activate when you look at an object? 1 Answer
ClientRpc Function not being carried out on clients in Unity3d c# 0 Answers
When I open my Ingame Menu My mouse appears Then when I click it disappears 0 Answers