Search Unity

Question XR Simple Interactable not working after restart

Discussion in 'XR Interaction Toolkit and Input' started by dgingi, Nov 14, 2022.

  1. dgingi

    dgingi

    Joined:
    Jan 4, 2021
    Posts:
    6
    Hi guys,

    In my project, I use the "XR Simple Interactable" on some of my game objects to detect when the XR ray is pointing at them.
    I have a function for "Hover Entered" and "Hover Exited" which creates a spotlight above the object.
    Everything works just as expected (and coded) when I build and run.
    However, when I restart the scene (using one of the buttons on the XR controller) I don't get the hover functionality. When I trigger the scene to run (I use a button to "play" the scene. If a button is pressed then Time.timeScale = 1, otherwise Time.timeScale = 0) even for s millisecond, the hovering functionality resumes working as expected.

    What am I missing here?
    I hope someone has any idea because I've been stuck on this for the past week or so :/

    Thanks in advance!