Change sprite in prefab

Hello everyone wanted to know what is the way to change the sprite of a prefab to click, I have seen some topics in the forum but nothing concrete and other unanswered, is for a game on android

I suggest you read up a bit on the Cocos Creator manual about what a Prefab and a Sprite is:
https://docs.cocos.com/creator/manual/en/

You can add a cc.Sprite component to a cc.Node that is a part a Prefab (a collection of Nodes and components).

In the Sprite component you can in Cocos Creator editor just drop an image into the sprite component or in code sprite.spriteFrame = mySpriteFrame.

Anyway, just read up in the manual, everything is explained there 100 times better than what I just did

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Good morning, thanks for the information