浏览代码

Conditionally compile for iOS

/3.1
Tim Mowrer 5 年前
当前提交
f754f5c0
共有 1 个文件被更改,包括 16 次插入10 次删除
  1. 26
      Assets/Scenes/ARCollaborationData/CollaborativeSession.cs

26
Assets/Scenes/ARCollaborationData/CollaborativeSession.cs


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
}
正在加载...
取消
保存