After Reloading scene, reference is switched to another refrence
I have a game where you dodge meteors. And after u die there is a shop and in the shop, there is a "+1 life button" and each time you click the button, it makes the price of the +1 Life button increase shown in a text. So in the current scene when you click the +1 life button it works all fine and u get +1 life in the next scene however in the next scene, the +1 life price text disappears in the button in the shop and ingame the lives text is switched to the price for the +1Life button text.
the weird thing is that before reloading the scene, the reference is good. [2]
but after I reload the scene, it changes into the lives script reference (which confuses me). ]
[2]: /storage/temp/155074-screenshot-2020-03-26-at-82252-am.png
Answer by dec29 · Mar 26, 2020 at 12:31 AM
for more context: Shop Before I reloaded the scene: Shop after I reloaded the scene:
ok guys i found out why. in one of my scripts i did "findobjectoftype()."and texts don't need that so lol/