Question by
$$anonymous$$ · Aug 22, 2017 at 04:57 PM ·
unity 5
Find GameObject with specific type of enum which equals to another enum
I have 3 scripts. In first i want to search GameObject with enum == enum of item. Like that:
if ((int)Object.FindObjectOfType<Slot>().option == (int)Item.item)
{
Debug.Log("Nice");
}
Slot.option need to equals Item.item
Item.item working becouse it is attached to the same GameObject but i don't know how to find GameObject with the same slot with (int)Enum like item (int)Enum.
Comment
Your answer
