Hello guys, i m making a FPS game. but whenever i load the scene 2nd time, i get alot of Null References. I know it has something to do with static variables used in 1 or 2 script files or game objects that do not destroy. But, my project has alot of files and somehow i cannot seem to understand the reason behind this issue.
If you want to go to the problem state here are the steps.
- Start The Game
- Press Escape
- Press Yes
- Press Start
- Look into console Window (You Will See : MissingReferenceException: The object of type ‘GameObject’ has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.)
Here is the complete project in Zip Format : https://archive.org/download/abc_TestGameArchive/Test.zip
Kindly download the project and take a look. It will be much appreciated. I am a beginner and still learning things.