Running into a perplexing and frustrating issue; I’ve added the “Combat” action map to my PlayerControls, set up “Attack” as a button, assigned to left click [mouse]. I’ve saved the changes. When I go into the code for the sword, as far as I can tell I’ve copied it letter for letter, but when I go to type the “playerControls.Combat” line under start, it refuses to recognize the “Combat” action map, and my code is dead in the water. Maybe I missed something small in the code, but I can’t find it. Here it is:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Sword : MonoBehaviour
{
private PlayerControls playerControls;
private void Awake()
{
playerControls = new PlayerControls();
}
private void OnEnable()
{
playerControls.Enable();
}
// Start is called before the first frame update
void Start()
{
}
}
And here’s my PlayerControls: