#Image in Sprite Renderer is removing itself when starting the game

1 messages · Page 1 of 1 (latest)

hard wave
#

Hello,

I have a Spritesheet with 2 Images, and one of them is removing itself from the Sprite Renderer when I put it in, and start the game and I really don't know why, I never encountered it before or read something about it. Can somebody please help me out?

glossy pulsar
#

check your scripts, one of them might be deleting the image by accident

buoyant sparrow
#

Can you give more information? Sprite Renderers only have one slot for a sprite, so I think you might be referring to the wrong thing.

hard wave
hard wave
buoyant sparrow
#

To get the information right;

  • You've got a sprite sheet that you sliced. You sliced the sprite sheet by setting the sprite type in the import settings to Multiple, and then using the Sprite editor.
  • When you use sprites from this sheet in a sprite renderer, one of the sprites works, and the other does not.
    Is that right? If so, check that you sliced the sprite sheet correctly. In your Assets window, you should see an arrow next to the sprite sheet. If you open that, you should see your two sprites in there.
hard wave
buoyant sparrow
#

When you say it gets removed, do you mean that it then displays None (Sprite) in the inspector?

buoyant sparrow
#

The only thing I can think of is that you've got a script attached to the GameObject that changes which sprite is set in the Sprite Renderer. Do you have any scripts attached to the gameobject or referencing the sprite renderer?

hard wave
buoyant sparrow
#

Could you post a video?