Beispiel #1
0
 //<summary>
 ///Terminate face tracker and camera.
 ///</summary>
 public static void ULS_UnityTrackerTerminate()
 {
     ULS_UnityTrackerRelease();
     Dispatch.Clear();
     Dispatch          = null;
     _PreviewTexture   = null;
     WaitForFirstFrame = true;
 }
Beispiel #2
0
        //<summary>
        ///Initialize face tracker and camera.
        ///</summary>
        public static int ULS_UnityTrackerInit()
        {
            if (Dispatch == null)
            {
                Dispatch = new GameObject("CameraDispatch").AddComponent <CameraDispatch> ();
            }
            ULS_UnityRegisterCallbacks(Render, Update);
            int ret = ULS_UnityTrackerInitWithKey("ulsee_for_unity");

            return(ret);
        }
 //<summary>
 ///Initialize face tracker and camera.
 ///</summary>
 public static int ULS_UnityTrackerInit()
 {
                 #if UNITY_EDITOR
     string path = Application.dataPath + "/ULSFaceTracker/Plugins/model";
                 #elif UNITY_STANDALONE_OSX
     string path = Application.dataPath + "/Plugins/" + dll + ".bundle/Contents/Resources/model";
                 #else //WINDOWS
     string path = Application.dataPath + "/Plugins/model";
                 #endif
     ULS_UnityRegisterCallbacks(Render, Update);
     if (Dispatch == null)
     {
         Dispatch = new GameObject("CameraDispatch").AddComponent <CameraDispatch> ();
     }
     int ret = ULS_UnityTrackerInit(path, "ulsee_for_unity", Application.temporaryCachePath);
     ULS_UnitySetSmoothing(true);
     return(ret);
 }
Beispiel #4
0
        //<summary>
        ///Initialize face tracker and camera.
        ///</summary>
        public static int ULS_UnityTrackerInit()
        {
            if (Dispatch == null)
            {
                Dispatch = new GameObject("CameraDispatch").AddComponent <CameraDispatch> ();
                Dispatch.SetApplicationFocus = (ULS_UnityPauseCamera);
            }

            Dispatch.Clear();
            // change default camera setting
            //A.Call<bool> ("SetupCamera", 1280, 720, 30, true);

            _PreviewTexture   = null;
            WaitForFirstFrame = true;
            RegisterCallbacks(Render, Update);
            tracker_init = A.Call <int> ("initialize", "ulsee_for_unity");

            A.Call("PlayPreview");
            return(tracker_init);
        }