void Start() { if (serial1 != null) { serial1.Open(); } if (serial2 != null) { serial2.Open(); } if (serial1 != null && serial1.IsOpen) { Debug.Log("Port 1 opened"); } else { Debug.Log("Could not open port 1"); } if (serial2 != null && serial2.IsOpen) { Debug.Log("Port 2 opened"); } else { Debug.Log("Could not open port 2"); } spawnPointManager = SpawnPointManager.instance; playerUIManager = PlayerUIManager.instance; if (retrieveSaveData) { spawnPointManager.Load(); } if (GameObject.Find("SpawnPoints") != null) { SpawnPointsTransform = GameObject.Find("SpawnPoints").transform; SetSpawnPointPositions(); } if (retrieveSaveData) { Load(); } if (GameObject.Find("GameController") != null) { gameController = GameController.gameController; } if (gameController.loadSaveData) { spawnPointIndex = gameController.savedSpawnPointIndex; SetSpawnPointsFromSave(); } SetCameraAndPlayerPositions(); }