private void DestroyPickup()
{
if (GetPickup())
{
Destroy(GetPickup().gameObject);
}
}
Question on this piece of code. GetPickup returns the Pickup type, not a bool. How does that work with an if statement? I’m guessing it returns true if it isn’t null and false if it is?