Exemplo n.º 1
0
 void RemapButtonClicked(string name, int bindingIndex = 0)
 {
     old = inputAction.Clone();
     FindObjectOfType <AudioManager>().Play("Click");
     inputAction.Disable();
     button.enabled = false;
     text.text      = "Press any key...";
     foreach (var action in InputSystem.ListEnabledActions())
     {
     }
     rebindingOperation?.Dispose();
     rebindingOperation = inputAction.PerformInteractiveRebinding()
                          .WithControlsExcluding("<Mouse>/position")
                          .WithControlsExcluding("<Mouse>/delta")
                          .OnMatchWaitForAnother(0.1f)
                          .OnComplete(operation => ButtonRebindCompleted())
                          .Start();
 }