How do I instantiate an image inside of a canvas's panel?

Is this even possible?

In here, I have a canvas that has a panel with this little game.

I am trying to instantiate an object inside this panel.

This is instantiated via a click.

So, when I click in this panel, how do I get the image to show?

Thanks

.SetActive(true);

Since it’s on the canvas you need to make sure the object you instantiate is a child of the canvas.

Also since it’s a Canvas, those images must be UI images, not sprites using the SpriteRenderer.

But most importantly, for all intents and purposes building gameplay using UI elements is disastrous to say the least. This is true even if you create a game largely based on static images like hidden objects or cards. It’s still very easy to make any regular sprite clickable and respond to it if you need that.