public void StartAR(InsightARSettings settings) { checkARSupport(settings); mCurrentSetting = settings; mARCameraConfiged = false; registerInsightAR(settings); startInsightAR(settings); }
private void startInsightAR(InsightARSettings settings) { #if UNITY_ANDROID || UNITY_IOS listAnchorsToUpdate = new List <InsightARPlaneAnchor>(); listAnchorsToAdd = new List <InsightARPlaneAnchor>(); listAnchorsToRemove = new List <InsightARPlaneAnchor>(); InsightARNative.iarInit(settings.configPath, onFrameUpdate, onAnchorAdded, onAnchorUpdated, onAnchorRemoved, onFaceUpdate, IntPtr.Zero); #endif }
private void checkARSupport(InsightARSettings settings) { #if UNITY_ANDROID || UNITY_IOS //check InsightAR support if (!InsightARNative.iarSupport()) { } #endif }
private void registerInsightAR(InsightARSettings settings) { #if UNITY_ANDROID || UNITY_IOS InsightARNative.iarRegisterAppKey(settings.appKey, settings.appSecret); #endif }