Home Forums Software Development Highlight at Gaze and Presumably Tobii Fail after SceneManage.LoadScene

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19227
    Luke Epp
    Participant

    On Unity 2019.3.6, Pico SDK 2.3 -2.8.6, and Tobii SDK 2.0.0.174. Using the highlightAtGaze script to test out Tobii on the Pico Neo 2 Eye, it works well before SceneManager.LoadScene is called, but after that. Tobii and HighlightAtGaze do not work, weirdly if I exit out of the application on the Pico device and jump back in, Tobii is active and HighlightAtGaze works. This is confusing to me and I have tried calling TobiiXR.Start() in many places to try to workaround. Any help is greatly appreciated, thanks!

    #19233
    Grant [Tobii]
    Keymaster

    Hi @leppster13, and thanks for your query. There are a number of ways to enable eye tracking between scenes.

    One way is to have the TobiiXR_Initializer prefab in the start scene and make it DontDestroyOnLoad, another way is to have one initializer per scene. You can also make either of these setups work dynamically in code. If you could kindly clarify what you are trying to achieve we will be better placed to assist you further. Best Wishes

    #19235
    Luke Epp
    Participant

    Hey Grant, thanks for the help. I am just trying to reload the start scene in my case. I now have the TobiiXR_Initializer awake function looking like `private void Awake()
    {
    DontDestroyOnLoad(gameObject);
    TobiiXR.Start(Settings);

    }`
    but I am still running into the same issue. Is it possible that I need to do something with the objects with the HighlightAtGaze script attached to them? Thanks again.

    #19270
    Grant [Tobii]
    Keymaster

    Hi @leppster13, for basic eye-tracking usage in one scene reloading in the next scene, you can just add the “TobiiXR_Initializer”-prefab in the Prefabs-folder to the scene and it will work. No need to add anything in code. Please try this out and let us know how you get on. Best Wishes.

    #19273
    Luke Epp
    Participant

    Hello, I have actually solved this now and it seems that SceneManager.LoadScene(SceneManager.GetActiveScene().name); does not play nicely with what I was doing. A switch to SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); fixes the issue. Thank you for the help.

    #19279
    Grant [Tobii]
    Keymaster

    Great! Glad to hear you got it all up and running, happy to help. Please don’t hesitate to get in touch again should you require any further assistance. Best Wishes.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.