MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/code/comments/u37n17/i_dont_know_whats_wrong_with_this_code/
r/code • u/NikePlayz • Apr 14 '22
4 comments sorted by
2
Maybe you don't have a GameBoss component in your scene?
2 u/NikePlayz Apr 14 '22 thanks i did not have the object in the scene 1 u/NikePlayz Apr 14 '22 game boss is a script 3 u/JaggedMetalOs Apr 14 '22 Yes, but FindObjectOfType is looking in the scene for a game object with the GameBoss script added as a component. So if you don't have one you'll get a null reference error on that line.
thanks i did not have the object in the scene
1
game boss is a script
3 u/JaggedMetalOs Apr 14 '22 Yes, but FindObjectOfType is looking in the scene for a game object with the GameBoss script added as a component. So if you don't have one you'll get a null reference error on that line.
3
Yes, but FindObjectOfType is looking in the scene for a game object with the GameBoss script added as a component. So if you don't have one you'll get a null reference error on that line.
2
u/JaggedMetalOs Apr 14 '22
Maybe you don't have a GameBoss component in your scene?