Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
GroupCallFlags
SceneTree.swift:30enum GroupCallFlags
Cases
case `default`
Call a group with no flags (default).
case reverse
Call a group in reverse scene order.
case deferred
Call a group at the end of the current frame (process or physics).
case unique
Call a group only once even if the call is executed many times.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (46) members.
Types
class Signal1
Signal support.
class Signal2
Signal support.
class Signal3
Signal support.
class Signal4
Signal support.
Type members
static func createFrom(nativeHandle: UnsafeMutableRawPointer
) -> SceneTree Public because we want to allow the embed API to call this, but dont want to make it obvious in the constructors
class var godotClassName: StringName
Instance members
var autoAcceptQuit: Bool
If
true
, the application automatically accepts quitting requests.var currentScene: Node?
Returns the root node of the currently running scene, regardless of its structure.
var debugCollisionsHint: Bool
If
true
, collision shapes will be visible when running the game from the editor for debugging purposes.var debugPathsHint: Bool
If
true
, curves fromPath2D
andPath3D
nodes will be visible when running the game from the editor for debugging purposes.var editedSceneRoot: Node?
The root of the edited scene.
var multiplayerPoll: Bool
If
true
(default value), enables automatic polling of theMultiplayerAPI
for this SceneTree during [signal process_frame].var nodeAdded: Signal1
Emitted whenever a node is added to the
SceneTree
.var nodeConfigurationWarningChanged: Signal4
Emitted when a node’s configuration changed. Only emitted in
tool
mode.var nodeRemoved: Signal2
Emitted whenever a node is removed from the
SceneTree
.var nodeRenamed: Signal3
Emitted whenever a node is renamed.
var paused: Bool
If
true
, theSceneTree
is paused. Doing so will have the following behavior:var physicsFrame: SimpleSignal
Emitted immediately before
_physicsProcess(delta:)
is called on every node in theSceneTree
.var processFrame: SimpleSignal
Emitted immediately before
_process(delta:)
is called on every node in theSceneTree
.var quitOnGoBack: Bool
If
true
, the application quits automatically when navigating back (e.g. using the system “Back” button on Android).var root: Window?
The
SceneTree
’s rootWindow
.var treeChanged: SimpleSignal
Emitted whenever the
SceneTree
hierarchy changed (children being moved or renamed, etc.).var treeProcessModeChanged: SimpleSignal
This signal is only emitted in the editor, it allows the editor to update the visibility of disabled nodes. Emitted whenever any node’s
processMode
is changed.func callGroup(StringName, method: StringName, Variant...
) Calls
method
on each member of the given group. You can pass arguments tomethod
by specifying them at the end of the method call. If a node doesn’t have the given method or the argument list does not match (either in count or in types), it will be skipped.func callGroupFlags(Int64, group: StringName, method: StringName, Variant...
) Calls
method
on each member of the given group, respecting the givenGroupCallFlags
. You can pass arguments tomethod
by specifying them at the end of the method call. If a node doesn’t have the given method or the argument list does not match (either in count or in types), it will be skipped.func changeSceneToFile(path: String
) -> GodotError Changes the running scene to the one at the given
path
, after loading it into aPackedScene
and creating a new instance.func changeSceneToPacked(packedScene: PackedScene?
) -> GodotError Changes the running scene to a new instance of the given
PackedScene
(which must be valid).func createTimer(timeSec: Double, processAlways: Bool, processInPhysics: Bool, ignoreTimeScale: Bool
) -> SceneTreeTimer? Returns a
SceneTreeTimer
which will emit [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in thisSceneTree
.func createTween(
) -> Tween? Creates and returns a new
Tween
. The Tween will start automatically on the next process frame or physics frame (depending onTween.TweenProcessMode
).func getFirstNodeInGroup(StringName
) -> Node? Returns the first node in the specified group, or
null
if the group is empty or does not exist.func getFrame(
) -> Int Returns the current frame number, i.e. the total frame count since the application started.
func getMultiplayer(forPath: NodePath
) -> MultiplayerAPI? Searches for the
MultiplayerAPI
configured for the given path, if one does not exist it searches the parent paths until one is found. If the path is empty, or none is found, the default one is returned. SeesetMultiplayer(_:rootPath:)
.func getNodeCount(
) -> Int32 Returns the number of nodes in this
SceneTree
.func getNodesInGroup(StringName
) -> ObjectCollection<Node> Returns a list of all nodes assigned to the given group.
func getProcessedTweens(
) -> ObjectCollection<Tween> Returns an array of currently existing
Tween
s in theSceneTree
(both running and paused).func hasGroup(name: StringName
) -> Bool Returns
true
if the given group exists.func notifyGroup(StringName, notification: Int32
) Sends the given notification to all members of the
group
.func notifyGroupFlags(callFlags: UInt32, group: StringName, notification: Int32
) Sends the given notification to all members of the
group
, respecting the givenGroupCallFlags
.func queueDelete(obj: Object?
) Queues the given object for deletion, delaying the call to
Object/free()
to the end of the current frame.func quit(exitCode: Int32
) Quits the application at the end of the current iteration. Argument
exitCode
can optionally be given (defaulting to 0) to customize the exit status code.func reloadCurrentScene(
) -> GodotError Reloads the currently active scene.
func setGroup(StringName, property: String, value: Variant
) Sets the given
property
tovalue
on all members of the given group.func setGroupFlags(callFlags: UInt32, group: StringName, property: String, value: Variant
) Sets the given
property
tovalue
on all members of the given group, respecting the givenGroupCallFlags
.func setMultiplayer(MultiplayerAPI?, rootPath: NodePath
) Sets a custom
MultiplayerAPI
with the givenrootPath
(controlling also the relative subpaths), or override the default one ifrootPath
is empty.func unloadCurrentScene(
) If a current scene is loaded, calling this method will unload it.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.