# Ray on XR Rig does not work only on first startup

**URL:** <https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825>\
**Category:** Unity Development\
**Tags:** development, unity\
**Created:** [May 2, 2023, 7:54am UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825 "2023-05-02T07:54:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tokufxug](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/tokufxug/32/172_2.png) [@tokufxug](https://forum.magicleap.cloud/u/tokufxug)\
**Post date:** [May 2, 2023, 7:54am UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/1 "2023-05-02T07:54:59Z")

</div>

When I run a simple configuration app on XR Rig and Sphere as shown below, Ray does not follow at all when I move the controllers. Once I go back to the Home screen and select the app again, Ray follows.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/e869c1eb09edc892abad3bfd77eaec84e46af7eb.png)

YouTube

[![](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/df69dee0743117aeb360e2a54066dc0890fa141c.jpeg "Ray on XR Rig does not work only on first startup.") ](https://www.youtube.com/watch?v=dcvzqhhH3r4)

**Unity Editor version** : 2022.2.0f1  
**ML2 OS version** :1.2.0 B3E.230330.11-R.044  
**MLSDK version** :1.2.0  
**MLSDK Unity Package version** :1.6.0  
**Host OS** : (Windows/MacOS) Windows 11 Home Edition

---

<div class="post-metadata">

**Author:** ![tokufxug](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/tokufxug/32/172_2.png) [@tokufxug](https://forum.magicleap.cloud/u/tokufxug)\
**Post date:** [May 4, 2023, 2:18am UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/2 "2023-05-04T02:18:37Z")

</div>

Are you investigating?  
DevRel for Magic Leap, although the response time is quite slow.

---

<div class="post-metadata">

**Author:** ![ruiying.wang](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/ruiying.wang/32/693_2.png) [@ruiying.wang](https://forum.magicleap.cloud/u/ruiying.wang)\
**Post date:** [May 5, 2023, 3:13pm UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/3 "2023-05-05T15:13:11Z")

</div>

running over USB? WIFI or  
installed your app to the device?  
works fine for me: sdk 1.2.0, unity 2022.2.17. I used Magic Leap Setup Tool to configure the project.

---

<div class="post-metadata">

**Author:** ![sengelman](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/sengelman/32/11_2.png) [@sengelman](https://forum.magicleap.cloud/u/sengelman)\
**Post date:** [May 5, 2023, 3:39pm UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/4 "2023-05-05T15:39:39Z")

</div>

@tokufxug Can you try to import this in your project to perhaps fix anything that may have been missed? [Magic Leap Setup Tool | Integration | Unity Asset Store](https://assetstore.unity.com/packages/tools/integration/magic-leap-setup-tool-194780)

---

<div class="post-metadata">

**Author:** ![sengelman](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/sengelman/32/11_2.png) [@sengelman](https://forum.magicleap.cloud/u/sengelman)\
**Post date:** [May 8, 2023, 3:31pm UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/5 "2023-05-08T15:31:52Z")

</div>

@tokufxug Can you confirm this issue? We have been unable to reproduce.

---

<div class="post-metadata">

**Author:** ![tokufxug](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/tokufxug/32/172_2.png) [@tokufxug](https://forum.magicleap.cloud/u/tokufxug)\
**Post date:** [May 8, 2023, 3:34pm UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/6 "2023-05-08T15:34:53Z")

</div>

Currently, we are working on Remote Rendering, so we have not been able to check this project.

We will create a new project and reconfirm it. We hope to have this done by the end of next week at the earliest.

---

<div class="post-metadata">

**Author:** ![jamesashley1](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/jamesashley1/32/663_2.png) [@jamesashley1](https://forum.magicleap.cloud/u/jamesashley1)\
**Post date:** [May 8, 2023, 3:50pm UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/7 "2023-05-08T15:50:03Z")

</div>

@tokufxug I had the same issue and so did my colleagues. It was a bug in the ML Unity SDK 1.5. It doesn't happen in 1.4 and is fixed in 1.6.

---

<div class="post-metadata">

**Author:** ![tokufxug](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/tokufxug/32/172_2.png) [@tokufxug](https://forum.magicleap.cloud/u/tokufxug)\
**Post date:** [May 8, 2023, 3:52pm UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/8 "2023-05-08T15:52:16Z")

</div>

Thanks for your reply.  
I thought I had originally used Magic Leap's Unity Package 1.5 and upgraded to 1.6, but it seems likely that I was not able to. I will create a new one and try it for now.

---

<div class="post-metadata">

**Author:** ![sengelman](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/sengelman/32/11_2.png) [@sengelman](https://forum.magicleap.cloud/u/sengelman)\
**Post date:** [May 8, 2023, 3:57pm UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/9 "2023-05-08T15:57:31Z")

</div>

Thank you, @tokufxug . We expect `1.6.0` to work for you, as expected.

---

<div class="post-metadata">

**Author:** ![tokufxug](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/tokufxug/32/172_2.png) [@tokufxug](https://forum.magicleap.cloud/u/tokufxug)\
**Post date:** [May 16, 2023, 1:02pm UTC](https://forum.magicleap.cloud/t/ray-on-xr-rig-does-not-work-only-on-first-startup/1825/10 "2023-05-16T13:02:04Z")

</div>

I see this problem even if I recreate the project and create it from scratch with the Magic Leap Setup Tool.

[![](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/0eac7a2bfb2d215817d498b3dd7cc9dfa14fcecc.jpeg "Depth Buffer Sengmented Dimming Bug 01") ](https://www.youtube.com/watch?v=VJJOU5fZnF4)

[![](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/5b674ac3bf3ea12e3273db6403d32a880dc2a98c.jpeg "Depth Buffer Segmented Dimming Bug 02") ](https://www.youtube.com/watch?v=gYF4MrofPzE)

[![](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/eee6b01662046a8a0f12dec4370ec774861556e1.jpeg "Segmented Dimmer Example Bug") ](https://www.youtube.com/watch?v=h-UjT35r20k)

By the way, can you tell us what version of Unity Editor you recommend?
