Commit 4495e681 authored by Abdulrahman Mohammed's avatar Abdulrahman Mohammed

Refactor lobby

parent e60515eb
...@@ -553,6 +553,7 @@ GameObject: ...@@ -553,6 +553,7 @@ GameObject:
- component: {fileID: 8643326269112809739} - component: {fileID: 8643326269112809739}
- component: {fileID: 80164591121225352} - component: {fileID: 80164591121225352}
- component: {fileID: 5761587338744970414} - component: {fileID: 5761587338744970414}
- component: {fileID: -1920823489099653188}
m_Layer: 0 m_Layer: 0
m_Name: NPC m_Name: NPC
m_TagString: Untagged m_TagString: Untagged
...@@ -717,7 +718,7 @@ MonoBehaviour: ...@@ -717,7 +718,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 2566835037 GlobalObjectIdHash: 2996614975
InScenePlacedSourceGlobalObjectIdHash: 0 InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0 DeferredDespawnTick: 0
Ownership: 1 Ownership: 1
...@@ -746,7 +747,6 @@ MonoBehaviour: ...@@ -746,7 +747,6 @@ MonoBehaviour:
_score: _score:
m_InternalValue: 0 m_InternalValue: 0
isNPC: 1 isNPC: 1
_id: 0
_NPCsId: 0 _NPCsId: 0
--- !u!114 &4343223469952472967 --- !u!114 &4343223469952472967
MonoBehaviour: MonoBehaviour:
...@@ -850,6 +850,56 @@ MonoBehaviour: ...@@ -850,6 +850,56 @@ MonoBehaviour:
Synchronize: 1 Synchronize: 1
ParameterType: 9 ParameterType: 9
AnimatorParametersExpanded: 0 AnimatorParametersExpanded: 0
--- !u!114 &-1920823489099653188
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6869359625592689313}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5d7d6b6aa5a393e40a69d8bb4d05b43e, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayerDetails
ShowTopMostFoldoutHeaderGroup: 1
PlayerName:
m_InternalValue:
utf8LengthInBytes: 4
bytes:
offset0000:
byte0000: 78
byte0001: 117
byte0002: 108
byte0003: 108
byte0004: 0
byte0005: 0
byte0006: 0
byte0007: 0
byte0008: 0
byte0009: 0
byte0010: 0
byte0011: 0
byte0012: 0
byte0013: 0
byte0014: 0
byte0015: 0
byte0016: 0
byte0017: 0
byte0018: 0
byte0019: 0
byte0020: 0
byte0021: 0
byte0022: 0
byte0023: 0
byte0024: 0
byte0025: 0
byte0026: 0
byte0027: 0
byte0028: 0
byte0029: 0
nameText: {fileID: 7462257593087947900}
avatar:
--- !u!1001 &97846783079897831 --- !u!1001 &97846783079897831
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -2160,6 +2160,7 @@ MonoBehaviour: ...@@ -2160,6 +2160,7 @@ MonoBehaviour:
ShowTopMostFoldoutHeaderGroup: 1 ShowTopMostFoldoutHeaderGroup: 1
leaderboardParent: {fileID: 914376416} leaderboardParent: {fileID: 914376416}
leaderboardPrefab: {fileID: 3710372465793025137, guid: f37cdc862a6ad5640b311651b5352c81, type: 3} leaderboardPrefab: {fileID: 3710372465793025137, guid: f37cdc862a6ad5640b311651b5352c81, type: 3}
approvRequest: {fileID: 0}
--- !u!114 &803451463 --- !u!114 &803451463
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2185,84 +2186,6 @@ MonoBehaviour: ...@@ -2185,84 +2186,6 @@ MonoBehaviour:
AutoObjectParentSync: 1 AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1 SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0 AllowOwnerToParent: 0
--- !u!1001 &808220198
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1120066095}
m_Modifications:
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalPosition.y
value: 0.98
objectReference: {fileID: 0}
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalPosition.z
value: 7.34
objectReference: {fileID: 0}
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9815522
objectReference: {fileID: 0}
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalRotation.y
value: -0.19119437
objectReference: {fileID: 0}
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -22.045
objectReference: {fileID: 0}
- target: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6533416622245416413, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: GlobalObjectIdHash
value: 4199980813
objectReference: {fileID: 0}
- target: {fileID: 6533416622245416413, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: SceneMigrationSynchronization
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6533416622245416413, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: InScenePlacedSourceGlobalObjectIdHash
value: 2996614975
objectReference: {fileID: 0}
- target: {fileID: 6869359625592689313, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_Name
value: NPC
objectReference: {fileID: 0}
- target: {fileID: 6869359625592689313, guid: 29c311971269db94990ae48b1f666293, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 29c311971269db94990ae48b1f666293, type: 3}
--- !u!4 &808220199 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5928671268030453073, guid: 29c311971269db94990ae48b1f666293, type: 3}
m_PrefabInstance: {fileID: 808220198}
m_PrefabAsset: {fileID: 0}
--- !u!1 &825301023 --- !u!1 &825301023
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2376,7 +2299,9 @@ MonoBehaviour: ...@@ -2376,7 +2299,9 @@ MonoBehaviour:
maxPlayer: 0 maxPlayer: 0
gameManagerScript: {fileID: 764357412} gameManagerScript: {fileID: 764357412}
fadeScript: {fileID: 1270500663} fadeScript: {fileID: 1270500663}
approvRequest: {fileID: 0} playerPrefab: {fileID: -5192139548446471021, guid: 5922d3cf9c6f4784f8277e3d39518356, type: 3}
npcPrefab: {fileID: 6533416622245416413, guid: 29c311971269db94990ae48b1f666293, type: 3}
npcParent: {fileID: 1120066095}
--- !u!114 &911744692 --- !u!114 &911744692
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2966,6 +2891,7 @@ GameObject: ...@@ -2966,6 +2891,7 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 1120066095} - component: {fileID: 1120066095}
- component: {fileID: 1120066096}
m_Layer: 0 m_Layer: 0
m_Name: NPCs m_Name: NPCs
m_TagString: Untagged m_TagString: Untagged
...@@ -2985,10 +2911,34 @@ Transform: ...@@ -2985,10 +2911,34 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children: []
- {fileID: 808220199}
m_Father: {fileID: 1891997311} m_Father: {fileID: 1891997311}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1120066096
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1120066094}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 3619114659
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 0
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!1001 &1125776865 --- !u!1001 &1125776865
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
This source diff could not be displayed because it is too large. You can view the blob instead.
fileFormatVersion: 2 fileFormatVersion: 2
guid: 352bf19a87eb5f84da505d6b76a39310 guid: 3e56ca6796df8164c946c1e398109b90
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
...@@ -474,7 +474,7 @@ RectTransform: ...@@ -474,7 +474,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 12, y: -466} m_AnchoredPosition: {x: 12, y: -403.72998}
m_SizeDelta: {x: 94.286, y: 20} m_SizeDelta: {x: 94.286, y: 20}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &43093800 --- !u!114 &43093800
...@@ -536,6 +536,164 @@ MonoBehaviour: ...@@ -536,6 +536,164 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
--- !u!1 &214093269
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 214093270}
- component: {fileID: 214093273}
- component: {fileID: 214093272}
- component: {fileID: 214093271}
m_Layer: 0
m_Name: Placeholder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &214093270
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 214093269}
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: 1086431315}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &214093271
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 214093269}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &214093272
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 214093269}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Player Name...
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 2150773298
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 14
m_fontSizeBase: 14
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 2
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 1
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &214093273
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 214093269}
m_CullTransparentMesh: 1
--- !u!1 &217638984 --- !u!1 &217638984
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -631,7 +789,7 @@ MonoBehaviour: ...@@ -631,7 +789,7 @@ MonoBehaviour:
m_StringArgument: m_StringArgument:
m_BoolArgument: 0 m_BoolArgument: 0
m_CallState: 2 m_CallState: 2
- m_Target: {fileID: 452102377} - m_Target: {fileID: 1271087649}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive m_MethodName: SetActive
m_Mode: 6 m_Mode: 6
...@@ -903,42 +1061,6 @@ CanvasRenderer: ...@@ -903,42 +1061,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 443397384} m_GameObject: {fileID: 443397384}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &452102377
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 452102378}
m_Layer: 0
m_Name: Choose
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &452102378
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 452102377}
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: 1051292478}
m_Father: {fileID: 729864244}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &483051879 --- !u!1 &483051879
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1213,6 +1335,111 @@ CanvasRenderer: ...@@ -1213,6 +1335,111 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 495042106} m_GameObject: {fileID: 495042106}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &523129908
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 523129910}
- component: {fileID: 523129912}
- component: {fileID: 523129911}
m_Layer: 0
m_Name: NetworkManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &523129910
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 523129908}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 20.85067, y: -2.5605, z: 10.27543}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &523129911
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 523129908}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6960e84d07fb87f47956e7a81d71c4e6, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Transports.UTP.UnityTransport
m_ProtocolType: 0
m_UseWebSockets: 1
m_UseEncryption: 0
m_MaxPacketQueueSize: 128
m_MaxPayloadSize: 6144
m_HeartbeatTimeoutMS: 500
m_ConnectTimeoutMS: 1000
m_MaxConnectAttempts: 60
m_DisconnectTimeoutMS: 30000
ConnectionData:
Address: 127.0.0.1
Port: 7777
ServerListenAddress: 127.0.0.1
ClientBindPort: 0
DebugSimulator:
PacketDelayMS: 0
PacketJitterMS: 0
PacketDropRate: 0
--- !u!114 &523129912
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 523129908}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 593a2fe42fa9d37498c96f9a383b6521, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkManager
NetworkManagerExpanded: 0
NetworkConfig:
ProtocolVersion: 0
NetworkTransport: {fileID: 523129911}
PlayerPrefab: {fileID: 0}
Prefabs:
NetworkPrefabsLists:
- {fileID: 11400000, guid: 5d8ee9d8b99a6e845a9710aafe141857, type: 2}
TickRate: 30
ClientConnectionBufferTimeout: 10
ConnectionApproval: 1
ConnectionData:
EnableTimeResync: 0
TimeResyncInterval: 30
EnsureNetworkVariableLengthSafety: 0
EnableSceneManagement: 1
ForceSamePrefabs: 1
RecycleNetworkIds: 1
NetworkIdRecycleDelay: 120
RpcHashSize: 0
LoadSceneTimeOut: 120
SpawnTimeout: 10
EnableNetworkLogs: 1
NetworkTopology: 0
UseCMBService: 0
AutoSpawnPlayerPrefabClientSide: 1
NetworkProfilingMetrics: 1
OldPrefabList: []
RunInBackground: 1
LogLevel: 1
--- !u!1 &535378790 --- !u!1 &535378790
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1613,7 +1840,7 @@ RectTransform: ...@@ -1613,7 +1840,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -600} m_AnchoredPosition: {x: 0, y: -537.73}
m_SizeDelta: {x: 336.579, y: 71.653076} m_SizeDelta: {x: 336.579, y: 71.653076}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &587614884 --- !u!114 &587614884
...@@ -1750,7 +1977,7 @@ MonoBehaviour: ...@@ -1750,7 +1977,7 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RectMask2D m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RectMask2D
m_Padding: {x: -8, y: -5, z: -8, w: -5} m_Padding: {x: -8, y: -5, z: -8, w: -5}
m_Softness: {x: 0, y: 0} m_Softness: {x: 0, y: 0}
--- !u!1 &653759269 --- !u!1 &606725109
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -1758,58 +1985,203 @@ GameObject: ...@@ -1758,58 +1985,203 @@ GameObject:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 653759270} - component: {fileID: 606725110}
m_Layer: 5 - component: {fileID: 606725113}
m_Name: Lobby List Panel - component: {fileID: 606725112}
- component: {fileID: 606725111}
m_Layer: 0
m_Name: Join Button
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!224 &653759270 --- !u!224 &606725110
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 653759269} m_GameObject: {fileID: 606725109}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1512563944} - {fileID: 2052506429}
m_Father: {fileID: 729864244} m_Father: {fileID: 1271087650}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: -606}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 336.579, y: 71.653076}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 1}
--- !u!1 &688424095 --- !u!114 &606725111
GameObject: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 m_GameObject: {fileID: 606725109}
m_Component: m_Enabled: 1
- component: {fileID: 688424096} m_EditorHideFlags: 0
- component: {fileID: 688424099} m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
- component: {fileID: 688424098} m_Name:
- component: {fileID: 688424097} m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
m_Layer: 5 m_Navigation:
m_Name: Scroll View m_Mode: 3
m_TagString: Untagged m_WrapAround: 0
m_Icon: {fileID: 0} m_SelectOnUp: {fileID: 0}
m_NavMeshLayer: 0 m_SelectOnDown: {fileID: 0}
m_StaticEditorFlags: 0 m_SelectOnLeft: {fileID: 0}
m_IsActive: 1 m_SelectOnRight: {fileID: 0}
--- !u!224 &688424096 m_Transition: 1
RectTransform: m_Colors:
m_ObjectHideFlags: 0 m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_CorrespondingSourceObject: {fileID: 0} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PrefabInstance: {fileID: 0} m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 606725112}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1271087649}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
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: 653759269}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 1
m_CallState: 2
--- !u!114 &606725112
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 606725109}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &606725113
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 606725109}
m_CullTransparentMesh: 1
--- !u!1 &653759269
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 653759270}
m_Layer: 5
m_Name: Lobby List Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &653759270
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 653759269}
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: 1512563944}
m_Father: {fileID: 729864244}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &688424095
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 688424096}
- component: {fileID: 688424099}
- component: {fileID: 688424098}
- component: {fileID: 688424097}
m_Layer: 5
m_Name: Scroll View
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &688424096
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 688424095} m_GameObject: {fileID: 688424095}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
...@@ -2080,7 +2452,8 @@ MonoBehaviour: ...@@ -2080,7 +2452,8 @@ MonoBehaviour:
lobbyNameInput: {fileID: 1977959165} lobbyNameInput: {fileID: 1977959165}
lobbyPriveteToggle: {fileID: 43093800} lobbyPriveteToggle: {fileID: 43093800}
CreateLobbyButton: {fileID: 587614884} CreateLobbyButton: {fileID: 587614884}
--- !u!1 &725974050 maxPlayers: 4
--- !u!1 &723310068
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -2088,138 +2461,271 @@ GameObject: ...@@ -2088,138 +2461,271 @@ GameObject:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 725974051} - component: {fileID: 723310069}
- component: {fileID: 725974052} - component: {fileID: 723310072}
- component: {fileID: 723310071}
- component: {fileID: 723310070}
m_Layer: 0 m_Layer: 0
m_Name: _ChangeSceneManager m_Name: Player Name
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!4 &725974051 --- !u!224 &723310069
Transform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 725974050} m_GameObject: {fileID: 723310068}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 3, y: 3, z: 3}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 1
m_Children: [] m_Children:
m_Father: {fileID: 2036297602} - {fileID: 1086431315}
m_Father: {fileID: 1271087650}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &725974052 m_AnchorMin: {x: 0.5, y: 1}
MonoBehaviour: m_AnchorMax: {x: 0.5, y: 1}
m_ObjectHideFlags: 0 m_AnchoredPosition: {x: 0, y: -373.20996}
m_CorrespondingSourceObject: {fileID: 0} m_SizeDelta: {x: 160, y: 30}
m_PrefabInstance: {fileID: 0} m_Pivot: {x: 0.5, y: 1}
m_PrefabAsset: {fileID: 0} --- !u!114 &723310070
m_GameObject: {fileID: 725974050}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c574610257016cb4ea3bcbc2fd758e50, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::ChangeSceneManager
transitionSettings: {fileID: 11400000, guid: 057babd6f13132c449650d99e3c4e99c, type: 2}
--- !u!1 &729864240
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 729864244}
- component: {fileID: 729864243}
- component: {fileID: 729864242}
- component: {fileID: 729864241}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &729864241
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 729864240}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &729864242
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 729864240} m_GameObject: {fileID: 723310068}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TMP_InputField
m_UiScaleMode: 1 m_Navigation:
m_ReferencePixelsPerUnit: 100 m_Mode: 3
m_ScaleFactor: 1 m_WrapAround: 0
m_ReferenceResolution: {x: 1920, y: 1080} m_SelectOnUp: {fileID: 0}
m_ScreenMatchMode: 0 m_SelectOnDown: {fileID: 0}
m_MatchWidthOrHeight: 1 m_SelectOnLeft: {fileID: 0}
m_PhysicalUnit: 3 m_SelectOnRight: {fileID: 0}
m_FallbackScreenDPI: 96 m_Transition: 1
m_DefaultSpriteDPI: 96 m_Colors:
m_DynamicPixelsPerUnit: 1 m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_PresetInfoIsWorld: 0 m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
--- !u!223 &729864243 m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
Canvas: m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_ObjectHideFlags: 0 m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_CorrespondingSourceObject: {fileID: 0} m_ColorMultiplier: 1
m_PrefabInstance: {fileID: 0} m_FadeDuration: 0.1
m_PrefabAsset: {fileID: 0} m_SpriteState:
m_GameObject: {fileID: 729864240} m_HighlightedSprite: {fileID: 0}
m_Enabled: 1 m_PressedSprite: {fileID: 0}
serializedVersion: 3 m_SelectedSprite: {fileID: 0}
m_RenderMode: 0 m_DisabledSprite: {fileID: 0}
m_Camera: {fileID: 0} m_AnimationTriggers:
m_PlaneDistance: 100 m_NormalTrigger: Normal
m_PixelPerfect: 0 m_HighlightedTrigger: Highlighted
m_ReceivesEvents: 1 m_PressedTrigger: Pressed
m_OverrideSorting: 0 m_SelectedTrigger: Selected
m_OverridePixelPerfect: 0 m_DisabledTrigger: Disabled
m_SortingBucketNormalizedSize: 0 m_Interactable: 1
m_VertexColorAlwaysGammaSpace: 0 m_TargetGraphic: {fileID: 723310071}
m_AdditionalShaderChannelsFlag: 25 m_TextViewport: {fileID: 1086431315}
m_UpdateRectTransformForStandalone: 0 m_TextComponent: {fileID: 2073257357}
m_SortingLayerID: 0 m_Placeholder: {fileID: 214093272}
m_SortingOrder: 0 m_VerticalScrollbar: {fileID: 0}
m_TargetDisplay: 0 m_VerticalScrollbarEventHandler: {fileID: 0}
--- !u!224 &729864244 m_LayoutGroup: {fileID: 0}
RectTransform: m_ScrollSensitivity: 1
m_ObjectHideFlags: 0 m_ContentType: 0
m_CorrespondingSourceObject: {fileID: 0} m_InputType: 0
m_PrefabInstance: {fileID: 0} m_AsteriskChar: 42
m_PrefabAsset: {fileID: 0} m_KeyboardType: 0
m_LineType: 0
m_HideMobileInput: 0
m_HideSoftKeyboard: 0
m_CharacterValidation: 0
m_RegexValue:
m_GlobalPointSize: 14
m_CharacterLimit: 0
m_OnEndEdit:
m_PersistentCalls:
m_Calls: []
m_OnSubmit:
m_PersistentCalls:
m_Calls: []
m_OnSelect:
m_PersistentCalls:
m_Calls: []
m_OnDeselect:
m_PersistentCalls:
m_Calls: []
m_OnTextSelection:
m_PersistentCalls:
m_Calls: []
m_OnEndTextSelection:
m_PersistentCalls:
m_Calls: []
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
m_OnTouchScreenKeyboardStatusChanged:
m_PersistentCalls:
m_Calls: []
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_CustomCaretColor: 0
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
m_Text:
m_CaretBlinkRate: 0.85
m_CaretWidth: 1
m_ReadOnly: 0
m_RichText: 1
m_GlobalFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_OnFocusSelectAll: 1
m_ResetOnDeActivation: 1
m_KeepTextSelectionVisible: 0
m_RestoreOriginalTextOnEscape: 1
m_isRichTextEditingAllowed: 0
m_LineLimit: 0
isAlert: 0
m_InputValidator: {fileID: 0}
m_ShouldActivateOnSelect: 1
--- !u!114 &723310071
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 723310068}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &723310072
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 723310068}
m_CullTransparentMesh: 1
--- !u!1 &729864240
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 729864244}
- component: {fileID: 729864243}
- component: {fileID: 729864242}
- component: {fileID: 729864241}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &729864241
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 729864240}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &729864242
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 729864240}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 1
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &729864243
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 729864240}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &729864244
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 729864240} m_GameObject: {fileID: 729864240}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 452102378} - {fileID: 1271087650}
- {fileID: 1059994834} - {fileID: 1059994834}
- {fileID: 1466075813} - {fileID: 1466075813}
- {fileID: 653759270} - {fileID: 653759270}
...@@ -2673,7 +3179,7 @@ CanvasRenderer: ...@@ -2673,7 +3179,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 919876413} m_GameObject: {fileID: 919876413}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &1051292477 --- !u!1 &1059994833
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -2681,183 +3187,84 @@ GameObject: ...@@ -2681,183 +3187,84 @@ GameObject:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 1051292478} - component: {fileID: 1059994834}
- component: {fileID: 1051292481}
- component: {fileID: 1051292480}
- component: {fileID: 1051292479}
m_Layer: 0 m_Layer: 0
m_Name: Join Room Button m_Name: Create Lobby Panel
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &1051292478 --- !u!224 &1059994834
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1051292477} m_GameObject: {fileID: 1059994833}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1829343925} - {fileID: 1977959164}
m_Father: {fileID: 452102378} - {fileID: 43093799}
- {fileID: 587614883}
- {fileID: 1486797468}
m_Father: {fileID: 729864244}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 336.579, y: 71.653076} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1051292479 --- !u!1 &1076056868
MonoBehaviour: GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1051292477}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1051292480}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 452102377}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
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: 653759269}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 1
m_CallState: 2
--- !u!114 &1051292480
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1051292477}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1051292481
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1051292477}
m_CullTransparentMesh: 1
--- !u!1 &1059994833
GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 1059994834} - component: {fileID: 1076056869}
- component: {fileID: 1076056870}
m_Layer: 0 m_Layer: 0
m_Name: Create Lobby Panel m_Name: _AppInit
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!224 &1059994834 --- !u!4 &1076056869
RectTransform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1059994833} m_GameObject: {fileID: 1076056868}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children: []
- {fileID: 1977959164} m_Father: {fileID: 2036297602}
- {fileID: 43093799}
- {fileID: 587614883}
- {fileID: 1486797468}
m_Father: {fileID: 729864244}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} --- !u!114 &1076056870
m_AnchorMax: {x: 1, y: 1} MonoBehaviour:
m_AnchoredPosition: {x: 0, y: 0} m_ObjectHideFlags: 0
m_SizeDelta: {x: 0, y: 0} m_CorrespondingSourceObject: {fileID: 0}
m_Pivot: {x: 0.5, y: 0.5} m_PrefabInstance: {fileID: 0}
--- !u!1 &1076056868 m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1076056868}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31766047a0063dc438f31d0b3db24006, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::AppInit
playerName: {fileID: 723310070}
joinButton: {fileID: 606725111}
--- !u!1 &1086431314
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -2865,42 +3272,50 @@ GameObject: ...@@ -2865,42 +3272,50 @@ GameObject:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 1076056869} - component: {fileID: 1086431315}
- component: {fileID: 1076056870} - component: {fileID: 1086431316}
m_Layer: 0 m_Layer: 0
m_Name: _AppInit m_Name: Text Area
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!4 &1076056869 --- !u!224 &1086431315
Transform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1076056868} m_GameObject: {fileID: 1086431314}
serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children:
m_Father: {fileID: 2036297602} - {fileID: 214093270}
- {fileID: 2073257356}
m_Father: {fileID: 723310069}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1076056870 m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.5}
m_SizeDelta: {x: -20, y: -13}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1086431316
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1076056868} m_GameObject: {fileID: 1086431314}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31766047a0063dc438f31d0b3db24006, type: 3} m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::AppInit m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RectMask2D
m_Padding: {x: -8, y: -5, z: -8, w: -5}
m_Softness: {x: 0, y: 0}
--- !u!1 &1093410165 --- !u!1 &1093410165
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -3503,6 +3918,43 @@ MonoBehaviour: ...@@ -3503,6 +3918,43 @@ MonoBehaviour:
lobbyParent: {fileID: 359922033} lobbyParent: {fileID: 359922033}
lobbyPrefab: {fileID: 949025675257028705, guid: 13945ac71fb987c4b852f9da18082e90, type: 3} lobbyPrefab: {fileID: 949025675257028705, guid: 13945ac71fb987c4b852f9da18082e90, type: 3}
refreshButton: {fileID: 33827189} refreshButton: {fileID: 33827189}
--- !u!1 &1271087649
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1271087650}
m_Layer: 0
m_Name: Player Name
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1271087650
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1271087649}
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: 723310069}
- {fileID: 606725110}
m_Father: {fileID: 729864244}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1308022793 --- !u!1 &1308022793
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -4347,7 +4799,7 @@ RectTransform: ...@@ -4347,7 +4799,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0} m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 240.19284} m_AnchoredPosition: {x: 0, y: 302.46286}
m_SizeDelta: {x: 336.579, y: 71.653076} m_SizeDelta: {x: 336.579, y: 71.653076}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1486797469 --- !u!114 &1486797469
...@@ -4829,7 +5281,7 @@ Transform: ...@@ -4829,7 +5281,7 @@ Transform:
- {fileID: 729864244} - {fileID: 729864244}
m_Father: {fileID: 1538357722} m_Father: {fileID: 1538357722}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1829343924 --- !u!1 &1835655403
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
...@@ -4837,235 +5289,98 @@ GameObject: ...@@ -4837,235 +5289,98 @@ GameObject:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 1829343925} - component: {fileID: 1835655406}
- component: {fileID: 1829343927} - component: {fileID: 1835655405}
- component: {fileID: 1829343926} - component: {fileID: 1835655404}
- component: {fileID: 1835655407}
m_Layer: 0 m_Layer: 0
m_Name: Text (TMP) m_Name: Main Camera
m_TagString: Untagged m_TagString: MainCamera
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!224 &1829343925 --- !u!81 &1835655404
RectTransform: AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1835655403}
m_Enabled: 1
--- !u!20 &1835655405
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1835655403}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.7056604, g: 0.7056604, b: 0.7056604, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1835655406
Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1829343924} m_GameObject: {fileID: 1835655403}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 1051292478} m_Father: {fileID: 841234135}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} --- !u!114 &1835655407
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1829343926
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1829343924} m_GameObject: {fileID: 1835655403}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Join Room
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 41.55
m_fontSizeBase: 41.55
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &1829343927
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1829343924}
m_CullTransparentMesh: 1
--- !u!1 &1835655403
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1835655406}
- component: {fileID: 1835655405}
- component: {fileID: 1835655404}
- component: {fileID: 1835655407}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1835655404
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1835655403}
m_Enabled: 1
--- !u!20 &1835655405
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1835655403}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.7056604, g: 0.7056604, b: 0.7056604, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1835655406
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1835655403}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 841234135}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1835655407
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1835655403}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
...@@ -5414,7 +5729,7 @@ RectTransform: ...@@ -5414,7 +5729,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -304.27} m_AnchoredPosition: {x: 0, y: -242}
m_SizeDelta: {x: 160, y: 30} m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1977959165 --- !u!114 &1977959165
...@@ -5587,11 +5902,328 @@ Transform: ...@@ -5587,11 +5902,328 @@ Transform:
m_Children: m_Children:
- {fileID: 721273935} - {fileID: 721273935}
- {fileID: 535378791} - {fileID: 535378791}
- {fileID: 725974051}
- {fileID: 1260324184}
- {fileID: 1076056869} - {fileID: 1076056869}
- {fileID: 1260324184}
m_Father: {fileID: 1538357722} m_Father: {fileID: 1538357722}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2052506428
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2052506429}
- component: {fileID: 2052506431}
- component: {fileID: 2052506430}
m_Layer: 0
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2052506429
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2052506428}
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: 606725110}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2052506430
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2052506428}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Join
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 41.55
m_fontSizeBase: 41.55
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &2052506431
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2052506428}
m_CullTransparentMesh: 1
--- !u!1 &2073257355
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2073257356}
- component: {fileID: 2073257358}
- component: {fileID: 2073257357}
m_Layer: 0
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2073257356
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2073257355}
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: 1086431315}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2073257357
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2073257355}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u200B"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 14
m_fontSizeBase: 14
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 3
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 1
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &2073257358
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2073257355}
m_CullTransparentMesh: 1
--- !u!1 &2079775946
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2079775948}
- component: {fileID: 2079775947}
m_Layer: 0
m_Name: ApprovRequest
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2079775947
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2079775946}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: efb908ecd773e2e49b0fb30f532e07f9, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::ApprovRequest
--- !u!4 &2079775948
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2079775946}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 978.1405, y: 689.6752, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2146901869 --- !u!1 &2146901869
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -5789,3 +6421,5 @@ SceneRoots: ...@@ -5789,3 +6421,5 @@ SceneRoots:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_Roots: m_Roots:
- {fileID: 1538357722} - {fileID: 1538357722}
- {fileID: 523129910}
- {fileID: 2079775948}
This source diff could not be displayed because it is too large. You can view the blob instead.
using Unity.Services.Authentication; using TMPro;
using Unity.Services.Core; using Unity.Services.Core;
using UnityEngine; using UnityEngine;
using UnityEngine.UI;
public class AppInit : MonoBehaviour public class AppInit : MonoBehaviour
{ {
[SerializeField] TMP_InputField playerName;
[SerializeField] Button joinButton;
private async void Start() private async void Start()
{ {
Application.targetFrameRate = 60; Application.targetFrameRate = 60;
await UnityServices.InitializeAsync(); await UnityServices.InitializeAsync();
joinButton.onClick.AddListener(Join);
}
private async void Join()
{
FadeWithText.Instance.ShowMessage("جاري التحميل...", false);
await AuthenticationRequest.StartAuth(); await AuthenticationRequest.StartAuth();
FadeWithText.Instance.FadeOut();
string name;
if (!string.IsNullOrEmpty(playerName.text))
{
name = playerName.text;
}
else
name = "Player#" + Random.Range(1000, 9999);
PlayerPrefs.SetString("PlayerName", name);
} }
} }
using EasyTransition;
using Unity.VectorGraphics;
using UnityEngine;
using UnityEngine.SceneManagement;
public class ChangeSceneManager : MonoBehaviour
{
public static ChangeSceneManager Instance { get; private set; }
[SerializeField] TransitionSettings transitionSettings;
private void Awake()
{
if (Instance == null)
Instance = this;
else
Destroy(this);
}
void Change(string sceneName)
{
// TransitionManager.Instance().Transition(sceneName, transitionSettings,0);
SceneManager.LoadScene(sceneName);
}
void Change(int sceneIndex)
{
// TransitionManager.Instance().Transition(sceneName, transitionSettings,0);
SceneManager.LoadScene(sceneIndex);
}
public void ChangeToLobbyScene()
{
Change("LobbyScene");
}
public void ChangeToMainmenuScene()
{
Change("MainMenu");
}
}
...@@ -5,13 +5,16 @@ using UnityEngine; ...@@ -5,13 +5,16 @@ using UnityEngine;
public class HandlePlayersConnection : NetworkBehaviour public class HandlePlayersConnection : NetworkBehaviour
{ {
[SerializeField] int maxPlayer; [SerializeField] int maxPlayer;
[SerializeField] GameManager gameManagerScript; [SerializeField] GameManager gameManagerScript;
[SerializeField] Fade fadeScript; [SerializeField] Fade fadeScript;
[SerializeField] ApprovRequest approvRequest; [SerializeField] NetworkObject playerPrefab;
[SerializeField] NetworkObject npcPrefab;
[SerializeField] Transform npcParent;
ApprovRequest _approvRequest;
public override void OnNetworkSpawn() public override void OnNetworkSpawn()
{ {
approvRequest = ApprovRequest.Instance; _approvRequest = ApprovRequest.Instance;
StartCoroutine(SpawnPlayer()); StartCoroutine(SpawnPlayer());
} }
...@@ -21,20 +24,35 @@ public class HandlePlayersConnection : NetworkBehaviour ...@@ -21,20 +24,35 @@ public class HandlePlayersConnection : NetworkBehaviour
yield return new WaitForSeconds(3); yield return new WaitForSeconds(3);
if (IsServer) if (IsServer)
{ {
foreach (var item in approvRequest.clientData) foreach (var _player in _approvRequest.clientData)
{ {
PlayerNetworkData playerData = new PlayerNetworkData PlayerNetworkData playerData = new PlayerNetworkData
{ {
PlayerAuthId = item.Value.AuthId, PlayerAuthId = _player.Value.AuthId,
playerName = item.Value.playerName, playerName = _player.Value.playerName,
PlayerAvatar = int.Parse(item.Value.playerAvatar), PlayerAvatar = _player.Value.playerAvatar,
}; };
NetworkObject player = Instantiate(playerPrefab);
NetworkObject player = Instantiate(approvRequest.playerPrefab); player.SpawnAsPlayerObject(_player.Key);
player.SpawnAsPlayerObject(item.Key);
player.GetComponent<PlayerDetails>().InitPlayerData(playerData); player.GetComponent<PlayerDetails>().InitPlayerData(playerData);
} }
foreach (var npc in _approvRequest.npctData)
{
PlayerNetworkData playerData = new PlayerNetworkData
{
PlayerAuthId = npc.Value.clientId.ToString(),
playerName = npc.Value.playerName,
PlayerAvatar = npc.Value.playerAvatar,
};
NetworkObject npcObject = Instantiate(npcPrefab,npcParent.transform);
npcObject.Spawn();
npcObject.GetComponent<PlayerDetails>().InitPlayerData(playerData);
}
} }
gameManagerScript.StartMatch(); gameManagerScript.StartMatch();
fadeScript.FadeOut(); fadeScript.FadeOut();
} }
......
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using Unity.Netcode; using Unity.Netcode;
using Unity.Services.Authentication;
using Unity.Services.Lobbies.Models;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
public class ApprovRequest : MonoBehaviour public class ApprovRequest : MonoBehaviour
{ {
public static ApprovRequest Instance; public static ApprovRequest Instance;
public Dictionary<ulong, PlayerData> clientData { get; private set; } = new Dictionary<ulong, PlayerData>(); public Dictionary<ulong, PlayerData> clientData { get; private set; } = new Dictionary<ulong, PlayerData>();
[field: SerializeField] public NetworkObject playerPrefab { get; private set; } public Dictionary<ulong, PlayerLobbyData> npctData { get; private set; } = new Dictionary<ulong, PlayerLobbyData>();
NetworkManager _networkManager; NetworkManager _networkManager;
private void Awake() private void Awake()
{ {
if (Instance == null) if (Instance == null)
...@@ -27,16 +27,67 @@ public class ApprovRequest : MonoBehaviour ...@@ -27,16 +27,67 @@ public class ApprovRequest : MonoBehaviour
{ {
_networkManager = NetworkManager.Singleton; _networkManager = NetworkManager.Singleton;
_networkManager.ConnectionApprovalCallback = ApprovConnection; _networkManager.ConnectionApprovalCallback = ApprovConnection;
_networkManager.OnServerStarted += OnServerReady;
}
private void OnServerReady()
{
_networkManager.OnClientDisconnectCallback += OnClientDisconnect;
} }
private void OnClientDisconnect(ulong clientId)
{
if (clientData.ContainsKey(clientId))
{
clientData.Remove(clientId);
}
}
private void ApprovConnection(NetworkManager.ConnectionApprovalRequest request, NetworkManager.ConnectionApprovalResponse response) private void ApprovConnection(NetworkManager.ConnectionApprovalRequest request, NetworkManager.ConnectionApprovalResponse response)
{ {
string bytes = Encoding.UTF8.GetString(request.Payload); string bytes = Encoding.UTF8.GetString(request.Payload);
PlayerData playerData = JsonUtility.FromJson<PlayerData>(bytes); PlayerData playerData = JsonUtility.FromJson<PlayerData>(bytes);
clientData[request.ClientNetworkId] = playerData; if (!clientData.ContainsKey(request.ClientNetworkId))
{
clientData[request.ClientNetworkId] = playerData;
}
response.Approved = true; response.Approved = true;
response.CreatePlayerObject = false; response.CreatePlayerObject = false;
}
public void CreatePlayerDataObject()
{
string AuthId = AuthenticationService.Instance.PlayerId;
Player player = LobbyRequest._currentLobby.Players.Find(p => p.Id == AuthId);
PlayerData playerData = new PlayerData
{
AuthId = AuthId,
playerName = PlayerPrefs.GetString("PlayerName"),
playerAvatar = Random.Range(1, 4),
};
AddDataToConnection(playerData);
} }
} public void AddDataToConnection(PlayerData playerData)
{
string data = JsonUtility.ToJson(playerData);
byte[] dataToByte = Encoding.UTF8.GetBytes(data);
_networkManager.NetworkConfig.ConnectionData = dataToByte;
}
public async void LeavePlayer()
{
if (_networkManager.IsServer)
{
_networkManager.SceneManager.LoadScene("MainMenu", LoadSceneMode.Single);
await LobbyRequest.RemoveLobby();
Destroy(LobbyHeart.Instance.gameObject);
clientData.Clear();
}
else
{
await LobbyRequest.RemovePlayerFromLobby(AuthenticationService.Instance.PlayerId);
SceneManager.LoadScene(0);
}
_networkManager.Shutdown();
}
}
\ No newline at end of file
...@@ -5,5 +5,5 @@ public class PlayerData ...@@ -5,5 +5,5 @@ public class PlayerData
{ {
public string AuthId; public string AuthId;
public string playerName; public string playerName;
public string playerAvatar; public int playerAvatar;
} }
using TMPro; using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using TMPro;
using Unity.Netcode;
using Unity.Services.Lobbies; using Unity.Services.Lobbies;
using Unity.Services.Lobbies.Models;
using Unity.VisualScripting;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using System.Collections.Generic;
using Unity.Services.Lobbies.Models;
using Unity.Netcode;
using System;
public class CreateLobby : MonoBehaviour public class CreateLobby : MonoBehaviour
{ {
[SerializeField] TMP_InputField lobbyNameInput; [SerializeField] TMP_InputField lobbyNameInput;
[SerializeField] Toggle lobbyPriveteToggle; [SerializeField] Toggle lobbyPriveteToggle;
[SerializeField] Button CreateLobbyButton; [SerializeField] Button CreateLobbyButton;
[SerializeField] int maxPlayers;
FadeWithText _fadeWithText; FadeWithText _fadeWithText;
private void Start() private void Start()
{ {
CreateLobbyButton.onClick.AddListener(Create); CreateLobbyButton.onClick.AddListener(CreateGame);
_fadeWithText = FadeWithText.Instance; _fadeWithText = FadeWithText.Instance;
}
async void CreateGame()
{
CreateLobbyButton.interactable = false;
bool isCreated = await CreateLobbyAndRelay();
CreateLobbyButton.interactable = true;
if (isCreated)
{
_fadeWithText.ShowMessage("جاري دخول الغرفة...", false);
NetworkManager networkManager = NetworkManager.Singleton;
RelayRequest.CreateAllocation(networkManager);
ApprovRequest approvRequest = ApprovRequest.Instance;
approvRequest.CreatePlayerDataObject();
networkManager.StartHost();
networkManager.SceneManager.LoadScene("LobbyScene", UnityEngine.SceneManagement.LoadSceneMode.Single);
}
} }
private async void Create()
private async Task<bool> CreateLobbyAndRelay()
{ {
if (!string.IsNullOrEmpty(lobbyNameInput.text)) if (string.IsNullOrWhiteSpace(lobbyNameInput.text))
{ {
CreateLobbyButton.interactable = false;
_fadeWithText.ShowMessage("جاري التحميل...", false);
bool createLobby = await LobbyRequest.Create(lobbyNameInput.text, 4, LobbyOptions());
if (createLobby)
{
ChangeSceneManager.Instance.ChangeToLobbyScene();
}
else
{
CreateLobbyButton.interactable = true;
FadeWithText.Instance.ShowMessage("حدث خطأ", true);
}
}
else
_fadeWithText.ShowMessage("من فضلك ادخل اسم الغرفة", true); _fadeWithText.ShowMessage("من فضلك ادخل اسم الغرفة", true);
return false;
}
_fadeWithText.ShowMessage("جاري إنشاء الغرفة...", false);
string relayCode = await RelayRequest.CreateLobbyCode(maxPlayers);
bool lobbyCreated = await LobbyRequest.Create(lobbyNameInput.text, maxPlayers, LobbyOptions(relayCode));
if (!lobbyCreated)
{
FadeWithText.Instance.ShowMessage("حدث خطأ أثناء إنشاء الغرفة", true);
return false;
}
return true;
} }
CreateLobbyOptions LobbyOptions()
private CreateLobbyOptions LobbyOptions(string relayCode)
{ {
CreateLobbyOptions lobbyOptions = new CreateLobbyOptions(); CreateLobbyOptions lobbyOptions = new CreateLobbyOptions();
lobbyOptions.IsPrivate = lobbyPriveteToggle.isOn; lobbyOptions.IsPrivate = lobbyPriveteToggle.isOn;
lobbyOptions.Data = new Dictionary<string, DataObject> lobbyOptions.Data = new Dictionary<string, DataObject>
{ {
{"AllocationCode",new DataObject(visibility: DataObject.VisibilityOptions.Member,value:"") }, {"RelayCode",new DataObject(visibility: DataObject.VisibilityOptions.Public,value:relayCode) },
{"NPCsCount", new DataObject(visibility:DataObject.VisibilityOptions.Public,value:"0") }, {"NPCsCount", new DataObject(visibility:DataObject.VisibilityOptions.Public,value:"0") },
}; };
return lobbyOptions; return lobbyOptions;
......
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using TMPro; using TMPro;
using Unity.Netcode;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
public class JoinLobbyByCode : MonoBehaviour public class JoinLobbyByCode : MonoBehaviour
{ {
[SerializeField] TMP_InputField lobbyCodeInput; [SerializeField] TMP_InputField lobbyCodeInput;
[SerializeField] Button createLobbyButton; [SerializeField] Button createLobbyButton;
void Start() void Start()
{ {
createLobbyButton.onClick.AddListener(Join); createLobbyButton.onClick.AddListener(Join);
...@@ -18,20 +19,32 @@ public class JoinLobbyByCode : MonoBehaviour ...@@ -18,20 +19,32 @@ public class JoinLobbyByCode : MonoBehaviour
if (!string.IsNullOrEmpty(lobbyCodeInput.text)) if (!string.IsNullOrEmpty(lobbyCodeInput.text))
{ {
createLobbyButton.interactable = false; createLobbyButton.interactable = false;
FadeWithText.Instance.ShowMessage("جاري التحميل", false); FadeWithText.Instance.ShowMessage("جاري التحميل...", false);
bool join = await LobbyRequest.JoinLobbyByCode(lobbyCodeInput.text); string relayCode = await LobbyRequest.JoinLobbyByCode(lobbyCodeInput.text);
if (join) if (!string.IsNullOrEmpty(relayCode))
{ {
ChangeSceneManager.Instance.ChangeToLobbyScene(); NetworkManager networkManager = NetworkManager.Singleton;
FadeWithText.Instance.ShowMessage("جاري الدخول الي الغرفة...", false);
bool joinToServer = await RelayRequest.JoinAllocation(networkManager, relayCode);
if (joinToServer)
{
ApprovRequest.Instance.CreatePlayerDataObject();
networkManager.StartClient();
}
else
{
FadeWithText.Instance.ShowMessage("حدث خطأ أثناء الإنضمام الي الغرفة", true);
}
} }
else else
{ {
createLobbyButton.interactable = true;
FadeWithText.Instance.ShowMessage("الرقم غير صحيح", true); FadeWithText.Instance.ShowMessage("الرقم غير صحيح", true);
} }
} }
else else
FadeWithText.Instance.ShowMessage("من فضلك ادخل رقم الغرفة", true); FadeWithText.Instance.ShowMessage("من فضلك ادخل رقم الغرفة", true);
createLobbyButton.interactable = false;
} }
} }
using System; using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using TMPro; using TMPro;
using Unity.Netcode; using Unity.Netcode;
using Unity.Netcode.Transports.UTP;
using Unity.Networking.Transport.Relay;
using Unity.Services.Authentication;
using Unity.Services.Lobbies;
using Unity.Services.Lobbies.Models;
using Unity.Services.Relay;
using Unity.Services.Relay.Models;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
public class LobbyRoom : MonoBehaviour public class LobbyRoom : NetworkBehaviour
{ {
[SerializeField] PlayersInLobbyRoom[] playersSlot; [SerializeField] LobbySlot[] playersSlot;
[SerializeField] TextMeshProUGUI lobbyCode; [SerializeField] TextMeshProUGUI lobbyCode;
[SerializeField] Button startButton; [SerializeField] Button startButton;
[SerializeField] Button exitButton; [SerializeField] Button exitButton;
bool _isOwner; [field: SerializeField] NetworkList<PlayerLobbyData> playersData = new NetworkList<PlayerLobbyData>();
LobbyHeart _lobbyHeart;
ILobbyEvents _lobbyEvents;
int _currentNPCs; int _currentNPCs;
int _currentReadyPlayer; int _currentReadyPlayer;
void Start() [SerializeField] ApprovRequest _approvRequest;
{
_isOwner = LobbyRequest._currentLobby.HostId == AuthenticationService.Instance.PlayerId;
startButton.interactable = _isOwner;
exitButton.onClick.AddListener(LeaveLobby);
startButton.onClick.AddListener(CheckPlayerCount);
ShowLobbyCode();
_lobbyHeart = FindAnyObjectByType<LobbyHeart>();
RefreshLobby();
SubscribeToLobbyEvent();
NetworkManager.Singleton.OnClientConnectedCallback += OnClientConnected;
}
private void OnClientConnected(ulong clientId) private void Start()
{ {
startButton.onClick.AddListener(StartGameClientRpc);
if (NetworkManager.Singleton.ConnectedClients.Count == 2) exitButton.onClick.AddListener(LeaveLobby);
{
StartCoroutine(StartGameTimer());
}
} }
async void SubscribeToLobbyEvent() public override void OnNetworkSpawn()
{ {
LobbyEventCallbacks lobbyEventCallbacks = new LobbyEventCallbacks(); _approvRequest = ApprovRequest.Instance;
lobbyEventCallbacks.PlayerJoined += PlayerJoined;
lobbyEventCallbacks.PlayerLeft += PlayerLeft;
lobbyEventCallbacks.PlayerDataChanged += PlayerDataChanged;
lobbyEventCallbacks.DataChanged += DataChanged;
lobbyEventCallbacks.LobbyDeleted += LobbyDeleted;
_lobbyEvents = await LobbyService.Instance.SubscribeToLobbyEventsAsync(LobbyRequest._currentLobby.Id, lobbyEventCallbacks); lobbyCode.text = $"Room Code: {LobbyRequest._currentLobby.LobbyCode}";
}
private void LobbyDeleted() playersData.OnListChanged += UpdateList;
{
ChangeSceneManager.Instance.ChangeToMainmenuScene();
}
private void DataChanged(Dictionary<string, ChangedOrRemovedLobbyValue<DataObject>> obj) if (IsServer)
{
// RefreshLobby();
//RefreshNPCs();
if (!_isOwner)
{ {
if (!string.IsNullOrEmpty(obj["AllocationCode"].Value.Value)) NetworkManager.Singleton.OnClientConnectedCallback += OnClientConnected;
{ NetworkManager.Singleton.OnClientDisconnectCallback += OnClientDisConnected;
StartClient(obj["AllocationCode"].Value.Value);
Debug.Log("Start Client"); foreach (var client in NetworkManager.Singleton.ConnectedClientsIds)
{
OnClientConnected(client);
} }
} }
Debug.Log("DataChanged");
} }
public override void OnNetworkDespawn()
private void PlayerDataChanged(Dictionary<int, Dictionary<string, ChangedOrRemovedLobbyValue<PlayerDataObject>>> obj)
{ {
RefreshLobby(); playersData.OnListChanged -= UpdateList;
Debug.Log("PlayerDataChanged"); NetworkManager.Singleton.OnClientConnectedCallback -= OnClientConnected;
NetworkManager.Singleton.OnClientDisconnectCallback -= OnClientDisConnected;
} }
private void OnClientConnected(ulong clientId)
private void PlayerJoined(List<LobbyPlayerJoined> playersObj)
{ {
RefreshLobby(); if (_approvRequest.clientData.TryGetValue(clientId, out var data))
Debug.Log("PlayerJoined"); {
playersData.Add(new PlayerLobbyData
{
clientId = clientId,
playerName = data.playerName,
playerAvatar = data.playerAvatar,
isReady = false,
isNPC = false
});
}
} }
private void OnClientDisConnected(ulong clientId)
private void PlayerLeft(List<int> playerIndices)
{ {
RefreshLobby(); for (int i = 0; i < playersData.Count; i++)
Debug.Log("PlayerLeft"); {
if (playersData[i].clientId == clientId)
{
playersData.RemoveAt(i);
break;
}
}
} }
private void UpdateList(NetworkListEvent<PlayerLobbyData> newList)
private void RefreshNPCs()
{ {
try for (int i = 0; i < playersSlot.Length; i++)
{ {
int npcCount = 0; if (playersData.Count > i)
npcCount = int.Parse(LobbyRequest._currentLobby.Data["NPCsCount"].Value); {
playersSlot[i].AddData(playersData[i]);
}
_currentNPCs = npcCount; else
{
playersSlot[i].ClearData();
}
} }
catch (Exception ex)
if (IsServer)
{ {
Debug.LogError($"Error refreshing NPCs: {ex}"); startButton.interactable = CheckIfAllPlayerIsReady();
bool CheckIfAllReady = CheckIfAllPlayerIsReady();
ChangeButtonClientRpc(CheckIfAllReady);
} }
} }
private void ShowLobbyCode() [Rpc(SendTo.ClientsAndHost)]
void ChangeButtonClientRpc(bool CheckIfAllReady)
{ {
lobbyCode.text = $"Room Code: {PlayerPrefs.GetString("JoinCode")}"; startButton.GetComponent<Image>().color = CheckIfAllReady ? Color.green : Color.red;
} }
async void CheckPlayerCount()
{
Lobby lobby = await LobbyService.Instance.GetLobbyAsync(LobbyRequest._currentLobby.Id);
int isReadyCount = 0;
foreach (Player player in lobby.Players)
{
if (player.Data["IsReady"].Value == "True") isReadyCount++;
}
if (isReadyCount == 2)
{
await StartAllocate();
}
} private bool CheckIfAllPlayerIsReady()
async Task StartAllocate()
{ {
startButton.interactable = false; if (playersData.Count < 2) return false;
FadeWithText.Instance.ShowMessage("جاري التحميل...", false); foreach (var player in playersData)
string AllocationCode = await AllocationRequest.Create();
UpdateLobbyOptions updateLobbyOptions = new UpdateLobbyOptions()
{ {
IsLocked = true,
Data = new Dictionary<string, DataObject>
{
{"AllocationCode", new DataObject(visibility: DataObject.VisibilityOptions.Member, value: AllocationCode)},
}
};
await LobbyRequest.UpdateLobby(updateLobbyOptions);
if (_isOwner) if (!player.isReady) return false;
{
StartHost();
} }
return true;
} }
void StartHost()
{
string authId = AuthenticationService.Instance.PlayerId;
Player currentPlayer = LobbyRequest._currentLobby.Players.Find(p => p.Id == authId);
PlayerData playerData = new PlayerData
{
AuthId = authId,
playerName = currentPlayer.Data["Name"].Value,
playerAvatar = currentPlayer.Data["AvatarIndex"].Value,
};
RelayServerData relayServerData = AllocationUtils.ToRelayServerData(AllocationRequest._allocation, "wss");
UnityTransport unityTransport = NetworkManager.Singleton.GetComponent<UnityTransport>();
unityTransport.SetRelayServerData(relayServerData);
string data = JsonUtility.ToJson(playerData); private void LeaveLobby()
byte[] dataToByte = Encoding.UTF8.GetBytes(data);
NetworkManager.Singleton.NetworkConfig.ConnectionData = dataToByte;
NetworkManager.Singleton.StartHost();
}
async void StartClient(string code)
{ {
string authId = AuthenticationService.Instance.PlayerId; _approvRequest.LeavePlayer();
Player currentPlayer = LobbyRequest._currentLobby.Players.Find(p => p.Id == authId);
PlayerData playerData = new PlayerData
{
AuthId = authId,
playerName = currentPlayer.Data["Name"].Value,
playerAvatar = currentPlayer.Data["AvatarIndex"].Value,
};
JoinAllocation joinAllocation = await RelayService.Instance.JoinAllocationAsync(code);
RelayServerData relayServerData = AllocationUtils.ToRelayServerData(joinAllocation, "wss");
UnityTransport unityTransport = NetworkManager.Singleton.GetComponent<UnityTransport>();
unityTransport.SetRelayServerData(relayServerData);
string data = JsonUtility.ToJson(playerData);
byte[] dataToByte = Encoding.UTF8.GetBytes(data);
NetworkManager.Singleton.NetworkConfig.ConnectionData = dataToByte;
NetworkManager.Singleton.StartClient();
} }
public void IsButtonClicked(ulong clientId, bool isBusy)
IEnumerator StartGameTimer()
{ {
int timer = 4; if (!isBusy)
while (timer > 0)
{
timer--;
FadeWithText.Instance.ShowMessage(timer.ToString(), false);
yield return new WaitForSeconds(1);
}
FadeWithText.Instance.ShowMessage("جاري الدخول...", false);
yield return new WaitForSeconds(2);
if (NetworkManager.Singleton.IsServer)
{ {
NetworkManager.Singleton.SceneManager.LoadScene("Game", UnityEngine.SceneManagement.LoadSceneMode.Single); AddNpc();
} }
else
SetPlayerReadyServerRpc(clientId);
} }
private async void RefreshLobby()
{
try
{
var lobby = await LobbyService.Instance.GetLobbyAsync(LobbyRequest._currentLobby.Id);
ClearAllSlots();
foreach (var player in lobby.Players)
{
AddPlayerToSlot(player);
}
int npcCount = 0;
if (lobby.Data.ContainsKey("NPCsCount"))
{
npcCount = int.Parse(lobby.Data["NPCsCount"].Value);
}
foreach (PlayersInLobbyRoom slots in playersSlot)
{
slots.SetIsOwner(_isOwner);
}
AddNPCsToSlots(npcCount);
foreach (PlayersInLobbyRoom slots in playersSlot) void AddNpc()
{ {
slots.SetNPC(_isOwner); ulong NPCsId = (ulong)Random.Range(1000, 9999);
} playersData.Add(new PlayerLobbyData
}
catch (LobbyServiceException ex)
{
Debug.LogException(ex);
}
catch (Exception e)
{ {
Debug.LogException(e); clientId = NPCsId,
} playerName = "NPC#" + NPCsId,
playerAvatar = 4,
isReady = true,
isNPC = true,
});
} }
public void RemoveRpc(ulong slotId)
void ClearAllSlots()
{ {
foreach (PlayersInLobbyRoom slot in playersSlot) OnClientDisConnected(slotId);
{
slot.Clear();
}
} }
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
void AddPlayerToSlot(Player player) void SetPlayerReadyServerRpc(ulong clientId)
{ {
string playerName = player.Data["Name"].Value; for (int i = 0; i < playersData.Count; i++)
string avatarIndex = player.Data["AvatarIndex"].Value;
string playerId = player.Id;
string isReady = player.Data["IsReady"].Value;
foreach (PlayersInLobbyRoom slots in playersSlot)
{ {
if (!slots.isBusySlot) if (playersData[i].clientId == clientId)
{ {
slots.Init(playerName, avatarIndex, playerId, isReady); playersData[i] = new PlayerLobbyData
break; {
clientId = playersData[i].clientId,
playerName = playersData[i].playerName,
playerAvatar = playersData[i].playerAvatar,
isReady = !playersData[i].isReady,
isNPC = playersData[i].isNPC,
};
} }
} }
} }
void AddNPCsToSlots(int npcCount) [Rpc(SendTo.ClientsAndHost)]
private void StartGameClientRpc()
{ {
int addedNPCs = 0; FadeWithText.Instance.ShowMessage("جاري الدخول...", false);
foreach (PlayersInLobbyRoom slot in playersSlot) if (IsServer)
{ {
if (!slot.isBusySlot && addedNPCs < npcCount) for (int i = 0; i < playersData.Count; i++)
{ {
slot.InitializeAsNPC(); if (playersData[i].isNPC)
addedNPCs++; {
PlayerLobbyData npcData = new PlayerLobbyData
{
clientId = playersData[i].clientId,
playerName = playersData[i].playerName,
playerAvatar = playersData[i].playerAvatar,
};
_approvRequest.npctData.Add(playersData[i].clientId, npcData);
}
} }
DOVirtual.DelayedCall(2, () =>
{
NetworkManager.SceneManager.LoadScene("Game", UnityEngine.SceneManagement.LoadSceneMode.Single);
}).SetLink(gameObject);
} }
} }
private void LeaveLobby() }
{
CleanupLobby();
ChangeSceneManager.Instance.ChangeToMainmenuScene();
}
private void OnApplicationQuit()
{
CleanupLobby();
Debug.Log("OnApplicationQuit");
}
void CleanupLobby()
{
_lobbyEvents?.UnsubscribeAsync();
if (_isOwner)
{
Destroy(_lobbyHeart.gameObject);
LobbyRequest.RemoveLobby();
}
else
{
LobbyRequest.RemovePlayerFromLobby(AuthenticationService.Instance.PlayerId);
}
}
}
\ No newline at end of file
using System;
using Unity.Collections;
using Unity.Netcode;
public struct PlayerLobbyData : INetworkSerializable,IEquatable<PlayerLobbyData>
{
public ulong clientId;
public FixedString32Bytes playerName;
public int playerAvatar;
public bool isReady;
public bool isNPC;
public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter
{
serializer.SerializeValue(ref clientId);
serializer.SerializeValue(ref playerName);
serializer.SerializeValue(ref playerAvatar);
serializer.SerializeValue(ref isReady);
serializer.SerializeValue(ref isNPC);
}
public bool Equals(PlayerLobbyData other)
{
return other.clientId == clientId && other.playerName == playerName && other.playerAvatar == playerAvatar && other.isReady == isReady && other.isNPC == isNPC;
}
}
fileFormatVersion: 2 fileFormatVersion: 2
guid: bd7addcbfc2b864408bfe3400dbe7059 guid: 94a7483b108326f4d9042c734f9c6a38
\ No newline at end of file \ No newline at end of file
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3e56ca6796df8164c946c1e398109b90 guid: 77703a9ec39769c479332c9d6455f3d8
folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
using System; using TMPro;
using System.Threading.Tasks; using Unity.Netcode;
using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
...@@ -10,32 +9,47 @@ public class LobbyDetails : MonoBehaviour ...@@ -10,32 +9,47 @@ public class LobbyDetails : MonoBehaviour
[SerializeField] TextMeshProUGUI lobbyPlayersCountText; [SerializeField] TextMeshProUGUI lobbyPlayersCountText;
[SerializeField] Button joinLobbyButton; [SerializeField] Button joinLobbyButton;
string _joinCode; string _lobbyCode;
string _relayCode;
private void Start() private void Start()
{ {
joinLobbyButton.onClick.AddListener(joinLobby); joinLobbyButton.onClick.AddListener(joinLobby);
} }
public void AddDetailsToLobby(string lobbyName, string lobbyPlayersCount, string lobbyCode, string relayCode)
{
lobbyNameText.text = lobbyName;
lobbyPlayersCountText.text = lobbyPlayersCount;
_lobbyCode = lobbyCode;
_relayCode = relayCode;
}
private async void joinLobby() private async void joinLobby()
{ {
joinLobbyButton.interactable = false; joinLobbyButton.interactable = false;
FadeWithText.Instance.ShowMessage("جاري التحميل", false); FadeWithText.Instance.ShowMessage("جاري التحميل...", false);
bool join = await LobbyRequest.JoinLobby(_joinCode); bool join = await LobbyRequest.JoinLobby(_lobbyCode);
if (join) { if (join) {
ChangeSceneManager.Instance.ChangeToLobbyScene();
} NetworkManager networkManager = NetworkManager.Singleton;
FadeWithText.Instance.ShowMessage("جاري الدخول الي الغرفة...", false);
bool joinToServer = await RelayRequest.JoinAllocation(networkManager, _relayCode);
if (joinToServer)
{
ApprovRequest.Instance.CreatePlayerDataObject();
networkManager.StartClient();
}
else
{
FadeWithText.Instance.ShowMessage("حدث خطأ أثناء الاتصال بالخادم", true);
}
}
else else
{ {
joinLobbyButton.interactable = true; joinLobbyButton.interactable = true;
FadeWithText.Instance.ShowMessage("حدث خطأ", true); FadeWithText.Instance.ShowMessage("حدث خطأ أثناء الانضمام الي الغرفة", true);
} }
} }
public void AddDetailsToLobby(string lobbyName, string lobbyPlayersCount, string joinCode)
{
lobbyNameText.text = lobbyName;
lobbyPlayersCountText.text = lobbyPlayersCount;
this._joinCode = joinCode;
}
} }
...@@ -29,12 +29,9 @@ public class LobbyList : MonoBehaviour ...@@ -29,12 +29,9 @@ public class LobbyList : MonoBehaviour
int npcCounter = int.Parse(lobby.Data["NPCsCount"].Value.ToString()) + lobby.Players.Count; int npcCounter = int.Parse(lobby.Data["NPCsCount"].Value.ToString()) + lobby.Players.Count;
string playersCount = $"{npcCounter}/{lobby.MaxPlayers}"; string playersCount = $"{npcCounter}/{lobby.MaxPlayers}";
lobbyDetails.AddDetailsToLobby(lobby.Name, playersCount, lobby.Id); lobbyDetails.AddDetailsToLobby(lobby.Name, playersCount, lobby.Id, lobby.Data["RelayCode"].Value);
lobbyDetails.gameObject.SetActive(npcCounter < lobby.MaxPlayers);
} }
StartCoroutine(FadeOutAfterDelay()); StartCoroutine(FadeOutAfterDelay());
} }
private IEnumerator FadeOutAfterDelay() private IEnumerator FadeOutAfterDelay()
......
using System;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.UI;
public class LobbySlot : MonoBehaviour
{
[SerializeField] TextMeshProUGUI playerName;
[SerializeField] Image avatarImage;
[SerializeField] Button readyButton;
[SerializeField] Button removeButton;
LobbyRoom _lobbyRoom;
ulong _slotId;
bool _isNPC;
bool _isBusy;
private void Start()
{
readyButton.onClick.AddListener(Ready);
removeButton.onClick.AddListener(RemoveNpc);
_lobbyRoom = FindAnyObjectByType<LobbyRoom>();
}
public void AddData(PlayerLobbyData playerLobbyData)
{
_isBusy = true;
bool localClient = NetworkManager.Singleton.LocalClientId == playerLobbyData.clientId;
bool npc = playerLobbyData.isNPC && NetworkManager.Singleton.IsServer;
removeButton.gameObject.SetActive(npc);
_slotId = playerLobbyData.clientId;
_isNPC = playerLobbyData.isNPC;
readyButton.interactable = localClient || npc && !_isBusy;
removeButton.interactable = localClient || npc;
ChangeAvatar(playerLobbyData.playerAvatar);
playerName.text = playerLobbyData.playerName.ToString();
Color btnColor;
string btnText;
if (playerLobbyData.isReady)
{
btnColor = Color.green;
btnText = "Is Ready";
}
else
{
btnColor = Color.white;
btnText = "Ready";
}
readyButton.GetComponent<Image>().color = btnColor;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = btnText;
}
void ChangeAvatar(int index)
{
avatarImage.sprite = GetComponentInParent<AvatarMenu>().GetSpriteByIndex(index);
}
private void Ready()
{
_lobbyRoom.IsButtonClicked(_slotId,_isBusy);
}
private void RemoveNpc()
{
_lobbyRoom.RemoveRpc(_slotId);
}
public void ClearData()
{
ChangeAvatar(0);
readyButton.GetComponent<Image>().color = Color.white;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Add NPC";
playerName.text = " ";
_isNPC = false;
_isBusy = false;
// removeButton.gameObject.SetActive(false);
_slotId = (ulong)0000;
readyButton.interactable = NetworkManager.Singleton.IsServer;
removeButton.gameObject.SetActive(false);
}
}
fileFormatVersion: 2 fileFormatVersion: 2
guid: c574610257016cb4ea3bcbc2fd758e50 guid: 6a78fdea850e51e419140ed5165632a8
\ No newline at end of file \ No newline at end of file
using System;
using System.Threading.Tasks;
using TMPro;
using Unity.Services.Authentication;
using Unity.Services.Lobbies;
using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
using Unity.Services.Lobbies.Models;
public class PlayersInLobbyRoom : MonoBehaviour
{
[field: SerializeField] public bool isBusySlot { get; private set; }
[SerializeField] TextMeshProUGUI playerName;
[SerializeField] Image avatarImage;
[SerializeField] Button readyButton;
string _playerId;
bool _isNPC;
bool _isOwner;
private void Start()
{
readyButton.onClick.AddListener(Ready);
}
public void SetIsOwner(bool isOwner)
{
_isOwner = isOwner;
}
private async void Ready()
{
if (isBusySlot && !_isNPC)
{
UpdatePlayerOptions updatePlayerOptions = new UpdatePlayerOptions();
updatePlayerOptions.Data = new Dictionary<string, PlayerDataObject>
{
{"IsReady", new PlayerDataObject(PlayerDataObject.VisibilityOptions.Member, "True")}
};
await LobbyRequest.UpdatePlayerData(_playerId, updatePlayerOptions);
}
else if (!isBusySlot && !_isNPC)
{
await AddNPC();
}
else if (_isNPC && _isOwner)
{
await RemoveNPC();
}
}
async Task AddNPC()
{
try
{
UpdateLobbyOptions updateLobbyOptions = new UpdateLobbyOptions()
{
Data = new Dictionary<string, DataObject>
{
{"NPCsCount", new DataObject(visibility: DataObject.VisibilityOptions.Public, value: (GetCurrentNPCCount() + 1).ToString())}
}
};
await LobbyRequest.UpdateLobby(updateLobbyOptions);
InitializeAsNPC();
}
catch (Exception ex)
{
Debug.LogException(ex);
}
}
async Task RemoveNPC()
{
try
{
int currentCount = GetCurrentNPCCount();
int newCount = Mathf.Max(0, currentCount - 1);
UpdateLobbyOptions updateLobbyOptions = new UpdateLobbyOptions()
{
Data = new Dictionary<string, DataObject>
{
{"NPCsCount", new DataObject(visibility: DataObject.VisibilityOptions.Public, value: newCount.ToString())}
}
};
await LobbyRequest.UpdateLobby(updateLobbyOptions);
Clear();
Debug.Log("NPC Removed Successfully");
}
catch (Exception ex)
{
Debug.LogError($"Error removing NPC: {ex}");
}
}
public void InitializeAsNPC()
{
_isNPC = true;
isBusySlot = true;
ChangeAvatar(3);
playerName.text = "NPC#" + UnityEngine.Random.Range(1000, 9999);
readyButton.interactable = _isOwner;
readyButton.image.color = Color.red;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Remove";
readyButton.GetComponentInChildren<TextMeshProUGUI>().color = Color.white;
}
public void Init(string name, string avatarIndex, string playerId, string isReady)
{
_isNPC = false;
ChangeAvatar(int.Parse(avatarIndex));
playerName.text = name;
isBusySlot = true;
this._playerId = playerId;
readyButton.interactable = playerId == AuthenticationService.Instance.PlayerId;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Ready";
if (isReady == "True")
{
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Is Ready";
readyButton.interactable = false;
readyButton.image.color = Color.green;
}
}
public void SetNPC(bool isOwner)
{
if (isOwner && !isBusySlot && !_isNPC)
{
readyButton.interactable = true;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "Add NPCs";
}
}
public void Clear()
{
isBusySlot = false;
_isNPC = false;
_playerId = "";
playerName.text = "";
ChangeAvatar(0);
readyButton.interactable = false;
readyButton.GetComponentInChildren<TextMeshProUGUI>().text = "";
readyButton.GetComponentInChildren<TextMeshProUGUI>().color = Color.black;
readyButton.image.color = Color.white;
}
void ChangeAvatar(int index)
{
avatarImage.sprite = GetComponentInParent<AvatarMenu>().GetSpriteByIndex(index);
}
private int GetCurrentNPCCount()
{
try
{
if (LobbyRequest._currentLobby.Data.ContainsKey("NPCsCount"))
{
return int.Parse(LobbyRequest._currentLobby.Data["NPCsCount"].Value);
}
}
catch
{
return 0;
}
return 0;
}
}
\ No newline at end of file
...@@ -2,9 +2,16 @@ using UnityEngine; ...@@ -2,9 +2,16 @@ using UnityEngine;
public class LobbyHeart : MonoBehaviour public class LobbyHeart : MonoBehaviour
{ {
public static LobbyHeart Instance;
Coroutine _heartCoroutine; Coroutine _heartCoroutine;
private void Awake() private void Awake()
{ {
if (Instance == null)
Instance = this;
else
Destroy(this);
DontDestroyOnLoad(gameObject); DontDestroyOnLoad(gameObject);
} }
private void Start() private void Start()
......
...@@ -12,12 +12,9 @@ public static class LobbyRequest ...@@ -12,12 +12,9 @@ public static class LobbyRequest
public static Lobby _currentLobby { get; private set; } public static Lobby _currentLobby { get; private set; }
public static async Task<bool> Create(string lobbyName, int maxPlayer, CreateLobbyOptions createLobbyOptions) public static async Task<bool> Create(string lobbyName, int maxPlayer, CreateLobbyOptions createLobbyOptions)
{ {
createLobbyOptions.Player = SetPlayerData();
try try
{ {
_currentLobby = await LobbyService.Instance.CreateLobbyAsync(lobbyName, maxPlayer, createLobbyOptions); _currentLobby = await LobbyService.Instance.CreateLobbyAsync(lobbyName, maxPlayer, createLobbyOptions);
SetPlayerPrefs();
new GameObject("LobbyHeart").AddComponent<LobbyHeart>(); new GameObject("LobbyHeart").AddComponent<LobbyHeart>();
return true; return true;
} }
...@@ -67,9 +64,7 @@ public static class LobbyRequest ...@@ -67,9 +64,7 @@ public static class LobbyRequest
{ {
try try
{ {
JoinLobbyByIdOptions joinLobbyByIdOptions = new JoinLobbyByIdOptions() { Player = SetPlayerData() }; _currentLobby = await LobbyService.Instance.JoinLobbyByIdAsync(joinCode);
_currentLobby = await LobbyService.Instance.JoinLobbyByIdAsync(joinCode, joinLobbyByIdOptions);
SetPlayerPrefs();
return true; return true;
} }
catch (LobbyServiceException ex) catch (LobbyServiceException ex)
...@@ -82,9 +77,10 @@ public static class LobbyRequest ...@@ -82,9 +77,10 @@ public static class LobbyRequest
} }
return false; return false;
} }
public static async void RemovePlayerFromLobby(string playerId) public static async Task RemovePlayerFromLobby(string playerId)
{ {
if (_currentLobby == null) return; if (_currentLobby == null) return;
Debug.Log("Remmove");
try try
{ {
if (playerId == AuthenticationService.Instance.PlayerId) if (playerId == AuthenticationService.Instance.PlayerId)
...@@ -103,7 +99,7 @@ public static class LobbyRequest ...@@ -103,7 +99,7 @@ public static class LobbyRequest
Debug.LogException(ex); Debug.LogException(ex);
} }
} }
public static async void RemoveLobby() public static async Task RemoveLobby()
{ {
if (_currentLobby == null) return; if (_currentLobby == null) return;
...@@ -122,15 +118,12 @@ public static class LobbyRequest ...@@ -122,15 +118,12 @@ public static class LobbyRequest
} }
} }
public static async Task<bool> JoinLobbyByCode(string lobbyCode) public static async Task<string> JoinLobbyByCode(string lobbyCode)
{ {
try try
{ {
JoinLobbyByCodeOptions joinLobbyByCodeOptions = new JoinLobbyByCodeOptions() { Player = SetPlayerData() }; _currentLobby = await LobbyService.Instance.JoinLobbyByCodeAsync(lobbyCode);
return _currentLobby.Data["RelayCode"].Value;
_currentLobby = await LobbyService.Instance.JoinLobbyByCodeAsync(lobbyCode, joinLobbyByCodeOptions);
SetPlayerPrefs();
return true;
} }
catch (LobbyServiceException ex) catch (LobbyServiceException ex)
{ {
...@@ -140,66 +133,9 @@ public static class LobbyRequest ...@@ -140,66 +133,9 @@ public static class LobbyRequest
{ {
Debug.LogException(ex); Debug.LogException(ex);
} }
return false; return string.Empty;
} }
public static async Task UpdatePlayerData(string playerId, UpdatePlayerOptions updatePlayerOptions)
{
try
{
await LobbyService.Instance.UpdatePlayerAsync(_currentLobby.Id, playerId, updatePlayerOptions);
}
catch (LobbyServiceException ex)
{
Debug.LogException(ex);
}
catch (Exception ex)
{
Debug.LogException(ex);
}
}
public static async Task UpdateLobby(UpdateLobbyOptions updateLobbyOptions)
{
try
{
await LobbyService.Instance.UpdateLobbyAsync(_currentLobby.Id, updateLobbyOptions);
}
catch (LobbyServiceException ex)
{
Debug.LogException(ex);
}
catch (Exception ex)
{
Debug.LogException(ex);
}
}
static Player SetPlayerData()
{
Player player = new Player(
id: AuthenticationService.Instance.PlayerId,
data: new Dictionary<string, PlayerDataObject>
{
{
"Name",
new PlayerDataObject(
PlayerDataObject.VisibilityOptions.Member,
"Player#" + UnityEngine.Random.Range(1000,9999)
)
},
{
"AvatarIndex",
new PlayerDataObject(PlayerDataObject.VisibilityOptions.Member,"1")
},
{"IsReady",
new PlayerDataObject(PlayerDataObject.VisibilityOptions.Member,"False")
}
}
);
return player;
}
static void SetPlayerPrefs()
{
PlayerPrefs.SetString("JoinCode", _currentLobby.LobbyCode);
}
} }
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Unity.Netcode;
using Unity.Netcode.Transports.UTP;
using Unity.Networking.Transport.Relay;
using Unity.Services.Relay; using Unity.Services.Relay;
using Unity.Services.Relay.Models; using Unity.Services.Relay.Models;
using UnityEngine; using UnityEngine;
public static class AllocationRequest public static class RelayRequest
{ {
public static Allocation _allocation; public static Allocation _allocation;
public static async Task<string> Create() public static async Task<string> CreateLobbyCode(int playerCount)
{ {
try try
{ {
_allocation = await RelayService.Instance.CreateAllocationAsync(4); _allocation = await RelayService.Instance.CreateAllocationAsync(playerCount);
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -27,4 +30,26 @@ public static class AllocationRequest ...@@ -27,4 +30,26 @@ public static class AllocationRequest
} }
return string.Empty; return string.Empty;
} }
public static void CreateAllocation(NetworkManager networkManager)
{
UnityTransport unityTransport = networkManager.GetComponent<UnityTransport>();
RelayServerData relayServerData = AllocationUtils.ToRelayServerData(_allocation, "wss");
unityTransport.SetRelayServerData(relayServerData);
}
public static async Task<bool> JoinAllocation(NetworkManager networkManager,string joinCode)
{
try
{
UnityTransport unityTransport = networkManager.GetComponent<UnityTransport>();
JoinAllocation joinCodeData = await RelayService.Instance.JoinAllocationAsync(joinCode);
RelayServerData relayServerData = AllocationUtils.ToRelayServerData(joinCodeData, "wss");
unityTransport.SetRelayServerData(relayServerData);
return true;
}
catch (Exception ex)
{
Debug.LogException(ex);
return false;
}
}
} }
...@@ -10,8 +10,6 @@ public class PlayerDetails : NetworkBehaviour ...@@ -10,8 +10,6 @@ public class PlayerDetails : NetworkBehaviour
public NetworkVariable<FixedString32Bytes> PlayerName = new NetworkVariable<FixedString32Bytes>("Null", readPerm: NetworkVariableReadPermission.Everyone, writePerm: NetworkVariableWritePermission.Owner); public NetworkVariable<FixedString32Bytes> PlayerName = new NetworkVariable<FixedString32Bytes>("Null", readPerm: NetworkVariableReadPermission.Everyone, writePerm: NetworkVariableWritePermission.Owner);
[SerializeField] bool isNPC;
[SerializeField] RTLTextMeshPro nameText; [SerializeField] RTLTextMeshPro nameText;
[SerializeField] string avatar; [SerializeField] string avatar;
public void InitPlayerData(PlayerNetworkData playerNetworkData) public void InitPlayerData(PlayerNetworkData playerNetworkData)
......
...@@ -11,7 +11,7 @@ public class LeaderboardUI : NetworkBehaviour ...@@ -11,7 +11,7 @@ public class LeaderboardUI : NetworkBehaviour
Dictionary<ulong, LeaderboardText> leaderboardUIElements = new Dictionary<ulong, LeaderboardText>(); Dictionary<ulong, LeaderboardText> leaderboardUIElements = new Dictionary<ulong, LeaderboardText>();
ApprovRequest approvRequest; [SerializeField] ApprovRequest approvRequest;
public override void OnNetworkSpawn() public override void OnNetworkSpawn()
{ {
......
...@@ -10,13 +10,10 @@ EditorBuildSettings: ...@@ -10,13 +10,10 @@ EditorBuildSettings:
guid: 9a357ab131db7bd4d8e56aa52459b9a4 guid: 9a357ab131db7bd4d8e56aa52459b9a4
- enabled: 1 - enabled: 1
path: Assets/_project/Scenes/LobbyScene.unity path: Assets/_project/Scenes/LobbyScene.unity
guid: 352bf19a87eb5f84da505d6b76a39310 guid: 3e56ca6796df8164c946c1e398109b90
- enabled: 1 - enabled: 1
path: Assets/_project/Scenes/Game.unity path: Assets/_project/Scenes/Game.unity
guid: ed75d94d1c2d6934f9aa9556db95a098 guid: ed75d94d1c2d6934f9aa9556db95a098
- enabled: 1
path: Assets/_project/Scenes/NewLobby.unity
guid: 3e56ca6796df8164c946c1e398109b90
m_configObjects: m_configObjects:
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3} com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
m_UseUCBPForAssetBundles: 0 m_UseUCBPForAssetBundles: 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment