From 204ec8b42bc6eee0ad1ae0a75cc1970019e89f52 Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sat, 1 Mar 2025 20:36:32 -0500 Subject: [PATCH] Fix undefined tooltip bug on slinger unitcard --- Assets/Scripts/Ally/Tooltip/TooltipManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Ally/Tooltip/TooltipManager.cs b/Assets/Scripts/Ally/Tooltip/TooltipManager.cs index babeb1c..5f23e6c 100644 --- a/Assets/Scripts/Ally/Tooltip/TooltipManager.cs +++ b/Assets/Scripts/Ally/Tooltip/TooltipManager.cs @@ -40,10 +40,10 @@ public class TooltipManager : Singleton private string DescriptionManager(UnitCard unitCard) { - if (unitCard) + if (unitCard != null) { string tooltipDescription; - if (unitCard?.TooltipString.Length > 0) + if (unitCard.TooltipString != null && unitCard.TooltipString.Length > 0) { tooltipDescription = unitCard.TooltipString; }