Hey
I want to reference an InputAction in my code.
I have a CastSpell1 action defined in the new Input System
I have a simple script with an InputAction field
using TinyLegends.Abilities;
using UnityEngine;
using UnityEngine.InputSystem;
namespace TinyLegends
{
public class AbilityCaster : MonoBehaviour
{
public ActiveAbility activeAbility;
public InputAction inputAction;
private void Awake()
{
inputAction.performed += _ => activeAbility.Cast();
}
}
}
But I can’t drag the action from the Project window to the field in the Inspector window. It just shows crossed circle cursor.
Why is that and how can I reference the InputAction?