Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Why is it that whenever i load a new scene while playing some of my linked texts dont work????

$
0
0
Okay, i made a game, in this game i have stores, the stores have texts within them i link these texts using codes such as : public Text TextObjectName and i link my texts in the game engine, and it all works well and fin, until i load a new scene while playing the game, when that happens the text is not linked anymore, the text does not change and i get an error saying : MissingReferenceException: The object of type 'Text' 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. but if i start my game from that scene it works fine, it is only when i load it while i am playing when i get this error and it doesnt work, which is confusing me alot, and i dont know what to do. if you need to know i use the code :SceneManager.LoadScene(SceneNumber); and yes the arrangement of the scenes in the build index is fine and the scene is opening all well except for the texts. if you know anything about how to solve this please tell me.

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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