Пример #1
0
 /// <summary>
 /// 关闭ARKit功能
 /// </summary>
 /// <param name="_notif"></param>
 private void TurnOffARKit(Anywhere.Notification _notif)
 {
     UnityARSessionNativeInterface.GetARSessionNativeInterface().Pause();
     Anywhere.NotifCenter.GetNotice.PostDispatchEvent(Anywhere.NotifEventKey.ARKIT_FOCUS_OFF);
     Anywhere.NotifCenter.GetNotice.PostDispatchEvent(Anywhere.NotifEventKey.ASSETS_REMOVEALL);
     Anywhere.NotifCenter.GetNotice.PostDispatchEvent(Anywhere.NotifEventKey.ARKIT_DESTORYARANCHOR);
 }
Пример #2
0
 private void DestroyARAnchor(Anywhere.Notification _notif)
 {
     if (unityARAnchorManager != null)
     {
         unityARAnchorManager.Destroy();
     }
 }
Пример #3
0
        /// <summary>
        /// 开启ARKit功能
        /// </summary>
        /// <param name="_notif"></param>
        private void TurnOnARKit(Anywhere.Notification _notif)
        {
            ARKitWorldTrackingSessionConfiguration sessionConfig = new ARKitWorldTrackingSessionConfiguration(alignmentOptions[currentAlignmentIndex], planeOptions[currentPlaneIndex], true, false);

            UnityARSessionNativeInterface.GetARSessionNativeInterface().RunWithConfigAndOptions(sessionConfig, runOptions[currentOptionIndex]);
            Anywhere.NotifCenter.GetNotice.PostDispatchEvent(Anywhere.NotifEventKey.ARKIT_FOCUS_ON);
            Anywhere.NotifCenter.GetNotice.PostDispatchEvent(Anywhere.NotifEventKey.ARKIT_CREATEARANCHOR);
        }
Пример #4
0
 private void CreateARAnchor(Anywhere.Notification _notif)
 {
     unityARAnchorManager = new UnityARAnchorManager();
     UnityARUtility.InitializePlanePrefab(planePrefab);
 }