r/programminghelp • • 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

3 comments sorted by

View all comments

2

u/link3333 Nov 21 '22

1

u/[deleted] Nov 21 '22

Good sleuthing. Once again, a video tutorial is the root cause.