Uiatlas of ngui Core Components

Source: Internet
Author: User
Ngui: uiatlas

Uiatlas is a container that contains many sprite coordinate information. If you are not familiar with this concept, you can understand it as follows: Compared with using many small textures to render the UI, it is much more efficient to use a large texture that contains all the small textures. These small textures are called Sprite, and the large ones are called Atlas.

Before using ngui to render anything, you must first create an atlas (or use an existing one ). If you are an artist, you may be familiar with the relevant procedures. If not, you can directly use the ngui built-in Atlas maker tool.

Of course, you can use uitexture anywhere, but this is not very efficient.

Finally, let's look at yourself.

Parameters

Material points to the material currently being used by atals. It is best to use some unwritable shader provided by ngui in materials, such as unwritable-transparent colored.

TP import allows you to import the complete use of texture packerProgramSprite definition table. You only need to drag the exported TXT file, and all Sprite files will be imported automatically. If you use the built-in Atlas maker to create atlas, you can ignore this parameter with confidence.

The new sprite button allows you to create a new Sprite. It automatically clones all parameters of the selected Sprite.

The delete button allows you to delete a sprite that is no longer in use. A confirmation box is displayed.

The sprite drop-down list allows you to select the currently needed Sprite

The Edit name area allows you to rename the sprite.

Dimensions indicates the start position and size of your Sprite.

Border allows you to indicate which part of the sprite cannot be scaled, or you can only zoom in one direction. Sliced sprite uses this parameter

Padding is the Border Width of four edges. It can be used to adjust the center point position and is also important when Sprite is fine-tuned.

The show area allows you to test your Sprite and its location in Atlas

Prompt

1. You can use multiple Atlas to group sprite instances. As long as atlas uses the same material, they only need to consume one draw call.

2. For the best results, it is best to choose clamp for the texture blending mode and truecolor for the format.

3. Combining similar texture into one Atlas is a good choice, but it is best to minimize the number of simultaneously used Atlas

4. If you use texture packer to create atlas, select unity3d during export.

5. If you use Photoshop to create atlas, you can use the selection tool and information version to confirm the position and size of Sprite.

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.