- Home /
MissingReferenceException Help Please!
MissingReferenceException: The object of type 'Image' has been destroyed but you are still trying to access it. So when I pick up an item for the first time it works okay, but after I reload the scene I get an issue where the item is not removed from the scene on pickup. It still appears in the players inventory however it also remains in the scene which doesn't look good.
I'll try and provide what info I can but please feel free to ask what else you want to see, I'm really trying to finish this thing!
So here is what's called when an item is picked up
void Pickup()
{
Debug.Log ("Picking up" + item.name);
bool wasPickedUp = InventoryManager.instance.Add (item);
if (wasPickedUp) {
gameObject.SetActive (false);
}
}
Your answer
Follow this Question
Related Questions
make inventory script get variables from item's script 0 Answers
Can't Assign Item In Array 1 Answer
Inventory AddItem help 1 Answer
Item database with override functions 0 Answers
Managing Item Types 1 Answer