public string LoadScenario(string scenarioName) { //Debug.Log("loading scenario: " + scenarioName); var gameObjects = GuidList.GetAllObjects(); foreach (GameObject gameObject in gameObjects) { NetworkManager.NetworkInstance.DestroyUnitOnNetwork(gameObject); } GuidList.Clear(); string toReturn = Load(scenarioName); //Get the factories. ObjectFactory objectFactory = new ObjectFactory(scenarioName); objectFactory.LoadAllSurface(); objectFactory.LoadAllSubSurface(); objectFactory.LoadAllAir(); objectFactory.LoadAllMarines(); objectFactory.LoadEnvironmentVariables(); return(toReturn); }