protected virtual void CheckDeviceIndex()
        {
            if (poseAction[inputSource].active && poseAction[inputSource].deviceIsConnected)
            {
                int currentDeviceIndex = (int)poseAction[inputSource].trackedDeviceIndex;

                if (deviceIndex != currentDeviceIndex)
                {
                    deviceIndex = currentDeviceIndex;

                    if (broadcastDeviceChanges)
                    {
                        this.gameObject.BroadcastMessage("SetInputSource", inputSource, SendMessageOptions.DontRequireReceiver);
                        this.gameObject.BroadcastMessage("SetDeviceIndex", deviceIndex, SendMessageOptions.DontRequireReceiver);
                    }

                    if (onDeviceIndexChanged != null)
                    {
                        onDeviceIndexChanged.Invoke(this, inputSource, deviceIndex);
                    }
                    if (onDeviceIndexChangedEvent != null)
                    {
                        onDeviceIndexChangedEvent.Invoke(this, inputSource, deviceIndex);
                    }
                }
            }
        }
        protected virtual void CheckDeviceIndex()
        {
            if (poseAction[inputSource].active && poseAction[inputSource].deviceIsConnected)
            {
                int currentDeviceIndex = (int)poseAction[inputSource].trackedDeviceIndex;

                if (deviceIndex != currentDeviceIndex)
                {
                    deviceIndex = currentDeviceIndex;

                    if (broadcastDeviceChanges)
                    {
                        foreach (SteamVR_RenderModel r in GetComponentsInChildren <SteamVR_RenderModel>())
                        {
                            r.SetInputSource(inputSource);
                            r.SetDeviceIndex(deviceIndex);
                        }
                        //this.gameObject.BroadcastMessage("SetInputSource", inputSource, SendMessageOptions.DontRequireReceiver);
                        //this.gameObject.BroadcastMessage("SetDeviceIndex", deviceIndex, SendMessageOptions.DontRequireReceiver);
                    }

                    if (onDeviceIndexChanged != null)
                    {
                        onDeviceIndexChanged.Invoke(this, inputSource, deviceIndex);
                    }
                    if (onDeviceIndexChangedEvent != null)
                    {
                        onDeviceIndexChangedEvent.Invoke(this, inputSource, deviceIndex);
                    }
                }
            }
        }