-1
\$\begingroup\$

When I fire a bullet, instead of frames 4 and 6, the sprite selector in the sprite renderer component says "Missing (Sprite)" and 'blinks' for a frame, not showing anything.

\$\endgroup\$
2
  • \$\begingroup\$ You renamed something. Just gotta redo those frames in the animation. \$\endgroup\$
    – Evorlor
    Nov 8, 2017 at 5:12
  • \$\begingroup\$ You must provide more content and detail to receive an answer to your question. Screenshots of your animator will help. Also, what you have tried saves people from wasting their time, also. \$\endgroup\$
    – cmprogram
    Nov 17, 2017 at 10:37

3 Answers 3

1
\$\begingroup\$

Check what layer the sprite is on. Make sure it's not on the same layer as the background. Otherwise it might occasionally draw behind the background instead of in front, making it look like it's blinking.

\$\endgroup\$
1
  • \$\begingroup\$ This doesn't account for the "Missing (Sprite)" message mentioned in the question - what would you recommend to solve that? \$\endgroup\$
    – DMGregory
    Apr 15, 2021 at 18:49
0
\$\begingroup\$

This sounds like an issue with your script.

If you are using a script to cycle through your sprites, make sure that the variables containing your sprites are assigned.

\$\endgroup\$
1
  • \$\begingroup\$ I'm not using a script, it's just a .anim with mechanim animation. Thanks though! \$\endgroup\$ Nov 5, 2017 at 6:45
0
\$\begingroup\$

This problem occurs when you have two objects lying in the same layer.

Changing the 'order in layer' in the objects Sprite Renderer fixed this for me. 0 for the layer you want at the backmost and higher value for objects you want at the front.

Right Click the object to edit the layer

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .