- Home /
unassignedreferenceexception - script used in multiple scenes
I have a script called GameManager which is used in both my 'Menu' scene as well as my 'Level 1' scene. I have some variables assigned to objects that only exist in one scene or another. I'm getting the unassignedreferenceexception because in my 'Level 1' scene it is trying to link to a variable that only exists in my 'Menu' scene.
I had some ideas to get rid of this but they seem like workarounds not solutions. ie. split my GameManager script into two, one for each scene, or copy those problem game objects into each scene and disable them. Any suggestions are appreciated!
Your answer
Follow this Question
Related Questions
Unassigned variable is assigned 0 Answers
Getting Error but can't see why ? (Solved)(due to own stupidity) 1 Answer
Can you add an animated scene into Unity and let it play? 1 Answer
Parse Scene Hierarchy 1 Answer
Saving for a Level Editor 1 Answer