You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -246,7 +240,7 @@ function M.screen_to_world(camera, screen_x, screen_y, z)
246
240
end
247
241
```
248
242
249
-
Visit the [Examples page](https://defold.com/examples/render/screen_to_world/) to see screen to world coordinate conversion in action. There is also a [sample project](https://github.com/defold/sample-screen-to-world-coordinates/) showing how to do screen to world coordinate conversion.
243
+
Keep in mind that the values `action.screen_x` and `action.screen_y` from `on_input()` should be used as arguments for this function. Visit the [Examples page](https://defold.com/examples/render/screen_to_world/) to see screen to world coordinate conversion in action. There is also a [sample project](https://github.com/defold/sample-screen-to-world-coordinates/) showing how to do screen to world coordinate conversion.
250
244
251
245
::: sidenote
252
246
The [third-party camera solutions mentioned in this manual](/manuals/camera/#third-party-camera-solutions) provides functions for converting to and from screen coordinates.
Copy file name to clipboardExpand all lines: docs/en/manuals/editor-scripts.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,7 @@ You can interact with the editor using `editor` package that defines this API:
71
71
-`editor.can_get(node_id, property)` — check if you can get this property so `editor.get()` won't throw an error.
72
72
-`editor.can_set(node_id, property)` — check if `editor.tx.set()` transaction step with this property won't throw an error.
73
73
-`editor.create_directory(resource_path)` — create a directory if it does not exist, and all non-existent parent directories.
74
+
-`editor.create_resources(resources)` — create 1 or more resources, either from templates or with custom content
74
75
-`editor.delete_directory(resource_path)` — delete a directory if it exists, and all existent child directories and files.
75
76
-`editor.execute(cmd, [...args], [options])` — run a shell command, optionally capturing its output.
76
77
-`editor.save()` — persist all unsaved changed to disk.
@@ -692,7 +693,7 @@ The editor script runtime uses 2 execution modes that are mostly transparent to
692
693
Some of the functions that the editor scripts can use may take a lot of time to run. For example, `editor.execute("git", "status", {reload_resources=false, out="capture"})` can take up to a second on sufficiently large projects. To maintain editor responsiveness and performance, functions that may be time-consuming are not allowed in contexts where the editor needs an immediate response. Attempting to use such a function in an immediate context will result in an error: `Cannot use long-running editor function in immediate context`. To resolve this error, avoid using such functions in immediate contexts.
693
694
694
695
The following functions are considered long-running and cannot be used in immediate mode:
695
-
-`editor.create_directory()`, `editor.delete_directory()`, `editor.save()`, `os.remove()` and `file:write()`: these functions modify the files on disc, causing the editor to synchronize its in-memory resource tree with the disc state, which can take seconds in large projects.
696
+
-`editor.create_directory()`, `editor.create_resources()`, `editor.delete_directory()`, `editor.save()`, `os.remove()` and `file:write()`: these functions modify the files on disc, causing the editor to synchronize its in-memory resource tree with the disc state, which can take seconds in large projects.
696
697
-`editor.execute()`: execution of shell commands can take an unpredictable amount of time.
697
698
-`editor.transact()`: large transactions on widely-referenced nodes may take hundreds of milliseconds, which is too slow for UI responsiveness.
Copy file name to clipboardExpand all lines: docs/en/manuals/editor.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,6 +175,21 @@ You can also get access to editor logs while the editor is running if it is star
175
175
$ > ./path/to/Defold.app/Contents/MacOS/Defold
176
176
```
177
177
178
+
## Editor server
179
+
180
+
When the editor opens a project, it will start a web server on a random port. The server may be used to interact with the editor from other applications. Since 1.11.0, the port is written to the `.internal/editor.port` file.
181
+
182
+
Additionally, since 1.11.0 the editor executable has a command line option `--port` (or `-p`), which allows specifying the port during launch, e.g.::
Copy file name to clipboardExpand all lines: docs/en/manuals/font.md
+77-6Lines changed: 77 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,6 @@ Fonts added to your project are automatically converted into a texture format th
16
16
- Bitmap
17
17
- Distance field
18
18
19
-
::: sidenote
20
-
It is possible to [generate font glyphs at runtime](/extension-fontgen) from a bundled TrueType font instead of generating and including a font texture in the application bundle. This approach can greatly reduce the download size and runtime memory consumption of a Defold game.
21
-
:::
22
-
23
-
24
19
## Creating a font
25
20
26
21
To create a font for use in Defold, create a new Font file by selecting <kbd>File ▸ New...</kbd> from the menu, then select <kbd>Font</kbd>. You can also <kbd>right click</kbd> a location in the *Assets* browser and select <kbd>New... ▸ Font</kbd>.
@@ -97,7 +92,7 @@ space ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E
97
92
*Cache Width/Height*
98
93
: Constrains the size of the glyph cache bitmap. When the engine renders text, it looks up the glyph from the cache bitmap. If it does not exist there, it will be added to the cache before rendering. If the cache bitmap is too small to contain all the glyphs the engine is asked to render, an error is signalled (`ERROR:RENDER: Out of available cache cells! Consider increasing cache_width or cache_height for the font.`).
99
94
100
-
If set to 0 the cache size is set automatically.
95
+
If set to 0 the cache size is set automatically, and will grow to 2048x4096 max.
101
96
102
97
## Distance field fonts
103
98
@@ -167,3 +162,79 @@ For example - to generate a gradient in a shader fragment, simply write:
Copy file name to clipboardExpand all lines: docs/en/manuals/live-update.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,9 @@ There are currently two ways that Defold can store the resources. Choose the met
48
48
`Zip`
49
49
: This option tells Defold to create a Zip archive file with any excluded resources. The archive is saved at the location specified in the *Export path* setting.
50
50
51
+
`Folder`
52
+
: This option tells Defold to create a folder with all the excluded resources. It works exactly the same way as Zip, but uses a directory instead of an archive. This may be useful in cases where you need to post-process files before uploading and plan to pack them into an archive yourself.
53
+
51
54
`Amazon`
52
55
: This option tells Defold to automatically upload excluded resources to an Amazon Web Service (AWS) S3 bucket. Fill in your AWS *Credential profile* name, select the appropriate *Bucket* and provide a *Prefix* name. You can read more on how to setup an AWS account in this [aws guide](/manuals/live-update-aws)
0 commit comments