public void Start() { Instance = this; DontDestroyOnLoad(gameObject); PopulateList(); StartCoroutine(GetCoordinates()); }
private void Start() { webcamDeviceIndex = GetMainWebcam(); webcam = new WebCamTexture(WebCamTexture.devices[webcamDeviceIndex].name, Screen.width, Screen.height, 30); webcam.Play(); StartCoroutine(InitArCamera()); position = new ARLocation(new GeoCoordinate()); ToolBox.Instance.sensorManager.gps.AddObserver(this); ToolBox.Instance.sensorManager.orientation.AddObserver(this); }
public void Init(Element element) { id = element.id; name = element.title; if (element.ratio != null) { scale = float.Parse(element.ratio); } if (element.transparency != null) { opacity = float.Parse(element.transparency); } if (element.orientation != null) { orientation = float.Parse(element.orientation); } if (element.latitude != null || element.longitude != null || element.elevation != null) { GeoCoordinate temp = new GeoCoordinate(float.Parse(element.latitude), float.Parse(element.longitude), float.Parse(element.elevation)); location = new ARLocation(temp); } }