Unity에서 The Eye Trive를 사용하는 C#SDK 준비

6032 단어 TheEyeTribeUnityC#

개시하다


본고는 Unity에서 안구 운동The Eye Tribe을 추적하는 센서를 사용하는 환경 구축 절차를 소개한다.공식적으로 이것,이것,The Eye Trive, Unity와 협업한 흥미로운 샘플을 준비했다.
Unity 자체 사용법은 해당되지 않습니다.

1. Unity 프로젝트 만들기


The Eye Trive SDK를 사용하는 Unity 프로젝트를 만듭니다.

2. dll 다운로드


최신 TETCSharpClientC#SDK용 GitHub 웨어하우스용 releases.dll 및 NewtonsoftJson.dll을 다운로드합니다.

3. Unity 프로젝트의 Assets 아래에 dll 배치


다운로드한 두 dll을 작성된 Unity 항목의 Assets 아래 디렉토리에 배치합니다.
[Unity 프로젝트의 루트]/Assets/Plugins에 있습니다.

4. API Commparability Level을 엽니다.NET 2.0으로 설정


Unity에서 File->Build Settings->Player Settings->Other Settings에서 API Comporability Level을 사용합니다.NET 2.0으로 설정합니다.

아마 이곳은 묵인된 것 같다.NET 2.0 Subset이 되지만, 이렇게 유니티 프로젝트를 구축하려면 뉴튼소프트가 필요하다.Json.dll을 읽을 수 없습니다. 아래와 같이 R e flectionTypeLoadException의 예외를 던질 수 있습니다.나는 이곳에서 잠시 미혹되었다.
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in :0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in :0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in :0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in :0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in :0
at Mono.CSharp.Driver.Compile () [0x00000] in :0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in :0
The class System.ComponentModel.INotifyPropertyChanging could not be loaded, used in System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The class System.ComponentModel.AddingNewEventHandler could not be loaded, used in System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The class JTokenReferenceEqualityComparer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JContainer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JObject could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JContainer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JContainer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JContainer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class JPropertyList could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JObject could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JArray could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JObject could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JObject could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JProperty could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class d_4`2 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class df`2 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class d0 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class d2 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class d0 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class <>c_DisplayClass2 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed

5. 준비 완료!


환경 구축은 이상이다.이렇게 C# 스크립트를 쓸 때는 The Eye Trive의 C#SDK를 사용할 수 있습니다.
SDK 인코딩을 사용하면 다음을 참조할 수 있습니다.
  • http://dev.theeyetribe.com/csharp/
  • http://eyetribe.github.io/tet-csharp-client/
  • 관련 링크

  • The Eye Trive 공식 웹 사이트
  • 웹 페이지 정보
  • 좋은 웹페이지 즐겨찾기