浏览代码

Rename m_SessionName => m_ServiceType and add docs

/3.1
Tim Mowrer 5 年前
当前提交
477d4bfd
共有 2 个文件被更改,包括 12 次插入7 次删除
  1. 3
      Assets/Scenes/ARCollaborationData/ARCollaborationDataExample.unity
  2. 16
      Assets/Scenes/ARCollaborationData/CollaborativeSession.cs

3
Assets/Scenes/ARCollaborationData/ARCollaborationDataExample.unity


m_Script: {fileID: 11500000, guid: a7c1d01ad3d754ef788a30c12b724743, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ARSession: {fileID: 0}
m_SessionName: arf-collab-demo
m_ServiceType: arf-collab-demo
--- !u!1 &1564081113
GameObject:
m_ObjectHideFlags: 0

16
Assets/Scenes/ARCollaborationData/CollaborativeSession.cs


public class CollaborativeSession : MonoBehaviour
{
[SerializeField]
string m_SessionName;
[Tooltip("The name for this network service. It should be 15 characters or less and can contain ASCII, lowercase letters, numbers, and hyphens.")]
string m_ServiceType;
public string sessionName
/// <summary>
/// The name for this network service.
/// See <a href="https://developer.apple.com/documentation/multipeerconnectivity/mcnearbyserviceadvertiser">MCNearbyServiceAdvertiser</a>
/// for the purpose of and restrictions on this name.
/// </summary>
public string serviceType
get { return m_SessionName; }
set { m_SessionName = value; }
get { return m_ServiceType; }
set { m_ServiceType = value; }
}
ARSession m_ARSession;

void Awake()
{
m_ARSession = GetComponent<ARSession>();
m_MCSession = new MCSession(SystemInfo.deviceName, m_SessionName);
m_MCSession = new MCSession(SystemInfo.deviceName, m_ServiceType);
}
void OnEnable()

正在加载...
取消
保存