Reputation: 889
I have a prefab that had an sprite and I changed it to a different one.
This prefab is instantiated dynamically, it forms part of various level blocks that are generated in runtime.
The problem is that when designing the levels the prefab has the new sprite, but then in runtime it shows the old one. Also when editing the prefab, the sprite shown is the new one.
I made a build for android and the problem persist there too. I never assign its sprite in code.
What could be happening?
Notice how it shows the old sprite (the mouse) instead of the fire in runtime.
I made sure it is the same levelblock that it's instantiated, if I add one more fire gameObject it shows with the correct sprite in edit mode, but the old one at runetime.
Upvotes: 1
Views: 63
Reputation: 2385
Not sure what the cause is. But one solution that might work is to create a completely new object. Make it so it has all the things you want, like on the other object. Then see if you still get the same error.
Also, please share which components are on the object.
This will make it easier to help you.
Upvotes: 2