Home › Forums › Game Integration › Tobii.EyeX.Framework Issue
- This topic has 15 replies, 2 voices, and was last updated 7 years, 3 months ago by Alex [Tobii].
- AuthorPosts
- 21/07/2017 at 21:47 #7181FjordaParticipant
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.
21/07/2017 at 22:37 #7182Alex [Tobii]ParticipantHi!
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).
21/07/2017 at 22:45 #7183FjordaParticipantHi, 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?
22/07/2017 at 00:46 #7184Alex [Tobii]ParticipantIf 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
22/07/2017 at 02:03 #7185FjordaParticipantSo, 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.
22/07/2017 at 02:14 #7186FjordaParticipantNow when I try to install the EyeX framework, it says: project unavailable
22/07/2017 at 11:46 #7187Alex [Tobii]ParticipantHi!
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.
23/07/2017 at 00:33 #7190FjordaParticipantOk, 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?23/07/2017 at 00:44 #7191FjordaParticipantIn 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?
23/07/2017 at 03:08 #7192Alex [Tobii]ParticipantPlease 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…
23/07/2017 at 14:28 #7193FjordaParticipantI 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.
23/07/2017 at 15:51 #7194FjordaParticipantAll I want to use is EyeX Framework
23/07/2017 at 16:11 #7196FjordaParticipantSo 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?
23/07/2017 at 16:31 #7197Alex [Tobii]ParticipantAs 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?
23/07/2017 at 16:34 #7198FjordaParticipantSo 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();
}
}
}
}
} - AuthorPosts
- You must be logged in to reply to this topic.