Graphics RenderingRender NodesGodotNodeOn this pageGodotNode Description: A Sprite displaying a Godot project's output. Startup is asynchronous: check running and lastError before interacting with the project. Only one GodotNode may be active at a time. Class Object: GodotNode Class. Fields All fields below are read-only. NameTypeDescriptionprojectPathstringResolved Godot project directory or .pck path.sceneFilestringRequested scene path; empty means the project main scene.lastErrorstringMost recently reported runtime error; empty when none has been reported.runningbooleanWhether asynchronous startup has finished and the node is active.pausedbooleanRequested scene pause state.unloadedbooleanWhether the project has been successfully unloaded. running == false alone does not indicate unload completion.viewportSizeSizeCurrent output resolution in pixels; updated when a resize takes effect. The inherited texture is updated as rendering continues; retaining it does not create a screenshot. Custom effects and blend modes must handle premultiplied alpha. unloadAsync unloadAsync: function(self: GodotNode, callback: function(ok: boolean, error: string)) Removes the node and asynchronously unloads its project. The callback runs on the logic thread: ok indicates success and error describes failure. On success, unloaded becomes true and another GodotNode can load a different project. Wait for this callback before creating the next node; a failed unload does not permit switching projects. Project unloading is supported on macOS Metal, Linux EGL, Windows x64 WGL, Android EGL and WebGL2. Unsupported runtimes return false with a reason through the callback. Repeated calls receive the same result asynchronously. Callbacks are not guaranteed after the application logic loop stops. pause / resume pause: function(self: GodotNode)resume: function(self: GodotNode) Asynchronously pauses or resumes the Godot SceneTree. These methods may also be called during startup. Rendering continues while paused; Godot nodes with PROCESS_MODE_ALWAYS continue processing. restart restart: function(self: GodotNode, sceneFile?: string): boolean Reloads the current scene, or loads the scene specified by sceneFile (for example, "res://main.tscn"). Omitting the path or passing an empty string reloads the current scene. Autoloads are retained. Returns true when the request is accepted; asynchronous errors appear in lastError. This method does not switch projects. resizeViewport resizeViewport: function(self: GodotNode, width: integer, height: integer): boolean Requests a new output resolution, with each dimension between 1 and 8192 pixels. Returns true when accepted; check viewportSize to observe completion. Invalid, busy, not-yet-started or unsupported requests return false. Asynchronous errors appear in lastError. Resizing preserves the scene, autoloads, pause state and audio, but may briefly stall rendering. A same-size request on a ready node succeeds without reallocating. Retained references to the previous output texture remain frozen at its last frame. Use Sprite transforms to scale the displayed image independently of its resolution. Godot root Window size changes also update the output resolution on supported runtimes. sendPointer / sendPointerMove sendPointer: function(self: GodotNode, x: number, y: number, button: integer, pressed: boolean)sendPointerMove: function(self: GodotNode, x: number, y: number) Forwards a pointer button or movement event. Coordinates are output pixels with the origin at the top left, before Dora Sprite transforms. Godot applies its content scaling to obtain scene coordinates. button uses Godot numbering: 1 left, 2 right, 3 middle. Pair each press (pressed = true) with a release (false). Node touch and mouse events are also forwarded automatically. sendKey / sendText sendKey: function(self: GodotNode, name: string, pressed: boolean)sendText: function(self: GodotNode, text: string) sendKey forwards a named key, such as "Space"; pair each press with a release. sendText forwards committed UTF-8 text. Host focus loss releases held mouse and keyboard state.