I have this if statement, where I validate that if the id is null and the currentIndex is equal to 1, then I assign the id as "dunk1", but my problem is that the ID is always empty, what am I doing wrong?
public void TryBuyById(string id)
{
if (id is null && currentIndex == '1')
{
id = "dunk1";
ShopManager.Instance.BuyProductById(id);
}
else
{
UnityEngine.Debug.Log("Este es el currentIndex... :" + currentIndex);
UnityEngine.Debug.Log("Este es el ID... :" + id);
}
}
I thank you for your help!