'How to fix InveDisplayInventory.cs(37,50): error CS0246: The type or namespace name 'TextMeshProUGUI' could not be found? [closed]

I am trying to use TextMeshProUGUI in my code, but I am getting this error:

Assets-Scriptable Objects\Inventory\DisplayInventory.cs(37,50): error CS0246: The type or namespace name 'TextMeshProUGUI' could not be found (are you missing a using directive or an assembly reference?)

Which I am using using UnityEngine.UI;.

My code:

 _slot.Key.GetComponentInChildren<TextMeshProUGUI>().text = _slot.Value.amount == 1 ? "" : _slot.Value.amount.ToString("n0");


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source