From 1fc4c37e5aa03e297cddb3d1f750bd723bf74ab1 Mon Sep 17 00:00:00 2001 From: Madhav Kapa Date: Thu, 15 Jun 2023 15:26:12 +0530 Subject: [PATCH] animation fixed --- .../FishySteamworks/SteamManager.unitypackage.meta} | 2 +- .../MultiplayerScenes/StylizedLobbyScene.unity | 6 +++--- Assets/Scripts/Player/CameraController.cs | 2 +- Assets/Scripts/Player/PlayerComponent.cs | 12 +++++++++++- Assets/Scripts/Player/PlayerMovementController.cs | 1 + ...XGraph_Muzzle_2020.3_URP_v1.0.1.unitypackage.meta | 7 ------- 6 files changed, 17 insertions(+), 13 deletions(-) rename Assets/{VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_HDRP_v1.0.1.unitypackage.meta => Packages/FishNet/Plugins/FishySteamworks/SteamManager.unitypackage.meta} (74%) delete mode 100644 Assets/VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_URP_v1.0.1.unitypackage.meta diff --git a/Assets/VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_HDRP_v1.0.1.unitypackage.meta b/Assets/Packages/FishNet/Plugins/FishySteamworks/SteamManager.unitypackage.meta similarity index 74% rename from Assets/VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_HDRP_v1.0.1.unitypackage.meta rename to Assets/Packages/FishNet/Plugins/FishySteamworks/SteamManager.unitypackage.meta index a4d019d..7890e6c 100644 --- a/Assets/VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_HDRP_v1.0.1.unitypackage.meta +++ b/Assets/Packages/FishNet/Plugins/FishySteamworks/SteamManager.unitypackage.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 96a44475794fb6445a6f3c4b9ee13966 +guid: a9c34549a246d47439b106bb23f71dff DefaultImporter: externalObjects: {} userData: diff --git a/Assets/Scenes/Experimentation/MultiplayerScenes/StylizedLobbyScene.unity b/Assets/Scenes/Experimentation/MultiplayerScenes/StylizedLobbyScene.unity index 58926e9..536f2fb 100644 --- a/Assets/Scenes/Experimentation/MultiplayerScenes/StylizedLobbyScene.unity +++ b/Assets/Scenes/Experimentation/MultiplayerScenes/StylizedLobbyScene.unity @@ -1619,11 +1619,11 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _steamAppID: 480 - _serverBindAddress: + _serverBindAddress: 76561198308605766 _port: 7770 _maximumClients: 3188 - _peerToPeer: 0 - _clientAddress: + _peerToPeer: 1 + _clientAddress: 76561198308605766 --- !u!1001 &1138118844 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Player/CameraController.cs b/Assets/Scripts/Player/CameraController.cs index 07f402c..354b9a0 100644 --- a/Assets/Scripts/Player/CameraController.cs +++ b/Assets/Scripts/Player/CameraController.cs @@ -8,7 +8,7 @@ namespace Player { //private float mouseX = 0; //private float mouseY; - [SerializeField] private Camera cam; + public Camera cam; [SerializeField] private Transform target; diff --git a/Assets/Scripts/Player/PlayerComponent.cs b/Assets/Scripts/Player/PlayerComponent.cs index 1b35b99..b9aae4e 100644 --- a/Assets/Scripts/Player/PlayerComponent.cs +++ b/Assets/Scripts/Player/PlayerComponent.cs @@ -1,9 +1,10 @@ using Cinemachine; +using FishNet.Object; using UnityEngine; namespace Player { - public class PlayerComponent : MonoBehaviour + public class PlayerComponent : NetworkBehaviour { [SerializeField] private float health = 5f; @@ -38,6 +39,15 @@ namespace Player [HideInInspector] public bool IsAlive => health > 0; + public override void OnStartClient() + { + base.OnStartClient(); + if (base.IsOwner) + { + cameraFreeLook = GameObject.Find("CM vcam1").GetComponent(); + } + } + private void Awake() { flareRegister = FindObjectOfType(); diff --git a/Assets/Scripts/Player/PlayerMovementController.cs b/Assets/Scripts/Player/PlayerMovementController.cs index 4b0d0cd..f91ee53 100644 --- a/Assets/Scripts/Player/PlayerMovementController.cs +++ b/Assets/Scripts/Player/PlayerMovementController.cs @@ -72,6 +72,7 @@ namespace Player camObject.GetComponent().Follow = transform; camObject.GetComponent().LookAt = transform.GetChild(0).GetChild(2); transform.GetChild(0).GetComponent().hiddenCam = cam; + transform.GetChild(0).GetChild(2).GetComponent().cam = cam; } else { diff --git a/Assets/VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_URP_v1.0.1.unitypackage.meta b/Assets/VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_URP_v1.0.1.unitypackage.meta deleted file mode 100644 index e4693ea..0000000 --- a/Assets/VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_URP_v1.0.1.unitypackage.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0957b521a08374f4aa508231735153bc -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: