浏览代码

Stopping point. for converting Lobby to non-observer.

/main/staging/2021_Upgrade/Async_Refactor
当前提交
04cf2cf7
共有 40 个文件被更改,包括 526 次插入726 次删除
  1. 31
      Assets/Prefabs/UI/BackButtonBG.prefab
  2. 80
      Assets/Prefabs/UI/JoinContent.prefab
  3. 65
      Assets/Prefabs/UI/JoinCreateCanvas.prefab
  4. 46
      Assets/Prefabs/UI/LobbyCanvas.prefab
  5. 34
      Assets/Prefabs/UI/LobbyCodeCanvas.prefab
  6. 50
      Assets/Prefabs/UI/LobbyUserList.prefab
  7. 41
      Assets/Prefabs/UI/MainMenuCanvas.prefab
  8. 35
      Assets/Prefabs/UI/SpinnerUI.prefab
  9. 211
      Assets/Scenes/mainScene.unity
  10. 55
      Assets/Scripts/GameLobby/Game/GameManager.cs
  11. 91
      Assets/Scripts/GameLobby/Game/LocalLobby.cs
  12. 22
      Assets/Scripts/GameLobby/Game/ServerAddress.cs
  13. 2
      Assets/Scripts/GameLobby/Infrastructure/ObserverBehaviour.cs
  14. 26
      Assets/Scripts/GameLobby/Lobby/LobbyConverters.cs
  15. 2
      Assets/Scripts/GameLobby/Lobby/LobbySynchronizer.cs
  16. 4
      Assets/Scripts/GameLobby/NGO/SetupInGame.cs
  17. 8
      Assets/Scripts/GameLobby/Relay/RelayUtpSetup.cs
  18. 30
      Assets/Scripts/GameLobby/UI/DisplayCodeUI.cs
  19. 22
      Assets/Scripts/GameLobby/UI/GameStateVisibilityUI.cs
  20. 22
      Assets/Scripts/GameLobby/UI/JoinCreateLobbyUI.cs
  21. 32
      Assets/Scripts/GameLobby/UI/JoinMenuUI.cs
  22. 26
      Assets/Scripts/GameLobby/UI/LobbyButtonUI.cs
  23. 9
      Assets/Scripts/GameLobby/UI/LobbyNameUI.cs
  24. 23
      Assets/Scripts/GameLobby/UI/ShowWhenLobbyStateUI.cs
  25. 28
      Assets/Scripts/GameLobby/UI/SpinnerUI.cs
  26. 12
      Assets/Scripts/GameLobby/UI/UIPanelBase.cs
  27. 2
      ProjectSettings/RiderScriptEditorPersistedState.asset
  28. 2
      Assets/Scripts/GameLobby/Infrastructure/Actionvalue.cs.meta
  29. 45
      Assets/Scripts/GameLobby/Game/LocalLobbyList.cs
  30. 24
      Assets/Scripts/GameLobby/Infrastructure/Actionvalue.cs
  31. 56
      Assets/Scripts/GameLobby/Game/LobbyServiceData.cs
  32. 8
      Assets/Scripts/GameLobby/Game/LobbyServiceDataObserver.cs
  33. 8
      Assets/Scripts/GameLobby/Game/LocalMenuStateObserver.cs
  34. 11
      Assets/Scripts/GameLobby/Game/LocalMenuStateObserver.cs.meta
  35. 11
      Assets/Scripts/GameLobby/Game/LocalMenuState.cs.meta
  36. 46
      Assets/Scripts/GameLobby/Game/LocalMenuState.cs
  37. 11
      Assets/Scripts/GameLobby/UI/MainMenuUI.cs.meta
  38. 21
      Assets/Scripts/GameLobby/UI/MainMenuUI.cs
  39. 0
      /Assets/Scripts/GameLobby/Game/LocalLobbyList.cs.meta
  40. 0
      /Assets/Scripts/GameLobby/Infrastructure/Actionvalue.cs.meta

31
Assets/Prefabs/UI/BackButtonBG.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:
- {fileID: 8687266200334079465}
m_Father: {fileID: 21306902101918852}

- component: {fileID: 9211534540060107035}
- component: {fileID: 3548897939371032169}
- component: {fileID: 7262104930290195570}
- component: {fileID: 8907220659739637781}
- component: {fileID: 7728157518251256520}
m_Layer: 5
m_Name: BackButtonBG

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: 6522473138835034473}
m_Father: {fileID: 0}

m_Script: {fileID: 11500000, guid: 3c93e82eef7d613418b85194aace7f69, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8907220659739637781
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: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7728157518251256520}
m_TargetAssemblyTypeName: LobbyRooms.UI.GameStateVisibilityUI, 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!114 &7728157518251256520
MonoBehaviour:
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: 6522473138835034473}
m_RootOrder: 0

80
Assets/Prefabs/UI/JoinContent.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: 3810288654714679559}
m_RootOrder: 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: 476776760980644771}
m_RootOrder: 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: 9152075987234541224}
m_RootOrder: 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: 8242294458145102565}
m_RootOrder: 1

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: 7955209533444849375}
m_RootOrder: 0

- component: {fileID: 785260762106121641}
- component: {fileID: 3931324176504405867}
- component: {fileID: 1462126939442648229}
- component: {fileID: 7550446569341709048}
m_Layer: 5
m_Name: JoinContent
m_TagString: Untagged

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: 4325310634866704869}
- {fileID: 7970272424148618348}

m_LobbyButtonPrefab: {fileID: 7018369548608736188, guid: f6d35a456ba76a24587dce83bd088b7d, type: 3}
m_LobbyButtonParent: {fileID: 7824921818678239159}
m_JoinCodeField: {fileID: 8659642538454988273}
--- !u!114 &7550446569341709048
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 785260762106121644}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: edfa4d53eaae84c43ba581088940700c, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1462126939442648229}
m_TargetAssemblyTypeName: LobbyRooms.UI.JoinMenuUI, 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
m_JoinCreateLobbyUI: {fileID: 0}
--- !u!1 &891284586109156510
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: 3864498296333289704}
m_RootOrder: 1

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: 3864498296333289704}
m_RootOrder: 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: 4279971184503703239}
m_RootOrder: 1

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: 2072554153277161701}
m_RootOrder: 1

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: 5676572735189107223}
m_RootOrder: 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: 1839420744844123086}
- {fileID: 4260256627374184318}

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: 785260762106121647}
m_RootOrder: 1

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: 8298271775641329263}
- {fileID: 7143473272919870158}

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: 476776760980644771}
m_Father: {fileID: 4100995143772770972}

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: 9095321446247494771}
m_RootOrder: 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: 4079924192455176000}
- {fileID: 6265314097236686696}

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: 4260256627374184318}
m_RootOrder: 1

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: 3632021558847075417}
m_RootOrder: 1

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: 3755762060919842715}
m_RootOrder: 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: 5676572735189107223}
m_RootOrder: 1

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: 4100995143772770972}
m_Father: {fileID: 4325310634866704869}

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: 9152075987234541224}
m_RootOrder: 1

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: 3755762060919842715}
m_RootOrder: 1

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: 3810288654714679559}
m_RootOrder: 1

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: 2226373431972622546}
- {fileID: 7022454495411658382}

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: 2072554153277161701}
- {fileID: 4178278345133798937}

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: 7573825319354851387}
m_Father: {fileID: 1604043255686064399}

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: 7955209533444849375}
- {fileID: 1604043255686064399}

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: 796953684453886289}
m_RootOrder: 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: 2735345665116889010}
- {fileID: 8807990684132234493}

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: 3864498296333289704}
- {fileID: 8941623568823021572}

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: 2072554153277161701}
m_RootOrder: 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: 2716431726230942877}
- {fileID: 4270049585292890095}

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: 796953684453886289}
- {fileID: 3165760063825440603}

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: 4036064834031661316}
- {fileID: 7485750802846073613}

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: 3309229614039675927}
m_RootOrder: 1

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: 4200763249476693650}
- {fileID: 4051350118216901408}

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: 796953684453886289}
m_RootOrder: 1

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: 4279971184503703239}
m_RootOrder: 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: 7315760059761538639}
m_Father: {fileID: 2826622903624280382}

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: 9152075987234541224}
- {fileID: 6267811842759446846}

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: 8891399108302556007}
- {fileID: 1608448316400021619}

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: 7824921818678239159}
- {fileID: 8814352389997950082}

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: 3075017331089573731}
m_Father: {fileID: 4100995143772770972}

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: 7545758080679127068}
- {fileID: 7191491465445676253}

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: 3075017331089573731}
m_RootOrder: 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: 5676572735189107223}
- {fileID: 9095321446247494771}

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: 1839420744844123086}
m_RootOrder: 1

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: 8754000458150487275}
- {fileID: 2344857208759781651}

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: 3810288654714679559}
- {fileID: 6936709559246390327}

65
Assets/Prefabs/UI/JoinCreateCanvas.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:
- {fileID: 8221895778010294642}
m_Father: {fileID: 5919863887503833647}

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: 6742761257817967520}
m_RootOrder: 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: 1659773181924692514}
m_Father: {fileID: 5919863887503833647}

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: 7885199827131071637}
m_RootOrder: 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: 3691881777428488015}
- {fileID: 5836614389469498580}

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: 8579668188475321874}
m_Father: {fileID: 5919863887503833647}

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: 8636295960037856115}
m_RootOrder: 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: 5919863887503833647}
m_RootOrder: 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: 5919863887503833647}
- {fileID: 1119140321553661053}

- component: {fileID: 5836614391142406753}
- component: {fileID: 5836614391142406752}
- component: {fileID: 4578721078997909056}
- component: {fileID: 1512606419251751951}
- component: {fileID: 6102798993520257211}
m_Layer: 5
m_Name: JoinCreateCanvas

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: 5836614390199223663}
m_Father: {fileID: 0}

m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_OnTabChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1512606419251751951
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5836614391142406755}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 4578721078997909056}
m_TargetAssemblyTypeName: LobbyRooms.UI.JoinCreateRoomUI, 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 &6102798993520257211
CanvasGroup:
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: 5919863887503833647}
m_RootOrder: 4

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: 8015712818246554090}
- {fileID: 6742761257817967520}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
--- !u!224 &5836614389469498580 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 785260762106121647, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
m_PrefabInstance: {fileID: 6492536299820417403}
m_PrefabAsset: {fileID: 0}
--- !u!114 &5643181761482593758 stripped
--- !u!114 &2465479314273514634 stripped
m_CorrespondingSourceObject: {fileID: 1462126939442648229, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
m_CorrespondingSourceObject: {fileID: 8659642538454988273, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
m_Script: {fileID: 11500000, guid: 3b8c744e110596042b40ee73862efaab, type: 3}
m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
--- !u!114 &2465479314273514634 stripped
--- !u!114 &5643181761482593758 stripped
m_CorrespondingSourceObject: {fileID: 8659642538454988273, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
m_CorrespondingSourceObject: {fileID: 1462126939442648229, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
m_Script: {fileID: 11500000, guid: 3b8c744e110596042b40ee73862efaab, type: 3}
--- !u!224 &5836614389469498580 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 785260762106121647, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
m_PrefabInstance: {fileID: 6492536299820417403}
m_PrefabAsset: {fileID: 0}

46
Assets/Prefabs/UI/LobbyCanvas.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: 1906352097507614706}
m_RootOrder: 1

m_Component:
- component: {fileID: 2244251207921394025}
- component: {fileID: 5434623004655309427}
- component: {fileID: 3687075862038422248}
- component: {fileID: 3403950992349691351}
m_Layer: 5
m_Name: LobbyCanvas

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: 6520888008628790540}
- {fileID: 2244251208239780121}

m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &3687075862038422248
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2244251207921394026}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 3403950992349691351}
m_TargetAssemblyTypeName: LobbyRooms.GameStatePanelUI, Assembly-CSharp
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!114 &3403950992349691351
MonoBehaviour:
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: 466693923092094802}
- {fileID: 1529153573702653751}

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: 4212636328457333019}
m_Father: {fileID: 6520888008628790540}

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: 1906352097507614706}
m_RootOrder: 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: 466693923092094802}
m_RootOrder: 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: 1906352097507614706}
- {fileID: 2957117094117392419}

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: 6532118317105062884}
- {fileID: 7445706979321241619}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 81e22025e6659264a8d0bc8dfebe95a7, type: 3}
--- !u!224 &1529153573702653751 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 1118541987231860827, guid: 81e22025e6659264a8d0bc8dfebe95a7, type: 3}
m_PrefabInstance: {fileID: 1926829325626138476}
m_PrefabAsset: {fileID: 0}
--- !u!114 &2768469221279893250 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4383951900022528110, guid: 81e22025e6659264a8d0bc8dfebe95a7, type: 3}

m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &1529153573702653751 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 1118541987231860827, guid: 81e22025e6659264a8d0bc8dfebe95a7, type: 3}
m_PrefabInstance: {fileID: 1926829325626138476}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2510549639321509767
PrefabInstance:
m_ObjectHideFlags: 0

34
Assets/Prefabs/UI/LobbyCodeCanvas.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: 7356978206806771932}
m_RootOrder: 1

- component: {fileID: 1118541987231860831}
- component: {fileID: 6772704612072308136}
- component: {fileID: 1118541987231860826}
- component: {fileID: 699060394989383769}
m_Layer: 5
m_Name: LobbyCodeCanvas
m_TagString: Untagged

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: 1060855158700719950}
- {fileID: 7974420753511511685}

m_Calls: []
m_outputText: {fileID: 5578852939709204548}
m_codeType: 0
--- !u!114 &699060394989383769
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1118541987231860824}
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: 1118541987231860826}
m_TargetAssemblyTypeName: LobbyRooms.UI.RoomCodeUI, 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 &2798863108443093305
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: 7356978206806771932}
m_Father: {fileID: 1118541987231860827}

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: 7356978206806771932}
m_RootOrder: 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: 666358594839851073}
- {fileID: 2985101570411328694}

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: 1118541987231860827}
m_RootOrder: 0

50
Assets/Prefabs/UI/LobbyUserList.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:
- {fileID: 8268348179057556550}
m_Father: {fileID: 8316201547685935311}

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: 1550284535874684459}
m_Father: {fileID: 8316201547685935311}

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: 7187078656748750641}
- {fileID: 8594180776620219635}

m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
m_PresetInfoIsWorld: 0
--- !u!114 &4463750083940306577
MonoBehaviour:
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: 4463750083940306590}
m_RootOrder: 1

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: 6491466947543783896}
m_Father: {fileID: 8316201547685935311}

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: 9211655745301838380}
- {fileID: 2630686559100583219}

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: 3685075291402800769}
m_Father: {fileID: 8316201547685935311}

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: 8316201547685935311}
m_Father: {fileID: 4463750083940306590}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
--- !u!224 &3685075291402800769 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
m_PrefabInstance: {fileID: 2300164376451760337}
m_PrefabAsset: {fileID: 0}
--- !u!114 &6290668908104815487 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5235189765028238254, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}

m_Script: {fileID: 11500000, guid: 9557a5d232068a149987bc0753800f26, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &3685075291402800769 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
m_PrefabInstance: {fileID: 2300164376451760337}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4128781293466929275
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
--- !u!224 &1550284535874684459 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
m_PrefabInstance: {fileID: 4128781293466929275}
m_PrefabAsset: {fileID: 0}
--- !u!114 &8208727230702623701 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5235189765028238254, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}

m_Script: {fileID: 11500000, guid: 9557a5d232068a149987bc0753800f26, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &1550284535874684459 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
m_PrefabInstance: {fileID: 4128781293466929275}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6805156706942808598
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
--- !u!224 &8268348179057556550 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
m_PrefabInstance: {fileID: 6805156706942808598}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1646035575854440888 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5235189765028238254, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}

m_Script: {fileID: 11500000, guid: 9557a5d232068a149987bc0753800f26, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &8268348179057556550 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
m_PrefabInstance: {fileID: 6805156706942808598}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8564023431761303432
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
--- !u!224 &6491466947543783896 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
m_PrefabInstance: {fileID: 8564023431761303432}
m_PrefabAsset: {fileID: 0}
--- !u!114 &4503217775887893542 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5235189765028238254, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}

m_Script: {fileID: 11500000, guid: 9557a5d232068a149987bc0753800f26, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &6491466947543783896 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3229036008637484624, guid: 9c09208dc6d58f54aabb57c12071b660, type: 3}
m_PrefabInstance: {fileID: 8564023431761303432}
m_PrefabAsset: {fileID: 0}

41
Assets/Prefabs/UI/MainMenuCanvas.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: 3838875500213396203}
m_RootOrder: 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: 1547097154335127670}
m_RootOrder: 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: 1547097154637997989}
m_RootOrder: 1

- component: {fileID: 1547097154335127667}
- component: {fileID: 1130581240334700700}
- component: {fileID: 5258679254951932468}
- component: {fileID: 575636749548035060}
m_Layer: 5
m_Name: MainMenuCanvas
m_TagString: Untagged

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: 1547097153480224111}
- {fileID: 1547097155015051324}

m_PersistentCalls:
m_Calls: []
ShowThisWhen: 1
--- !u!114 &575636749548035060
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1547097154335127666}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 5258679254951932468}
m_TargetAssemblyTypeName: LobbyRooms.GameStateVisibilityUI, Assembly-CSharp
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 &1547097154637997988
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: 32978559587113065}
- {fileID: 1547097153987463586}

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: 1547097154637997989}, {fileID: 3838875500213396203}]
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1547097154637997989}
- {fileID: 3838875500213396203}
m_Father: {fileID: 1547097154335127670}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 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: 2256322442099666709}
- {fileID: 3557122422878236895}

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: 1547097154637997989}
m_RootOrder: 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: 3838875500213396203}
m_RootOrder: 1

35
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_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_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

- component: {fileID: 8141644855275361747}
- component: {fileID: 8024795096463497524}
- component: {fileID: 6317050540274997421}
- component: {fileID: 2592976293271768794}
- component: {fileID: 7469848848124085693}
- component: {fileID: 3773418773225383442}
m_Layer: 5

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_noServerText: {fileID: 1576294672583716881}
m_errorTextVisibility: {fileID: 8041986936720407558}
m_raycastBlocker: {fileID: 0}
--- !u!114 &2592976293271768794
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7144088886657378797}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: edfa4d53eaae84c43ba581088940700c, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 6317050540274997421}
m_TargetAssemblyTypeName: LobbyRooms.UI.SpinnerUI, Assembly-CSharp
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
serializedVersion: 3
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}

m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1

211
Assets/Scenes/mainScene.unity


m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!114 &113557733 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6055523672257132380, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: edfa4d53eaae84c43ba581088940700c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &151543605 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2812013971948110896, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}

m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &297599733 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8905224144162831968, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
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 &309485569 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 65572184039752926, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}

m_Script: {fileID: 11500000, guid: 78d292f3bd9f1614cb744dcb4fe3ac12, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &883450645 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3727964864104658339, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &921599257 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6253235256787798393, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}

m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1412109061 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3143918963127177442, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
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 &1439850645 stripped

m_Script: {fileID: 11500000, guid: 70dfc2fde0a9ef04eaff29a138f0bf45, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1547097153363664359 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7294450586020064062, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2637199315837045694 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1554643161126302255, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: edfa4d53eaae84c43ba581088940700c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2637199315837045695 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4847401366899542036, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}

m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2637199315837045696 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5773825590554619550, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2637199315837045698 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6606885600234288061, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 788267441}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2637199315837045699 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 142122066828140637, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalLobbyObservers.Array.size
value: 8
value: 6
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_GameStateObservers.Array.data[0]
value:
objectReference: {fileID: 2637199315837045698}
objectReference: {fileID: 0}
objectReference: {fileID: 1547097153363664359}
objectReference: {fileID: 0}
objectReference: {fileID: 2637199315837045696}
objectReference: {fileID: 0}
objectReference: {fileID: 883450645}
objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_GameStateObservers.Array.data[4]
value:

- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LobbyDataObservers.Array.data[0]
value:
objectReference: {fileID: 297599733}
objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LobbyDataObservers.Array.data[1]
value:

- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LobbyDataObservers.Array.data[6]
value:
objectReference: {fileID: 1412109061}
objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LobbyDataObservers.Array.data[7]
value:

- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalLobbyObservers.Array.data[0]
value:
objectReference: {fileID: 1412109061}
objectReference: {fileID: 2130620598}
objectReference: {fileID: 297599733}
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: 7716713812904700120}
objectReference: {fileID: 1511612118}
objectReference: {fileID: 7716713812904700120}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalLobbyObservers.Array.data[7]
value:

- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LobbyServerObservers.Array.data[0]
value:
objectReference: {fileID: 2637199315837045694}
objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalGameStateObservers.Array.size
value: 6

value: 4
value: 0
objectReference: {fileID: 2637199315837045694}
objectReference: {fileID: 0}
objectReference: {fileID: 113557733}
objectReference: {fileID: 0}
objectReference: {fileID: 2637199315837045698}
objectReference: {fileID: 0}
objectReference: {fileID: 1547097153363664359}
objectReference: {fileID: 0}
objectReference: {fileID: 2637199315837045696}
objectReference: {fileID: 0}
objectReference: {fileID: 883450645}
objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalGameStateObservers.Array.data[4]
value:

- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalMenuStateObservers.Array.data[0]
value:
objectReference: {fileID: 2637199315837045698}
objectReference: {fileID: 0}
objectReference: {fileID: 1547097153363664359}
objectReference: {fileID: 0}
objectReference: {fileID: 2637199315837045696}
objectReference: {fileID: 0}
objectReference: {fileID: 883450645}
objectReference: {fileID: 0}
- target: {fileID: 7716713811812636911, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_RootOrder
value: 4

objectReference: {fileID: 0}
- target: {fileID: 1282422528845055840, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: -0.000019460917
value: 0.000030517578
value: 0.000024497509
objectReference: {fileID: 0}
- target: {fileID: 1386321973193631240, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.x

propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1791708704057470616, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2017918237437651757, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.y
value: 0

objectReference: {fileID: 0}
- target: {fileID: 2832906903618240629, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
value: 1
value: 0
value: 50
value: 0
value: 50
value: 0
value: 155.5
value: 0
value: -27.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2938110563166987729, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.y

propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1439850645}
- target: {fileID: 5962742399928014509, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_fontSize
value: 40
objectReference: {fileID: 0}
- target: {fileID: 6062621839658634998, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_fontSize
value: 40
objectReference: {fileID: 0}
- target: {fileID: 6274653283217461060, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.y
value: 0

objectReference: {fileID: 0}
- target: {fileID: 6314503137265266719, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
value: 1
value: 0
value: 50
value: 0
value: 50
value: 0
value: 49.5
value: 0
value: -27.5
value: 0
value: 1
value: 0
value: 1
value: 0
value: 50
value: 0
value: 50
value: 0
value: 102.5
value: 0
value: -27.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6468178321825623330, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.y

objectReference: {fileID: 0}
- target: {fileID: 7029771435095122102, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
value: 1
value: 0
value: 50
value: 0
value: 50
value: 0
value: 208.5
value: 0
value: -27.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7182908607506352373, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.y

propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8628454959292210618, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_fontSize
value: 62
objectReference: {fileID: 0}
- target: {fileID: 8690778207903056580, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
propertyPath: m_AnchorMax.x
value: 0

propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents:
- {fileID: 3143918963127177442, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}

55
Assets/Scripts/GameLobby/Game/GameManager.cs


namespace LobbyRelaySample
{
/// <summary>
/// Current state of the local game.
/// Set as a flag to allow for the Inspector to select multiple valid states for various UI features.
/// </summary>
[Flags]
public enum GameState
{
Menu = 1,
Lobby = 2,
JoinMenu = 4,
}
/// <summary>
/// Sets up and runs the entire sample.
/// All the Data that is important gets updated in here, the GameManager in the mainScene has all the references
/// needed to run the game.

///
/// The list is serialized, so you can navigate to the Observers via the Inspector to see who's watching.
/// </summary>
[SerializeField]
List<LocalMenuStateObserver> m_LocalMenuStateObservers = new List<LocalMenuStateObserver>();
[SerializeField]
List<LobbyServiceDataObserver> m_LobbyServiceObservers = new List<LobbyServiceDataObserver>();
#endregion

public LocalLobbyList LobbyList { get; private set; } = new LocalLobbyList();
LocalMenuState m_LocalMenuState = new LocalMenuState();
LobbyServiceData m_LobbyServiceData = new LobbyServiceData();
LobbySynchronizer m_LobbySynchronizer;
RelayUtpSetup m_RelaySetup;

}
else if (type == MessageType.JoinLobbyRequest)
{
LocalLobby.LobbyData lobbyInfo = (LocalLobby.LobbyData)msg;
var lobby = await LobbyManager.JoinLobbyAsync(lobbyInfo.LobbyID, lobbyInfo.LobbyCode,
LocalLobby lobbyInfo = (LocalLobby)msg;
var lobby = await LobbyManager.JoinLobbyAsync(lobbyInfo.LobbyID.Value, lobbyInfo.LobbyCode.Value,
m_LocalUser);
if (lobby != null)
{

}
else if (type == MessageType.QueryLobbies)
{
m_LobbyServiceData.State = LobbyQueryState.Fetching;
LobbyList.QueryState.Value = LobbyQueryState.Fetching;
m_LobbyServiceData.State = LobbyQueryState.Error;
LobbyList.QueryState.Value = LobbyQueryState.Error;
}
else if (type == MessageType.QuickJoin)
{

/// </summary>
void BeginObservers()
{
foreach (var gameStateObs in m_LocalMenuStateObservers)
gameStateObs.BeginObserving(m_LocalMenuState);
foreach (var serviceObs in m_LobbyServiceObservers)
serviceObs.BeginObserving(m_LobbyServiceData);
foreach (var lobbyObs in m_LocalLobbyObservers)
lobbyObs.BeginObserving(m_LocalLobby);
foreach (var userObs in m_LocalUserObservers)

{
bool isLeavingLobby = (state == GameState.Menu || state == GameState.JoinMenu) &&
LocalGameState == GameState.Lobby;
LocalGameState = state;
LocalGameState = state;
if (isLeavingLobby)
LeaveLobby();
onGameStateChanged.Invoke(LocalGameState);

{
var newLobbyDict = new Dictionary<string, LocalLobby>();
foreach (var lobby in lobbies)
newLobbyDict.Add(lobby.LobbyID, lobby);
newLobbyDict.Add(lobby.LobbyID.Value, lobby);
m_LobbyServiceData.State = LobbyQueryState.Fetched;
m_LobbyServiceData.CurrentLobbies = newLobbyDict;
LobbyList.QueryState.Value = LobbyQueryState.Fetched;
LobbyList.CurrentLobbies = newLobbyDict;
}
void CreateLobby()

}
}
void StartVivoxLogin()
{
m_VivoxSetup.Initialize(m_vivoxUserHandlers, OnVivoxLoginComplete);

if (!didSucceed)
{
Debug.LogError("Vivox login failed! Retrying in 5s...");
StartCoroutine(RetryConnection(StartVivoxLogin, m_LocalLobby.LobbyID));
StartCoroutine(RetryConnection(StartVivoxLogin, m_LocalLobby.LobbyID.Value));
}
}
}

m_VivoxSetup.JoinLobbyChannel(m_LocalLobby.LobbyID, OnVivoxJoinComplete);
m_VivoxSetup.JoinLobbyChannel(m_LocalLobby.LobbyID.Value, OnVivoxJoinComplete);
void OnVivoxJoinComplete(bool didSucceed)
{

StartCoroutine(RetryConnection(StartVivoxJoin, m_LocalLobby.LobbyID));
StartCoroutine(RetryConnection(StartVivoxJoin, m_LocalLobby.LobbyID.Value));
}
}
}

if (!didSucceed)
{
Debug.LogError("Relay connection failed! Retrying in 5s...");
StartCoroutine(RetryConnection(StartRelayConnection, m_LocalLobby.LobbyID));
StartCoroutine(RetryConnection(StartRelayConnection, m_LocalLobby.LobbyID.Value));
return;
}

IEnumerator RetryConnection(Action doConnection, string lobbyId)
{
yield return new WaitForSeconds(5);
if (m_LocalLobby != null && m_LocalLobby.LobbyID == lobbyId && !string.IsNullOrEmpty(lobbyId)
if (m_LocalLobby != null && m_LocalLobby.LobbyID.Value == lobbyId && !string.IsNullOrEmpty(lobbyId)
) // Ensure we didn't leave the lobby during this waiting period.
doConnection?.Invoke();
}

bool OnWantToQuit()
{
bool canQuit = string.IsNullOrEmpty(m_LocalLobby?.LobbyID);
bool canQuit = string.IsNullOrEmpty(m_LocalLobby?.LobbyID.Value);
StartCoroutine(LeaveBeforeQuit());
return canQuit;
}

void ForceLeaveAttempt()
{
Locator.Get.Messenger.Unsubscribe(this);
if (!string.IsNullOrEmpty(m_LocalLobby?.LobbyID))
if (!string.IsNullOrEmpty(m_LocalLobby?.LobbyID.Value))
{
#pragma warning disable 4014
LobbyManager.LeaveLobbyAsync();

91
Assets/Scripts/GameLobby/Game/LocalLobby.cs


[System.Serializable]
public class LocalLobby : Observed<LocalLobby>
{
Dictionary<string, LobbyUser> m_LobbyUsers = new Dictionary<string, LobbyUser>();
public Dictionary<string, LobbyUser> LobbyUsers => m_LobbyUsers;
public Action<LocalLobby> onLobbyChanged { get; private set; }
public Action<LocalLobby> onLobbyChanged { get; set; }
public Action<Dictionary<string, LobbyUser>> onUserListChanged;
Dictionary<string, LobbyUser> m_LobbyUsers = new Dictionary<string, LobbyUser>();
public Dictionary<string, LobbyUser> LobbyUsers => m_LobbyUsers;
#region LocalLobbyData
public struct LobbyData

AvailableSlots = 4;
Locked = false;
}
public override string ToString()

public LobbyData Data => m_Data;
LobbyData m_Data;
ServerAddress m_RelayServer;
public LocalLobby()

public ServerAddress RelayServer
{
get => m_RelayServer;
set
{
m_RelayServer = value;
OnChanged(this);
}
}
#endregion

}
AddUser(user);
OnChanged(this);
onUserListChanged?.Invoke(m_LobbyUsers);
}
void AddUser(LobbyUser user)

user.onChanged += OnChangedUser;
OnChanged(this);
onUserListChanged?.Invoke(m_LobbyUsers);
}
private void DoRemoveUser(LobbyUser user)

}
m_LobbyUsers.Remove(user.ID);
user.onChanged -= OnChangedUser;
private void OnChangedUser(LobbyUser user)
{
OnChanged(this);
}
public ObservedValue<string> LobbyID = new ObservedValue<string>();
public string LobbyID
{
get => m_Data.LobbyID;
set
{
m_Data.LobbyID = value;
OnChanged(this);
}
}
public ObservedValue<string> LobbyCode = new ObservedValue<string>();
public string LobbyCode
{
get => m_Data.LobbyCode;
set
{
m_Data.LobbyCode = value;
OnChanged(this);
}
}
public ObservedValue<string> RelayCode = new ObservedValue<string>();
public string RelayCode
{
get => m_Data.RelayCode;
set
{
m_Data.RelayCode = value;
OnChanged(this);
}
}
public ObservedValue<string> RelayNGOCode = new ObservedValue<string>();
public string RelayNGOCode
{
get => m_Data.RelayNGOCode;
set
{
m_Data.RelayNGOCode = value;
OnChanged(this);
}
}
public ObservedValue<ServerAddress> RelayServer = new ObservedValue<ServerAddress>();
public string LobbyName
{
get => m_Data.LobbyName;
set
{
m_Data.LobbyName = value;
OnChanged(this);
}
}
public ObservedValue<string> LobbyName = new ObservedValue<string>();
public LobbyState LobbyState
{

// It's possible for the host to edit the lobby in between the time they last pushed lobby data and the time their pull for new lobby data completes.
// If that happens, the edit will be lost, so instead we maintain the time of last edit to detect that case.
m_Data = lobbyData;
m_Data.LobbyState = lobbyData.LobbyState;;
m_Data.LobbyColor = lobbyData.LobbyColor;
m_Data.RelayNGOCode = lobbyData.RelayNGOCode;
LobbyState = lobbyData.LobbyState;
;
LobbyColor = lobbyData.LobbyColor;
m_Data.RelayNGOCode = lobbyData.RelayNGOCode;
if (lobbyUsers == null)
m_LobbyUsers = new Dictionary<string, LobbyUser>();

CopyObserved(oldObserved.Data, oldObserved.m_LobbyUsers);
}
}
}
}

22
Assets/Scripts/GameLobby/Game/ServerAddress.cs


using System;
public class ServerAddress
public class ServerAddress : IEquatable<ServerAddress>
{
string m_IP;
int m_Port;

{
return $"{m_IP}:{m_Port}";
}
public bool Equals(ServerAddress other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return m_IP == other.m_IP && m_Port == other.m_Port;
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((ServerAddress)obj);
}
}
}

2
Assets/Scripts/GameLobby/Infrastructure/ObserverBehaviour.cs


Debug.LogError($"Needs a Target of type {typeof(T)} to begin observing.", gameObject);
return;
}
UpdateObserver(target);
observed.onChanged += UpdateObserver;
}

26
Assets/Scripts/GameLobby/Lobby/LobbyConverters.cs


public static Dictionary<string, string> LocalToRemoteData(LocalLobby lobby)
{
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add(key_RelayCode, lobby.RelayCode);
data.Add(key_RelayNGOCode, lobby.RelayNGOCode);
data.Add(key_RelayCode, lobby.RelayCode.Value);
data.Add(key_RelayNGOCode, lobby.RelayNGOCode.Value);
data.Add(key_LobbyState, ((int)lobby.LobbyState).ToString()); // Using an int is smaller than using the enum state's name.
data.Add(key_LobbyColor, ((int)lobby.LobbyColor).ToString());
data.Add(key_LastEdit, lobby.Data.LastEdit.ToString());

/// <summary>
/// Create a new LocalLobby from the content of a retrieved lobby. Its data can be copied into an existing LocalLobby for use.
/// </summary>
public static void RemoteToLocal(Lobby remoteLobby, LocalLobby localLobbyToUpdate)
public static void RemoteToLocal(Lobby remoteLobby, LocalLobby localLobby)
//Copy Data from Lobby into Local lobby fields
LocalLobby.LobbyData lobbyData = new LocalLobby.LobbyData(localLobbyToUpdate.Data)
localLobby.LobbyID.Value = remoteLobby.Id;
localLobby.LobbyCode.Value = remoteLobby.LobbyCode;
localLobby.RelayCode.Value = remoteLobby.Data?.ContainsKey(key_RelayCode) == true
? remoteLobby.Data[key_RelayCode].Value
: localLobby.RelayCode.Value;
localLobby.RelayNGOCode.Value = remoteLobby.Data?.ContainsKey(key_RelayNGOCode) == true
? remoteLobby.Data[key_RelayNGOCode].Value
: localLobby.RelayNGOCode.Value;
LocalLobby.LobbyData lobbyData = new LocalLobby.LobbyData(localLobby.Data)
LobbyID = remoteLobby.Id,
LobbyCode = remoteLobby.LobbyCode,
RelayCode = remoteLobby.Data?.ContainsKey(key_RelayCode) == true ? remoteLobby.Data[key_RelayCode].Value : localLobbyToUpdate.RelayCode, // By providing RelayCode through the lobby data with Member visibility, we ensure a client is connected to the lobby before they could attempt a relay connection, preventing timing issues between them.
RelayNGOCode = remoteLobby.Data?.ContainsKey(key_RelayNGOCode) == true ? remoteLobby.Data[key_RelayNGOCode].Value : localLobbyToUpdate.RelayNGOCode,
LobbyState = remoteLobby.Data?.ContainsKey(key_LobbyState) == true ? (LobbyState)int.Parse(remoteLobby.Data[key_LobbyState].Value) : LobbyState.Lobby,
LobbyColor = remoteLobby.Data?.ContainsKey(key_LobbyColor) == true ? (LobbyColor)int.Parse(remoteLobby.Data[key_LobbyColor].Value) : LobbyColor.None,
};

}
//Push all the data at once so we don't call OnChanged for each variable
localLobbyToUpdate.CopyObserved(lobbyData, lobbyUsers);
localLobby.CopyObserved(lobbyData, lobbyUsers);
}
/// <summary>

2
Assets/Scripts/GameLobby/Lobby/LobbySynchronizer.cs


void OnLocalLobbyChanged(LocalLobby localLobby)
{
if (string.IsNullOrEmpty(localLobby.LobbyID)
if (string.IsNullOrEmpty(localLobby.LobbyID.Value)
) // When the player leaves, their LocalLobby is cleared out.
{
EndSynch();

4
Assets/Scripts/GameLobby/NGO/SetupInGame.cs


var allocation = await Relay.Instance.CreateAllocationAsync(m_lobby.MaxPlayerCount);
var joincode = await Relay.Instance.GetJoinCodeAsync(allocation.AllocationId);
m_lobby.RelayNGOCode = joincode;
m_lobby.RelayNGOCode.Value = joincode;
bool isSecure = false;
var endpoint = RelayUtpSetup.GetEndpointForAllocation(allocation.ServerEndpoints,

{
UnityTransport transport = NetworkManager.Singleton.GetComponentInChildren<UnityTransport>();
var joinAllocation = await Relay.Instance.JoinAllocationAsync(m_lobby.RelayCode);
var joinAllocation = await Relay.Instance.JoinAllocationAsync(m_lobby.RelayCode.Value);
bool isSecure = false;
var endpoint = RelayUtpSetup.GetEndpointForAllocation(joinAllocation.ServerEndpoints,
joinAllocation.RelayServer.IpV4, joinAllocation.RelayServer.Port, out isSecure);

8
Assets/Scripts/GameLobby/Relay/RelayUtpSetup.cs


private void OnRelayCode(string relayCode)
{
m_localLobby.RelayCode = relayCode;
m_localLobby.RelayServer =
m_localLobby.RelayCode.Value = relayCode;
m_localLobby.RelayServer.Value =
new ServerAddress(AddressFromEndpoint(m_endpointForServer), m_endpointForServer.Port);
m_joinState |= JoinState.Joined;
#pragma warning disable 4014

{
if (m_localLobby.RelayCode != null)
{
RelayAPIInterface.JoinAsync(m_localLobby.RelayCode, OnJoin);
RelayAPIInterface.JoinAsync(m_localLobby.RelayCode.Value, OnJoin);
m_localLobby.onChanged -= OnLobbyChange;
}
}

joinAllocation.RelayServer.IpV4, joinAllocation.RelayServer.Port, out isSecure);
BindToAllocation(m_endpointForServer, joinAllocation.AllocationIdBytes, joinAllocation.ConnectionData,
joinAllocation.HostConnectionData, joinAllocation.Key, 1, isSecure);
m_localLobby.RelayServer =
m_localLobby.RelayServer.Value =
new ServerAddress(AddressFromEndpoint(m_endpointForServer), m_endpointForServer.Port);
}

30
Assets/Scripts/GameLobby/UI/DisplayCodeUI.cs


using System;
using TMPro;
using UnityEngine;

/// Watches a lobby or relay code for updates, displaying the current code to lobby members.
/// </summary>
public class DisplayCodeUI : ObserverPanel<LocalLobby>
public class DisplayCodeUI : UIPanelBase
{
public enum CodeType { Lobby = 0, Relay = 1 }

CodeType m_codeType;
public override void ObservedUpdated(LocalLobby observed)
void LobbyCodeChanged(string newCode)
string code = m_codeType == CodeType.Lobby ? observed.LobbyCode : observed.RelayCode;
if (!string.IsNullOrEmpty(code))
if (!string.IsNullOrEmpty(newCode))
m_outputText.text = code;
m_outputText.text = newCode;
Show();
}
else

}
public override void Start()
{
base.Start();
if(m_codeType==CodeType.Lobby)
Manager.LocalLobby.LobbyCode.onValueChanged += LobbyCodeChanged;
if(m_codeType==CodeType.Relay)
Manager.LocalLobby.RelayCode.onValueChanged += LobbyCodeChanged;
}
void OnDestroy()
{
if (Manager == null)
return;
if(m_codeType==CodeType.Lobby)
Manager.LocalLobby.LobbyCode.onValueChanged -= LobbyCodeChanged;
if(m_codeType==CodeType.Relay)
Manager.LocalLobby.RelayCode.onValueChanged -= LobbyCodeChanged;
}
}
}

22
Assets/Scripts/GameLobby/UI/GameStateVisibilityUI.cs


/// <summary>
/// Show or hide a UI element based on the current GameState (e.g. in a lobby).
/// </summary>
[RequireComponent(typeof(LocalMenuStateObserver))]
public class GameStateVisibilityUI : ObserverPanel<LocalMenuState>
public class GameStateVisibilityUI : UIPanelBase
public override void ObservedUpdated(LocalMenuState observed)
void GameStateChanged(GameState state)
if (!ShowThisWhen.HasFlag(observed.State))
if (!ShowThisWhen.HasFlag(state))
Hide();
else
{

public override void Start()
{
base.Start();
Manager.onGameStateChanged += GameStateChanged;
}
void OnDestroy()
{
if (Manager == null)
return;
Manager.onGameStateChanged -= GameStateChanged;
}
}
}

22
Assets/Scripts/GameLobby/UI/JoinCreateLobbyUI.cs


/// <summary>
/// The panel that holds the lobby joining and creation panels.
/// </summary>
public class JoinCreateLobbyUI : ObserverPanel<LocalMenuState>
public class JoinCreateLobbyUI : UIPanelBase
[HideInInspector]
public UnityEvent<JoinCreateTabs> m_OnTabChanged;
[SerializeField] //Serialized for Visisbility in Editor

CurrentTab = JoinCreateTabs.Create;
}
public override void ObservedUpdated(LocalMenuState observed)
void GameStateChanged(GameState state)
if (observed.State == GameState.JoinMenu)
if (state == GameState.JoinMenu)
{
m_OnTabChanged?.Invoke(m_CurrentTab);
Show(false);

Hide();
}
}
public override void Start()
{
base.Start();
Manager.onGameStateChanged += GameStateChanged;
}
void OnDestroy()
{
if (Manager == null)
return;
Manager.onGameStateChanged -= GameStateChanged;
}
}
}

32
Assets/Scripts/GameLobby/UI/JoinMenuUI.cs


/// <summary>
/// Handles the list of LobbyButtons and ensures it stays synchronized with the lobby list from the service.
/// </summary>
public class JoinMenuUI : ObserverPanel<LobbyServiceData>
public class JoinMenuUI : UIPanelBase
{
[SerializeField]
LobbyButtonUI m_LobbyButtonPrefab;

Dictionary<string, LocalLobby> m_LocalLobby = new Dictionary<string, LocalLobby>();
/// <summary>Contains some amount of information used to join an existing lobby.</summary>
LocalLobby.LobbyData m_LocalLobbySelected;
LocalLobby m_LocalLobbySelected;
Manager.LobbyList.onLobbyListChange += OnLobbyListChanged;
}
void OnDestroy()
{
if (Manager == null)
return;
Manager.LobbyList.onLobbyListChange -= OnLobbyListChanged;
}
void OnTabChanged(JoinCreateTabs tabState)

public void LobbyButtonSelected(LocalLobby lobby)
{
m_LocalLobbySelected = lobby.Data;
m_LocalLobbySelected = lobby;
m_LocalLobbySelected = new LocalLobby.LobbyData(newCode.ToUpper());
m_LocalLobbySelected.LobbyCode.Value = newCode.ToUpper();
m_LocalLobbySelected = default;
m_LocalLobbySelected = new LocalLobby();
}
public void OnRefresh()

public override void ObservedUpdated(LobbyServiceData observed)
void OnLobbyListChanged(Dictionary<string, LocalLobby> lobbyList)
foreach (var codeLobby in observed.CurrentLobbies)
foreach (var codeLobby in lobbyList)
{
var lobbyCodeKey = codeLobby.Key;
var lobbyData = codeLobby.Value;

else
{
if (CanDisplay(lobbyData))
UpdateLobbyButton(lobbyCodeKey, lobbyData);
SetLobbyButton(lobbyCodeKey, lobbyData);
else
RemoveLobbyButton(lobbyData);
}

m_LocalLobby.Add(lobbyCode, lobby);
}
void UpdateLobbyButton(string lobbyCode, LocalLobby lobby)
void SetLobbyButton(string lobbyCode, LocalLobby lobby)
m_LobbyButtons[lobbyCode].UpdateLobby(lobby);
m_LobbyButtons[lobbyCode].SetLobby(lobby);
var lobbyID = lobby.LobbyID;
var lobbyID = lobby.LobbyID.Value;
var lobbyButton = m_LobbyButtons[lobbyID];
lobbyButton.GetComponent<LocalLobbyObserver>().EndObserving();
m_LobbyButtons.Remove(lobbyID);

}
}
}

26
Assets/Scripts/GameLobby/UI/LobbyButtonUI.cs


using System;
using TMPro;
using UnityEngine;
using UnityEngine.Events;

/// <summary>
/// Controls an entry in the join menu's list of lobbies, acting as a clickable button as well as displaying info about the lobby.
/// </summary>
[RequireComponent(typeof(LocalLobbyObserver))]
//TODO WHAT WAS THIS OBSERVING??!?
public class LobbyButtonUI : MonoBehaviour
{
[SerializeField]

/// </summary>
public UnityEvent<LocalLobby> onLobbyPressed;
LocalLobbyObserver m_DataObserver;
void Awake()
{
m_DataObserver = GetComponent<LocalLobbyObserver>();
}
LocalLobby m_Lobby;
/// <summary>
/// UI CallBack

onLobbyPressed?.Invoke(m_DataObserver.observed);
}
public void UpdateLobby(LocalLobby lobby)
{
m_DataObserver.observed.CopyObserved(lobby);
//TODO Select Lobby
public void OnLobbyUpdated(LocalLobby data)
public void SetLobby(LocalLobby lobby)
lobbyNameText.SetText(data.LobbyName);
lobbyCountText.SetText($"{data.PlayerCount}/{data.MaxPlayerCount}");
m_Lobby = lobby;
lobbyNameText.SetText(m_Lobby.LobbyName.Value);
lobbyCountText.SetText($"{m_Lobby.PlayerCount}/{m_Lobby.MaxPlayerCount}");
}
}

9
Assets/Scripts/GameLobby/UI/LobbyNameUI.cs


/// <summary>
/// Displays the name of the lobby.
/// </summary>
public class LobbyNameUI : ObserverPanel<LocalLobby>
public class LobbyNameUI : UIPanelBase
public override void ObservedUpdated(LocalLobby observed)
public void Start()
m_lobbyNameText.SetText(observed.LobbyName);
base.Start();
Manager.LocalLobby.LobbyName.onValueChanged += (s) => { m_lobbyNameText.SetText(s); };
}
}

23
Assets/Scripts/GameLobby/UI/ShowWhenLobbyStateUI.cs


using System;
using UnityEngine;
namespace LobbyRelaySample.UI

/// </summary>
public class ShowWhenLobbyStateUI : ObserverPanel<LocalLobby>
public class ShowWhenLobbyStateUI : UIPanelBase
public override void ObservedUpdated(LocalLobby observed)
public void LobbyChanged(LocalLobby lobby)
if (m_ShowThisWhen.HasFlag(observed.LobbyState))
if (m_ShowThisWhen.HasFlag(lobby.LobbyState))
public override void Start()
{
base.Start();
Manager.LocalLobby.onLobbyChanged += LobbyChanged;
}
public void OnDestroy()
{
if (GameManager.Instance == null)
return;
Manager.LocalLobby.onLobbyChanged -= LobbyChanged;
}
}
}

28
Assets/Scripts/GameLobby/UI/SpinnerUI.cs


using System;
using System.Text;
using TMPro;
using UnityEngine;

/// <summary>
/// Controls a simple throbber that is displayed when the lobby list is being refreshed.
/// </summary>
public class SpinnerUI : ObserverPanel<LobbyServiceData>
public class SpinnerUI : UIPanelBase
{
[SerializeField] TMP_Text m_errorText;
[SerializeField] UIPanelBase m_spinnerImage;

[SerializeField] UIPanelBase m_raycastBlocker;
public override void ObservedUpdated(LobbyServiceData observed)
public override void Start()
if (observed.State == LobbyQueryState.Fetching)
base.Start();
Manager.LobbyList.QueryState.onValueChanged += QueryStateChanged;
}
void OnDestroy()
{
if (Manager == null)
return;
Manager.LobbyList.QueryState.onValueChanged -= QueryStateChanged;
}
void QueryStateChanged(LobbyQueryState state)
{
if (state == LobbyQueryState.Fetching)
{
Show();
m_spinnerImage.Show();

}
else if (observed.State == LobbyQueryState.Error)
else if (state == LobbyQueryState.Error)
{
m_spinnerImage.Hide();
m_raycastBlocker.Hide();

else if (observed.State == LobbyQueryState.Fetched)
else if (state == LobbyQueryState.Fetched)
if (observed.CurrentLobbies.Count < 1)
if (Manager.LobbyList.CurrentLobbies.Count < 1)
{
m_noServerText.Show();
}

12
Assets/Scripts/GameLobby/UI/UIPanelBase.cs


private UnityEvent<bool> m_onVisibilityChange;
bool showing;
protected GameManager Manager
{
get
{
if (m_gameManager != null) return m_gameManager;
return m_gameManager = GameManager.Instance;
}
}
GameManager m_gameManager;
CanvasGroup m_canvasGroup;
List<UIPanelBase> m_uiPanelsInChildren = new List<UIPanelBase>(); // Otherwise, when this Shows/Hides, the children won't know to update their own visibility.

{
Show(true);
}
public void Show(bool propagateToChildren)
{
MyCanvasGroup.alpha = 1;

2
ProjectSettings/RiderScriptEditorPersistedState.asset


m_Script: {fileID: 0}
m_Name:
m_EditorClassIdentifier: Unity.Rider.Editor:Packages.Rider.Editor:RiderScriptEditorPersistedState
lastWriteTicks: -8585486268141277427
lastWriteTicks: -8585463664984316469

2
Assets/Scripts/GameLobby/Infrastructure/Actionvalue.cs.meta


fileFormatVersion: 2
guid: edfa4d53eaae84c43ba581088940700c
guid: 3167ee4f02a6e4b4bb4d4e8830ea69c5
MonoImporter:
externalObjects: {}
serializedVersion: 2

45
Assets/Scripts/GameLobby/Game/LocalLobbyList.cs


using System;
using System.Collections.Generic;
using UnityEngine.Serialization;
namespace LobbyRelaySample
{
/// <summary>
/// Used when displaying the lobby list, to indicate when we are awaiting an updated lobby query.
/// </summary>
public enum LobbyQueryState
{
Empty,
Fetching,
Error,
Fetched
}
/// <summary>
/// Holds data related to the Lobby service itself - The latest retrieved lobby list, the state of retrieval.
/// </summary>
[System.Serializable]
public class LocalLobbyList
{
LobbyQueryState m_CurrentState = LobbyQueryState.Empty;
public ObservedValue<LobbyQueryState> QueryState = new ObservedValue<LobbyQueryState>();
public Action<Dictionary<string, LocalLobby>> onLobbyListChange;
Dictionary<string, LocalLobby> m_currentLobbies = new Dictionary<string, LocalLobby>();
/// <summary>
/// Maps from a lobby's ID to the local representation of it. This allows us to remember which remote lobbies are which LocalLobbies.
/// Will only trigger if the dictionary is set wholesale. Changes in the size or contents will not trigger OnChanged.
/// </summary>
public Dictionary<string, LocalLobby> CurrentLobbies
{
get { return m_currentLobbies; }
set
{
m_currentLobbies = value;
onLobbyListChange?.Invoke(m_currentLobbies);
}
}
}
}

24
Assets/Scripts/GameLobby/Infrastructure/Actionvalue.cs


using System;
using UnityEngine;
namespace LobbyRelaySample
{
public class ObservedValue<T>
{
public Action<T> onValueChanged;
public T Value
{
get => m_CachedValue;
set
{
if (m_CachedValue.Equals(value))
return;
m_CachedValue = value;
onValueChanged?.Invoke(m_CachedValue);
}
}
T m_CachedValue = default;
}
}

56
Assets/Scripts/GameLobby/Game/LobbyServiceData.cs


using System.Collections.Generic;
namespace LobbyRelaySample
{
/// <summary>
/// Used when displaying the lobby list, to indicate when we are awaiting an updated lobby query.
/// </summary>
public enum LobbyQueryState
{
Empty,
Fetching,
Error,
Fetched
}
/// <summary>
/// Holds data related to the Lobby service itself - The latest retrieved lobby list, the state of retrieval.
/// </summary>
[System.Serializable]
public class LobbyServiceData : Observed<LobbyServiceData>
{
LobbyQueryState m_CurrentState = LobbyQueryState.Empty;
public LobbyQueryState State
{
get { return m_CurrentState; }
set
{
m_CurrentState = value;
OnChanged(this);
}
}
Dictionary<string, LocalLobby> m_currentLobbies = new Dictionary<string, LocalLobby>();
/// <summary>
/// Maps from a lobby's ID to the local representation of it. This allows us to remember which remote lobbies are which LocalLobbies.
/// Will only trigger if the dictionary is set wholesale. Changes in the size or contents will not trigger OnChanged.
/// </summary>
public Dictionary<string, LocalLobby> CurrentLobbies
{
get { return m_currentLobbies; }
set
{
m_currentLobbies = value;
OnChanged(this);
}
}
public override void CopyObserved(LobbyServiceData oldObserved)
{
m_currentLobbies = oldObserved.CurrentLobbies;
OnChanged(this);
}
}
}

8
Assets/Scripts/GameLobby/Game/LobbyServiceDataObserver.cs


namespace LobbyRelaySample
{
/// <summary>
/// Holds a LobbyServiceData value and notifies all subscribers when it has been changed.
/// Check the GameManager in the mainScene for the list of observers being used in the project.
/// </summary>
public class LobbyServiceDataObserver : ObserverBehaviour<LobbyServiceData> { }
}

8
Assets/Scripts/GameLobby/Game/LocalMenuStateObserver.cs


namespace LobbyRelaySample
{
/// <summary>
/// Holds a LocalMenuState value and notifies all subscribers when it has been changed.
/// Check the GameManager in the mainScene for the list of observers being used in the project.
/// </summary>
public class LocalMenuStateObserver : ObserverBehaviour<LocalMenuState> { }
}

11
Assets/Scripts/GameLobby/Game/LocalMenuStateObserver.cs.meta


fileFormatVersion: 2
guid: 51373dc3c6ac79b4f8e36ac7c4419205
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

11
Assets/Scripts/GameLobby/Game/LocalMenuState.cs.meta


fileFormatVersion: 2
guid: ef5f9e37afd724949b99a2daa3b38e03
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

46
Assets/Scripts/GameLobby/Game/LocalMenuState.cs


using System;
namespace LobbyRelaySample
{
/// <summary>
/// Current state of the local game.
/// Set as a flag to allow for the Inspector to select multiple valid states for various UI features.
/// </summary>
[Flags]
public enum GameState
{
Menu = 1,
Lobby = 2,
JoinMenu = 4,
}
/// <summary>
/// Awaits player input to change the local game data.
/// </summary>
[System.Serializable]
public class LocalMenuState : Observed<LocalMenuState>
{
GameState m_State = GameState.Menu;
public GameState State
{
get => m_State;
set
{
if (m_State != value)
{
m_State = value;
OnChanged(this);
}
}
}
public override void CopyObserved(LocalMenuState oldObserved)
{
if (m_State == oldObserved.State)
return;
m_State = oldObserved.State;
OnChanged(this);
}
}
}

11
Assets/Scripts/GameLobby/UI/MainMenuUI.cs.meta


fileFormatVersion: 2
guid: f5f008f7401275f4caf585c1dd2a15fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

21
Assets/Scripts/GameLobby/UI/MainMenuUI.cs


using UnityEngine;
namespace LobbyRelaySample.UI
{
/// <summary>
/// Watches for changes in the game state to/from the main menu.
/// </summary>
[RequireComponent(typeof(LocalMenuStateObserver))]
public class MainMenuUI : ObserverPanel<LocalMenuState>
{
public override void ObservedUpdated(LocalMenuState observed)
{
if (observed.State == GameState.Menu)
Show();
else
{
Hide();
}
}
}
}

/Assets/Scripts/GameLobby/Game/LobbyServiceData.cs.meta → /Assets/Scripts/GameLobby/Game/LocalLobbyList.cs.meta

/Assets/Scripts/GameLobby/Game/LobbyServiceDataObserver.cs.meta → /Assets/Scripts/GameLobby/Infrastructure/Actionvalue.cs.meta

正在加载...
取消
保存