Library only orks when using CalibCamera first?

Forum for development eye controlled Unity 3D applications

Library only orks when using CalibCamera first?

Postby dirkbroenink » 22 Jul 2014, 15:36

GazeCamera.OnGazeUpdate(GazeData gazeData) only gets called when I first load the calibscene.unity that came in the sample, and from there go to my own scene. If I skip calibscene.unity and directly go to my own scene, eyetracking does not work. It does not matter if whether I actually do calibration in the calibscene.unity or not, it also happens when I load that scene and directly press 'load next scene'.

I've had a look at the code in GazeCamera.cs and CalibCamera.cs and they appear identical. Both contain this:
Code: Select all
       //initialising GazeData stabilizer
        gazeUtils = new GazeDataValidator(30);

      //activate C# TET client, default port
      GazeManager.Instance.Activate
         (
            GazeManager.ApiVersion.VERSION_1_0,
            GazeManager.ClientMode.Push
            );

        //register for gaze updates
        GazeManager.Instance.AddGazeListener(this);


Anyone got any clue what's going on? I wouldn't know where to start looking, because it seems like it shouldn't matter at all, especially because I can skip the calibration in calibscene.unity, the scene itself does nothing else.
dirkbroenink
 
Posts: 1
Joined: 29 Jun 2014, 17:52

Re: Library only orks when using CalibCamera first?

Postby Anders » 23 Jul 2014, 11:04

Hi

As you might know, the Unity samples use the TET C# SDK. You can find a tutorial explaining the steps involved with using the library at our dev website.

As your code snippet correctly explains, you have to activate the GazeManager and attach a IGazeListener instance to get GazeData frames.

In the GazeCam sample, if you look in GazeCamera.cs, then you'll see that there is no GazeManagerActivate() call. This call is made in the first scene (in the CalibCamera class). This is the reason do not get any calls to GazeCamera.OnGazeUpdate(GazeData gazeData).

I hope this helps.

BR,
Anders
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23


Return to Unity



cron