Can I do this?
Array.IndexOf(Array, (index.propery == true))
Where index equals IndexOf's own incrementer.
Why I'm asking:
I'm using Unity, I have a number of objects which are components of a larger, or whole, object in the game. I want to use Unity's editor to assign these Objects to their variables in the game. I later need to iterate over these objects. I would like to do this by having them in an array (as unity can still edit these). The problem begins where in an array I cant access the objects with a meaning-full index. I would like to refer to the components by name, a dictionary is not accessible to by Unity (and incurres a performance overhead).
My solution, which I'm asking whether is possible is to access the array index by searching for it with IndexOf(), but can I do it by searching with the name of the GameObject at each index?
GameObject result = Array.IndexOf(GOArray, GOArray[INDEX].gameObject.name == "theoneiwant")