Tscn

gdext.internal.engine.Tscn
See theTscn companion object
final class Tscn[T <: GodotScriptClass]

A PackedScene typed by its root node type T. Editor-side filtering to scenes whose root is T is provided by the inspector plugin; here the type gives a typed instantiate and a runtime root-type check.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def instantiate(): T

Instantiate the scene and return its root as T. Returns null if unassigned or if the actual root is not a T (runtime root-type guard).

Instantiate the scene and return its root as T. Returns null if unassigned or if the actual root is not a T (runtime root-type guard).

Attributes

def instantiate(parent: Node): T

Instantiate the scene and add its root as a child of parent, returning the root as T. T must be a node type (so its root can be parented); a null parent or unassigned scene yields null.

Instantiate the scene and add its root as a child of parent, returning the root as T. T must be a node type (so its root can be parented); a null parent or unassigned scene yields null.

Attributes

def isAssigned: Boolean
def rootClassName: String

The required root node type's class name (the editor filter target).

The required root node type's class name (the editor filter target).

Attributes

Concrete fields