浏览代码

Merging in the "bugs, various" branch

/main/staging
nathaniel.buck@unity3d.com 3 年前
当前提交
fca424e7
共有 21 个文件被更改,包括 397 次插入340 次删除
  1. 149
      Assets/Prefabs/UI/BackButtonBG.prefab
  2. 45
      Assets/Prefabs/UI/CreateContent.prefab
  3. 66
      Assets/Prefabs/UI/GameCanvas.prefab
  4. 121
      Assets/Prefabs/UI/JoinContent.prefab
  5. 122
      Assets/Prefabs/UI/PlayerInteractionPanel.prefab
  6. 17
      Assets/Prefabs/UI/SpinnerUI.prefab
  7. 54
      Assets/Scenes/mainScene.unity
  8. 16
      Assets/Scripts/Auth/SubIdentity_Authentication.cs
  9. 6
      Assets/Scripts/Game/LocalLobby.cs
  10. 1
      Assets/Scripts/Infrastructure/Locator.cs
  11. 8
      Assets/Scripts/Infrastructure/LogHandlerSettings.cs
  12. 3
      Assets/Scripts/Infrastructure/Messenger.cs
  13. 1
      Assets/Scripts/Infrastructure/Observed.cs
  14. 20
      Assets/Scripts/Lobby/LobbyAsyncRequests.cs
  15. 3
      Assets/Scripts/Relay/RelayAPIInterface.cs
  16. 34
      Assets/Scripts/Relay/RelayUtpClient.cs
  17. 4
      Assets/Scripts/Relay/RelayUtpHost.cs
  18. 15
      Assets/Scripts/Relay/RelayUtpSetup.cs
  19. 1
      Assets/Scripts/UI/JoinMenuUI.cs
  20. 32
      Assets/Scripts/UI/SpinnerUI.cs
  21. 19
      Assets/Scripts/Vivox/VivoxUserHandler.cs

149
Assets/Prefabs/UI/BackButtonBG.prefab


m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 17.9
m_fontSize: 16
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1

serializedVersion: 6
m_Component:
- component: {fileID: 21306902101918852}
- component: {fileID: 892943604221978165}
- component: {fileID: 9211534540060107035}
- component: {fileID: 3548897939371032169}
- component: {fileID: 7262104930290195570}
- component: {fileID: 8907220659739637781}

m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2344342489728598789}
- {fileID: 8687266200334079465}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &892943604221978165
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5416637149047939654}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 1
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 2
m_TargetDisplay: 0
--- !u!222 &8554403787917887813
CanvasRenderer:
m_ObjectHideFlags: 0

m_GameObject: {fileID: 5416637149047939654}
m_CullTransparentMesh: 1
--- !u!114 &9211534540060107035
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5416637149047939654}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!225 &3548897939371032169
CanvasGroup:
m_ObjectHideFlags: 0

m_PersistentCalls:
m_Calls: []
ShowThisWhen: 2
--- !u!1 &6668424015570691350
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2344342489728598789}
- component: {fileID: 5813347457509296480}
- component: {fileID: 731239719284957053}
- component: {fileID: 8114326487105409297}
- component: {fileID: 5670435380500466409}
m_Layer: 5
m_Name: LobbyDataLayer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2344342489728598789
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6668424015570691350}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 8687266200334079465}
m_Father: {fileID: 21306902101918852}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5813347457509296480
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6668424015570691350}
m_CullTransparentMesh: 1
--- !u!225 &731239719284957053
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6668424015570691350}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &8114326487105409297
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6668424015570691350}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f38cf340acfcd4c64a6968b7386ad570, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
m_ShowThisWhen: 5
--- !u!114 &5670435380500466409
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6668424015570691350}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70dfc2fde0a9ef04eaff29a138f0bf45, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 8114326487105409297}
m_TargetAssemblyTypeName: LobbyRooms.UI.LobbyStateVisibilityUI, LobbyRooms
m_MethodName: ObservedUpdated
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &9098499516663060533
GameObject:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 7723827565599166151}
m_Father: {fileID: 2344342489728598789}
m_Father: {fileID: 21306902101918852}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}

45
Assets/Prefabs/UI/CreateContent.prefab


- component: {fileID: 5377961148241680866}
- component: {fileID: 1079176168591545865}
- component: {fileID: 5149602142760426050}
- component: {fileID: 7339923225503164155}
- component: {fileID: 6735354375166727125}
- component: {fileID: 7555225420414765091}
m_Layer: 5
m_Name: CreateButton
m_TagString: Untagged

m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!225 &7339923225503164155
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8424691209185600525}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &6735354375166727125
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8424691209185600525}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab355d5994635724dbde297a055fb586, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
--- !u!114 &7555225420414765091
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8424691209185600525}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771ddda4ce2ee2a4dad57866ecc1170d, type: 3}
m_Name:
m_EditorClassIdentifier:
m_target: {fileID: 6735354375166727125}
m_alphaWhenHidden: 0.5
m_requestType: 3
--- !u!1 &8891926578961704898
GameObject:
m_ObjectHideFlags: 0

66
Assets/Prefabs/UI/GameCanvas.prefab


m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -12.499985}
m_SizeDelta: {x: -30, y: -75}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &2637199316888954224
GameObject:

objectReference: {fileID: 0}
- target: {fileID: 8624457953394683849, guid: 1ba83780824e3074a9e835b4d5811b49, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: -30
value: 0
value: -75
objectReference: {fileID: 0}
- target: {fileID: 8624457953394683849, guid: 1ba83780824e3074a9e835b4d5811b49, type: 3}
propertyPath: m_LocalPosition.x

objectReference: {fileID: 0}
- target: {fileID: 8624457953394683849, guid: 1ba83780824e3074a9e835b4d5811b49, type: 3}
propertyPath: m_LocalRotation.x
value: -0
value: 0
value: -0
value: 0
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8624457953394683849, guid: 1ba83780824e3074a9e835b4d5811b49, type: 3}
propertyPath: m_AnchoredPosition.x

propertyPath: m_AnchoredPosition.y
value: 0
value: -12.5
objectReference: {fileID: 0}
- target: {fileID: 8624457953394683849, guid: 1ba83780824e3074a9e835b4d5811b49, type: 3}
propertyPath: m_LocalEulerAnglesHint.x

propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7322885418547999459, guid: 247f79ab5aefc6d40bcbdade4d9467b7, type: 3}
propertyPath: m_fontSize
value: 35.8
objectReference: {fileID: 0}
- target: {fileID: 7511166192365473530, guid: 247f79ab5aefc6d40bcbdade4d9467b7, type: 3}
propertyPath: m_AnchorMax.x
value: 0

objectReference: {fileID: 0}
- target: {fileID: 2828520451782533824, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_Size
value: 1
value: 0.99999994
objectReference: {fileID: 0}
- target: {fileID: 2828520451782533824, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_Value

objectReference: {fileID: 0}
- target: {fileID: 5836614391142406767, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: -30
value: 0
value: -75
objectReference: {fileID: 0}
- target: {fileID: 5836614391142406767, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_LocalPosition.x

objectReference: {fileID: 0}
- target: {fileID: 5836614391142406767, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_LocalRotation.x
value: -0
value: 0
value: -0
value: 0
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5836614391142406767, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchoredPosition.x

propertyPath: m_AnchoredPosition.y
value: 0
value: -12.5
objectReference: {fileID: 0}
- target: {fileID: 5836614391142406767, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_LocalEulerAnglesHint.x

propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7025505742805288892, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7025505742805288892, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7025505742805288892, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7025505742805288892, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7025505742805288892, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7025505742805288892, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7071590578612216411, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchorMax.y
value: 0

propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8314627591180998490, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_fontSize
value: 21.65
objectReference: {fileID: 0}
- target: {fileID: 8437021287377131492, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchorMax.y
value: 0

- target: {fileID: 8437021287377131492, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8502326957445156609, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_fontSize
value: 21.65
objectReference: {fileID: 0}
- target: {fileID: 8636295960037856115, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchorMax.y

121
Assets/Prefabs/UI/JoinContent.prefab


m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4325310634866704869}
- {fileID: 7970272424148618348}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_Name:
m_EditorClassIdentifier:
m_AllowSwitchOff: 0
--- !u!1 &2398639361971652739
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7970272424148618348}
- component: {fileID: 8120981699771385937}
- component: {fileID: 5477591940033768985}
- component: {fileID: 9093001432108375031}
- component: {fileID: 4619572163995016148}
m_Layer: 5
m_Name: RaycastBlocker
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7970272424148618348
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2398639361971652739}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 785260762106121647}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!225 &8120981699771385937
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2398639361971652739}
m_Enabled: 1
m_Alpha: 0
m_Interactable: 0
m_BlocksRaycasts: 0
m_IgnoreParentGroups: 0
--- !u!114 &5477591940033768985
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2398639361971652739}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab355d5994635724dbde297a055fb586, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
--- !u!222 &9093001432108375031
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2398639361971652739}
m_CullTransparentMesh: 1
--- !u!114 &4619572163995016148
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2398639361971652739}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &2530186012912267203
GameObject:
m_ObjectHideFlags: 0

propertyPath: m_Color.a
value: 0.6666667
objectReference: {fileID: 0}
- target: {fileID: 6317050540274997421, guid: c9b04951bd45e154b8096955d9bc8a0b, type: 3}
propertyPath: m_raycastBlocker
value:
objectReference: {fileID: 5477591940033768985}
- target: {fileID: 7144088886657378797, guid: c9b04951bd45e154b8096955d9bc8a0b, type: 3}
propertyPath: m_Name
value: Spinner

objectReference: {fileID: 0}
- target: {fileID: 8141644855275361747, guid: c9b04951bd45e154b8096955d9bc8a0b, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
value: 1
value: 0.5
value: 1
value: 0.5
value: 0
value: 0.5
value: 0
value: 100
value: 0
value: 100
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8141644855275361747, guid: c9b04951bd45e154b8096955d9bc8a0b, type: 3}
propertyPath: m_LocalPosition.x

122
Assets/Prefabs/UI/PlayerInteractionPanel.prefab


serializedVersion: 6
m_Component:
- component: {fileID: 7303921398628037483}
- component: {fileID: 4155147274821193738}
- component: {fileID: 8388542991005336197}
m_Layer: 5
m_Name: CountDownUI
m_TagString: Untagged

m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4155147274821193738
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 580481917308754637}
m_CullTransparentMesh: 1
--- !u!114 &4969504009400302254
MonoBehaviour:
m_ObjectHideFlags: 0

m_PersistentCalls:
m_Calls: []
m_CountDownText: {fileID: 4467363028704636643}
--- !u!225 &8388542991005336197
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 580481917308754637}
m_Enabled: 1
m_Alpha: 0
m_Interactable: 0
m_BlocksRaycasts: 0
m_IgnoreParentGroups: 0
--- !u!1 &609596107351326384
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 1611213509401803489}
- component: {fileID: 5811625806911023419}
- component: {fileID: 5977596652360143959}
- component: {fileID: 2113442049023149911}
- component: {fileID: 4811792094336013573}
- component: {fileID: 435124129857761185}
m_Layer: 5
m_Name: CancelButton
m_TagString: Untagged

m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &2113442049023149911
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 609596107351326384}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70dfc2fde0a9ef04eaff29a138f0bf45, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 435124129857761185}
m_TargetAssemblyTypeName: LobbyRooms.UI.LobbyStateVisibilityUI, LobbyRooms
m_MethodName: ObservedUpdated
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!225 &4811792094336013573
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 609596107351326384}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &435124129857761185
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 609596107351326384}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f38cf340acfcd4c64a6968b7386ad570, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
m_ShowThisWhen: -1
--- !u!1 &1032235666708655174
GameObject:
m_ObjectHideFlags: 0

m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 18
m_fontSize: 72
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1

m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 18
m_fontSize: 66.15
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1

m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 14.9
m_fontSize: 23
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1

m_Father: {fileID: 5026269005358103012}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 167.125, y: -27.5}
m_SizeDelta: {x: 50, y: 50}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5387756616337415243
CanvasRenderer:

m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Ready.
m_text: Ready
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}

m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 22.35
m_fontSize: 72
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1

m_Father: {fileID: 5026269005358103012}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 67.125, y: -27.5}
m_SizeDelta: {x: 50, y: 50}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8764544246360663793
CanvasRenderer:

m_Father: {fileID: 5026269005358103012}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 217.125, y: -27.5}
m_SizeDelta: {x: 50, y: 50}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4202478155384707071
CanvasRenderer:

m_Father: {fileID: 5026269005358103012}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 117.125, y: -27.5}
m_SizeDelta: {x: 50, y: 50}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4168724985671927024
CanvasRenderer:

17
Assets/Prefabs/UI/SpinnerUI.prefab


m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8141644855275361747}
m_RootOrder: 1

m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
showing: 0
--- !u!1 &3885698492068079262
GameObject:
m_ObjectHideFlags: 0

m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8141644855275361747}
m_RootOrder: 0

m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
showing: 0
--- !u!1 &5113050813143078450
GameObject:
m_ObjectHideFlags: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8141644855275361747}
m_RootOrder: 2

m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
showing: 0
--- !u!1 &7144088886657378797
GameObject:
m_ObjectHideFlags: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2952266133262597715}
- {fileID: 8845592316474837655}

m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
showing: 0
errorText: {fileID: 7859013680193933450}
spinnerImage: {fileID: 50617661778815274}
noServerText: {fileID: 1576294672583716881}
errorTextVisibility: {fileID: 8041986936720407558}
m_errorText: {fileID: 7859013680193933450}
m_spinnerImage: {fileID: 50617661778815274}
m_noServerText: {fileID: 1576294672583716881}
m_errorTextVisibility: {fileID: 8041986936720407558}
m_raycastBlocker: {fileID: 0}
--- !u!114 &2592976293271768794
MonoBehaviour:
m_ObjectHideFlags: 0

54
Assets/Scenes/mainScene.unity


m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1886099429 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3845984648666374778, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}
m_PrefabInstance: {fileID: 2637199315837045693}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70dfc2fde0a9ef04eaff29a138f0bf45, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1969944515 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8619884486222418397, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}

propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2637199316291327119, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}
propertyPath: m_AnchoredPosition.y
value: -12.499985
objectReference: {fileID: 0}
- target: {fileID: 2707501774297567273, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}
propertyPath: m_AnchorMax.y
value: 0

objectReference: {fileID: 0}
- target: {fileID: 4822032080772604407, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}
propertyPath: m_AnchoredPosition.y
value: -0.17340319
value: 0.0000011920929
objectReference: {fileID: 0}
- target: {fileID: 4824240073023402834, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}
propertyPath: m_AnchorMax.y

- target: {fileID: 5880123119007547921, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}
propertyPath: m_AnchoredPosition.x
value: -9.757019
objectReference: {fileID: 0}
- target: {fileID: 5991488785009139195, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}
propertyPath: m_Size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5991488785009139195, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}
propertyPath: m_Value

m_Script: {fileID: 11500000, guid: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2637199315837045697 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3903006825828350709, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}
m_PrefabInstance: {fileID: 2637199315837045693}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70dfc2fde0a9ef04eaff29a138f0bf45, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2637199315837045698 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 618971913928185130, guid: f1d618bdc6f1813449d428126e640aa5, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalLobbyObservers.Array.size
value: 10
value: 8
objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_vivoxUserHandlers.Array.data[0]

- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LobbyDataObservers.Array.data[7]
value:
objectReference: {fileID: 1886099429}
objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LobbyServiceObservers.Array.size
value: 2

- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalLobbyObservers.Array.data[0]
value:
objectReference: {fileID: 1886099429}
objectReference: {fileID: 1014339014}
objectReference: {fileID: 1014339014}
objectReference: {fileID: 1412109061}
objectReference: {fileID: 1412109061}
objectReference: {fileID: 297599733}
objectReference: {fileID: 297599733}
objectReference: {fileID: 2130620598}
objectReference: {fileID: 2637199315837045697}
objectReference: {fileID: 2074106027}
objectReference: {fileID: 2130620598}
objectReference: {fileID: 309485569}
objectReference: {fileID: 2074106027}
objectReference: {fileID: 2126854580}
objectReference: {fileID: 309485569}
objectReference: {fileID: 1511612118}
objectReference: {fileID: 2126854580}
objectReference: {fileID: 1511612118}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalLobbyObservers.Array.data[9]
value:

16
Assets/Scripts/Auth/SubIdentity_Authentication.cs


AuthenticationService.Instance.SignedIn += OnSignInChange;
AuthenticationService.Instance.SignedOut += OnSignInChange;
if (!AuthenticationService.Instance.IsSignedIn)
await AuthenticationService.Instance.SignInAnonymouslyAsync(); // Don't sign out later, since that changes the anonymous token, which would prevent the player from exiting lobbies they're already in.
onSigninComplete?.Invoke();
try
{ if (!AuthenticationService.Instance.IsSignedIn)
await AuthenticationService.Instance.SignInAnonymouslyAsync(); // Don't sign out later, since that changes the anonymous token, which would prevent the player from exiting lobbies they're already in.
onSigninComplete?.Invoke();
}
catch
{ UnityEngine.Debug.LogError("Failed to login. Did you remember to set your Project ID under Services > General Settings?");
throw;
}
// Note: If for some reason your login state gets weird, you can comment out the previous block and instead call AuthenticationService.Instance.SignOut().
// Then, running Play mode will fail to actually function and instead will log out of your previous anonymous account.
// When you revert that change and run Play mode again, you should be logged in as a new anonymous account with a new default name.
}
private void OnSignInChange()

6
Assets/Scripts/Game/LocalLobby.cs


get => m_data.Color;
set
{
m_data.Color = value;
OnChanged(this);
if (m_data.Color != value)
{ m_data.Color = value;
OnChanged(this);
}
}
}

1
Assets/Scripts/Infrastructure/Locator.cs


/// <summary>
/// Anything which provides itself to a Locator can then be globally accessed. This should be a single access point for things that *want* to be singleton (that is,
/// when they want to be available for use by arbitrary, unknown clients) but might not always be available or might need alternate flavors for tests, logging, etc.
/// (See http://gameprogrammingpatterns.com/service-locator.html to learn more.)
/// </summary>
public class Locator : LocatorBase
{

8
Assets/Scripts/Infrastructure/LogHandlerSettings.cs


Locator.Get.Messenger.Unsubscribe(this);
}
/// <summary>
/// For convenience while in the Editor, update the log verbosity when its value is changed in the Inspector.
/// </summary>
public void OnValidate()
{
LogHandler.Get().mode = m_editorLogVerbosity;
}
public void OnReceiveMessage(MessageType type, object msg)
{
if (type == MessageType.DisplayErrorPopup && msg != null)

3
Assets/Scripts/Infrastructure/Messenger.cs


CancelCountdown = 10,
ConfirmInGameState = 11,
DisplayErrorPopup = 12,
SetPlayerSound = 13,
SetPlayerSound = 13,
}
/// <summary>

1
Assets/Scripts/Infrastructure/Observed.cs


/// <summary>
/// Something that exposes some data that, when changed, an observer would want to be notified about automatically.
/// Used for UI elements and for keeping our local Lobby state synchronized with the remote Lobby service data.
/// (See http://gameprogrammingpatterns.com/observer.html to learn more.)
///
/// In your Observed child implementations, be sure to call OnChanged when setting the value of any property.
/// </summary>

20
Assets/Scripts/Lobby/LobbyAsyncRequests.cs


#region Lobby API calls are rate limited, and some other operations might want an alert when the rate limits have passed.
// Note that some APIs limit to 1 call per N seconds, while others limit to M calls per N seconds. We'll treat all APIs as though they limited to 1 call per N seconds.
// Also, this is seralized, so don't reorder the values unless you know what that will affect.
QuickJoin
QuickJoin,
Host
}
public RateLimitCooldown GetRateLimit(RequestType type)

else if (type == RequestType.QuickJoin)
return m_rateLimitQuickJoin;
else if (type == RequestType.Host)
return m_rateLimitHost;
return m_rateLimitQuery;
}

private RateLimitCooldown m_rateLimitHost = new RateLimitCooldown(3f);
// TODO: Shift to using this to do rate limiting for all API calls? E.g. the lobby data pushing is on its own loop.

/// </summary>
public void CreateLobbyAsync(string lobbyName, int maxPlayers, bool isPrivate, LobbyUser localUser, Action<Lobby> onSuccess, Action onFailure)
{
if (!m_rateLimitHost.CanCall())
{
onFailure?.Invoke();
UnityEngine.Debug.LogWarning("Create Lobby hit the rate limit.");
return;
}
string uasId = AuthenticationService.Instance.PlayerId;
LobbyAPIInterface.CreateLobbyAsync(uasId, lobbyName, maxPlayers, isPrivate, CreateInitialPlayerData(localUser), OnLobbyCreated);

(lobbyId == null && lobbyCode == null))
{
onFailure?.Invoke();
// TODO: Emit some failure message.
UnityEngine.Debug.LogWarning("Join Lobby hit the rate limit.");
return;
}

if (!m_rateLimitQuickJoin.CanCall())
{
onFailure?.Invoke();
UnityEngine.Debug.LogWarning("Quick Join Lobby hit the rate limit.");
return;
}

{
onListRetrieved?.Invoke(null);
m_rateLimitQuery.EnqueuePendingOperation(() => { RetrieveLobbyListAsync(onListRetrieved, onError, limitToColor); });
UnityEngine.Debug.LogWarning("Retrieve Lobby list hit the rate limit. Will try again soon...");
return;
}

if (!m_rateLimitQuery.CanCall())
{
onComplete?.Invoke(null);
UnityEngine.Debug.LogWarning("Retrieve Lobby hit the rate limit.");
return;
}
LobbyAPIInterface.GetLobbyAsync(lobbyId, OnGet);

3
Assets/Scripts/Relay/RelayAPIInterface.cs


{
/// <summary>
/// Wrapper for all the interaction with the Relay API.
/// Relay acts as an intermediary between hosts and clients for privacy. Each player will connect to an obfuscated IP address provided by Relay as though connecting directly to other players.
/// </summary>
public static class RelayAPIInterface
{

/// <summary>
/// Only after an Allocation has been completed can a Relay join code be obtained. This code will be stored in the lobby's data as non-public
/// such that players can retrieve the Relay join code only after connecting to the lobby.
/// such that players can retrieve the Relay join code only after connecting to the lobby. (Note that this is not the same as the lobby code.)
/// </summary>
public static void GetJoinCodeAsync(Guid hostAllocationId, Action<string> onComplete)
{

34
Assets/Scripts/Relay/RelayUtpClient.cs


else if (msgType == MsgType.EndInGame)
Locator.Get.Messenger.OnReceiveMessage(MessageType.EndGame, null);
ProcessNetworkEventDataAdditional(conn, strm, msgType, id);
ProcessNetworkEventDataAdditional(conn, msgType, id);
protected virtual void ProcessNetworkEventDataAdditional(NetworkConnection conn, DataStreamReader strm, MsgType msgType, string id) { }
protected virtual void ProcessNetworkEventDataAdditional(NetworkConnection conn, MsgType msgType, string id) { }
protected virtual void ProcessDisconnectEvent(NetworkConnection conn, DataStreamReader strm)
{
// The host disconnected, and Relay does not support host migration. So, all clients should disconnect.

}
/// <summary>
/// Relay uses raw pointers for efficiency. This converts them to byte arrays, assuming the stream contents are 1 byte for array length followed by contents.
/// UTP uses raw pointers for efficiency (i.e. C-style byte* instead of byte[]).
/// ReadMessageContents converts them back to byte arrays, assuming the stream contains 1 byte for array length followed by contents.
/// Any actual pointer manipulation and so forth happens service-side, so we simply need to convert back to a byte array here.
unsafe private byte[] ReadMessageContents(ref DataStreamReader strm)
unsafe private byte[] ReadMessageContents(ref DataStreamReader strm) // unsafe is required to access the pointer.
{
int length = strm.Length;
byte[] bytes = new byte[length];

byte[] idBytes = System.Text.Encoding.UTF8.GetBytes(id);
byte[] strBytes = System.Text.Encoding.UTF8.GetBytes(str);
List<byte> message = new List<byte>(idBytes.Length + strBytes.Length + 3);
List<byte> message = new List<byte>(idBytes.Length + strBytes.Length + 3); // Extra 3 bytes for the msgType plus the ID and message lengths.
if (driver.BeginSend(connection, out var dataStream) == 0)
{
byte[] bytes = message.ToArray();
unsafe
{
fixed (byte* bytesPtr = bytes)
{
dataStream.WriteBytes(bytesPtr, message.Count);
driver.EndSend(dataStream);
}
}
}
SendMessageData(driver, connection, message);
}
/// <summary>

{
byte[] idBytes = System.Text.Encoding.UTF8.GetBytes(id);
List<byte> message = new List<byte>(idBytes.Length + 3);
List<byte> message = new List<byte>(idBytes.Length + 3); // Extra 3 bytes for the msgType, ID length, and the byte value.
SendMessageData(driver, connection, message);
}
private void SendMessageData(NetworkDriver driver, NetworkConnection connection, List<byte> message)
{
unsafe
unsafe // Similarly to ReadMessageContents, our data must be converted to a pointer before being sent.
{
fixed (byte* bytesPtr = bytes)
{

4
Assets/Scripts/Relay/RelayUtpHost.cs


ForceFullUserUpdate(m_networkDriver, conn, user.Value);
}
protected override void ProcessNetworkEventDataAdditional(NetworkConnection conn, DataStreamReader strm, MsgType msgType, string id)
protected override void ProcessNetworkEventDataAdditional(NetworkConnection conn, MsgType msgType, string id)
// Note that the strm contents might have already been consumed, depending on the msgType.
// Forward messages from clients to other clients.
if (msgType == MsgType.PlayerName)
{

15
Assets/Scripts/Relay/RelayUtpSetup.cs


namespace LobbyRelaySample.relay
{
/// <summary>
/// Responsible for setting up a connection with Relay using UTP, for the lobby host.
/// Responsible for setting up a connection with Relay using Unity Transport (UTP). A Relay Allocation is created by the host, and then all players
/// bind UTP to that Allocation in order to send data to each other.
/// Must be a MonoBehaviour since the binding process doesn't have asynchronous callback options.
/// </summary>
public abstract class RelayUtpSetup : MonoBehaviour

{
if (m_networkDriver.Listen() != 0)
{
Debug.LogError("Server failed to listen");
Debug.LogError("RelayUtpSetupHost failed to bind to the Relay Allocation.");
Debug.LogWarning("Server is now listening!");
Debug.Log("Relay host is bound.");
m_joinState |= JoinState.Bound;
CheckForComplete();
}

{
if (m_joinState == (JoinState.Joined | JoinState.Bound))
if (m_joinState == (JoinState.Joined | JoinState.Bound) && this != null) // this will equal null (i.e. this component has been destroyed) if the host left the lobby during the Relay connection sequence.
{
m_isRelayConnected = true;
RelayUtpHost host = gameObject.AddComponent<RelayUtpHost>();

private void OnJoin(JoinAllocation joinAllocation)
{
if (joinAllocation == null)
if (joinAllocation == null || this == null) // The returned JoinAllocation is null if allocation failed. this would be destroyed already if you quit the lobby while Relay is connecting.
return;
m_allocation = joinAllocation;
bool isSecure = false;

}
if (m_networkDriver.GetConnectionState(m_connections[0]) != NetworkConnection.State.Connected)
{
Debug.LogError("Client failed to connect to server");
Debug.LogError("RelayUtpSetupClient could not connect to the host.");
else
else if (this != null)
{
m_isRelayConnected = true;
RelayUtpClient client = gameObject.AddComponent<RelayUtpClient>();

1
Assets/Scripts/UI/JoinMenuUI.cs


public void OnJoinButtonPressed()
{
Locator.Get.Messenger.OnReceiveMessage(MessageType.JoinLobbyRequest, m_LocalLobbySelected);
m_LocalLobbySelected = default;
}
public void OnRefresh()

32
Assets/Scripts/UI/SpinnerUI.cs


using System.Text;
using TMPro;
using UnityEngine;
namespace LobbyRelaySample.UI
{

public class SpinnerUI : ObserverPanel<LobbyServiceData>
{
public TMP_Text errorText;
public UIPanelBase spinnerImage;
public UIPanelBase noServerText;
public UIPanelBase errorTextVisibility;
[SerializeField] private TMP_Text m_errorText;
[SerializeField] private UIPanelBase m_spinnerImage;
[SerializeField] private UIPanelBase m_noServerText;
[SerializeField] private UIPanelBase m_errorTextVisibility;
[Tooltip("This prevents selecting a lobby or Joining while the spinner is visible.")]
[SerializeField] private UIPanelBase m_raycastBlocker;
public override void ObservedUpdated(LobbyServiceData observed)
{

spinnerImage.Show();
noServerText.Hide();
errorTextVisibility.Hide();
m_spinnerImage.Show();
m_raycastBlocker.Show();
m_noServerText.Hide();
m_errorTextVisibility.Hide();
spinnerImage.Hide();
errorTextVisibility.Show();
errorText.SetText("Error. See Unity Console log for details.");
m_spinnerImage.Hide();
m_raycastBlocker.Hide();
m_errorTextVisibility.Show();
m_errorText.SetText("Error. See Unity Console log for details.");
noServerText.Show();
m_noServerText.Show();
noServerText.Hide();
m_noServerText.Hide();
spinnerImage.Hide();
m_spinnerImage.Hide();
m_raycastBlocker.Hide();
}
}
}

19
Assets/Scripts/Vivox/VivoxUserHandler.cs


// In the future, remove FindVivoxId and pass the environment ID here instead.
m_vivoxId = null;
// SetID might be called after we've received the IChannelSession for remote players, which would mean after OnParticipant Added. So, duplicate the VivoxID work here.
// SetID might be called after we've received the IChannelSession for remote players, which would mean after OnParticipantAdded. So, duplicate the VivoxID work here.
if (m_channelSession != null)
{
foreach (var participant in m_channelSession.Participants)

}
}
public void OnChannelJoined(IChannelSession channelSession)
public void OnChannelJoined(IChannelSession channelSession) // Called after a connection is established, which begins once a lobby is joined.
{
m_channelSession = channelSession;
m_channelSession.Participants.AfterKeyAdded += OnParticipantAdded;

public void OnChannelLeft()
public void OnChannelLeft() // Called when we leave the lobby.
m_channelSession.Participants.AfterKeyAdded -= OnParticipantAdded;
m_channelSession.Participants.BeforeKeyRemoved -= BeforeParticipantRemoved;
m_channelSession.Participants.AfterValueUpdated -= OnParticipantValueUpdated;
m_channelSession = null;
if (m_channelSession != null) // It's possible we'll attempt to leave a channel that isn't joined, if we leave the lobby while Vivox is connecting.
{
m_channelSession.Participants.AfterKeyAdded -= OnParticipantAdded;
m_channelSession.Participants.BeforeKeyRemoved -= BeforeParticipantRemoved;
m_channelSession.Participants.AfterValueUpdated -= OnParticipantValueUpdated;
m_channelSession = null;
}
}
/// <summary>

}
else
{ m_lobbyUserVolumeUI.EnableVoice(false);
participant.SetIsMuteForAll(m_vivoxId, false, null);
participant.SetIsMuteForAll(m_vivoxId, false, null); // Also note: This call is asynchronous, so it's possible to exit the lobby before this completes, resulting in a Vivox error.
}
}
else if (property == "IsMutedForAll")

正在加载...
取消
保存