scene_add_client_template
Adds a reusable client UI control template to a copied save so scripts can instantiate dynamic bullets, cards, or list rows at runtime and receive its templateIndex.
Instructions
Add a template of client controls (客户端控件模板) to a copy of a save: one control, with children when it is a container, kept beside the screen. A script makes copies of it at run time (game.InstantiateClientUIControl(templateIndex, parent), game.DestroyClientUIControl(control)): bullets, cards, rows of a list, anything whose number is not known beforehand. A grid of scene_add_client_ui makes its items from one (itemTemplate), a reference shows one (template). template is a control as scene_add_client_ui takes one (its name is the name of the template; a container with children, an image, a preset button with its states, scripts of its own that start with every copy); the result gives its templateIndex for the script. Add the template before the interface that uses it. Writes a new .gil in the workspace. The records are byte for byte those of two templates saved in the editor; not yet seen in play.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapPath | No | ||
| replace | No | ||
| template | Yes | ||
| outputName | No |