Unity overhead image text performance optimization

As shown in the picture: Conventional layout, there will be many Batches. This is optimized for Batches with only 3.

Common solutions: 1. Create two Canvas, one for all text and one for all images. But there are two problems here: once the text is sandwiched between two images, and because they have no hierarchical relationship, it is more troublesome to coordinate the typesetting.

New solution: We rely on Unity's efficient dynamic merging capabilities. Implement RichText and RichImage to achieve dynamic merging, thereby reducing batches.

Project example

Guess you like

Origin blog.csdn.net/st75033562/article/details/134202517