Home Forums Game Integration Install StreamEngine API into Unity Project

This topic contains 5 replies, has 2 voices, and was last updated by  Grant [Tobii] 3 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11875

    Hi,
    This might seems easy, but right now I’m having a lot of trouble installing StreamEngine API into Unity project. I followed the steps provided in the Getting Start section but it’s not working. Whenever I wrote ‘using Tobii.StreamEngine’ it always said the namespace cannot be found. Please help!!!
    Thank you.

    #11883

    Grant [Tobii]
    Moderator

    Hi @me-supachai and thanks for your query. Indeed, it should be quite possible for you to use the Stream Engine within Unity. First thing to report to us is which .Net version you are using? It may be that you are using .Net 3.5 whilst the Stream Engine Wrapper dll is .net 4.5

    That being the case, you may be able to use this Stream Engine Wrapper @ https://www.nuget.org/packages/Tobii.StreamEngine/

    It would also help if you could kindly provide as much detail as possible in your reply with respect to your system, IDE & Unity versions for us to best diagnose the issue.

    Also, are you able to run the regular Stream Engine API sample without Unity, ie in a regular VS session? Thanks for the clarification.

    #11886

    I use Visual Studio 2017 with all .NET up to version 4.6 and Unity 2018.3.12f1.
    I can run Stream Engine API in normal projects without any problems. I just followed the instruction: right-click on the project’s reference folder -> choose Manage NuGet Package -> install. Also, there’s only 1 project in my solution.
    But, when I tried to do the same in Unity project… For some reasons, there’re 2 projects in my solution (Assembly-CSharp and Assembly-Csharp-Editor) and each of them has its own reference folder, but when you right-click those reference folders there’s no option to Manage NuGet anymore (You can only add Analyzer…). You have to right-click at the solution to find Manage NuGet option. So, I clicked on that and followed the steps. There’s an option to install Stream Engine on both or single project within the solution. I tried everything but nothing seems to work. Also, there’s no Property in each project so I have no idea how to check the version of .net it’s running.

    #11887

    Grant [Tobii]
    Moderator

    Hi @me-supachai thanks for the clarification. We now understand that the issue is in using the Nuget package manager which is not be used for setting up the Stream Engine with Unity.

    Rather, download the relevant DLL directly from https://www.nuget.org/packages/Tobii.StreamEngine/ -> “Download package”

    Theareafter, unzip and setup references within Unity according to specified documentation @ https://docs.unity3d.com/Manual/NativePlugins.html
    Hopefully this should be enough for you to get started, please let us know how you get on.

    #11890

    OK, I think it works now. Thanks a lot Grant!
    However, I still got a question. I downloaded Stream Engine directly from Getting Start page, then extract the whole thing into a folder in the Assets folder of Unity project. That’s it! Right now this is the location of .dll files (Assets/TargetFolder/lib/tobii) and this is the location of the header files (Assets/TargetFolder/include/tobii). Is this the right location for the header files?
    Also, I think you really should mention files in “binding” folder in the setting guide in Getting Start section. Because you only mention files in “include” and “lib” folder, I didn’t have any idea what files in the “binding” folder does and didn’t think I would need to paste those into my project at all. Like I said, pasting those files in Unity project make it work instantly.

    #11891

    Grant [Tobii]
    Moderator

    Hi @me-supachai, great! Glad to hear you are up and running now and your paths looks good. Thanks for your feedback, I will pass it along to the developers.
    Should you wish to share your final project publically online such as Github or similar, that would be most welcome. Best Wishes.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.