예제 #1
0
 public void CreateSession(ARCoreSession sessionComponent)
 {
     sessionComponent.StartCoroutine(InstantPreviewManager.InitializeIfNeeded());
     if (SessionComponent != null)
     {
         Debug.LogError("Multiple ARCore session components cannot exist in the scene. " +
                        "Destroying the newest.");
         GameObject.Destroy(sessionComponent);
         return;
     }
     SessionComponent = sessionComponent;
 }
예제 #2
0
        public void CreateSession(ARCoreSession session)
        {
            session.StartCoroutine(InstantPreviewManager.InitializeIfNeeded());

            if (m_SessionComponent != null)
            {
                //Debug.LogError("Multiple session components cannot exist in the scene. " +
                //"Destroying the newest.");
                //GameObject.Destroy(session);
                //return;
            }

            m_SessionComponent = session;
            EnableSession();
        }