Having a problem with an null reference exception

Looking at the 2D unity course and have a crash bug, not sure how helpful the error message is, Visual Studio shows


It appears that some unity component cannot be referenced.
Unity Ver 2022.3.22f1
Vis Studio 17.9.4

any ideas

Hi Jonathan,

In which Unity 2D course are you? And in which video are you? What did you try to do, or what did you do to make this problem appear?

Unity 2D Course Laser lecture 121. acutally I feel a bit of a twit, I have just played a few more minutes of the video and the error is to be expected apparently. Probably the lecturer did warn that this was going to be a bit dodgy. I have kind of fixed it by looking at the code in the repository and it’s sort of working now

I’m afraid I don’t remember Gary editing one of Unity’s scripts. We also don’t do any fancy things in Unity, so I don’t know why you got this error with the SpriteRenderer.

Do you remember what you did in your code? From what I understood, there was a difference to Gary’s. It would be interesting to know what the difference was because I never encountered this ‘Frame not in module’ problem before.

Privacy & Terms