- Home /
NullReferenceException Error
I get this error when I approach the object in game:
NullReferenceException: Object reference not set to an instance of an object TerminalHack.OnTriggerStay (UnityEngine.Collider other) (at Assets/Scripts/Modules/TerminalHack.js:28)
function OnTriggerStay (other : Collider) {
if (other.gameObject.tag == "Player")
I changed something in the prefab now it seems to have broken a link. I don't understand what has to be initialized. What to do? TIA
have you created a tag "Player" and assigned it to the gameobject
Answer by rooted · Nov 11, 2013 at 01:04 AM
I rebooted unity and that fixed it. I don't know if that's the correct answer.
Your answer
![](https://koobas.hobune.stream/wayback/20220613121614im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
" NullReferenceException: Object reference not set to an instance of an object" 3 Answers
NullReferenceException: Object reference not set to an instance of an object ..... 1 Answer
NullReferenceException: Object reference not set to an instance of an object ? 1 Answer
Pause menu error NullReferenceException:Object reference not set to an instance of an Object .js 1 Answer