absoulter basic join kram klappt

This commit is contained in:
DerTyp187
2021-12-16 00:04:36 +01:00
parent 8072265797
commit 82dc2c3c6c
25 changed files with 449 additions and 108 deletions

View File

@@ -26,6 +26,7 @@ Transform:
m_LocalRotation: {x: -0, y: 0.7071068, z: 0.7071068, w: 0}
m_LocalPosition: {x: 4.4113026, y: -1.3282752, z: 10.768935}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7365407325767981108}
m_RootOrder: 1
@@ -57,6 +58,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7365407325624913735}
m_Father: {fileID: 7365407325767981108}
@@ -64,7 +66,7 @@ Transform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &7365407324475125414
Animator:
serializedVersion: 3
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@@ -77,6 +79,7 @@ Animator:
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
@@ -107,6 +110,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7365407324475125409}
m_RootOrder: 0
@@ -130,7 +134,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &7365407325767981108
Transform:
m_ObjectHideFlags: 0
@@ -141,6 +145,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.108, y: -0.084, z: 0.266}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7365407324475125409}
- {fileID: 6708222704297240606}
@@ -193,7 +198,7 @@ BoxCollider:
m_GameObject: {fileID: 7365407325767981110}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Enabled: 0
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
@@ -239,6 +244,7 @@ Transform:
m_LocalRotation: {x: -0, y: 0.7071068, z: 0.7071068, w: 0}
m_LocalPosition: {x: 4.471302, y: -1.3182755, z: 10.768935}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7365407325767981108}
m_RootOrder: 2

View File

@@ -0,0 +1,46 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2150812009058835102
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3347479686264493447}
- component: {fileID: 8149741327840006972}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3347479686264493447
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2150812009058835102}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 5.459576, y: -4.2192264, z: -5.9449897}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8149741327840006972
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2150812009058835102}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8748c2c4324fa0942b14884b8873c8b2, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: a89988743206dad48b795c77ff2b011d
folderAsset: yes
DefaultImporter:
guid: d8211f6231dffa046a5ad222f3607548
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@@ -10,7 +10,7 @@ GameObject:
m_Component:
- component: {fileID: 7086846156459211593}
- component: {fileID: 7086846156459211639}
- component: {fileID: 8462299686178468946}
- component: {fileID: 7346916175116586392}
m_Layer: 0
m_Name: NetManager
m_TagString: NetManager
@@ -58,7 +58,7 @@ MonoBehaviour:
debugLog: 0
statisticsGUI: 0
statisticsLog: 0
--- !u!114 &8462299686178468946
--- !u!114 &7346916175116586392
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -67,7 +67,7 @@ MonoBehaviour:
m_GameObject: {fileID: 7086846156459211638}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8aab4c8111b7c411b9b92cf3dbc5bd4e, type: 3}
m_Script: {fileID: 11500000, guid: 1d8236d3922ab424d9f006270667d7a7, type: 3}
m_Name:
m_EditorClassIdentifier:
dontDestroyOnLoad: 1
@@ -84,4 +84,5 @@ MonoBehaviour:
playerPrefab: {fileID: 9010945563893975427, guid: fc0476cecf5ea1047aeb1f4981bfc16f, type: 3}
autoCreatePlayer: 1
playerSpawnMethod: 0
spawnPrefabs: []
spawnPrefabs:
- {fileID: 6272346181302961293, guid: a14d876ac00bdf6498e30b3e58b68fdf, type: 3}

View File

@@ -3237,9 +3237,7 @@ PrefabInstance:
propertyPath: m_Name
value: NetManager
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 0}
- {fileID: -802718431767115137, guid: 0f6d9d1e97686d34d9872b5028512de5, type: 3}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0f6d9d1e97686d34d9872b5028512de5, type: 3}
--- !u!1001 &7631475220867830191
PrefabInstance:

View File

@@ -2350,6 +2350,10 @@ PrefabInstance:
propertyPath: sceneId
value: 2342159728
objectReference: {fileID: 0}
- target: {fileID: 7129514368576730103, guid: af2b86e6ca1c8404a857e6bfa4294f3c, type: 3}
propertyPath: gameScene
value: Assets/Scenes/TestScene.unity
objectReference: {fileID: 0}
- target: {fileID: 7129514368576730103, guid: af2b86e6ca1c8404a857e6bfa4294f3c, type: 3}
propertyPath: rdyButton
value:
@@ -2358,6 +2362,10 @@ PrefabInstance:
propertyPath: rdyButtonText
value:
objectReference: {fileID: 594583495}
- target: {fileID: 7129514368576730103, guid: af2b86e6ca1c8404a857e6bfa4294f3c, type: 3}
propertyPath: GamePlayerPrefab
value:
objectReference: {fileID: 6272346181302961293, guid: a14d876ac00bdf6498e30b3e58b68fdf, type: 3}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: af2b86e6ca1c8404a857e6bfa4294f3c, type: 3}
--- !u!1001 &7946605864942981377

View File

@@ -132,7 +132,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 732033708985862910, guid: bd217f9f85ce78e46a925776562625e8, type: 3}
propertyPath: m_RootOrder
value: 2
value: 4
objectReference: {fileID: 0}
- target: {fileID: 732033708985862910, guid: bd217f9f85ce78e46a925776562625e8, type: 3}
propertyPath: m_LocalPosition.x
@@ -347,6 +347,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1351784394}
m_RootOrder: 2
@@ -383,6 +384,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -9.93, y: 5.64, z: 10.41}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1876458703}
m_RootOrder: 2
@@ -430,6 +432,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 4.12, y: 5.64, z: 11.09}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1876458703}
m_RootOrder: 3
@@ -479,6 +482,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -0.04, z: 0}
m_LocalScale: {x: 100, y: 0.1, z: 100}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1362549044}
m_RootOrder: 14
@@ -593,7 +597,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 732033708985862910, guid: bd217f9f85ce78e46a925776562625e8, type: 3}
propertyPath: m_RootOrder
value: 3
value: 5
objectReference: {fileID: 0}
- target: {fileID: 732033708985862910, guid: bd217f9f85ce78e46a925776562625e8, type: 3}
propertyPath: m_LocalPosition.x
@@ -719,6 +723,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1351784394}
m_RootOrder: 4
@@ -871,6 +876,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.35, y: 5.64, z: -1.12}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1876458703}
m_RootOrder: 0
@@ -999,9 +1005,10 @@ Transform:
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1001 &739500445
PrefabInstance:
@@ -1012,7 +1019,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
propertyPath: m_RootOrder
value: 0
value: 2
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
propertyPath: m_LocalPosition.x
@@ -1187,6 +1194,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -10.37, y: 5.64, z: -1.75}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1876458703}
m_RootOrder: 1
@@ -1332,6 +1340,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1351784394}
m_RootOrder: 1
@@ -1441,9 +1450,10 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1351784389
GameObject:
@@ -1554,6 +1564,7 @@ RectTransform:
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1729968088}
- {fileID: 987854207}
@@ -1563,7 +1574,7 @@ RectTransform:
- {fileID: 1684293625}
- {fileID: 1430445132}
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1603,6 +1614,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1351784394}
m_RootOrder: 6
@@ -1737,6 +1749,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1351784394}
m_RootOrder: 3
@@ -1871,7 +1884,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 732033708985862910, guid: bd217f9f85ce78e46a925776562625e8, type: 3}
propertyPath: m_RootOrder
value: 1
value: 3
objectReference: {fileID: 0}
- target: {fileID: 732033708985862910, guid: bd217f9f85ce78e46a925776562625e8, type: 3}
propertyPath: m_LocalPosition.x
@@ -1970,6 +1983,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.07, y: 0.07, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1351784394}
m_RootOrder: 5
@@ -2045,6 +2059,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1351784394}
m_RootOrder: 0
@@ -2196,13 +2211,14 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 5.94973, y: 3.086451, z: -1.6778176}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 655071530}
- {fileID: 753584349}
- {fileID: 76630395}
- {fileID: 104338203}
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2119583729
GameObject:
@@ -2296,9 +2312,10 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.5941708, y: -0.23374963, z: 0.91566634}
m_LocalScale: {x: 4.6584, y: 1, z: 14.388176}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1496806602367600913
PrefabInstance:
@@ -2309,7 +2326,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
propertyPath: m_RootOrder
value: 8
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
propertyPath: m_LocalPosition.x
@@ -2329,15 +2346,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
propertyPath: m_LocalRotation.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
propertyPath: m_LocalRotation.y
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
propertyPath: m_LocalRotation.z
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3365311783543717598, guid: 5cd2e2b44dc49ae44b48fc76a1e09712, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@@ -2386,7 +2403,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
propertyPath: m_RootOrder
value: 9
value: 10
objectReference: {fileID: 0}
- target: {fileID: 2849906635484503724, guid: f0c1bca3291086d449266d9ed8942180, type: 3}
propertyPath: m_LocalPosition.x
@@ -2531,3 +2548,64 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6085e69ed0e6e364ca7dbdebfe7786c6, type: 3}
--- !u!1001 &9102023066063660487
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -1930348665651757725, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: sceneId
value: 3411148912
objectReference: {fileID: 0}
- target: {fileID: 2150812009058835102, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_Name
value: GameManager
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalPosition.x
value: 5.459576
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalPosition.y
value: -4.2192264
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalPosition.z
value: -5.9449897
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3347479686264493447, guid: d8211f6231dffa046a5ad222f3607548, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d8211f6231dffa046a5ad222f3607548, type: 3}

View File

@@ -0,0 +1,9 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;
public class GameManager : NetworkBehaviour
{
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 435efa23db9058e4ba98afefb0f5f72e
guid: 8748c2c4324fa0942b14884b8873c8b2
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,9 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Lobby : MonoBehaviour
{
[SerializeField]
public List<LobbyPlayer> LobbyPlayers = new List<LobbyPlayer>();
}

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using Mirror;
using TMPro;
@@ -10,12 +11,18 @@ using TMPro;
/*
* The Lobby Class is used to give all LobbyPlayer an instance above them for managing purposes.
* You could write this into a NetworkManager, but I thought it would be nicer in a seperate script.
* The Lobby will always be the "Room", where all Players are connected to.
* In-Game AND in LobbyScene!
* It manages the Players
*/
public class Lobby : NetworkBehaviour
{
NetManagerScript networkManager;
List<Player> Players = new List<Player>();
[SerializeField] GameObject GamePlayerPrefab;
[SerializeField] [Scene] string gameScene;
// Sync Vars
[SyncVar] //A list of all connected player
public List<LobbyPlayer> LobbyPlayers = new List<LobbyPlayer>(); // All player a register themselves when they join (LobbyPlayer.cs)
@@ -26,26 +33,57 @@ public class Lobby : NetworkBehaviour
[SyncVar]
public bool allReady = false; // All players are ready?
public bool isLobbyScene;
void Start()
{
DontDestroyOnLoad(this);
networkManager = GameObject.Find("NetManager").GetComponent<NetManagerScript>();
}
void Update()
{
CheckLobbyPlayers(); // Checking the LobbyPlayer List
allReady = CheckAllReady(); // Continous checking if all player are ready
}
if(SceneManager.GetActiveScene().name == "Lobby") // Check if we are in-game
isLobbyScene = true;
else
isLobbyScene = false;
if (isLobbyScene)
{
CheckLobbyPlayers(); // Checking the LobbyPlayer List
allReady = CheckAllReady(); // Continous checking if all player are ready
}
else
{
CheckPlayers();
}
}
public void ChangeToPlayer(LobbyPlayer lobbyPlayer)
{
Debug.Log("Change");
var conn = lobbyPlayer.connectionToClient;
var newPlayerInstance = Instantiate(GamePlayerPrefab);
//newPlayerInstance.GetComponent<Player>().username = player.username;
NetworkServer.Destroy(conn.identity.gameObject);
NetworkServer.ReplacePlayerForConnection(conn, newPlayerInstance.gameObject);
LobbyPlayers.Remove(lobbyPlayer);
Players.Add(newPlayerInstance.gameObject.GetComponent<Player>());
//NetworkServer.Spawn(newPlayerInstance.gameObject, conn);
}
public void StartGame() // initializes the In-Game Scene and converts LobbyPlayers to GamePlayers
{
Debug.Log("START");
/* https://youtu.be/HZIzGLe-2f4?t=586
* Start Loading Panel
* Destroy LobbyPlayer
* Instatiate Player Objects and connect them to "conn"
* Switch Scene
*/
// https://youtu.be/HZIzGLe-2f4?t=586
networkManager.ServerChangeScene(gameScene);
}
#region LobbyPlayer Interaction (Public)
/* Public (Where the LobbyPlayer interacts with) */
public bool AuthHost(LobbyPlayer player) // Checks if player is the host
{
// In theory the host should always be the first connected player, which means he is index 0 in the LobbyPlayers-List
@@ -64,11 +102,17 @@ public class Lobby : NetworkBehaviour
}
}
public void RegisterPlayer(LobbyPlayer player) // Where a Player can register himself
public void RegisterLobbyPlayer(LobbyPlayer player) // Where a Player can register himself
{
LobbyPlayers.Add(player);
}
#endregion
public void RegisterPlayer(Player player) // Where a Player can register himself
{
Players.Add(player);
}
#region checks
/* Checks */
@@ -95,6 +139,17 @@ public class Lobby : NetworkBehaviour
}
}
}
void CheckPlayers()
{
foreach (Player player in Players)
{
if (player == null)
{
Players.Remove(player);
}
}
}
#endregion
#region hooks

View File

@@ -2,6 +2,7 @@ using UnityEngine;
using UnityEngine.UI; // For <Button>
using Mirror;
using TMPro;
using UnityEngine.SceneManagement;
/*
* This class manages the LobbyPlayer, which is the player object while the player is connected only to the lobby
@@ -37,12 +38,20 @@ public class LobbyPlayer : NetworkBehaviour
public override void OnStartClient()
{
lobby = GameObject.Find("LobbyManager").GetComponent<Lobby>(); // Get the Lobby Object in Scene
lobby.RegisterPlayer(this); // Register the LobbyPlayer, so the lobby can store him in a list for future use
if (SceneManager.GetActiveScene().name == "Lobby")
{
lobby.RegisterLobbyPlayer(this); // Register the LobbyPlayer, so the lobby can store him in a list for future use
}
else
{
lobby.ChangeToPlayer(this);
}
}
public void Start()
{
if (isLocalPlayer)
if (isLocalPlayer && SceneManager.GetActiveScene().name == "Lobby") // Needs to check Scene for itself -> it starts faster than the lobby
{
/*
* The Varaible Saver is used to store vars across different scenes and Player-Objects(LobbyPlayer/GamePlayer).
@@ -72,7 +81,7 @@ public class LobbyPlayer : NetworkBehaviour
void Update()
{
if (isLocalPlayer)
if (isLocalPlayer && lobby.isLobbyScene)
{
/*
* Update the "Ready-Button":

View File

@@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ReadyUp : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,14 @@
using System.Collections.Generic;
using Mirror;
using UnityEngine;
using UnityEngine.SceneManagement;
/* Our Custom Network Manager
*
*
*/
public class NetManagerScript : NetworkManager
{
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1d8236d3922ab424d9f006270667d7a7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -5,6 +5,7 @@ using Mirror;
public class Player : NetworkBehaviour
{
Lobby lobby;
public bool isAlive = true;
public Team team;
@@ -29,15 +30,17 @@ public class Player : NetworkBehaviour
private void Start()
{
GameManager = GameObject.Find("MatchController");
lobby = GameObject.Find("LobbyManager").GetComponent<Lobby>();
lobby.RegisterPlayer(this);
/*GameManager = GameObject.Find("MatchController");
gameMaster = GameManager.GetComponent<GameMaster>();
if (isServer)
{
health = defaultHp;
gameMaster.RegisterPlayer(GetComponent<Player>());
//respawnPos(gameMaster.RespawnRequest(this.gameObject, team.teamID));
}
}*/
}

View File

@@ -2,13 +2,14 @@
"dependencies": {
"com.hwaet.projectcloner": "https://github.com/hwaet/UnityProjectCloner.git",
"com.unity.animation.rigging": "1.1.1",
"com.unity.collab-proxy": "1.15.1",
"com.unity.collab-proxy": "1.15.4",
"com.unity.ide.rider": "3.0.7",
"com.unity.ide.visualstudio": "2.0.12",
"com.unity.ide.vscode": "1.2.4",
"com.unity.test-framework": "1.1.29",
"com.unity.textmeshpro": "3.0.6",
"com.unity.timeline": "1.6.2",
"com.unity.toolchain.win-x86_64-linux-x86_64": "0.1.21-preview",
"com.unity.ugui": "1.0.0",
"com.unity.visualscripting": "1.7.6",
"com.unity.modules.ai": "1.0.0",

View File

@@ -27,7 +27,7 @@
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "1.15.1",
"version": "1.15.4",
"depth": 0,
"source": "registry",
"dependencies": {
@@ -91,6 +91,22 @@
},
"url": "https://packages.unity.com"
},
"com.unity.sysroot": {
"version": "0.1.19-preview",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.sysroot.linux-x86_64": {
"version": "0.1.14-preview",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.sysroot": "0.1.18-preview"
},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.1.29",
"depth": 0,
@@ -123,6 +139,16 @@
},
"url": "https://packages.unity.com"
},
"com.unity.toolchain.win-x86_64-linux-x86_64": {
"version": "0.1.21-preview",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.sysroot": "0.1.19-preview",
"com.unity.sysroot.linux-x86_64": "0.1.14-preview"
},
"url": "https://packages.unity.com"
},
"com.unity.ugui": {
"version": "1.0.0",
"depth": 0,

View File

@@ -3,7 +3,7 @@
--- !u!129 &1
PlayerSettings:
m_ObjectHideFlags: 0
serializedVersion: 22
serializedVersion: 23
productGUID: 3c44c875d83ed1541af810b33229b838
AndroidProfiler: 0
AndroidFilterTouchesWhenObscured: 0
@@ -159,7 +159,7 @@ PlayerSettings:
tvOS: 0
overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 19
AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1
aotOptions:
@@ -215,6 +215,7 @@ PlayerSettings:
iOSLaunchScreeniPadCustomStoryboardPath:
iOSDeviceRequirements: []
iOSURLSchemes: []
macOSURLSchemes: []
iOSBackgroundModes: 0
iOSMetalForceHardShadows: 0
metalEditorSupport: 1
@@ -266,7 +267,99 @@ PlayerSettings:
AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150
m_BuildTargetIcons: []
m_BuildTargetPlatformIcons: []
m_BuildTargetPlatformIcons:
- m_BuildTarget: Android
m_Icons:
- m_Textures: []
m_Width: 432
m_Height: 432
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 324
m_Height: 324
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 216
m_Height: 216
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 162
m_Height: 162
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 108
m_Height: 108
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 81
m_Height: 81
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 0
m_SubKind:
m_BuildTargetBatching:
- m_BuildTarget: Standalone
m_StaticBatching: 1
@@ -318,7 +411,7 @@ PlayerSettings:
m_BuildTargetGraphicsAPIs:
- m_BuildTarget: AndroidPlayer
m_APIs: 150000000b000000
m_Automatic: 0
m_Automatic: 1
- m_BuildTarget: iOSSupport
m_APIs: 10000000
m_Automatic: 1
@@ -345,6 +438,7 @@ PlayerSettings:
m_BuildTargetGroupLightmapEncodingQuality: []
m_BuildTargetGroupLightmapSettings: []
m_BuildTargetNormalMapEncoding: []
m_BuildTargetDefaultTextureCompressionFormat: []
playModeTestRunnerEnabled: 0
runPlayModeTestAsEditModeTest: 0
actionOnDotNetUnhandledException: 1
@@ -494,7 +588,9 @@ PlayerSettings:
switchPlayerConnectionEnabled: 1
switchUseNewStyleFilepaths: 0
switchUseMicroSleepForYield: 1
switchEnableRamDiskSupport: 0
switchMicroSleepForYieldTime: 25
switchRamDiskSpaceSize: 12
ps4NPAgeRating: 12
ps4NPTitleSecret:
ps4NPTrophyPackPath:
@@ -565,7 +661,6 @@ PlayerSettings:
ps4videoRecordingFeaturesUsed: 0
ps4contentSearchFeaturesUsed: 0
ps4CompatibilityPS5: 0
ps4AllowPS5Detection: 0
ps4GPU800MHz: 1
ps4attribEyeToEyeDistanceSettingVR: 0
ps4IncludedModules: []
@@ -591,7 +686,7 @@ PlayerSettings:
webGLThreadsSupport: 0
webGLDecompressionFallback: 0
scriptingDefineSymbols:
1: MIRROR;MIRROR_17_0_OR_NEWER;MIRROR_18_0_OR_NEWER;MIRROR_24_0_OR_NEWER;MIRROR_26_0_OR_NEWER;MIRROR_27_0_OR_NEWER;MIRROR_28_0_OR_NEWER;MIRROR_29_0_OR_NEWER;MIRROR_30_0_OR_NEWER;MIRROR_30_5_2_OR_NEWER;MIRROR_32_1_2_OR_NEWER;MIRROR_32_1_4_OR_NEWER;MIRROR_35_0_OR_NEWER;MIRROR_35_1_OR_NEWER;MIRROR_37_0_OR_NEWER;MIRROR_38_0_OR_NEWER;MIRROR_39_0_OR_NEWER;MIRROR_40_0_OR_NEWER;MIRROR_41_0_OR_NEWER;MIRROR_42_0_OR_NEWER;MIRROR_43_0_OR_NEWER;MIRROR_44_0_OR_NEWER;MIRROR_46_0_OR_NEWER;MIRROR_47_0_OR_NEWER;MIRROR_53_0_OR_NEWER
Standalone: MIRROR;MIRROR_17_0_OR_NEWER;MIRROR_18_0_OR_NEWER;MIRROR_24_0_OR_NEWER;MIRROR_26_0_OR_NEWER;MIRROR_27_0_OR_NEWER;MIRROR_28_0_OR_NEWER;MIRROR_29_0_OR_NEWER;MIRROR_30_0_OR_NEWER;MIRROR_30_5_2_OR_NEWER;MIRROR_32_1_2_OR_NEWER;MIRROR_32_1_4_OR_NEWER;MIRROR_35_0_OR_NEWER;MIRROR_35_1_OR_NEWER;MIRROR_37_0_OR_NEWER;MIRROR_38_0_OR_NEWER;MIRROR_39_0_OR_NEWER;MIRROR_40_0_OR_NEWER;MIRROR_41_0_OR_NEWER;MIRROR_42_0_OR_NEWER;MIRROR_43_0_OR_NEWER;MIRROR_44_0_OR_NEWER;MIRROR_46_0_OR_NEWER;MIRROR_47_0_OR_NEWER;MIRROR_53_0_OR_NEWER
additionalCompilerArguments: {}
platformArchitecture: {}
scriptingBackend: {}
@@ -686,4 +781,6 @@ PlayerSettings:
organizationId:
cloudEnabled: 0
legacyClampBlendShapeWeights: 0
playerDataPath:
forceSRGBBlit: 1
virtualTexturingSupportEnabled: 0

View File

@@ -1,2 +1,2 @@
m_EditorVersion: 2021.2.4f1
m_EditorVersionWithRevision: 2021.2.4f1 (99ba6aa4c552)
m_EditorVersion: 2021.2.6f1
m_EditorVersionWithRevision: 2021.2.6f1 (8c4e826ba445)

View File

@@ -18,7 +18,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 1
skinWeights: 1
textureQuality: 1
anisotropicTextures: 0
antiAliasing: 0
@@ -40,6 +40,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Low
@@ -53,7 +54,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
skinWeights: 2
textureQuality: 0
anisotropicTextures: 0
antiAliasing: 0
@@ -75,6 +76,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Medium
@@ -88,7 +90,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
skinWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 0
@@ -110,6 +112,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: High
@@ -123,7 +126,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 2
skinWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 0
@@ -145,6 +148,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Very High
@@ -158,7 +162,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
skinWeights: 4
textureQuality: 0
anisotropicTextures: 2
antiAliasing: 2
@@ -180,6 +184,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Ultra
@@ -193,7 +198,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
skinWeights: 4
textureQuality: 0
anisotropicTextures: 2
antiAliasing: 2
@@ -215,6 +220,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
m_PerPlatformDefaultQuality:
Android: 2
@@ -223,6 +229,7 @@ QualitySettings:
Nintendo Switch: 5
PS4: 5
PSP2: 2
Server: 0
Stadia: 5
Standalone: 5
WebGL: 3

View File

@@ -12,10 +12,10 @@ EditorUserSettings:
value: 510150040406500e0b5c0f26497b0d44444f40297f7c76617f7d1e36bbe4623e
flags: 0
RecentlyUsedSceneGuid-2:
value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a
value: 5053560200055e0c5e0d0a2342735a44144e4d7e792a7764752f4a32e1b5313e
flags: 0
RecentlyUsedSceneGuid-3:
value: 5053560200055e0c5e0d0a2342735a44144e4d7e792a7764752f4a32e1b5313e
value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a
flags: 0
RecentlyUsedSceneGuid-4:
value: 500252525d020a0d0c5e0a73477a5e441515482c752b22622b794563e3e33560

View File

@@ -119,7 +119,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 0
controlID: 72
controlID: 42
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -144,7 +144,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192}
vertical: 1
controlID: 73
controlID: 43
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -169,7 +169,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 47
controlID: 21
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -189,8 +189,8 @@ MonoBehaviour:
y: 0
width: 324
height: 572
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 13}
m_Panes:
- {fileID: 13}
@@ -399,9 +399,9 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: a65f0000
m_SelectedIDs: 1e3b0000
m_LastClickedID: 0
m_ExpandedIDs: 5af4ffff2afbffff
m_ExpandedIDs: 52c3ffff90c4ffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -782,22 +782,22 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Scenes
- Assets/Scripts
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 64
m_LastFolders:
- Assets/Scenes
- Assets/Scripts
m_LastFoldersGridSize: -1
m_LastProjectPath: M:\Programs\Unity\PROJECTS\defrain
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 14}
m_SelectedIDs: 925f0000
m_LastClickedID: 24466
m_ExpandedIDs: 000000001a5f00001c5f00001e5f000000ca9a3b
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 4a950000
m_LastClickedID: 38218
m_ExpandedIDs: 000000003695000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -825,7 +825,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 000000001a5f00001c5f00001e5f0000
m_ExpandedIDs:
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name: