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.
↧