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 ERROR - Idk why

$
0
0
Whats the correct way it should be written? using UnityEngine; using System.Collections; public class GroundCheck : MonoBehaviour { private Player player; void Start () { player.gameObject.GetComponentsInParent (); } void OnTriggerEnter2D(Collider2D col){ if (null == player) { Start (); } player.grounded = true; } void OnTriggerStay2D (Collider2D col){ player.grounded = true; } void OnTriggerExit2D(Collider2D col){ player.grounded = false; } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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