Signal2
Signal support.
Node.swift:3814class Signal2
Use the connect(flags:_:)
method to connect to the signal on the container object, and disconnect(_:)
to drop the connection.
You can also await the emitted
property for waiting for a single emission of the signal.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (163) members.
Types
enum DuplicateFlags
enum InternalMode
enum ProcessMode
enum ProcessThreadGroup
struct ProcessThreadMessages
class Signal1
Signal support.
class Signal3
Signal support.
Type members
static let notificationApplicationFocusIn: Int
Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance.
static let notificationApplicationFocusOut: Int
Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application.
static let notificationApplicationPaused: Int
Notification received from the OS when the application is paused.
static let notificationApplicationResumed: Int
Notification received from the OS when the application is resumed.
static let notificationChildOrderChanged: Int
Notification received when the list of children is changed. This happens when child nodes are added, moved or removed.
static let notificationCrash: Int
Notification received from Godot’s crash handler when the engine is about to crash.
static let notificationDisabled: Int
Notification received when the node is disabled. See .disabled.
static let notificationDragBegin: Int
Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one.
static let notificationDragEnd: Int
Notification received when a drag operation ends.
static let notificationEditorPostSave: Int
Notification received right after the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
static let notificationEditorPreSave: Int
Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
static let notificationEnabled: Int
Notification received when the node is enabled again after being disabled. See .disabled.
static let notificationEnterTree: Int
Notification received when the node enters a
SceneTree
.static let notificationExitTree: Int
Notification received when the node is about to exit a
SceneTree
.static let notificationInternalPhysicsProcess: Int
Notification received every frame when the internal physics process flag is set (see
setPhysicsProcessInternal(enable:)
).static let notificationInternalProcess: Int
Notification received every frame when the internal process flag is set (see
setProcessInternal(enable:)
).static let notificationMovedInParent: Int
Deprecated. This notification is no longer emitted. Use
notificationChildOrderChanged
instead.static let notificationOsImeUpdate: Int
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
static let notificationOsMemoryWarning: Int
Notification received from the OS when the application is exceeding its allocated memory.
static let notificationParented: Int
Notification received when a node is set as a child of another node.
static let notificationPathRenamed: Int
Notification received when the node’s name or one of its parents’ name is changed. This notification is not received when the node is removed from the scene tree to be added to another parent later on.
static let notificationPaused: Int
Notification received when the node is paused.
static let notificationPhysicsProcess: Int
Notification received every frame when the physics process flag is set (see
setPhysicsProcess(enable:)
).static let notificationPostEnterTree: Int
Notification received when the node is ready, just before
notificationReady
is received. Unlike the latter, it’s sent every time the node enters the tree, instead of only once.static let notificationProcess: Int
Notification received every frame when the process flag is set (see
setProcess(enable:)
).static let notificationReady: Int
Notification received when the node is ready. See
_ready
.static let notificationSceneInstantiated: Int
Notification received by scene owner when its scene is instantiated.
static let notificationTextServerChanged: Int
Notification received when text server is changed.
static let notificationTranslationChanged: Int
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like
tr(message:context:)
.static let notificationUnparented: Int
Notification received when a node is unparented (parent removed it from the list of children).
static let notificationUnpaused: Int
Notification received when the node is unpaused.
static let notificationVpMouseEnter: Int
Notification received when the mouse cursor enters the
Viewport
‘s visible area, that is not occluded behind otherControl
s orWindow
s, provided itsguiDisableInput
isfalse
and regardless if it’s currently focused or not.static let notificationVpMouseExit: Int
Notification received when the mouse cursor leaves the
Viewport
‘s visible area, that is not occluded behind otherControl
s orWindow
s, provided itsguiDisableInput
isfalse
and regardless if it’s currently focused or not.static let notificationWmAbout: Int
Notification received from the OS when a request for “About” information is sent.
static let notificationWmCloseRequest: Int
Notification received from the OS when a close request is sent (e.g. closing the window with a “Close” button or [kbd]Alt + F4[/kbd]).
static let notificationWmDpiChange: Int
Notification received from the OS when the screen’s DPI has been changed. Only implemented on macOS.
static let notificationWmGoBackRequest: Int
Notification received from the OS when a go back request is sent (e.g. pressing the “Back” button on Android).
static let notificationWmMouseEnter: Int
Notification received when the mouse enters the window.
static let notificationWmMouseExit: Int
Notification received when the mouse leaves the window.
static let notificationWmSizeChanged: Int
Notification received from the OS when the window is resized.
static let notificationWmWindowFocusIn: Int
Notification received when the node’s parent
Window
is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which casenotificationApplicationFocusIn
is also emitted).static let notificationWmWindowFocusOut: Int
Notification received when the node’s parent
Window
is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which casenotificationApplicationFocusOut
is also emitted).static func printOrphanNodes(
) Prints all orphan nodes (nodes outside the
SceneTree
). Used for debugging.class var godotClassName: StringName
Instance members
var childEnteredTree: Signal1
Emitted when a child node enters the scene tree, either because it entered on its own or because this node entered with it.
var childExitingTree: Signal2
Emitted when a child node is about to exit the scene tree, either because it is being removed or freed directly, or because this node is exiting the tree.
var childOrderChanged: SimpleSignal
Emitted when the list of children is changed. This happens when child nodes are added, moved or removed.
var editorDescription: String
Add a custom description to a node. It will be displayed in a tooltip when hovered in editor’s scene tree.
var multiplayer: MultiplayerAPI?
The
MultiplayerAPI
instance associated with this node. SeegetMultiplayer(forPath:)
.var name: StringName
The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed.
var owner: Node?
The node owner. A node can have any ancestor node as owner (i.e. a parent, grandparent, etc. node ascending in the tree). This implies that
addChild(node:forceReadableName:`internal`:)
should be called before setting the owner, so that this relationship of parenting exists. When saving a node (usingPackedScene
), all the nodes it owns will be saved with it. This allows for the creation of complex scene trees, with instancing and subinstancing.var processMode: Node.ProcessMode
Can be used to pause or unpause the node, or make the node paused based on the
SceneTree
, or make it inherit the process mode from its parent (default).var processPhysicsPriority: Int32
Similar to
processPriority
but fornotificationPhysicsProcess
,_physicsProcess(delta:)
or the internal version.var processPriority: Int32
The node’s priority in the execution order of the enabled processing callbacks (i.e.
notificationProcess
,notificationPhysicsProcess
and their internal counterparts). Nodes whose process priority value is lower will have their processing callbacks executed first.var processThreadGroup: Node.ProcessThreadGroup
Set the process thread group for this node (basically, whether it receives
notificationProcess
,notificationPhysicsProcess
,_process(delta:)
or_physicsProcess(delta:)
(and the internal versions) on the main thread or in a sub-thread.var processThreadGroupOrder: Int32
Change the process thread group order. Groups with a lesser order will process before groups with a greater order. This is useful when a large amount of nodes process in sub thread and, afterwards, another group wants to collect their result in the main thread, as an example.
var processThreadMessages: Node.ProcessThreadMessages
Set whether the current thread group will process messages (calls to
callDeferredThreadGroup(method:)
on threads, and whether it wants to receive them during regular process or physics process callbacks.var ready: SimpleSignal
Emitted when the node is ready. Comes after
_ready
callback and follows the same rules.var renamed: SimpleSignal
Emitted when the node is renamed.
var replacingBy: Signal3
Emitted when this node is being replaced by the
node
, seereplaceBy(node:keepGroups:)
.var sceneFilePath: String
If a scene is instantiated from a file, its topmost node contains the absolute file path from which it was loaded in
sceneFilePath
(e.g.res://levels/1.tscn
). Otherwise,sceneFilePath
is set to an empty string.var treeEntered: SimpleSignal
Emitted when the node enters the tree.
var treeExited: SimpleSignal
Emitted after the node exits the tree and is no longer active.
var treeExiting: SimpleSignal
Emitted when the node is still active but about to exit the tree. This is the right place for de-initialization (or a “destructor”, if you will).
var uniqueNameInOwner: Bool
Sets this node’s name as a unique name in its
owner
. This allows the node to be accessed as%Name
instead of the full path, from any node within that scene.func addChild(node: Node?, forceReadableName: Bool, internal: Node.InternalMode
) Adds a child
node
. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.func addSibling(Node?, forceReadableName: Bool
) Adds a
sibling
node to current’s node parent, at the same level as that node, right below it.func addToGroup(StringName, persistent: Bool
) Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example “enemies” or “collectables”. A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see
isInsideTree
). See notes in the description, and the group methods inSceneTree
.func callDeferredThreadGroup(method: StringName, Variant...
) -> Variant This function is similar to
Object/callDeferred(method:)
except that the call will take place when the node thread group is processed. If the node thread group processes in sub-threads, then the call will be done on that thread, right beforenotificationProcess
ornotificationPhysicsProcess
, the_process(delta:)
or_physicsProcess(delta:)
or their internal versions are called.func callThreadSafe(method: StringName, Variant...
) -> Variant This function ensures that the calling of this function will succeed, no matter whether it’s being done from a thread or not. If called from a thread that is not allowed to call the function, the call will become deferred. Otherwise, the call will go through directly.
func canProcess(
) -> Bool Returns
true
if the node can process while the scene tree is paused (seeprocessMode
). Always returnstrue
if the scene tree is not paused, andfalse
if the node is not in the tree.func createTween(
) -> Tween? Creates a new
Tween
and binds it to this node. This is equivalent of doing:func duplicate(flags: Int32
) -> Node? Duplicates the node, returning a new node.
func findChild(pattern: String, recursive: Bool, owned: Bool
) -> Node? Finds the first descendant of this node whose name matches
pattern
as inString/match(expr:)
. Internal children are also searched over (seeinternal
parameter inaddChild(node:forceReadableName:`internal`:)
).func findChildren(pattern: String, type: String, recursive: Bool, owned: Bool
) -> ObjectCollection<Node> Finds descendants of this node whose name matches
pattern
as inString/match(expr:)
, and/or type matchestype
as inisClass(_:)
. Internal children are also searched over (seeinternal
parameter inaddChild(node:forceReadableName:`internal`:)
).func findParent(pattern: String
) -> Node? Finds the first parent of the current node whose name matches
pattern
as inString/match(expr:)
.func getChild(idx: Int32, includeInternal: Bool
) -> Node? Returns a child node by its index (see
getChildCount(includeInternal:)
). This method is often used for iterating all children of a node.func getChildCount(includeInternal: Bool
) -> Int32 Returns the number of child nodes.
func getChildren(includeInternal: Bool
) -> ObjectCollection<Node> Returns an array of references to node’s children.
func getGroups(
) -> VariantCollection<StringName> Returns an array listing the groups that the node is a member of.
func getIndex(includeInternal: Bool
) -> Int32 Returns the node’s order in the scene tree branch. For example, if called on the first child node the position is
0
.func getLastExclusiveWindow(
) -> Window? Returns the
Window
that contains this node, or the last exclusive child in a chain of windows starting with the one that contains this node.func getMultiplayerAuthority(
) -> Int32 Returns the peer ID of the multiplayer authority for this node. See
setMultiplayerAuthority(id:recursive:)
.func getNode(path: NodePath
) -> Node? Fetches a node. The
NodePath
can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist,null
is returned and an error is logged. Attempts to access methods on the return value will result in an “Attempt to callon a null instance.” error. func getNodeAndResource(path: NodePath
) -> GArray Fetches a node and one of its resources as specified by the
NodePath
’s subname (e.g.Area2D/CollisionShape2D:shape
). If several nested resources are specified in theNodePath
, the last one will be fetched.func getNodeOrNull(path: NodePath
) -> Node? Similar to
getNode(path:)
, but does not log an error ifpath
does not point to a validNode
.func getParent(
) -> Node? Returns the parent node of the current node, or
null
if the node lacks a parent.func getPath(
) -> NodePath Returns the absolute path of the current node. This only works if the current node is inside the scene tree (see
isInsideTree
).func getPathTo(node: Node?, useUniquePath: Bool
) -> NodePath Returns the relative
NodePath
from this node to the specifiednode
. Both nodes must be in the same scene or the function will fail.func getPhysicsProcessDeltaTime(
) -> Double Returns the time elapsed (in seconds) since the last physics-bound frame (see
_physicsProcess(delta:)
). This is always a constant value in physics processing unless the frames per second is changed viaphysicsTicksPerSecond
.func getProcessDeltaTime(
) -> Double Returns the time elapsed (in seconds) since the last process callback. This value may vary from frame to frame.
func getSceneInstanceLoadPlaceholder(
) -> Bool Returns
true
if this is an instance load placeholder. SeeInstancePlaceholder
.func getTree(
) -> SceneTree? Returns the
SceneTree
that contains this node. Returnsnull
and prints an error if this node is not inside the scene tree. See alsoisInsideTree
.func getTreeString(
) -> String Returns the tree as a
String
. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into thegetNode(path:)
function. It also can be used in game UI/UX.func getTreeStringPretty(
) -> String Similar to
getTreeString
, this returns the tree as aString
. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees.func getViewport(
) -> Viewport? Returns the node’s
Viewport
.func getWindow(
) -> Window? Returns the
Window
that contains this node. If the node is in the main window, this is equivalent to getting the root node (get_tree().get_root()
).func hasNode(path: NodePath
) -> Bool Returns
true
if the node that theNodePath
points to exists.func hasNodeAndResource(path: NodePath
) -> Bool Returns
true
if theNodePath
points to a valid node and its subname points to a valid resource, e.g.Area2D/CollisionShape2D:shape
. Properties with a non-Resource
type (e.g. nodes or primitive math types) are not considered resources.func isAncestorOf(node: Node?
) -> Bool Returns
true
if the given node is a direct or indirect child of the current node.func isDisplayedFolded(
) -> Bool Returns
true
if the node is folded (collapsed) in the Scene dock. This method is only intended for use with editor tooling.func isEditableInstance(node: Node?
) -> Bool Returns
true
ifnode
has editable children enabled relative to this node. This method is only intended for use with editor tooling.func isGreaterThan(node: Node?
) -> Bool Returns
true
if the given node occurs later in the scene hierarchy than the current node.func isInGroup(StringName
) -> Bool Returns
true
if this node is in the specified group. See notes in the description, and the group methods inSceneTree
.func isInsideTree(
) -> Bool Returns
true
if this node is currently inside aSceneTree
.func isMultiplayerAuthority(
) -> Bool Returns
true
if the local system is the multiplayer authority of this node.func isNodeReady(
) -> Bool Returns
true
if the node is ready, i.e. it’s inside scene tree and all its children are initialized.func isPhysicsProcessing(
) -> Bool Returns
true
if physics processing is enabled (seesetPhysicsProcess(enable:)
).func isPhysicsProcessingInternal(
) -> Bool Returns
true
if internal physics processing is enabled (seesetPhysicsProcessInternal(enable:)
).func isProcessing(
) -> Bool Returns
true
if processing is enabled (seesetProcess(enable:)
).func isProcessingInput(
) -> Bool Returns
true
if the node is processing input (seesetProcessInput(enable:)
).func isProcessingInternal(
) -> Bool Returns
true
if internal processing is enabled (seesetProcessInternal(enable:)
).func isProcessingShortcutInput(
) -> Bool Returns
true
if the node is processing shortcuts (seesetProcessShortcutInput(enable:)
).func isProcessingUnhandledInput(
) -> Bool Returns
true
if the node is processing unhandled input (seesetProcessUnhandledInput(enable:)
).func isProcessingUnhandledKeyInput(
) -> Bool Returns
true
if the node is processing unhandled key input (seesetProcessUnhandledKeyInput(enable:)
).func moveChild(childNode: Node?, toIndex: Int32
) Moves a child node to a different index (order) among the other children. Since calls, signals, etc. are performed by tree order, changing the order of children nodes may be useful. If
toIndex
is negative, the index will be counted from the end.func notifyDeferredThreadGroup(what: Int32
) Similar to
callDeferredThreadGroup(method:)
, but for notifications.func notifyThreadSafe(what: Int32
) Similar to
callThreadSafe(method:)
, but for notifications.func printTree(
) Prints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the
getNode(path:)
function.func printTreePretty(
) Similar to
printTree
, this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees.func propagateCall(method: StringName, args: GArray, parentFirst: Bool
) Calls the given method (if present) with the arguments given in
args
on this node and recursively on all its children. If theparentFirst
argument istrue
, the method will be called on the current node first, then on all its children. IfparentFirst
isfalse
, the children will be called first.func propagateNotification(what: Int32
) Notifies the current node and all its children recursively by calling
notification(what:reversed:)
on all of them.func queueFree(
) Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well, and all references to the node and its children will become invalid, see
Object/free()
.func removeChild(node: Node?
) Removes a child node. The node is NOT deleted and must be deleted manually.
func removeFromGroup(StringName
) Removes a node from the
group
. Does nothing if the node is not in thegroup
. See notes in the description, and the group methods inSceneTree
.func reparent(newParent: Node?, keepGlobalTransform: Bool
) Changes the parent of this
Node
to thenewParent
. The node needs to already have a parent.func replaceBy(node: Node?, keepGroups: Bool
) Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
func requestReady(
) Requests that
_ready
be called again. Note that the method won’t be called immediately, but is scheduled for when the node is added to the scene tree again._ready
is called only for the node which requested it, which means that you need to request ready for each child if you want them to call_ready
too (in which case,_ready
will be called in the same order as it would normally).func rpc(method: StringName, Variant...
) -> GodotError Sends a remote procedure call request for the given
method
to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the sameNodePath
, including the exact same node name. Behavior depends on the RPC configuration for the given method, seerpcConfig(method:config:)
and [annotation @GDScript.@rpc]. Methods are not exposed to RPCs by default. Returnsnull
.func rpcConfig(method: StringName, config: Variant
) Changes the RPC mode for the given
method
with the givenconfig
which should benull
(to disable) or aGDictionary
in the form:func rpcId(peerId: Int64, method: StringName, Variant...
) -> GodotError Sends a
rpc(method:)
to a specific peer identified bypeerId
(seesetTargetPeer(id:)
). Returnsnull
.func setDeferredThreadGroup(property: StringName, value: Variant
) Similar to
callDeferredThreadGroup(method:)
, but for setting properties.func setDisplayFolded(fold: Bool
) Sets the folded state of the node in the Scene dock. This method is only intended for use with editor tooling.
func setEditableInstance(node: Node?, isEditable: Bool
) Sets the editable children state of
node
relative to this node. This method is only intended for use with editor tooling.func setMultiplayerAuthority(id: Int32, recursive: Bool
) Sets the node’s multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with
rpcConfig(method:config:)
and theMultiplayerAPI
. Defaults to peer ID 1 (the server). Ifrecursive
, the given peer is recursively set as the authority for all children of this node.func setPhysicsProcess(enable: Bool
) Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a
notificationPhysicsProcess
at a fixed (usually 60 FPS, seephysicsTicksPerSecond
to change) interval (and the_physicsProcess(delta:)
callback will be called if exists). Enabled automatically if_physicsProcess(delta:)
is overridden. Any calls to this before_ready
will be ignored.func setPhysicsProcessInternal(enable: Bool
) Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal
_physicsProcess(delta:)
calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (setPhysicsProcess(enable:)
). Only useful for advanced uses to manipulate built-in nodes’ behavior.func setProcess(enable: Bool
) Enables or disables processing. When a node is being processed, it will receive a
notificationProcess
on every drawn frame (and the_process(delta:)
callback will be called if exists). Enabled automatically if_process(delta:)
is overridden. Any calls to this before_ready
will be ignored.func setProcessInput(enable: Bool
) Enables or disables input processing. This is not required for GUI controls! Enabled automatically if
_input(event:)
is overridden. Any calls to this before_ready
will be ignored.func setProcessInternal(enable: Bool
) Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal
_process(delta:)
calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (setProcess(enable:)
). Only useful for advanced uses to manipulate built-in nodes’ behavior.func setProcessShortcutInput(enable: Bool
) Enables shortcut processing. Enabled automatically if
_shortcutInput(event:)
is overridden. Any calls to this before_ready
will be ignored.func setProcessUnhandledInput(enable: Bool
) Enables unhandled input processing. This is not required for GUI controls! It enables the node to receive all input that was not previously handled (usually by a
Control
). Enabled automatically if_unhandledInput(event:)
is overridden. Any calls to this before_ready
will be ignored.func setProcessUnhandledKeyInput(enable: Bool
) Enables unhandled key input processing. Enabled automatically if
_unhandledKeyInput(event:)
is overridden. Any calls to this before_ready
will be ignored.func setSceneInstanceLoadPlaceholder(Bool
) Sets whether this is an instance load placeholder. See
InstancePlaceholder
.func setThreadSafe(property: StringName, value: Variant
) Similar to
callThreadSafe(method:)
, but for setting properties.func updateConfigurationWarnings(
) Updates the warning displayed for this node in the Scene Dock.
Show implementation details (10)
Hide implementation details
func _enterTree(
) Called when the node enters the
SceneTree
(e.g. upon instancing, scene changing, or after callingaddChild(node:forceReadableName:`internal`:)
in a script). If the node has children, its_enterTree
callback will be called first, and then that of the children.func _exitTree(
) Called when the node is about to leave the
SceneTree
(e.g. upon freeing, scene changing, or after callingremoveChild(node:)
in a script). If the node has children, its_exitTree
callback will be called last, after all its children have left the tree.func _getConfigurationWarnings(
) -> PackedStringArray The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a
tool
script.func _input(event: InputEvent
) Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
func _physicsProcess(delta: Double
) Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the
delta
variable should be constant.delta
is in seconds.func _process(delta: Double
) Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the
delta
time since the previous frame is not constant.delta
is in seconds.func _ready(
) Called when the node is “ready”, i.e. when both the node and its children have entered the scene tree. If the node has children, their
_ready
callbacks get triggered first, and the parent node will receive the ready notification afterwards.func _shortcutInput(event: InputEvent?
) Called when an
InputEventKey
orInputEventShortcut
hasn’t been consumed by_input(event:)
or any GUIControl
item. It is called before_unhandledKeyInput(event:)
and_unhandledInput(event:)
. The input event propagates up through the node tree until a node consumes it.func _unhandledInput(event: InputEvent?
) Called when an
InputEvent
hasn’t been consumed by_input(event:)
or any GUIControl
item. It is called after_shortcutInput(event:)
and after_unhandledKeyInput(event:)
. The input event propagates up through the node tree until a node consumes it.func _unhandledKeyInput(event: InputEvent?
) Called when an
InputEventKey
hasn’t been consumed by_input(event:)
or any GUIControl
item. It is called after_shortcutInput(event:)
but before_unhandledInput(event:)
. The input event propagates up through the node tree until a node consumes it.
Citizens in SwiftGodot
Instance members
var emitted: Void
You can await this property to wait for the signal to be emitted once
func connect(flags: Object.ConnectFlags, @escaping (_ node: Node) -> ()
) -> Object Connects the signal to the specified callback
func disconnect(Object
) Disconnects a signal that was previously connected, the return value from calling
connect(flags:_:)