Unity converts png images to sprite format

Recently, I am working on a game project. I often encounter that the imported pictures are in png format, but they must be converted to sprite format before they can be applied. Here's an easy way to convert, no code required. 

                                                                     

1 Select the png image to be converted, and view the properties in the Inspector window 

2 Find Texture Type in the window and select Sprite(2D and UI)                          

3 Find the Sprite Mode and select Single, and don't forget to apply at the end 

 

! When this triangle mark appears next to the picture, the conversion is successful

Guess you like

Origin blog.csdn.net/m0_62113544/article/details/129052207