title: How to override InputSystem Action path?
body: <p>I have a rebind script in my game that looks like this:</p>
  <pre><code>using UnityEngine;
  using UnityEngine.InputSystem;
  using UnityEngine.EventSystems;
  using TMPro;
  
  public class RebindButton : MonoBehaviour
  {
      [SerializeField] private InputActionReference inputActionRef;
      [SerializeField] private TMP_Text buttonText;
      [SerializeField] private int actionIndex = 0;
      private InputActionRebindingExtensions.RebindingOperation rebindingOperation;
      private void Start()
      {
          buttonText.text = InputControlPath.ToHumanReadableString(inputActionRef.action.bindings[actionIndex].effectivePath,
              InputControlPath.HumanReadableStringOptions.OmitDevice);
      }
  
      public void StartRebinding()
      {
          if (inputActionRef.action.bindings[actionIndex].isPartOfComposite)
          {
              Debug.Log(inputActionRef.action.bindings[actionIndex].path);
          }
          rebindingOperation = inputActionRef.action.PerformInteractiveRebinding(actionIndex)
          .WithCancelingThrough(&quot;&lt;Keyboard&gt;/escape&quot;)
          .OnMatchWaitForAnother(0.1f)
          .OnCancel(operation =&gt; RebindCancel())
          .OnComplete(operation =&gt; RebindComplete())
          .Start();
      }
  
      private void RebindComplete()
      {
          Debug.Log(inputActionRef.action.bindings[actionIndex].path);
          buttonText.text = InputControlPath.ToHumanReadableString(inputActionRef.action.bindings[actionIndex].effectivePath,
              InputControlPath.HumanReadableStringOptions.OmitDevice);
          rebindingOperation.Dispose();
          FindObjectOfType&lt;EventSystem&gt;().SetSelectedGameObject(null);
      }
  
      private void RebindCancel()
      {
          rebindingOperation.Dispose();
          FindObjectOfType&lt;EventSystem&gt;().SetSelectedGameObject(null);
      }
  }
  </code></pre>
  <p>But all bindings that I change keep the same action path as before, even though their inputaction.callback button changing according to rebinding. That makes impossible to change my composite Vector2 movement binding. Vector2 changing only when I press button that showed in the action path. My movements set to WASD. When I changing it to the arrows my hero starting to move only when I press one of the arrows and one of WASD buttons. His direction changes according to the WASD buttons I press. Here is some movement script code:</p>
  <pre><code>void Update()
  {
      if (moveButtonIsHeld)
      {
          direction = playerInput.PlayerMovement.Movement.ReadValue&lt;Vector2&gt;();
          areTwoKeysPressed = direction.x != 0 &amp;&amp; direction.y != 0;
          Move();
      }
      else
          playerComponent.animator.SetLayerWeight(1, 0);
  }
  
  public void SetStateMoveButton(InputAction.CallbackContext context)
  {
      if (context.performed)
          moveButtonIsHeld = true;
      if (context.canceled)
          moveButtonIsHeld = false;
  }
  public void Move()
  {
      transform.Translate(direction * speed * Time.deltaTime);
      if (direction.x != 0 || direction.y != 0)
          SetAnimatorMovement(direction);
  }
  </code></pre>
  <p>Also I would like to ask how to get actionIndex in the script. Now I'm setting it manually in the inspector.</p>