Tutorial Master 2丨(12) Performance optimization: Module Pooling module pool, method of reducing package body

Hello everyone, your orange brother suddenly appeared~

The blog address of this series: Portal

insert image description here



1. Module Pooling Module Pool

1. The principle of Module Pooling

Tutorial Master comes with a pool system that allows you to reuse Module game objects across different bootstrap items. Thereby improving game performance.

The pool system runs once when the TutorialMasterManager script is enabled. It runs on every boot entry per boot system and instantiates an optimal number of Module game objects.

For example, if you have two bootstrap items, each with an arrow module, that one arrow module will be instantiated and will be reused across those bootstrap items.

The instantiated module will be in the GameObject where the TutorialMasterManager component is located. When they are used, they will be assigned to the target canvas. When they are no longer used, they return to their original parent.

insert image description here


<

Guess you like

Origin blog.csdn.net/weixin_38239050/article/details/122814535