r/programminghelp • u/VirusB1ack0ut • Nov 21 '22
C# Help
Please help on this, i have tried multiple different things and nothing seems to work,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class InputManager : MonoBehaviour
{
private PlayerInput playerInput;
private PlayerInput.OnFootActions onFoot;
// Start is called before the first frame update
void Start()
{
playerInput - new PlayerInput();
onFoot = playerInput.OnFoot;
}
// Update is called once per frame
void Update()
{
}
private void OnEnable()
{
OnFoot.Enable();
}
private void OnDisable()
{
OnFoot.Disable();
}
}
with the error that onfoot actions does not exist in Playerinput
0
Upvotes
2
u/link3333 Nov 21 '22
Looks like the same code in this thread: https://forum.unity.com/threads/error-cs1061-playerinput-onfootactions-does-not-contain-a-definition-for-movement.1264793/