Failed to assign sprites to 2d UI entities

Hello

I have imported several images to my project.
when i set a UI 2d screen and a child sprite,
i found that i cannot assign any of the images to the sprite.
Am i missing anything?

that’s the project

Two things here:

If you are using sprites, you need to create sprite assets from the images. You can read a bit more about it here https://developer.playcanvas.com/en/user-manual/2D/

In this case, you are trying to create UI, text/image elements should be used instead. https://developer.playcanvas.com/en/user-manual/user-interface/

I didn’t get you, sorry

what is the type of object that the 2d sprite component receives, and how do i create it?
I’ve red all the links and on and still didn’t fully understand.

Please read my post on building the sprite-based Flappy Bird game in PlayCanvas:

In particular, read the section entitled ‘Creating the Sprites’.

1 Like