void OnDestroy() { ARUNController controller = ARUNController.Instance; if (controller != null) { controller.OnVisionUpdate -= OnVisionUpdate; } else { //Debug.LogWarning("AureController.Instance not set"); } }
void OnDestroy() { ARUNController controller = ARUNController.Instance; if (controller != null) { controller.OnVisionUpdate -= OnVisionUpdate; } else { //Debug.LogWarning("AureController.Instance not set"); } #if !UNITY_EDITOR if (sphero != null) { sphero.RemoveDataStreamingMask((ulong)kVisionMask); SpheroDeviceMessenger.SharedInstance.AsyncDataReceived -= ReceiveAsyncMessage; } #endif }
void Start() { ARUNController controller = ARUNController.Instance; if (controller != null) { controller.OnVisionUpdate += OnVisionUpdate; } else { //Debug.LogWarning("AureController.Instance not set"); } #if !UNITY_EDITOR // Get first connected Sphero Sphero[] spheros = SpheroProvider.GetSharedProvider().GetConnectedSpheros(); if (spheros.Length > 0) { sphero = spheros[0]; sphero.AddDataStreamingMask((ulong)kVisionMask); SpheroDeviceMessenger.SharedInstance.AsyncDataReceived += ReceiveAsyncMessage; } #endif }
// Use this for initialization void Start() { Screen.orientation = ScreenOrientation.LandscapeLeft; ARUNController controller = ARUNController.Instance; if (controller != null) { controller.OnVisionUpdate += OnVisionUpdate; } else { //Debug.LogError("AureController.Instance not set"); } Camera[] cameras = GetComponentsInChildren <Camera>(); foreach (Camera cam in cameras) { cam.fieldOfView = kFov * 2f; cam.near = 0.05f; cam.far = 1000f; } }