Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize picture clipping of UGUI genie pictures

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

UGUI genie picture how to achieve picture cutting, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

The genie image in NGUI can cut out the useless parts of the picture, and then the image will be stretched to avoid the problem of the edge of the picture being stretched.

As shown in the picture, before cutting

We can see that as the button image stretches, the white edge of the picture gets bigger and bigger, and we don't want to see it. After the use of cutting treatment. After cutting as shown in the picture

Next, let's take a look at the specific implementation method.

First select the picture in the project panel, then change its type (Texture Type) to sprite (2 D and UI) in the inspector panel.

Then select Sprite Mode (there are three types, namely, Single single (cannot be cropped), Multipe multiple (can be cropped), Polygon polygons (can be cropped, the first two are quadrilateral), and set to Multipe. There is no need to change the parameters inside. As shown in the picture

Click Sprite Editor directly, and then click Apply App.

Enter the wizard editing window as shown in the figure

Click the Slice menu bar and click slice directly.

Then crop the picture by dragging the blue line on the edge of the picture with the mouse

As shown in the picture

Then directly click on the top Apply. In this way, the wizard image in the UI button becomes the shape we finally cut.

If you need to adjust the parameters (directly constrain the image size by numerical values), you can adjust them directly.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report