/** This method initializes the tracker. */ bool InitializeTracker(string config, string license) { Debug.Log("Visage Tracker: Initializing tracker with config: '" + config + "'"); #if (UNITY_IPHONE || UNITY_ANDROID) && UNITY_EDITOR return(false); #endif #if UNITY_ANDROID Shader shader = Shader.Find("Unlit/Texture"); CameraViewMaterial.shader = shader; // initialize visage vision VisageTrackerNative._loadVisageVision(); Unzip(); AndroidJavaClass unity = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); this.androidCameraActivity = unity.GetStatic <AndroidJavaObject>("currentActivity"); #else Shader shader = Shader.Find("Custom/BGRATex"); CameraViewMaterial.shader = shader; #endif // initialize tracker VisageTrackerNative._initTracker(config, license); return(true); }
public bool InitializeTracker(string config, string license) { Debug.Log("Visage Tracker: Initializing tracker with config: '" + config + "'"); #if (UNITY_IPHONE || UNITY_ANDROID) && UNITY_EDITOR return(false); #endif Shader shader = Shader.Find("Custom/BGRATex"); CameraViewMaterial.shader = shader; // initialize tracker VisageTrackerNative._initTracker(config, license); return(true); }
/** This method initializes the tracker. */ bool InitializeTracker(string config, string license) { Debug.Log("Visage Tracker: Initializing tracker with config: '" + config + "'"); #if (UNITY_IPHONE || UNITY_ANDROID) && UNITY_EDITOR return(false); #endif #if UNITY_ANDROID // initialize visage vision VisageTrackerNative._loadVisageVision(); Unzip(); unity = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); this.androidCameraActivity = unity.GetStatic <AndroidJavaObject>("currentActivity"); #endif // initialize tracker VisageTrackerNative._initTracker(config, license); return(true); }