Quick question about inputfield

I don’t have access to a computer right now and I wonder if my idea would work or not.

I whant to creat an input field array and check inside an if statement if one of the element is focus.

Do I write it that way and will it work?

If(InputField[ ].isFocused)
{
}

Certainly seems like it would… I would instead however write it so that you iterate the array of InputField objects, then pass each one to a common checker function. This would clean the code up a lot:

foreach( var field in MyInputFieldArray)
{
  DoInputFieldProcessing( field);
}

That way each line doesn’t have to have an indexer or dereferencer, unless you care about that.

Ok thanks