Exemple #1
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
    }
    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
    }