Unity APK Package Reduction method (NGUI)

Source: Internet
Author: User

Long night long unintentional sleep, and began to think of my small fang!

issues to be addressed in this chapter:

1. apk package is too large, you should remove the unused stickers to reduce the size of the APK

2. Store the Project Map!

The origin of the problem:

I wrote the code today, and then the head of the bombing day came to me and said, "You first give up your project and participate in another project to be completed." To help them focus on drag control for 50 years!

Then the main course gave me a few pages and told me to drag and drop it. I took 2 hours to drag and drop the controls and took 1.5 hours to take pictures! (Many pictures in the project are hard to find!)

Solution:

1. We use Unity to develop + Ngui controls, usually to make a small picture into an atlas texture. in fact, we only need Atlas and the mapping of existing projects is basically not used!

Should be removed, releasing the APK will reduce the extra MB.

2. Picture Storage directory:

1. We often put a class of pictures in the same folder, such as All button images into a folder! (Correct practice)

2. We will cross the irregular picture into different folders, if there are too many pictures, for a novice he will spend a lot of time to find the picture above (this also does not help us to clean up the unwanted pictures),

My company is to put an irregular picture into the texture1,texture2,texture3, do not laugh about the operation, because the picture is not regular. So we can't do this!

Solution: (Irregular picture storage)

There are n interfaces in the game [Start interface, prop interface, level selection interface, game interface, etc.], put the irregular images of each level into a folder with the same interface name, and then we hit Atlas of course name also with  the interface name is the same !

1. If you need to find an irregular image, and you see where he appears in the UI, go to the atlas in the map to find the line!

Unity APK Package Reduction method (NGUI)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.