mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-04-25 07:57:08 -05:00
Rewrote Networking and Base Lobby Created
- Rewrote networking based on tutorials from MLAPI Demo Project and Dapper Dino - Created Lobby UI based on the turorial from Dapper Dino - Linked Existing UI into using the new networking - Modified Lobby Settings to only allow 3 players - Added Field for players to enter their player name
This commit is contained in:
parent
fdf3541135
commit
db5b10ef47
|
|
@ -1,50 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &16067056100848166
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1277964978037252633}
|
||||
- component: {fileID: 5909703457975826432}
|
||||
m_Layer: 0
|
||||
m_Name: EMPTY
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1277964978037252633
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 16067056100848166}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5909703457975826432
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 16067056100848166}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
NetworkInstanceId: 0
|
||||
PrefabHash: 10512910725641542868
|
||||
PrefabHashGenerator: EMPTY
|
||||
AlwaysReplicateAsRoot: 0
|
||||
DontDestroyWithOwner: 0
|
||||
8
Assets/Prefabs/Lobby.meta
Normal file
8
Assets/Prefabs/Lobby.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ee3ac981333ffc34b9aefaf4427aa282
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
786
Assets/Prefabs/Lobby/LobbyPlayerCard.prefab
Normal file
786
Assets/Prefabs/Lobby/LobbyPlayerCard.prefab
Normal file
|
|
@ -0,0 +1,786 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &697679291
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 697679292}
|
||||
- component: {fileID: 697679294}
|
||||
- component: {fileID: 697679293}
|
||||
m_Layer: 0
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &697679292
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 697679291}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 5646690211014430932}
|
||||
- {fileID: 4327595082631380924}
|
||||
m_Father: {fileID: 2004584391902020887}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -40, y: -40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &697679294
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 697679291}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &697679293
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 697679291}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.23529412, g: 0.23529412, b: 0.23529412, 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: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &164869310498232978
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6696703827737927059}
|
||||
- component: {fileID: 6704025555102986816}
|
||||
- component: {fileID: 3891271221708712985}
|
||||
m_Layer: 0
|
||||
m_Name: PlayerDisplayNameText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6696703827737927059
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 164869310498232978}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4327595082631380924}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.85}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &6704025555102986816
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 164869310498232978}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3891271221708712985
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 164869310498232978}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
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: Display 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: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, 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: 40
|
||||
m_fontSizeBase: 40
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 0
|
||||
m_fontSizeMax: 40
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 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: 10, y: 10, z: 10, w: 10}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &3555119561119790297
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4346605747764717236}
|
||||
- component: {fileID: 8460389566829090228}
|
||||
- component: {fileID: 4993484075183320852}
|
||||
m_Layer: 0
|
||||
m_Name: Checkmark
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4346605747764717236
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3555119561119790297}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5256177651161589512}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8460389566829090228
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3555119561119790297}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4993484075183320852
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3555119561119790297}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 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: 10901, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &4118428114958079449
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4327595082631380924}
|
||||
m_Layer: 0
|
||||
m_Name: PlayerDataPanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &4327595082631380924
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4118428114958079449}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 6696703827737927059}
|
||||
- {fileID: 5045380366237327521}
|
||||
- {fileID: 3190317820503267266}
|
||||
m_Father: {fileID: 697679292}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &4237331793813064128
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2004584391902020887}
|
||||
- component: {fileID: 7136380821082899079}
|
||||
m_Layer: 0
|
||||
m_Name: LobbyPlayerCard
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2004584391902020887
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4237331793813064128}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 697679292}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
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: 440, y: 880}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &7136380821082899079
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4237331793813064128}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 311c1a64d12df464ab0b856d2aa3e5ae, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
waitingForPlayerPanel: {fileID: 5393570124108907800}
|
||||
playerDataPanel: {fileID: 4118428114958079449}
|
||||
playerDisplayNameText: {fileID: 3891271221708712985}
|
||||
selectedCharacterImage: {fileID: 7312721459122679306}
|
||||
isReadyToggle: {fileID: 7093129836083058353}
|
||||
--- !u!1 &4905470916900570236
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1944325820477433481}
|
||||
- component: {fileID: 1781561371867429487}
|
||||
- component: {fileID: 3214214380382592199}
|
||||
m_Layer: 0
|
||||
m_Name: WaitingForPlayerText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1944325820477433481
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4905470916900570236}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5646690211014430932}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1781561371867429487
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4905470916900570236}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3214214380382592199
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4905470916900570236}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
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: Waiting For Player...
|
||||
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: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, 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: 40
|
||||
m_fontSizeBase: 40
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 0
|
||||
m_fontSizeMax: 50
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 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: 20, y: 20, z: 20, w: 20}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &5393570124108907800
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5646690211014430932}
|
||||
m_Layer: 0
|
||||
m_Name: WaitingForPlayer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5646690211014430932
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5393570124108907800}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1944325820477433481}
|
||||
m_Father: {fileID: 697679292}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &6910176360734585072
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5256177651161589512}
|
||||
- component: {fileID: 6757151871973992427}
|
||||
- component: {fileID: 6618375997168480435}
|
||||
m_Layer: 0
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5256177651161589512
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6910176360734585072}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4346605747764717236}
|
||||
m_Father: {fileID: 3190317820503267266}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 5}
|
||||
m_SizeDelta: {x: -40, y: -30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6757151871973992427
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6910176360734585072}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6618375997168480435
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6910176360734585072}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 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: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &7494610771549648403
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3190317820503267266}
|
||||
- component: {fileID: 7093129836083058353}
|
||||
m_Layer: 0
|
||||
m_Name: IsReadyToggle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3190317820503267266
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7494610771549648403}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 5256177651161589512}
|
||||
m_Father: {fileID: 4327595082631380924}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0.15}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: -7.523164e-37}
|
||||
m_Pivot: {x: 0.5, y: 0.49999997}
|
||||
--- !u!114 &7093129836083058353
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7494610771549648403}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
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: 1, g: 1, b: 1, a: 1}
|
||||
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: 0
|
||||
m_TargetGraphic: {fileID: 6618375997168480435}
|
||||
toggleTransition: 1
|
||||
graphic: {fileID: 4993484075183320852}
|
||||
m_Group: {fileID: 0}
|
||||
onValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_IsOn: 0
|
||||
--- !u!1 &7853593261180160953
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5045380366237327521}
|
||||
- component: {fileID: 2790027402863782409}
|
||||
- component: {fileID: 7312721459122679306}
|
||||
m_Layer: 0
|
||||
m_Name: SelectedCharacterImage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5045380366237327521
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7853593261180160953}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4327595082631380924}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.15}
|
||||
m_AnchorMax: {x: 1, y: 0.85}
|
||||
m_AnchoredPosition: {x: 0, y: 5}
|
||||
m_SizeDelta: {x: -50, y: -10}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2790027402863782409
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7853593261180160953}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7312721459122679306
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7853593261180160953}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.754717, g: 0.754717, b: 0.754717, 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: 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
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5eed2b99298c3e541a9e728edd0c5e79
|
||||
guid: 25b0bd1c83713d44ab76eaa07a6357fa
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
1529
Assets/Prefabs/Lobby/LobbyUI.prefab
Normal file
1529
Assets/Prefabs/Lobby/LobbyUI.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/Lobby/LobbyUI.prefab.meta
Normal file
7
Assets/Prefabs/Lobby/LobbyUI.prefab.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f04855a6b3fae4f478846139aa5cf621
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.3731193, g: 0.38073996, b: 0.35872698, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
|
@ -206,182 +206,6 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1240358271
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1240358272}
|
||||
- component: {fileID: 1240358274}
|
||||
- component: {fileID: 1240358273}
|
||||
m_Layer: 5
|
||||
m_Name: UI Panel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1240358272
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1240358271}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1999024908}
|
||||
m_Father: {fileID: 1641203744}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 425}
|
||||
m_SizeDelta: {x: -800, y: -950}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1240358273
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1240358271}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 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: 10907, 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 &1240358274
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1240358271}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1641203740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1641203744}
|
||||
- component: {fileID: 1641203743}
|
||||
- component: {fileID: 1641203742}
|
||||
- component: {fileID: 1641203741}
|
||||
m_Layer: 5
|
||||
m_Name: UI Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1641203741
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1641203740}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &1641203742
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1641203740}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!223 &1641203743
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1641203740}
|
||||
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_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &1641203744
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1641203740}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 1240358272}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &1857311124
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -446,127 +270,110 @@ Transform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1999024907
|
||||
GameObject:
|
||||
--- !u!1001 &2117160526
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1999024908}
|
||||
- component: {fileID: 1999024910}
|
||||
- component: {fileID: 1999024909}
|
||||
m_Layer: 5
|
||||
m_Name: Header Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1999024908
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1999024907}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1240358272}
|
||||
m_RootOrder: 0
|
||||
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: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1999024909
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1999024907}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 100
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 100
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: Lobby
|
||||
--- !u!222 &1999024910
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1999024907}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &2124034463
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2124034465}
|
||||
- component: {fileID: 2124034464}
|
||||
m_Layer: 0
|
||||
m_Name: TEMP_OBJECT
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2124034464
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2124034463}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: eef8ecf97071c834d9bc006d60a98431, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &2124034465
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2124034463}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1127.0714, y: 570.3398, z: -47.330193}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 805378014, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 805378014, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 805378014, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 805378014, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 805378014, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 805378014, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1235158167, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1235158167, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1235158167, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1235158167, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1235158167, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1235158167, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358572, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: LobbyUI
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2890392183066358573, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: f04855a6b3fae4f478846139aa5cf621, type: 3}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.3731193, g: 0.38073996, b: 0.35872698, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
|
@ -163,10 +163,10 @@ Transform:
|
|||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1228497611}
|
||||
m_Father: {fileID: 1494071119}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1228497610
|
||||
--- !u!1 &1494071116
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
|
@ -174,9 +174,9 @@ GameObject:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1228497611}
|
||||
- component: {fileID: 1228497612}
|
||||
- component: {fileID: 1228497613}
|
||||
- component: {fileID: 1494071119}
|
||||
- component: {fileID: 1494071118}
|
||||
- component: {fileID: 1494071117}
|
||||
m_Layer: 0
|
||||
m_Name: NetworkManager
|
||||
m_TagString: Untagged
|
||||
|
|
@ -184,28 +184,38 @@ GameObject:
|
|||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1228497611
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1228497610}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 10949019}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1228497612
|
||||
--- !u!114 &1494071117
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1228497610}
|
||||
m_GameObject: {fileID: 1494071116}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b84c2d8dfe509a34fb59e2b81f8e1319, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
MessageBufferSize: 5120
|
||||
MaxConnections: 100
|
||||
MaxSentMessageQueueSize: 128
|
||||
ConnectAddress: 127.0.0.1
|
||||
ConnectPort: 7777
|
||||
ServerListenPort: 7777
|
||||
ServerWebsocketListenPort: 8887
|
||||
SupportWebsocket: 0
|
||||
Channels: []
|
||||
UseMLAPIRelay: 0
|
||||
MLAPIRelayAddress: 184.72.104.138
|
||||
MLAPIRelayPort: 8888
|
||||
MessageSendMode: 0
|
||||
--- !u!114 &1494071118
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1494071116}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 593a2fe42fa9d37498c96f9a383b6521, type: 3}
|
||||
|
|
@ -216,18 +226,16 @@ MonoBehaviour:
|
|||
LogLevel: 1
|
||||
NetworkConfig:
|
||||
ProtocolVersion: 0
|
||||
NetworkTransport: {fileID: 1228497613}
|
||||
NetworkTransport: {fileID: 1494071117}
|
||||
RegisteredScenes:
|
||||
- Preloader
|
||||
- TitleScene
|
||||
- Lobby
|
||||
AllowRuntimeSceneChanges: 0
|
||||
NetworkPrefabs:
|
||||
- Prefab: {fileID: 16067056100848166, guid: 5eed2b99298c3e541a9e728edd0c5e79, type: 3}
|
||||
PlayerPrefab: 1
|
||||
NetworkPrefabs: []
|
||||
PlayerPrefabHash:
|
||||
id: 0
|
||||
CreatePlayerPrefab: 1
|
||||
CreatePlayerPrefab: 0
|
||||
ReceiveTickrate: 64
|
||||
NetworkTickIntervalSec: 0.05
|
||||
MaxReceiveEventsPerTickRate: 500
|
||||
|
|
@ -252,31 +260,89 @@ MonoBehaviour:
|
|||
references:
|
||||
version: 1
|
||||
00000000:
|
||||
type: {class: NullableBoolSerializable, ns: MLAPI.Configuration, asm: Unity.Multiplayer.MLAPI.Runtime}
|
||||
data:
|
||||
Value: 0
|
||||
--- !u!114 &1228497613
|
||||
type: {class: , ns: , asm: }
|
||||
--- !u!4 &1494071119
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1494071116}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 10949019}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1566574282
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1566574286}
|
||||
- component: {fileID: 1566574285}
|
||||
- component: {fileID: 1566574284}
|
||||
- component: {fileID: 1566574283}
|
||||
m_Layer: 0
|
||||
m_Name: NetPortals
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1566574283
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1228497610}
|
||||
m_GameObject: {fileID: 1566574282}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b84c2d8dfe509a34fb59e2b81f8e1319, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: ad94afee15264f5479af33bf240c41af, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
MessageBufferSize: 5120
|
||||
MaxConnections: 100
|
||||
MaxSentMessageQueueSize: 128
|
||||
ConnectAddress: 127.0.0.1
|
||||
ConnectPort: 7777
|
||||
ServerListenPort: 7777
|
||||
ServerWebsocketListenPort: 8887
|
||||
SupportWebsocket: 0
|
||||
Channels: []
|
||||
UseMLAPIRelay: 0
|
||||
MLAPIRelayAddress: 184.72.104.138
|
||||
MLAPIRelayPort: 8888
|
||||
MessageSendMode: 0
|
||||
maxPlayers: 3
|
||||
--- !u!114 &1566574284
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1566574282}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cad92ef1e2176604f9dd215337189c78, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &1566574285
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1566574282}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 23684402616617d41882396738ac4b4a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &1566574286
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1566574282}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1066.1622, y: 530.40906, z: -55.350334}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ Canvas:
|
|||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
|
|
@ -398,6 +398,7 @@ MonoBehaviour:
|
|||
ErrorPanel: {fileID: 1795530225}
|
||||
ErrorText: {fileID: 2145629042}
|
||||
ipAddressField: {fileID: 1049555437}
|
||||
playerNameField: {fileID: 627060240}
|
||||
--- !u!1 &464708754
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -430,11 +431,11 @@ RectTransform:
|
|||
- {fileID: 976711597}
|
||||
- {fileID: 1918451450}
|
||||
m_Father: {fileID: 1166003625}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -380, y: -50}
|
||||
m_AnchoredPosition: {x: -380, y: -102}
|
||||
m_SizeDelta: {x: -900, y: -300}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &464708756
|
||||
|
|
@ -475,6 +476,181 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 464708754}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &627060238
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 627060239}
|
||||
- component: {fileID: 627060242}
|
||||
- component: {fileID: 627060241}
|
||||
- component: {fileID: 627060240}
|
||||
m_Layer: 5
|
||||
m_Name: PlayerNameField
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &627060239
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 627060238}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1306950217}
|
||||
m_Father: {fileID: 1166003625}
|
||||
m_RootOrder: 1
|
||||
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: 31}
|
||||
m_SizeDelta: {x: 350, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &627060240
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 627060238}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
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: 627060241}
|
||||
m_TextViewport: {fileID: 1306950217}
|
||||
m_TextComponent: {fileID: 1268511103}
|
||||
m_Placeholder: {fileID: 1483540420}
|
||||
m_VerticalScrollbar: {fileID: 0}
|
||||
m_VerticalScrollbarEventHandler: {fileID: 0}
|
||||
m_LayoutGroup: {fileID: 0}
|
||||
m_ScrollSensitivity: 1
|
||||
m_ContentType: 0
|
||||
m_InputType: 0
|
||||
m_AsteriskChar: 42
|
||||
m_KeyboardType: 0
|
||||
m_LineType: 0
|
||||
m_HideMobileInput: 0
|
||||
m_HideSoftKeyboard: 0
|
||||
m_CharacterValidation: 0
|
||||
m_RegexValue:
|
||||
m_GlobalPointSize: 25
|
||||
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_RestoreOriginalTextOnEscape: 1
|
||||
m_isRichTextEditingAllowed: 0
|
||||
m_LineLimit: 0
|
||||
m_InputValidator: {fileID: 0}
|
||||
--- !u!114 &627060241
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 627060238}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 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 &627060242
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 627060238}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &705507993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -800,11 +976,11 @@ RectTransform:
|
|||
- {fileID: 790862021}
|
||||
- {fileID: 1049555436}
|
||||
m_Father: {fileID: 1166003625}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 380, y: -50}
|
||||
m_AnchoredPosition: {x: 380, y: -102}
|
||||
m_SizeDelta: {x: -900, y: -300}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &884986645
|
||||
|
|
@ -1417,6 +1593,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 997027724}
|
||||
- {fileID: 627060239}
|
||||
- {fileID: 464708755}
|
||||
- {fileID: 1644081394}
|
||||
- {fileID: 884986644}
|
||||
|
|
@ -1466,6 +1643,347 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1166003624}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1268511101
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1268511102}
|
||||
- component: {fileID: 1268511104}
|
||||
- component: {fileID: 1268511103}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1268511102
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1268511101}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1306950217}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1268511103
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1268511101}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
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: 25
|
||||
m_fontSizeBase: 25
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 1
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 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 &1268511104
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1268511101}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1306950216
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1306950217}
|
||||
- component: {fileID: 1306950218}
|
||||
m_Layer: 5
|
||||
m_Name: Text Area
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1306950217
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1306950216}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1483540418}
|
||||
- {fileID: 1268511102}
|
||||
m_Father: {fileID: 627060239}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -0.5}
|
||||
m_SizeDelta: {x: -20, y: -13}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1306950218
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1306950216}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding: {x: -8, y: -5, z: -8, w: -5}
|
||||
m_Softness: {x: 0, y: 0}
|
||||
--- !u!1 &1483540417
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1483540418}
|
||||
- component: {fileID: 1483540421}
|
||||
- component: {fileID: 1483540420}
|
||||
- component: {fileID: 1483540419}
|
||||
m_Layer: 5
|
||||
m_Name: Placeholder
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1483540418
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1483540417}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1306950217}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1483540419
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1483540417}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
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 &1483540420
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1483540417}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
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: Enter 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: 25
|
||||
m_fontSizeBase: 25
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 2
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 1
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 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 &1483540421
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1483540417}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1562821958
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -1764,11 +2282,11 @@ RectTransform:
|
|||
- {fileID: 2111968989}
|
||||
- {fileID: 1614003509}
|
||||
m_Father: {fileID: 1166003625}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
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: -50}
|
||||
m_AnchoredPosition: {x: 0, y: -102}
|
||||
m_SizeDelta: {x: -900, y: -300}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1644081395
|
||||
|
|
@ -1826,7 +2344,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1795530226
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -1846,7 +2364,7 @@ RectTransform:
|
|||
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: -50}
|
||||
m_AnchoredPosition: {x: 0, y: -102}
|
||||
m_SizeDelta: {x: -800, y: -900}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1795530227
|
||||
|
|
|
|||
143
Assets/Scripts/Network/ClientGameNetPortal.cs
Normal file
143
Assets/Scripts/Network/ClientGameNetPortal.cs
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using MLAPI;
|
||||
using MLAPI.Transports.UNET;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
[RequireComponent(typeof(GameNetPortal))]
|
||||
public class ClientGameNetPortal : MonoBehaviour
|
||||
{
|
||||
public static ClientGameNetPortal Instance => instance;
|
||||
private static ClientGameNetPortal instance;
|
||||
|
||||
public DisconnectReason DisconnectReason { get; private set; } = new DisconnectReason();
|
||||
|
||||
public event Action<ConnectStatus> OnConnectionFinished;
|
||||
|
||||
public event Action OnNetworkTimedOut;
|
||||
|
||||
private GameNetPortal gameNetPortal;
|
||||
|
||||
private UNetTransport transport;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (instance != null && instance != this)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
|
||||
instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
transport = NetworkManager.Singleton.GetComponent<UNetTransport>();
|
||||
|
||||
gameNetPortal = GetComponent<GameNetPortal>();
|
||||
|
||||
gameNetPortal.OnNetworkReadied += HandleNetworkReadied;
|
||||
gameNetPortal.OnConnectionFinished += HandleConnectionFinished;
|
||||
gameNetPortal.OnDisconnectReasonReceived += HandleDisconnectReasonReceived;
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback += HandleClientDisconnect;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (gameNetPortal == null) { return; }
|
||||
|
||||
gameNetPortal.OnNetworkReadied -= HandleNetworkReadied;
|
||||
gameNetPortal.OnConnectionFinished -= HandleConnectionFinished;
|
||||
gameNetPortal.OnDisconnectReasonReceived -= HandleDisconnectReasonReceived;
|
||||
|
||||
if (NetworkManager.Singleton == null) { return; }
|
||||
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback -= HandleClientDisconnect;
|
||||
}
|
||||
|
||||
public void StartClient(string ipAddress, int port)
|
||||
{
|
||||
transport.ConnectAddress = ipAddress;
|
||||
transport.ConnectPort = port;
|
||||
|
||||
var payload = JsonUtility.ToJson(new ConnectionPayload()
|
||||
{
|
||||
clientGUID = Guid.NewGuid().ToString(),
|
||||
clientScene = SceneManager.GetActiveScene().buildIndex,
|
||||
playerName = PlayerPrefs.GetString("PlayerName", "Missing Name")
|
||||
});
|
||||
|
||||
byte[] payloadBytes = Encoding.UTF8.GetBytes(payload);
|
||||
|
||||
NetworkManager.Singleton.NetworkConfig.ConnectionData = payloadBytes;
|
||||
|
||||
NetworkManager.Singleton.StartClient();
|
||||
}
|
||||
|
||||
private void HandleNetworkReadied()
|
||||
{
|
||||
if (!NetworkManager.Singleton.IsClient) { return; }
|
||||
|
||||
if (!NetworkManager.Singleton.IsHost)
|
||||
{
|
||||
gameNetPortal.OnUserDisconnectRequested += HandleUserDisconnectRequested;
|
||||
}
|
||||
|
||||
SceneManager.sceneLoaded += HandleSceneLoaded;
|
||||
}
|
||||
|
||||
private void HandleSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
gameNetPortal.ClientToServerSceneChanged(SceneManager.GetActiveScene().buildIndex);
|
||||
}
|
||||
|
||||
private void HandleUserDisconnectRequested()
|
||||
{
|
||||
DisconnectReason.SetDisconnectReason(ConnectStatus.UserRequestedDisconnect);
|
||||
NetworkManager.Singleton.StopClient();
|
||||
|
||||
HandleClientDisconnect(NetworkManager.Singleton.LocalClientId);
|
||||
|
||||
SceneManager.LoadScene("TitleScene");
|
||||
}
|
||||
|
||||
private void HandleConnectionFinished(ConnectStatus status)
|
||||
{
|
||||
if (status != ConnectStatus.Success)
|
||||
{
|
||||
DisconnectReason.SetDisconnectReason(status);
|
||||
}
|
||||
|
||||
OnConnectionFinished?.Invoke(status);
|
||||
}
|
||||
|
||||
private void HandleDisconnectReasonReceived(ConnectStatus status)
|
||||
{
|
||||
DisconnectReason.SetDisconnectReason(status);
|
||||
}
|
||||
|
||||
private void HandleClientDisconnect(ulong clientId)
|
||||
{
|
||||
if (!NetworkManager.Singleton.IsConnectedClient && !NetworkManager.Singleton.IsHost)
|
||||
{
|
||||
SceneManager.sceneLoaded -= HandleSceneLoaded;
|
||||
gameNetPortal.OnUserDisconnectRequested -= HandleUserDisconnectRequested;
|
||||
|
||||
if (SceneManager.GetActiveScene().name != "TitleScene")
|
||||
{
|
||||
if (!DisconnectReason.HasTransitionReason)
|
||||
{
|
||||
DisconnectReason.SetDisconnectReason(ConnectStatus.GenericDisconnect);
|
||||
}
|
||||
|
||||
SceneManager.LoadScene("TitleScene");
|
||||
}
|
||||
else
|
||||
{
|
||||
OnNetworkTimedOut?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: eef8ecf97071c834d9bc006d60a98431
|
||||
guid: cad92ef1e2176604f9dd215337189c78
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
9
Assets/Scripts/Network/ConnectStatus.cs
Normal file
9
Assets/Scripts/Network/ConnectStatus.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
public enum ConnectStatus {
|
||||
Undefined,
|
||||
Success,
|
||||
ServerFull,
|
||||
GameInProgress,
|
||||
LoggedInAgain,
|
||||
UserRequestedDisconnect,
|
||||
GenericDisconnect
|
||||
}
|
||||
11
Assets/Scripts/Network/ConnectStatus.cs.meta
Normal file
11
Assets/Scripts/Network/ConnectStatus.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 40b6f71e4965cdd4881d1ad01346ad0c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Scripts/Network/ConnectionPayload.cs
Normal file
9
Assets/Scripts/Network/ConnectionPayload.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using System;
|
||||
|
||||
[Serializable]
|
||||
public class ConnectionPayload
|
||||
{
|
||||
public string clientGUID;
|
||||
public int clientScene = -1;
|
||||
public string playerName;
|
||||
}
|
||||
11
Assets/Scripts/Network/ConnectionPayload.cs.meta
Normal file
11
Assets/Scripts/Network/ConnectionPayload.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bf3c299439247ad40bfb327d5fe09130
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
16
Assets/Scripts/Network/DisconnectReason.cs
Normal file
16
Assets/Scripts/Network/DisconnectReason.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
public class DisconnectReason {
|
||||
|
||||
public ConnectStatus Reason { get; private set; } = ConnectStatus.Undefined;
|
||||
|
||||
public void SetDisconnectReason(ConnectStatus reason)
|
||||
{
|
||||
Reason = reason;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
Reason = ConnectStatus.Undefined;
|
||||
}
|
||||
|
||||
public bool HasTransitionReason => Reason != ConnectStatus.Undefined;
|
||||
}
|
||||
11
Assets/Scripts/Network/DisconnectReason.cs.meta
Normal file
11
Assets/Scripts/Network/DisconnectReason.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 21ec48d08d0cd0045bf422c991ce266a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
179
Assets/Scripts/Network/GameNetPortal.cs
Normal file
179
Assets/Scripts/Network/GameNetPortal.cs
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
using System;
|
||||
using MLAPI;
|
||||
using MLAPI.Messaging;
|
||||
using MLAPI.Serialization.Pooled;
|
||||
using MLAPI.Transports;
|
||||
using UnityEngine;
|
||||
|
||||
public class GameNetPortal : MonoBehaviour {
|
||||
|
||||
public static GameNetPortal Instance => instance;
|
||||
private static GameNetPortal instance;
|
||||
|
||||
public event Action OnNetworkReadied;
|
||||
|
||||
public event Action<ConnectStatus> OnConnectionFinished;
|
||||
public event Action<ConnectStatus> OnDisconnectReasonReceived;
|
||||
|
||||
public event Action<ulong, int> OnClientSceneChanged;
|
||||
|
||||
public event Action OnUserDisconnectRequested;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (instance != null && instance != this)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
|
||||
instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
NetworkManager.Singleton.OnServerStarted += HandleNetworkReady;
|
||||
NetworkManager.Singleton.OnClientConnectedCallback += HandleClientConnected;
|
||||
|
||||
RegisterClientMessageHandlers();
|
||||
RegisterServerMessageHandlers();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (NetworkManager.Singleton != null)
|
||||
{
|
||||
NetworkManager.Singleton.OnServerStarted -= HandleNetworkReady;
|
||||
NetworkManager.Singleton.OnClientConnectedCallback -= HandleClientConnected;
|
||||
}
|
||||
|
||||
UnregisterClientMessageHandlers();
|
||||
UnregisterServerMessageHandlers();
|
||||
}
|
||||
|
||||
public void StartHost()
|
||||
{
|
||||
NetworkManager.Singleton.StartHost();
|
||||
}
|
||||
|
||||
public void RequestDisconnect()
|
||||
{
|
||||
OnUserDisconnectRequested?.Invoke();
|
||||
}
|
||||
|
||||
private void HandleClientConnected(ulong clientId)
|
||||
{
|
||||
if (clientId != NetworkManager.Singleton.LocalClientId) { return; }
|
||||
|
||||
HandleNetworkReady();
|
||||
}
|
||||
|
||||
private void HandleNetworkReady()
|
||||
{
|
||||
if (NetworkManager.Singleton.IsHost)
|
||||
{
|
||||
OnConnectionFinished?.Invoke(ConnectStatus.Success);
|
||||
}
|
||||
|
||||
OnNetworkReadied?.Invoke();
|
||||
}
|
||||
|
||||
#region Message Handlers
|
||||
|
||||
private void RegisterClientMessageHandlers()
|
||||
{
|
||||
CustomMessagingManager.RegisterNamedMessageHandler("ServerToClientConnectResult", (senderClientId, stream) =>
|
||||
{
|
||||
using (var reader = PooledNetworkReader.Get(stream))
|
||||
{
|
||||
ConnectStatus status = (ConnectStatus)reader.ReadInt32();
|
||||
|
||||
OnConnectionFinished?.Invoke(status);
|
||||
}
|
||||
});
|
||||
|
||||
CustomMessagingManager.RegisterNamedMessageHandler("ServerToClientSetDisconnectReason", (senderClientId, stream) =>
|
||||
{
|
||||
using (var reader = PooledNetworkReader.Get(stream))
|
||||
{
|
||||
ConnectStatus status = (ConnectStatus)reader.ReadInt32();
|
||||
|
||||
OnDisconnectReasonReceived?.Invoke(status);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void RegisterServerMessageHandlers()
|
||||
{
|
||||
CustomMessagingManager.RegisterNamedMessageHandler("ClientToServerSceneChanged", (senderClientId, stream) =>
|
||||
{
|
||||
using (var reader = PooledNetworkReader.Get(stream))
|
||||
{
|
||||
int sceneIndex = reader.ReadInt32();
|
||||
|
||||
OnClientSceneChanged?.Invoke(senderClientId, sceneIndex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void UnregisterClientMessageHandlers()
|
||||
{
|
||||
CustomMessagingManager.UnregisterNamedMessageHandler("ServerToClientConnectResult");
|
||||
CustomMessagingManager.UnregisterNamedMessageHandler("ServerToClientSetDisconnectReason");
|
||||
}
|
||||
|
||||
private void UnregisterServerMessageHandlers()
|
||||
{
|
||||
CustomMessagingManager.UnregisterNamedMessageHandler("ClientToServerSceneChanged");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Message Senders
|
||||
|
||||
public void ServerToClientConnectResult(ulong netId, ConnectStatus status)
|
||||
{
|
||||
using (var buffer = PooledNetworkBuffer.Get())
|
||||
{
|
||||
using (var writer = PooledNetworkWriter.Get(buffer))
|
||||
{
|
||||
writer.WriteInt32((int)status);
|
||||
CustomMessagingManager.SendNamedMessage("ServerToClientConnectResult", netId, buffer, NetworkChannel.Internal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ServerToClientSetDisconnectReason(ulong netId, ConnectStatus status)
|
||||
{
|
||||
using (var buffer = PooledNetworkBuffer.Get())
|
||||
{
|
||||
using (var writer = PooledNetworkWriter.Get(buffer))
|
||||
{
|
||||
writer.WriteInt32((int)status);
|
||||
CustomMessagingManager.SendNamedMessage("ServerToClientSetDisconnectReason", netId, buffer, NetworkChannel.Internal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ClientToServerSceneChanged(int newScene)
|
||||
{
|
||||
if (NetworkManager.Singleton.IsHost)
|
||||
{
|
||||
OnClientSceneChanged?.Invoke(NetworkManager.Singleton.ServerClientId, newScene);
|
||||
}
|
||||
else if (NetworkManager.Singleton.IsConnectedClient)
|
||||
{
|
||||
using (var buffer = PooledNetworkBuffer.Get())
|
||||
{
|
||||
using (var writer = PooledNetworkWriter.Get(buffer))
|
||||
{
|
||||
writer.WriteInt32(newScene);
|
||||
CustomMessagingManager.SendNamedMessage("ClientToServerSceneChanged", NetworkManager.Singleton.ServerClientId, buffer, NetworkChannel.Internal);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
11
Assets/Scripts/Network/GameNetPortal.cs.meta
Normal file
11
Assets/Scripts/Network/GameNetPortal.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 23684402616617d41882396738ac4b4a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
11
Assets/Scripts/Network/PlayerData.cs
Normal file
11
Assets/Scripts/Network/PlayerData.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
public struct PlayerData {
|
||||
|
||||
public string PlayerName { get; private set; }
|
||||
public ulong ClientId { get; private set; }
|
||||
|
||||
public PlayerData(string playerName, ulong clientId)
|
||||
{
|
||||
PlayerName = playerName;
|
||||
ClientId = clientId;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Network/PlayerData.cs.meta
Normal file
11
Assets/Scripts/Network/PlayerData.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 04bd7bd7ad931ab4eb11075b9fafd7c0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -7,8 +7,6 @@ using UnityEngine.SceneManagement;
|
|||
public class Preloader : MonoBehaviour {
|
||||
|
||||
void Start() {
|
||||
NetworkManager.Singleton.ConnectionApprovalCallback += ApprovalCheck;
|
||||
|
||||
if (Application.isEditor) {
|
||||
// Swap to Title Screen (as client) while in the editor
|
||||
SceneManager.LoadScene(1);
|
||||
|
|
@ -32,20 +30,6 @@ public class Preloader : MonoBehaviour {
|
|||
}
|
||||
}
|
||||
|
||||
private void ApprovalCheck(byte[] connectionData, ulong clientID, NetworkManager.ConnectionApprovedDelegate callback) {
|
||||
|
||||
bool approve = false;
|
||||
|
||||
// Validate the connection password
|
||||
string password = System.Text.Encoding.ASCII.GetString(connectionData);
|
||||
if (password == "kingsrace") {
|
||||
approve = true;
|
||||
}
|
||||
|
||||
// Vec 3 is position
|
||||
callback(true, null, approve, new Vector3(0, 10, 0), Quaternion.identity);
|
||||
}
|
||||
|
||||
private Dictionary<string, string> GetCommandlineArgs() {
|
||||
Dictionary<string, string> argDictionary = new Dictionary<string, string>();
|
||||
|
||||
|
|
|
|||
241
Assets/Scripts/Network/ServerGameNetPortal.cs
Normal file
241
Assets/Scripts/Network/ServerGameNetPortal.cs
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using MLAPI;
|
||||
using MLAPI.SceneManagement;
|
||||
using MLAPI.Spawning;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class ServerGameNetPortal : MonoBehaviour {
|
||||
|
||||
[Header("Settings")]
|
||||
[SerializeField] private int maxPlayers = 3;
|
||||
|
||||
public static ServerGameNetPortal Instance => instance;
|
||||
private static ServerGameNetPortal instance;
|
||||
|
||||
private Dictionary<string, PlayerData> clientData;
|
||||
private Dictionary<ulong, string> clientIdToGuid;
|
||||
private Dictionary<ulong, int> clientSceneMap;
|
||||
private bool gameInProgress;
|
||||
|
||||
private const int MaxConnectionPayload = 1024;
|
||||
|
||||
private GameNetPortal gameNetPortal;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (instance != null && instance != this)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
|
||||
instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
gameNetPortal = GetComponent<GameNetPortal>();
|
||||
gameNetPortal.OnNetworkReadied += HandleNetworkReadied;
|
||||
|
||||
NetworkManager.Singleton.ConnectionApprovalCallback += ApprovalCheck;
|
||||
NetworkManager.Singleton.OnServerStarted += HandleServerStarted;
|
||||
|
||||
clientData = new Dictionary<string, PlayerData>();
|
||||
clientIdToGuid = new Dictionary<ulong, string>();
|
||||
clientSceneMap = new Dictionary<ulong, int>();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (gameNetPortal == null) { return; }
|
||||
|
||||
gameNetPortal.OnNetworkReadied -= HandleNetworkReadied;
|
||||
|
||||
if (NetworkManager.Singleton == null) { return; }
|
||||
|
||||
NetworkManager.Singleton.ConnectionApprovalCallback -= ApprovalCheck;
|
||||
NetworkManager.Singleton.OnServerStarted -= HandleServerStarted;
|
||||
}
|
||||
|
||||
public PlayerData? GetPlayerData(ulong clientId)
|
||||
{
|
||||
if (clientIdToGuid.TryGetValue(clientId, out string clientGuid))
|
||||
{
|
||||
if (clientData.TryGetValue(clientGuid, out PlayerData playerData))
|
||||
{
|
||||
return playerData;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"No player data found for client id: {clientId}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"No client guid found for client id: {clientId}");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void StartGame()
|
||||
{
|
||||
gameInProgress = true;
|
||||
|
||||
NetworkSceneManager.SwitchScene("Game");
|
||||
}
|
||||
|
||||
public void EndRound()
|
||||
{
|
||||
gameInProgress = false;
|
||||
|
||||
NetworkSceneManager.SwitchScene("Lobby");
|
||||
}
|
||||
|
||||
private void HandleNetworkReadied()
|
||||
{
|
||||
if (!NetworkManager.Singleton.IsServer) { return; }
|
||||
|
||||
gameNetPortal.OnUserDisconnectRequested += HandleUserDisconnectRequested;
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback += HandleClientDisconnect;
|
||||
gameNetPortal.OnClientSceneChanged += HandleClientSceneChanged;
|
||||
|
||||
NetworkSceneManager.SwitchScene("Lobby");
|
||||
|
||||
if (NetworkManager.Singleton.IsHost)
|
||||
{
|
||||
clientSceneMap[NetworkManager.Singleton.LocalClientId] = SceneManager.GetActiveScene().buildIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleClientDisconnect(ulong clientId)
|
||||
{
|
||||
clientSceneMap.Remove(clientId);
|
||||
|
||||
if (clientIdToGuid.TryGetValue(clientId, out string guid))
|
||||
{
|
||||
clientIdToGuid.Remove(clientId);
|
||||
|
||||
if (clientData[guid].ClientId == clientId)
|
||||
{
|
||||
clientData.Remove(guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (clientId == NetworkManager.Singleton.LocalClientId)
|
||||
{
|
||||
gameNetPortal.OnUserDisconnectRequested -= HandleUserDisconnectRequested;
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback -= HandleClientDisconnect;
|
||||
gameNetPortal.OnClientSceneChanged -= HandleClientSceneChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleClientSceneChanged(ulong clientId, int sceneIndex)
|
||||
{
|
||||
clientSceneMap[clientId] = sceneIndex;
|
||||
}
|
||||
|
||||
private void HandleUserDisconnectRequested()
|
||||
{
|
||||
HandleClientDisconnect(NetworkManager.Singleton.LocalClientId);
|
||||
|
||||
NetworkManager.Singleton.StopHost();
|
||||
|
||||
ClearData();
|
||||
|
||||
SceneManager.LoadScene("TitleScene");
|
||||
}
|
||||
|
||||
private void HandleServerStarted()
|
||||
{
|
||||
if (!NetworkManager.Singleton.IsHost) { return; }
|
||||
|
||||
string clientGuid = Guid.NewGuid().ToString();
|
||||
string playerName = PlayerPrefs.GetString("PlayerName", "Missing Name");
|
||||
|
||||
clientData.Add(clientGuid, new PlayerData(playerName, NetworkManager.Singleton.LocalClientId));
|
||||
clientIdToGuid.Add(NetworkManager.Singleton.LocalClientId, clientGuid);
|
||||
}
|
||||
|
||||
private void ClearData()
|
||||
{
|
||||
clientData.Clear();
|
||||
clientIdToGuid.Clear();
|
||||
clientSceneMap.Clear();
|
||||
|
||||
gameInProgress = false;
|
||||
}
|
||||
|
||||
private void ApprovalCheck(byte[] connectionData, ulong clientId, NetworkManager.ConnectionApprovedDelegate callback)
|
||||
{
|
||||
if (connectionData.Length > MaxConnectionPayload)
|
||||
{
|
||||
callback(false, 0, false, null, null);
|
||||
return;
|
||||
}
|
||||
|
||||
string payload = Encoding.UTF8.GetString(connectionData);
|
||||
var connectionPayload = JsonUtility.FromJson<ConnectionPayload>(payload);
|
||||
|
||||
ConnectStatus gameReturnStatus = ConnectStatus.Success;
|
||||
|
||||
// This stops us from running multiple standalone builds since
|
||||
// they disconnect eachother when trying to join
|
||||
//
|
||||
// if (clientData.ContainsKey(connectionPayload.clientGUID))
|
||||
// {
|
||||
// ulong oldClientId = clientData[connectionPayload.clientGUID].ClientId;
|
||||
// StartCoroutine(WaitToDisconnectClient(oldClientId, ConnectStatus.LoggedInAgain));
|
||||
// }
|
||||
|
||||
if (gameInProgress)
|
||||
{
|
||||
gameReturnStatus = ConnectStatus.GameInProgress;
|
||||
}
|
||||
else if (clientData.Count >= maxPlayers)
|
||||
{
|
||||
gameReturnStatus = ConnectStatus.ServerFull;
|
||||
}
|
||||
|
||||
if (gameReturnStatus == ConnectStatus.Success)
|
||||
{
|
||||
clientSceneMap[clientId] = connectionPayload.clientScene;
|
||||
clientIdToGuid[clientId] = connectionPayload.clientGUID;
|
||||
clientData[connectionPayload.clientGUID] = new PlayerData(connectionPayload.playerName, clientId);
|
||||
}
|
||||
|
||||
callback(false, 0, true, null, null);
|
||||
|
||||
gameNetPortal.ServerToClientConnectResult(clientId, gameReturnStatus);
|
||||
|
||||
if (gameReturnStatus != ConnectStatus.Success)
|
||||
{
|
||||
StartCoroutine(WaitToDisconnectClient(clientId, gameReturnStatus));
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator WaitToDisconnectClient(ulong clientId, ConnectStatus reason)
|
||||
{
|
||||
gameNetPortal.ServerToClientSetDisconnectReason(clientId, reason);
|
||||
|
||||
yield return new WaitForSeconds(0);
|
||||
|
||||
KickClient(clientId);
|
||||
}
|
||||
|
||||
private void KickClient(ulong clientId)
|
||||
{
|
||||
NetworkObject networkObject = NetworkSpawnManager.GetPlayerNetworkObject(clientId);
|
||||
if (networkObject != null)
|
||||
{
|
||||
networkObject.Despawn(true);
|
||||
}
|
||||
|
||||
NetworkManager.Singleton.DisconnectClient(clientId);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Network/ServerGameNetPortal.cs.meta
Normal file
11
Assets/Scripts/Network/ServerGameNetPortal.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ad94afee15264f5479af33bf240c41af
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
using MLAPI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HelloWorld
|
||||
{
|
||||
public class depreciatedHelloWorldManager : MonoBehaviour
|
||||
{
|
||||
void OnGUI()
|
||||
{
|
||||
GUILayout.BeginArea(new Rect(10, 10, 300, 300));
|
||||
|
||||
StatusLabels();
|
||||
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
|
||||
static void StatusLabels()
|
||||
{
|
||||
var mode = NetworkManager.Singleton.IsHost ?
|
||||
"Host" : NetworkManager.Singleton.IsServer ? "Server" : "Client";
|
||||
|
||||
GUILayout.Label("Transport: " +
|
||||
NetworkManager.Singleton.NetworkConfig.NetworkTransport.GetType().Name);
|
||||
GUILayout.Label("Mode: " + mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Assets/Scripts/UI.meta
Normal file
8
Assets/Scripts/UI.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f55beb74a42509c49a5ba8bf49e0d8e2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scripts/UI/Lobby.meta
Normal file
8
Assets/Scripts/UI/Lobby.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bac1def4c30048140986167189190078
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
31
Assets/Scripts/UI/Lobby/LobbyPlayerCard.cs
Normal file
31
Assets/Scripts/UI/Lobby/LobbyPlayerCard.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LobbyPlayerCard : MonoBehaviour {
|
||||
|
||||
[Header("Panels")]
|
||||
[SerializeField] private GameObject waitingForPlayerPanel;
|
||||
[SerializeField] private GameObject playerDataPanel;
|
||||
|
||||
[Header("Data Display")]
|
||||
[SerializeField] private TMP_Text playerDisplayNameText;
|
||||
[SerializeField] private Image selectedCharacterImage;
|
||||
[SerializeField] private Toggle isReadyToggle;
|
||||
|
||||
public void UpdateDisplay(LobbyPlayerState lobbyPlayerState)
|
||||
{
|
||||
playerDisplayNameText.text = lobbyPlayerState.PlayerName;
|
||||
isReadyToggle.isOn = lobbyPlayerState.IsReady;
|
||||
|
||||
waitingForPlayerPanel.SetActive(false);
|
||||
playerDataPanel.SetActive(true);
|
||||
}
|
||||
|
||||
public void DisableDisplay()
|
||||
{
|
||||
waitingForPlayerPanel.SetActive(true);
|
||||
playerDataPanel.SetActive(false);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/UI/Lobby/LobbyPlayerCard.cs.meta
Normal file
11
Assets/Scripts/UI/Lobby/LobbyPlayerCard.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 311c1a64d12df464ab0b856d2aa3e5ae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
21
Assets/Scripts/UI/Lobby/LobbyPlayerState.cs
Normal file
21
Assets/Scripts/UI/Lobby/LobbyPlayerState.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using MLAPI.Serialization;
|
||||
|
||||
public struct LobbyPlayerState : INetworkSerializable {
|
||||
public ulong ClientId;
|
||||
public string PlayerName;
|
||||
public bool IsReady;
|
||||
|
||||
public LobbyPlayerState(ulong clientId, string playerName, bool isReady)
|
||||
{
|
||||
ClientId = clientId;
|
||||
PlayerName = playerName;
|
||||
IsReady = isReady;
|
||||
}
|
||||
|
||||
public void NetworkSerialize(NetworkSerializer serializer)
|
||||
{
|
||||
serializer.Serialize(ref ClientId);
|
||||
serializer.Serialize(ref PlayerName);
|
||||
serializer.Serialize(ref IsReady);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/UI/Lobby/LobbyPlayerState.cs.meta
Normal file
11
Assets/Scripts/UI/Lobby/LobbyPlayerState.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 81e16a8360aa6c94094061211aef3e66
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
155
Assets/Scripts/UI/Lobby/LobbyUI.cs
Normal file
155
Assets/Scripts/UI/Lobby/LobbyUI.cs
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
using System;
|
||||
using MLAPI;
|
||||
using MLAPI.Connection;
|
||||
using MLAPI.Messaging;
|
||||
using MLAPI.NetworkVariable.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LobbyUI : NetworkBehaviour {
|
||||
|
||||
[Header("References")]
|
||||
[SerializeField] private LobbyPlayerCard[] lobbyPlayerCards;
|
||||
[SerializeField] private Button startGameButton;
|
||||
|
||||
private NetworkList<LobbyPlayerState> lobbyPlayers = new NetworkList<LobbyPlayerState>();
|
||||
|
||||
public override void NetworkStart()
|
||||
{
|
||||
if (IsClient)
|
||||
{
|
||||
lobbyPlayers.OnListChanged += HandleLobbyPlayersStateChanged;
|
||||
}
|
||||
|
||||
if (IsServer)
|
||||
{
|
||||
startGameButton.gameObject.SetActive(true);
|
||||
|
||||
NetworkManager.Singleton.OnClientConnectedCallback += HandleClientConnected;
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback += HandleClientDisconnect;
|
||||
|
||||
foreach (NetworkClient client in NetworkManager.Singleton.ConnectedClientsList)
|
||||
{
|
||||
HandleClientConnected(client.ClientId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
lobbyPlayers.OnListChanged -= HandleLobbyPlayersStateChanged;
|
||||
|
||||
if (NetworkManager.Singleton)
|
||||
{
|
||||
NetworkManager.Singleton.OnClientConnectedCallback -= HandleClientConnected;
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback -= HandleClientDisconnect;
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsEveryoneReady()
|
||||
{
|
||||
// Make sure there is 3 players in the lobby
|
||||
if (lobbyPlayers.Count != 3)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: Need to add a check to make sure that 2 are runners and 1 is king
|
||||
|
||||
foreach (var player in lobbyPlayers)
|
||||
{
|
||||
if (!player.IsReady)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void HandleClientConnected(ulong clientId)
|
||||
{
|
||||
var playerData = ServerGameNetPortal.Instance.GetPlayerData(clientId);
|
||||
|
||||
if (!playerData.HasValue) { return; }
|
||||
|
||||
lobbyPlayers.Add(new LobbyPlayerState(
|
||||
clientId,
|
||||
playerData.Value.PlayerName,
|
||||
false
|
||||
));
|
||||
}
|
||||
|
||||
private void HandleClientDisconnect(ulong clientId)
|
||||
{
|
||||
for (int i = 0; i < lobbyPlayers.Count; i++)
|
||||
{
|
||||
if (lobbyPlayers[i].ClientId == clientId)
|
||||
{
|
||||
lobbyPlayers.RemoveAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ServerRpc(RequireOwnership = false)]
|
||||
private void ToggleReadyServerRpc(ServerRpcParams serverRpcParams = default)
|
||||
{
|
||||
for (int i = 0; i < lobbyPlayers.Count; i++)
|
||||
{
|
||||
if (lobbyPlayers[i].ClientId == serverRpcParams.Receive.SenderClientId)
|
||||
{
|
||||
lobbyPlayers[i] = new LobbyPlayerState(
|
||||
lobbyPlayers[i].ClientId,
|
||||
lobbyPlayers[i].PlayerName,
|
||||
!lobbyPlayers[i].IsReady
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ServerRpc(RequireOwnership = false)]
|
||||
private void StartGameServerRpc(ServerRpcParams serverRpcParams = default)
|
||||
{
|
||||
if (serverRpcParams.Receive.SenderClientId != NetworkManager.Singleton.LocalClientId) { return; }
|
||||
|
||||
if (!IsEveryoneReady()) { return; }
|
||||
|
||||
ServerGameNetPortal.Instance.StartGame();
|
||||
}
|
||||
|
||||
public void OnLeaveClicked()
|
||||
{
|
||||
GameNetPortal.Instance.RequestDisconnect();
|
||||
}
|
||||
|
||||
public void OnReadyClicked()
|
||||
{
|
||||
ToggleReadyServerRpc();
|
||||
}
|
||||
|
||||
public void OnStartGameClicked()
|
||||
{
|
||||
StartGameServerRpc();
|
||||
}
|
||||
|
||||
private void HandleLobbyPlayersStateChanged(NetworkListEvent<LobbyPlayerState> lobbyState)
|
||||
{
|
||||
for (int i = 0; i < lobbyPlayerCards.Length; i++)
|
||||
{
|
||||
if (lobbyPlayers.Count > i)
|
||||
{
|
||||
lobbyPlayerCards[i].UpdateDisplay(lobbyPlayers[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
lobbyPlayerCards[i].DisableDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
if(IsHost)
|
||||
{
|
||||
startGameButton.interactable = IsEveryoneReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/UI/Lobby/LobbyUI.cs.meta
Normal file
11
Assets/Scripts/UI/Lobby/LobbyUI.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ea8a020e40c2c2443810c67a957f44e0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scripts/UI/Title.meta
Normal file
8
Assets/Scripts/UI/Title.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 791d1f5615272234d89da9396541ce1d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
using MLAPI;
|
||||
using MLAPI.SceneManagement;
|
||||
using MLAPI.Transports.UNET;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
|
@ -12,12 +11,11 @@ public class ConnectButtons : MonoBehaviour {
|
|||
const string DEDICATED_SERVER_IP = "127.0.0.1";
|
||||
const int DEDICATED_SERVER_PORT = 7777;
|
||||
|
||||
private UNetTransport transport;
|
||||
|
||||
public GameObject ErrorPanel;
|
||||
public Text ErrorText;
|
||||
|
||||
public InputField ipAddressField;
|
||||
public TMP_InputField playerNameField;
|
||||
|
||||
private int connectionTimeoutTime = 5;
|
||||
|
||||
|
|
@ -25,30 +23,22 @@ public class ConnectButtons : MonoBehaviour {
|
|||
// Make sure the Error Panel is not enabled to start
|
||||
ErrorPanel.SetActive(false);
|
||||
|
||||
// Find the UNetTransport object that is associated with the NetworkManager
|
||||
transport = NetworkManager.Singleton.GetComponent<UNetTransport>();
|
||||
PlayerPrefs.GetString("PlayerName");
|
||||
}
|
||||
|
||||
// Connect to the dedicated server
|
||||
public void ConnectDedicatedServer () {
|
||||
// Set the connection address to be equal to the ip address of the dedicated server
|
||||
transport.ConnectAddress = DEDICATED_SERVER_IP;
|
||||
transport.ConnectPort = DEDICATED_SERVER_PORT;
|
||||
|
||||
// Set the password to connect with
|
||||
NetworkManager.Singleton.NetworkConfig.ConnectionData = System.Text.Encoding.ASCII.GetBytes("kingsrace");
|
||||
|
||||
// Start the client on the address
|
||||
NetworkManager.Singleton.StartClient();
|
||||
|
||||
// Run a coroutine to check if the client connects to the server
|
||||
StartCoroutine(checkIsConnectedClient());
|
||||
// Throw an error for now
|
||||
ThrowError("Not implemented yet.");
|
||||
}
|
||||
|
||||
// Host a private server
|
||||
public void HostPrivateServer() {
|
||||
NetworkManager.Singleton.StartHost();
|
||||
NetworkSceneManager.SwitchScene("Lobby");
|
||||
// Set the players name
|
||||
PlayerPrefs.SetString("PlayerName", playerNameField.text);
|
||||
|
||||
// Start a server and join (hosting)
|
||||
GameNetPortal.Instance.StartHost();
|
||||
}
|
||||
|
||||
// Connect to a private server via IP Address
|
||||
|
|
@ -64,15 +54,11 @@ public class ConnectButtons : MonoBehaviour {
|
|||
|
||||
// IP Address is valid - Attempt to connect
|
||||
|
||||
// Set the connection address to be equal to the ip address entered into the input field
|
||||
transport.ConnectAddress = ipAddress;
|
||||
transport.ConnectPort = port;
|
||||
// Set the players name
|
||||
PlayerPrefs.SetString("PlayerName", playerNameField.text);
|
||||
|
||||
// Set the password to connect with
|
||||
NetworkManager.Singleton.NetworkConfig.ConnectionData = System.Text.Encoding.ASCII.GetBytes("kingsrace");
|
||||
|
||||
// Start the client on the address
|
||||
NetworkManager.Singleton.StartClient();
|
||||
// Start the game client
|
||||
ClientGameNetPortal.Instance.StartClient(ipAddress, port);
|
||||
|
||||
// Run a coroutine to check if the client connects to the server
|
||||
StartCoroutine(checkIsConnectedClient());
|
||||
|
|
@ -12,14 +12,23 @@ EditorUserSettings:
|
|||
value: 22424703114646680e0b0227036c7b151b180b65082d2b3f6004083ff6e92434e3fe33fba92f31352d1b
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-2:
|
||||
value: 22424703114646680e0b0227036c6b19021b1d192f2d2835633c133af6f9
|
||||
value: 224247031146466f181a033019225303593b17282e3169032e2c1336f1af073be7e933d6cb353d3e204cfa320d2a18
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-3:
|
||||
value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb
|
||||
value: 224247031146466f181a033019225303593b17282e3169032e2c1336f1af073be7e933d6ca3b36327717e1351027
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-4:
|
||||
value: 224247031146466f181a033019225303593b17282e3169032e2c1336f1af073be7e933d6ca3f31297717e1351027
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-5:
|
||||
value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-6:
|
||||
value: 22424703114646680e0b0227036c731f1415016439262f2434
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-7:
|
||||
value: 22424703114646680e0b0227036c6b19021b1d192f2d2835633c133af6f9
|
||||
flags: 0
|
||||
UnityRemoteCompression:
|
||||
value: 337f73
|
||||
flags: 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user