Search Unity

Resolved action.bindings contains only non composite bindings

Discussion in 'Input System' started by bibikonfikus1234, Jan 28, 2024.

  1. bibikonfikus1234

    bibikonfikus1234

    Joined:
    Jan 31, 2020
    Posts:
    40
    Code (CSharp):
    1.  
    2. for (int i = 0; i < action.bindings.Count; i++)
    3. {
    4.      Debug.Log(action.bindings[i].isComposite);
    5. }
    6.  
    This will print only false, even if there are composite bindings.
    I would think this is intentionally, but I haven't found a way to get composite bindings in docs, only by name, but what if I don't know the name of composite?
     
  2. bibikonfikus1234

    bibikonfikus1234

    Joined:
    Jan 31, 2020
    Posts:
    40
    Oh, sorry, I found an issue in my code. There is no problem with unity.