@@ -44,14 +44,15 @@ public class KeyRemapManager : MonoBehaviour
4444
4545 public static KeyRemapManager Instance { get ; private set ; }
4646
47+ public bool IsRebinding => currentOperation != null || Time . realtimeSinceStartup - lastRebindTime < 0.5f ;
48+
4749 private KepRemapPanel panel ;
4850 private TextMeshProUGUI sectionText ;
4951
5052 private PlayerInput playerInput ;
5153 private InputActionRebindingExtensions . RebindingOperation currentOperation ;
5254 private SettingsOption currentOption ;
5355 private List < ( RemappableControl , SettingsOption ) > controlsList = [ ] ;
54- private readonly List < GameObject > panelObjects = [ ] ;
5556
5657 private float lastRebindTime ;
5758
@@ -87,7 +88,6 @@ private void Awake()
8788 var obj = Instantiate ( panel . keyRemapSlotPrefab , panel . keyRemapContainer ) ;
8889 var discard = Instantiate ( AssetManager . KeybindDiscard , obj . transform ) ;
8990
90- panelObjects . Add ( obj ) ;
9191 panel . keySlots . Add ( obj ) ;
9292
9393 obj . GetComponentInChildren < TextMeshProUGUI > ( ) . text = remappableKey . controlName ;
@@ -249,6 +249,8 @@ private void CompleteRebind(SettingsOption option, int rebindIndex)
249249 var action = currentOperation . action ;
250250
251251 currentOperation . Dispose ( ) ;
252+ currentOperation = null ;
253+
252254 playerInput . ActivateInput ( ) ;
253255
254256 var image = option . transform . Find ( "ControlImage" ) . GetComponent < Image > ( ) ;
0 commit comments