Skip to content

Commit 036b177

Browse files
committed
1.10.2 editor scripts improvements
1 parent 528a173 commit 036b177

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/en/manuals/editor-scripts.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ You can interact with the editor using `editor` package that defines this API:
4949
- `editor.engine_sha1` — a string, SHA1 of Defold engine
5050
- `editor.editor_sha1` — a string, SHA1 of Defold editor
5151
- `editor.get(node_id, property)` — get a value of some node inside the editor. Nodes in the editor are various entities, such as script or collection files, game objects inside collections, json files loaded as resources, etc. `node_id` is a userdata that is passed to the editor script by the editor. Alternatively, you can pass resource path instead of node id, for example `"/main/game.script"`. `property` is a string. Currently these properties are supported:
52-
- `"path"` — file path from the project folder for *resources* — entities that exist as files. Example of returned value: `"/main/game.script"`
52+
- `"path"` — file path from the project folder for *resources* — entities that exist as files or directories. Example of returned value: `"/main/game.script"`
53+
- `"children"` — list of children resource paths for directory resources
5354
- `"text"` — text content of a resource editable as text (such as script files or json). Example of returned value: `"function init(self)\nend"`. Please note that this is not the same as reading file with `io.open()`, because you can edit a file without saving it, and these edits are available only when accessing `"text"` property.
55+
- for atlases: `images` (list of editor nodes for images in the atlas) and `animations` (list of animation nodes)
56+
- fot atlas animations: `images` (same as `images` in atlas)
5457
- some properties that are shown in the Properties view when you have selected something in the Outline view. These types of outline properties supported:
5558
- `strings`
5659
- `booleans`

0 commit comments

Comments
 (0)