From cb9e0fe3c0e561fef16cbbb37f353e6a9f8e5497 Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Sat, 17 Aug 2024 15:00:47 -0400 Subject: [PATCH] feat(Examples): PlayerControllerBase with Reliable / Unreliable Derived Classes (#3889) * Base Controllers and Reliable / Unreliable versions * Check Application.isFocused * Replaced PlayerController * TankTheftAuto - Use one of each Tank Prefab - Added Label for Reliable / Unreliable * TankControllerBase: Require TankHealth * TankHealth: Ensure finding correct TextMesh --- .../{Player.prefab => PlayerReliable.prefab} | 6 +- ...prefab.meta => PlayerReliable.prefab.meta} | 0 .../Prefabs/PlayerUnreliable.prefab | 385 ++++++++ .../Prefabs/PlayerUnreliable.prefab.meta | 7 + .../Examples/AdditiveLevels/Scripts/Portal.cs | 4 +- .../{Player.prefab => PlayerReliable.prefab} | 6 +- ...prefab.meta => PlayerReliable.prefab.meta} | 0 .../Prefabs/PlayerUnreliable.prefab | 402 ++++++++ .../Prefabs/PlayerUnreliable.prefab.meta | 7 + .../Characters/CharacterAssault.prefab | 116 +-- .../Prefabs/Characters/CharacterHeavy.prefab | 162 ++-- .../Prefabs/Characters/CharacterMedic.prefab | 162 ++-- .../{Player.prefab => PlayerReliable.prefab} | 176 ++-- ...prefab.meta => PlayerReliable.prefab.meta} | 0 .../Prefabs/PlayerUnreliable.prefab | 406 ++++++++ .../Prefabs/PlayerUnreliable.prefab.meta | 8 + ...yerPrefab.prefab => PlayerReliable.prefab} | 78 +- ...prefab.meta => PlayerReliable.prefab.meta} | 0 .../PlayerTest/PlayerUnreliable.prefab | 385 ++++++++ .../PlayerTest/PlayerUnreliable.prefab.meta | 7 + ...{TankPrefab.prefab => TankReliable.prefab} | 239 +++-- ...b.prefab.meta => TankReliable.prefab.meta} | 0 .../Examples/PlayerTest/TankUnreliable.prefab | 541 +++++++++++ .../PlayerTest/TankUnreliable.prefab.meta | 7 + ...layer.prefab => GamePlayerReliable.prefab} | 176 ++-- ...ab.meta => GamePlayerReliable.prefab.meta} | 0 .../Room/Prefabs/GamePlayerUnreliable.prefab | 403 ++++++++ .../Prefabs/GamePlayerUnreliable.prefab.meta | 8 + .../TankTheftAuto/MirrorTankTheftAuto.unity | 144 ++- .../{Player.prefab => PlayerReliable.prefab} | 76 +- ...prefab.meta => PlayerReliable.prefab.meta} | 0 .../Prefabs/PlayerUnreliable.prefab | 385 ++++++++ .../Prefabs/PlayerUnreliable.prefab.meta | 7 + ...{TankShared.prefab => TankReliable.prefab} | 528 ++++++----- ...d.prefab.meta => TankReliable.prefab.meta} | 0 .../Prefabs/TankUnreliable.prefab | 879 ++++++++++++++++++ .../Prefabs/TankUnreliable.prefab.meta | 7 + .../TankTheftAuto/Scripts/TankAuthority.cs | 4 +- .../Scripts/TankTheftAutoNetMan.cs | 2 +- .../_Common/Controllers/ContollerUIBase.cs | 2 - .../Controllers/ContollerUIBase.cs.meta | 2 +- ...erController.cs => FlyerControllerBase.cs} | 7 +- ...er.cs.meta => FlyerControllerBase.cs.meta} | 0 .../FlyerControllerReliable.cs | 8 + .../FlyerControllerReliable.cs.meta} | 2 +- .../FlyerController/FlyerControllerUI.cs | 2 +- .../FlyerControllerUnreliable.cs | 8 + .../FlyerControllerUnreliable.cs.meta} | 2 +- ...rController.cs => PlayerControllerBase.cs} | 6 +- .../PlayerControllerBase.cs.meta | 11 + .../PlayerControllerReliable.cs | 8 + .../PlayerControllerReliable.cs.meta | 11 + .../PlayerController/PlayerControllerUI.cs | 2 +- .../PlayerControllerUnreliable.cs | 8 + .../PlayerControllerUnreliable.cs.meta | 11 + ...ankController.cs => TankControllerBase.cs} | 10 +- ...ler.cs.meta => TankControllerBase.cs.meta} | 0 .../TankController/TankControllerReliable.cs | 8 + .../TankControllerReliable.cs.meta | 11 + .../TankController/TankControllerUI.cs | 2 +- .../TankControllerUnreliable.cs | 8 + .../TankControllerUnreliable.cs.meta | 11 + .../Controllers/TankController/TankHealth.cs | 2 +- .../{TankTurret.cs => TankTurretBase.cs} | 43 +- .../TankController/TankTurretBase.cs.meta | 11 + .../TankController/TankTurretReliable.cs | 62 ++ .../TankController/TankTurretReliable.cs.meta | 11 + .../TankController/TankTurretUnreliable.cs | 62 ++ .../TankTurretUnreliable.cs.meta | 11 + .../Controllers/TankController/TurretUI.cs | 2 +- 70 files changed, 5112 insertions(+), 955 deletions(-) rename Assets/Mirror/Examples/AdditiveLevels/Prefabs/{Player.prefab => PlayerReliable.prefab} (98%) rename Assets/Mirror/Examples/AdditiveLevels/Prefabs/{Player.prefab.meta => PlayerReliable.prefab.meta} (100%) create mode 100644 Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerUnreliable.prefab create mode 100644 Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerUnreliable.prefab.meta rename Assets/Mirror/Examples/AdditiveScenes/Prefabs/{Player.prefab => PlayerReliable.prefab} (98%) rename Assets/Mirror/Examples/AdditiveScenes/Prefabs/{Player.prefab.meta => PlayerReliable.prefab.meta} (100%) create mode 100644 Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerUnreliable.prefab create mode 100644 Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerUnreliable.prefab.meta rename Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/{Player.prefab => PlayerReliable.prefab} (99%) rename Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/{Player.prefab.meta => PlayerReliable.prefab.meta} (100%) create mode 100644 Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerUnreliable.prefab create mode 100644 Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerUnreliable.prefab.meta rename Assets/Mirror/Examples/PlayerTest/{PlayerPrefab.prefab => PlayerReliable.prefab} (99%) rename Assets/Mirror/Examples/PlayerTest/{PlayerPrefab.prefab.meta => PlayerReliable.prefab.meta} (100%) create mode 100644 Assets/Mirror/Examples/PlayerTest/PlayerUnreliable.prefab create mode 100644 Assets/Mirror/Examples/PlayerTest/PlayerUnreliable.prefab.meta rename Assets/Mirror/Examples/PlayerTest/{TankPrefab.prefab => TankReliable.prefab} (98%) rename Assets/Mirror/Examples/PlayerTest/{TankPrefab.prefab.meta => TankReliable.prefab.meta} (100%) create mode 100644 Assets/Mirror/Examples/PlayerTest/TankUnreliable.prefab create mode 100644 Assets/Mirror/Examples/PlayerTest/TankUnreliable.prefab.meta rename Assets/Mirror/Examples/Room/Prefabs/{GamePlayer.prefab => GamePlayerReliable.prefab} (99%) rename Assets/Mirror/Examples/Room/Prefabs/{GamePlayer.prefab.meta => GamePlayerReliable.prefab.meta} (100%) create mode 100644 Assets/Mirror/Examples/Room/Prefabs/GamePlayerUnreliable.prefab create mode 100644 Assets/Mirror/Examples/Room/Prefabs/GamePlayerUnreliable.prefab.meta rename Assets/Mirror/Examples/TankTheftAuto/Prefabs/{Player.prefab => PlayerReliable.prefab} (98%) rename Assets/Mirror/Examples/TankTheftAuto/Prefabs/{Player.prefab.meta => PlayerReliable.prefab.meta} (100%) create mode 100644 Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerUnreliable.prefab create mode 100644 Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerUnreliable.prefab.meta rename Assets/Mirror/Examples/TankTheftAuto/Prefabs/{TankShared.prefab => TankReliable.prefab} (85%) rename Assets/Mirror/Examples/TankTheftAuto/Prefabs/{TankShared.prefab.meta => TankReliable.prefab.meta} (100%) create mode 100644 Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankUnreliable.prefab create mode 100644 Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankUnreliable.prefab.meta rename Assets/Mirror/Examples/_Common/Controllers/FlyerController/{FlyerController.cs => FlyerControllerBase.cs} (99%) rename Assets/Mirror/Examples/_Common/Controllers/FlyerController/{FlyerController.cs.meta => FlyerControllerBase.cs.meta} (100%) create mode 100644 Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerReliable.cs rename Assets/Mirror/Examples/_Common/Controllers/{PlayerController/PlayerController.cs.meta => FlyerController/FlyerControllerReliable.cs.meta} (86%) create mode 100644 Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUnreliable.cs rename Assets/Mirror/Examples/_Common/Controllers/{TankController/TankTurret.cs.meta => FlyerController/FlyerControllerUnreliable.cs.meta} (86%) rename Assets/Mirror/Examples/_Common/Controllers/PlayerController/{PlayerController.cs => PlayerControllerBase.cs} (99%) create mode 100644 Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerBase.cs.meta create mode 100644 Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerReliable.cs create mode 100644 Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerReliable.cs.meta create mode 100644 Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUnreliable.cs create mode 100644 Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUnreliable.cs.meta rename Assets/Mirror/Examples/_Common/Controllers/TankController/{TankController.cs => TankControllerBase.cs} (98%) rename Assets/Mirror/Examples/_Common/Controllers/TankController/{TankController.cs.meta => TankControllerBase.cs.meta} (100%) create mode 100644 Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerReliable.cs create mode 100644 Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerReliable.cs.meta create mode 100644 Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUnreliable.cs create mode 100644 Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUnreliable.cs.meta rename Assets/Mirror/Examples/_Common/Controllers/TankController/{TankTurret.cs => TankTurretBase.cs} (89%) create mode 100644 Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretBase.cs.meta create mode 100644 Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretReliable.cs create mode 100644 Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretReliable.cs.meta create mode 100644 Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretUnreliable.cs create mode 100644 Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretUnreliable.cs.meta diff --git a/Assets/Mirror/Examples/AdditiveLevels/Prefabs/Player.prefab b/Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerReliable.prefab similarity index 98% rename from Assets/Mirror/Examples/AdditiveLevels/Prefabs/Player.prefab rename to Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerReliable.prefab index 365f2c6ff..fde72e1a9 100644 --- a/Assets/Mirror/Examples/AdditiveLevels/Prefabs/Player.prefab +++ b/Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerReliable.prefab @@ -177,7 +177,7 @@ GameObject: - component: {fileID: 1763152038191860132} - component: {fileID: 1747637013460943425} m_Layer: 0 - m_Name: Player + m_Name: PlayerReliable m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -275,7 +275,7 @@ MonoBehaviour: m_GameObject: {fileID: 7619140271685878370} m_Enabled: 0 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e212b6697536124ca0e7791fe5d8d6b, type: 3} + m_Script: {fileID: 11500000, guid: 497221e839119e34b897d6c497cbc8e5, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 0 @@ -309,7 +309,7 @@ MonoBehaviour: horizontal: 0 vertical: 0 mouseInputX: 0 - mouseSensitivity: 0.01 + mouseSensitivity: 0 turnSpeed: 0 jumpSpeed: 0 animVelocity: 0 diff --git a/Assets/Mirror/Examples/AdditiveLevels/Prefabs/Player.prefab.meta b/Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerReliable.prefab.meta similarity index 100% rename from Assets/Mirror/Examples/AdditiveLevels/Prefabs/Player.prefab.meta rename to Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerReliable.prefab.meta diff --git a/Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerUnreliable.prefab b/Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerUnreliable.prefab new file mode 100644 index 000000000..f93da7abf --- /dev/null +++ b/Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerUnreliable.prefab @@ -0,0 +1,385 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1724664263041697580 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7513987664611104733} + - component: {fileID: 3866048407219963700} + - component: {fileID: 6667391912482377964} + m_Layer: 0 + m_Name: Visor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7513987664611104733 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1724664263041697580} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.39999998, z: 0.5} + m_LocalScale: {x: 0.5, y: 0.1, z: 0.2} + m_Children: [] + m_Father: {fileID: 962190737825349125} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &3866048407219963700 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1724664263041697580} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6667391912482377964 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1724664263041697580} + 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_RenderingLayerMask: 4294967295 + 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: 0 + 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 +--- !u!1 &5620029719931856626 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 962190737825349125} + - component: {fileID: 8168211270351413936} + - component: {fileID: 5601443051240418659} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &962190737825349125 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5620029719931856626} + 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: 7513987664611104733} + m_Father: {fileID: 464867598898769114} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8168211270351413936 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5620029719931856626} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &5601443051240418659 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5620029719931856626} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 6b7039502d1528a4db29c4d43d159b01, type: 2} + 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 +--- !u!1 &7619140271685878370 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 464867598898769114} + - component: {fileID: 5674344380471455553} + - component: {fileID: -903079073849018483} + - component: {fileID: 5462452979215896872} + - component: {fileID: -2422551836510166228} + - component: {fileID: 1763152038191860132} + - component: {fileID: 1747637013460943425} + - component: {fileID: -8751611566496799529} + - component: {fileID: -156360445163968950} + m_Layer: 0 + m_Name: PlayerUnreliable + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &464867598898769114 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7619140271685878370} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.08, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 962190737825349125} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5674344380471455553 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7619140271685878370} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 2403673814 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!114 &-903079073849018483 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7619140271685878370} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0.1 + offset: {x: 0, y: 3, z: -8} + rotation: {x: 10, y: 0, z: 0} +--- !u!143 &5462452979215896872 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7619140271685878370} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 0, z: 0} +--- !u!136 &-2422551836510166228 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7619140271685878370} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &1763152038191860132 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7619140271685878370} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &1747637013460943425 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7619140271685878370} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0.1 + color: + serializedVersion: 2 + rgba: 4278190080 +--- !u!114 &-8751611566496799529 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7619140271685878370} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 464867598898769114} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &-156360445163968950 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7619140271685878370} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f81b59082839c2e40938767457bb91ae, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + characterController: {fileID: 5462452979215896872} + ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + StrafeLeft: 97 + StrafeRight: 100 + TurnLeft: 113 + TurnRight: 101 + Jump: 32 + optionsKeys: + MouseSteer: 109 + AutoRun: 114 + ToggleUI: 117 + controlOptions: 4 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + initialJumpSpeed: 2.5 + maxJumpSpeed: 3.5 + jumpAcceleration: 4 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + mouseInputX: 0 + mouseSensitivity: 0 + turnSpeed: 0 + jumpSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} diff --git a/Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerUnreliable.prefab.meta b/Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerUnreliable.prefab.meta new file mode 100644 index 000000000..1591c6a2c --- /dev/null +++ b/Assets/Mirror/Examples/AdditiveLevels/Prefabs/PlayerUnreliable.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bf7debf03638cd941a45060adab91cb2 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/AdditiveLevels/Scripts/Portal.cs b/Assets/Mirror/Examples/AdditiveLevels/Scripts/Portal.cs index a06397c94..77a81b372 100644 --- a/Assets/Mirror/Examples/AdditiveLevels/Scripts/Portal.cs +++ b/Assets/Mirror/Examples/AdditiveLevels/Scripts/Portal.cs @@ -50,7 +50,7 @@ void OnTriggerEnter(Collider other) if (!other.CompareTag("Player")) return; // applies to host client on server and remote clients - if (other.TryGetComponent(out Common.Controllers.Player.PlayerController playerController)) + if (other.TryGetComponent(out Common.Controllers.Player.PlayerControllerBase playerController)) playerController.enabled = false; if (isServer) @@ -93,7 +93,7 @@ IEnumerator SendPlayerToNewScene(GameObject player) // host client playerController would have been disabled by OnTriggerEnter above // Remote client players are respawned with playerController already enabled - if (NetworkClient.localPlayer != null && NetworkClient.localPlayer.TryGetComponent(out Common.Controllers.Player.PlayerController playerController)) + if (NetworkClient.localPlayer != null && NetworkClient.localPlayer.TryGetComponent(out Common.Controllers.Player.PlayerControllerBase playerController)) playerController.enabled = true; } } diff --git a/Assets/Mirror/Examples/AdditiveScenes/Prefabs/Player.prefab b/Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerReliable.prefab similarity index 98% rename from Assets/Mirror/Examples/AdditiveScenes/Prefabs/Player.prefab rename to Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerReliable.prefab index 75ed69076..2eaa35c36 100644 --- a/Assets/Mirror/Examples/AdditiveScenes/Prefabs/Player.prefab +++ b/Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerReliable.prefab @@ -178,7 +178,7 @@ GameObject: - component: {fileID: -4778368485878020104} - component: {fileID: 2215085456550962973} m_Layer: 0 - m_Name: Player + m_Name: PlayerReliable m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -276,7 +276,7 @@ MonoBehaviour: m_GameObject: {fileID: 8872462076811691049} m_Enabled: 0 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e212b6697536124ca0e7791fe5d8d6b, type: 3} + m_Script: {fileID: 11500000, guid: 497221e839119e34b897d6c497cbc8e5, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 0 @@ -310,7 +310,7 @@ MonoBehaviour: horizontal: 0 vertical: 0 mouseInputX: 0 - mouseSensitivity: 0.01 + mouseSensitivity: 0 turnSpeed: 0 jumpSpeed: 0 animVelocity: 0 diff --git a/Assets/Mirror/Examples/AdditiveScenes/Prefabs/Player.prefab.meta b/Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerReliable.prefab.meta similarity index 100% rename from Assets/Mirror/Examples/AdditiveScenes/Prefabs/Player.prefab.meta rename to Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerReliable.prefab.meta diff --git a/Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerUnreliable.prefab b/Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerUnreliable.prefab new file mode 100644 index 000000000..b574c6435 --- /dev/null +++ b/Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerUnreliable.prefab @@ -0,0 +1,402 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4415124803507263412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9057824595171805708} + - component: {fileID: 662729490405160656} + - component: {fileID: 3624570427921084598} + m_Layer: 8 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &9057824595171805708 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + 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: 3254954141432383832} + m_Father: {fileID: 5328458565928408179} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &662729490405160656 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &3624570427921084598 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 792117fe9a386a8489e8010bec746339, type: 2} + 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: 0 + 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 +--- !u!1 &5815001218983416211 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3254954141432383832} + - component: {fileID: 1800893346221236401} + - component: {fileID: 136369082707552984} + m_Layer: 8 + m_Name: Visor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3254954141432383832 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.39999998, z: 0.5} + m_LocalScale: {x: 0.5, y: 0.1, z: 0.2} + m_Children: [] + m_Father: {fileID: 9057824595171805708} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1800893346221236401 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &136369082707552984 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + 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_RenderingLayerMask: 4294967295 + 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: 0 + 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 +--- !u!1 &8872462076811691049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5328458565928408179} + - component: {fileID: 8537344390966522168} + - component: {fileID: -2082299755652640335} + - component: {fileID: 8993127209816276930} + - component: {fileID: 1143206540915927667} + - component: {fileID: 3175779197224890082} + - component: {fileID: -4778368485878020104} + - component: {fileID: 2215085456550962973} + - component: {fileID: 6238099575933976834} + - component: {fileID: 6153350340234588373} + m_Layer: 0 + m_Name: PlayerUnreliable + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5328458565928408179 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.08, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 9057824595171805708} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8537344390966522168 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 1525761586 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!114 &-2082299755652640335 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0.1 + offset: {x: 0, y: 3, z: -8} + rotation: {x: 10, y: 0, z: 0} +--- !u!143 &8993127209816276930 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 0, z: 0} +--- !u!136 &1143206540915927667 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &3175779197224890082 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &-4778368485878020104 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b2e242ee38a14076a39934172a19079b, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0.1 + visRange: 40 +--- !u!114 &2215085456550962973 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + color: + serializedVersion: 2 + rgba: 4278190080 +--- !u!114 &6238099575933976834 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 5328458565928408179} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &6153350340234588373 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f81b59082839c2e40938767457bb91ae, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + characterController: {fileID: 8993127209816276930} + ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + StrafeLeft: 97 + StrafeRight: 100 + TurnLeft: 113 + TurnRight: 101 + Jump: 32 + optionsKeys: + MouseSteer: 109 + AutoRun: 114 + ToggleUI: 117 + controlOptions: 4 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + initialJumpSpeed: 2.5 + maxJumpSpeed: 3.5 + jumpAcceleration: 4 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + mouseInputX: 0 + mouseSensitivity: 0 + turnSpeed: 0 + jumpSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} diff --git a/Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerUnreliable.prefab.meta b/Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerUnreliable.prefab.meta new file mode 100644 index 000000000..a4d33f1ab --- /dev/null +++ b/Assets/Mirror/Examples/AdditiveScenes/Prefabs/PlayerUnreliable.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6efc7d7e2d0d3b749b0819e56f989038 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterAssault.prefab b/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterAssault.prefab index c494b6692..153f710c0 100644 --- a/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterAssault.prefab +++ b/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterAssault.prefab @@ -1397,14 +1397,14 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 3074504447143314538} + - component: {fileID: 108717044788610704} + - component: {fileID: 7793988651217454999} - component: {fileID: 7573674391122441047} - component: {fileID: 751312970937383153} - - component: {fileID: 7793988651217454999} - component: {fileID: -5286820321314269966} - - component: {fileID: 108717044788610704} - - component: {fileID: 6941538328588326580} - - component: {fileID: 4466657976286750537} - - component: {fileID: 8165614180483664709} + - component: {fileID: -7583946280607460006} + - component: {fileID: -6913491101915066918} + - component: {fileID: 5149898387657116502} m_Layer: 0 m_Name: CharacterAssault m_TagString: Untagged @@ -1429,6 +1429,51 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &108717044788610704 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3074504447143314537} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e04a8cb02afdc4e778925020d233d718, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0.1 + floatingInfo: {fileID: 1426017862} + characterNumber: 0 + textMeshName: {fileID: 1898764923} + playerName: + characterColour: {r: 0, g: 0, b: 0, a: 0} + characterRenderers: + - {fileID: 3074504447607218934} + - {fileID: 3074504445674343825} + - {fileID: 3074504447096303303} + - {fileID: 3074504445720021774} + - {fileID: 3074504447387526168} + - {fileID: 3074504445760471458} + - {fileID: 3074504446469250245} + - {fileID: 3074504445848950737} +--- !u!54 &7793988651217454999 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3074504447143314537} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!136 &7573674391122441047 CapsuleCollider: m_ObjectHideFlags: 0 @@ -1461,22 +1506,6 @@ CharacterController: m_SkinWidth: 0.02 m_MinMoveDistance: 0 m_Center: {x: 0, y: 1, z: 0} ---- !u!54 &7793988651217454999 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3074504447143314537} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 --- !u!114 &-5286820321314269966 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1494,7 +1523,7 @@ MonoBehaviour: serverOnly: 0 visibility: 0 hasSpawned: 0 ---- !u!114 &108717044788610704 +--- !u!114 &-7583946280607460006 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1503,36 +1532,7 @@ MonoBehaviour: m_GameObject: {fileID: 3074504447143314537} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e04a8cb02afdc4e778925020d233d718, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0.1 - floatingInfo: {fileID: 1426017862} - characterNumber: 0 - textMeshName: {fileID: 1898764923} - playerName: - characterColour: {r: 0, g: 0, b: 0, a: 0} - characterRenderers: - - {fileID: 3074504447607218934} - - {fileID: 3074504445674343825} - - {fileID: 3074504447096303303} - - {fileID: 3074504445720021774} - - {fileID: 3074504447387526168} - - {fileID: 3074504445760471458} - - {fileID: 3074504446469250245} - - {fileID: 3074504445848950737} ---- !u!114 &6941538328588326580 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3074504447143314537} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 1 @@ -1553,11 +1553,11 @@ MonoBehaviour: showGizmos: 0 showOverlay: 0 overlayColor: {r: 0, g: 0, b: 0, a: 0.5} - onlySyncOnChangeCorrectionMultiplier: 2 + bufferResetMultiplier: 3 + positionSensitivity: 0.01 rotationSensitivity: 0.01 - positionPrecision: 0.01 - scalePrecision: 0.01 ---- !u!114 &4466657976286750537 + scaleSensitivity: 0.01 +--- !u!114 &-6913491101915066918 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1566,7 +1566,7 @@ MonoBehaviour: m_GameObject: {fileID: 3074504447143314537} m_Enabled: 0 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e212b6697536124ca0e7791fe5d8d6b, type: 3} + m_Script: {fileID: 11500000, guid: f81b59082839c2e40938767457bb91ae, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 0 @@ -1608,7 +1608,7 @@ MonoBehaviour: direction: {x: 0, y: 0, z: 0} velocity: {x: 0, y: 0, z: 0} controllerUI: {fileID: 0} ---- !u!114 &8165614180483664709 +--- !u!114 &5149898387657116502 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} diff --git a/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterHeavy.prefab b/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterHeavy.prefab index 5a6a47933..3d574675e 100644 --- a/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterHeavy.prefab +++ b/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterHeavy.prefab @@ -336,14 +336,14 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2320049526911491158} - - component: {fileID: -3965180273899654731} - - component: {fileID: -749035254883749775} - - component: {fileID: -906254437811298192} - - component: {fileID: -7784293741018888422} - component: {fileID: 597190161414468650} - - component: {fileID: -2611020483191821594} - - component: {fileID: 7962281450634085626} - - component: {fileID: -6486408998751470869} + - component: {fileID: -7557158431007955717} + - component: {fileID: -1015958069242222231} + - component: {fileID: -2971273460793977018} + - component: {fileID: 986579869238452304} + - component: {fileID: 3123254521016284903} + - component: {fileID: 6959445442754512381} + - component: {fileID: -4217278923851902145} m_Layer: 0 m_Name: CharacterHeavy m_TagString: Untagged @@ -368,71 +368,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!136 &-3965180273899654731 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2320049526911491159} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 1, z: 0} ---- !u!143 &-749035254883749775 -CharacterController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2320049526911491159} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Height: 2 - m_Radius: 0.5 - m_SlopeLimit: 45 - m_StepOffset: 0.3 - m_SkinWidth: 0.02 - m_MinMoveDistance: 0 - m_Center: {x: 0, y: 1, z: 0} ---- !u!54 &-906254437811298192 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2320049526911491159} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!114 &-7784293741018888422 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2320049526911491159} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} - m_Name: - m_EditorClassIdentifier: - sceneId: 0 - _assetId: 3014732734 - serverOnly: 0 - visibility: 0 - hasSpawned: 0 --- !u!114 &597190161414468650 MonoBehaviour: m_ObjectHideFlags: 0 @@ -459,7 +394,55 @@ MonoBehaviour: - {fileID: 2320049527593028056} - {fileID: 2320049526879068635} - {fileID: 2320049528211028347} ---- !u!114 &-2611020483191821594 +--- !u!54 &-7557158431007955717 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2320049526911491159} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!136 &-1015958069242222231 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2320049526911491159} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 1 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!143 &-2971273460793977018 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2320049526911491159} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &986579869238452304 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -468,7 +451,24 @@ MonoBehaviour: m_GameObject: {fileID: 2320049526911491159} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 3014732734 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!114 &3123254521016284903 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2320049526911491159} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 1 @@ -489,11 +489,11 @@ MonoBehaviour: showGizmos: 0 showOverlay: 0 overlayColor: {r: 0, g: 0, b: 0, a: 0.5} - onlySyncOnChangeCorrectionMultiplier: 2 + bufferResetMultiplier: 3 + positionSensitivity: 0.01 rotationSensitivity: 0.01 - positionPrecision: 0.01 - scalePrecision: 0.01 ---- !u!114 &7962281450634085626 + scaleSensitivity: 0.01 +--- !u!114 &6959445442754512381 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -502,13 +502,13 @@ MonoBehaviour: m_GameObject: {fileID: 2320049526911491159} m_Enabled: 0 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e212b6697536124ca0e7791fe5d8d6b, type: 3} + m_Script: {fileID: 11500000, guid: f81b59082839c2e40938767457bb91ae, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 0 syncMode: 0 syncInterval: 0 - characterController: {fileID: -749035254883749775} + characterController: {fileID: -2971273460793977018} ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, type: 3} moveKeys: @@ -544,7 +544,7 @@ MonoBehaviour: direction: {x: 0, y: 0, z: 0} velocity: {x: 0, y: 0, z: 0} controllerUI: {fileID: 0} ---- !u!114 &-6486408998751470869 +--- !u!114 &-4217278923851902145 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} diff --git a/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterMedic.prefab b/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterMedic.prefab index 743f6a322..6b9e03e45 100644 --- a/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterMedic.prefab +++ b/Assets/Mirror/Examples/CharacterSelection/Prefabs/Characters/CharacterMedic.prefab @@ -771,14 +771,14 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 9105303183089727062} - - component: {fileID: -2656374960411940230} - - component: {fileID: -236522517169955124} - - component: {fileID: 6097642395301875386} - - component: {fileID: 3540726253812090381} - component: {fileID: 4511077071076738942} - - component: {fileID: -6295477058686318049} - - component: {fileID: 3152477792515584470} - - component: {fileID: 958723225240916811} + - component: {fileID: -3238995969169225930} + - component: {fileID: -1736107136792142439} + - component: {fileID: 2971830291389855711} + - component: {fileID: -2538202292241907205} + - component: {fileID: 689587676988298619} + - component: {fileID: -4146909649929904479} + - component: {fileID: -6188707919164901343} m_Layer: 0 m_Name: CharacterMedic m_TagString: Untagged @@ -803,71 +803,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!136 &-2656374960411940230 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9105303183089727057} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 1, z: 0} ---- !u!143 &-236522517169955124 -CharacterController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9105303183089727057} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 2 - m_Height: 2 - m_Radius: 0.5 - m_SlopeLimit: 45 - m_StepOffset: 0.3 - m_SkinWidth: 0.02 - m_MinMoveDistance: 0 - m_Center: {x: 0, y: 1, z: 0} ---- !u!54 &6097642395301875386 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9105303183089727057} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!114 &3540726253812090381 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9105303183089727057} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} - m_Name: - m_EditorClassIdentifier: - sceneId: 0 - _assetId: 1526970849 - serverOnly: 0 - visibility: 0 - hasSpawned: 0 --- !u!114 &4511077071076738942 MonoBehaviour: m_ObjectHideFlags: 0 @@ -893,7 +828,55 @@ MonoBehaviour: - {fileID: 9105303183086384159} - {fileID: 9105303183046110706} - {fileID: 9105303183986044559} ---- !u!114 &-6295477058686318049 +--- !u!54 &-3238995969169225930 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9105303183089727057} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!136 &-1736107136792142439 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9105303183089727057} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 1 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!143 &2971830291389855711 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9105303183089727057} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &-2538202292241907205 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -902,7 +885,24 @@ MonoBehaviour: m_GameObject: {fileID: 9105303183089727057} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 1526970849 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!114 &689587676988298619 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9105303183089727057} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 1 @@ -923,11 +923,11 @@ MonoBehaviour: showGizmos: 0 showOverlay: 0 overlayColor: {r: 0, g: 0, b: 0, a: 0.5} - onlySyncOnChangeCorrectionMultiplier: 2 + bufferResetMultiplier: 3 + positionSensitivity: 0.01 rotationSensitivity: 0.01 - positionPrecision: 0.01 - scalePrecision: 0.01 ---- !u!114 &3152477792515584470 + scaleSensitivity: 0.01 +--- !u!114 &-4146909649929904479 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -936,13 +936,13 @@ MonoBehaviour: m_GameObject: {fileID: 9105303183089727057} m_Enabled: 0 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e212b6697536124ca0e7791fe5d8d6b, type: 3} + m_Script: {fileID: 11500000, guid: f81b59082839c2e40938767457bb91ae, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 0 syncMode: 0 syncInterval: 0 - characterController: {fileID: -236522517169955124} + characterController: {fileID: 2971830291389855711} ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, type: 3} moveKeys: @@ -978,7 +978,7 @@ MonoBehaviour: direction: {x: 0, y: 0, z: 0} velocity: {x: 0, y: 0, z: 0} controllerUI: {fileID: 0} ---- !u!114 &958723225240916811 +--- !u!114 &-6188707919164901343 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} diff --git a/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/Player.prefab b/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerReliable.prefab similarity index 99% rename from Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/Player.prefab rename to Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerReliable.prefab index c3c75ddb5..70533b8d3 100644 --- a/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/Player.prefab +++ b/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerReliable.prefab @@ -89,16 +89,16 @@ GameObject: m_Component: - component: {fileID: 4822224316094678} - component: {fileID: 114402732107420660} - - component: {fileID: 485255742382306150} - component: {fileID: 8715117357206038899} - - component: {fileID: 114892629901890886} - component: {fileID: 143011667059871024} - component: {fileID: 4839740653866577337} - component: {fileID: 115187108610643062} - component: {fileID: 1849877933717427647} - component: {fileID: 6261579163786439309} + - component: {fileID: 485255742382306150} + - component: {fileID: 114892629901890886} m_Layer: 0 - m_Name: Player + m_Name: PlayerReliable m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -136,40 +136,6 @@ MonoBehaviour: serverOnly: 0 visibility: 0 hasSpawned: 0 ---- !u!114 &485255742382306150 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1480027675339556} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 1 - syncMode: 0 - syncInterval: 0 - target: {fileID: 4822224316094678} - syncPosition: 1 - syncRotation: 1 - syncScale: 0 - onlySyncOnChange: 1 - compressRotation: 0 - interpolatePosition: 1 - interpolateRotation: 1 - interpolateScale: 0 - coordinateSpace: 0 - sendIntervalMultiplier: 1 - timelineOffset: 0 - showGizmos: 0 - showOverlay: 0 - overlayColor: {r: 0, g: 0, b: 0, a: 0.5} - onlySyncOnChangeCorrectionMultiplier: 2 - rotationSensitivity: 0.01 - positionPrecision: 0.01 - scalePrecision: 0.01 --- !u!114 &8715117357206038899 MonoBehaviour: m_ObjectHideFlags: 0 @@ -187,57 +153,6 @@ MonoBehaviour: syncInterval: 0.1 offset: {x: 0, y: 3, z: -8} rotation: {x: 10, y: 0, z: 0} ---- !u!114 &114892629901890886 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1480027675339556} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e212b6697536124ca0e7791fe5d8d6b, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0 - characterController: {fileID: 143011667059871024} - ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, - type: 3} - moveKeys: - Forward: 119 - Back: 115 - StrafeLeft: 97 - StrafeRight: 100 - TurnLeft: 113 - TurnRight: 101 - Jump: 32 - optionsKeys: - MouseSteer: 109 - AutoRun: 114 - ToggleUI: 117 - controlOptions: 4 - maxMoveSpeed: 8 - inputSensitivity: 2 - inputGravity: 2 - initialJumpSpeed: 2.5 - maxJumpSpeed: 3.5 - jumpAcceleration: 4 - maxTurnSpeed: 100 - turnAcceleration: 3 - groundState: 2 - horizontal: 0 - vertical: 0 - mouseInputX: 0 - mouseSensitivity: 0 - turnSpeed: 0 - jumpSpeed: 0 - animVelocity: 0 - animRotation: 0 - direction: {x: 0, y: 0, z: 0} - velocity: {x: 0, y: 0, z: 0} - controllerUI: {fileID: 0} --- !u!143 &143011667059871024 CharacterController: m_ObjectHideFlags: 0 @@ -324,6 +239,91 @@ MonoBehaviour: color: serializedVersion: 2 rgba: 4278190080 +--- !u!114 &485255742382306150 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 4822224316094678} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 0 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 0 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + onlySyncOnChangeCorrectionMultiplier: 2 + rotationSensitivity: 0.01 + positionPrecision: 0.01 + scalePrecision: 0.01 +--- !u!114 &114892629901890886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 497221e839119e34b897d6c497cbc8e5, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + characterController: {fileID: 143011667059871024} + ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + StrafeLeft: 97 + StrafeRight: 100 + TurnLeft: 113 + TurnRight: 101 + Jump: 32 + optionsKeys: + MouseSteer: 109 + AutoRun: 114 + ToggleUI: 117 + controlOptions: 4 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + initialJumpSpeed: 2.5 + maxJumpSpeed: 3.5 + jumpAcceleration: 4 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + mouseInputX: 0 + mouseSensitivity: 0 + turnSpeed: 0 + jumpSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} --- !u!1 &4926068573968176962 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/Player.prefab.meta b/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerReliable.prefab.meta similarity index 100% rename from Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/Player.prefab.meta rename to Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerReliable.prefab.meta diff --git a/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerUnreliable.prefab b/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerUnreliable.prefab new file mode 100644 index 000000000..91c6dfb93 --- /dev/null +++ b/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerUnreliable.prefab @@ -0,0 +1,406 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1430875437483682 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4216737524944602} + - component: {fileID: 33190644788701022} + - component: {fileID: 23708975923909982} + m_Layer: 0 + m_Name: Visor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4216737524944602 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1430875437483682} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.39999998, z: 0.5} + m_LocalScale: {x: 0.5, y: 0.1, z: 0.2} + m_Children: [] + m_Father: {fileID: 3138541494209382947} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33190644788701022 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1430875437483682} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &23708975923909982 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1430875437483682} + 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_RenderingLayerMask: 4294967295 + 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: 0 + 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 +--- !u!1 &1480027675339556 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4822224316094678} + - component: {fileID: 114402732107420660} + - component: {fileID: 8715117357206038899} + - component: {fileID: 143011667059871024} + - component: {fileID: 4839740653866577337} + - component: {fileID: 115187108610643062} + - component: {fileID: 1849877933717427647} + - component: {fileID: 6261579163786439309} + - component: {fileID: 4785170489899496097} + - component: {fileID: -3930225633775199775} + m_Layer: 0 + m_Name: PlayerUnreliable + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4822224316094678 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.08, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 3138541494209382947} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114402732107420660 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 1941964038 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!114 &8715117357206038899 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0.1 + offset: {x: 0, y: 3, z: -8} + rotation: {x: 10, y: 0, z: 0} +--- !u!143 &143011667059871024 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 0, z: 0} +--- !u!136 &4839740653866577337 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Material: {fileID: 13400000, guid: 2debad4ac21a6644faf4fc93bd5b5869, type: 2} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.8 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &115187108610643062 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8be750efa9df50f47b65ae156053d149, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + playerNumber: 0 + scoreIndex: 0 + matchIndex: 0 + score: 0 + clientMatchIndex: -1 +--- !u!54 &1849877933717427647 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &6261579163786439309 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + color: + serializedVersion: 2 + rgba: 4278190080 +--- !u!114 &4785170489899496097 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 4822224316094678} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &-3930225633775199775 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f81b59082839c2e40938767457bb91ae, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + characterController: {fileID: 143011667059871024} + ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + StrafeLeft: 97 + StrafeRight: 100 + TurnLeft: 113 + TurnRight: 101 + Jump: 32 + optionsKeys: + MouseSteer: 109 + AutoRun: 114 + ToggleUI: 117 + controlOptions: 4 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + initialJumpSpeed: 2.5 + maxJumpSpeed: 3.5 + jumpAcceleration: 4 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + mouseInputX: 0 + mouseSensitivity: 0 + turnSpeed: 0 + jumpSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} +--- !u!1 &4926068573968176962 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3138541494209382947} + - component: {fileID: 1736510165009824269} + - component: {fileID: 4008900414740136170} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3138541494209382947 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926068573968176962} + 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: 4216737524944602} + m_Father: {fileID: 4822224316094678} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1736510165009824269 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926068573968176962} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4008900414740136170 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926068573968176962} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 2089070a3452e6f4d866c53e51aae8f2, type: 2} + 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: 0 + 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 diff --git a/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerUnreliable.prefab.meta b/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerUnreliable.prefab.meta new file mode 100644 index 000000000..01be9350a --- /dev/null +++ b/Assets/Mirror/Examples/MultipleAdditiveScenes/Prefabs/PlayerUnreliable.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f9e691c1c5e6c8459a8e05388f9329e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/PlayerTest/PlayerPrefab.prefab b/Assets/Mirror/Examples/PlayerTest/PlayerReliable.prefab similarity index 99% rename from Assets/Mirror/Examples/PlayerTest/PlayerPrefab.prefab rename to Assets/Mirror/Examples/PlayerTest/PlayerReliable.prefab index 7b2453acd..72cda94cb 100644 --- a/Assets/Mirror/Examples/PlayerTest/PlayerPrefab.prefab +++ b/Assets/Mirror/Examples/PlayerTest/PlayerReliable.prefab @@ -172,12 +172,12 @@ GameObject: - component: {fileID: 1014105431373575527} - component: {fileID: 3857390224898622435} - component: {fileID: 5870539754798150155} - - component: {fileID: 5382001159774817068} - - component: {fileID: -218831818502395344} - component: {fileID: 6315922853844755037} - component: {fileID: 508331813320017038} + - component: {fileID: 5382001159774817068} + - component: {fileID: -218831818502395344} m_Layer: 0 - m_Name: PlayerPrefab + m_Name: PlayerReliable m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -263,6 +263,41 @@ MonoBehaviour: serverOnly: 0 visibility: 0 hasSpawned: 0 +--- !u!114 &6315922853844755037 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + color: + serializedVersion: 2 + rgba: 4278190080 +--- !u!114 &508331813320017038 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + offset: {x: 0, y: 3, z: -8} + rotation: {x: 10, y: 0, z: 0} --- !u!114 &5382001159774817068 MonoBehaviour: m_ObjectHideFlags: 0 @@ -306,7 +341,7 @@ MonoBehaviour: m_GameObject: {fileID: 7863680369626900553} m_Enabled: 0 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e212b6697536124ca0e7791fe5d8d6b, type: 3} + m_Script: {fileID: 11500000, guid: 497221e839119e34b897d6c497cbc8e5, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 0 @@ -348,38 +383,3 @@ MonoBehaviour: direction: {x: 0, y: 0, z: 0} velocity: {x: 0, y: 0, z: 0} controllerUI: {fileID: 0} ---- !u!114 &6315922853844755037 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7863680369626900553} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0 - color: - serializedVersion: 2 - rgba: 4278190080 ---- !u!114 &508331813320017038 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7863680369626900553} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0 - offset: {x: 0, y: 3, z: -8} - rotation: {x: 10, y: 0, z: 0} diff --git a/Assets/Mirror/Examples/PlayerTest/PlayerPrefab.prefab.meta b/Assets/Mirror/Examples/PlayerTest/PlayerReliable.prefab.meta similarity index 100% rename from Assets/Mirror/Examples/PlayerTest/PlayerPrefab.prefab.meta rename to Assets/Mirror/Examples/PlayerTest/PlayerReliable.prefab.meta diff --git a/Assets/Mirror/Examples/PlayerTest/PlayerUnreliable.prefab b/Assets/Mirror/Examples/PlayerTest/PlayerUnreliable.prefab new file mode 100644 index 000000000..fb73287f0 --- /dev/null +++ b/Assets/Mirror/Examples/PlayerTest/PlayerUnreliable.prefab @@ -0,0 +1,385 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4592122871669721618 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5246057292441020322} + - component: {fileID: 7450643213444322531} + - component: {fileID: 2343013367479929851} + m_Layer: 0 + m_Name: Visor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5246057292441020322 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4592122871669721618} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.39999998, z: 0.5} + m_LocalScale: {x: 0.5, y: 0.1, z: 0.2} + m_Children: [] + m_Father: {fileID: 3834521907656645861} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &7450643213444322531 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4592122871669721618} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &2343013367479929851 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4592122871669721618} + 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_RenderingLayerMask: 4294967295 + 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: 0 + 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 +--- !u!1 &5844787331012650587 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3834521907656645861} + - component: {fileID: 7647174189108629449} + - component: {fileID: 1712964438743777021} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3834521907656645861 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5844787331012650587} + 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: 5246057292441020322} + m_Father: {fileID: 4659514702152478195} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &7647174189108629449 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5844787331012650587} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1712964438743777021 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5844787331012650587} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 792117fe9a386a8489e8010bec746339, type: 2} + 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: 0 + 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 +--- !u!1 &7863680369626900553 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4659514702152478195} + - component: {fileID: 4284051235536850638} + - component: {fileID: 1014105431373575527} + - component: {fileID: 3857390224898622435} + - component: {fileID: 5870539754798150155} + - component: {fileID: 6315922853844755037} + - component: {fileID: 508331813320017038} + - component: {fileID: 1260535960049292642} + - component: {fileID: -6326520127801939333} + m_Layer: 0 + m_Name: PlayerUnreliable + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4659514702152478195 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 3834521907656645861} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!136 &4284051235536850638 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!143 &1014105431373575527 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &3857390224898622435 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &5870539754798150155 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 756366076 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!114 &6315922853844755037 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + color: + serializedVersion: 2 + rgba: 4278190080 +--- !u!114 &508331813320017038 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + offset: {x: 0, y: 3, z: -8} + rotation: {x: 10, y: 0, z: 0} +--- !u!114 &1260535960049292642 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 4659514702152478195} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &-6326520127801939333 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f81b59082839c2e40938767457bb91ae, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + characterController: {fileID: 1014105431373575527} + ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + StrafeLeft: 97 + StrafeRight: 100 + TurnLeft: 113 + TurnRight: 101 + Jump: 32 + optionsKeys: + MouseSteer: 109 + AutoRun: 114 + ToggleUI: 117 + controlOptions: 4 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + initialJumpSpeed: 2.5 + maxJumpSpeed: 3.5 + jumpAcceleration: 4 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + mouseInputX: 0 + mouseSensitivity: 0 + turnSpeed: 0 + jumpSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} diff --git a/Assets/Mirror/Examples/PlayerTest/PlayerUnreliable.prefab.meta b/Assets/Mirror/Examples/PlayerTest/PlayerUnreliable.prefab.meta new file mode 100644 index 000000000..ac9c1f249 --- /dev/null +++ b/Assets/Mirror/Examples/PlayerTest/PlayerUnreliable.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 400bac1c9e1e96648a83f333d4837484 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab b/Assets/Mirror/Examples/PlayerTest/TankReliable.prefab similarity index 98% rename from Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab rename to Assets/Mirror/Examples/PlayerTest/TankReliable.prefab index 1dd835443..0a45bca43 100644 --- a/Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab +++ b/Assets/Mirror/Examples/PlayerTest/TankReliable.prefab @@ -13,14 +13,14 @@ GameObject: - component: {fileID: 1584615235374487050} - component: {fileID: 796067987244239294} - component: {fileID: 6595414911156405995} + - component: {fileID: 36696637711815440} - component: {fileID: 943969255301123906} - - component: {fileID: 8662002890669114756} - - component: {fileID: 4362334322449175123} - component: {fileID: 4076420439305423835} - component: {fileID: 4696500281269712544} - - component: {fileID: 36696637711815440} + - component: {fileID: 8662002890669114756} + - component: {fileID: 4362334322449175123} m_Layer: 0 - m_Name: TankPrefab + m_Name: TankReliable m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -110,6 +110,26 @@ MonoBehaviour: serverOnly: 0 visibility: 0 hasSpawned: 0 +--- !u!114 &36696637711815440 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a98fd0a5ae4916d48bdcdb0e8c99a5cc, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + healthBar: {fileID: 3566980308471553575} + maxHealth: 5 + health: 5 + respawn: 1 + respawnTime: 3 --- !u!114 &943969255301123906 MonoBehaviour: m_ObjectHideFlags: 0 @@ -144,6 +164,101 @@ MonoBehaviour: rotationSensitivity: 0.01 positionPrecision: 0.01 scalePrecision: 0.01 +--- !u!114 &4076420439305423835 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 275b33356ccf3ad4f96b0084f0128272, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + boxCollider: {fileID: 848258961126524234} + characterController: {fileID: 1584615235374487050} + ControllerUIPrefab: {fileID: 644766297742565710, guid: e64b14552402f6745a7f0aca6237fae2, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + TurnLeft: 97 + TurnRight: 100 + optionsKeys: + AutoRun: 114 + ToggleUI: 117 + controlOptions: 2 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + turnSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} +--- !u!114 &4696500281269712544 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbb0b0f4ce2fede4f95abe4cf1737365, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + turretUIPrefab: {fileID: 644766297742565710, guid: 4d16730f7a8ba0a419530d1156d25080, + type: 3} + projectilePrefab: {fileID: 5890560936853567077, guid: aec853915cd4f4477ba1532b5fe05488, + type: 3} + animator: {fileID: 702109291319152264} + turret: {fileID: 702109291309605222} + barrel: {fileID: 702109291309605224} + projectileMount: {fileID: 5863288529097842480} + playerObject: {fileID: 3185878892915811175} + playerColor: + serializedVersion: 2 + rgba: 4278190080 + moveKeys: + PitchUp: 273 + PitchDown: 274 + TurnLeft: 276 + TurnRight: 275 + otherKeys: + Shoot: 32 + optionsKeys: + MouseLock: 109 + AutoLevel: 108 + ToggleUI: 117 + controlOptions: 6 + maxTurretSpeed: 250 + turretAcceleration: 10 + maxPitchSpeed: 30 + maxPitchUpAngle: 25 + maxPitchDownAngle: 0 + pitchAcceleration: 3 + mouseInputX: 0 + mouseSensitivity: 10 + turretSpeed: 0 + pitchAngle: 0 + pitchSpeed: 0 + turretUI: {fileID: 0} + turretNTR: {fileID: 8662002890669114756} + barrelNTR: {fileID: 4362334322449175123} --- !u!114 &8662002890669114756 MonoBehaviour: m_ObjectHideFlags: 0 @@ -212,122 +327,6 @@ MonoBehaviour: rotationSensitivity: 0.01 positionPrecision: 0.01 scalePrecision: 0.01 ---- !u!114 &4076420439305423835 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7863680369626900553} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 047024b2ae9afb74485837a482ea4175, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0 - boxCollider: {fileID: 848258961126524234} - characterController: {fileID: 1584615235374487050} - tankNTR: {fileID: 943969255301123906} - ControllerUIPrefab: {fileID: 644766297742565710, guid: e64b14552402f6745a7f0aca6237fae2, - type: 3} - moveKeys: - Forward: 119 - Back: 115 - TurnLeft: 97 - TurnRight: 100 - optionsKeys: - AutoRun: 114 - ToggleUI: 117 - controlOptions: 2 - maxMoveSpeed: 8 - inputSensitivity: 2 - inputGravity: 2 - maxTurnSpeed: 100 - turnAcceleration: 3 - groundState: 2 - horizontal: 0 - vertical: 0 - turnSpeed: 0 - animVelocity: 0 - animRotation: 0 - direction: {x: 0, y: 0, z: 0} - velocity: {x: 0, y: 0, z: 0} - controllerUI: {fileID: 0} ---- !u!114 &4696500281269712544 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7863680369626900553} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2620edb022743ce4bafb12274ee78716, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0 - turretUIPrefab: {fileID: 644766297742565710, guid: 4d16730f7a8ba0a419530d1156d25080, - type: 3} - projectilePrefab: {fileID: 5890560936853567077, guid: aec853915cd4f4477ba1532b5fe05488, - type: 3} - animator: {fileID: 702109291319152264} - turretNTR: {fileID: 8662002890669114756} - barrelNTR: {fileID: 4362334322449175123} - turret: {fileID: 702109291309605222} - barrel: {fileID: 702109291309605224} - projectileMount: {fileID: 5863288529097842480} - playerObject: {fileID: 3185878892915811175} - playerColor: - serializedVersion: 2 - rgba: 4278190080 - moveKeys: - PitchUp: 273 - PitchDown: 274 - TurnLeft: 276 - TurnRight: 275 - otherKeys: - Shoot: 32 - optionsKeys: - MouseLock: 109 - AutoLevel: 108 - ToggleUI: 117 - controlOptions: 6 - maxTurretSpeed: 250 - turretAcceleration: 10 - maxPitchSpeed: 30 - maxPitchUpAngle: 25 - maxPitchDownAngle: 0 - pitchAcceleration: 3 - mouseInputX: 0 - mouseSensitivity: 10 - turretSpeed: 0 - pitchAngle: 0 - pitchSpeed: 0 - turretUI: {fileID: 0} ---- !u!114 &36696637711815440 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7863680369626900553} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a98fd0a5ae4916d48bdcdb0e8c99a5cc, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0 - healthBar: {fileID: 3566980308471553575} - maxHealth: 5 - health: 5 - respawn: 1 - respawnTime: 3 --- !u!1 &9109672380512621037 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab.meta b/Assets/Mirror/Examples/PlayerTest/TankReliable.prefab.meta similarity index 100% rename from Assets/Mirror/Examples/PlayerTest/TankPrefab.prefab.meta rename to Assets/Mirror/Examples/PlayerTest/TankReliable.prefab.meta diff --git a/Assets/Mirror/Examples/PlayerTest/TankUnreliable.prefab b/Assets/Mirror/Examples/PlayerTest/TankUnreliable.prefab new file mode 100644 index 000000000..7cb9f10ea --- /dev/null +++ b/Assets/Mirror/Examples/PlayerTest/TankUnreliable.prefab @@ -0,0 +1,541 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7863680369626900553 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4659514702152478195} + - component: {fileID: 3560139896991457593} + - component: {fileID: 1584615235374487050} + - component: {fileID: 796067987244239294} + - component: {fileID: 6595414911156405995} + - component: {fileID: 36696637711815440} + - component: {fileID: 7800295833160510909} + - component: {fileID: -2370639624398981056} + - component: {fileID: 3523936333989725058} + - component: {fileID: 8518206564796711397} + - component: {fileID: 470423508858832317} + m_Layer: 0 + m_Name: TankUnreliable + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4659514702152478195 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + 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: 702109291309605218} + - {fileID: 8174595063106582951} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3560139896991457593 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + offset: {x: 0, y: 7, z: -15} + rotation: {x: 15, y: 0, z: 0} +--- !u!143 &1584615235374487050 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 1, z: 0} +--- !u!54 &796067987244239294 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &6595414911156405995 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 2686031007 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!114 &36696637711815440 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a98fd0a5ae4916d48bdcdb0e8c99a5cc, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + healthBar: {fileID: 3566980308471553575} + maxHealth: 5 + health: 5 + respawn: 1 + respawnTime: 3 +--- !u!114 &7800295833160510909 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 4659514702152478195} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &-2370639624398981056 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 54174134d990edc4b8d3ba4242a9a61a, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + boxCollider: {fileID: 848258961126524234} + characterController: {fileID: 1584615235374487050} + ControllerUIPrefab: {fileID: 644766297742565710, guid: e64b14552402f6745a7f0aca6237fae2, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + TurnLeft: 97 + TurnRight: 100 + optionsKeys: + AutoRun: 114 + ToggleUI: 117 + controlOptions: 2 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + turnSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} +--- !u!114 &3523936333989725058 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2cd78b1021803ce4fa7c95ca67f19aec, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + turretUIPrefab: {fileID: 644766297742565710, guid: 4d16730f7a8ba0a419530d1156d25080, + type: 3} + projectilePrefab: {fileID: 5890560936853567077, guid: aec853915cd4f4477ba1532b5fe05488, + type: 3} + animator: {fileID: 702109291319152264} + turret: {fileID: 702109291309605222} + barrel: {fileID: 702109291309605224} + projectileMount: {fileID: 5863288529097842480} + playerObject: {fileID: 3185878892915811175} + playerColor: + serializedVersion: 2 + rgba: 4278190080 + moveKeys: + PitchUp: 273 + PitchDown: 274 + TurnLeft: 276 + TurnRight: 275 + otherKeys: + Shoot: 32 + optionsKeys: + MouseLock: 109 + AutoLevel: 108 + ToggleUI: 117 + controlOptions: 6 + maxTurretSpeed: 250 + turretAcceleration: 10 + maxPitchSpeed: 30 + maxPitchUpAngle: 25 + maxPitchDownAngle: 0 + pitchAcceleration: 3 + mouseInputX: 0 + mouseSensitivity: 10 + turretSpeed: 0 + pitchAngle: 0 + pitchSpeed: 0 + turretUI: {fileID: 0} + turretNTR: {fileID: 8518206564796711397} + barrelNTR: {fileID: 470423508858832317} +--- !u!114 &8518206564796711397 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 702109291309605222} + syncPosition: 0 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &470423508858832317 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7863680369626900553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 702109291309605224} + syncPosition: 0 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!1 &9109672380512621037 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8174595063106582951} + - component: {fileID: 4153780752967283830} + - component: {fileID: 3566980308471553575} + - component: {fileID: 1151573331580713941} + m_Layer: 0 + m_Name: HealthBar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8174595063106582951 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9109672380512621037} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 4.2, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 4659514702152478195} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &4153780752967283830 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9109672380512621037} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, 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 +--- !u!102 &3566980308471553575 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9109672380512621037} + m_Text: ----- + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 4 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Color: + serializedVersion: 2 + rgba: 4278255360 +--- !u!114 &1151573331580713941 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9109672380512621037} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: afa2d590c474413d9fc183551385ed85, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &4305764793209200135 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4659514702152478195} + m_Modifications: + - target: {fileID: 3638700596990255941, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_Name + value: BasePrefab + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.05 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: dad07e68d3659e6439279d0d4110cf4c, type: 3} +--- !u!4 &702109291309605218 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 4305764793209200135} + m_PrefabAsset: {fileID: 0} +--- !u!95 &702109291319152264 stripped +Animator: + m_CorrespondingSourceObject: {fileID: 3638700596980764815, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 4305764793209200135} + m_PrefabAsset: {fileID: 0} +--- !u!65 &848258961126524234 stripped +BoxCollider: + m_CorrespondingSourceObject: {fileID: 3460094114880756557, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 4305764793209200135} + m_PrefabAsset: {fileID: 0} +--- !u!4 &702109291309605222 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3638700596990361441, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 4305764793209200135} + m_PrefabAsset: {fileID: 0} +--- !u!4 &702109291309605224 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3638700596990361455, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 4305764793209200135} + m_PrefabAsset: {fileID: 0} +--- !u!4 &5863288529097842480 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7683056980803567927, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 4305764793209200135} + m_PrefabAsset: {fileID: 0} +--- !u!1 &3185878892915811175 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1727031213358021984, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 4305764793209200135} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Mirror/Examples/PlayerTest/TankUnreliable.prefab.meta b/Assets/Mirror/Examples/PlayerTest/TankUnreliable.prefab.meta new file mode 100644 index 000000000..d3b03ddc9 --- /dev/null +++ b/Assets/Mirror/Examples/PlayerTest/TankUnreliable.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9bd31db974ca89b48bc14fea3f29ee92 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/Room/Prefabs/GamePlayer.prefab b/Assets/Mirror/Examples/Room/Prefabs/GamePlayerReliable.prefab similarity index 99% rename from Assets/Mirror/Examples/Room/Prefabs/GamePlayer.prefab rename to Assets/Mirror/Examples/Room/Prefabs/GamePlayerReliable.prefab index f0e54398c..86edeba1b 100644 --- a/Assets/Mirror/Examples/Room/Prefabs/GamePlayer.prefab +++ b/Assets/Mirror/Examples/Room/Prefabs/GamePlayerReliable.prefab @@ -89,16 +89,16 @@ GameObject: m_Component: - component: {fileID: 4822224316094678} - component: {fileID: 114402732107420660} - - component: {fileID: 485255742382306150} - - component: {fileID: 114892629901890886} - component: {fileID: -6736841464767829722} - component: {fileID: 115187108610643062} - component: {fileID: 6799120071495980942} - component: {fileID: 143011667059871024} - component: {fileID: -6233809968765690729} - component: {fileID: -6283667802943295364} + - component: {fileID: 485255742382306150} + - component: {fileID: 114892629901890886} m_Layer: 0 - m_Name: GamePlayer + m_Name: GamePlayerReliable m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -136,91 +136,6 @@ MonoBehaviour: serverOnly: 0 visibility: 0 hasSpawned: 0 ---- !u!114 &485255742382306150 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1480027675339556} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 1 - syncMode: 0 - syncInterval: 0 - target: {fileID: 4822224316094678} - syncPosition: 1 - syncRotation: 1 - syncScale: 0 - onlySyncOnChange: 1 - compressRotation: 1 - interpolatePosition: 1 - interpolateRotation: 1 - interpolateScale: 0 - coordinateSpace: 0 - sendIntervalMultiplier: 1 - timelineOffset: 0 - showGizmos: 0 - showOverlay: 0 - overlayColor: {r: 0, g: 0, b: 0, a: 0.5} - onlySyncOnChangeCorrectionMultiplier: 2 - rotationSensitivity: 0.01 - positionPrecision: 0.01 - scalePrecision: 0.01 ---- !u!114 &114892629901890886 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1480027675339556} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e212b6697536124ca0e7791fe5d8d6b, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0 - characterController: {fileID: 143011667059871024} - ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, - type: 3} - moveKeys: - Forward: 119 - Back: 115 - StrafeLeft: 97 - StrafeRight: 100 - TurnLeft: 113 - TurnRight: 101 - Jump: 32 - optionsKeys: - MouseSteer: 109 - AutoRun: 114 - ToggleUI: 117 - controlOptions: 4 - maxMoveSpeed: 8 - inputSensitivity: 2 - inputGravity: 2 - initialJumpSpeed: 2.5 - maxJumpSpeed: 3.5 - jumpAcceleration: 4 - maxTurnSpeed: 100 - turnAcceleration: 3 - groundState: 2 - horizontal: 0 - vertical: 0 - mouseInputX: 0 - mouseSensitivity: 0 - turnSpeed: 0 - jumpSpeed: 0 - animVelocity: 0 - animRotation: 0 - direction: {x: 0, y: 0, z: 0} - velocity: {x: 0, y: 0, z: 0} - controllerUI: {fileID: 0} --- !u!114 &-6736841464767829722 MonoBehaviour: m_ObjectHideFlags: 0 @@ -321,6 +236,91 @@ MonoBehaviour: color: serializedVersion: 2 rgba: 4278190080 +--- !u!114 &485255742382306150 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 4822224316094678} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 0 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + onlySyncOnChangeCorrectionMultiplier: 2 + rotationSensitivity: 0.01 + positionPrecision: 0.01 + scalePrecision: 0.01 +--- !u!114 &114892629901890886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 497221e839119e34b897d6c497cbc8e5, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + characterController: {fileID: 143011667059871024} + ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + StrafeLeft: 97 + StrafeRight: 100 + TurnLeft: 113 + TurnRight: 101 + Jump: 32 + optionsKeys: + MouseSteer: 109 + AutoRun: 114 + ToggleUI: 117 + controlOptions: 4 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + initialJumpSpeed: 2.5 + maxJumpSpeed: 3.5 + jumpAcceleration: 4 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + mouseInputX: 0 + mouseSensitivity: 0 + turnSpeed: 0 + jumpSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} --- !u!1 &4926068573968176962 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/Room/Prefabs/GamePlayer.prefab.meta b/Assets/Mirror/Examples/Room/Prefabs/GamePlayerReliable.prefab.meta similarity index 100% rename from Assets/Mirror/Examples/Room/Prefabs/GamePlayer.prefab.meta rename to Assets/Mirror/Examples/Room/Prefabs/GamePlayerReliable.prefab.meta diff --git a/Assets/Mirror/Examples/Room/Prefabs/GamePlayerUnreliable.prefab b/Assets/Mirror/Examples/Room/Prefabs/GamePlayerUnreliable.prefab new file mode 100644 index 000000000..41d728f8c --- /dev/null +++ b/Assets/Mirror/Examples/Room/Prefabs/GamePlayerUnreliable.prefab @@ -0,0 +1,403 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1430875437483682 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4216737524944602} + - component: {fileID: 33190644788701022} + - component: {fileID: 23708975923909982} + m_Layer: 0 + m_Name: Visor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4216737524944602 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1430875437483682} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.39999998, z: 0.5} + m_LocalScale: {x: 0.5, y: 0.1, z: 0.2} + m_Children: [] + m_Father: {fileID: 3138541494209382947} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &33190644788701022 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1430875437483682} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &23708975923909982 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1430875437483682} + 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_RenderingLayerMask: 4294967295 + 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: 0 + 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 +--- !u!1 &1480027675339556 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4822224316094678} + - component: {fileID: 114402732107420660} + - component: {fileID: -6736841464767829722} + - component: {fileID: 115187108610643062} + - component: {fileID: 6799120071495980942} + - component: {fileID: 143011667059871024} + - component: {fileID: -6233809968765690729} + - component: {fileID: -6283667802943295364} + - component: {fileID: -1526737386232888126} + - component: {fileID: -3829024190462995668} + m_Layer: 0 + m_Name: GamePlayerUnreliable + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4822224316094678 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 3138541494209382947} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114402732107420660 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 3141170884 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!114 &-6736841464767829722 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0.1 + offset: {x: 0, y: 3, z: -8} + rotation: {x: 10, y: 0, z: 0} +--- !u!114 &115187108610643062 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1ba998ee2eff92a419f4377519caf095, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + index: 0 + score: 0 +--- !u!136 &6799120071495980942 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!143 &143011667059871024 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &-6233809968765690729 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &-6283667802943295364 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + color: + serializedVersion: 2 + rgba: 4278190080 +--- !u!114 &-1526737386232888126 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 4822224316094678} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &-3829024190462995668 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1480027675339556} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f81b59082839c2e40938767457bb91ae, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + characterController: {fileID: 143011667059871024} + ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + StrafeLeft: 97 + StrafeRight: 100 + TurnLeft: 113 + TurnRight: 101 + Jump: 32 + optionsKeys: + MouseSteer: 109 + AutoRun: 114 + ToggleUI: 117 + controlOptions: 4 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + initialJumpSpeed: 2.5 + maxJumpSpeed: 3.5 + jumpAcceleration: 4 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + mouseInputX: 0 + mouseSensitivity: 0 + turnSpeed: 0 + jumpSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} +--- !u!1 &4926068573968176962 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3138541494209382947} + - component: {fileID: 1736510165009824269} + - component: {fileID: 4008900414740136170} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3138541494209382947 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926068573968176962} + 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: 4216737524944602} + m_Father: {fileID: 4822224316094678} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1736510165009824269 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926068573968176962} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4008900414740136170 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926068573968176962} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ac64a68d9ea8fa9459ff2f158065c1d0, type: 2} + 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: 0 + 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 diff --git a/Assets/Mirror/Examples/Room/Prefabs/GamePlayerUnreliable.prefab.meta b/Assets/Mirror/Examples/Room/Prefabs/GamePlayerUnreliable.prefab.meta new file mode 100644 index 000000000..a6ef37587 --- /dev/null +++ b/Assets/Mirror/Examples/Room/Prefabs/GamePlayerUnreliable.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9b2197c3791be1a4488859e90a6340a3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/TankTheftAuto/MirrorTankTheftAuto.unity b/Assets/Mirror/Examples/TankTheftAuto/MirrorTankTheftAuto.unity index d5db0eed2..b7875058f 100644 --- a/Assets/Mirror/Examples/TankTheftAuto/MirrorTankTheftAuto.unity +++ b/Assets/Mirror/Examples/TankTheftAuto/MirrorTankTheftAuto.unity @@ -300,6 +300,67 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 41f84591ce72545258ea98cb7518d8b9, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1001 &754433022 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalPosition.x + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalRotation.y + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 160176456, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 160176457, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: m_Name + value: TankUnreliable + objectReference: {fileID: 0} + - target: {fileID: 160176459, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} + propertyPath: sceneId + value: 2627608828 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 77f79485ebed3b14fb954879767fe9c0, type: 3} --- !u!1 &781619875 GameObject: m_ObjectHideFlags: 0 @@ -536,81 +597,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 41f84591ce72545258ea98cb7518d8b9, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1001 &1997245513 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_RootOrder - value: 7 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalPosition.x - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalRotation.y - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 90 - objectReference: {fileID: 0} - - target: {fileID: 160176456, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 160176457, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: m_Name - value: TankShared 2 - objectReference: {fileID: 0} - - target: {fileID: 160176459, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: sceneId - value: 2401096628 - objectReference: {fileID: 0} - - target: {fileID: 160176459, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: serverOnly - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 275309355690048611, guid: d502982feecd043d8bfc6a5c64cd09f9, - type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8654251059059140979, guid: d502982feecd043d8bfc6a5c64cd09f9, - type: 3} - propertyPath: m_LocalScale.x - value: 6 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} --- !u!1 &2054208274 GameObject: m_ObjectHideFlags: 0 @@ -980,15 +966,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 160176457, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} propertyPath: m_Name - value: TankShared 1 + value: TankReliable objectReference: {fileID: 0} - target: {fileID: 160176459, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} propertyPath: sceneId - value: 2890115873 - objectReference: {fileID: 0} - - target: {fileID: 160176459, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} - propertyPath: serverOnly - value: 0 + value: 175119952 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: d502982feecd043d8bfc6a5c64cd09f9, type: 3} diff --git a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/Player.prefab b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerReliable.prefab similarity index 98% rename from Assets/Mirror/Examples/TankTheftAuto/Prefabs/Player.prefab rename to Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerReliable.prefab index d26d7d32d..fd3aa0abc 100644 --- a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/Player.prefab +++ b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerReliable.prefab @@ -170,14 +170,14 @@ GameObject: - component: {fileID: 5328458565928408179} - component: {fileID: 8537344390966522168} - component: {fileID: 8993127209816276930} - - component: {fileID: 4357343043493134785} - component: {fileID: 1143206540915927667} - component: {fileID: 3175779197224890082} - component: {fileID: -4781897372705814228} - component: {fileID: -1122083471338389313} + - component: {fileID: 4357343043493134785} - component: {fileID: 4559786975507373984} m_Layer: 0 - m_Name: Player + m_Name: PlayerReliable m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -233,40 +233,6 @@ CharacterController: m_SkinWidth: 0.02 m_MinMoveDistance: 0 m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &4357343043493134785 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8872462076811691049} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 1 - syncMode: 0 - syncInterval: 0 - target: {fileID: 5328458565928408179} - syncPosition: 1 - syncRotation: 1 - syncScale: 0 - onlySyncOnChange: 1 - compressRotation: 1 - interpolatePosition: 1 - interpolateRotation: 1 - interpolateScale: 1 - coordinateSpace: 0 - sendIntervalMultiplier: 1 - timelineOffset: 0 - showGizmos: 0 - showOverlay: 0 - overlayColor: {r: 0, g: 0, b: 0, a: 0.5} - onlySyncOnChangeCorrectionMultiplier: 2 - rotationSensitivity: 0.01 - positionPrecision: 0.01 - scalePrecision: 0.01 --- !u!136 &1143206540915927667 CapsuleCollider: m_ObjectHideFlags: 0 @@ -332,6 +298,40 @@ MonoBehaviour: color: serializedVersion: 2 rgba: 4278190080 +--- !u!114 &4357343043493134785 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 5328458565928408179} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + onlySyncOnChangeCorrectionMultiplier: 2 + rotationSensitivity: 0.01 + positionPrecision: 0.01 + scalePrecision: 0.01 --- !u!114 &4559786975507373984 MonoBehaviour: m_ObjectHideFlags: 0 @@ -341,7 +341,7 @@ MonoBehaviour: m_GameObject: {fileID: 8872462076811691049} m_Enabled: 0 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9e212b6697536124ca0e7791fe5d8d6b, type: 3} + m_Script: {fileID: 11500000, guid: 497221e839119e34b897d6c497cbc8e5, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 0 @@ -375,7 +375,7 @@ MonoBehaviour: horizontal: 0 vertical: 0 mouseInputX: 0 - mouseSensitivity: 0.01 + mouseSensitivity: 0 turnSpeed: 0 jumpSpeed: 0 animVelocity: 0 diff --git a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/Player.prefab.meta b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerReliable.prefab.meta similarity index 100% rename from Assets/Mirror/Examples/TankTheftAuto/Prefabs/Player.prefab.meta rename to Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerReliable.prefab.meta diff --git a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerUnreliable.prefab b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerUnreliable.prefab new file mode 100644 index 000000000..fff7bd6d2 --- /dev/null +++ b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerUnreliable.prefab @@ -0,0 +1,385 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4415124803507263412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9057824595171805708} + - component: {fileID: 662729490405160656} + - component: {fileID: 3624570427921084598} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &9057824595171805708 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + 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: 3254954141432383832} + m_Father: {fileID: 5328458565928408179} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &662729490405160656 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &3624570427921084598 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 737121007c45641d8ac681913d09bdfe, type: 2} + 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: 0 + 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 +--- !u!1 &5815001218983416211 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3254954141432383832} + - component: {fileID: 1800893346221236401} + - component: {fileID: 136369082707552984} + m_Layer: 0 + m_Name: Visor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3254954141432383832 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.39999998, z: 0.5} + m_LocalScale: {x: 0.5, y: 0.1, z: 0.2} + m_Children: [] + m_Father: {fileID: 9057824595171805708} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1800893346221236401 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &136369082707552984 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + 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_RenderingLayerMask: 4294967295 + 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: 0 + 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 +--- !u!1 &8872462076811691049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5328458565928408179} + - component: {fileID: 8537344390966522168} + - component: {fileID: 8993127209816276930} + - component: {fileID: 1143206540915927667} + - component: {fileID: 3175779197224890082} + - component: {fileID: -4781897372705814228} + - component: {fileID: -1122083471338389313} + - component: {fileID: 1710046574304528756} + - component: {fileID: -2747542644601530390} + m_Layer: 0 + m_Name: PlayerUnreliable + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5328458565928408179 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.08, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 9057824595171805708} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8537344390966522168 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 4066027504 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!143 &8993127209816276930 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 0, z: 0} +--- !u!136 &1143206540915927667 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &3175779197224890082 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &-4781897372705814228 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + offset: {x: 0, y: 3, z: -8} + rotation: {x: 10, y: 0, z: 0} +--- !u!114 &-1122083471338389313 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a91a718a70d01b347b75cb768a6f1a92, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + color: + serializedVersion: 2 + rgba: 4278190080 +--- !u!114 &1710046574304528756 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 5328458565928408179} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &-2747542644601530390 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f81b59082839c2e40938767457bb91ae, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + characterController: {fileID: 8993127209816276930} + ControllerUIPrefab: {fileID: 644766297742565710, guid: 7beee247444994f0281dadde274cc4af, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + StrafeLeft: 97 + StrafeRight: 100 + TurnLeft: 113 + TurnRight: 101 + Jump: 32 + optionsKeys: + MouseSteer: 109 + AutoRun: 114 + ToggleUI: 117 + controlOptions: 4 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + initialJumpSpeed: 2.5 + maxJumpSpeed: 3.5 + jumpAcceleration: 4 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + mouseInputX: 0 + mouseSensitivity: 0 + turnSpeed: 0 + jumpSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} diff --git a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerUnreliable.prefab.meta b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerUnreliable.prefab.meta new file mode 100644 index 000000000..694569085 --- /dev/null +++ b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/PlayerUnreliable.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eb1c655bdd46c2f4d9a6c48490fa1a5f +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankShared.prefab b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankReliable.prefab similarity index 85% rename from Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankShared.prefab rename to Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankReliable.prefab index 3c22c6096..641e8ca3f 100644 --- a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankShared.prefab +++ b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankReliable.prefab @@ -13,15 +13,15 @@ GameObject: - component: {fileID: -3663159771046410010} - component: {fileID: 6068304543228546507} - component: {fileID: 9011654894794846298} - - component: {fileID: 7596397783725454330} - - component: {fileID: 1696720273189594966} - - component: {fileID: 7169244018383349727} - - component: {fileID: 7830157450682276248} - - component: {fileID: 2567556615025523050} - component: {fileID: 3519933858578404829} - component: {fileID: -1177881442708440307} + - component: {fileID: 6839892727743104213} + - component: {fileID: -4271502943714897475} + - component: {fileID: 2826031213648375834} + - component: {fileID: 1724966638944128536} + - component: {fileID: -1561722988585270094} m_Layer: 0 - m_Name: TankShared + m_Name: TankReliable m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -38,8 +38,9 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 401231881586047283} - {fileID: 3598508050475439082} + - {fileID: 8284167735332199187} + - {fileID: 401231881586047283} - {fileID: 2763801909253176934} - {fileID: 8654251059059140979} m_Father: {fileID: 0} @@ -113,204 +114,6 @@ CharacterController: m_SkinWidth: 0.02 m_MinMoveDistance: 0 m_Center: {x: 0, y: 1, z: 0} ---- !u!114 &7596397783725454330 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 160176457} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 1 - syncMode: 0 - syncInterval: 0 - target: {fileID: 160176456} - syncPosition: 1 - syncRotation: 1 - syncScale: 0 - onlySyncOnChange: 1 - compressRotation: 1 - interpolatePosition: 1 - interpolateRotation: 1 - interpolateScale: 1 - coordinateSpace: 0 - sendIntervalMultiplier: 1 - timelineOffset: 0 - showGizmos: 0 - showOverlay: 0 - overlayColor: {r: 0, g: 0, b: 0, a: 0.5} - onlySyncOnChangeCorrectionMultiplier: 2 - rotationSensitivity: 0.01 - positionPrecision: 0.01 - scalePrecision: 0.01 ---- !u!114 &1696720273189594966 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 160176457} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 1 - syncMode: 0 - syncInterval: 0 - target: {fileID: 2763801909253176930} - syncPosition: 0 - syncRotation: 1 - syncScale: 0 - onlySyncOnChange: 1 - compressRotation: 1 - interpolatePosition: 1 - interpolateRotation: 1 - interpolateScale: 1 - coordinateSpace: 0 - sendIntervalMultiplier: 1 - timelineOffset: 0 - showGizmos: 0 - showOverlay: 0 - overlayColor: {r: 0, g: 0, b: 0, a: 0.5} - onlySyncOnChangeCorrectionMultiplier: 2 - rotationSensitivity: 0.01 - positionPrecision: 0.01 - scalePrecision: 0.01 ---- !u!114 &7169244018383349727 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 160176457} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 1 - syncMode: 0 - syncInterval: 0 - target: {fileID: 2763801909253176940} - syncPosition: 0 - syncRotation: 1 - syncScale: 0 - onlySyncOnChange: 1 - compressRotation: 1 - interpolatePosition: 1 - interpolateRotation: 1 - interpolateScale: 1 - coordinateSpace: 0 - sendIntervalMultiplier: 1 - timelineOffset: 0 - showGizmos: 0 - showOverlay: 0 - overlayColor: {r: 0, g: 0, b: 0, a: 0.5} - onlySyncOnChangeCorrectionMultiplier: 2 - rotationSensitivity: 0.01 - positionPrecision: 0.01 - scalePrecision: 0.01 ---- !u!114 &7830157450682276248 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 160176457} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 047024b2ae9afb74485837a482ea4175, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0 - boxCollider: {fileID: 2603367113295616590} - characterController: {fileID: 9011654894794846298} - tankNTR: {fileID: 7596397783725454330} - ControllerUIPrefab: {fileID: 644766297742565710, guid: e64b14552402f6745a7f0aca6237fae2, - type: 3} - moveKeys: - Forward: 119 - Back: 115 - TurnLeft: 97 - TurnRight: 100 - optionsKeys: - AutoRun: 114 - ToggleUI: 117 - controlOptions: 2 - maxMoveSpeed: 8 - inputSensitivity: 2 - inputGravity: 2 - maxTurnSpeed: 100 - turnAcceleration: 3 - groundState: 2 - horizontal: 0 - vertical: 0 - turnSpeed: 0 - animVelocity: 0 - animRotation: 0 - direction: {x: 0, y: 0, z: 0} - velocity: {x: 0, y: 0, z: 0} - controllerUI: {fileID: 0} ---- !u!114 &2567556615025523050 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 160176457} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2620edb022743ce4bafb12274ee78716, type: 3} - m_Name: - m_EditorClassIdentifier: - syncDirection: 0 - syncMode: 0 - syncInterval: 0 - turretUIPrefab: {fileID: 644766297742565710, guid: 4d16730f7a8ba0a419530d1156d25080, - type: 3} - projectilePrefab: {fileID: 5890560936853567077, guid: aec853915cd4f4477ba1532b5fe05488, - type: 3} - animator: {fileID: 2763801909243548044} - turretNTR: {fileID: 1696720273189594966} - barrelNTR: {fileID: 7169244018383349727} - turret: {fileID: 2763801909253176930} - barrel: {fileID: 2763801909253176940} - projectileMount: {fileID: 9131626885722767412} - playerObject: {fileID: 275309355690048611} - playerColor: - serializedVersion: 2 - rgba: 4278190080 - moveKeys: - PitchUp: 273 - PitchDown: 274 - TurnLeft: 276 - TurnRight: 275 - otherKeys: - Shoot: 32 - optionsKeys: - MouseLock: 109 - AutoLevel: 108 - ToggleUI: 117 - controlOptions: 6 - maxTurretSpeed: 250 - turretAcceleration: 10 - maxPitchSpeed: 30 - maxPitchUpAngle: 25 - maxPitchDownAngle: 0 - pitchAcceleration: 3 - mouseInputX: 0 - mouseSensitivity: 10 - turretSpeed: 0 - pitchAngle: 0 - pitchSpeed: 0 - turretUI: {fileID: 0} --- !u!114 &3519933858578404829 MonoBehaviour: m_ObjectHideFlags: 0 @@ -347,9 +150,206 @@ MonoBehaviour: syncMode: 0 syncInterval: 0 triggerUI: {fileID: 5287524317864410934} - tankTurret: {fileID: 2567556615025523050} + tankTurret: {fileID: 2826031213648375834} tankTrigger: {fileID: 8654251059059140940} isControlled: 0 +--- !u!114 &6839892727743104213 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 160176456} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + onlySyncOnChangeCorrectionMultiplier: 2 + rotationSensitivity: 0.01 + positionPrecision: 0.01 + scalePrecision: 0.01 +--- !u!114 &-4271502943714897475 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 275b33356ccf3ad4f96b0084f0128272, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + boxCollider: {fileID: 2603367113295616590} + characterController: {fileID: 9011654894794846298} + ControllerUIPrefab: {fileID: 644766297742565710, guid: e64b14552402f6745a7f0aca6237fae2, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + TurnLeft: 97 + TurnRight: 100 + optionsKeys: + AutoRun: 114 + ToggleUI: 117 + controlOptions: 2 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + turnSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} +--- !u!114 &2826031213648375834 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbb0b0f4ce2fede4f95abe4cf1737365, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + turretUIPrefab: {fileID: 644766297742565710, guid: 4d16730f7a8ba0a419530d1156d25080, + type: 3} + projectilePrefab: {fileID: 5890560936853567077, guid: aec853915cd4f4477ba1532b5fe05488, + type: 3} + animator: {fileID: 2763801909243548044} + turret: {fileID: 2763801909253176930} + barrel: {fileID: 2763801909253176940} + projectileMount: {fileID: 9131626885722767412} + playerObject: {fileID: 275309355690048611} + playerColor: + serializedVersion: 2 + rgba: 4278190080 + moveKeys: + PitchUp: 273 + PitchDown: 274 + TurnLeft: 276 + TurnRight: 275 + otherKeys: + Shoot: 32 + optionsKeys: + MouseLock: 109 + AutoLevel: 108 + ToggleUI: 117 + controlOptions: 6 + maxTurretSpeed: 250 + turretAcceleration: 10 + maxPitchSpeed: 30 + maxPitchUpAngle: 25 + maxPitchDownAngle: 0 + pitchAcceleration: 3 + mouseInputX: 0 + mouseSensitivity: 10 + turretSpeed: 0 + pitchAngle: 0 + pitchSpeed: 0 + turretUI: {fileID: 0} + turretNTR: {fileID: 1724966638944128536} + barrelNTR: {fileID: -1561722988585270094} +--- !u!114 &1724966638944128536 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 2763801909253176930} + syncPosition: 0 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + onlySyncOnChangeCorrectionMultiplier: 2 + rotationSensitivity: 0.01 + positionPrecision: 0.01 + scalePrecision: 0.01 +--- !u!114 &-1561722988585270094 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ff3ba0becae47b8b9381191598957c8, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 2763801909253176940} + syncPosition: 0 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + onlySyncOnChangeCorrectionMultiplier: 2 + rotationSensitivity: 0.01 + positionPrecision: 0.01 + scalePrecision: 0.01 --- !u!1 &3186135298788407273 GameObject: m_ObjectHideFlags: 0 @@ -381,7 +381,7 @@ Transform: m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} m_Children: [] m_Father: {fileID: 160176456} - m_RootOrder: 0 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!23 &3005640229166769661 MeshRenderer: @@ -483,11 +483,11 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5287524317864410934} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 5, z: 0} + m_LocalPosition: {x: 0, y: 5.1, z: 0} m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} m_Children: [] m_Father: {fileID: 160176456} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!23 &6062414441292887533 MeshRenderer: @@ -562,6 +562,112 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: afa2d590c474413d9fc183551385ed85, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &5385964345114719467 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8284167735332199187} + - component: {fileID: 5253494179400827077} + - component: {fileID: 8092418200497169571} + - component: {fileID: 6891457119111835237} + m_Layer: 0 + m_Name: TankLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8284167735332199187 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5385964345114719467} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 4.6, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 160176456} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &5253494179400827077 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5385964345114719467} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, 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 +--- !u!102 &8092418200497169571 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5385964345114719467} + m_Text: Reliable + m_OffsetZ: 0 + m_CharacterSize: 0.5 + m_LineSpacing: 1 + m_Anchor: 4 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Color: + serializedVersion: 2 + rgba: 4278255360 +--- !u!114 &6891457119111835237 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5385964345114719467} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: afa2d590c474413d9fc183551385ed85, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &8654251059059140940 GameObject: m_ObjectHideFlags: 0 @@ -593,7 +699,7 @@ Transform: m_LocalScale: {x: 6, y: 0.1, z: 9} m_Children: [] m_Father: {fileID: 160176456} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &8654251059059140976 MeshFilter: @@ -675,7 +781,7 @@ PrefabInstance: - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, type: 3} diff --git a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankShared.prefab.meta b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankReliable.prefab.meta similarity index 100% rename from Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankShared.prefab.meta rename to Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankReliable.prefab.meta diff --git a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankUnreliable.prefab b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankUnreliable.prefab new file mode 100644 index 000000000..f96e42ad6 --- /dev/null +++ b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankUnreliable.prefab @@ -0,0 +1,879 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &160176457 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 160176456} + - component: {fileID: 160176459} + - component: {fileID: -3663159771046410010} + - component: {fileID: 6068304543228546507} + - component: {fileID: 9011654894794846298} + - component: {fileID: 3519933858578404829} + - component: {fileID: -1177881442708440307} + - component: {fileID: -7893703745375808080} + - component: {fileID: 5305657484878254739} + - component: {fileID: -8195396223309571671} + - component: {fileID: 3555053558530271693} + - component: {fileID: -1846505870324383132} + m_Layer: 0 + m_Name: TankUnreliable + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &160176456 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + 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: 3598508050475439082} + - {fileID: 7704476357801254268} + - {fileID: 401231881586047283} + - {fileID: 2763801909253176934} + - {fileID: 8654251059059140979} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &160176459 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + _assetId: 3558518609 + serverOnly: 0 + visibility: 0 + hasSpawned: 0 +--- !u!114 &-3663159771046410010 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 71ac1e35462ffad469e77d1c2fe6c9f3, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + offset: {x: 0, y: 7, z: -15} + rotation: {x: 15, y: 0, z: 0} +--- !u!54 &6068304543228546507 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!143 &9011654894794846298 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.02 + m_MinMoveDistance: 0 + m_Center: {x: 0, y: 1, z: 0} +--- !u!114 &3519933858578404829 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a98fd0a5ae4916d48bdcdb0e8c99a5cc, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + healthBar: {fileID: 2933703891847864033} + maxHealth: 5 + health: 5 + respawn: 1 + respawnTime: 3 +--- !u!114 &-1177881442708440307 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f5af56d9f2233f74ba333eae5c1a17d0, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + triggerUI: {fileID: 5287524317864410934} + tankTurret: {fileID: -8195396223309571671} + tankTrigger: {fileID: 8654251059059140940} + isControlled: 0 +--- !u!114 &-7893703745375808080 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 160176456} + syncPosition: 1 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &5305657484878254739 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 54174134d990edc4b8d3ba4242a9a61a, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + boxCollider: {fileID: 2603367113295616590} + characterController: {fileID: 9011654894794846298} + ControllerUIPrefab: {fileID: 644766297742565710, guid: e64b14552402f6745a7f0aca6237fae2, + type: 3} + moveKeys: + Forward: 119 + Back: 115 + TurnLeft: 97 + TurnRight: 100 + optionsKeys: + AutoRun: 114 + ToggleUI: 117 + controlOptions: 2 + maxMoveSpeed: 8 + inputSensitivity: 2 + inputGravity: 2 + maxTurnSpeed: 100 + turnAcceleration: 3 + groundState: 2 + horizontal: 0 + vertical: 0 + turnSpeed: 0 + animVelocity: 0 + animRotation: 0 + direction: {x: 0, y: 0, z: 0} + velocity: {x: 0, y: 0, z: 0} + controllerUI: {fileID: 0} +--- !u!114 &-8195396223309571671 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2cd78b1021803ce4fa7c95ca67f19aec, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 0 + syncMode: 0 + syncInterval: 0 + turretUIPrefab: {fileID: 644766297742565710, guid: 4d16730f7a8ba0a419530d1156d25080, + type: 3} + projectilePrefab: {fileID: 5890560936853567077, guid: aec853915cd4f4477ba1532b5fe05488, + type: 3} + animator: {fileID: 2763801909243548044} + turret: {fileID: 2763801909253176930} + barrel: {fileID: 2763801909253176940} + projectileMount: {fileID: 9131626885722767412} + playerObject: {fileID: 275309355690048611} + playerColor: + serializedVersion: 2 + rgba: 4278190080 + moveKeys: + PitchUp: 273 + PitchDown: 274 + TurnLeft: 276 + TurnRight: 275 + otherKeys: + Shoot: 32 + optionsKeys: + MouseLock: 109 + AutoLevel: 108 + ToggleUI: 117 + controlOptions: 6 + maxTurretSpeed: 250 + turretAcceleration: 10 + maxPitchSpeed: 30 + maxPitchUpAngle: 25 + maxPitchDownAngle: 0 + pitchAcceleration: 3 + mouseInputX: 0 + mouseSensitivity: 10 + turretSpeed: 0 + pitchAngle: 0 + pitchSpeed: 0 + turretUI: {fileID: 0} + turretNTR: {fileID: 3555053558530271693} + barrelNTR: {fileID: -1846505870324383132} +--- !u!114 &3555053558530271693 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 2763801909253176930} + syncPosition: 0 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!114 &-1846505870324383132 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160176457} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Name: + m_EditorClassIdentifier: + syncDirection: 1 + syncMode: 0 + syncInterval: 0 + target: {fileID: 2763801909253176940} + syncPosition: 0 + syncRotation: 1 + syncScale: 0 + onlySyncOnChange: 1 + compressRotation: 1 + interpolatePosition: 1 + interpolateRotation: 1 + interpolateScale: 1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} + bufferResetMultiplier: 3 + positionSensitivity: 0.01 + rotationSensitivity: 0.01 + scaleSensitivity: 0.01 +--- !u!1 &3186135298788407273 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 401231881586047283} + - component: {fileID: 3005640229166769661} + - component: {fileID: 2933703891847864033} + - component: {fileID: 8432372658251299089} + m_Layer: 0 + m_Name: HealthBar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &401231881586047283 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3186135298788407273} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 4.2, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 160176456} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &3005640229166769661 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3186135298788407273} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, 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 +--- !u!102 &2933703891847864033 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3186135298788407273} + m_Text: ----- + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 4 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Color: + serializedVersion: 2 + rgba: 4278255360 +--- !u!114 &8432372658251299089 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3186135298788407273} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: afa2d590c474413d9fc183551385ed85, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &3202831288875958048 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7704476357801254268} + - component: {fileID: 6816230473627149644} + - component: {fileID: 4828148462676785683} + - component: {fileID: 2763192121636754010} + m_Layer: 0 + m_Name: TankLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7704476357801254268 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3202831288875958048} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 4.6, z: 0} + m_LocalScale: {x: 0.099999994, y: 0.099999994, z: 0.099999994} + m_Children: [] + m_Father: {fileID: 160176456} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &6816230473627149644 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3202831288875958048} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, 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 +--- !u!102 &4828148462676785683 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3202831288875958048} + m_Text: Unreliable + m_OffsetZ: 0 + m_CharacterSize: 0.5 + m_LineSpacing: 1 + m_Anchor: 4 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 100 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Color: + serializedVersion: 2 + rgba: 4278255360 +--- !u!114 &2763192121636754010 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3202831288875958048} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: afa2d590c474413d9fc183551385ed85, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &5287524317864410934 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3598508050475439082} + - component: {fileID: 6062414441292887533} + - component: {fileID: 4933617878059669429} + - component: {fileID: 5984118459125502233} + m_Layer: 0 + m_Name: TriggerUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &3598508050475439082 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5287524317864410934} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 5.1, z: 0} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_Children: [] + m_Father: {fileID: 160176456} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &6062414441292887533 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5287524317864410934} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10100, guid: 0000000000000000e000000000000000, 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 +--- !u!102 &4933617878059669429 +TextMesh: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5287524317864410934} + m_Text: Press C to Control + m_OffsetZ: 0 + m_CharacterSize: 1 + m_LineSpacing: 1 + m_Anchor: 4 + m_Alignment: 1 + m_TabSize: 4 + m_FontSize: 35 + m_FontStyle: 0 + m_RichText: 1 + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Color: + serializedVersion: 2 + rgba: 4294907648 +--- !u!114 &5984118459125502233 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5287524317864410934} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: afa2d590c474413d9fc183551385ed85, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &8654251059059140940 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8654251059059140979} + - component: {fileID: 8654251059059140976} + - component: {fileID: 8654251059059140977} + - component: {fileID: 8654251059059140978} + m_Layer: 0 + m_Name: TankTrigger + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8654251059059140979 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8654251059059140940} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 6, y: 0.1, z: 9} + m_Children: [] + m_Father: {fileID: 160176456} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8654251059059140976 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8654251059059140940} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &8654251059059140977 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8654251059059140940} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: bbc6c3dc6bc474215a1c3e71d9392225, type: 2} + 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 +--- !u!65 &8654251059059140978 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8654251059059140940} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1.0000001} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1001 &1451775205222924547 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 160176456} + m_Modifications: + - target: {fileID: 1727031213358021984, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990255941, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_Name + value: BasePrefab + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: dad07e68d3659e6439279d0d4110cf4c, type: 3} +--- !u!4 &2763801909253176934 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3638700596990361445, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 1451775205222924547} + m_PrefabAsset: {fileID: 0} +--- !u!95 &2763801909243548044 stripped +Animator: + m_CorrespondingSourceObject: {fileID: 3638700596980764815, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 1451775205222924547} + m_PrefabAsset: {fileID: 0} +--- !u!65 &2603367113295616590 stripped +BoxCollider: + m_CorrespondingSourceObject: {fileID: 3460094114880756557, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 1451775205222924547} + m_PrefabAsset: {fileID: 0} +--- !u!4 &2763801909253176930 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3638700596990361441, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 1451775205222924547} + m_PrefabAsset: {fileID: 0} +--- !u!4 &2763801909253176940 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3638700596990361455, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 1451775205222924547} + m_PrefabAsset: {fileID: 0} +--- !u!4 &9131626885722767412 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7683056980803567927, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 1451775205222924547} + m_PrefabAsset: {fileID: 0} +--- !u!1 &275309355690048611 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1727031213358021984, guid: dad07e68d3659e6439279d0d4110cf4c, + type: 3} + m_PrefabInstance: {fileID: 1451775205222924547} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankUnreliable.prefab.meta b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankUnreliable.prefab.meta new file mode 100644 index 000000000..a48c76d39 --- /dev/null +++ b/Assets/Mirror/Examples/TankTheftAuto/Prefabs/TankUnreliable.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 77f79485ebed3b14fb954879767fe9c0 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/TankTheftAuto/Scripts/TankAuthority.cs b/Assets/Mirror/Examples/TankTheftAuto/Scripts/TankAuthority.cs index f26f103ac..5c050f746 100644 --- a/Assets/Mirror/Examples/TankTheftAuto/Scripts/TankAuthority.cs +++ b/Assets/Mirror/Examples/TankTheftAuto/Scripts/TankAuthority.cs @@ -12,7 +12,7 @@ public class TankAuthority : NetworkBehaviour { [Header("Components")] public GameObject triggerUI; - public TankTurret tankTurret; + public TankTurretBase tankTurret; public GameObject tankTrigger; [SyncVar(hook = nameof(OnIsControlledChanged))] @@ -40,7 +40,7 @@ void Reset() tankTrigger = transform.Find("TankTrigger").gameObject; if (tankTurret == null) - tankTurret = GetComponent(); + tankTurret = GetComponent(); triggerUI.SetActive(false); } diff --git a/Assets/Mirror/Examples/TankTheftAuto/Scripts/TankTheftAutoNetMan.cs b/Assets/Mirror/Examples/TankTheftAuto/Scripts/TankTheftAutoNetMan.cs index 6e2d60651..7b37995d6 100644 --- a/Assets/Mirror/Examples/TankTheftAuto/Scripts/TankTheftAutoNetMan.cs +++ b/Assets/Mirror/Examples/TankTheftAuto/Scripts/TankTheftAutoNetMan.cs @@ -14,7 +14,7 @@ public override void OnServerDisconnect(NetworkConnectionToClient conn) if (conn.identity != null) { - if (conn.identity.TryGetComponent(out TankTurret tankTurret)) + if (conn.identity.TryGetComponent(out TankTurretBase tankTurret)) tankTurret.playerColor = Color.black; if (conn.identity.TryGetComponent(out TankAuthority tankAuthority)) diff --git a/Assets/Mirror/Examples/_Common/Controllers/ContollerUIBase.cs b/Assets/Mirror/Examples/_Common/Controllers/ContollerUIBase.cs index 5474fe9f6..c41b86467 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/ContollerUIBase.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/ContollerUIBase.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; namespace Mirror.Examples.Common.Controllers diff --git a/Assets/Mirror/Examples/_Common/Controllers/ContollerUIBase.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/ContollerUIBase.cs.meta index 4bf5862cd..2a1839a70 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/ContollerUIBase.cs.meta +++ b/Assets/Mirror/Examples/_Common/Controllers/ContollerUIBase.cs.meta @@ -5,7 +5,7 @@ MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 - icon: {instanceID: 0} + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerController.cs b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerBase.cs similarity index 99% rename from Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerController.cs rename to Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerBase.cs index da27cd1a8..065ccaac8 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerController.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerBase.cs @@ -5,14 +5,12 @@ namespace Mirror.Examples.Common.Controllers.Flyer { [AddComponentMenu("")] - [RequireComponent(typeof(PlayerCamera))] [RequireComponent(typeof(Rigidbody))] [RequireComponent(typeof(CapsuleCollider))] [RequireComponent(typeof(CharacterController))] [RequireComponent(typeof(NetworkIdentity))] - [RequireComponent(typeof(NetworkTransformReliable))] [DisallowMultipleComponent] - public class FlyerController : NetworkBehaviour + public class FlyerControllerBase : NetworkBehaviour { const float BASE_DPI = 96f; @@ -286,6 +284,9 @@ public override void OnStopLocalPlayer() void Update() { + if (!Application.isFocused) + return; + if (!characterController.enabled) return; diff --git a/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerController.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerBase.cs.meta similarity index 100% rename from Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerController.cs.meta rename to Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerBase.cs.meta diff --git a/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerReliable.cs b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerReliable.cs new file mode 100644 index 000000000..279101429 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerReliable.cs @@ -0,0 +1,8 @@ +using UnityEngine; + +namespace Mirror.Examples.Common.Controllers.Flyer +{ + [AddComponentMenu("Network/Flyer Controller (Reliable)")] + [RequireComponent(typeof(NetworkTransformReliable))] + public class FlyerControllerReliable : FlyerControllerBase { } +} diff --git a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerController.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerReliable.cs.meta similarity index 86% rename from Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerController.cs.meta rename to Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerReliable.cs.meta index b34924f20..6071e7211 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerController.cs.meta +++ b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerReliable.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9e212b6697536124ca0e7791fe5d8d6b +guid: ea5cb2c21c7b53847b5d39d172f84080 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUI.cs b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUI.cs index b4b49703a..af64847b9 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUI.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUI.cs @@ -41,7 +41,7 @@ public struct OptionsTexts [SerializeField] FlightTexts flightTexts; [SerializeField] OptionsTexts optionsTexts; - public void Refresh(FlyerController.MoveKeys moveKeys, FlyerController.FlightKeys flightKeys, FlyerController.OptionsKeys optionsKeys) + public void Refresh(FlyerControllerBase.MoveKeys moveKeys, FlyerControllerBase.FlightKeys flightKeys, FlyerControllerBase.OptionsKeys optionsKeys) { // Movement Keys moveTexts.keyTextTurnLeft.text = GetKeyText(moveKeys.TurnLeft); diff --git a/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUnreliable.cs b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUnreliable.cs new file mode 100644 index 000000000..4d3c0c704 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUnreliable.cs @@ -0,0 +1,8 @@ +using UnityEngine; + +namespace Mirror.Examples.Common.Controllers.Flyer +{ + [AddComponentMenu("Network/Flyer Controller (Unreliable)")] + [RequireComponent(typeof(NetworkTransformUnreliable))] + public class FlyerControllerUnreliable : FlyerControllerBase { } +} diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUnreliable.cs.meta similarity index 86% rename from Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs.meta rename to Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUnreliable.cs.meta index b82fd8f37..83e363f95 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs.meta +++ b/Assets/Mirror/Examples/_Common/Controllers/FlyerController/FlyerControllerUnreliable.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2620edb022743ce4bafb12274ee78716 +guid: acd5d4cdfcd42424d9d1fae8f79611e8 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerController.cs b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerBase.cs similarity index 99% rename from Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerController.cs rename to Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerBase.cs index 940a902f7..635fc4c92 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerController.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerBase.cs @@ -9,9 +9,8 @@ namespace Mirror.Examples.Common.Controllers.Player [RequireComponent(typeof(CapsuleCollider))] [RequireComponent(typeof(CharacterController))] [RequireComponent(typeof(NetworkIdentity))] - [RequireComponent(typeof(NetworkTransformReliable))] [DisallowMultipleComponent] - public class PlayerController : NetworkBehaviour + public class PlayerControllerBase : NetworkBehaviour { const float BASE_DPI = 96f; @@ -231,6 +230,9 @@ public override void OnStopLocalPlayer() void Update() { + if (!Application.isFocused) + return; + if (!characterController.enabled) return; diff --git a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerBase.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerBase.cs.meta new file mode 100644 index 000000000..08554329d --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 22ac0cecaad969041bfd6a297fc5f2cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerReliable.cs b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerReliable.cs new file mode 100644 index 000000000..7275546c4 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerReliable.cs @@ -0,0 +1,8 @@ +using UnityEngine; + +namespace Mirror.Examples.Common.Controllers.Player +{ + [AddComponentMenu("Network/Player Controller (Reliable)")] + [RequireComponent(typeof(NetworkTransformReliable))] + public class PlayerControllerReliable : PlayerControllerBase { } +} diff --git a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerReliable.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerReliable.cs.meta new file mode 100644 index 000000000..85445f77e --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerReliable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 497221e839119e34b897d6c497cbc8e5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUI.cs b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUI.cs index 1a47cb71b..9e1a3fd2a 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUI.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUI.cs @@ -31,7 +31,7 @@ public struct OptionsTexts [SerializeField] MoveTexts moveTexts; [SerializeField] OptionsTexts optionsTexts; - public void Refresh(PlayerController.MoveKeys moveKeys, PlayerController.OptionsKeys optionsKeys) + public void Refresh(PlayerControllerBase.MoveKeys moveKeys, PlayerControllerBase.OptionsKeys optionsKeys) { // Movement Keys moveTexts.keyTextTurnLeft.text = GetKeyText(moveKeys.TurnLeft); diff --git a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUnreliable.cs b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUnreliable.cs new file mode 100644 index 000000000..c8dd77416 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUnreliable.cs @@ -0,0 +1,8 @@ +using UnityEngine; + +namespace Mirror.Examples.Common.Controllers.Player +{ + [AddComponentMenu("Network/Player Controller (Unreliable)")] + [RequireComponent(typeof(NetworkTransformUnreliable))] + public class PlayerControllerUnreliable : PlayerControllerBase { } +} diff --git a/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUnreliable.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUnreliable.cs.meta new file mode 100644 index 000000000..ee0f614ad --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/PlayerController/PlayerControllerUnreliable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f81b59082839c2e40938767457bb91ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankController.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerBase.cs similarity index 98% rename from Assets/Mirror/Examples/_Common/Controllers/TankController/TankController.cs rename to Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerBase.cs index 573b56463..e50a15e6b 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankController.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerBase.cs @@ -5,13 +5,12 @@ namespace Mirror.Examples.Common.Controllers.Tank { [AddComponentMenu("")] - [RequireComponent(typeof(PlayerCamera))] [RequireComponent(typeof(Rigidbody))] [RequireComponent(typeof(CharacterController))] [RequireComponent(typeof(NetworkIdentity))] - [RequireComponent(typeof(NetworkTransformReliable))] + [RequireComponent(typeof(TankHealth))] [DisallowMultipleComponent] - public class TankController : NetworkBehaviour + public class TankControllerBase : NetworkBehaviour { public enum GroundState : byte { Jumping, Falling, Grounded } @@ -129,7 +128,7 @@ protected override void OnValidate() Reset(); } - void Reset() + protected virtual void Reset() { if (boxCollider == null) boxCollider = GetComponentInChildren(); @@ -205,6 +204,9 @@ public override void OnStopLocalPlayer() void Update() { + if (!Application.isFocused) + return; + if (!characterController.enabled) return; diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankController.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerBase.cs.meta similarity index 100% rename from Assets/Mirror/Examples/_Common/Controllers/TankController/TankController.cs.meta rename to Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerBase.cs.meta diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerReliable.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerReliable.cs new file mode 100644 index 000000000..4c4cdbe38 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerReliable.cs @@ -0,0 +1,8 @@ +using UnityEngine; + +namespace Mirror.Examples.Common.Controllers.Tank +{ + [AddComponentMenu("Network/Tank Controller (Reliable)")] + [RequireComponent(typeof(NetworkTransformReliable))] + public class TankControllerReliable : TankControllerBase { } +} diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerReliable.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerReliable.cs.meta new file mode 100644 index 000000000..5f86b7a15 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerReliable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 275b33356ccf3ad4f96b0084f0128272 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUI.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUI.cs index 487cea9d3..267750a51 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUI.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUI.cs @@ -35,7 +35,7 @@ public struct OptionsTexts [SerializeField] OtherTexts otherKeys; [SerializeField] OptionsTexts optionsTexts; - public void Refresh(TankController.MoveKeys moveKeys, TankController.OptionsKeys optionsKeys) + public void Refresh(TankControllerBase.MoveKeys moveKeys, TankControllerBase.OptionsKeys optionsKeys) { // Movement Keys moveTexts.keyTextTurnLeft.text = GetKeyText(moveKeys.TurnLeft); diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUnreliable.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUnreliable.cs new file mode 100644 index 000000000..1ec8e29f4 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUnreliable.cs @@ -0,0 +1,8 @@ +using UnityEngine; + +namespace Mirror.Examples.Common.Controllers.Tank +{ + [AddComponentMenu("Network/Tank Controller (Unreliable)")] + [RequireComponent(typeof(NetworkTransformUnreliable))] + public class TankControllerUnreliable : TankControllerBase { } +} diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUnreliable.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUnreliable.cs.meta new file mode 100644 index 000000000..2f664f2a2 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankControllerUnreliable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 54174134d990edc4b8d3ba4242a9a61a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankHealth.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankHealth.cs index 46243ca6c..7dde134a1 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankHealth.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankHealth.cs @@ -48,7 +48,7 @@ protected override void OnValidate() public void Reset() { if (healthBar == null) - healthBar = GetComponentInChildren(); + healthBar = transform.Find("HealthBar").GetComponent(); } #endregion diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretBase.cs similarity index 89% rename from Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs rename to Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretBase.cs index da45e8b68..73e8c9f13 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurret.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretBase.cs @@ -5,10 +5,8 @@ namespace Mirror.Examples.Common.Controllers.Tank { [AddComponentMenu("")] [RequireComponent(typeof(NetworkIdentity))] - [RequireComponent(typeof(NetworkTransformReliable))] - [RequireComponent(typeof(TankController))] [DisallowMultipleComponent] - public class TankTurret : NetworkBehaviour + public class TankTurretBase : NetworkBehaviour { [Serializable] public struct OptionsKeys @@ -54,8 +52,6 @@ public enum ControlOptions : byte [Header("Components")] public Animator animator; - public NetworkTransformReliable turretNTR; - public NetworkTransformReliable barrelNTR; public Transform turret; public Transform barrel; public Transform projectileMount; @@ -150,7 +146,8 @@ protected override void OnValidate() Reset(); } - void Reset() + // NOTE: Do not put objects in DontDestroyOnLoad (DDOL) in Awake. You can do that in Start instead. + protected virtual void Reset() { if (animator == null) animator = GetComponentInChildren(); @@ -189,40 +186,6 @@ Transform FindDeepChild(Transform aParent, string aName) return null; } - // The base Tank uses the first NetworkTransformReliable for the tank body - // Add additional NetworkTransformReliable components for the turret and barrel - NetworkTransformReliable[] NTRs = GetComponents(); - - if (NTRs.Length < 2) - { - turretNTR = gameObject.AddComponent(); - turretNTR.transform.SetSiblingIndex(NTRs[0].transform.GetSiblingIndex() + 1); - NTRs = GetComponents(); - } - else - turretNTR = NTRs[1]; - - // Set SyncPosition to false because we only want to sync rotation - turretNTR.syncPosition = false; - - if (turret != null) - turretNTR.target = turret; - - if (NTRs.Length < 3) - { - barrelNTR = gameObject.AddComponent(); - barrelNTR.transform.SetSiblingIndex(NTRs[1].transform.GetSiblingIndex() + 1); - NTRs = GetComponents(); - } - else - barrelNTR = NTRs[2]; - - // Set SyncPosition to false because we only want to sync rotation - barrelNTR.syncPosition = false; - - if (barrel != null) - barrelNTR.target = barrel; - #if UNITY_EDITOR // For convenience in the examples, we use the GUID of the Projectile prefab // to find the correct prefab in the Mirror/Examples/_Common/Controllers folder. diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretBase.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretBase.cs.meta new file mode 100644 index 000000000..623f11221 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ba67fa30a5212ed4e964609050cdc3f5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretReliable.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretReliable.cs new file mode 100644 index 000000000..fb63c0c4a --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretReliable.cs @@ -0,0 +1,62 @@ +using UnityEngine; + +namespace Mirror.Examples.Common.Controllers.Tank +{ + [AddComponentMenu("Network/Tank Turret (Reliable)")] + [RequireComponent(typeof(TankControllerReliable))] + [RequireComponent(typeof(NetworkTransformReliable))] + public class TankTurretReliable : TankTurretBase + { + [Header("Components")] + public NetworkTransformReliable turretNTR; + public NetworkTransformReliable barrelNTR; + + protected override void Reset() + { + base.Reset(); + + // The base Tank uses the first NetworkTransformReliable for the tank body + // Add additional NetworkTransformReliable components for the turret and barrel + // Set SyncPosition to false because we only want to sync rotation + NetworkTransformReliable[] NTs = GetComponents(); + + if (NTs.Length < 2) + { + turretNTR = gameObject.AddComponent(); + turretNTR.transform.SetSiblingIndex(NTs[0].transform.GetSiblingIndex() + 1); + NTs = GetComponents(); + } + else + turretNTR = NTs[1]; + + // Ensure SyncDirection is Client to Server + turretNTR.syncDirection = SyncDirection.ClientToServer; + turretNTR.syncPosition = false; + + // Set SyncPosition to false because we only want to sync rotation + //turretNTR.syncPosition = false; + + if (base.turret != null) + turretNTR.target = turret; + + if (NTs.Length < 3) + { + barrelNTR = gameObject.AddComponent(); + barrelNTR.transform.SetSiblingIndex(NTs[1].transform.GetSiblingIndex() + 1); + NTs = GetComponents(); + } + else + barrelNTR = NTs[2]; + + // Ensure SyncDirection is Client to Server + barrelNTR.syncDirection = SyncDirection.ClientToServer; + barrelNTR.syncPosition = false; + + // Set SyncPosition to false because we only want to sync rotation + //barrelNTR.syncPosition = false; + + if (barrel != null) + barrelNTR.target = barrel; + } + } +} diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretReliable.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretReliable.cs.meta new file mode 100644 index 000000000..48c6ce20e --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretReliable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fbb0b0f4ce2fede4f95abe4cf1737365 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretUnreliable.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretUnreliable.cs new file mode 100644 index 000000000..e47451962 --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretUnreliable.cs @@ -0,0 +1,62 @@ +using UnityEngine; + +namespace Mirror.Examples.Common.Controllers.Tank +{ + [AddComponentMenu("Network/Tank Turret (Unreliable)")] + [RequireComponent(typeof(TankControllerUnreliable))] + [RequireComponent(typeof(NetworkTransformUnreliable))] + public class TankTurretUnreliable : TankTurretBase + { + [Header("Components")] + public NetworkTransformUnreliable turretNTR; + public NetworkTransformUnreliable barrelNTR; + + protected override void Reset() + { + base.Reset(); + + // The base Tank uses the first NetworkTransformReliable for the tank body + // Add additional NetworkTransformReliable components for the turret and barrel + // Set SyncPosition to false because we only want to sync rotation + NetworkTransformUnreliable[] NTs = GetComponents(); + + if (NTs.Length < 2) + { + turretNTR = gameObject.AddComponent(); + turretNTR.transform.SetSiblingIndex(NTs[0].transform.GetSiblingIndex() + 1); + NTs = GetComponents(); + } + else + turretNTR = NTs[1]; + + // Ensure SyncDirection is Client to Server + turretNTR.syncDirection = SyncDirection.ClientToServer; + turretNTR.syncPosition = false; + + // Set SyncPosition to false because we only want to sync rotation + //turretNTR.syncPosition = false; + + if (base.turret != null) + turretNTR.target = turret; + + if (NTs.Length < 3) + { + barrelNTR = gameObject.AddComponent(); + barrelNTR.transform.SetSiblingIndex(NTs[1].transform.GetSiblingIndex() + 1); + NTs = GetComponents(); + } + else + barrelNTR = NTs[2]; + + // Ensure SyncDirection is Client to Server + barrelNTR.syncDirection = SyncDirection.ClientToServer; + barrelNTR.syncPosition = false; + + // Set SyncPosition to false because we only want to sync rotation + //barrelNTR.syncPosition = false; + + if (barrel != null) + barrelNTR.target = barrel; + } + } +} diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretUnreliable.cs.meta b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretUnreliable.cs.meta new file mode 100644 index 000000000..2605dc7bf --- /dev/null +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TankTurretUnreliable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2cd78b1021803ce4fa7c95ca67f19aec +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/_Common/Controllers/TankController/TurretUI.cs b/Assets/Mirror/Examples/_Common/Controllers/TankController/TurretUI.cs index 3c8833b14..d9fce5d40 100644 --- a/Assets/Mirror/Examples/_Common/Controllers/TankController/TurretUI.cs +++ b/Assets/Mirror/Examples/_Common/Controllers/TankController/TurretUI.cs @@ -19,7 +19,7 @@ public struct MoveTexts [SerializeField] MoveTexts moveTexts; - public void Refresh(TankTurret.MoveKeys moveKeys, TankTurret.OptionsKeys optionsKeys) + public void Refresh(TankTurretBase.MoveKeys moveKeys, TankTurretBase.OptionsKeys optionsKeys) { // Movement Keys moveTexts.keyTextPitchUp.text = GetKeyText(moveKeys.PitchUp);