void InitTracker() { if (OpenTracker) { if (mTracker == IntPtr.Zero) { string dllfilepath = Application.dataPath + "\\Plugins\\ImageDll.dll"; if (Application.isEditor) { dllfilepath = Application.dataPath + "\\MicroLightSDK\\Runtime\\Plugins\\x86_64\\ImageDll.dll"; // UnityEngine.Debug.Log(dllfilepath); } deviceType = (TrackingDeviceType)MicroLightPlugin.HoloGraphicUtilities.GetTrackingDeviceType(); mTracker = MicroLightPlugin.Tracker.CreateTracker(deviceType, dllfilepath); } if (mTracker != IntPtr.Zero) { bool result = MicroLightPlugin.Tracker.Init(mTracker); if (result) { UnityEngine.Debug.Log("Tracker Init Success"); } else { UnityEngine.Debug.Log("Tracker Init Failed"); } } } }
public static extern IntPtr CreateTracker(TrackingDeviceType deviceType, [MarshalAs(UnmanagedType.LPWStr)] string file);