File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Assets/Samples/RebindingUI Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -265,14 +265,16 @@ void CleanUp()
265265 m_UIInputActionMap ? . Enable ( ) ;
266266 }
267267
268- // When rebinding an action, it is good practice to disable the action itself.
268+ // An "InvalidOperationException: Cannot rebind action x while it is enabled" will
269+ // be thrown if rebinding is attempted on an action that is enabled.
269270 //
270- // Here, we are disabling the entire action map in which the action resides.
271- // It is recommended to organise your action maps such that a "Gameplay" action map
272- // which contains the rebindable actions. This map can then be disabled while the
273- // rebinding UI is on display .
271+ // On top of disabling the target action while rebinding, it is recommended to
272+ // disable any actions (or action maps) that could interact with the rebinding UI
273+ // or gameplay - it would be undesirable for rebinding to cause the player
274+ // character to jump .
274275 //
275- // Also prevents "InvalidOperationException: Cannot rebind action x while it is enabled" errors.
276+ // In this example, we explicitly disable both the UI input action map and
277+ // the action map containing the target action.
276278 action . actionMap . Disable ( ) ;
277279 m_UIInputActionMap ? . Disable ( ) ;
278280
You can’t perform that action at this time.
0 commit comments