Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Object reference not set to instance of an object?

$
0
0
using System.Collections; using System.Collections.Generic; using UnityEngine; public class NewBehaviourScript : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { transform.Rotate (0, 0, Event.current.delta.x); } } "NullReferenceException: Object reference not set to an instance of an object NewBehaviourScript.Update () (at Assets/NewBehaviourScript.cs:17)" This error gets printed 4 times once i save get back to unity. I'm trying to get the gameObject this script is attached to to rotate as i move the mouse right or left.

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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