public static void Reset() { // destroy landmarks and viapoints for (int i = 1; i < landmarks.Count; i++) { Destroy(landmarks[i]); Destroy(viapoints[i - 1]); Destroy(path); } landmarks.Clear(); landmarks.Add(StaticInitLandmark); viapoints.Clear(); // create optimal path display path = new GameObject(); path_renderer = path.AddComponent <LineRenderer>(); path_renderer.positionCount = 0; path_renderer.widthMultiplier = 0.1f; path.GetComponent <Renderer>().material.color = Color.black; //GameObject.Find("FPSController").GetComponent<LandmarkPlacer>().SwitchCameras(); GameObject.Find("FPSController").GetComponent <FirstPersonController>().enabled = false; StaticCanvas.SetActive(true); Cursor.visible = true; Cursor.lockState = CursorLockMode.None; StaticInstructions.GetComponentInChildren <Text>().text = ""; state = "PARAMETERS"; }
static void InitializeOnStartUp() { Application.runInBackground = true; instance = CreateInstance(); }