<Prefab>
A prefab or "prefabrication" is a way for users to create multiple objects as well as import scripts in one go. It could for instance be used to instantiate a complete visual novel interface inside a project. Prefabs will create objects in the currently active layer in the order specified in the NoveltyML but they have the ability to create their own layers as well. They can also create new screens.
Attribute | Description | Type |
name | [Required] A unique name for this template | String |
Child tags | Description | Count |
<Layer> | New layer | |
<Meta> | Meta information | |
<Object> | Objects | |
<Script> | Import script | |
<Prefab> | Import additional prefabs |
<Layer>
Adds a layer to the scene.
Remarks: New layers are always added on top of the scene unless bottom is set to true.
Attribute | Description | Type |
name | [Required] Layer name | String |
bottom | Add layer at bottom of the scene | Boolean |
exclusive | Don't add this layer if it already exists | Boolean |
global | Layer is a global layer | Boolean |
significant | Enable auto-addition to new pages (global layers only) | Boolean |
locked | Lock layer (inside editor) | Boolean |
closed | Close layer (inside editor) | Boolean |
Child tags | Description | Count |
<Object> | Objects in this layer |
<Screen>
Adds a screen to the project.
Attribute | Description | Type |
name | [Required] Screen name | String |
Child tags | Description | Count |
<Layer> | Layers in this screen | |
<Object> | Objects in this layer |
<Script>
Script to be imported to the project.
Attribute | Description | Type |
name | [Required] Name of script resource | String |
<Prefab>
Additional prefab to be loaded when this prefab is created.
Attribute | Description | Type |
name | [Required] Name of prefab resource | String |
Example
<!-- Prefab that creates one image in the currently active layer --> <!-- and another in a new layer at the bottom of the scene --> <Prefab name="My prefab"> <Image name="My image" texture="My texture" /> <Layer name="Background layer" bottom="true" > <Image name="Background" texture="My background" /> </Layer> </Prefab>
<!-- Prefab that combines two other prefabs --> <Prefab name="My prefab"> <Prefab name="Other prefab" /> <Prefab name="Another prefab" /> </Prefab>