I GET ERROR IN UNİTY NEW INPUT SYSTEM
object reference not set to an instance of an object
how can ı fix this ı set everythin like video and get error bla bla
These are my codes
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class InputManager : MonoBehaviour
{
private PlayerInput playerInput;
private PlayerInput.OnFootActions onFoot;
private PlayerMotor motor;
void awake()
{
playerInput = new PlayerInput();
onFoot = playerInput.OnFoot;
motor = GetComponent<PlayerMotor>();
}
void FixedUpdate()
{
motor.ProcessMove(onFoot.Movement.ReadValue<Vector2>());
}
private void onEnable()
{
onFoot.Enable();
}
private void onDisable()
{
onFoot.Disable();
}
}