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

Object reference not set to an instance of an object (c#)

$
0
0
The problem is on line 20 but as I have little knowledge on scripting i'm not sure what the problem is. using UnityEngine; using System.Collections; public class DestroyScript : MonoBehaviour { public GameObject Explosion; public int scoreValue; private GameController gameController; void OnTriggerEnter (Collider Other) { if(Other.tag == "Player") { Instantiate (Explosion,transform.position, transform.rotation); Destroy(gameObject); gameController.AddScore (scoreValue); } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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