❔ NullReferenceException Object reference not set to an instance of an object Billboard.Update
Hello, my name is Zorphix and I'm not so smart at C#. And I'm currently trying to add a billboard script to a unity game
inspired by Baldi's Basics In Education and Learning! I'm getting this error and I don't understand what it means. I don't know what and where to reference this object.
18 Replies
The 2nd picture is a sprite renderer and I want it to follow the camera.
Whoops, forgot to send the code.
means ur variable has no reference to an object
Either Camera or main or transform is null (idk unity)
hmm camera should be referenced there by default
main is a static property
did you add the camera to the scene?
Yep
can u show?
click on it
and show me its inspector window
Yup
tag has to be
MainCamera
its UntaggedAdd tag?
u have non atm?
wait no
Sorry there is a MainCamera tag
it should be listed when u click on the combobox
yeah
select it, and ur error should disappear
mk
I'll test it.
Yep!
Thank you very much!
np
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.