So i'm following this tutorial around minute 50 But I keep getting the same error:
NullReferenceException: Object reference not set to an instance of an object
Player.FixedUpdate () (at Assets/Player.cs:31)
Object reference not set to an instance of an object
NullReferenceException: Object reference not set to an instance of an object
Player.FixedUpdate () (at Assets/Player.cs:31)
Code (CSharp):
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Player : MonoBehaviour
- {
- private BoxCollider2D boxCollider;
- private Vector3 moveDelta;
- private RaycastHit2D hit;
- private void...