Home Forums Game Integration Tobii.EyeX.Framework Issue

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #7181
    Fjorda
    Participant

    Hi, I am trying to download from visual studio 2017 Tobii.EyeX.Framework 1.8.503 to get the Minimal Fixation Data Stream for a unity project in .NET Framework v3.5 However I cannot download it and I receive this error:

    Could not install package ‘Tobii.EyeX.Framework 1.8.503′. You are trying to install this package into a project that targets’.NETFramework,Version=v3.5,Profile=Unity Full v3.5′, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

    In control panel-Programs-Turn Windows Feature on or off I have checked the box of: .NET Farmewor 3.5(includes NET 2.0 and 3.0) but the problem is still the same.

    Please give me any advice on how to fix this issue. Thank you.

    #7182
    Alex [Tobii]
    Participant

    Hi!

    I think you might need to use a different SDK for your project.

    If you are using Unity, you should use Tobii Unity SDK http://developer.tobii.com/tobii-unity-sdk/

    If you are developing for .NET (but not games), then you should use Tobii Core SDK http://developer.tobii.com/tobii-core-sdk

    If you need a low level SDK for C++ then it’s better to use Tobii Stream Engine. It also has .NET bindings. http://developer.tobii.com/tobii-core-sdk

    Tobii EyeX SDK is deprecated.

    The error you are getting is related to the fact that your application is targeting .NET Framework 3.5, while Tobii Core SDK (and EyeX SDK as well) requires .NET Framework 4.5 and higher.

    It worth mentioning that Unity uses Mono version that only implements .NET Framework 3.5. Support for .NET 4.6 in Unity 2017 is still experimental.

    Tobii Unity SDK works with all Unity versions starting Unity 4.5 (on API level).

    #7183
    Fjorda
    Participant

    Hi, thank you for your reply. I am using Unity with C# (downloaded Unity SDK from github) and I have created a game but then I think I have also downloaded Tobii Core SDK. I have created the scripts from unity and wrote them using visual studio 2017. What is the best way to fix this without deleting or destroying the game?

    #7184
    Alex [Tobii]
    Participant

    If you installed a Tobii Core SDK nuget package, just open Nuget package manager and remove the package. If you unzipped the files manually, then remove those files.

    For Unity you only need to import Tobii Unity SDK package. Here’s the manual: https://tobii.github.io/UnitySDK/manual#getting-started

    #7185
    Fjorda
    Participant

    So, I opened Unity and in Tobii “readme file” was written that I have downloaded the Tobii Unity SDK for desktop version 3.0 Beta. I also had a file in my pc called CoreSDK-master which I think is the Tobii Core SDK and I removed it but still when I try to install in visual studio the EyeX.Framework it cannot be installed. I can send you picture for unity and visual studio in email if it is better to have a look.

    #7186
    Fjorda
    Participant

    Now when I try to install the EyeX framework, it says: project unavailable

    #7187
    Alex [Tobii]
    Participant

    Hi!

    You don’t need to install EyeX SDK.

    Tobii Unity SDK doesn’t require anything else. In the previous message I posted a link to the manual and documentation. SDK also includes a number of demo scenes.

    #7190
    Fjorda
    Participant

    Ok, but I have installed correctly the Unity SDK so I believe I don’t need to go through that process again. I get this message from visual studio now:

    Some NuGet packages were installed using a target framework different from the current target framework and may need to be reinstalled. Visit http://docs.nuget.org/docs/workflows/reinstalling-packages for more information. Packages affected: Tobii.EyeX.Client

    I can just use the package manager console to reinstall the packages but which package should I include? The TobiiUnitypackage?
    Which is the right line to put to the nuGet package manager console?

    #7191
    Fjorda
    Participant

    In NuGet Package Manager (Machine Wide Package), I see this path: C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

    I think I need to remove the Microsoft SDK?

    #7192
    Alex [Tobii]
    Participant

    Please remove all the Tobii nuget packages. You don’t need any of them.

    You only need Tobii Unity SDK unitypackage (it’s not a nuget package) that you install from Unity.

    In the Unity Editor menu, select: Assets → Import Assets → Custom package…

    #7193
    Fjorda
    Participant

    I followed your advice but the problem persists. I believe that the issue is that I need to change the .NET target framework in visual studio but can’t find the way to do that.

    #7194
    Fjorda
    Participant

    All I want to use is EyeX Framework

    #7196
    Fjorda
    Participant

    So I created a brand new project (without Unity) and made the target .NET framework 4. With this framework I could install the Tobii.EyeX.Framework. Now I need to change the target.NET in my unity visual studio scripts too. Is there any way to do that?

    #7197
    Alex [Tobii]
    Participant

    As I said before, Unity uses Mono version that only implements .NET Framework 3.5. Support for .NET 4.6 in Unity 2017 is still experimental. So you can’t use it in production. In Unity projects you change target .Net framework in the Unity Editor, not in Visual Studio.

    EyeX SDK won’t provide you more data than Tobii Unity SDK. Could you please explain why do you need it in Unity?

    #7198
    Fjorda
    Participant

    So I need Tobii.EyeXFramework for making a new calibration every time I open my game, with this code:

    var host = new EyeXFramework.EyeXHost();
    host.Start();
    await Task.Delay(500);
    host.LaunchGuestCalibration();

    I also need EyeXFramework to include this code:

    namespace MinimalFixationDataStream
    {
    using EyeXFramework;
    using System;
    using Tobii.EyeX.Framework;

    public static class Program
    {
    public static void Main(string[] args)
    {
    double lastFixationStartTime = 0;

    using (var eyeXHost = new EyeXHost())
    {
    eyeXHost.Start();

    // Create a data stream: lightly filtered gaze point data.
    // Other choices of data streams include EyePositionDataStream and FixationDataStream.
    using (var fixationGazeDataStream = eyeXHost.CreateFixationDataStream(FixationDataMode.Sensitive))
    {
    // Write the data to the console.
    fixationGazeDataStream.Next += (s, e) =>
    {
    if (e.EventType == FixationDataEventType.Begin)
    {
    lastFixationStartTime = e.Timestamp;
    }
    if (e.EventType == FixationDataEventType.End)
    {
    var lastFixationDuration = e.Timestamp – lastFixationStartTime;
    Console.WriteLine(“Last fixation duration: {0:0} milliseconds”, lastFixationDuration);
    }
    };

    // Let it run until a key is pressed.
    Console.WriteLine(“Listening for fixation data, press any key to exit…”);
    Console.In.Read();
    }
    }
    }
    }
    }

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