Hello!Code
There is problem with method GetBindingIndex. Either I don’t really understand how it should work or it doesn’t work as expected. Basically, it should work similar to IndexOf(element) of List and return you correct result at least when you passing unmodified element directly obtained through foreach. GetBindingIndex does it with variable success.
For instance, I have a several actions, some of which are simple button type and some are composite vector2.
Even when i’m trying to do very basic cycle to obtain binding index of every element, I’m not getting expected result.
foreach (InputBinding binding in action.action.bindings)
{
Debug.Log($"{action.action.name}, path: {binding.effectivePath}, Index: {action.action.GetBindingIndex(binding)}");
}

As you can see, this method returns correct index only for composite bindings so it doesn’t work properly. I can do another method override with GetBindingIndex(string group, string path) but due to ingame rebinding system which working with different paths every time I can’t rely on it. Also, I can’t just put an int inside loop to make it count iterations because there is a case where I should go through an Action Map bindings array, so the loop iterations would be different from action’s actual binding indexes.
