Basically I have some items on the game which the player can pick up. When those items are picked they disappear. I also want it so that if the player dies, when the scene is reloaded, those items that he already picked up, won't spawn again.
Standard procedure was to create a static List, which I add a picked object, and when the scene reloads the List will keep the information.
My problem:
1st run - player picks up Object A. Object A is added to the list.
2nd run - when the scene starts the Object A checks if the list already contains himself, but it always returns false.
Basically Object A in Scene X on run 1, is different from Object A in Scene X on run 2. Is there any way that I can relate those two objects?
I tried with gameObject, with a MonoBehavior, with GetInstanceId(), but none of those worked.
↧