Quantcast
Channel: Questions in topic: "dontdestroyonload"
Viewing all articles
Browse latest Browse all 416

On Click Missing Audio Object when Scene changes

$
0
0
Not sure if this is a common problem, but it has been frustrating me for hours. I have a Main Menu. Two Buttons. Play and Exit I assign an on Click Event to the play an audio when clicked. ![alt text][1] The Audio Source is a GameObject that I have a Do Not Destroy on load script attached to it. When I change scenes and press by pressing play and and then change scenes again to come back to the main menu, the button loses the Game Object and says Missing Object. ![alt text][2] Why does this occur even though the Game Object is not destroyed. Is it a different instance of this Game Object or something and Unity can't see it anymore? [1]: /storage/temp/100195-button1.jpg [2]: /storage/temp/100196-buttonreload.jpg

Viewing all articles
Browse latest Browse all 416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>