【Unity】VS CodeでInputSystemが見つからない時の対処法

UnityにInputSystemをインストールしてVS Codeで使おうとすると、UnityEngine.InputSystemの名前空間が見つからないことがある。その場合の対処法について書いた。
手順
環境設定を開く
Unityのメニューから「Edit」>「Preferences」を選択し、環境設定を開く。

プロジェクトファイルを再作成する
「External Tools」の項目を切り替え、「Regenerate project files」ボタンを押し、.csprojファイルを再作成する。

これでUnityEngine.InputSystem
の名前空間が正常に認識される。