Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

NullReferenceException: Object reference not set to an instance of an object

$
0
0
Hi, I'm relatively new to Unity.
I've made a script that when I tap and hold on the screen, the player moves forward, and when I swipe left and right, the player follows it. But the code is getting an error:
"NullReferenceException: Object reference not set to an instance of an object
PlayerMovement.Update () (at Assets/Scripts/PlayerMovement.cs:17)"


The script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement:...


NullReferenceException: Object reference not set to an instance of an object

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>