How to add new input actions to existing input actions?

Greetings,

I’ve finally gotten around to using the new input system. I setup input actions for movement and it’s all working great.

But when I add additional actions (e.g. a Throw action triggered by the left mouse button) the inputactions cs file that was generated does not get updated to include the new action.

What is the trick for getting it to update the cs script so that the new action is available?

See if this works…

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class InputManager : MonoBehaviour
{
    private PlayerInput playerInput;
    public PlayerInput.PlayerActions player;
    private PlayerMotor motor; #Create script called PlayerMotor, within which is the function you want to run
    void Awake()
    {
        playerInput = new PlayerInput();
        player = playerInput.Player;

        motor = GetComponent<PlayerMotor>();

        player.Throw.performed += ctx => motor.Throw(); #The funcion in the PlayerMotor script shoud be called Throw()

    }

Double check that the CS generate settings are correct:
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.8/manual/ActionAssets.html#auto-generating-script-code-for-actions

It’s checked and you’re seeing and using the file generated here. You can see this when you select the asset in the profile window.