Esempio n. 1
0
    void OnDestroy()
    {
        ARUNController controller = ARUNController.Instance;

        if (controller != null)
        {
            controller.OnVisionUpdate -= OnVisionUpdate;
        }
        else
        {
            //Debug.LogWarning("AureController.Instance not set");
        }
    }
Esempio n. 2
0
    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
    }
Esempio n. 3
0
    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
    }
Esempio n. 4
0
    // 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;
        }
    }