Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,15 @@ public InputActionReference rightClick
public InputActionReference move
{
get => m_MoveAction;
set => SwapAction(ref m_MoveAction, value, m_ActionsHooked, m_OnMoveDelegate);
set
{
SwapAction(ref m_MoveAction, value, m_ActionsHooked, m_OnMoveDelegate);
// Because moveAction is the only action cached in the navigation state,
// we need to read new action's current value to avoid stale state from the previous action.
m_NavigationState.move = m_MoveAction?.action != null && m_MoveAction.action.enabled
? m_MoveAction.action.ReadValue<Vector2>()
: Vector2.zero;
}
}

/// <summary>
Expand Down
Loading