Home Forums Software Development EyeX for Unity cannot build in Mono Reply To: EyeX for Unity cannot build in Mono


Hi Guillaume,
Unity creates two solution files for you, one called UnitySamples.sln and one called UnitySamples-csharp.sln. The difference between the two is that the one without the “csharp” includes ALL script code projects, not just the ones for C#. And the project that fails with the errrors you describe happens to be one written in UnityScript. So the easy fix is to use the “csharp” solution file instead: no errors, everybody happy! 🙂

The reason for the error is that Unity:
a) adds assemblies in the plugin directory as references to ALL script code projects, not only the ones written in C#.
b) expects the assemblies referenced from the UnityScript assembly to be compiled for Any CPU, but the Tobii.EyeX.Client.Net20 assembly is compiled for the x86 platform (the SDK package also includes one for x64).
An alternative solution to the problem is to remove the reference to Tobii.EyeX.Client.Net20 from the UnityScript project. But Unity will probably insist on putting it back there every time the project file is re-generated.