I recently developed two games using Cocos. The first one uses Cocos 2.x, and the second one uses Cocos 3.x. When using Cocos 3.x, I found that a lot of 2.
Sprite components:
Sprite is the most common way to display graphics in 2D games. By adding Sprite components to a node, you can display images from project resources in the scene
Once you add the Sprite component, you can display the resource image through the Sprite component by dragging a resource of type Texture or SpriteFrame from the Explorer into the SpriteFrame property reference.
So let’s see how Cocos 2.x is used
Is it possible to drag Cocos 3.x directly?
It can be seen from the above operation that drag and drop cannot be carried out directly, so how should we operate?
Let’s look at another example
We come to the conclusion by examples
This is done by clicking on the image in Cocos 3.x and changing the image type to the Sprite-frame property
In cocos3. x there are many other SAO operation can follow my public number (front-end ZML) we go to discover!
More parameters, please refer to the document: docs.cocos.com/creator/man…
Hello, everyone, I am [Zhang Xiaoyi], welcome to follow my public account (front-end ZML), learn and communicate together