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; }
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(); }