Scene A sets up a List using a prefab with a data script attached holding a bool Active ;-
Persistant.Add( firstAidObject );
Persistant[0].GetComponent<Equipment>().Active = true;
Persistant.Add( firstAidObject );
Persistant[1].GetComponent<Equipment>().Active = false;
Scene B checks those and reports both == false ;(
If I replace the above in Scene A with ;-
Persistant.Add( (GameObject) Instantiate (firstAidObject) );
Persistant[0].GetComponent<Equipment>().Active = true;
Persistant.Add( (GameObject) Instantiate (firstAidObject) );
Persistant[1].GetComponent<Equipment>().Active = false;
The list elements get destyoed between scenes with the error ;-
“The object of type ‘GameObject’ has been destroyed but you are still trying to access it.”
My Awake() contains the following and other data is persistent between scenes
DontDestroyOnLoad(transform.gameObject);"
I just want the List in Scene A to be accessible from Scene B - where am I going wrong?