浏览代码

merging to staging

/main/staging/minigame_staging
当前提交
a312889d
共有 35 个文件被更改,包括 1650 次插入61 次删除
  1. 115
      Assets/Prefabs/GameManager.prefab
  2. 73
      Assets/Scenes/mainScene.unity
  3. 3
      Assets/Scripts/Game/ServerAddress.cs
  4. 1
      Assets/Scripts/Infrastructure/Messenger.cs
  5. 4
      Assets/Scripts/LobbyRelaySample.asmdef
  6. 2
      Packages/manifest.json
  7. 29
      Packages/packages-lock.json
  8. 73
      ProjectSettings/DynamicsManager.asset
  9. 12
      ProjectSettings/ProjectSettings.asset
  10. 8
      Assets/Prefabs/InGame.meta
  11. 8
      Assets/Scripts/Game/InGame.meta
  12. 273
      Assets/Prefabs/InGame/InGameLogic.prefab
  13. 7
      Assets/Prefabs/InGame/InGameLogic.prefab.meta
  14. 216
      Assets/Prefabs/InGame/SymbolContainer.prefab
  15. 7
      Assets/Prefabs/InGame/SymbolContainer.prefab.meta
  16. 19
      Assets/Prefabs/InGame/SymbolData.asset
  17. 8
      Assets/Prefabs/InGame/SymbolData.asset.meta
  18. 7
      Assets/Prefabs/InGame/SymbolObject.prefab.meta
  19. 157
      Assets/Prefabs/InGame/PlayerCursor.prefab
  20. 7
      Assets/Prefabs/InGame/PlayerCursor.prefab.meta
  21. 200
      Assets/Prefabs/InGame/SymbolObject.prefab
  22. 11
      Assets/Scripts/Game/InGame/InGameRunner.cs.meta
  23. 11
      Assets/Scripts/Game/InGame/SetupInGame.cs.meta
  24. 25
      Assets/Scripts/Game/InGame/SymbolContainer.cs
  25. 11
      Assets/Scripts/Game/InGame/SymbolContainer.cs.meta
  26. 18
      Assets/Scripts/Game/InGame/SymbolData.cs
  27. 11
      Assets/Scripts/Game/InGame/SymbolData.cs.meta
  28. 133
      Assets/Scripts/Game/InGame/InGameRunner.cs
  29. 85
      Assets/Scripts/Game/InGame/PlayerCursor.cs
  30. 11
      Assets/Scripts/Game/InGame/PlayerCursor.cs.meta
  31. 132
      Assets/Scripts/Game/InGame/SetupInGame.cs
  32. 23
      Assets/Scripts/Game/InGame/SymbolObject.cs
  33. 11
      Assets/Scripts/Game/InGame/SymbolObject.cs.meta

115
Assets/Prefabs/GameManager.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5395715167687395500
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 802462301182945455}
- component: {fileID: 6265861362966661484}
- component: {fileID: 5235782363599194820}
- component: {fileID: 2812013971948110896}
m_Layer: 0
m_Name: SetupInGame
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &802462301182945455
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5395715167687395500}
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: 7716713811812636911}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6265861362966661484
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5395715167687395500}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3f7533ddeca587549a9798a65a8670ba, type: 3}
m_Name:
m_EditorClassIdentifier:
m_prefabNetworkManager: {fileID: 238192747445020667, guid: 73173c97c128d614aa2a1167a2eaea68, type: 3}
m_lobbyObserver: {fileID: 5235782363599194820}
--- !u!114 &5235782363599194820
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5395715167687395500}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70dfc2fde0a9ef04eaff29a138f0bf45, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 6265861362966661484}
m_TargetAssemblyTypeName: LobbyRelaySample.inGame.SetupInGame, LobbyRelaySample
m_MethodName: SetRelayAddress
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &2812013971948110896
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5395715167687395500}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
OnObservedUpdated:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 6265861362966661484}
m_TargetAssemblyTypeName: LobbyRelaySample.inGame.SetupInGame, LobbyRelaySample
m_MethodName: OnLocalUserChange
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &7716713811812636896
GameObject:
m_ObjectHideFlags: 0

m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 624.1824, y: 320.50745, z: -29748.68}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 802462301182945455}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_Script: {fileID: 11500000, guid: b4f7225f73bfe6a4d9133ee45ac9cd73, type: 3}
m_Name:
m_EditorClassIdentifier:
m_logMode: 0
m_LobbyDataObservers:
- {fileID: 0}
- {fileID: 0}
m_LocalUserObservers:
- {fileID: 0}
m_LocalLobbyObservers: []
m_LocalUserObservers: []
m_vivoxUserHandlers: []
--- !u!114 &5193415626965589893
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: 9275e9be406280e4198464167a8b9186, type: 3}
m_Name:
m_EditorClassIdentifier:
m_updatePeriod: 2
m_durationToleranceMs: 50
m_doNotRemoveIfTooLong: 1

73
Assets/Scenes/mainScene.unity


m_Script: {fileID: 11500000, guid: edfa4d53eaae84c43ba581088940700c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &151543605 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2812013971948110896, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
m_PrefabInstance: {fileID: 7716713812904700119}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &203192673
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &624731420 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7174908818837526103, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
--- !u!1 &788267441 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8628454958398271551, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
--- !u!114 &818919068 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 9110417292276624615, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}

m_Script: {fileID: 11500000, guid: 78d292f3bd9f1614cb744dcb4fe3ac12, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1176462898 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 3513144941912357516, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1217229506 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6326316181187829680, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}

m_CorrespondingSourceObject: {fileID: 6606885600234288061, guid: 9aae991127b410c45a001ecd7f75311d, type: 3}
m_PrefabInstance: {fileID: 8628454959146822954}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_GameObject: {fileID: 788267441}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 51373dc3c6ac79b4f8e36ac7c4419205, type: 3}

m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6265861362966661484, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_disableWhileInGame.Array.size
value: 4
objectReference: {fileID: 0}
- target: {fileID: 6265861362966661484, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_disableWhileInGame.Array.data[0]
value:
objectReference: {fileID: 624731420}
- target: {fileID: 6265861362966661484, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_disableWhileInGame.Array.data[1]
value:
objectReference: {fileID: 1176462898}
- target: {fileID: 6265861362966661484, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_disableWhileInGame.Array.data[2]
value:
objectReference: {fileID: 788267441}
- target: {fileID: 6265861362966661484, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_disableWhileInGame.Array.data[3]
value:
objectReference: {fileID: 7866766}
- target: {fileID: 7716713811812636896, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_Name
value: GameManager

objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalUserObservers.Array.size
value: 6
value: 7
value: 7
value: 8
objectReference: {fileID: 0}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_vivoxUserHandlers.Array.data[0]

value:
objectReference: {fileID: 2637199315837045699}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalUserObservers.Array.data[6]
value:
objectReference: {fileID: 151543605}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalLobbyObservers.Array.data[0]
value:
objectReference: {fileID: 1412109061}

- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalLobbyObservers.Array.data[7]
value:
objectReference: {fileID: 1511612118}
objectReference: {fileID: 7716713812904700120}
- target: {fileID: 7716713811812636910, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
propertyPath: m_LocalLobbyObservers.Array.data[8]
value:

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
--- !u!114 &7716713812904700120 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5235782363599194820, guid: f80fc24bab3dcda459a2669321e2e5a4, type: 3}
m_PrefabInstance: {fileID: 7716713812904700119}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70dfc2fde0a9ef04eaff29a138f0bf45, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &8628454959146822954
PrefabInstance:
m_ObjectHideFlags: 0

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

3
Assets/Scripts/Game/ServerAddress.cs


string m_IP;
int m_Port;
public string IP => m_IP;
public int Port => m_Port;
public ServerAddress(string ip, int port)
{
m_IP = ip;

1
Assets/Scripts/Infrastructure/Messenger.cs


StartCountdown = 200,
CancelCountdown = 201,
CompleteCountdown = 202,
GameBeginning = 203,
DisplayErrorPopup = 300,
}

4
Assets/Scripts/LobbyRelaySample.asmdef


"GUID:4c3f49d89436d478ea78315c03159dcc",
"GUID:f2d49d9fa7e7eb3418e39723a7d3b92f",
"GUID:6087a74f6015aae4daed9a2577a7596c",
"GUID:4ebbcb26024b547159a86c39de1a8fa5"
"GUID:4ebbcb26024b547159a86c39de1a8fa5",
"GUID:3bf5041814073ec4089849c425919d5a",
"GUID:1491147abca9d7d4bb7105af628b223e"
],
"includePlatforms": [],
"excludePlatforms": [],

2
Packages/manifest.json


"com.unity.ide.rider": "3.0.7",
"com.unity.ide.visualstudio": "2.0.11",
"com.unity.ide.vscode": "1.2.4",
"com.unity.netcode.adapter.utp": "1.0.0-pre.2",
"com.unity.netcode.gameobjects": "1.0.0-pre.2",
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.render-pipelines.universal": "10.6.0",
"com.unity.services.authentication": "1.0.0-pre.6",

29
Packages/packages-lock.json


"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.netcode.adapter.utp": {
"version": "1.0.0-pre.2",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.netcode.gameobjects": "1.0.0-pre.2",
"com.unity.transport": "1.0.0-pre.6"
},
"url": "https://packages.unity.com"
},
"com.unity.netcode.gameobjects": {
"version": "1.0.0-pre.2",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.nuget.mono-cecil": "1.10.1",
"com.unity.collections": "1.0.0-pre.5"
},
"url": "https://packages.unity.com"
},
"com.unity.nuget.mono-cecil": {
"version": "1.10.1",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "2.0.0",
"depth": 0,

73
ProjectSettings/DynamicsManager.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!55 &1
PhysicsManager:
m_ObjectHideFlags: 0
serializedVersion: 13
m_Gravity: {x: 0, y: -9.81, z: 0}
m_DefaultMaterial: {fileID: 0}
m_BounceThreshold: 2
m_SleepThreshold: 0.005
m_DefaultContactOffset: 0.01
m_DefaultSolverIterations: 6
m_DefaultSolverVelocityIterations: 1
m_QueriesHitBackfaces: 0
m_QueriesHitTriggers: 1
m_EnableAdaptiveForce: 0
m_ClothInterCollisionDistance: 0.1
m_ClothInterCollisionStiffness: 0.2
m_ContactsGeneration: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_AutoSimulation: 1
m_AutoSyncTransforms: 0
m_ReuseCollisionCallbacks: 1
m_ClothInterCollisionSettingsToggle: 0
m_ClothGravity: {x: 0, y: -9.81, z: 0}
m_ContactPairsMode: 0
m_BroadphaseType: 0
m_WorldBounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 250, y: 250, z: 250}
m_WorldSubdivisions: 8
m_FrictionType: 0
m_EnableEnhancedDeterminism: 0
m_EnableUnifiedHeightmaps: 1
m_SolverType: 0
m_DefaultMaxAngularSpeed: 50
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!55 &1
PhysicsManager:
m_ObjectHideFlags: 0
serializedVersion: 13
m_Gravity: {x: 0, y: 0, z: 0}
m_DefaultMaterial: {fileID: 0}
m_BounceThreshold: 2
m_DefaultMaxDepenetrationVelocity: 10
m_SleepThreshold: 0.005
m_DefaultContactOffset: 0.01
m_DefaultSolverIterations: 6
m_DefaultSolverVelocityIterations: 1
m_QueriesHitBackfaces: 0
m_QueriesHitTriggers: 1
m_EnableAdaptiveForce: 0
m_ClothInterCollisionDistance: 0.1
m_ClothInterCollisionStiffness: 0.2
m_ContactsGeneration: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_AutoSimulation: 1
m_AutoSyncTransforms: 0
m_ReuseCollisionCallbacks: 1
m_ClothInterCollisionSettingsToggle: 0
m_ClothGravity: {x: 0, y: -9.81, z: 0}
m_ContactPairsMode: 0
m_BroadphaseType: 0
m_WorldBounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 250, y: 250, z: 250}
m_WorldSubdivisions: 8
m_FrictionType: 0
m_EnableEnhancedDeterminism: 0
m_EnableUnifiedHeightmaps: 1
m_SolverType: 0
m_DefaultMaxAngularSpeed: 50

12
ProjectSettings/ProjectSettings.asset


androidRenderOutsideSafeArea: 1
androidUseSwappy: 1
androidBlitType: 0
androidResizableWindow: 0
androidDefaultWindowWidth: 1920
androidDefaultWindowHeight: 1080
androidMinimumWindowWidth: 400
androidMinimumWindowHeight: 300
androidFullscreenMode: 1
defaultIsNativeResolution: 1
macRetinaSupport: 1
runInBackground: 1

bakeCollisionMeshes: 0
forceSingleInstance: 0
useFlipModelSwapchain: 1
resizableWindow: 0
resizableWindow: 1
useMacAppStoreValidation: 0
macAppStoreCategory: public.app-category.games
gpuSkinning: 0

vulkanEnableSetSRGBWrite: 0
vulkanEnablePreTransform: 0
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
m_SupportedAspectRatios:
4:3: 1
5:4: 1

useCustomGradlePropertiesTemplate: 0
useCustomProguardFile: 0
AndroidTargetArchitectures: 1
AndroidTargetDevices: 0
AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0}
AndroidKeystoreName:

height: 180
banner: {fileID: 0}
androidGamepadSupportLevel: 0
chromeosInputEmulation: 1
AndroidMinifyWithR8: 0
AndroidMinifyRelease: 0
AndroidMinifyDebug: 0

cameraUsageDescription:
locationUsageDescription:
microphoneUsageDescription:
bluetoothUsageDescription:
switchNMETAOverride:
switchNetLibKey:
switchSocketMemoryPoolSize: 6144

8
Assets/Prefabs/InGame.meta


fileFormatVersion: 2
guid: 3a0d1ac78c0fde0439b99a6a5bb4e4b4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Scripts/Game/InGame.meta


fileFormatVersion: 2
guid: f43593fb271f15b408f35b25f4fb10ee
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

273
Assets/Prefabs/InGame/InGameLogic.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &238192747445020667
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 485451675458297819}
m_Layer: 0
m_Name: InGameLogic
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &485451675458297819
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 238192747445020667}
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: 7668134686248305871}
- {fileID: 6532331214593598572}
- {fileID: 5289034077109495657}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &421060454917747513
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6532331214593598572}
- component: {fileID: 8873025738981341763}
m_Layer: 0
m_Name: InGameCamera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6532331214593598572
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 421060454917747513}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 485451675458297819}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &8873025738981341763
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 421060454917747513}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!1 &1306704497370578788
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5289034077109495657}
- component: {fileID: 8928417086886337167}
- component: {fileID: 6673480979101889538}
m_Layer: 0
m_Name: InGameRunner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5289034077109495657
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1306704497370578788}
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: 485451675458297819}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8928417086886337167
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1306704497370578788}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 951099334
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!114 &6673480979101889538
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1306704497370578788}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e30fcbc5a3738e94a87d7a028a2a6fba, type: 3}
m_Name:
m_EditorClassIdentifier:
m_playerCursorPrefab: {fileID: -1321688216342888635, guid: 905594b4ee5bb864a84af916cc445d1b, type: 3}
m_symbolContainerPrefab: {fileID: 3984715711634906321, guid: f42ed38d10b57ec48870f76a7a63389e, type: 3}
m_symbolObjectPrefab: {fileID: 1734492152380024498, guid: e371ca3112f9e244ab574b472387b64b, type: 3}
--- !u!1 &9019482255774987314
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7668134686248305871}
- component: {fileID: 4557534325444114211}
- component: {fileID: 5194253823978692452}
m_Layer: 0
m_Name: NGONetworkManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7668134686248305871
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9019482255774987314}
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: 485451675458297819}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4557534325444114211
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9019482255774987314}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 593a2fe42fa9d37498c96f9a383b6521, type: 3}
m_Name:
m_EditorClassIdentifier:
DontDestroy: 0
RunInBackground: 0
LogLevel: 1
NetworkConfig:
ProtocolVersion: 0
NetworkTransport: {fileID: 5194253823978692452}
PlayerPrefab: {fileID: 0}
NetworkPrefabs:
- Override: 0
Prefab: {fileID: 3227847727972158006, guid: 905594b4ee5bb864a84af916cc445d1b, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 5240148789413552765, guid: f42ed38d10b57ec48870f76a7a63389e, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 8828823320646980938, guid: e371ca3112f9e244ab574b472387b64b, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
TickRate: 30
ClientConnectionBufferTimeout: 10
ConnectionApproval: 0
ConnectionData:
EnableTimeResync: 0
TimeResyncInterval: 30
EnsureNetworkVariableLengthSafety: 0
EnableSceneManagement: 1
ForceSamePrefabs: 1
RecycleNetworkIds: 1
NetworkIdRecycleDelay: 120
RpcHashSize: 0
LoadSceneTimeOut: 120
MessageBufferTimeout: 20
EnableNetworkLogs: 1
--- !u!114 &5194253823978692452
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9019482255774987314}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6960e84d07fb87f47956e7a81d71c4e6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ProtocolType: 0
m_MaximumPacketSize: 1400
m_MaxPacketQueueSize: 128
m_SendQueueBatchSize: 6144
ConnectionData:
Address: 127.0.0.1
Port: 7777

7
Assets/Prefabs/InGame/InGameLogic.prefab.meta


fileFormatVersion: 2
guid: 73173c97c128d614aa2a1167a2eaea68
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

216
Assets/Prefabs/InGame/SymbolContainer.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5240148789413552765
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3305037517699072277}
- component: {fileID: 3984715711634906321}
- component: {fileID: 6367926983050135602}
- component: {fileID: 2974066117406568032}
- component: {fileID: 2302923454152093614}
- component: {fileID: 210836793418873202}
- component: {fileID: -8143583295587582139}
m_Layer: 0
m_Name: SymbolContainer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3305037517699072277
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5240148789413552765}
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: 4682315930965214729}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3984715711634906321
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5240148789413552765}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 951099334
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!54 &6367926983050135602
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5240148789413552765}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 120
m_CollisionDetection: 0
--- !u!114 &2974066117406568032
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5240148789413552765}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier:
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 1
SyncScaleY: 1
SyncScaleZ: 1
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
InLocalSpace: 0
Interpolate: 1
CanCommitToTransform: 0
--- !u!114 &2302923454152093614
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5240148789413552765}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f6c0be61502bb534f922ebb746851216, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &210836793418873202
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5240148789413552765}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 73a6c5df5c3139e448d76f8918fece73, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!65 &-8143583295587582139
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5240148789413552765}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &6633045103840132799
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4682315930965214729}
- component: {fileID: 1714068474508632102}
- component: {fileID: 7391847843263227954}
m_Layer: 0
m_Name: TempVisual
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4682315930965214729
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6633045103840132799}
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: 3305037517699072277}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1714068474508632102
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6633045103840132799}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7391847843263227954
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6633045103840132799}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}

7
Assets/Prefabs/InGame/SymbolContainer.prefab.meta


fileFormatVersion: 2
guid: f42ed38d10b57ec48870f76a7a63389e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

19
Assets/Prefabs/InGame/SymbolData.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26062727ed87bcc439ec8f0f86354a51, type: 3}
m_Name: SymbolData
m_EditorClassIdentifier:
m_availableSymbols:
- {fileID: 21300000, guid: f18a89c12a346a8488ed507a0bd79d2e, type: 3}
- {fileID: 21300000, guid: 7236d49fc9649dc44a67849a94ab3969, type: 3}
- {fileID: 21300000, guid: bc8c0e2bc04ce93488efe4ea898047a9, type: 3}
- {fileID: 21300000, guid: 0fca28892f34375439c32b1ee1c8d655, type: 3}

8
Assets/Prefabs/InGame/SymbolData.asset.meta


fileFormatVersion: 2
guid: 84a81a2f14d442a49b46eccefb73933f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

7
Assets/Prefabs/InGame/SymbolObject.prefab.meta


fileFormatVersion: 2
guid: e371ca3112f9e244ab574b472387b64b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

157
Assets/Prefabs/InGame/PlayerCursor.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3227847727972158006
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3227847727972158004}
- component: {fileID: -1321688216342888635}
- component: {fileID: 1724769857655924793}
- component: {fileID: 4403165428829500588}
- component: {fileID: 3227847727972158005}
- component: {fileID: -1476701697690489341}
m_Layer: 0
m_Name: PlayerCursor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3227847727972158004
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3227847727972158006}
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 &-1321688216342888635
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3227847727972158006}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 951099334
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!114 &1724769857655924793
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3227847727972158006}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier:
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 0
SyncRotAngleY: 0
SyncRotAngleZ: 0
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
InLocalSpace: 0
Interpolate: 0
CanCommitToTransform: 0
--- !u!114 &4403165428829500588
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3227847727972158006}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1dff2bc874952454c9da192885efd32b, type: 3}
m_Name:
m_EditorClassIdentifier:
m_renderer: {fileID: 3227847727972158005}
--- !u!212 &3227847727972158005
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3227847727972158006}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!65 &-1476701697690489341
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3227847727972158006}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 0.2}
m_Center: {x: 0, y: 0, z: 0}

7
Assets/Prefabs/InGame/PlayerCursor.prefab.meta


fileFormatVersion: 2
guid: 905594b4ee5bb864a84af916cc445d1b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

200
Assets/Prefabs/InGame/SymbolObject.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3226722501078289267
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2207893811600523791}
- component: {fileID: 6202594079177850961}
- component: {fileID: 8777844193165894662}
- component: {fileID: 1572105415912633256}
m_Layer: 0
m_Name: Visual
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2207893811600523791
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3226722501078289267}
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: 4221838266206954178}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6202594079177850961
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3226722501078289267}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &8777844193165894662
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3226722501078289267}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!135 &1572105415912633256
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3226722501078289267}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &8828823320646980938
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4221838266206954178}
- component: {fileID: 1734492152380024498}
- component: {fileID: 2622345469831693260}
- component: {fileID: 1363360377255918887}
- component: {fileID: -8192876538761676823}
m_Layer: 0
m_Name: SymbolObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4221838266206954178
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8828823320646980938}
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: 2207893811600523791}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1734492152380024498
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8828823320646980938}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 951099334
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!114 &2622345469831693260
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8828823320646980938}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
m_Name:
m_EditorClassIdentifier:
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 1
SyncScaleY: 1
SyncScaleZ: 1
PositionThreshold: 0.001
RotAngleThreshold: 0.01
ScaleThreshold: 0.01
InLocalSpace: 0
Interpolate: 1
CanCommitToTransform: 0
--- !u!65 &1363360377255918887
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8828823320646980938}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &-8192876538761676823
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8828823320646980938}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 63adacb71a52dcb41be1952af26573d8, type: 3}
m_Name:
m_EditorClassIdentifier:

11
Assets/Scripts/Game/InGame/InGameRunner.cs.meta


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

11
Assets/Scripts/Game/InGame/SetupInGame.cs.meta


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

25
Assets/Scripts/Game/InGame/SymbolContainer.cs


using Unity.Netcode;
using UnityEngine;
namespace LobbyRelaySample.inGame
{
[RequireComponent(typeof(Rigidbody))]
public class SymbolContainer : NetworkBehaviour
{
public void Start()
{
if (IsHost)
GetComponent<NetworkObject>().Spawn();
}
public override void OnNetworkSpawn()
{
if (IsHost)
{
Rigidbody m_rb = this.GetComponent<Rigidbody>();
m_rb.MovePosition(Vector3.up * 10);
m_rb.velocity = Vector3.down;
}
}
}
}

11
Assets/Scripts/Game/InGame/SymbolContainer.cs.meta


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

18
Assets/Scripts/Game/InGame/SymbolData.cs


using System.Collections.Generic;
using UnityEngine;
namespace LobbyRelaySample.inGame
{
public class SymbolData : ScriptableObject
{
[SerializeField] public List<Sprite> m_availableSymbols;
public int SymbolCount => m_availableSymbols.Count;
public Sprite GetSymbolForIndex(int index)
{
if (index < 0 || index >= m_availableSymbols.Count)
index = 0;
return m_availableSymbols[index];
}
}
}

11
Assets/Scripts/Game/InGame/SymbolData.cs.meta


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

133
Assets/Scripts/Game/InGame/InGameRunner.cs


using System;
using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;
namespace LobbyRelaySample.inGame
{
/// <summary>
/// Once the NetworkManager has been spawned, we need something to manage the game state and setup other in-game objects
/// that is itself a networked object, to track things like network connect events.
/// </summary>
public class InGameRunner : NetworkBehaviour
{
private Action m_onConnectionVerified;
private int m_expectedPlayerCount; // Used by the host, but we can't call the RPC until the network connection completes.
private bool m_canSpawnInGameObjects;
private const int k_symbolCount = 100;
private Queue<Vector2> m_pendingSymbolPositions = new Queue<Vector2>();
[SerializeField] private NetworkObject m_playerCursorPrefab;
[SerializeField] private NetworkObject m_symbolContainerPrefab;
private Transform m_symbolContainerInstance;
[SerializeField] private NetworkObject m_symbolObjectPrefab;
private NetworkList<ulong> m_connectedPlayerIds;
private ulong m_localClientId; // This is not necessarily the same as the OwnerClientId, since all clients will see all spawned objects regardless of ownership.
public void Initialize(Action onConnectionVerified, int expectedPlayerCount)
{
m_onConnectionVerified = onConnectionVerified;
m_expectedPlayerCount = expectedPlayerCount;
m_canSpawnInGameObjects = false;
}
public override void OnNetworkSpawn()
{
if (IsHost)
FinishInitialize();
m_localClientId = NetworkManager.Singleton.LocalClientId;
VerifyConnection_ServerRpc(m_localClientId);
}
public override void OnNetworkDespawn()
{
// This will be where to do full clean up?
UnityEngine.Debug.LogError("InGameRunner despawn");
}
private void FinishInitialize()
{
if (m_connectedPlayerIds != null)
m_connectedPlayerIds.Clear();
else
m_connectedPlayerIds = new NetworkList<ulong>();
m_symbolContainerInstance = NetworkObject.Instantiate(m_symbolContainerPrefab).transform;
ResetPendingSymbolPositions();
}
private void ResetPendingSymbolPositions()
{
m_pendingSymbolPositions.Clear();
for (int n = 0; n < k_symbolCount; n++)
{
// TEMP we need to do a BSP or some such to mix up the positions.
m_pendingSymbolPositions.Enqueue(new Vector2(-9 + (n % 10) * 2, n / 10 * 3));
}
}
/// <summary>
/// To verify the connection, invoke a server RPC call that then invokes a client RPC call.
/// </summary>
[ServerRpc(RequireOwnership = false)]
private void VerifyConnection_ServerRpc(ulong clientId)
{
VerifyConnection_ClientRpc(clientId);
// If not spawning things in the background, start that.
m_canSpawnInGameObjects = true;
}
[ClientRpc]
private void VerifyConnection_ClientRpc(ulong clientId)
{
if (clientId == m_localClientId)
VerifyConnectionConfirm_ServerRpc(m_localClientId);
}
/// <summary>
/// Once the connection is confirmed, check if all players have connected.
/// </summary>
[ServerRpc(RequireOwnership = false)]
private void VerifyConnectionConfirm_ServerRpc(ulong clientId)
{
NetworkObject playerCursor = NetworkObject.Instantiate(m_playerCursorPrefab);
playerCursor.SpawnWithOwnership(clientId);
playerCursor.name += clientId;
if (!m_connectedPlayerIds.Contains(clientId))
m_connectedPlayerIds.Add(clientId);
bool areAllPlayersConnected = m_connectedPlayerIds.Count >= m_expectedPlayerCount; // The game will begin at this point, or else there's a timeout for booting any unconnected players.
VerifyConnectionConfirm_ClientRpc(clientId, areAllPlayersConnected);
}
[ClientRpc]
private void VerifyConnectionConfirm_ClientRpc(ulong clientId, bool shouldStartImmediately)
{
if (clientId == m_localClientId)
m_onConnectionVerified?.Invoke();
if (shouldStartImmediately)
Locator.Get.Messenger.OnReceiveMessage(MessageType.GameBeginning, null);
}
// TODO: BSP for choosing symbol spawn positions?
// TODO: Remove the timer to test for packet loss.
private float m_timer = 0.04f; // We'll want to space out the object spawning a little to reduce the risk of packet loss. It will happen in the background, so we have time.
public void Update()
{
if (!m_canSpawnInGameObjects || m_symbolContainerInstance?.childCount >= k_symbolCount || !IsHost)
return;
if (m_pendingSymbolPositions.Count > 0)
{
m_timer -= Time.deltaTime;
if (m_timer < 0)
{
m_timer = 0.04f;
Vector3 pendingPos = m_pendingSymbolPositions.Dequeue();
NetworkObject symbolObj = NetworkObject.Instantiate(m_symbolObjectPrefab);
symbolObj.Spawn();
symbolObj.name = "Symbol" + (k_symbolCount - m_pendingSymbolPositions.Count);
symbolObj.TrySetParent(m_symbolContainerInstance, false);
symbolObj.transform.localPosition = pendingPos;
}
}
}
}
}

85
Assets/Scripts/Game/InGame/PlayerCursor.cs


using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;
namespace LobbyRelaySample.inGame
{
/// <summary>
/// Each player's cursor needs to be controlled by them and visible to the other players.
/// </summary>
public class PlayerCursor : NetworkBehaviour
{
private Camera m_mainCamera;
private NetworkVariable<Vector3> m_position = new NetworkVariable<Vector3>(NetworkVariableReadPermission.Everyone, Vector3.zero);
// The host is responsible for determining if a player has successfully selected a symbol object, since collisions should be handled serverside.
private List<SymbolObject> m_currentlyCollidingSymbols;
// We can't pass object references as RPC calls by default, and we don't have a different convenient way to, I think,
// get the object spawned on the server to assign some member on the client, so instead let's retrieve dynamically what we need.
// I guess I'd just have a "singleton" to hold the references?
public override void OnNetworkSpawn()
{
m_mainCamera = GameObject.Find("InGameCamera").GetComponent<Camera>();
if (IsHost)
m_currentlyCollidingSymbols = new List<SymbolObject>();
}
// Don't love having the input here, but it doesn't need to be anywhere else.
private bool IsSelectInputHit()
{
return Input.GetMouseButtonDown(0);
}
public void Update() // TODO: FixedUpdate?
{
transform.position = m_position.Value;
if (m_mainCamera == null || !IsOwner)
return;
Vector3 targetPos = (Vector2)m_mainCamera.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, -m_mainCamera.transform.position.z));
SetPosition_ServerRpc(targetPos); // Client can't set a network variable value.
if (IsSelectInputHit())
SendInput_ServerRpc();
}
[ServerRpc] // Leave RequireOwnership = true for these so that only the player whose cursor this is can make updates.
private void SetPosition_ServerRpc(Vector3 position)
{
m_position.Value = position;
}
[ServerRpc]
private void SendInput_ServerRpc()
{
if (m_currentlyCollidingSymbols.Count > 0)
{
SymbolObject symbol = m_currentlyCollidingSymbols[0];
m_currentlyCollidingSymbols.RemoveAt(0);
symbol.OnSelect();
}
}
public void OnTriggerEnter(Collider other)
{
if (!IsHost)
return;
SymbolObject symbol = other.GetComponent<SymbolObject>();
if (symbol == null)
return;
if (!m_currentlyCollidingSymbols.Contains(symbol))
m_currentlyCollidingSymbols.Add(symbol);
}
public void OnTriggerExit(Collider other)
{
if (!IsHost)
return;
SymbolObject symbol = other.GetComponent<SymbolObject>();
if (symbol == null)
return;
if (m_currentlyCollidingSymbols.Contains(symbol))
m_currentlyCollidingSymbols.Remove(symbol);
}
}
}

11
Assets/Scripts/Game/InGame/PlayerCursor.cs.meta


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

132
Assets/Scripts/Game/InGame/SetupInGame.cs


using System;
using Unity.Netcode;
using UnityEngine;
namespace LobbyRelaySample.inGame
{
/// <summary>
/// Once the local player is in a lobby and that lobby has entered the In-Game state, this will load in whatever is necessary to actually run the game part.
/// This will exist in the game scene so that it can hold references to scene objects that spawned prefab instances will need.
/// </summary>
public class SetupInGame : MonoBehaviour, IReceiveMessages
{
[SerializeField] private GameObject m_prefabNetworkManager = default;
[SerializeField] private LocalLobbyObserver m_lobbyObserver = default;
[SerializeField] private GameObject[] m_disableWhileInGame = default;
private GameObject m_inGameManagerObj;
private NetworkManager m_networkManager;
private InGameRunner m_inGameRunner;
private int m_playerCount; // The server will need to know this.
private bool m_isHost;
private bool m_doesNeedCleanup = false;
// TEMP? Relay stuff
private ServerAddress m_serverAddress;
private Action<UnityTransport> m_initializeTransport;
/*
* Things to do:
*
* x Disable whatever menu behaviors. Maintain a back button with additional RPC calls?
* --- Need to make RelayUtpClient not an MB so I can freely disable the menus? It is on the GameManager, as it happens, but...
* x Spawn the object with the NetworkManager and allow that to connect.
* - Wait for all players to connect, or boot a player after a few seconds (via Relay) if they did not connect.
* - While waiting, server selects the target sequence, spawns the symbol container, and starts pooling/spawning the symbol objects.
* - Once all players are in, show the target sequence and instructions, and then the server starts moving the symbol container and listening to click events.
* - After the symbols are all passed (I guess tracking the symbol container position or a timeout), finish the game (set the winner flag).
* x Clients clean up and return to the lobby screen. Host sets the lobby back to the regular state.
*
*/
public void Start()
{
Locator.Get.Messenger.Subscribe(this);
m_lobbyObserver.OnObservedUpdated.AddListener(UpdatePlayerCount);
}
public void OnDestroy()
{
Locator.Get.Messenger.Unsubscribe(this);
m_lobbyObserver.OnObservedUpdated.RemoveListener(UpdatePlayerCount);
}
private void SetMenuVisibility(bool areVisible)
{
foreach (GameObject go in m_disableWhileInGame)
go.SetActive(areVisible);
}
private void CreateNetworkManager()
{
m_inGameManagerObj = GameObject.Instantiate(m_prefabNetworkManager);
m_networkManager = m_inGameManagerObj.GetComponentInChildren<NetworkManager>();
m_inGameRunner = m_inGameManagerObj.GetComponentInChildren<InGameRunner>();
m_inGameRunner.Initialize(OnConnectionVerified, m_playerCount);
// TODO: I'll need this when we switch to the Relay Unity Transport option.
//UnityTransport transport = m_inGameManagerObj.GetComponentInChildren<UnityTransport>();
//transport.SetConnectionData(m_serverAddress.IP, (ushort)m_serverAddress.Port);
//m_initializeTransport(transport);
if (m_isHost)
m_networkManager.StartHost();
else
m_networkManager.StartClient();
}
private void UpdatePlayerCount(LocalLobby lobby)
{ m_playerCount = lobby.PlayerCount;
}
private void OnConnectionVerified()
{
// TODO: Anything here?
}
public void SetRelayAddress(LocalLobby changed)
{
m_serverAddress = changed.RelayServer; // Note that this could be null.
}
public void OnLocalUserChange(LobbyUser user)
{
m_isHost = user.IsHost;
}
public void SetRelayServerData(string address, int port, byte[] allocationBytes, byte[] key, byte[] connectionData, byte[] hostConnectionData, bool isSecure)
{
m_initializeTransport = (transport) => { transport.SetRelayServerData(address, (ushort)port, allocationBytes, key, connectionData, hostConnectionData, isSecure); };
}
public void OnReceiveMessage(MessageType type, object msg)
{
if (type == MessageType.ConfirmInGameState)
{
m_doesNeedCleanup = true;
SetMenuVisibility(false);
CreateNetworkManager();
}
else if (type == MessageType.GameBeginning)
{
// If this player hasn't successfully connected via NGO, get booted.
Locator.Get.Messenger.OnReceiveMessage(MessageType.DisplayErrorPopup, "Failed to join the game.");
// TODO: Need to handle both failing to connect and connecting but failing to initialize.
// I.e. cleaning up networked objects *might* be necessary.
}
else if (type == MessageType.ChangeGameState)
{
// Once we're in-game, any state change reflects the player leaving the game, so we should clean up.
if (m_doesNeedCleanup)
{
GameObject.Destroy(m_inGameManagerObj); // Since this destroys the NetworkManager, that will kick off cleaning up networked objects.
SetMenuVisibility(true);
m_doesNeedCleanup = false;
}
}
}
}
}

23
Assets/Scripts/Game/InGame/SymbolObject.cs


using Unity.Netcode;
using UnityEngine;
namespace LobbyRelaySample.inGame
{
public class SymbolObject : NetworkBehaviour
{
public void OnSelect()
{
Destroy_ServerRpc();
}
[ServerRpc(RequireOwnership = false)]
private void Destroy_ServerRpc()
{
// Actually destroying the symbol objects can cause garbage collection and other delays that might lead to desyncs.
// Instead, just deactivate the object, and it will be cleaned up once the NetworkManager is destroyed.
// (If object pooling, this is where to instead return it to the pool.)
this.transform.localPosition = Vector3.down * 500;
// TODO: Visually disappear immediately.
}
}
}

11
Assets/Scripts/Game/InGame/SymbolObject.cs.meta


fileFormatVersion: 2
guid: 63adacb71a52dcb41be1952af26573d8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存