Home Forums Software Development Application.LoadLevel doesn't load Tobii in the EXE

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2925
    Bianca Zankl
    Participant

    Hi there!

    My game uses Tobii EyeX in Unity 5. The EyePositionDataComponent Script is attached to a first person Player. Each level has its own player. I have a level with several boxes. They are either visible or invisible depending on whether the user opens the left or right eye. Everything works great when I play this scene in the editor. I can also build an application of this single level and everything works as expected. The problem occurs when I try to access the level with Application.LoadLevel <b>in the application</b>. It doesn’t happen in the editor.

    I thought it’s because I get a new Player for each scene, but adding the script to an empty game object in the first scene and setting it to “DontDestroyOnLoad” didn’t help. I can’t understand why this problem occurs <b>only</b> in the application. Any ideas?

    Thanks in advance

    #3011
    Bianca Zankl
    Participant

    Any ideas?

    #3012
    Patrik [Tobii]
    Participant

    Hello Bianca,

    Sorry for the late reply!
    I will take a look at your issue and see if I can see what’s going on.

    Best regards
    Patrik

    #3133
    Bianca Zankl
    Participant

    Thank you very much, please let me know if you find something.
    I still have no idea how to solve the problem.

    #4453
    Daniel
    Participant

    I am also having issues with this. The EyeXHost is created in one scene and is itself set to be persistent with Don’t DestroyOnLoad, but when I load a new scene, I lose tracking capability. I also went as far as to try to make my GazePointDataComponent and UserPresenceComponent persist across scene boundaries. I am using Unity 5.3.2p3.

    #4457
    Daniel
    Participant

    Unity 5.3.2p3 / TobiiEyeXSdk-Unity-1.6.477

    So, I made a really nasty workaround to this issue. I am not sure what is causing it, whether the OnApplicationFocus callback is being called in between scenes or there is an issue elsewhere. The following code allows for scene changes to not affect tracking.

    private void OnLevelWasLoaded(int level)
    {
        EyeXHost.GetInstance().OnApplicationFocus(true);
    }
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.