- 04/11/2020 at 22:08 #19227
On Unity 2019.3.6, Pico SDK 2.3 -2.8.6, and Tobii SDK 22.214.171.124. 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!05/11/2020 at 12:26 #19233
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 Wishes05/11/2020 at 20:19 #19235
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()
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.10/11/2020 at 12:53 #19270
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.10/11/2020 at 19:44 #19273
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.11/11/2020 at 10:54 #19279
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.
- You must be logged in to reply to this topic.