浏览代码

feat: Fixed some broken UI Prefabs

/main/staging/2021_Upgrade/Async_Refactor
UnityJacob 2 年前
当前提交
05bb81d4
共有 13 个文件被更改,包括 213 次插入378 次删除
  1. 50
      Assets/Prefabs/UI/LobbyCanvas.prefab
  2. 58
      Assets/Prefabs/UI/LobbyUserList.prefab
  3. 302
      Assets/Prefabs/UI/UserInteractionPanel.prefab
  4. 47
      Assets/Prefabs/UI/LobbyEntryUI.prefab
  5. 14
      Assets/Renderer/glyphGameURP_Renderer.asset
  6. 8
      Assets/Scripts/GameLobby/UI/JoinMenuUI.cs
  7. 2
      Assets/Scripts/GameLobby/UI/RecolorForLobbyType.cs
  8. 2
      Assets/Scripts/GameLobby/UI/UserStateVisibilityUI.cs
  9. 108
      Assets/Scripts/GameLobby/UI/LobbyEntryUI.cs
  10. 0
      /Assets/Prefabs/UI/LobbyEntryUI.prefab.meta
  11. 0
      /Assets/Prefabs/UI/LobbyEntryUI.prefab
  12. 0
      /Assets/Scripts/GameLobby/UI/LobbyEntryUI.cs.meta
  13. 0
      /Assets/Scripts/GameLobby/UI/LobbyEntryUI.cs

50
Assets/Prefabs/UI/LobbyCanvas.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: 7.4999876}
m_AnchoredPosition: {x: 0, y: 7.5}
m_SizeDelta: {x: -50, y: -14.999975}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!225 &5434623004655309427

objectReference: {fileID: 0}
- target: {fileID: 1919168897190896396, guid: 2ff073ec9c74c8942bd90a541dc41bfc, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
value: 0
value: 1
value: 0
value: 50
value: 0
value: 50
value: 0
value: 208.5
value: 0
value: -27.5
objectReference: {fileID: 0}
- target: {fileID: 2056817220376623591, guid: 2ff073ec9c74c8942bd90a541dc41bfc, type: 3}
propertyPath: m_AnchorMax.y

objectReference: {fileID: 3223430358889797224}
- target: {fileID: 3210254045315593125, guid: 2ff073ec9c74c8942bd90a541dc41bfc, type: 3}
propertyPath: m_AnchorMax.y
value: 0
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
objectReference: {fileID: 0}
- target: {fileID: 3592018725093616804, guid: 2ff073ec9c74c8942bd90a541dc41bfc, type: 3}
propertyPath: m_fontColor.b

objectReference: {fileID: 0}
- target: {fileID: 6664205945102926799, guid: 2ff073ec9c74c8942bd90a541dc41bfc, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
value: 0
value: 1
value: 0
value: 50
value: 0
value: 50
value: 0
value: 155.5
value: 0
value: -27.5
objectReference: {fileID: 0}
- target: {fileID: 6700616695629081094, guid: 2ff073ec9c74c8942bd90a541dc41bfc, type: 3}
propertyPath: m_fontSize

58
Assets/Prefabs/UI/LobbyUserList.prefab


- component: {fileID: 4463750083940306577}
- component: {fileID: 4463750083940306576}
- component: {fileID: 4463750083940306591}
- component: {fileID: 1553725903561197374}
m_Layer: 5
m_Name: LobbyUserList
m_TagString: Untagged

m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
m_PresetInfoIsWorld: 0
--- !u!114 &4463750083940306577
MonoBehaviour:
m_ObjectHideFlags: 0

- {fileID: 4503217775887893542}
- {fileID: 1646035575854440888}
- {fileID: 6290668908104815487}
--- !u!114 &1553725903561197374
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4463750083940306589}
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: 4463750083940306591}
m_TargetAssemblyTypeName: LobbyRooms.UI.RoomPlayersUI, 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 &5373112041518163852
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 8853547886851310217}
- component: {fileID: 633533396086944350}
- component: {fileID: 8740825503606492738}
- component: {fileID: 7056422356970708528}
m_Layer: 5
m_Name: InGamePanel
m_TagString: Untagged

m_PersistentCalls:
m_Calls: []
m_ShowThisWhen: 4
--- !u!114 &7056422356970708528
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5373112041518163852}
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: 8740825503606492738}
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 &5447062805889817511
GameObject:
m_ObjectHideFlags: 0

302
Assets/Prefabs/UI/UserInteractionPanel.prefab


m_Script: {fileID: 11500000, guid: 5b3b588e7ae40ec4ca35fdb9404513ab, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
m_CountDownText: {fileID: 4467363028704636643}

- component: {fileID: 1611213509401803489}
- component: {fileID: 5811625806911023419}
- component: {fileID: 5977596652360143959}
- component: {fileID: 2113442049023149911}
- component: {fileID: 4811792094336013573}
- component: {fileID: 435124129857761185}
m_Layer: 5

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_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 72
m_fontSize: 22.2
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1

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

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

m_Calls:
- m_Target: {fileID: 2987822160017223264}
m_TargetAssemblyTypeName: LobbyRelaySample.UI.RecolorForLobbyType, LobbyRelaySample
m_MethodName: ChangeColor
m_MethodName: SetLobbyColor
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}

- component: {fileID: 6712653532449929400}
- component: {fileID: 8508575087870636667}
- component: {fileID: 6640185585145895720}
- component: {fileID: 4800227646832904480}
m_Layer: 5
m_Name: TongueIcon
m_TagString: Untagged

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: 273.5, y: -376.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_Script: {fileID: 11500000, guid: 389b6bc508595ea4c920cbaa3d21fc54, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
--- !u!225 &4800227646832904480
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2186823305087296033}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!1 &2835147694615859225
GameObject:
m_ObjectHideFlags: 0

m_Calls:
- m_Target: {fileID: 2987822160017223264}
m_TargetAssemblyTypeName: LobbyRelaySample.UI.RecolorForLobbyType, LobbyRelaySample
m_MethodName: ChangeColor
m_MethodName: SetLobbyColor
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}

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

- component: {fileID: 5151586559654887469}
- component: {fileID: 8227063393050474168}
- component: {fileID: 38810562540460648}
- component: {fileID: 2853056286508716223}
- component: {fileID: 6834908889545701957}
m_Layer: 5
m_Name: LobbyTypeContainer

m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &2853056286508716223
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4330603859870806951}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 6834908889545701957}
m_TargetAssemblyTypeName: LobbyRelaySample.UI.UserStateVisibilityUI, LobbyRelaySample
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 &6834908889545701957
MonoBehaviour:
m_ObjectHideFlags: 0

- component: {fileID: 6463354546789934473}
- component: {fileID: 1712688506883075726}
- component: {fileID: 1163834802805469247}
- component: {fileID: 4914536845037457902}
m_Layer: 5
m_Name: SmileIcon
m_TagString: Untagged

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: 114.5, y: -376.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_Script: {fileID: 11500000, guid: 389b6bc508595ea4c920cbaa3d21fc54, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
--- !u!225 &4914536845037457902
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4470000697835183986}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!1 &4475720551491962531
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 759037105273515699}
- component: {fileID: 8742429799833895606}
- component: {fileID: 3840037590007163527}
- component: {fileID: 3235578093204888586}
- component: {fileID: 9048520512602473890}
m_Layer: 5
m_Name: ReadyPanel

m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &3235578093204888586
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4830900314091476641}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9048520512602473890}
m_TargetAssemblyTypeName: LobbyRooms.UI.UserStateVisibilityUI, 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 &9048520512602473890
MonoBehaviour:
m_ObjectHideFlags: 0

- component: {fileID: 6687484736792569641}
- component: {fileID: 8495636767461452457}
- component: {fileID: 4681140549745913102}
- component: {fileID: 5360291397379197498}
m_Layer: 5
m_Name: UserButtonBG
m_TagString: Untagged

m_Script: {fileID: 11500000, guid: bd24e242d9385c244b4c0a635949b1a5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
--- !u!225 &5360291397379197498
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5340674743026918435}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!1 &5409100620800317906
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 6977435345365325268}
- component: {fileID: 2928554626579320494}
- component: {fileID: 6389975608916618572}
- component: {fileID: 2361201349482207691}
m_Layer: 5
m_Name: UnamusedIcon
m_TagString: Untagged

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: 220.5, y: -376.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_Script: {fileID: 11500000, guid: 389b6bc508595ea4c920cbaa3d21fc54, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
--- !u!225 &2361201349482207691
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5411716139989892340}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!1 &5626941668538444755
GameObject:
m_ObjectHideFlags: 0

m_Calls:
- m_Target: {fileID: 2987822160017223264}
m_TargetAssemblyTypeName: LobbyRelaySample.UI.RecolorForLobbyType, LobbyRelaySample
m_MethodName: ChangeColor
m_MethodName: SetLobbyColor
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}

- component: {fileID: 4844555698956727370}
- component: {fileID: 8638827337113238188}
- component: {fileID: 1619100575765837454}
- component: {fileID: 6887166789349504240}
- component: {fileID: 5998684818406589344}
m_Layer: 5
m_Name: CancelPanel

m_Script: {fileID: 11500000, guid: bd24e242d9385c244b4c0a635949b1a5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &6887166789349504240
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6223322455083519911}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_onVisibilityChange:
m_Calls:
- m_Target: {fileID: 5998684818406589344}
m_TargetAssemblyTypeName: LobbyRooms.UI.UserStateVisibilityUI, 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_Calls: []
--- !u!114 &5998684818406589344
MonoBehaviour:
m_ObjectHideFlags: 0

- component: {fileID: 5026269005358103012}
- component: {fileID: 6337293324110520399}
- component: {fileID: 8045047639899645949}
- component: {fileID: 8850815072349184999}
- component: {fileID: 7597047770691248045}
m_Layer: 5
m_Name: EmoteButtons

m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &8850815072349184999
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6356789002927649657}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7597047770691248045}
m_TargetAssemblyTypeName: LobbyRelaySample.UI.UserStateVisibilityUI, LobbyRelaySample
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 &7597047770691248045
MonoBehaviour:
m_ObjectHideFlags: 0

- component: {fileID: 6919891912281880971}
- component: {fileID: 1519148326278112938}
- component: {fileID: 3953612155158603721}
- component: {fileID: 2586128159150077185}
- component: {fileID: 5356355227050787427}
- component: {fileID: 900710893788416922}
m_Layer: 5

m_Interactable: 0
m_BlocksRaycasts: 0
m_IgnoreParentGroups: 0
--- !u!114 &2586128159150077185
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6897031386683883020}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 5356355227050787427}
m_TargetAssemblyTypeName: LobbyRooms.UI.UserStateVisibilityUI, 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 &5356355227050787427
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 268bfa80f12de0345a051323f3279616, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
--- !u!1 &6903556594047626237
GameObject:
m_ObjectHideFlags: 0

m_Calls:
- m_Target: {fileID: 2987822160017223264}
m_TargetAssemblyTypeName: LobbyRelaySample.UI.RecolorForLobbyType, LobbyRelaySample
m_MethodName: ChangeColor
m_MethodName: SetLobbyColor
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}

- component: {fileID: 7784475288331796339}
- component: {fileID: 588056481165772144}
- component: {fileID: 3023764238805683497}
- component: {fileID: 3726981029093688172}
m_Layer: 5
m_Name: FrownIcon
m_TagString: Untagged

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: 167.5, y: -376.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:

m_Script: {fileID: 11500000, guid: 389b6bc508595ea4c920cbaa3d21fc54, type: 3}
m_Name:
m_EditorClassIdentifier:
m_onVisibilityChange:
m_PersistentCalls:
m_Calls: []
--- !u!225 &3726981029093688172
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7280943722809746719}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!1 &7501509171414083009
GameObject:
m_ObjectHideFlags: 0

47
Assets/Prefabs/UI/LobbyEntryUI.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: 9095092682662508748}
m_RootOrder: 0

- component: {fileID: 4172744935978053658}
- component: {fileID: 5345794337443349844}
- component: {fileID: 7018369548608736188}
- component: {fileID: 843756277828315513}
m_Name: LobbyButtonUI
m_Name: LobbyEntryUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 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: 7388874116200379571}
- {fileID: 2246652449813468979}

onLobbyPressed:
m_PersistentCalls:
m_Calls: []
--- !u!114 &843756277828315513
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6423115675995281648}
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: 7018369548608736188}
m_TargetAssemblyTypeName: LobbyRelaySample.UI.LobbyButtonUI, LobbyRelaySample
m_MethodName: OnLobbyUpdated
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_Target: {fileID: 6515571473500817606}
m_TargetAssemblyTypeName: LobbyRelaySample.UI.RecolorForLobbyType, LobbyRelaySample
m_MethodName: UpdateLobby
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 &1059336587790472163
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: 9095092682662508748}
m_RootOrder: 1

m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSize: 31.65
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1

14
Assets/Renderer/glyphGameURP_Renderer.asset


m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
m_Name: glyphGameURP_Renderer
m_EditorClassIdentifier:
debugShaders:
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3}
m_UseNativeRenderPass: 0
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
shaders:

samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
tileDepthInfoPS: {fileID: 0}
tileDeferredPS: {fileID: 0}
coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3}
coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3}
cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3}
objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3}
m_AssetVersion: 1
m_OpaqueLayerMask:
serializedVersion: 2
m_Bits: 4294967295

zFailOperation: 0
m_ShadowTransparentReceive: 1
m_RenderingMode: 0
m_DepthPrimingMode: 0
m_ClusteredRendering: 0
m_TileSize: 32
m_IntermediateTextureMode: 1

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


using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.Serialization;
namespace LobbyRelaySample.UI
{

public class JoinMenuUI : UIPanelBase
{
[FormerlySerializedAs("m_LobbyButtonPrefab")]
LobbyButtonUI m_LobbyButtonPrefab;
LobbyEntryUI m_LobbyEntryPrefab;
[SerializeField]
RectTransform m_LobbyButtonParent;

/// <summary>
/// Key: Lobby ID, Value Lobby UI
/// </summary>
Dictionary<string, LobbyButtonUI> m_LobbyButtons = new Dictionary<string, LobbyButtonUI>();
Dictionary<string, LobbyEntryUI> m_LobbyButtons = new Dictionary<string, LobbyEntryUI>();
Dictionary<string, LocalLobby> m_LocalLobby = new Dictionary<string, LocalLobby>();
/// <summary>Contains some amount of information used to join an existing lobby.</summary>

/// </summary>
void AddNewLobbyButton(string lobbyCode, LocalLobby lobby)
{
var lobbyButtonInstance = Instantiate(m_LobbyButtonPrefab, m_LobbyButtonParent);
var lobbyButtonInstance = Instantiate(m_LobbyEntryPrefab, m_LobbyButtonParent);
lobbyButtonInstance.onLobbyPressed.AddListener(LobbyButtonSelected);
m_LobbyButtons.Add(lobbyCode, lobbyButtonInstance);
m_LocalLobby.Add(lobbyCode, lobby);

2
Assets/Scripts/GameLobby/UI/RecolorForLobbyType.cs


/// Called in-editor by toggles to set the color of the lobby.
/// Triggers the ChangeColors method above
/// </summary>
public void ChangeColor(int color)
public void SetLobbyColor(int color)
{
if (m_lobby != null)
m_lobby.LocalLobbyColor.Value = (LobbyColor)color;

2
Assets/Scripts/GameLobby/UI/UserStateVisibilityUI.cs


{
m_HasPermissions = true;
}
else if (Permissions.HasFlag(UserPermission.Client) && !isHost)
if (Permissions.HasFlag(UserPermission.Client) && !isHost)
{
m_HasPermissions = true;
}

108
Assets/Scripts/GameLobby/UI/LobbyEntryUI.cs


using System;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
namespace LobbyRelaySample.UI
{
/// <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>
//TODO WHAT WAS THIS OBSERVING??!?
public class LobbyButtonUI : MonoBehaviour
{
[SerializeField]
TMP_Text lobbyNameText;
[SerializeField]
TMP_Text lobbyCountText;
/// <summary>
/// Subscribed to on instantiation to pass our lobby data back
/// </summary>
public UnityEvent<LocalLobby> onLobbyPressed;
LocalLobby m_Lobby;
/// <summary>
/// UI CallBack
/// </summary>
public void OnLobbyClicked()
{
onLobbyPressed.Invoke(m_Lobby);
}
public void SetLobby(LocalLobby lobby)
{
m_Lobby = lobby;
SetLobbyname(m_Lobby.LobbyName.Value);
SetLobbyCount(m_Lobby.LocalPlayers);
m_Lobby.LobbyName.onChanged += SetLobbyname;
m_Lobby.onUserListChanged += SetLobbyCount;
}
void SetLobbyname(string lobbyName)
{
lobbyNameText.SetText(m_Lobby.LobbyName.Value);
}
void SetLobbyCount(Dictionary<string, LocalPlayer> userList)
{
lobbyCountText.SetText($"{userList.Count}/{m_Lobby.MaxPlayerCount}");
}
}
}
using System;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
namespace LobbyRelaySample.UI
{
/// <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>
public class LobbyEntryUI : MonoBehaviour
{
[SerializeField]
TMP_Text lobbyNameText;
[SerializeField]
TMP_Text lobbyCountText;
/// <summary>
/// Subscribed to on instantiation to pass our lobby data back
/// </summary>
public UnityEvent<LocalLobby> onLobbyPressed;
LocalLobby m_Lobby;
/// <summary>
/// UI CallBack
/// </summary>
public void OnLobbyClicked()
{
onLobbyPressed.Invoke(m_Lobby);
}
public void SetLobby(LocalLobby lobby)
{
m_Lobby = lobby;
SetLobbyname(m_Lobby.LobbyName.Value);
SetLobbyCount(m_Lobby.LocalPlayers);
m_Lobby.LobbyName.onChanged += SetLobbyname;
m_Lobby.onUserListChanged += SetLobbyCount;
}
void SetLobbyname(string lobbyName)
{
lobbyNameText.SetText(m_Lobby.LobbyName.Value);
}
void SetLobbyCount(Dictionary<string, LocalPlayer> userList)
{
lobbyCountText.SetText($"{userList.Count}/{m_Lobby.MaxPlayerCount.Value}");
}
}
}

/Assets/Prefabs/UI/LobbyButtonUI.prefab.meta → /Assets/Prefabs/UI/LobbyEntryUI.prefab.meta

/Assets/Prefabs/UI/LobbyButtonUI.prefab → /Assets/Prefabs/UI/LobbyEntryUI.prefab

/Assets/Scripts/GameLobby/UI/LobbyButtonUI.cs.meta → /Assets/Scripts/GameLobby/UI/LobbyEntryUI.cs.meta

/Assets/Scripts/GameLobby/UI/LobbyButtonUI.cs → /Assets/Scripts/GameLobby/UI/LobbyEntryUI.cs

正在加载...
取消
保存