Number in Array

Hi, Unity users!!! Now I’m having a little issue with the array. I have an array which holds the objects that are instantiated by using the script.

For example :

box [0] : A ;
box [1] : B ;
box [2] : C ;

Until box [9] : J ;

All I want to know is I want to know the number in the array of the object I click. In other word, if I click on object B, I want to print its number in the array which is 1 . If I click on the object J, I want to see the number 9 in the console window. I already knew how to make it clickable. However, I don’t know how to know what number it is in the array. Is there a way to solve this issue? Thanks in advance

If it is in C# you can do :

int num = Array.IndexOf(box, input) // input is J in your example

Cool!!! Oh!!! What can the input be? Is it String, int, gameOjbect, float … ?

Whatever you have inside your array