Instance Methodmigueldeicaza.swiftgodot 0.45.0SwiftGodot
connect(flags:_:)
Connects the signal to the specified callback
FileSystemDock.swift:400@discardableResult func connect(flags: Object.ConnectFlags = [], _ callback: @escaping (_ file: String) -> ()) -> Object
Returns
an object token that can be used to disconnect the object from the target on success, or the error produced by Godot.
To disconnect, call the disconnect method, with the returned token on success
callback: the method to invoke when this signal is raised
flags: Optional, can be also added to configure the connection’s behavior (see
ConnectFlags
constants).
Other members in extension
Instance members
var emitted: Void
You can await this property to wait for the signal to be emitted once
func disconnect(Object
) Disconnects a signal that was previously connected, the return value from calling
connect(flags:_:)