From 3f4674e38f2bf18c017e031e0b336549d96d5409 Mon Sep 17 00:00:00 2001 From: Glence Date: Fri, 10 Mar 2023 17:25:41 +0800 Subject: [PATCH] minor fix --- Assets/Scripts/Gameplay/Player/SC_PlayerAnimations.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerAnimations.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerAnimations.cs index 46ba8120..22b87d55 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerAnimations.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerAnimations.cs @@ -57,11 +57,17 @@ public class PlayerAnimations : Script if (!BagAnimator) Debug.LogError("Bag Animator is MISSING!"); - silhoPlayerAnimator = silhouettePlayer.GetComponent(); + if(!silhouettePlayer) + silhoPlayerAnimator = silhouettePlayer.GetComponent(); + else + Debug.LogError("Silho Player is MISSING!"); if (!silhoPlayerAnimator) Debug.LogError("Silho Player Animator is MISSING!"); - silhoBagAnimator = silhouetteBag.GetComponent(); + if(!silhouetteBag) + silhoBagAnimator = silhouetteBag.GetComponent(); + else + Debug.LogError("Silho bag is MISSING!"); if (!silhoBagAnimator) Debug.LogError("Silho Player Animator is MISSING!"); }