Class vGear_Networking
The Network Manager for XR system.
XR 系統的網絡管理員。
Inheritance
Inherited Members
Namespace: Votanic.vXR.vGear.Networking
Assembly: Votanic.vXR.dll
Syntax
[AddComponentMenu("")]
[Obfuscation(Exclude = true)]
public class vGear_Networking : NetworkManager
Fields
dataPath
External networking setting file path of XR system.
XR 系統外置網絡設置的文件路徑。
Declaration
[Tooltip("External networking setting file path of XR system.\nXR 系統外置網絡設置的文件路徑。")]
public string dataPath
Field Value
Type | Description |
---|---|
System.String |
entityDisplay
Entity type of user part.
使用者部位實體類型。
Declaration
[Tooltip("Entity type of user part.\n使用者部位實體類型。")]
public EntityDisplay entityDisplay
Field Value
Type | Description |
---|---|
EntityDisplay |
headEntity
Head entity name.
頭部實體名稱。
Declaration
[Tooltip("Head entity name.\n頭部實體名稱。")]
public string headEntity
Field Value
Type | Description |
---|---|
System.String |
headIndex
Default head entity model index.
預設頭部模型編號。
Declaration
[Tooltip("Default head entity model index.\n預設頭部模型編號。")]
public int headIndex
Field Value
Type | Description |
---|---|
System.Int32 |
headPrefabs
Networking head prefabes.
網絡頭部預製件。
Declaration
[Header("[XR Components]")]
[Tooltip("Networking head prefabes.\n網絡頭部預製件。")]
public List<GameObject> headPrefabs
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<UnityEngine.GameObject> |
identityDisplay
Identity display option.
識別器顯示選項。
Declaration
[Tooltip("Identity display option.\n識別器顯示選項。")]
public IdentityDisplay identityDisplay
Field Value
Type | Description |
---|---|
IdentityDisplay |
leftHandEntity
Left hand entity model index.
左手實體名稱。
Declaration
[Tooltip("Left hand entity model index.\n左手實體名稱。")]
public string leftHandEntity
Field Value
Type | Description |
---|---|
System.String |
leftHandIndex
Default left hand entity model index.
預設左手模型編號。
Declaration
[Tooltip("Default left hand entity model index.\n預設左手模型編號。")]
public int leftHandIndex
Field Value
Type | Description |
---|---|
System.Int32 |
leftHandPrefabs
Networking left hand prefabes.
網絡左手預製件。
Declaration
[Tooltip("Networking left hand prefabes.\n網絡左手預製件。")]
public List<GameObject> leftHandPrefabs
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<UnityEngine.GameObject> |
loadDataOnEditor
Load external networking setting file on editor if true.
當 true 時在編輯器載入外置網絡設置的文件。
Declaration
[Tooltip("Load external networking setting file on editor.\n在編輯器載入外置網絡設置的文件。")]
public bool loadDataOnEditor
Field Value
Type | Description |
---|---|
System.Boolean |
rightHandEntity
Right hand entity model index.
右手實體名稱。
Declaration
[Tooltip("Right hand entity model index.\n右手實體名稱。")]
public string rightHandEntity
Field Value
Type | Description |
---|---|
System.String |
rightHandIndex
Default right hand entity model index.
預設右手模型編號。
Declaration
[Tooltip("Default right hand entity model index.\n預設右手模型編號。")]
public int rightHandIndex
Field Value
Type | Description |
---|---|
System.Int32 |
rightHandPrefabs
Networking right hand prefabes.
網絡右手預製件。
Declaration
[Tooltip("Networking right hand prefabes.\n網絡右手預製件。")]
public List<GameObject> rightHandPrefabs
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<UnityEngine.GameObject> |
sourcePath
The path source.
路徑來源。
Declaration
[Header("[XR Settings]")]
[Tooltip("The path source.\n路徑來源。")]
public FileLocation sourcePath
Field Value
Type | Description |
---|---|
FileLocation |
Methods
ChangeEntity(EntityType, Int32)
Change own user entity model.
更改自身使用者實體部位模型。
ChangeEntity(EntityType.Head, 0)
Declaration
public virtual void ChangeEntity(EntityType entityType, int index)
Parameters
Type | Name | Description |
---|---|---|
EntityType | entityType | Part of user |
System.Int32 | index | Model index |
GetAllNetworkUsers()
Get all XR Network Users in connection.
取得連線中的所有 XR 網絡使用者。
Declaration
public List<vGear_NetworkUser> GetAllNetworkUsers()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<vGear_NetworkUser> |
GetNetworkUser(UInt32)
Get the XR Network User in connection.
取得連線中的 XR 網絡使用者。
GetNetworkUser(0)
Declaration
public vGear_NetworkUser GetNetworkUser(uint userID)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | userID | Connection ID of user |
Returns
Type | Description |
---|---|
vGear_NetworkUser |
Initialize()
Initialization of network manager.
網絡管理員初始化功能。
Declaration
protected override void Initialize()
Overrides
Save()
Save current network setup to file.
儲存目前網絡設置至文件。
Declaration
public void Save()
SetEntityDisplay(EntityDisplay, Boolean)
Set the display option of entity.
設定實體顯示選項。
SetEntityDisplay(EntityDisplay.OthersEntities, true)
Declaration
public virtual void SetEntityDisplay(EntityDisplay entityDisplay, bool sync)
Parameters
Type | Name | Description |
---|---|---|
EntityDisplay | entityDisplay | Entity display option |
System.Boolean | sync | Sync to all users |
SetIdentityDisplay(IdentityDisplay, Boolean)
Set the display option of identity.
設定識別器顯示選項。
SetIdentityDisplay(IdentityDisplay.OthersNames, true)
Declaration
public virtual void SetIdentityDisplay(IdentityDisplay identityDisplay, bool sync)
Parameters
Type | Name | Description |
---|---|---|
IdentityDisplay | identityDisplay | Identity display option |
System.Boolean | sync | Sync to all users |
SyncUsers()
Sync users information.
同步使用者資訊。
Declaration
protected override void SyncUsers()