Prefab Variant Issue on Play

So I went and did what Rick said about changing the color in the .png file rather than the inspector and added the first of each sliced sprite sheet as their Sprite in the inspector, but now when I push play, they all look like the original coin. Why?

image

In Play Mode:
image

Hi NicPerez,

Without knowing anything about your project, I can only guess that the golden coins at the bottom use the same golden coin sprite. Maybe you change the sprites via code? Maybe something else happens? If the wrong sprite shows up, the best would be to pause the game, and check the SpriteRenderer of the coins with the wrong coin sprites.

If different coin sprites are used, and if you are sure that the different coin sprites are indeed different files with different colours, maybe there is an internal problem with Unity. Maybe Unity still uses the old sprite(s) in its cache. Please go to Edit > Preferences > External Tools and click “Regenerate project files”. Maybe that’ll fix it.


See also:

Privacy & Terms