|
|
|
|
|
|
using UnityEngine; |
|
|
|
using Unity.iOS.Multipeer; |
|
|
|
|
|
|
|
#if UNITY_IOS && !UNITY_EDITOR
|
|
|
|
using Unity.iOS.Multipeer; |
|
|
|
#endif
|
|
|
|
[RequireComponent(typeof(ARSession))] |
|
|
|
ARSession m_ARSession; |
|
|
|
string m_SessionName; |
|
|
|
public ARSession arSession |
|
|
|
public string sessionName |
|
|
|
get { return m_ARSession; } |
|
|
|
set { m_ARSession = value; } |
|
|
|
get { return m_SessionName; } |
|
|
|
set { m_SessionName = value; } |
|
|
|
[SerializeField] |
|
|
|
string m_SessionName; |
|
|
|
ARSession m_ARSession; |
|
|
|
public string sessionName |
|
|
|
void Start() |
|
|
|
get { return m_SessionName; } |
|
|
|
set { m_SessionName = value; } |
|
|
|
// Unconditionally compiled Start method so that
|
|
|
|
// we get the enabled checkbox in the Editor
|
|
|
|
#if UNITY_IOS && !UNITY_EDITOR
|
|
|
|
MCSession m_MCSession; |
|
|
|
|
|
|
|
ARKitSessionSubsystem GetSubsystem() |
|
|
|
|
|
|
|
|
|
|
void Awake() |
|
|
|
{ |
|
|
|
m_ARSession = GetComponent<ARSession>(); |
|
|
|
m_MCSession = new MCSession(SystemInfo.deviceName, m_SessionName); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
m_MCSession.Dispose(); |
|
|
|
} |
|
|
|
#endif
|
|
|
|
} |