Can't see my sprite

I have an animated sprite of coin spinning, I think I am missing a process,

what am I missing here? I have an entity with sprite attached to it

Hi @sir_akc,

Is this on a 2D Screen?

no
I think tried that, but i will try that again

Have you already tried to reload the browser?

yea I did that too

also I just added it to a 2D screen like this:image
didn’t do anything

Hi @sir_akc,

It would be helpful if you could include a link to the project. If you are trying to use and animated sprite as a child of a 2D screen, you will find that 2D screens only support objects with the ‘element’ component.

Unfortunately, the element component does not support animated sprites. Here is a post outlining alternatives for a 2D screen:

Since you said this is not on a 2D screen, I’m not too sure what it could be without seeing the project.

Sprites don’t work directly under a Screen entity.

Elements need to be used for Screen UI

I got it! it worked, looks like some sort of internal glitch happened but when I refreshed the page and deleted the 2DScreen and created a new 2DScreen with AnimatedSprite as an entity, basically started over, it worked. now its visible and works as expected

OK, another issue


visible from here but then

what? why?

Is that background a 2D Screen?

well the coin is inside the 2d screen, I just fixed it? I guess by changing the layer from world to UI but even with that the game doesn’t show the coin, its there on the editor but it doesn’t appear on the game, what am I missing?

All entities under a UI screen need to use the element component which supports static sprite assets. They will also need to be on the same layer (usually UI).

Animated sprites are not supported in the UI yet but code can be written to change frames every X ms.

1 Like

I just changed the UI layer back to world, the coin even shows in the preview of the camera but for some reason it just doesn’t in the game, I am gonna check the console.logs

Okay I found the solution at last, its actually simple, just add the sprite as its on entity without any 2D screen and it will show up


image
As you can see, no 2D screen, just the sprite itself