Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

get index of item unity

int getIndex(GameObject[] list, GameObject item)
{
	for(int i=0;i<list.Length;i++)
    {
    	if(list[i] == item) return i;
    }
    return -1;
}
 
PREVIOUS NEXT
Tagged: #index #item #unity
ADD COMMENT
Topic
Name
1+6 =