So I have this script attached to a game object called “DontDestroy”, and in the update function it is accessing another game object and looking for the script “SpaceShipMenuScript”.
void Update ()
{
if (GameObject.Find("Canvas").GetComponent<SpaceShipMenuScript>().loaded_1);
{
networkmanager = true;
}
if (GameObject.Find("Canvas").GetComponent<SpaceShipMenuScript>().loaded_2);
{
networkmanager_2 = true;
}
}
Here is the other script it is looking if the booleans loaded_1 and loaded_2 are true.
public void StartLevel_1 ()
{
Application.LoadLevel (2);
loaded_1 = true;
}
public void StartLevel_2 ()
{
Application.LoadLevel (2);
loaded_2 = true;
}
But everytime I test it networmanager and networkmanager_2 always start as true, but loaded_1 and loaded_2 are still false. Any help I would greatly appreciate.