Second Scene Error - Several Null References

Hello! I am not sure what the issue is, it does not appear to come from any code I just worked on as I did not edit some of these scripts recently (Base stats, PlayerController, and Fader) If I remember correctly. however, after completing the “generic Raycastable Components” lecture, seemingly random errors have appeared. It is possible they appeared a lecture or two before, I do not often go to my second scene and my first scene works just fine, and it would not have been more than a few lectures ago that the second scene worked fine as well.

Here the errors and their related piece of code the error took me too:

Fader

I would appreciate any help, thank you!

Quite a few to turn up all at once…
We’ll start with the last one… it’s not finding an eventsystem in the 2nd scene. Simply add an EventSystem to the scene (UI/EventSystem).
For the middle one, my best guess would be that the Canvas Group is initialized in the Start() method, but FadeOutImmediate() is called before the Start() method. So change the canvasGroup initialization to be in Awake() instead.
The first error is trickier. The first thing I can think of is to make sure that your BaseStats component on the player has a Progression scriptable object attached.

1 Like

That did the trick! Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms