Skip to content

gd #

Module with all the Godot types.

This is the main module used to create the runtime code for games.

Constants #

const window_notification_theme_changed = 32

Sent when the node needs to refresh its theme items. This happens in one of the following cases:- The [member theme] property is changed on this node or any of its ancestors.

  • The [member theme_type_variation] property is changed on this node.
  • The node enters the scene tree.[b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.
const window_notification_visibility_changed = 30

Emitted when [Window]'s visibility changes, right before [signal visibility_changed].

const vector4i_max = Vector4i{2147483647, 2147483647, 2147483647, 2147483647}

Max vector, a vector with all components equal to INT32_MAX. Can be used as an integer equivalent of [constant Vector4.INF].

const vector4i_min = Vector4i{-2147483648, -2147483648, -2147483648, -2147483648}

Min vector, a vector with all components equal to INT32_MIN. Can be used as a negative integer equivalent of [constant Vector4.INF].

const vector4i_one = Vector4i{1, 1, 1, 1}

One vector, a vector with all components set to 1.

const vector4i_zero = Vector4i{0, 0, 0, 0}

Zero vector, a vector with all components set to 0.

const vector3i_back = Vector3i{0, 0, 1}

Back unit vector. Represents the local direction of back, and the global direction of south.

const vector3i_forward = Vector3i{0, 0, -1}

Forward unit vector. Represents the local direction of forward, and the global direction of north.

const vector3i_down = Vector3i{0, -1, 0}

Down unit vector.

const vector3i_up = Vector3i{0, 1, 0}

Up unit vector.

const vector3i_right = Vector3i{1, 0, 0}

Right unit vector. Represents the local direction of right, and the global direction of east.

const vector3i_left = Vector3i{-1, 0, 0}

Left unit vector. Represents the local direction of left, and the global direction of west.

const vector3i_max = Vector3i{2147483647, 2147483647, 2147483647}

Max vector, a vector with all components equal to INT32_MAX. Can be used as an integer equivalent of [constant Vector3.INF].

const vector3i_min = Vector3i{-2147483648, -2147483648, -2147483648}

Min vector, a vector with all components equal to INT32_MIN. Can be used as a negative integer equivalent of [constant Vector3.INF].

const vector3i_one = Vector3i{1, 1, 1}

One vector, a vector with all components set to 1.

const vector3i_zero = Vector3i{0, 0, 0}

Zero vector, a vector with all components set to 0.

const vector2i_down = Vector2i{0, 1}

Down unit vector. Y is down in 2D, so this vector points +Y.

const vector2i_up = Vector2i{0, -1}

Up unit vector. Y is down in 2D, so this vector points -Y.

const vector2i_right = Vector2i{1, 0}

Right unit vector. Represents the direction of right.

const vector2i_left = Vector2i{-1, 0}

Left unit vector. Represents the direction of left.

const vector2i_max = Vector2i{2147483647, 2147483647}

Max vector, a vector with all components equal to INT32_MAX. Can be used as an integer equivalent of [constant Vector2.INF].

const vector2i_min = Vector2i{-2147483648, -2147483648}

Min vector, a vector with all components equal to INT32_MIN. Can be used as a negative integer equivalent of [constant Vector2.INF].

const vector2i_one = Vector2i{1, 1}

One vector, a vector with all components set to 1.

const vector2i_zero = Vector2i{0, 0}

Zero vector, a vector with all components set to 0.

const transform3d_flip_z = Transform3D{Basis{Vector3{1, 0, 0}, Vector3{0, 1, 0}, Vector3{0, 0, -1}}, Vector3{0, 0, 0}}

[Transform3D] with mirroring applied perpendicular to the XY plane. Its [member basis] is equal to [constant Basis.FLIP_Z].

const transform3d_flip_y = Transform3D{Basis{Vector3{1, 0, 0}, Vector3{0, -1, 0}, Vector3{0, 0, 1}}, Vector3{0, 0, 0}}

[Transform3D] with mirroring applied perpendicular to the XZ plane. Its [member basis] is equal to [constant Basis.FLIP_Y].

const transform3d_flip_x = Transform3D{Basis{Vector3{-1, 0, 0}, Vector3{0, 1, 0}, Vector3{0, 0, 1}}, Vector3{0, 0, 0}}

[Transform3D] with mirroring applied perpendicular to the YZ plane. Its [member basis] is equal to [constant Basis.FLIP_X].

const transform3d_identity = Transform3D{Basis{Vector3{1, 0, 0}, Vector3{0, 1, 0}, Vector3{0, 0, 1}}, Vector3{0, 0, 0}}

The identity [Transform3D]. This is a transform with no translation, no rotation, and a scale of [constant Vector3.ONE]. Its [member basis] is equal to [constant Basis.IDENTITY]. This also means that:- Its [member Basis.x] points right ([constant Vector3.RIGHT]);

  • Its [member Basis.y] points up ([constant Vector3.UP]);
  • Its [member Basis.z] points back ([constant Vector3.BACK]).
var transform = Transform3D.IDENTITY
var basis = transform.basis
print('| X | Y | Z | Origin')
print('| %.f | %.f | %.f | %.f' % [basis.x.x, basis.y.x, basis.z.x, transform.origin.x])
print('| %.f | %.f | %.f | %.f' % [basis.x.y, basis.y.y, basis.z.y, transform.origin.y])
print('| %.f | %.f | %.f | %.f' % [basis.x.z, basis.y.z, basis.z.z, transform.origin.z])
##########

If a [Vector3], an [AABB], a [Plane], a [PackedVector3Array], or another [Transform3D] is transformed (multiplied) by this constant, no transformation occurs. [b]Note:[/b] In GDScript, this constant is equivalent to creating a [constructor Transform3D] without any arguments. It can be used to make your code clearer, and for consistency with C#.

const tilesetatlassource_transform_transpose = 16384

Represents cell's transposed flag. See [constant TRANSFORM_FLIP_H] for usage.

const tilesetatlassource_transform_flip_v = 8192

Represents cell's vertical flip flag. See [constant TRANSFORM_FLIP_H] for usage.

const tilesetatlassource_transform_flip_h = 4096

Represents cell's horizontal flip flag. Should be used directly with [TileMapLayer] to flip placed tiles by altering their alternative IDs.

var alternate_id = $TileMapLayer.get_cell_alternative_tile(Vector2i(2, 2))
if not alternate_id & TileSetAtlasSource.TRANSFORM_FLIP_H:
##$TileMapLayer.set_cell(Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H)

[b]Note:[/b] These transformations can be combined to do the equivalent of 0, 90, 180, and 270 degree rotations, as shown below:

enum TileTransform {
ROTATE_0 = 0,
ROTATE_90 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_H,
ROTATE_180 = TileSetAtlasSource.TRANSFORM_FLIP_H | TileSetAtlasSource.TRANSFORM_FLIP_V,
ROTATE_270 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_V,
}
const resourceuid_invalid_id = -1

The value to use for an invalid UID, for example if the resource could not be loaded. Its text representation is uid://<invalid>.

const renderingdevice_invalid_format_id = -1

Returned by functions that return a format ID if a value is invalid.

const renderingdevice_invalid_id = -1

Returned by functions that return an ID if a value is invalid.

const quaternion_identity = Quaternion{0, 0, 0, 1}

The identity quaternion, representing no rotation. This has the same rotation as [constant Basis.IDENTITY]. If a [Vector3] is rotated (multiplied) by this quaternion, it does not change. [b]Note:[/b] In GDScript, this constant is equivalent to creating a [constructor Quaternion] without any arguments. It can be used to make your code clearer, and for consistency with C#.

const plane_plane_xy = Plane{Vector3{0, 0, 1}, 0}

A plane that extends in the X and Y axes (normal vector points +Z).

const plane_plane_xz = Plane{Vector3{0, 1, 0}, 0}

A plane that extends in the X and Z axes (normal vector points +Y).

const plane_plane_yz = Plane{Vector3{1, 0, 0}, 0}

A plane that extends in the Y and Z axes (normal vector points +X).

const node3d_notification_local_transform_changed = 44

Notification received when this node's [member transform] changes, if [method is_local_transform_notification_enabled] is true. This is not received when a parent [Node3D]'s [member transform] changes. See also [method set_notify_local_transform]. [b]Note:[/b] Some 3D nodes such as [CSGShape3D] or [CollisionShape3D] automatically enable this to function correctly.

const node3d_notification_visibility_changed = 43

Notification received when this node's visibility changes (see [member visible] and [method is_visible_in_tree]). This notification is received [i]before[/i] the related [signal visibility_changed] signal.

const node3d_notification_exit_world = 42

Notification received when this node is unregistered from the current [World3D] (see [method get_world_3d]).

const node3d_notification_enter_world = 41

Notification received when this node is registered to a new [World3D] (see [method get_world_3d]).

const node3d_notification_transform_changed = 2000

Notification received when this node's [member global_transform] changes, if [method is_transform_notification_enabled] is true. See also [method set_notify_transform]. [b]Note:[/b] Most 3D nodes such as [VisualInstance3D] or [CollisionObject3D] automatically enable this to function correctly. [b]Note:[/b] In the editor, nodes will propagate this notification to their children if a gizmo is attached (see [method add_gizmo]).

const multiplayerpeer_target_peer_server = 1

Packets are sent to the remote peer acting as server.

const multiplayerpeer_target_peer_broadcast = 0

Packets are sent to all connected peers.

const mainloop_notification_text_server_changed = 2018

Notification received when text server is changed.

const mainloop_notification_application_focus_out = 2017

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. Implemented on desktop and mobile platforms.

const mainloop_notification_application_focus_in = 2016

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. Implemented on desktop and mobile platforms.

const mainloop_notification_application_paused = 2015

Notification received from the OS when the application is paused. Specific to the Android and iOS platforms. [b]Note:[/b] On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it.

const mainloop_notification_application_resumed = 2014

Notification received from the OS when the application is resumed. Specific to the Android and iOS platforms.

const mainloop_notification_os_ime_update = 2013

Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). Specific to the macOS platform.

const mainloop_notification_crash = 2012

Notification received from Godot's crash handler when the engine is about to crash. Implemented on desktop platforms if the crash handler is enabled.

const mainloop_notification_wm_about = 2011

Notification received from the OS when a request for "About" information is sent. Specific to the macOS platform.

const mainloop_notification_translation_changed = 2010

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 [method Object.tr].

const mainloop_notification_os_memory_warning = 2009

Notification received from the OS when the application is exceeding its allocated memory. Specific to the iOS platform.

const image_max_height = 16777216

The maximal height allowed for [Image] resources.

const image_max_width = 16777216

The maximal width allowed for [Image] resources.

const gridmap_invalid_cell_item = -1

Invalid cell item that can be used in [method set_cell_item] to clear cells (or represent an empty cell in [method get_cell_item]).

const gltfstate_handle_binary_embed_as_uncompressed = 3

Embeds textures compressed losslessly into the generated scene, matching old behavior.

const gltfstate_handle_binary_embed_as_basisu = 2

Embeds textures VRAM compressed with Basis Universal into the generated scene.

const gltfstate_handle_binary_extract_textures = 1

Extracts embedded textures to be reimported and compressed. Editor only. Acts as uncompressed at runtime.

const gltfstate_handle_binary_discard_textures = 0

Discards all embedded textures and uses untextured materials.

const editorsceneformatimporter_import_force_disable_mesh_compression = 64
const editorsceneformatimporter_import_discard_meshes_and_materials = 32
const editorsceneformatimporter_import_use_named_skin_binds = 16
const editorsceneformatimporter_import_generate_tangent_arrays = 8
const editorsceneformatimporter_import_fail_on_missing_dependencies = 4
const editorsceneformatimporter_import_animation = 2
const editorsceneformatimporter_import_scene = 1
const displayserver_invalid_indicator_id = -1

The ID that refers to a nonexistent application status indicator.

const displayserver_invalid_window_id = -1

The ID that refers to a nonexistent window. This is returned by some [DisplayServer] methods if no window matches the requested result.

const displayserver_main_window_id = 0

The ID of the main window spawned by the engine, which can be passed to methods expecting a window_id.

const displayserver_screen_of_main_window = -1

Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. [b]Note:[/b] On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.

const displayserver_screen_primary = -2

Represents the primary screen. [b]Note:[/b] On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.

const displayserver_screen_with_keyboard_focus = -3

Represents the screen containing the window with the keyboard focus. [b]Note:[/b] On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.

const displayserver_screen_with_mouse_focus = -4

Represents the screen containing the mouse pointer. [b]Note:[/b] On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.

const displayserver_invalid_screen = -1

The ID that refers to a screen that does not exist. This is returned by some [DisplayServer] methods if no screen matches the requested result.

const container_notification_sort_children = 51

Notification for when sorting the children, it must be obeyed immediately.

const container_notification_pre_sort_children = 50

Notification just before children are going to be sorted, in case there's something to process beforehand.

const canvasitem_notification_world_2d_changed = 36

Notification received when this [CanvasItem] is registered to a new [World2D] (see [method get_world_2d]).

const canvasitem_notification_exit_canvas = 33

The [CanvasItem] has exited the canvas.

const canvasitem_notification_enter_canvas = 32

The [CanvasItem] has entered the canvas.

const canvasitem_notification_visibility_changed = 31

Notification received when this node's visibility changes (see [member visible] and [method is_visible_in_tree]). This notification is received [i]before[/i] the related [signal visibility_changed] signal.

const canvasitem_notification_draw = 30

The [CanvasItem] is requested to draw (see [method _draw]).

const canvasitem_notification_local_transform_changed = 35

Notification received when this node's transform changes, if [method is_local_transform_notification_enabled] is true. This is not received when a parent [Node2D]'s transform changes. See also [method set_notify_local_transform]. [b]Note:[/b] Many canvas items such as [Camera2D] or [CollisionShape2D] automatically enable this in order to function correctly.

const canvasitem_notification_transform_changed = 2000

Notification received when this node's global transform changes, if [method is_transform_notification_enabled] is true. See also [method set_notify_transform] and [method get_transform]. [b]Note:[/b] Many canvas items such as [Camera2D] or [CollisionObject2D] automatically enable this in order to function correctly.

const audiostreamsynchronized_max_streams = 32

Maximum amount of streams that can be synchronized.

const audiostreamplaybackpolyphonic_invalid_id = -1

Returned by [method play_stream] in case it could not allocate a stream for playback.

const animationnodeblendtree_connection_error_connection_exists = 5

The specified connection already exists.

const animationnodeblendtree_connection_error_same_node = 4

Input and output nodes are the same.

const animationnodeblendtree_connection_error_no_output = 3

The output node is null.

const animationnodeblendtree_connection_error_no_input_index = 2

The specified input port is out of range.

const animationnodeblendtree_connection_error_no_input = 1

The input node is null.

const animationnodeblendtree_connection_ok = 0

The connection was successful.

const animatedtexture_max_frames = 256

The maximum number of frames supported by [AnimatedTexture]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite2D].

const audiostreaminteractive_clip_any = -1

This constant describes that any clip is valid for a specific transition as either source or destination.

const audiostreamplaylist_max_streams = 64

Maximum amount of streams supported in the playlist.

const basis_identity = Basis{Vector3{1, 0, 0}, Vector3{0, 1, 0}, Vector3{0, 0, 1}}

The identity [Basis]. This is an orthonormal basis with no rotation, no shear, and a scale of [constant Vector3.ONE]. This also means that:- The [member x] points right ([constant Vector3.RIGHT]);

  • The [member y] points up ([constant Vector3.UP]);
  • The [member z] points back ([constant Vector3.BACK]).
var basis = Basis.IDENTITY
print('| X | Y | Z')
print('| %.f | %.f | %.f' % [basis.x.x, basis.y.x, basis.z.x])
print('| %.f | %.f | %.f' % [basis.x.y, basis.y.y, basis.z.y])
print('| %.f | %.f | %.f' % [basis.x.z, basis.y.z, basis.z.z])
##########

If a [Vector3] or another [Basis] is transformed (multiplied) by this constant, no transformation occurs. [b]Note:[/b] In GDScript, this constant is equivalent to creating a [constructor Basis] without any arguments. It can be used to make your code clearer, and for consistency with C#.

const basis_flip_x = Basis{Vector3{-1, 0, 0}, Vector3{0, 1, 0}, Vector3{0, 0, 1}}

When any basis is multiplied by [constant FLIP_X], it negates all components of the [member x] axis (the X column). When [constant FLIP_X] is multiplied by any basis, it negates the [member Vector3.x] component of all axes (the X row).

const basis_flip_y = Basis{Vector3{1, 0, 0}, Vector3{0, -1, 0}, Vector3{0, 0, 1}}

When any basis is multiplied by [constant FLIP_Y], it negates all components of the [member y] axis (the Y column). When [constant FLIP_Y] is multiplied by any basis, it negates the [member Vector3.y] component of all axes (the Y row).

const basis_flip_z = Basis{Vector3{1, 0, 0}, Vector3{0, 1, 0}, Vector3{0, 0, -1}}

When any basis is multiplied by [constant FLIP_Z], it negates all components of the [member z] axis (the Z column). When [constant FLIP_Z] is multiplied by any basis, it negates the [member Vector3.z] component of all axes (the Z row).

const color_alice_blue = Color{0.9411765, 0.972549, 1, 1}

Alice blue color.

const color_antique_white = Color{0.98039216, 0.92156863, 0.84313726, 1}

Antique white color.

const color_aqua = Color{0, 1, 1, 1}

Aqua color.

const color_aquamarine = Color{0.49803922, 1, 0.83137256, 1}

Aquamarine color.

const color_azure = Color{0.9411765, 1, 1, 1}

Azure color.

const color_beige = Color{0.9607843, 0.9607843, 0.8627451, 1}

Beige color.

const color_bisque = Color{1, 0.89411765, 0.76862746, 1}

Bisque color.

const color_black = Color{0, 0, 0, 1}

Black color. In GDScript, this is the default value of any color.

const color_blanched_almond = Color{1, 0.92156863, 0.8039216, 1}

Blanched almond color.

const color_blue = Color{0, 0, 1, 1}

Blue color.

const color_blue_violet = Color{0.5411765, 0.16862746, 0.8862745, 1}

Blue violet color.

const color_brown = Color{0.64705884, 0.16470589, 0.16470589, 1}

Brown color.

const color_burlywood = Color{0.87058824, 0.72156864, 0.5294118, 1}

Burlywood color.

const color_cadet_blue = Color{0.37254903, 0.61960787, 0.627451, 1}

Cadet blue color.

const color_chartreuse = Color{0.49803922, 1, 0, 1}

Chartreuse color.

const color_chocolate = Color{0.8235294, 0.4117647, 0.11764706, 1}

Chocolate color.

const color_coral = Color{1, 0.49803922, 0.3137255, 1}

Coral color.

const color_cornflower_blue = Color{0.39215687, 0.58431375, 0.92941177, 1}

Cornflower blue color.

const color_cornsilk = Color{1, 0.972549, 0.8627451, 1}

Cornsilk color.

const color_crimson = Color{0.8627451, 0.078431375, 0.23529412, 1}

Crimson color.

const color_cyan = Color{0, 1, 1, 1}

Cyan color.

const color_dark_blue = Color{0, 0, 0.54509807, 1}

Dark blue color.

const color_dark_cyan = Color{0, 0.54509807, 0.54509807, 1}

Dark cyan color.

const color_dark_goldenrod = Color{0.72156864, 0.5254902, 0.043137256, 1}

Dark goldenrod color.

const color_dark_gray = Color{0.6627451, 0.6627451, 0.6627451, 1}

Dark gray color.

const color_dark_green = Color{0, 0.39215687, 0, 1}

Dark green color.

const color_dark_khaki = Color{0.7411765, 0.7176471, 0.41960785, 1}

Dark khaki color.

const color_dark_magenta = Color{0.54509807, 0, 0.54509807, 1}

Dark magenta color.

const color_dark_olive_green = Color{0.33333334, 0.41960785, 0.18431373, 1}

Dark olive green color.

const color_dark_orange = Color{1, 0.54901963, 0, 1}

Dark orange color.

const color_dark_orchid = Color{0.6, 0.19607843, 0.8, 1}

Dark orchid color.

const color_dark_red = Color{0.54509807, 0, 0, 1}

Dark red color.

const color_dark_salmon = Color{0.9137255, 0.5882353, 0.47843137, 1}

Dark salmon color.

const color_dark_sea_green = Color{0.56078434, 0.7372549, 0.56078434, 1}

Dark sea green color.

const color_dark_slate_blue = Color{0.28235295, 0.23921569, 0.54509807, 1}

Dark slate blue color.

const color_dark_slate_gray = Color{0.18431373, 0.30980393, 0.30980393, 1}

Dark slate gray color.

const color_dark_turquoise = Color{0, 0.80784315, 0.81960785, 1}

Dark turquoise color.

const color_dark_violet = Color{0.5803922, 0, 0.827451, 1}

Dark violet color.

const color_deep_pink = Color{1, 0.078431375, 0.5764706, 1}

Deep pink color.

const color_deep_sky_blue = Color{0, 0.7490196, 1, 1}

Deep sky blue color.

const color_dim_gray = Color{0.4117647, 0.4117647, 0.4117647, 1}

Dim gray color.

const color_dodger_blue = Color{0.11764706, 0.5647059, 1, 1}

Dodger blue color.

const color_firebrick = Color{0.69803923, 0.13333334, 0.13333334, 1}

Firebrick color.

const color_floral_white = Color{1, 0.98039216, 0.9411765, 1}

Floral white color.

const color_forest_green = Color{0.13333334, 0.54509807, 0.13333334, 1}

Forest green color.

const color_fuchsia = Color{1, 0, 1, 1}

Fuchsia color.

const color_gainsboro = Color{0.8627451, 0.8627451, 0.8627451, 1}

Gainsboro color.

const color_ghost_white = Color{0.972549, 0.972549, 1, 1}

Ghost white color.

const color_gold = Color{1, 0.84313726, 0, 1}

Gold color.

const color_goldenrod = Color{0.85490197, 0.64705884, 0.1254902, 1}

Goldenrod color.

const color_gray = Color{0.74509805, 0.74509805, 0.74509805, 1}

Gray color.

const color_green = Color{0, 1, 0, 1}

Green color.

const color_green_yellow = Color{0.6784314, 1, 0.18431373, 1}

Green yellow color.

const color_honeydew = Color{0.9411765, 1, 0.9411765, 1}

Honeydew color.

const color_hot_pink = Color{1, 0.4117647, 0.7058824, 1}

Hot pink color.

const color_indian_red = Color{0.8039216, 0.36078432, 0.36078432, 1}

Indian red color.

const color_indigo = Color{0.29411766, 0, 0.50980395, 1}

Indigo color.

const color_ivory = Color{1, 1, 0.9411765, 1}

Ivory color.

const color_khaki = Color{0.9411765, 0.9019608, 0.54901963, 1}

Khaki color.

const color_lavender = Color{0.9019608, 0.9019608, 0.98039216, 1}

Lavender color.

const color_lavender_blush = Color{1, 0.9411765, 0.9607843, 1}

Lavender blush color.

const color_lawn_green = Color{0.4862745, 0.9882353, 0, 1}

Lawn green color.

const color_lemon_chiffon = Color{1, 0.98039216, 0.8039216, 1}

Lemon chiffon color.

const color_light_blue = Color{0.6784314, 0.84705883, 0.9019608, 1}

Light blue color.

const color_light_coral = Color{0.9411765, 0.5019608, 0.5019608, 1}

Light coral color.

const color_light_cyan = Color{0.8784314, 1, 1, 1}

Light cyan color.

const color_light_goldenrod = Color{0.98039216, 0.98039216, 0.8235294, 1}

Light goldenrod color.

const color_light_gray = Color{0.827451, 0.827451, 0.827451, 1}

Light gray color.

const color_light_green = Color{0.5647059, 0.93333334, 0.5647059, 1}

Light green color.

const color_light_pink = Color{1, 0.7137255, 0.75686276, 1}

Light pink color.

const color_light_salmon = Color{1, 0.627451, 0.47843137, 1}

Light salmon color.

const color_light_sea_green = Color{0.1254902, 0.69803923, 0.6666667, 1}

Light sea green color.

const color_light_sky_blue = Color{0.5294118, 0.80784315, 0.98039216, 1}

Light sky blue color.

const color_light_slate_gray = Color{0.46666667, 0.53333336, 0.6, 1}

Light slate gray color.

const color_light_steel_blue = Color{0.6901961, 0.76862746, 0.87058824, 1}

Light steel blue color.

const color_light_yellow = Color{1, 1, 0.8784314, 1}

Light yellow color.

const color_lime = Color{0, 1, 0, 1}

Lime color.

const color_lime_green = Color{0.19607843, 0.8039216, 0.19607843, 1}

Lime green color.

const color_linen = Color{0.98039216, 0.9411765, 0.9019608, 1}

Linen color.

const color_magenta = Color{1, 0, 1, 1}

Magenta color.

const color_maroon = Color{0.6901961, 0.1882353, 0.3764706, 1}

Maroon color.

const color_medium_aquamarine = Color{0.4, 0.8039216, 0.6666667, 1}

Medium aquamarine color.

const color_medium_blue = Color{0, 0, 0.8039216, 1}

Medium blue color.

const color_medium_orchid = Color{0.7294118, 0.33333334, 0.827451, 1}

Medium orchid color.

const color_medium_purple = Color{0.5764706, 0.4392157, 0.85882354, 1}

Medium purple color.

const color_medium_sea_green = Color{0.23529412, 0.7019608, 0.44313726, 1}

Medium sea green color.

const color_medium_slate_blue = Color{0.48235294, 0.40784314, 0.93333334, 1}

Medium slate blue color.

const color_medium_spring_green = Color{0, 0.98039216, 0.6039216, 1}

Medium spring green color.

const color_medium_turquoise = Color{0.28235295, 0.81960785, 0.8, 1}

Medium turquoise color.

const color_medium_violet_red = Color{0.78039217, 0.08235294, 0.52156866, 1}

Medium violet red color.

const color_midnight_blue = Color{0.09803922, 0.09803922, 0.4392157, 1}

Midnight blue color.

const color_mint_cream = Color{0.9607843, 1, 0.98039216, 1}

Mint cream color.

const color_misty_rose = Color{1, 0.89411765, 0.88235295, 1}

Misty rose color.

const color_moccasin = Color{1, 0.89411765, 0.70980394, 1}

Moccasin color.

const color_navajo_white = Color{1, 0.87058824, 0.6784314, 1}

Navajo white color.

const color_navy_blue = Color{0, 0, 0.5019608, 1}

Navy blue color.

const color_old_lace = Color{0.99215686, 0.9607843, 0.9019608, 1}

Old lace color.

const color_olive = Color{0.5019608, 0.5019608, 0, 1}

Olive color.

const color_olive_drab = Color{0.41960785, 0.5568628, 0.13725491, 1}

Olive drab color.

const color_orange = Color{1, 0.64705884, 0, 1}

Orange color.

const color_orange_red = Color{1, 0.27058825, 0, 1}

Orange red color.

const color_orchid = Color{0.85490197, 0.4392157, 0.8392157, 1}

Orchid color.

const color_pale_goldenrod = Color{0.93333334, 0.9098039, 0.6666667, 1}

Pale goldenrod color.

const color_pale_green = Color{0.59607846, 0.9843137, 0.59607846, 1}

Pale green color.

const color_pale_turquoise = Color{0.6862745, 0.93333334, 0.93333334, 1}

Pale turquoise color.

const color_pale_violet_red = Color{0.85882354, 0.4392157, 0.5764706, 1}

Pale violet red color.

const color_papaya_whip = Color{1, 0.9372549, 0.8352941, 1}

Papaya whip color.

const color_peach_puff = Color{1, 0.85490197, 0.7254902, 1}

Peach puff color.

const color_peru = Color{0.8039216, 0.52156866, 0.24705882, 1}

Peru color.

const color_pink = Color{1, 0.7529412, 0.79607844, 1}

Pink color.

const color_plum = Color{0.8666667, 0.627451, 0.8666667, 1}

Plum color.

const color_powder_blue = Color{0.6901961, 0.8784314, 0.9019608, 1}

Powder blue color.

const color_purple = Color{0.627451, 0.1254902, 0.9411765, 1}

Purple color.

const color_rebecca_purple = Color{0.4, 0.2, 0.6, 1}

Rebecca purple color.

const color_red = Color{1, 0, 0, 1}

Red color.

const color_rosy_brown = Color{0.7372549, 0.56078434, 0.56078434, 1}

Rosy brown color.

const color_royal_blue = Color{0.25490198, 0.4117647, 0.88235295, 1}

Royal blue color.

const color_saddle_brown = Color{0.54509807, 0.27058825, 0.07450981, 1}

Saddle brown color.

const color_salmon = Color{0.98039216, 0.5019608, 0.44705883, 1}

Salmon color.

const color_sandy_brown = Color{0.95686275, 0.6431373, 0.3764706, 1}

Sandy brown color.

const color_sea_green = Color{0.18039216, 0.54509807, 0.34117648, 1}

Sea green color.

const color_seashell = Color{1, 0.9607843, 0.93333334, 1}

Seashell color.

const color_sienna = Color{0.627451, 0.32156864, 0.1764706, 1}

Sienna color.

const color_silver = Color{0.7529412, 0.7529412, 0.7529412, 1}

Silver color.

const color_sky_blue = Color{0.5294118, 0.80784315, 0.92156863, 1}

Sky blue color.

const color_slate_blue = Color{0.41568628, 0.3529412, 0.8039216, 1}

Slate blue color.

const color_slate_gray = Color{0.4392157, 0.5019608, 0.5647059, 1}

Slate gray color.

const color_snow = Color{1, 0.98039216, 0.98039216, 1}

Snow color.

const color_spring_green = Color{0, 1, 0.49803922, 1}

Spring green color.

const color_steel_blue = Color{0.27450982, 0.50980395, 0.7058824, 1}

Steel blue color.

const color_tan = Color{0.8235294, 0.7058824, 0.54901963, 1}

Tan color.

const color_teal = Color{0, 0.5019608, 0.5019608, 1}

Teal color.

const color_thistle = Color{0.84705883, 0.7490196, 0.84705883, 1}

Thistle color.

const color_tomato = Color{1, 0.3882353, 0.2784314, 1}

Tomato color.

const color_transparent = Color{1, 1, 1, 0}

Transparent color (white with zero alpha).

const color_turquoise = Color{0.2509804, 0.8784314, 0.8156863, 1}

Turquoise color.

const color_violet = Color{0.93333334, 0.50980395, 0.93333334, 1}

Violet color.

const color_web_gray = Color{0.5019608, 0.5019608, 0.5019608, 1}

Web gray color.

const color_web_green = Color{0, 0.5019608, 0, 1}

Web green color.

const color_web_maroon = Color{0.5019608, 0, 0, 1}

Web maroon color.

const color_web_purple = Color{0.5019608, 0, 0.5019608, 1}

Web purple color.

const color_wheat = Color{0.9607843, 0.87058824, 0.7019608, 1}

Wheat color.

const color_white = Color{1, 1, 1, 1}

White color.

const color_white_smoke = Color{0.9607843, 0.9607843, 0.9607843, 1}

White smoke color.

const color_yellow = Color{1, 1, 0, 1}

Yellow color.

const color_yellow_green = Color{0.6039216, 0.8039216, 0.19607843, 1}

Yellow green color.

const control_notification_resized = 40

Sent when the node changes size. Use [member size] to get the new size.

const control_notification_mouse_enter = 41

Sent when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. [b]Note:[/b] [member CanvasItem.z_index] doesn't affect which Control receives the notification. See also [constant NOTIFICATION_MOUSE_ENTER_SELF].

const control_notification_mouse_exit = 42

Sent when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. [b]Note:[/b] [member CanvasItem.z_index] doesn't affect which Control receives the notification. See also [constant NOTIFICATION_MOUSE_EXIT_SELF].

const control_notification_mouse_enter_self = 60

Sent when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. [b]Note:[/b] [member CanvasItem.z_index] doesn't affect which Control receives the notification. See also [constant NOTIFICATION_MOUSE_ENTER].

const control_notification_mouse_exit_self = 61

Sent when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. [b]Note:[/b] [member CanvasItem.z_index] doesn't affect which Control receives the notification. See also [constant NOTIFICATION_MOUSE_EXIT].

const control_notification_focus_enter = 43

Sent when the node grabs focus.

const control_notification_focus_exit = 44

Sent when the node loses focus.

const control_notification_theme_changed = 45

Sent when the node needs to refresh its theme items. This happens in one of the following cases:- The [member theme] property is changed on this node or any of its ancestors.

  • The [member theme_type_variation] property is changed on this node.
  • One of the node's theme property overrides is changed.
  • The node enters the scene tree.[b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. [b]Note:[/b] This notification is received alongside [constant Node.NOTIFICATION_ENTER_TREE], so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using [method Node.is_node_ready].
func _notification(what):
if what == NOTIFICATION_THEME_CHANGED:
if not is_node_ready():
await ready ##$Label.add_theme_color_override('font_color', Color.YELLOW)
const control_notification_scroll_begin = 47

Sent when this node is inside a [ScrollContainer] which has begun being scrolled when dragging the scrollable area [i]with a touch event[/i]. This notification is [i]not[/i] sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. [b]Note:[/b] This signal is only emitted on Android or iOS, or on desktop/web platforms when [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is enabled.

const control_notification_scroll_end = 48

Sent when this node is inside a [ScrollContainer] which has stopped being scrolled when dragging the scrollable area [i]with a touch event[/i]. This notification is [i]not[/i] sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. [b]Note:[/b] This signal is only emitted on Android or iOS, or on desktop/web platforms when [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is enabled.

const control_notification_layout_direction_changed = 49

Sent when the control layout direction is changed from LTR or RTL or vice versa. This notification is propagated to child Control nodes as result of a change to [member layout_direction].

const enetpacketpeer_packet_loss_scale = 65536

The reference scale for packet loss. See [method get_statistic] and [constant PEER_PACKET_LOSS].

const enetpacketpeer_packet_throttle_scale = 32

The reference value for throttle configuration. The default value is 32. See [method throttle_configure].

const enetpacketpeer_flag_reliable = 1

Mark the packet to be sent as reliable.

const enetpacketpeer_flag_unsequenced = 2

Mark the packet to be sent unsequenced (unreliable).

const enetpacketpeer_flag_unreliable_fragment = 8

Mark the packet to be sent unreliable even if the packet is too big and needs fragmentation (increasing the chance of it being dropped).

const editorsettings_notification_editor_settings_changed = 10000

Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes.

const gpuparticles3d_max_draw_passes = 4

Maximum number of draw passes supported.

const ip_resolver_max_queries = 256

Maximum number of concurrent DNS resolver queries allowed, [constant RESOLVER_INVALID_ID] is returned if exceeded.

const ip_resolver_invalid_id = -1

Invalid ID constant. Returned if [constant RESOLVER_MAX_QUERIES] is exceeded.

const inputevent_device_id_emulation = -1

Device ID used for emulated mouse input from a touchscreen, or for emulated touch input from a mouse. This can be used to distinguish emulated mouse input from physical mouse input, or emulated touch input from physical touch input.

const material_render_priority_max = 127

Maximum value for the [member render_priority] parameter.

const material_render_priority_min = -128

Minimum value for the [member render_priority] parameter.

const node_notification_enter_tree = 10

Notification received when the node enters a [SceneTree]. See [method _enter_tree]. This notification is received [i]before[/i] the related [signal tree_entered] signal.

const node_notification_exit_tree = 11

Notification received when the node is about to exit a [SceneTree]. See [method _exit_tree]. This notification is received [i]after[/i] the related [signal tree_exiting] signal.

const node_notification_moved_in_parent = 12
const node_notification_ready = 13

Notification received when the node is ready. See [method _ready].

const node_notification_paused = 14

Notification received when the node is paused. See [member process_mode].

const node_notification_unpaused = 15

Notification received when the node is unpaused. See [member process_mode].

const node_notification_physics_process = 16

Notification received from the tree every physics frame when [method is_physics_processing] returns true. See [method _physics_process].

const node_notification_process = 17

Notification received from the tree every rendered frame when [method is_processing] returns true. See [method _process].

const node_notification_parented = 18

Notification received when the node is set as a child of another node (see [method add_child] and [method add_sibling]). [b]Note:[/b] This does [i]not[/i] mean that the node entered the [SceneTree].

const node_notification_unparented = 19

Notification received when the parent node calls [method remove_child] on this node. [b]Note:[/b] This does [i]not[/i] mean that the node exited the [SceneTree].

const node_notification_scene_instantiated = 20

Notification received [i]only[/i] by the newly instantiated scene root node, when [method PackedScene.instantiate] is completed.

const node_notification_drag_begin = 21

Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one. Can be triggered either by dragging a [Control] that provides drag data (see [method Control._get_drag_data]) or using [method Control.force_drag]. Use [method Viewport.gui_get_drag_data] to get the dragged data.

const node_notification_drag_end = 22

Notification received when a drag operation ends. Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded.

const node_notification_path_renamed = 23

Notification received when the node's [member name] or one of its ancestors' [member name] is changed. This notification is [i]not[/i] received when the node is removed from the [SceneTree].

const node_notification_child_order_changed = 24

Notification received when the list of children is changed. This happens when child nodes are added, moved or removed.

const node_notification_internal_process = 25

Notification received from the tree every rendered frame when [method is_processing_internal] returns true.

const node_notification_internal_physics_process = 26

Notification received from the tree every physics frame when [method is_physics_processing_internal] returns true.

const node_notification_post_enter_tree = 27

Notification received when the node enters the tree, just before [constant NOTIFICATION_READY] may be received. Unlike the latter, it is sent every time the node enters tree, not just once.

const node_notification_disabled = 28

Notification received when the node is disabled. See [constant PROCESS_MODE_DISABLED].

const node_notification_enabled = 29

Notification received when the node is enabled again after being disabled. See [constant PROCESS_MODE_DISABLED].

const node_notification_reset_physics_interpolation = 2001

Notification received when [method reset_physics_interpolation] is called on the node or its ancestors.

const node_notification_editor_pre_save = 9001

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.

const node_notification_editor_post_save = 9002

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.

const node_notification_wm_mouse_enter = 1002

Notification received when the mouse enters the window. Implemented for embedded windows and on desktop and web platforms.

const node_notification_wm_mouse_exit = 1003

Notification received when the mouse leaves the window. Implemented for embedded windows and on desktop and web platforms.

const node_notification_wm_window_focus_in = 1004

Notification received from the OS when the node's [Window] ancestor 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 case [constant NOTIFICATION_APPLICATION_FOCUS_IN] is also received). A [Window] node receives this notification when it is focused.

const node_notification_wm_window_focus_out = 1005

Notification received from the OS when the node's [Window] ancestor 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 case [constant NOTIFICATION_APPLICATION_FOCUS_OUT] is also received). A [Window] node receives this notification when it is defocused.

const node_notification_wm_close_request = 1006

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]). Implemented on desktop platforms.

const node_notification_wm_go_back_request = 1007

Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). Implemented only on Android.

const node_notification_wm_size_changed = 1008

Notification received when the window is resized. [b]Note:[/b] Only the resized [Window] node receives this notification, and it's not propagated to the child nodes.

const node_notification_wm_dpi_change = 1009

Notification received from the OS when the screen's dots per inch (DPI) scale is changed. Only implemented on macOS.

const node_notification_vp_mouse_enter = 1010

Notification received when the mouse cursor enters the [Viewport]'s visible area, that is not occluded behind other [Control]s or [Window]s, provided its [member Viewport.gui_disable_input] is false and regardless if it's currently focused or not.

const node_notification_vp_mouse_exit = 1011

Notification received when the mouse cursor leaves the [Viewport]'s visible area, that is not occluded behind other [Control]s or [Window]s, provided its [member Viewport.gui_disable_input] is false and regardless if it's currently focused or not.

const node_notification_wm_position_changed = 1012

Notification received when the window is moved.

const node_notification_os_memory_warning = 2009

Notification received from the OS when the application is exceeding its allocated memory. Implemented only on iOS.

const node_notification_translation_changed = 2010

Notification received when translations may have changed. Can be triggered by the user changing the locale, changing [member auto_translate_mode] or when the node enters the scene tree. 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 [method Object.tr]. [b]Note:[/b] This notification is received alongside [constant NOTIFICATION_ENTER_TREE], so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup translations for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using [method is_node_ready].

func _notification(what):
if what == NOTIFICATION_TRANSLATION_CHANGED:
if not is_node_ready():
await ready ##$Label.text = atr('%d Bananas') % banana_counter
const node_notification_wm_about = 2011

Notification received from the OS when a request for "About" information is sent. Implemented only on macOS.

const node_notification_crash = 2012

Notification received from Godot's crash handler when the engine is about to crash. Implemented on desktop platforms, if the crash handler is enabled.

const node_notification_os_ime_update = 2013

Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). Implemented only on macOS.

const node_notification_application_resumed = 2014

Notification received from the OS when the application is resumed. Specific to the Android and iOS platforms.

const node_notification_application_paused = 2015

Notification received from the OS when the application is paused. Specific to the Android and iOS platforms. [b]Note:[/b] On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it.

const node_notification_application_focus_in = 2016

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. Implemented on desktop and mobile platforms.

const node_notification_application_focus_out = 2017

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. Implemented on desktop and mobile platforms.

const node_notification_text_server_changed = 2018

Notification received when the [TextServer] is changed.

const node_notification_accessibility_update = 3000

Notification received when an accessibility information update is required.

const node_notification_accessibility_invalidate = 3001

Notification received when accessibility elements are invalidated. All node accessibility elements are automatically deleted after receiving this message, therefore all existing references to such elements should be discarded.

const object_notification_postinitialize = 0

Notification received when the object is initialized, before its script is attached. Used internally.

const object_notification_predelete = 1

Notification received when the object is about to be deleted. Can be used like destructors in object-oriented programming languages.

const object_notification_extension_reloaded = 2

Notification received when the object finishes hot reloading. This notification is only sent for extensions classes and derived.

const projection_identity = Projection{Vector4{1, 0, 0, 0}, Vector4{0, 1, 0, 0}, Vector4{0, 0, 1, 0}, Vector4{0, 0, 0, 1}}

A [Projection] with no transformation defined. When applied to other data structures, no transformation is performed.

const projection_zero = Projection{Vector4{0, 0, 0, 0}, Vector4{0, 0, 0, 0}, Vector4{0, 0, 0, 0}, Vector4{0, 0, 0, 0}}

A [Projection] with all values initialized to 0. When applied to other data structures, they will be zeroed.

const rdframebufferpass_attachment_unused = -1

Attachment is unused.

const renderingserver_no_index_array = -1

Marks an error that shows that the index array is empty.

const renderingserver_array_weights_size = 4

Number of weights/bones per vertex.

const renderingserver_canvas_item_z_min = -4096

The minimum Z-layer for canvas items.

const renderingserver_canvas_item_z_max = 4096

The maximum Z-layer for canvas items.

const renderingserver_canvas_layer_min = -2147483648

The minimum canvas layer.

const renderingserver_canvas_layer_max = 2147483647

The maximum canvas layer.

const renderingserver_max_glow_levels = 7

The maximum number of glow levels that can be used with the glow post-processing effect.

const renderingserver_max_cursors = 8
const renderingserver_max_2d_directional_lights = 8

The maximum number of directional lights that can be rendered at a given time in 2D.

const renderingserver_max_mesh_surfaces = 256

The maximum number of surfaces a mesh can have.

const renderingserver_material_render_priority_min = -128

The minimum renderpriority of all materials.

const renderingserver_material_render_priority_max = 127

The maximum renderpriority of all materials.

const renderingserver_array_custom_count = 4

The number of custom data arrays available ([constant ARRAY_CUSTOM0], [constant ARRAY_CUSTOM1], [constant ARRAY_CUSTOM2], [constant ARRAY_CUSTOM3]).

const renderingserver_particles_emit_flag_position = 1
const renderingserver_particles_emit_flag_rotation_scale = 2
const renderingserver_particles_emit_flag_velocity = 4
const renderingserver_particles_emit_flag_color = 8
const renderingserver_particles_emit_flag_custom = 16
const skeleton3d_notification_update_skeleton = 50

Notification received when this skeleton's pose needs to be updated. In that case, this is called only once per frame in a deferred process.

const transform2d_identity = Transform2D{Vector2{1, 0}, Vector2{0, 1}, Vector2{0, 0}}

The identity [Transform2D]. This is a transform with no translation, no rotation, and a scale of [constant Vector2.ONE]. This also means that:- The [member x] points right ([constant Vector2.RIGHT]);

  • The [member y] points down ([constant Vector2.DOWN]).
var transform = Transform2D.IDENTITY
print('| X | Y | Origin')
print('| %.f | %.f | %.f' % [transform.x.x, transform.y.x, transform.origin.x])
print('| %.f | %.f | %.f' % [transform.x.y, transform.y.y, transform.origin.y])
########

If a [Vector2], a [Rect2], a [PackedVector2Array], or another [Transform2D] is transformed (multiplied) by this constant, no transformation occurs. [b]Note:[/b] In GDScript, this constant is equivalent to creating a [constructor Transform2D] without any arguments. It can be used to make your code clearer, and for consistency with C#.

const transform2d_flip_x = Transform2D{Vector2{-1, 0}, Vector2{0, 1}, Vector2{0, 0}}

When any transform is multiplied by [constant FLIP_X], it negates all components of the [member x] axis (the X column). When [constant FLIP_X] is multiplied by any transform, it negates the [member Vector2.x] component of all axes (the X row).

const transform2d_flip_y = Transform2D{Vector2{1, 0}, Vector2{0, -1}, Vector2{0, 0}}

When any transform is multiplied by [constant FLIP_Y], it negates all components of the [member y] axis (the Y column). When [constant FLIP_Y] is multiplied by any transform, it negates the [member Vector2.y] component of all axes (the Y row).

const vector2_zero = Vector2{0, 0}

Zero vector, a vector with all components set to 0.

const vector2_one = Vector2{1, 1}

One vector, a vector with all components set to 1.

const vector2_inf = Vector2{max_i32, max_i32}

Infinity vector, a vector with all components set to [constant @GDScript.INF].

const vector2_left = Vector2{-1, 0}

Left unit vector. Represents the direction of left.

const vector2_right = Vector2{1, 0}

Right unit vector. Represents the direction of right.

const vector2_up = Vector2{0, -1}

Up unit vector. Y is down in 2D, so this vector points -Y.

const vector2_down = Vector2{0, 1}

Down unit vector. Y is down in 2D, so this vector points +Y.

const vector3_zero = Vector3{0, 0, 0}

Zero vector, a vector with all components set to 0.

const vector3_one = Vector3{1, 1, 1}

One vector, a vector with all components set to 1.

const vector3_inf = Vector3{max_i32, max_i32, max_i32}

Infinity vector, a vector with all components set to [constant @GDScript.INF].

const vector3_left = Vector3{-1, 0, 0}

Left unit vector. Represents the local direction of left, and the global direction of west.

const vector3_right = Vector3{1, 0, 0}

Right unit vector. Represents the local direction of right, and the global direction of east.

const vector3_up = Vector3{0, 1, 0}

Up unit vector.

const vector3_down = Vector3{0, -1, 0}

Down unit vector.

const vector3_forward = Vector3{0, 0, -1}

Forward unit vector. Represents the local direction of forward, and the global direction of north. Keep in mind that the forward direction for lights, cameras, etc is different from 3D assets like characters, which face towards the camera by convention. Use [constant Vector3.MODEL_FRONT] and similar constants when working in 3D asset space.

const vector3_back = Vector3{0, 0, 1}

Back unit vector. Represents the local direction of back, and the global direction of south.

const vector3_model_left = Vector3{1, 0, 0}

Unit vector pointing towards the left side of imported 3D assets.

const vector3_model_right = Vector3{-1, 0, 0}

Unit vector pointing towards the right side of imported 3D assets.

const vector3_model_top = Vector3{0, 1, 0}

Unit vector pointing towards the top side (up) of imported 3D assets.

const vector3_model_bottom = Vector3{0, -1, 0}

Unit vector pointing towards the bottom side (down) of imported 3D assets.

const vector3_model_front = Vector3{0, 0, 1}

Unit vector pointing towards the front side (facing forward) of imported 3D assets.

const vector3_model_rear = Vector3{0, 0, -1}

Unit vector pointing towards the rear side (back) of imported 3D assets.

const vector4_zero = Vector4{0, 0, 0, 0}

Zero vector, a vector with all components set to 0.

const vector4_one = Vector4{1, 1, 1, 1}

One vector, a vector with all components set to 1.

const vector4_inf = Vector4{max_i32, max_i32, max_i32, max_i32}

Infinity vector, a vector with all components set to [constant @GDScript.INF].

const visualshader_node_id_invalid = -1

Indicates an invalid [VisualShader] node.

const visualshader_node_id_output = 0

Indicates an output node of [VisualShader].

fn abs #

fn abs(x_ ToVariant) Variant

Returns the absolute value of a [Variant] parameter [param x] (i.e. non-negative value). Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].

var a = abs(-1)
##
var b = abs(-1.2)
##
var c = abs(Vector2(-3.5, -4))
##
var d = abs(Vector2i(-5, -6))
##
var e = abs(Vector3(-7, 8.5, -3.8))
##
var f = abs(Vector3i(-7, -8, -9))
##

[b]Note:[/b] For better type safety, use [method absf], [method absi], [method Vector2.abs], [method Vector2i.abs], [method Vector3.abs], [method Vector3i.abs], [method Vector4.abs], or [method Vector4i.abs].

fn absf #

fn absf(x f64) f64

Returns the absolute value of float parameter [param x] (i.e. positive value).

##var a = absf(-1.2)

fn absi #

fn absi(x i64) i64

Returns the absolute value of int parameter [param x] (i.e. positive value).

##var a = absi(-1)

fn acos #

fn acos(x f64) f64

Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] will be clamped between -1.0 and 1.0 (inclusive), in order to prevent [method acos] from returning [constant @GDScript.NAN].

##var c = acos(0.866025)

fn acosh #

fn acosh(x f64) f64

Returns the hyperbolic arc (also called inverse) cosine of [param x], returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if [param x] is larger or equal to 1. For values of [param x] lower than 1, it will return 0, in order to prevent [method acosh] from returning [constant @GDScript.NAN].

var a = acosh(2) ##cosh(a) ##
var b = acosh(-1) ##

fn angle_difference #

fn angle_difference(from f64, to f64) f64

Returns the difference between the two angles (in radians), in the range of [-PI, +PI]. When [param from] and [param to] are opposite, returns -PI if [param from] is smaller than [param to], or PI otherwise.

fn asin #

fn asin(x f64) f64

Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] will be clamped between -1.0 and 1.0 (inclusive), in order to prevent [method asin] from returning [constant @GDScript.NAN].

##var s = asin(0.5)

fn asinh #

fn asinh(x f64) f64

Returns the hyperbolic arc (also called inverse) sine of [param x], returning a value in radians. Use it to get the angle from an angle's sine in hyperbolic space.

var a = asinh(0.9) ##sinh(a) ##

fn atan #

fn atan(x f64) f64

Returns the arc tangent of [param x] in radians. Use it to get the angle from an angle's tangent in trigonometry. The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both y and [code skip-lint]x`.

var a = atan(0.5) ##

If [param x] is between -PI / 2 and PI / 2 (inclusive), atan(tan(x)) is equal to [param x].

fn atan2 #

fn atan2(y f64, x f64) f64

Returns the arc tangent of y/x in radians. Use to get the angle of tangent y/x. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant. Important note: The Y coordinate comes first, by convention.

var a = atan2(0, -1) ##

fn atanh #

fn atanh(x f64) f64

Returns the hyperbolic arc (also called inverse) tangent of [param x], returning a value in radians. Use it to get the angle from an angle's tangent in hyperbolic space if [param x] is between -1 and 1 (non-inclusive). In mathematics, the inverse hyperbolic tangent is only defined for -1 < [param x] < 1 in the real set, so values equal or lower to -1 for [param x] return negative [constant @GDScript.INF] and values equal or higher than 1 return positive [constant @GDScript.INF] in order to prevent [method atanh] from returning [constant @GDScript.NAN].

var a = atanh(0.9) ##tanh(a) ##
var b = atanh(-2) ##tanh(b) ##

fn bezier_derivative #

fn bezier_derivative(start f64, control_1 f64, control_2 f64, end f64, t f64) f64

Returns the derivative at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.

fn bezier_interpolate #

fn bezier_interpolate(start f64, control_1 f64, control_2 f64, end f64, t f64) f64

Returns the point at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.

fn bytes_to_var #

fn bytes_to_var(bytes PackedByteArray) Variant

Decodes a byte array back to a [Variant] value, without decoding objects. [b]Note:[/b] If you need object deserialization, see [method bytes_to_var_with_objects].

fn bytes_to_var_with_objects #

fn bytes_to_var_with_objects(bytes PackedByteArray) Variant

Decodes a byte array back to a [Variant] value. Decoding objects is allowed. [b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).

fn ceil #

fn ceil(x_ ToVariant) Variant

Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].

var i = ceil(1.45) ##i = ceil(1.001)    ##

See also [method floor], [method round], and [method snapped]. [b]Note:[/b] For better type safety, use [method ceilf], [method ceili], [method Vector2.ceil], [method Vector3.ceil], or [method Vector4.ceil].

fn ceilf #

fn ceilf(x f64) f64

Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. A type-safe version of [method ceil], returning a [float].

fn ceili #

fn ceili(x f64) i64

Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. A type-safe version of [method ceil], returning an [int].

fn clamp #

fn clamp(value_ ToVariant, min_ ToVariant, max_ ToVariant) Variant

Clamps the [param value], returning a [Variant] not less than [param min] and not more than [param max]. Any values that can be compared with the less than and greater than operators will work.

var a = clamp(-10, -1, 5)
##
var b = clamp(8.1, 0.9, 5.5)
##

[b]Note:[/b] For better type safety, use [method clampf], [method clampi], [method Vector2.clamp], [method Vector2i.clamp], [method Vector3.clamp], [method Vector3i.clamp], [method Vector4.clamp], [method Vector4i.clamp], or [method Color.clamp] (not currently supported by this method). [b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise clamping, and will pick [param min] if value < min or [param max] if value > max. To perform component-wise clamping use the methods listed above.

fn clampf #

fn clampf(value f64, min f64, max f64) f64

Clamps the [param value], returning a [float] not less than [param min] and not more than [param max].

var speed = 42.1
var a = clampf(speed, 1.0, 20.5) ##
speed = -10.0
var b = clampf(speed, -1.0, 1.0) ##

fn clampi #

fn clampi(value i64, min i64, max i64) i64

Clamps the [param value], returning an [int] not less than [param min] and not more than [param max].

var speed = 42
var a = clampi(speed, 1, 20) ##
speed = -10
var b = clampi(speed, -1, 1) ##

fn cos #

fn cos(angle_rad f64) f64

Returns the cosine of angle [param angle_rad] in radians.

cos(PI * 2)         ##cos(PI)             ##cos(deg_to_rad(90)) ##

fn cosh #

fn cosh(x f64) f64

Returns the hyperbolic cosine of [param x] in radians.

print(cosh(1)) ##

fn cubic_interpolate #

fn cubic_interpolate(from f64, to f64, pre f64, post f64, weight f64) f64

Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values.

fn cubic_interpolate_angle #

fn cubic_interpolate_angle(from f64, to f64, pre f64, post f64, weight f64) f64

Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle].

fn cubic_interpolate_angle_in_time #

fn cubic_interpolate_angle_in_time(from f64, to f64, pre f64, post f64, weight f64, to_t f64, pre_t f64, post_t f64) f64

Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle]. It can perform smoother interpolation than [method cubic_interpolate] by the time values.

fn cubic_interpolate_in_time #

fn cubic_interpolate_in_time(from f64, to f64, pre f64, post f64, weight f64, to_t f64, pre_t f64, post_t f64) f64

Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values. It can perform smoother interpolation than [method cubic_interpolate] by the time values.

fn db_to_linear #

fn db_to_linear(db f64) f64

Converts from decibels to linear energy (audio).

fn deg_to_rad #

fn deg_to_rad(deg f64) f64

Converts an angle expressed in degrees to radians.

var r = deg_to_rad(180) ##

fn ease #

fn ease(x f64, curve f64) f64

Returns an "eased" value of [param x] based on an easing function defined with [param curve]. This easing function is based on an exponent. The [param curve] can be any floating-point number, with specific values leading to the following behaviors: [codeblock lang=text]- Lower than -1.0 (exclusive): Ease in-out

  • -1.0: Linear
  • Between -1.0 and 0.0 (exclusive): Ease out-in
  • 0.0: Constant
  • Between 0.0 to 1.0 (exclusive): Ease out
  • 1.0: Linear
  • Greater than 1.0 (exclusive): Ease in
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
See also [method smoothstep]. If you need to perform more advanced transitions, use [method Tween.interpolate_value].

fn error_string #

fn error_string(error i64) String

Returns a human-readable name for the given [enum Error] code.

print(OK)                              ##print(error_string(OK))                ##print(error_string(ERR_BUSY))          ##print(error_string(ERR_OUT_OF_MEMORY)) ##

fn exp #

fn exp(x f64) f64

The natural exponential function. It raises the mathematical constant [i]e[/i] to the power of [param x] and returns it. [i]e[/i] has an approximate value of 2.71828, and can be obtained with exp(1). For exponents to other bases use the method [method pow].

var a = exp(2) ##

fn f64_from_variant #

fn f64_from_variant(var &Variant) f64

Todo: move to variant

fn f64_to_variant #

fn f64_to_variant(src f64) Variant

Todo: move to variant

fn floor #

fn floor(x_ ToVariant) Variant

Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].

var a = floor(2.99) ##a = floor(-2.99)    ##

See also [method ceil], [method round], and [method snapped]. [b]Note:[/b] For better type safety, use [method floorf], [method floori], [method Vector2.floor], [method Vector3.floor], or [method Vector4.floor].

fn floorf #

fn floorf(x f64) f64

Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. A type-safe version of [method floor], returning a [float].

fn floori #

fn floori(x f64) i64

Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. A type-safe version of [method floor], returning an [int]. [b]Note:[/b] This function is [i]not[/i] the same as int(x), which rounds towards 0.

fn fmod #

fn fmod(x f64, y f64) f64

Returns the floating-point remainder of [param x] divided by [param y], keeping the sign of [param x].

var remainder = fmod(7, 5.5) ##

For the integer remainder operation, use the % operator.

fn fposmod #

fn fposmod(x f64, y f64) f64

Returns the floating-point modulus of [param x] divided by [param y], wrapping equally in positive and negative.

print(' (x)  (fmod(x, 1.5))   (fposmod(x, 1.5))')
for i in 7:
var x = i * 0.5 - 1.5
print('%4.1f           %4.1f  | %4.1f' % [x, fmod(x, 1.5), fposmod(x, 1.5)])

Prints: [codeblock lang=text] (x) (fmod(x, 1.5)) (fposmod(x, 1.5)) -1.5 -0.0 | 0.0 -1.0 -1.0 | 0.5 -0.5 -0.5 | 1.0 0.0 0.0 | 0.0 0.5 0.5 | 0.5 1.0 1.0 | 1.0 1.5 0.0 | 0.0

fn gd_typeof #

fn gd_typeof(variable_ ToVariant) i64

Returns the internal type of the given [param variable], using the [enum Variant.Type] values.

var json = JSON.new()
json.parse('["a", "b", "c"]')
var result = json.get_data()
if result is Array:
print(result[0]) ##else:
print('Unexpected result!')

See also [method type_string].

fn hash #

fn hash(variable_ ToVariant) i64

Returns the integer hash of the passed [param variable]. [codeblocks] [gdscript] print(hash("a")) # Prints 177670 [/gdscript] [csharp] GD.Print(GD.Hash("a")); // Prints 177670 [/csharp] [/codeblocks]

fn i64_from_variant #

fn i64_from_variant(var &Variant) i64

Todo: move to variant

fn i64_to_variant #

fn i64_to_variant(src i64) Variant

Todo: move to variant

fn instance_from_id #

fn instance_from_id(instance_id i64) Object

Returns the [Object] that corresponds to [param instance_id]. All Objects have a unique instance ID. See also [method Object.get_instance_id]. [codeblocks] [gdscript] var drink = "water"

func _ready(): var id = get_instance_id() var instance = instance_from_id(id) print(instance.foo) # Prints "water" [/gdscript] [csharp] public partial class MyNode : Node { public string Drink { get; set; } = "water";

public override void _Ready() { ulong id = GetInstanceId(); var instance = (MyNode)InstanceFromId(Id); GD.Print(instance.Drink); // Prints "water" } } [/csharp] [/codeblocks]

fn inverse_lerp #

fn inverse_lerp(from f64, to f64, weight f64) f64

Returns an interpolation or extrapolation factor considering the range specified in [param from] and [param to], and the interpolated value specified in [param weight]. The returned value will be between 0.0 and 1.0 if [param weight] is between [param from] and [param to] (inclusive). If [param weight] is located outside this range, then an extrapolation factor will be returned (return value lower than 0.0 or greater than 1.0). Use [method clamp] on the result of [method inverse_lerp] if this is not desired.

##var middle = lerp(20, 30, 0.75)
##
##var ratio = inverse_lerp(20, 30, 27.5)
##

See also [method lerp], which performs the reverse of this operation, and [method remap] to map a continuous series of values to another.

fn is_equal_approx #

fn is_equal_approx(a f64, b f64) bool

Returns true if [param a] and [param b] are approximately equal to each other. Here, "approximately equal" means that [param a] and [param b] are within a small internal epsilon of each other, which scales with the magnitude of the numbers. Infinity values of the same sign are considered equal.

fn is_finite #

fn is_finite(x f64) bool

Returns whether [param x] is a finite value, i.e. it is not [constant @GDScript.NAN], positive infinity, or negative infinity. See also [method is_inf] and [method is_nan].

fn is_inf #

fn is_inf(x f64) bool

Returns true if [param x] is either positive infinity or negative infinity. See also [method is_finite] and [method is_nan].

fn is_instance_id_valid #

fn is_instance_id_valid(id i64) bool

Returns true if the Object that corresponds to [param id] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID.

fn is_instance_valid #

fn is_instance_valid(instance_ ToVariant) bool

Returns true if [param instance] is a valid Object (e.g. has not been deleted from memory).

fn is_nan #

fn is_nan(x f64) bool

Returns true if [param x] is a NaN ("Not a Number" or invalid) value. This method is needed as [constant @GDScript.NAN] is not equal to itself, which means x == NAN can't be used to check whether a value is a NaN.

fn is_same #

fn is_same(a_ ToVariant, b_ ToVariant) bool

Returns true, for value types, if [param a] and [param b] share the same value. Returns true, for reference types, if the references of [param a] and [param b] are the same.

##var vec2_a = Vector2(0, 0)
var vec2_b = Vector2(0, 0)
var vec2_c = Vector2(1, 1)
is_same(vec2_a, vec2_a)  #trueis_same(vec2_a, vec2_b)  #trueis_same(vec2_a, vec2_c)  #false
##var arr_a = []
var arr_b = []
is_same(arr_a, arr_a)  #trueis_same(arr_a, arr_b)  #false

These are [Variant] value types: null, [bool], [int], [float], [String], [StringName], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i], [Rect2], [Rect2i], [Transform2D], [Transform3D], [Plane], [Quaternion], [AABB], [Basis], [Projection], [Color], [NodePath], [RID], [Callable] and [Signal]. These are [Variant] reference types: [Object], [Dictionary], [Array], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], [PackedFloat64Array], [PackedStringArray], [PackedVector2Array], [PackedVector3Array], [PackedVector4Array], and [PackedColorArray].

fn is_zero_approx #

fn is_zero_approx(x f64) bool

Returns true if [param x] is zero or almost zero. The comparison is done using a tolerance calculation with a small internal epsilon. This function is faster than using [method is_equal_approx] with one value as zero.

fn lerp #

fn lerp(from_ ToVariant, to_ ToVariant, weight_ ToVariant) Variant

Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between 0.0 and 1.0 (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clampf] to limit [param weight]. Both [param from] and [param to] must be the same type. Supported types: [int], [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis], [Transform2D], [Transform3D].

lerp(0, 4, 0.75) ##

See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep]. See also [method remap] to map a continuous series of values to another. [b]Note:[/b] For better type safety, use [method lerpf], [method Vector2.lerp], [method Vector3.lerp], [method Vector4.lerp], [method Color.lerp], [method Quaternion.slerp], [method Basis.slerp], [method Transform2D.interpolate_with], or [method Transform3D.interpolate_with].

fn lerp_angle #

fn lerp_angle(from f64, to f64, weight f64) f64

Linearly interpolates between two angles (in radians) by a [param weight] value between 0.0 and 1.0. Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU]. To perform eased interpolation with [method lerp_angle], combine it with [method ease] or [method smoothstep].

extends Sprite
var elapsed = 0.0
func _process(delta):
var min_angle = deg_to_rad(0.0)
var max_angle = deg_to_rad(90.0)
rotation = lerp_angle(min_angle, max_angle, elapsed)
elapsed += delta

[b]Note:[/b] This function lerps through the shortest path between [param from] and [param to]. However, when these two angles are approximately PI + k * TAU apart for any integer k, it's not obvious which way they lerp due to floating-point precision errors. For example, lerp_angle(0, PI, weight) lerps counter-clockwise, while lerp_angle(0, PI + 5 * TAU, weight) lerps clockwise.

fn lerpf #

fn lerpf(from f64, to f64, weight f64) f64

Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between 0.0 and 1.0 (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clampf] on the result of this function.

lerpf(0, 4, 0.75) ##

See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep].

fn linear_to_db #

fn linear_to_db(lin f64) f64

Converts from linear energy to decibels (audio). Since volume is not normally linear, this can be used to implement volume sliders that behave as expected. [b]Example:[/b] Change the Master bus's volume through a [Slider] node, which ranges from 0.0 to 1.0:

AudioServer.set_bus_volume_db(AudioServer.get_bus_index('Master'), linear_to_db($Slider.value))

fn log #

fn log(x f64) f64

Returns the [url=https://en.wikipedia.org/wiki/Natural_logarithm]natural logarithm[/url] of [param x] (base [url=https://en.wikipedia.org/wiki/E_(mathematical_constant)][i]e[/i][/url], with [i]e[/i] being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth. [b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. To use base 10 logarithm, use log(x) / log(10).

log(10) ##

[b]Note:[/b] The logarithm of 0 returns -inf, while negative values return -nan.

fn max #

fn max(arg1_ ToVariant, arg2_ ToVariant, varargs ...ToVariant) Variant

Returns the maximum of the given numeric values. This function can take any number of arguments.

max(1, 7, 3, -6, 5) ##

[b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise maximum, and will pick the largest value when compared using x < y. To perform component-wise maximum, use [method Vector2.max], [method Vector2i.max], [method Vector3.max], [method Vector3i.max], [method Vector4.max], and [method Vector4i.max].

fn maxf #

fn maxf(a f64, b f64) f64

Returns the maximum of two [float] values.

maxf(3.6, 24)   ##maxf(-3.99, -4) ##

fn maxi #

fn maxi(a i64, b i64) i64

Returns the maximum of two [int] values.

maxi(1, 2)   ##maxi(-3, -4) ##

fn min #

fn min(arg1_ ToVariant, arg2_ ToVariant, varargs ...ToVariant) Variant

Returns the minimum of the given numeric values. This function can take any number of arguments.

min(1, 7, 3, -6, 5) ##

[b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise minimum, and will pick the smallest value when compared using x < y. To perform component-wise minimum, use [method Vector2.min], [method Vector2i.min], [method Vector3.min], [method Vector3i.min], [method Vector4.min], and [method Vector4i.min].

fn minf #

fn minf(a f64, b f64) f64

Returns the minimum of two [float] values.

minf(3.6, 24)   ##minf(-3.99, -4) ##

fn mini #

fn mini(a i64, b i64) i64

Returns the minimum of two [int] values.

mini(1, 2)   ##mini(-3, -4) ##

fn move_toward #

fn move_toward(from f64, to f64, delta f64) f64

Moves [param from] toward [param to] by the [param delta] amount. Will not go past [param to]. Use a negative [param delta] value to move away.

move_toward(5, 10, 4)    ##move_toward(10, 5, 4)    ##move_toward(5, 10, 9)    ##move_toward(10, 5, -1.5) ##

fn nearest_po2 #

fn nearest_po2(value i64) i64

Returns the smallest integer power of 2 that is greater than or equal to [param value].

nearest_po2(3) ##nearest_po2(4) ##nearest_po2(5) ##
nearest_po2(0)  ##nearest_po2(-1) ##

[b]Warning:[/b] Due to its implementation, this method returns 0 rather than 1 for values less than or equal to 0, with an exception for [param value] being the smallest negative 64-bit integer (-9223372036854775808) in which case the [param value] is returned unchanged.

fn p #

fn p(args ...Stringy)

fn pingpong #

fn pingpong(value f64, length f64) f64

Wraps [param value] between 0 and the [param length]. If the limit is reached, the next value the function returns is decreased to the 0 side or increased to the [param length] side (like a triangle wave). If [param length] is less than zero, it becomes positive.

pingpong(-3.0, 3.0) ##pingpong(-2.0, 3.0) ##pingpong(-1.0, 3.0) ##pingpong(0.0, 3.0)  ##pingpong(1.0, 3.0)  ##pingpong(2.0, 3.0)  ##pingpong(3.0, 3.0)  ##pingpong(4.0, 3.0)  ##pingpong(5.0, 3.0)  ##pingpong(6.0, 3.0)  ##

fn posmod #

fn posmod(x i64, y i64) i64

Returns the integer modulus of [param x] divided by [param y] that wraps equally in positive and negative.

print('#(i)  (i % 3)   (posmod(i, 3))')
for i in range(-3, 4):
print('%2d       %2d  | %2d' % [i, i % 3, posmod(i, 3)])

Prints: [codeblock lang=text] (i) (i % 3) (posmod(i, 3)) -3 0 | 0 -2 -2 | 1 -1 -1 | 2 0 0 | 0 1 1 | 1 2 2 | 2 3 0 | 0

fn pow #

fn pow(base f64, exp f64) f64

Returns the result of [param base] raised to the power of [param exp]. In GDScript, this is the equivalent of the ** operator.

pow(2, 5)   ##pow(4, 1.5) ##

fn print #

fn print(arg1_ ToVariant, varargs ...ToVariant)

Converts one or more arguments of any type to string in the best way possible and prints them to the console. [codeblocks] [gdscript] var a = [1, 2, 3] print("a", "b", a) # Prints "ab[1, 2, 3]" [/gdscript] [csharp] Godot.Collections.Array a = [1, 2, 3]; GD.Print("a", "b", a); // Prints "ab[1, 2, 3]" [/csharp] [/codeblocks] [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also [member Engine.print_to_stdout] and [member ProjectSettings.application/run/disable_stdout].

fn printerr #

fn printerr(arg1_ ToVariant, varargs ...ToVariant)

Prints one or more arguments to strings in the best way possible to standard error line. [codeblocks] [gdscript] printerr("prints to stderr") [/gdscript] [csharp] GD.PrintErr("prints to stderr"); [/csharp] [/codeblocks]

fn printraw #

fn printraw(arg1_ ToVariant, varargs ...ToVariant)

Prints one or more arguments to strings in the best way possible to the OS terminal. Unlike [method print], no newline is automatically added at the end. [b]Note:[/b] The OS terminal is [i]not[/i] the same as the editor's Output dock. The output sent to the OS terminal can be seen when running Godot from a terminal. On Windows, this requires using the console.exe executable. [codeblocks] [gdscript]# Prints "ABC" to terminal.printraw("A") printraw("B") printraw("C") [/gdscript] [csharp] // Prints "ABC" to terminal. GD.PrintRaw("A"); GD.PrintRaw("B"); GD.PrintRaw("C"); [/csharp] [/codeblocks]

fn prints #

fn prints(arg1_ ToVariant, varargs ...ToVariant)

Prints one or more arguments to the console with a space between each argument. [codeblocks] [gdscript] prints("A", "B", "C") # Prints "A B C" [/gdscript] [csharp] GD.PrintS("A", "B", "C"); // Prints "A B C" [/csharp] [/codeblocks]

fn printt #

fn printt(arg1_ ToVariant, varargs ...ToVariant)

Prints one or more arguments to the console with a tab between each argument. [codeblocks] [gdscript] printt("A", "B", "C") # Prints "A B C" [/gdscript] [csharp] GD.PrintT("A", "B", "C"); // Prints "A B C" [/csharp] [/codeblocks]

fn pt #

fn pt(args ...Stringy)

fn push_error #

fn push_error(arg1_ ToVariant, varargs ...ToVariant)

Pushes an error message to Godot's built-in debugger and to the OS terminal. [codeblocks] [gdscript] push_error("test error") # Prints "test error" to debugger and terminal as an error. [/gdscript] [csharp] GD.PushError("test error"); // Prints "test error" to debugger and terminal as an error. [/csharp] [/codeblocks] [b]Note:[/b] This function does not pause project execution. To print an error message and pause project execution in debug builds, use assert(false, "test error") instead.

fn push_warning #

fn push_warning(arg1_ ToVariant, varargs ...ToVariant)

Pushes a warning message to Godot's built-in debugger and to the OS terminal. [codeblocks] [gdscript] push_warning("test warning") # Prints "test warning" to debugger and terminal as a warning. [/gdscript] [csharp] GD.PushWarning("test warning"); // Prints "test warning" to debugger and terminal as a warning. [/csharp] [/codeblocks]

fn rad_to_deg #

fn rad_to_deg(rad f64) f64

Converts an angle expressed in radians to degrees.

rad_to_deg(0.523599) ##rad_to_deg(PI)       ##rad_to_deg(PI * 2)   ##

fn rand_from_seed #

fn rand_from_seed(seed i64) PackedInt64Array

Given a [param seed], returns a [PackedInt64Array] of size 2, where its first element is the randomized [int] value, and the second element is the same as [param seed]. Passing the same [param seed] consistently returns the same array. [b]Note:[/b] "Seed" here refers to the internal state of the pseudo random number generator, currently implemented as a 64 bit integer.

var a = rand_from_seed(4)

print(a[0]) ##print(a[1]) ##

fn randf #

fn randf() f64

Returns a random floating-point value between 0.0 and 1.0 (inclusive). [codeblocks] [gdscript] randf() # Returns e.g. 0.375671 [/gdscript] [csharp] GD.Randf(); // Returns e.g. 0.375671 [/csharp] [/codeblocks]

fn randf_range #

fn randf_range(from f64, to f64) f64

Returns a random floating-point value between [param from] and [param to] (inclusive). [codeblocks] [gdscript] randf_range(0, 20.5) # Returns e.g. 7.45315 randf_range(-10, 10) # Returns e.g. -3.844535 [/gdscript] [csharp] GD.RandRange(0.0, 20.5); // Returns e.g. 7.45315 GD.RandRange(-10.0, 10.0); // Returns e.g. -3.844535 [/csharp] [/codeblocks]

fn randfn #

fn randfn(mean f64, deviation f64) f64

Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url], pseudo-random floating-point value from the specified [param mean] and a standard [param deviation]. This is also known as a Gaussian distribution. [b]Note:[/b] This method uses the [url=https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform]Box-Muller transform[/url] algorithm.

fn randi #

fn randi() i64

Returns a random unsigned 32-bit integer. Use remainder to obtain a random value in the interval [0, N - 1] (where N is smaller than 2^32). [codeblocks] [gdscript] randi() # Returns random integer between 0 and 2^32 - 1 randi() % 20 # Returns random integer between 0 and 19 randi() % 100 # Returns random integer between 0 and 99 randi() % 100 + 1 # Returns random integer between 1 and 100 [/gdscript] [csharp] GD.Randi(); // Returns random integer between 0 and 2^32 - 1 GD.Randi() % 20; // Returns random integer between 0 and 19 GD.Randi() % 100; // Returns random integer between 0 and 99 GD.Randi() % 100 + 1; // Returns random integer between 1 and 100 [/csharp] [/codeblocks]

fn randi_range #

fn randi_range(from i64, to i64) i64

Returns a random signed 32-bit integer between [param from] and [param to] (inclusive). If [param to] is lesser than [param from], they are swapped. [codeblocks] [gdscript] randi_range(0, 1) # Returns either 0 or 1 randi_range(-10, 1000) # Returns random integer between -10 and 1000 [/gdscript] [csharp] GD.RandRange(0, 1); // Returns either 0 or 1 GD.RandRange(-10, 1000); // Returns random integer between -10 and 1000 [/csharp] [/codeblocks]

fn randomize #

fn randomize()

Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time. [b]Note:[/b] This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use [method seed] to initialize the random number generator.

fn remap #

fn remap(value f64, istart f64, istop f64, ostart f64, ostop f64) f64

Maps a [param value] from range [istart, istop] to [ostart, ostop]. See also [method lerp] and [method inverse_lerp]. If [param value] is outside [istart, istop], then the resulting value will also be outside [ostart, ostop]. If this is not desired, use [method clamp] on the result of this function.

remap(75, 0, 100, -1, 1) ##

For complex use cases where multiple ranges are needed, consider using [Curve] or [Gradient] instead. [b]Note:[/b] If istart == istop, the return value is undefined (most likely NaN, INF, or -INF).

fn rid_allocate_id #

fn rid_allocate_id() i64

Allocates a unique ID which can be used by the implementation to construct an RID. This is used mainly from native extensions to implement servers.

fn rid_from_int64 #

fn rid_from_int64(base i64) RID

Creates an RID from a [param base]. This is used mainly from native extensions to build servers.

fn rotate_toward #

fn rotate_toward(from f64, to f64, delta f64) f64

Rotates [param from] toward [param to] by the [param delta] amount. Will not go past [param to]. Similar to [method move_toward], but interpolates correctly when the angles wrap around [constant @GDScript.TAU]. If [param delta] is negative, this function will rotate away from [param to], toward the opposite angle, and will not go past the opposite angle.

fn round #

fn round(x_ ToVariant) Variant

Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].

round(2.4) ##round(2.5) ##round(2.6) ##

See also [method floor], [method ceil], and [method snapped]. [b]Note:[/b] For better type safety, use [method roundf], [method roundi], [method Vector2.round], [method Vector3.round], or [method Vector4.round].

fn roundf #

fn roundf(x f64) f64

Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0. A type-safe version of [method round], returning a [float].

fn roundi #

fn roundi(x f64) i64

Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0. A type-safe version of [method round], returning an [int].

fn seed #

fn seed(base i64)

Sets the seed for the random number generator to [param base]. Setting the seed manually can ensure consistent, repeatable results for most random functions. [codeblocks] [gdscript] var my_seed = "Godot Rocks".hash() seed(my_seed) var a = randf() + randi() seed(my_seed) var b = randf() + randi()# a and b are now identical[/gdscript] [csharp] ulong mySeed = (ulong)GD.Hash("Godot Rocks"); GD.Seed(mySeed); var a = GD.Randf() + GD.Randi(); GD.Seed(mySeed); var b = GD.Randf() + GD.Randi(); // a and b are now identical [/csharp] [/codeblocks]

fn sign #

fn sign(x_ ToVariant) Variant

Returns the same type of [Variant] as [param x], with -1 for negative values, 1 for positive values, and 0 for zeros. For nan values it returns 0. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].

sign(-6.0) ##sign(0.0)  ##sign(6.0)  ##sign(NAN)  ##
sign(Vector3(-6.0, 0.0, 6.0)) ##

[b]Note:[/b] For better type safety, use [method signf], [method signi], [method Vector2.sign], [method Vector2i.sign], [method Vector3.sign], [method Vector3i.sign], [method Vector4.sign], or [method Vector4i.sign].

fn signf #

fn signf(x f64) f64

Returns -1.0 if [param x] is negative, 1.0 if [param x] is positive, and 0.0 if [param x] is zero. For nan values of [param x] it returns 0.0.

signf(-6.5) ##signf(0.0)  ##signf(6.5)  ##signf(NAN)  ##

fn signi #

fn signi(x i64) i64

Returns -1 if [param x] is negative, 1 if [param x] is positive, and 0 if [param x] is zero.

signi(-6) ##signi(0)  ##signi(6)  ##

fn sin #

fn sin(angle_rad f64) f64

Returns the sine of angle [param angle_rad] in radians.

sin(0.523599)       ##sin(deg_to_rad(90)) ##

fn sinh #

fn sinh(x f64) f64

Returns the hyperbolic sine of [param x].

var a = log(2.0) ##sinh(a) ##

fn smoothstep #

fn smoothstep(from f64, to f64, x f64) f64

Returns a smooth cubic Hermite interpolation between 0 and 1. For positive ranges (when from <= to) the return value is 0 when x <= from, and 1 when x >= to. If [param x] lies between [param from] and [param to], the return value follows an S-shaped curve that smoothly transitions from 0 to 1. For negative ranges (when from > to) the function is mirrored and returns 1 when x <= to and 0 when x >= from. This S-shaped curve is the cubic Hermite interpolator, given by f(y) = 3*y^2 - 2*y^3 where y = (x-from) / (to-from).

smoothstep(0, 2, -5.0) ##smoothstep(0, 2, 0.5) ##smoothstep(0, 2, 1.0) ##smoothstep(0, 2, 2.0) ##

Compared to [method ease] with a curve value of -1.6521, [method smoothstep] returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer]. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png]Comparison between smoothstep() and ease(x, -1.6521) return values[/url] [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_range.webp]Smoothstep() return values with positive, zero, and negative ranges[/url]

fn snapped #

fn snapped(x_ ToVariant, step_ ToVariant) Variant

Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating-point number to an arbitrary number of decimals. The returned value is the same type of [Variant] as [param step]. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].

snapped(100, 32)  ##snapped(3.14159, 0.01)  ##
snapped(Vector2(34, 70), Vector2(8, 8))  ##

See also [method ceil], [method floor], and [method round]. [b]Note:[/b] For better type safety, use [method snappedf], [method snappedi], [method Vector2.snapped], [method Vector2i.snapped], [method Vector3.snapped], [method Vector3i.snapped], [method Vector4.snapped], or [method Vector4i.snapped].

fn snappedf #

fn snappedf(x f64, step f64) f64

Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating-point number to an arbitrary number of decimals. A type-safe version of [method snapped], returning a [float].

snappedf(32.0, 2.5)  ##snappedf(3.14159, 0.01)  ##

fn snappedi #

fn snappedi(x f64, step i64) i64

Returns the multiple of [param step] that is the closest to [param x]. A type-safe version of [method snapped], returning an [int].

snappedi(53, 16)  ##snappedi(4096, 100)  ##

fn sqrt #

fn sqrt(x f64) f64

Returns the square root of [param x], where [param x] is a non-negative number.

sqrt(9)     ##sqrt(10.24) ##sqrt(-1)    ##

[b]Note:[/b] Negative values of [param x] return NaN ("Not a Number"). In C#, if you need negative inputs, use System.Numerics.Complex.

fn step_decimals #

fn step_decimals(x f64) i64

Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.

var n = step_decimals(5)       ##n = step_decimals(1.0005)      ##n = step_decimals(0.000000005) ##

fn str #

fn str(arg1_ ToVariant, varargs ...ToVariant) String

Converts one or more arguments of any [Variant] type to a [String] in the best way possible.

var a = [10, 20, 30]
var b = str(a)
print(len(a)) ##print(len(b)) ##

fn str_to_var #

fn str_to_var(gd_string String) Variant

Converts a formatted [param string] that was returned by [method var_to_str] to the original [Variant]. [codeblocks] [gdscript] var data = '{ "a": 1, "b": 2 }' # data is a String var dict = str_to_var(data) # dict is a Dictionary print(dict["a"]) # Prints 1 [/gdscript] [csharp] string data = "{ "a": 1, "b": 2 }"; // data is a string var dict = GD.StrToVar(data).AsGodotDictionary(); // dict is a Dictionary GD.Print(dict["a"]); // Prints 1 [/csharp] [/codeblocks]

fn tan #

fn tan(angle_rad f64) f64

Returns the tangent of angle [param angle_rad] in radians.

tan(deg_to_rad(45)) ##

fn tanh #

fn tanh(x f64) f64

Returns the hyperbolic tangent of [param x].

var a = log(2.0) ##tanh(a)          ##

fn type_convert #

fn type_convert(variant_ ToVariant, gd_type i64) Variant

Converts the given [param variant] to the given [param type], using the [enum Variant.Type] values. This method is generous with how it handles types, it can automatically convert between array types, convert numeric [String]s to [int], and converting most things to [String]. If the type conversion cannot be done, this method will return the default value for that type, for example converting [Rect2] to [Vector2] will always return [constant Vector2.ZERO]. This method will never show error messages as long as [param type] is a valid Variant type. The returned value is a [Variant], but the data inside and its type will be the same as the requested type.

type_convert('Hi!', TYPE_INT) ##type_convert('123', TYPE_INT) ##type_convert(123.4, TYPE_INT) ##type_convert(5, TYPE_VECTOR2) ##type_convert('Hi!', TYPE_NIL) ##

fn type_string #

fn type_string(gd_type i64) String

Returns a human-readable name of the given [param type], using the [enum Variant.Type] values.

print(TYPE_INT) ##print(type_string(TYPE_INT)) ##print(type_string(TYPE_STRING)) ##

See also [method typeof].

fn var_to_bytes #

fn var_to_bytes(variable_ ToVariant) PackedByteArray

Encodes a [Variant] value to a byte array, without encoding objects. Deserialization can be done with [method bytes_to_var]. [b]Note:[/b] If you need object serialization, see [method var_to_bytes_with_objects]. [b]Note:[/b] Encoding [Callable] is not supported and will result in an empty value, regardless of the data.

fn var_to_bytes_with_objects #

fn var_to_bytes_with_objects(variable_ ToVariant) PackedByteArray

Encodes a [Variant] value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with [method bytes_to_var_with_objects]. [b]Note:[/b] Encoding [Callable] is not supported and will result in an empty value, regardless of the data.

fn var_to_str #

fn var_to_str(variable_ ToVariant) String

Converts a [Variant] [param variable] to a formatted [String] that can then be parsed using [method str_to_var]. [codeblocks] [gdscript] var a = { "a": 1, "b": 2 } print(var_to_str(a)) [/gdscript] [csharp] var a = new Godot.Collections.Dictionary { ["a"] = 1, ["b"] = 2 }; GD.Print(GD.VarToStr(a)); [/csharp] [/codeblocks] Prints: [codeblock lang=text] { "a": 1, "b": 2 }

[b]Note:[/b] Converting [Signal] or [Callable] is not supported and will result in an empty value for these types, regardless of their data.

fn weakref #

fn weakref(obj_ ToVariant) Variant

Returns a [WeakRef] instance holding a weak reference to [param obj]. Returns an empty [WeakRef] instance if [param obj] is null. Prints an error and returns null if [param obj] is neither [Object]-derived nor null. A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.

fn wrap #

fn wrap(value_ ToVariant, min_ ToVariant, max_ ToVariant) Variant

Wraps the [Variant] [param value] between [param min] and [param max]. [param min] is [i]inclusive[/i] while [param max] is [i]exclusive[/i]. This can be used for creating loop-like behavior or infinite surfaces. Variant types [int] and [float] are supported. If any of the arguments is [float], this function returns a [float], otherwise it returns an [int].

var a = wrap(4, 5, 10)
##
var a = wrap(7, 5, 10)
##
var a = wrap(10.5, 5, 10)
##

fn wrapf #

fn wrapf(value f64, min f64, max f64) f64

Wraps the float [param value] between [param min] and [param max]. [param min] is [i]inclusive[/i] while [param max] is [i]exclusive[/i]. This can be used for creating loop-like behavior or infinite surfaces.

##value = wrapf(value + 0.1, 5.0, 10.0)
##angle = wrapf(angle + 0.1, 0.0, TAU)
##angle = wrapf(angle + 0.1, -PI, PI)

[b]Note:[/b] If [param min] is 0, this is equivalent to [method fposmod], so prefer using that instead. [method wrapf] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value.

fn wrapi #

fn wrapi(value i64, min i64, max i64) i64

Wraps the integer [param value] between [param min] and [param max]. [param min] is [i]inclusive[/i] while [param max] is [i]exclusive[/i]. This can be used for creating loop-like behavior or infinite surfaces.

##frame = wrapi(frame + 1, 5, 10)
##var result = wrapi(-6, -5, -1)

fn AABB.new0 #

fn AABB.new0() AABB

Constructs an [AABB] with its [member position] and [member size] set to [constant Vector3.ZERO].

fn AABB.new1 #

fn AABB.new1(from AABB) AABB

Constructs an [AABB] as a copy of the given [AABB].

fn AABB.new2 #

fn AABB.new2(position Vector3, size Vector3) AABB

Constructs an [AABB] by [param position] and [param size].

fn AESContext.new #

fn AESContext.new() AESContext

fn AStar2D.new #

fn AStar2D.new() AStar2D

fn AStar3D.new #

fn AStar3D.new() AStar3D

fn AStarGrid2D.new #

fn AStarGrid2D.new() AStarGrid2D

fn AcceptDialog.new #

fn AcceptDialog.new() AcceptDialog

fn AimModifier3D.new #

fn AimModifier3D.new() AimModifier3D

fn AnimatableBody2D.new #

fn AnimatableBody2D.new() AnimatableBody2D

fn AnimatableBody3D.new #

fn AnimatableBody3D.new() AnimatableBody3D

fn AnimatedSprite2D.new #

fn AnimatedSprite2D.new() AnimatedSprite2D

fn AnimatedSprite3D.new #

fn AnimatedSprite3D.new() AnimatedSprite3D

fn AnimatedTexture.max_frames #

fn AnimatedTexture.max_frames() int

The maximum number of frames supported by [AnimatedTexture]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite2D].

fn AnimatedTexture.new #

fn AnimatedTexture.new() AnimatedTexture

fn Animation.new #

fn Animation.new() Animation

fn AnimationLibrary.new #

fn AnimationLibrary.new() AnimationLibrary

fn AnimationNode.new #

fn AnimationNode.new() AnimationNode

fn AnimationNodeAdd2.new #

fn AnimationNodeAdd2.new() AnimationNodeAdd2

fn AnimationNodeAdd3.new #

fn AnimationNodeAdd3.new() AnimationNodeAdd3

fn AnimationNodeAnimation.new #

fn AnimationNodeAnimation.new() AnimationNodeAnimation

fn AnimationNodeBlend2.new #

fn AnimationNodeBlend2.new() AnimationNodeBlend2

fn AnimationNodeBlend3.new #

fn AnimationNodeBlend3.new() AnimationNodeBlend3

fn AnimationNodeBlendSpace1D.new #

fn AnimationNodeBlendSpace1D.new() AnimationNodeBlendSpace1D

fn AnimationNodeBlendSpace2D.new #

fn AnimationNodeBlendSpace2D.new() AnimationNodeBlendSpace2D

fn AnimationNodeBlendTree.connection_error_connection_exists #

fn AnimationNodeBlendTree.connection_error_connection_exists() int

The specified connection already exists.

fn AnimationNodeBlendTree.connection_error_no_input #

fn AnimationNodeBlendTree.connection_error_no_input() int

The input node is null.

fn AnimationNodeBlendTree.connection_error_no_input_index #

fn AnimationNodeBlendTree.connection_error_no_input_index() int

The specified input port is out of range.

fn AnimationNodeBlendTree.connection_error_no_output #

fn AnimationNodeBlendTree.connection_error_no_output() int

The output node is null.

fn AnimationNodeBlendTree.connection_error_same_node #

fn AnimationNodeBlendTree.connection_error_same_node() int

Input and output nodes are the same.

fn AnimationNodeBlendTree.connection_ok #

fn AnimationNodeBlendTree.connection_ok() int

The connection was successful.

fn AnimationNodeBlendTree.new #

fn AnimationNodeBlendTree.new() AnimationNodeBlendTree

fn AnimationNodeExtension.get_remaining_time #

fn AnimationNodeExtension.get_remaining_time(node_info PackedFloat32Array, break_loop bool) f64

Returns the animation's remaining time for the given node info. For looping animations, it will only return the remaining time if [param break_loop] is true, a large integer value will be returned otherwise.

fn AnimationNodeExtension.is_looping #

fn AnimationNodeExtension.is_looping(node_info PackedFloat32Array) bool

Returns true if the animation for the given [param node_info] is looping.

fn AnimationNodeExtension.new #

fn AnimationNodeExtension.new() AnimationNodeExtension

fn AnimationNodeOneShot.new #

fn AnimationNodeOneShot.new() AnimationNodeOneShot

fn AnimationNodeOutput.new #

fn AnimationNodeOutput.new() AnimationNodeOutput

fn AnimationNodeStateMachine.new #

fn AnimationNodeStateMachine.new() AnimationNodeStateMachine

fn AnimationNodeStateMachinePlayback.new #

fn AnimationNodeStateMachinePlayback.new() AnimationNodeStateMachinePlayback

fn AnimationNodeStateMachineTransition.new #

fn AnimationNodeStateMachineTransition.new() AnimationNodeStateMachineTransition

fn AnimationNodeSub2.new #

fn AnimationNodeSub2.new() AnimationNodeSub2

fn AnimationNodeSync.new #

fn AnimationNodeSync.new() AnimationNodeSync

fn AnimationNodeTimeScale.new #

fn AnimationNodeTimeScale.new() AnimationNodeTimeScale

fn AnimationNodeTimeSeek.new #

fn AnimationNodeTimeSeek.new() AnimationNodeTimeSeek

fn AnimationNodeTransition.new #

fn AnimationNodeTransition.new() AnimationNodeTransition

fn AnimationPlayer.new #

fn AnimationPlayer.new() AnimationPlayer

fn AnimationRootNode.new #

fn AnimationRootNode.new() AnimationRootNode

fn AnimationTree.new #

fn AnimationTree.new() AnimationTree

fn Area2D.new #

fn Area2D.new() Area2D

fn Area3D.new #

fn Area3D.new() Area3D

fn Array.new0 #

fn Array.new0() Array

Constructs an empty [Array].

fn Array.new1 #

fn Array.new1(from Array) Array

Returns the same array as [param from]. If you need a copy of the array, use [method duplicate].

fn Array.new10 #

fn Array.new10(from PackedVector3Array) Array

Constructs an array from a [PackedVector3Array].

fn Array.new11 #

fn Array.new11(from PackedColorArray) Array

Constructs an array from a [PackedColorArray].

fn Array.new12 #

fn Array.new12(from PackedVector4Array) Array

Constructs an array from a [PackedVector4Array].

fn Array.new2 #

fn Array.new2(base Array, gd_type i64, class_name string, script_ ToVariant) Array

Creates a typed array from the [param base] array. A typed array can only contain elements of the given type, or that inherit from the given class, as described by this constructor's parameters:- [param type] is the built-in [Variant] type, as one the [enum Variant.Type] constants.

  • [param class_name] is the built-in class name (see [method Object.get_class]).
  • [param script] is the associated script. It must be a [Script] instance or null.If [param type] is not [constant TYPE_OBJECT], [param class_name] must be an empty [StringName] and [param script] must be null.
class_name Sword
extends Node

class Stats:
pass

func _ready():
var a = Array([], TYPE_INT, '', null)               ##var b = Array([], TYPE_OBJECT, 'Node', null)        ##var c = Array([], TYPE_OBJECT, 'Node', Sword)       ##var d = Array([], TYPE_OBJECT, 'RefCounted', Stats) ##

The [param base] array's elements are converted when necessary. If this is not possible or [param base] is already typed, this constructor fails and returns an empty [Array]. In GDScript, this constructor is usually not necessary, as it is possible to create a typed array through static typing:

var numbers: Array[float] = []
var children: Array[Node] = [$Node, $Sprite2D, $RigidBody3D]

var integers: Array[int] = [0.2, 4.5, -2.0]
print(integers) ##

fn Array.new3 #

fn Array.new3(from PackedByteArray) Array

Constructs an array from a [PackedByteArray].

fn Array.new4 #

fn Array.new4(from PackedInt32Array) Array

Constructs an array from a [PackedInt32Array].

fn Array.new5 #

fn Array.new5(from PackedInt64Array) Array

Constructs an array from a [PackedInt64Array].

fn Array.new6 #

fn Array.new6(from PackedFloat32Array) Array

Constructs an array from a [PackedFloat32Array].

fn Array.new7 #

fn Array.new7(from PackedFloat64Array) Array

Constructs an array from a [PackedFloat64Array].

fn Array.new8 #

fn Array.new8(from PackedStringArray) Array

Constructs an array from a [PackedStringArray].

fn Array.new9 #

fn Array.new9(from PackedVector2Array) Array

Constructs an array from a [PackedVector2Array].

fn ArrayMesh.new #

fn ArrayMesh.new() ArrayMesh

fn ArrayOccluder3D.new #

fn ArrayOccluder3D.new() ArrayOccluder3D

fn AspectRatioContainer.new #

fn AspectRatioContainer.new() AspectRatioContainer

fn AtlasTexture.new #

fn AtlasTexture.new() AtlasTexture

fn AudioBusLayout.new #

fn AudioBusLayout.new() AudioBusLayout

fn AudioEffect.new #

fn AudioEffect.new() AudioEffect

fn AudioEffectAmplify.new #

fn AudioEffectAmplify.new() AudioEffectAmplify

fn AudioEffectBandLimitFilter.new #

fn AudioEffectBandLimitFilter.new() AudioEffectBandLimitFilter

fn AudioEffectBandPassFilter.new #

fn AudioEffectBandPassFilter.new() AudioEffectBandPassFilter

fn AudioEffectCapture.new #

fn AudioEffectCapture.new() AudioEffectCapture

fn AudioEffectChorus.new #

fn AudioEffectChorus.new() AudioEffectChorus

fn AudioEffectCompressor.new #

fn AudioEffectCompressor.new() AudioEffectCompressor

fn AudioEffectDelay.new #

fn AudioEffectDelay.new() AudioEffectDelay

fn AudioEffectDistortion.new #

fn AudioEffectDistortion.new() AudioEffectDistortion

fn AudioEffectEQ.new #

fn AudioEffectEQ.new() AudioEffectEQ

fn AudioEffectEQ10.new #

fn AudioEffectEQ10.new() AudioEffectEQ10

fn AudioEffectEQ21.new #

fn AudioEffectEQ21.new() AudioEffectEQ21

fn AudioEffectEQ6.new #

fn AudioEffectEQ6.new() AudioEffectEQ6

fn AudioEffectFilter.new #

fn AudioEffectFilter.new() AudioEffectFilter

fn AudioEffectHardLimiter.new #

fn AudioEffectHardLimiter.new() AudioEffectHardLimiter

fn AudioEffectHighPassFilter.new #

fn AudioEffectHighPassFilter.new() AudioEffectHighPassFilter

fn AudioEffectHighShelfFilter.new #

fn AudioEffectHighShelfFilter.new() AudioEffectHighShelfFilter

fn AudioEffectInstance.new #

fn AudioEffectInstance.new() AudioEffectInstance

fn AudioEffectLimiter.new #

fn AudioEffectLimiter.new() AudioEffectLimiter

fn AudioEffectLowPassFilter.new #

fn AudioEffectLowPassFilter.new() AudioEffectLowPassFilter

fn AudioEffectLowShelfFilter.new #

fn AudioEffectLowShelfFilter.new() AudioEffectLowShelfFilter

fn AudioEffectNotchFilter.new #

fn AudioEffectNotchFilter.new() AudioEffectNotchFilter

fn AudioEffectPanner.new #

fn AudioEffectPanner.new() AudioEffectPanner

fn AudioEffectPhaser.new #

fn AudioEffectPhaser.new() AudioEffectPhaser

fn AudioEffectPitchShift.new #

fn AudioEffectPitchShift.new() AudioEffectPitchShift

fn AudioEffectRecord.new #

fn AudioEffectRecord.new() AudioEffectRecord

fn AudioEffectReverb.new #

fn AudioEffectReverb.new() AudioEffectReverb

fn AudioEffectSpectrumAnalyzer.new #

fn AudioEffectSpectrumAnalyzer.new() AudioEffectSpectrumAnalyzer

fn AudioEffectStereoEnhance.new #

fn AudioEffectStereoEnhance.new() AudioEffectStereoEnhance

fn AudioListener2D.new #

fn AudioListener2D.new() AudioListener2D

fn AudioListener3D.new #

fn AudioListener3D.new() AudioListener3D

fn AudioSample.new #

fn AudioSample.new() AudioSample

fn AudioSamplePlayback.new #

fn AudioSamplePlayback.new() AudioSamplePlayback

fn AudioServer.new #

fn AudioServer.new() AudioServer

fn AudioServer.singleton #

fn AudioServer.singleton() AudioServer

fn AudioStream.new #

fn AudioStream.new() AudioStream

fn AudioStreamGenerator.new #

fn AudioStreamGenerator.new() AudioStreamGenerator

fn AudioStreamInteractive.clip_any #

fn AudioStreamInteractive.clip_any() int

This constant describes that any clip is valid for a specific transition as either source or destination.

fn AudioStreamInteractive.new #

fn AudioStreamInteractive.new() AudioStreamInteractive

fn AudioStreamMP3.load_from_buffer #

fn AudioStreamMP3.load_from_buffer(stream_data PackedByteArray) AudioStreamMP3

Creates a new [AudioStreamMP3] instance from the given buffer. The buffer must contain MP3 data.

fn AudioStreamMP3.load_from_file #

fn AudioStreamMP3.load_from_file(path string) AudioStreamMP3

Creates a new [AudioStreamMP3] instance from the given file path. The file must be in MP3 format.

fn AudioStreamMP3.new #

fn AudioStreamMP3.new() AudioStreamMP3

fn AudioStreamMicrophone.new #

fn AudioStreamMicrophone.new() AudioStreamMicrophone

fn AudioStreamOggVorbis.load_from_buffer #

fn AudioStreamOggVorbis.load_from_buffer(stream_data PackedByteArray) AudioStreamOggVorbis

Creates a new [AudioStreamOggVorbis] instance from the given buffer. The buffer must contain Ogg Vorbis data.

fn AudioStreamOggVorbis.load_from_file #

fn AudioStreamOggVorbis.load_from_file(path string) AudioStreamOggVorbis

Creates a new [AudioStreamOggVorbis] instance from the given file path. The file must be in Ogg Vorbis format.

fn AudioStreamOggVorbis.new #

fn AudioStreamOggVorbis.new() AudioStreamOggVorbis

fn AudioStreamPlayback.new #

fn AudioStreamPlayback.new() AudioStreamPlayback

fn AudioStreamPlaybackOggVorbis.new #

fn AudioStreamPlaybackOggVorbis.new() AudioStreamPlaybackOggVorbis

fn AudioStreamPlaybackPolyphonic.invalid_id #

fn AudioStreamPlaybackPolyphonic.invalid_id() int

Returned by [method play_stream] in case it could not allocate a stream for playback.

fn AudioStreamPlaybackResampled.new #

fn AudioStreamPlaybackResampled.new() AudioStreamPlaybackResampled

fn AudioStreamPlayer.new #

fn AudioStreamPlayer.new() AudioStreamPlayer

fn AudioStreamPlayer2D.new #

fn AudioStreamPlayer2D.new() AudioStreamPlayer2D

fn AudioStreamPlayer3D.new #

fn AudioStreamPlayer3D.new() AudioStreamPlayer3D

fn AudioStreamPlaylist.max_streams #

fn AudioStreamPlaylist.max_streams() int

Maximum amount of streams supported in the playlist.

fn AudioStreamPlaylist.new #

fn AudioStreamPlaylist.new() AudioStreamPlaylist

fn AudioStreamPolyphonic.new #

fn AudioStreamPolyphonic.new() AudioStreamPolyphonic

fn AudioStreamRandomizer.new #

fn AudioStreamRandomizer.new() AudioStreamRandomizer

fn AudioStreamSynchronized.max_streams #

fn AudioStreamSynchronized.max_streams() int

Maximum amount of streams that can be synchronized.

fn AudioStreamSynchronized.new #

fn AudioStreamSynchronized.new() AudioStreamSynchronized

fn AudioStreamWAV.load_from_buffer #

fn AudioStreamWAV.load_from_buffer(stream_data PackedByteArray, cfg AudioStreamWAV_load_from_buffer_Cfg) AudioStreamWAV

Creates a new [AudioStreamWAV] instance from the given buffer. The buffer must contain WAV data. The keys and values of [param options] match the properties of [ResourceImporterWAV]. The usage of [param options] is identical to [method AudioStreamWAV.load_from_file].

fn AudioStreamWAV.load_from_file #

fn AudioStreamWAV.load_from_file(path string, cfg AudioStreamWAV_load_from_file_Cfg) AudioStreamWAV

Creates a new [AudioStreamWAV] instance from the given file path. The file must be in WAV format. The keys and values of [param options] match the properties of [ResourceImporterWAV]. [b]Example:[/b] Load the first file dropped as a WAV and play it:

@onready var audio_player = $AudioStreamPlayer

func _ready():
get_window().files_dropped.connect(_on_files_dropped)

func _on_files_dropped(files):
if files[0].get_extension() == 'wav':
audio_player.stream = AudioStreamWAV.load_from_file(files[0], {
'force/max_rate': true,
'force/max_rate_hz': 11025
})
audio_player.play()

fn AudioStreamWAV.new #

fn AudioStreamWAV.new() AudioStreamWAV

fn BackBufferCopy.new #

fn BackBufferCopy.new() BackBufferCopy

fn BaseButton.new #

fn BaseButton.new() BaseButton

fn Basis.flip_x #

fn Basis.flip_x() Basis

When any basis is multiplied by [constant FLIP_X], it negates all components of the [member x] axis (the X column). When [constant FLIP_X] is multiplied by any basis, it negates the [member Vector3.x] component of all axes (the X row).

fn Basis.flip_y #

fn Basis.flip_y() Basis

When any basis is multiplied by [constant FLIP_Y], it negates all components of the [member y] axis (the Y column). When [constant FLIP_Y] is multiplied by any basis, it negates the [member Vector3.y] component of all axes (the Y row).

fn Basis.flip_z #

fn Basis.flip_z() Basis

When any basis is multiplied by [constant FLIP_Z], it negates all components of the [member z] axis (the Z column). When [constant FLIP_Z] is multiplied by any basis, it negates the [member Vector3.z] component of all axes (the Z row).

fn Basis.from_euler #

fn Basis.from_euler(euler Vector3, cfg Basis_from_euler_Cfg) Basis

Constructs a new [Basis] that only represents rotation from the given [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians.- The [member Vector3.x] should contain the angle around the [member x] axis (pitch);

  • The [member Vector3.y] should contain the angle around the [member y] axis (yaw);
  • The [member Vector3.z] should contain the angle around the [member z] axis (roll).[codeblocks] [gdscript]# Creates a Basis whose z axis points down.var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0))

print(my_basis.z) # Prints (0.0, -1.0, 0.0) [/gdscript] [csharp] // Creates a Basis whose z axis points down. var myBasis = Basis.FromEuler(new Vector3(Mathf.Tau / 4.0f, 0.0f, 0.0f));

GD.Print(myBasis.Z); // Prints (0, -1, 0) [/csharp] [/codeblocks] The order of each consecutive rotation can be changed with [param order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]): the basis rotates first around the Y axis (yaw), then X (pitch), and lastly Z (roll). When using the opposite method [method get_euler], this order is reversed.

fn Basis.from_scale #

fn Basis.from_scale(scale Vector3) Basis

Constructs a new [Basis] that only represents scale, with no rotation or shear, from the given [param scale] vector. [codeblocks] [gdscript] var my_basis = Basis.from_scale(Vector3(2, 4, 8))

print(my_basis.x) # Prints (2.0, 0.0, 0.0) print(my_basis.y) # Prints (0.0, 4.0, 0.0) print(my_basis.z) # Prints (0.0, 0.0, 8.0) [/gdscript] [csharp] var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f));

GD.Print(myBasis.X); // Prints (2, 0, 0) GD.Print(myBasis.Y); // Prints (0, 4, 0) GD.Print(myBasis.Z); // Prints (0, 0, 8) [/csharp] [/codeblocks] [b]Note:[/b] In linear algebra, the matrix of this basis is also known as a [url=https://en.wikipedia.org/wiki/Diagonal_matrix]diagonal matrix[/url].

fn Basis.identity #

fn Basis.identity() Basis

The identity [Basis]. This is an orthonormal basis with no rotation, no shear, and a scale of [constant Vector3.ONE]. This also means that:- The [member x] points right ([constant Vector3.RIGHT]);

  • The [member y] points up ([constant Vector3.UP]);
  • The [member z] points back ([constant Vector3.BACK]).
var basis = Basis.IDENTITY
print('| X | Y | Z')
print('| %.f | %.f | %.f' % [basis.x.x, basis.y.x, basis.z.x])
print('| %.f | %.f | %.f' % [basis.x.y, basis.y.y, basis.z.y])
print('| %.f | %.f | %.f' % [basis.x.z, basis.y.z, basis.z.z])
##########

If a [Vector3] or another [Basis] is transformed (multiplied) by this constant, no transformation occurs. [b]Note:[/b] In GDScript, this constant is equivalent to creating a [constructor Basis] without any arguments. It can be used to make your code clearer, and for consistency with C#.

fn Basis.looking_at #

fn Basis.looking_at(target Vector3, cfg Basis_looking_at_Cfg) Basis

Creates a new [Basis] with a rotation such that the forward axis (-Z) points towards the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). If [param use_model_front] is true, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see [method orthonormalized]). The [param target] and the [param up] cannot be [constant Vector3.ZERO], and shouldn't be colinear to avoid unintended rotation around local Z axis.

fn Basis.new0 #

fn Basis.new0() Basis

Constructs a [Basis] identical to [constant IDENTITY]. [b]Note:[/b] In C#, this constructs a [Basis] with all of its components set to [constant Vector3.ZERO].

fn Basis.new1 #

fn Basis.new1(from Basis) Basis

Constructs a [Basis] as a copy of the given [Basis].

fn Basis.new2 #

fn Basis.new2(from Quaternion) Basis

Constructs a [Basis] that only represents rotation from the given [Quaternion]. [b]Note:[/b] Quaternions [i]only[/i] store rotation, not scale. Because of this, conversions from [Basis] to [Quaternion] cannot always be reversed.

fn Basis.new3 #

fn Basis.new3(axis Vector3, angle f64) Basis

Constructs a [Basis] that only represents rotation, rotated around the [param axis] by the given [param angle], in radians. The axis must be a normalized vector. [b]Note:[/b] This is the same as using [method rotated] on the [constant IDENTITY] basis. With more than one angle consider using [method from_euler], instead.

fn Basis.new4 #

fn Basis.new4(x_axis Vector3, y_axis Vector3, z_axis Vector3) Basis

Constructs a [Basis] from 3 axis vectors. These are the columns of the basis matrix.

fn BitMap.new #

fn BitMap.new() BitMap

fn Bone2D.new #

fn Bone2D.new() Bone2D

fn BoneAttachment3D.new #

fn BoneAttachment3D.new() BoneAttachment3D

fn BoneConstraint3D.new #

fn BoneConstraint3D.new() BoneConstraint3D

fn BoneMap.new #

fn BoneMap.new() BoneMap

fn BoxContainer.new #

fn BoxContainer.new() BoxContainer

fn BoxMesh.new #

fn BoxMesh.new() BoxMesh

fn BoxOccluder3D.new #

fn BoxOccluder3D.new() BoxOccluder3D

fn BoxShape3D.new #

fn BoxShape3D.new() BoxShape3D

fn Button.new #

fn Button.new() Button

fn ButtonGroup.new #

fn ButtonGroup.new() ButtonGroup

fn CPUParticles2D.new #

fn CPUParticles2D.new() CPUParticles2D

fn CPUParticles3D.new #

fn CPUParticles3D.new() CPUParticles3D

fn CSGBox3D.new #

fn CSGBox3D.new() CSGBox3D

fn CSGCombiner3D.new #

fn CSGCombiner3D.new() CSGCombiner3D

fn CSGCylinder3D.new #

fn CSGCylinder3D.new() CSGCylinder3D

fn CSGMesh3D.new #

fn CSGMesh3D.new() CSGMesh3D

fn CSGPolygon3D.new #

fn CSGPolygon3D.new() CSGPolygon3D

fn CSGSphere3D.new #

fn CSGSphere3D.new() CSGSphere3D

fn CSGTorus3D.new #

fn CSGTorus3D.new() CSGTorus3D

fn Callable.create #

fn Callable.create(variant_ ToVariant, method string) Callable

Creates a new [Callable] for the method named [param method] in the specified [param variant]. To represent a method of a built-in [Variant] type, a custom callable is used (see [method is_custom]). If [param variant] is [Object], then a standard callable will be created instead. [b]Note:[/b] This method is always necessary for the [Dictionary] type, as property syntax is used to access its entries. You may also use this method when [param variant]'s type is not known in advance (for polymorphism).

fn Callable.new #

fn Callable.new(object &Object, method string) Callable

fn Callable.new0 #

fn Callable.new0() Callable

Constructs an empty [Callable], with no object nor method bound.

fn Callable.new1 #

fn Callable.new1(from Callable) Callable

Constructs a [Callable] as a copy of the given [Callable].

fn Callable.new2 #

fn Callable.new2(object Object, method string) Callable

Creates a new [Callable] for the method named [param method] in the specified [param object]. [b]Note:[/b] For methods of built-in [Variant] types, use [method create] instead.

fn CallbackTweener.new #

fn CallbackTweener.new() CallbackTweener

fn Camera2D.new #

fn Camera2D.new() Camera2D

fn Camera3D.new #

fn Camera3D.new() Camera3D

fn CameraAttributes.new #

fn CameraAttributes.new() CameraAttributes

fn CameraAttributesPhysical.new #

fn CameraAttributesPhysical.new() CameraAttributesPhysical

fn CameraAttributesPractical.new #

fn CameraAttributesPractical.new() CameraAttributesPractical

fn CameraFeed.new #

fn CameraFeed.new() CameraFeed

fn CameraServer.new #

fn CameraServer.new() CameraServer

fn CameraServer.singleton #

fn CameraServer.singleton() CameraServer

fn CameraTexture.new #

fn CameraTexture.new() CameraTexture

fn CanvasGroup.new #

fn CanvasGroup.new() CanvasGroup

fn CanvasItem.notification_draw #

fn CanvasItem.notification_draw() int

The [CanvasItem] is requested to draw (see [method _draw]).

fn CanvasItem.notification_enter_canvas #

fn CanvasItem.notification_enter_canvas() int

The [CanvasItem] has entered the canvas.

fn CanvasItem.notification_exit_canvas #

fn CanvasItem.notification_exit_canvas() int

The [CanvasItem] has exited the canvas.

fn CanvasItem.notification_local_transform_changed #

fn CanvasItem.notification_local_transform_changed() int

Notification received when this node's transform changes, if [method is_local_transform_notification_enabled] is true. This is not received when a parent [Node2D]'s transform changes. See also [method set_notify_local_transform]. [b]Note:[/b] Many canvas items such as [Camera2D] or [CollisionShape2D] automatically enable this in order to function correctly.

fn CanvasItem.notification_transform_changed #

fn CanvasItem.notification_transform_changed() int

Notification received when this node's global transform changes, if [method is_transform_notification_enabled] is true. See also [method set_notify_transform] and [method get_transform]. [b]Note:[/b] Many canvas items such as [Camera2D] or [CollisionObject2D] automatically enable this in order to function correctly.

fn CanvasItem.notification_visibility_changed #

fn CanvasItem.notification_visibility_changed() int

Notification received when this node's visibility changes (see [member visible] and [method is_visible_in_tree]). This notification is received [i]before[/i] the related [signal visibility_changed] signal.

fn CanvasItem.notification_world_2d_changed #

fn CanvasItem.notification_world_2d_changed() int

Notification received when this [CanvasItem] is registered to a new [World2D] (see [method get_world_2d]).

fn CanvasItemMaterial.new #

fn CanvasItemMaterial.new() CanvasItemMaterial

fn CanvasLayer.new #

fn CanvasLayer.new() CanvasLayer

fn CanvasModulate.new #

fn CanvasModulate.new() CanvasModulate

fn CanvasTexture.new #

fn CanvasTexture.new() CanvasTexture

fn CapsuleMesh.new #

fn CapsuleMesh.new() CapsuleMesh

fn CapsuleShape2D.new #

fn CapsuleShape2D.new() CapsuleShape2D

fn CapsuleShape3D.new #

fn CapsuleShape3D.new() CapsuleShape3D

fn CenterContainer.new #

fn CenterContainer.new() CenterContainer

fn CharFXTransform.new #

fn CharFXTransform.new() CharFXTransform

fn CharacterBody2D.new #

fn CharacterBody2D.new() CharacterBody2D

fn CharacterBody3D.new #

fn CharacterBody3D.new() CharacterBody3D

fn CheckBox.new #

fn CheckBox.new() CheckBox

fn CheckButton.new #

fn CheckButton.new() CheckButton

fn CircleShape2D.new #

fn CircleShape2D.new() CircleShape2D

fn ClassDB.new #

fn ClassDB.new() ClassDB

fn ClassDB.singleton #

fn ClassDB.singleton() ClassDB

fn CodeEdit.new #

fn CodeEdit.new() CodeEdit

fn CodeHighlighter.new #

fn CodeHighlighter.new() CodeHighlighter

fn CollisionPolygon2D.new #

fn CollisionPolygon2D.new() CollisionPolygon2D

fn CollisionPolygon3D.new #

fn CollisionPolygon3D.new() CollisionPolygon3D

fn CollisionShape2D.new #

fn CollisionShape2D.new() CollisionShape2D

fn CollisionShape3D.new #

fn CollisionShape3D.new() CollisionShape3D

fn Color.alice_blue #

fn Color.alice_blue() Color

Alice blue color.

fn Color.antique_white #

fn Color.antique_white() Color

Antique white color.

fn Color.aqua #

fn Color.aqua() Color

Aqua color.

fn Color.aquamarine #

fn Color.aquamarine() Color

Aquamarine color.

fn Color.azure #

fn Color.azure() Color

Azure color.

fn Color.beige #

fn Color.beige() Color

Beige color.

fn Color.bisque #

fn Color.bisque() Color

Bisque color.

fn Color.black #

fn Color.black() Color

Black color. In GDScript, this is the default value of any color.

fn Color.blanched_almond #

fn Color.blanched_almond() Color

Blanched almond color.

fn Color.blue #

fn Color.blue() Color

Blue color.

fn Color.blue_violet #

fn Color.blue_violet() Color

Blue violet color.

fn Color.brown #

fn Color.brown() Color

Brown color.

fn Color.burlywood #

fn Color.burlywood() Color

Burlywood color.

fn Color.cadet_blue #

fn Color.cadet_blue() Color

Cadet blue color.

fn Color.chartreuse #

fn Color.chartreuse() Color

Chartreuse color.

fn Color.chocolate #

fn Color.chocolate() Color

Chocolate color.

fn Color.coral #

fn Color.coral() Color

Coral color.

fn Color.cornflower_blue #

fn Color.cornflower_blue() Color

Cornflower blue color.

fn Color.cornsilk #

fn Color.cornsilk() Color

Cornsilk color.

fn Color.crimson #

fn Color.crimson() Color

Crimson color.

fn Color.cyan #

fn Color.cyan() Color

Cyan color.

fn Color.dark_blue #

fn Color.dark_blue() Color

Dark blue color.

fn Color.dark_cyan #

fn Color.dark_cyan() Color

Dark cyan color.

fn Color.dark_goldenrod #

fn Color.dark_goldenrod() Color

Dark goldenrod color.

fn Color.dark_gray #

fn Color.dark_gray() Color

Dark gray color.

fn Color.dark_green #

fn Color.dark_green() Color

Dark green color.

fn Color.dark_khaki #

fn Color.dark_khaki() Color

Dark khaki color.

fn Color.dark_magenta #

fn Color.dark_magenta() Color

Dark magenta color.

fn Color.dark_olive_green #

fn Color.dark_olive_green() Color

Dark olive green color.

fn Color.dark_orange #

fn Color.dark_orange() Color

Dark orange color.

fn Color.dark_orchid #

fn Color.dark_orchid() Color

Dark orchid color.

fn Color.dark_red #

fn Color.dark_red() Color

Dark red color.

fn Color.dark_salmon #

fn Color.dark_salmon() Color

Dark salmon color.

fn Color.dark_sea_green #

fn Color.dark_sea_green() Color

Dark sea green color.

fn Color.dark_slate_blue #

fn Color.dark_slate_blue() Color

Dark slate blue color.

fn Color.dark_slate_gray #

fn Color.dark_slate_gray() Color

Dark slate gray color.

fn Color.dark_turquoise #

fn Color.dark_turquoise() Color

Dark turquoise color.

fn Color.dark_violet #

fn Color.dark_violet() Color

Dark violet color.

fn Color.deep_pink #

fn Color.deep_pink() Color

Deep pink color.

fn Color.deep_sky_blue #

fn Color.deep_sky_blue() Color

Deep sky blue color.

fn Color.dim_gray #

fn Color.dim_gray() Color

Dim gray color.

fn Color.dodger_blue #

fn Color.dodger_blue() Color

Dodger blue color.

fn Color.firebrick #

fn Color.firebrick() Color

Firebrick color.

fn Color.floral_white #

fn Color.floral_white() Color

Floral white color.

fn Color.forest_green #

fn Color.forest_green() Color

Forest green color.

fn Color.from_hsv #

fn Color.from_hsv(h f64, s f64, v f64, cfg Color_from_hsv_Cfg) Color

Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. The hue ([param h]), saturation ([param s]), and value ([param v]) are typically between 0.0 and 1.0. [codeblocks] [gdscript] var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8) [/gdscript] [csharp] var color = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f); [/csharp] [/codeblocks]

fn Color.from_ok_hsl #

fn Color.from_ok_hsl(h f64, s f64, l f64, cfg Color_from_ok_hsl_Cfg) Color

Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. The hue ([param h]), saturation ([param s]), and lightness ([param l]) are typically between 0.0 and 1.0. [codeblocks] [gdscript] var color = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8) [/gdscript] [csharp] var color = Color.FromOkHsl(0.58f, 0.5f, 0.79f, 0.8f); [/csharp] [/codeblocks]

fn Color.from_rgba8 #

fn Color.from_rgba8(r8 i64, g8 i64, b8 i64, cfg Color_from_rgba8_Cfg) Color

Returns a [Color] constructed from red ([param r8]), green ([param g8]), blue ([param b8]), and optionally alpha ([param a8]) integer channels, each divided by 255.0 for their final value.

var red = Color.from_rgba8(255, 0, 0)             ##var dark_blue = Color.from_rgba8(0, 0, 51)        ##var my_color = Color.from_rgba8(306, 255, 0, 102) ##

[b]Note:[/b] Due to the lower precision of [method from_rgba8] compared to the standard [Color] constructor, a color created with [method from_rgba8] will generally not be equal to the same color created with the standard [Color] constructor. Use [method is_equal_approx] for comparisons to avoid issues with floating-point precision error.

fn Color.from_rgbe9995 #

fn Color.from_rgbe9995(rgbe i64) Color

Decodes a [Color] from an RGBE9995 format integer. See [constant Image.FORMAT_RGBE9995].

fn Color.from_string #

fn Color.from_string(str string, default Color) Color

Creates a [Color] from the given string, which can be either an HTML color code or a named color (case-insensitive). Returns [param default] if the color cannot be inferred from the string. If you want to create a color from String in a constant expression, use the equivalent constructor instead (i.e. Color("color string")).

fn Color.fuchsia #

fn Color.fuchsia() Color

Fuchsia color.

fn Color.gainsboro #

fn Color.gainsboro() Color

Gainsboro color.

fn Color.ghost_white #

fn Color.ghost_white() Color

Ghost white color.

fn Color.gold #

fn Color.gold() Color

Gold color.

fn Color.goldenrod #

fn Color.goldenrod() Color

Goldenrod color.

fn Color.gray #

fn Color.gray() Color

Gray color.

fn Color.green #

fn Color.green() Color

Green color.

fn Color.green_yellow #

fn Color.green_yellow() Color

Green yellow color.

fn Color.hex #

fn Color.hex(hex i64) Color

Returns the [Color] associated with the provided [param hex] integer in 32-bit RGBA format (8 bits per channel). This method is the inverse of [method to_rgba32]. In GDScript and C#, the [int] is best visualized with hexadecimal notation ("0x" prefix, making it "0xRRGGBBAA"). [codeblocks] [gdscript] var red = Color.hex(0xff0000ff) var dark_cyan = Color.hex(0x008b8bff) var my_color = Color.hex(0xbbefd2a4) [/gdscript] [csharp] var red = new Color(0xff0000ff); var dark_cyan = new Color(0x008b8bff); var my_color = new Color(0xbbefd2a4); [/csharp] [/codeblocks] If you want to use hex notation in a constant expression, use the equivalent constructor instead (i.e. Color(0xRRGGBBAA)).

fn Color.hex64 #

fn Color.hex64(hex i64) Color

Returns the [Color] associated with the provided [param hex] integer in 64-bit RGBA format (16 bits per channel). This method is the inverse of [method to_rgba64]. In GDScript and C#, the [int] is best visualized with hexadecimal notation ("0x" prefix, making it "0xRRRRGGGGBBBBAAAA").

fn Color.honeydew #

fn Color.honeydew() Color

Honeydew color.

fn Color.hot_pink #

fn Color.hot_pink() Color

Hot pink color.

fn Color.html #

fn Color.html(rgba string) Color

Returns a new color from [param rgba], an HTML hexadecimal color string. [param rgba] is not case-sensitive, and may be prefixed by a hash sign (#). [param rgba] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [param rgba] does not contain an alpha channel value, an alpha channel value of 1.0 is applied. If [param rgba] is invalid, returns an empty color. [codeblocks] [gdscript] var blue = Color.html("#0000ff") # blue is Color(0.0, 0.0, 1.0, 1.0) var green = Color.html("#0F0") # green is Color(0.0, 1.0, 0.0, 1.0) var col = Color.html("663399cc") # col is Color(0.4, 0.2, 0.6, 0.8) [/gdscript] [csharp] var blue = Color.FromHtml("#0000ff"); // blue is Color(0.0, 0.0, 1.0, 1.0) var green = Color.FromHtml("#0F0"); // green is Color(0.0, 1.0, 0.0, 1.0) var col = Color.FromHtml("663399cc"); // col is Color(0.4, 0.2, 0.6, 0.8) [/csharp] [/codeblocks]

fn Color.html_is_valid #

fn Color.html_is_valid(color string) bool

Returns true if [param color] is a valid HTML hexadecimal color string. The string must be a hexadecimal value (case-insensitive) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (#). This method is identical to [method String.is_valid_html_color]. [codeblocks] [gdscript] Color.html_is_valid("#55aaFF") # Returns true Color.html_is_valid("#55AAFF20") # Returns true Color.html_is_valid("55AAFF") # Returns true Color.html_is_valid("#F2C") # Returns true

Color.html_is_valid("#AABBC") # Returns false Color.html_is_valid("#55aaFF5") # Returns false [/gdscript] [csharp] Color.HtmlIsValid("#55AAFF"); // Returns true Color.HtmlIsValid("#55AAFF20"); // Returns true Color.HtmlIsValid("55AAFF"); // Returns true Color.HtmlIsValid("#F2C"); // Returns true

Color.HtmlIsValid("#AABBC"); // Returns false Color.HtmlIsValid("#55aaFF5"); // Returns false [/csharp] [/codeblocks]

fn Color.indian_red #

fn Color.indian_red() Color

Indian red color.

fn Color.indigo #

fn Color.indigo() Color

Indigo color.

fn Color.ivory #

fn Color.ivory() Color

Ivory color.

fn Color.khaki #

fn Color.khaki() Color

Khaki color.

fn Color.lavender #

fn Color.lavender() Color

Lavender color.

fn Color.lavender_blush #

fn Color.lavender_blush() Color

Lavender blush color.

fn Color.lawn_green #

fn Color.lawn_green() Color

Lawn green color.

fn Color.lemon_chiffon #

fn Color.lemon_chiffon() Color

Lemon chiffon color.

fn Color.light_blue #

fn Color.light_blue() Color

Light blue color.

fn Color.light_coral #

fn Color.light_coral() Color

Light coral color.

fn Color.light_cyan #

fn Color.light_cyan() Color

Light cyan color.

fn Color.light_goldenrod #

fn Color.light_goldenrod() Color

Light goldenrod color.

fn Color.light_gray #

fn Color.light_gray() Color

Light gray color.

fn Color.light_green #

fn Color.light_green() Color

Light green color.

fn Color.light_pink #

fn Color.light_pink() Color

Light pink color.

fn Color.light_salmon #

fn Color.light_salmon() Color

Light salmon color.

fn Color.light_sea_green #

fn Color.light_sea_green() Color

Light sea green color.

fn Color.light_sky_blue #

fn Color.light_sky_blue() Color

Light sky blue color.

fn Color.light_slate_gray #

fn Color.light_slate_gray() Color

Light slate gray color.

fn Color.light_steel_blue #

fn Color.light_steel_blue() Color

Light steel blue color.

fn Color.light_yellow #

fn Color.light_yellow() Color

Light yellow color.

fn Color.lime #

fn Color.lime() Color

Lime color.

fn Color.lime_green #

fn Color.lime_green() Color

Lime green color.

fn Color.linen #

fn Color.linen() Color

Linen color.

fn Color.magenta #

fn Color.magenta() Color

Magenta color.

fn Color.maroon #

fn Color.maroon() Color

Maroon color.

fn Color.medium_aquamarine #

fn Color.medium_aquamarine() Color

Medium aquamarine color.

fn Color.medium_blue #

fn Color.medium_blue() Color

Medium blue color.

fn Color.medium_orchid #

fn Color.medium_orchid() Color

Medium orchid color.

fn Color.medium_purple #

fn Color.medium_purple() Color

Medium purple color.

fn Color.medium_sea_green #

fn Color.medium_sea_green() Color

Medium sea green color.

fn Color.medium_slate_blue #

fn Color.medium_slate_blue() Color

Medium slate blue color.

fn Color.medium_spring_green #

fn Color.medium_spring_green() Color

Medium spring green color.

fn Color.medium_turquoise #

fn Color.medium_turquoise() Color

Medium turquoise color.

fn Color.medium_violet_red #

fn Color.medium_violet_red() Color

Medium violet red color.

fn Color.midnight_blue #

fn Color.midnight_blue() Color

Midnight blue color.

fn Color.mint_cream #

fn Color.mint_cream() Color

Mint cream color.

fn Color.misty_rose #

fn Color.misty_rose() Color

Misty rose color.

fn Color.moccasin #

fn Color.moccasin() Color

Moccasin color.

fn Color.navajo_white #

fn Color.navajo_white() Color

Navajo white color.

fn Color.navy_blue #

fn Color.navy_blue() Color

Navy blue color.

fn Color.new0 #

fn Color.new0() Color

Constructs a default [Color] from opaque black. This is the same as [constant BLACK]. [b]Note:[/b] In C#, this constructs a [Color] with all of its components set to 0.0 (transparent black).

fn Color.new1 #

fn Color.new1(from Color) Color

Constructs a [Color] as a copy of the given [Color].

fn Color.new2 #

fn Color.new2(from Color, alpha f64) Color

Constructs a [Color] from the existing color, with [member a] set to the given [param alpha] value. [codeblocks] [gdscript] var red = Color(Color.RED, 0.2) # 20% opaque red. [/gdscript] [csharp] var red = new Color(Colors.Red, 0.2f); // 20% opaque red. [/csharp] [/codeblocks]

fn Color.new3 #

fn Color.new3(r f64, g f64, b f64) Color

Constructs a [Color] from RGB values, typically between 0.0 and 1.0. [member a] is set to 1.0. [codeblocks] [gdscript] var color = Color(0.2, 1.0, 0.7) # Similar to Color8(51, 255, 178, 255) [/gdscript] [csharp] var color = new Color(0.2f, 1.0f, 0.7f); // Similar to Color.Color8(51, 255, 178, 255) [/csharp] [/codeblocks]

fn Color.new4 #

fn Color.new4(r f64, g f64, b f64, a f64) Color

Constructs a [Color] from RGBA values, typically between 0.0 and 1.0. [codeblocks] [gdscript] var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to Color8(51, 255, 178, 204) [/gdscript] [csharp] var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to Color.Color8(51, 255, 178, 255, 204) [/csharp] [/codeblocks]

fn Color.new5 #

fn Color.new5(code string) Color

Constructs a [Color] either from an HTML color code or from a standardized color name. The supported color names are the same as the constants.

fn Color.new6 #

fn Color.new6(code string, alpha f64) Color

Constructs a [Color] either from an HTML color code or from a standardized color name, with [param alpha] on the range of 0.0 to 1.0. The supported color names are the same as the constants.

fn Color.old_lace #

fn Color.old_lace() Color

Old lace color.

fn Color.olive #

fn Color.olive() Color

Olive color.

fn Color.olive_drab #

fn Color.olive_drab() Color

Olive drab color.

fn Color.orange #

fn Color.orange() Color

Orange color.

fn Color.orange_red #

fn Color.orange_red() Color

Orange red color.

fn Color.orchid #

fn Color.orchid() Color

Orchid color.

fn Color.pale_goldenrod #

fn Color.pale_goldenrod() Color

Pale goldenrod color.

fn Color.pale_green #

fn Color.pale_green() Color

Pale green color.

fn Color.pale_turquoise #

fn Color.pale_turquoise() Color

Pale turquoise color.

fn Color.pale_violet_red #

fn Color.pale_violet_red() Color

Pale violet red color.

fn Color.papaya_whip #

fn Color.papaya_whip() Color

Papaya whip color.

fn Color.peach_puff #

fn Color.peach_puff() Color

Peach puff color.

fn Color.peru #

fn Color.peru() Color

Peru color.

fn Color.pink #

fn Color.pink() Color

Pink color.

fn Color.plum #

fn Color.plum() Color

Plum color.

fn Color.powder_blue #

fn Color.powder_blue() Color

Powder blue color.

fn Color.purple #

fn Color.purple() Color

Purple color.

fn Color.rebecca_purple #

fn Color.rebecca_purple() Color

Rebecca purple color.

fn Color.red #

fn Color.red() Color

Red color.

fn Color.rosy_brown #

fn Color.rosy_brown() Color

Rosy brown color.

fn Color.royal_blue #

fn Color.royal_blue() Color

Royal blue color.

fn Color.saddle_brown #

fn Color.saddle_brown() Color

Saddle brown color.

fn Color.salmon #

fn Color.salmon() Color

Salmon color.

fn Color.sandy_brown #

fn Color.sandy_brown() Color

Sandy brown color.

fn Color.sea_green #

fn Color.sea_green() Color

Sea green color.

fn Color.seashell #

fn Color.seashell() Color

Seashell color.

fn Color.sienna #

fn Color.sienna() Color

Sienna color.

fn Color.silver #

fn Color.silver() Color

Silver color.

fn Color.sky_blue #

fn Color.sky_blue() Color

Sky blue color.

fn Color.slate_blue #

fn Color.slate_blue() Color

Slate blue color.

fn Color.slate_gray #

fn Color.slate_gray() Color

Slate gray color.

fn Color.snow #

fn Color.snow() Color

Snow color.

fn Color.spring_green #

fn Color.spring_green() Color

Spring green color.

fn Color.steel_blue #

fn Color.steel_blue() Color

Steel blue color.

fn Color.tan #

fn Color.tan() Color

Tan color.

fn Color.teal #

fn Color.teal() Color

Teal color.

fn Color.thistle #

fn Color.thistle() Color

Thistle color.

fn Color.tomato #

fn Color.tomato() Color

Tomato color.

fn Color.transparent #

fn Color.transparent() Color

Transparent color (white with zero alpha).

fn Color.turquoise #

fn Color.turquoise() Color

Turquoise color.

fn Color.violet #

fn Color.violet() Color

Violet color.

fn Color.web_gray #

fn Color.web_gray() Color

Web gray color.

fn Color.web_green #

fn Color.web_green() Color

Web green color.

fn Color.web_maroon #

fn Color.web_maroon() Color

Web maroon color.

fn Color.web_purple #

fn Color.web_purple() Color

Web purple color.

fn Color.wheat #

fn Color.wheat() Color

Wheat color.

fn Color.white #

fn Color.white() Color

White color.

fn Color.white_smoke #

fn Color.white_smoke() Color

White smoke color.

fn Color.yellow #

fn Color.yellow() Color

Yellow color.

fn Color.yellow_green #

fn Color.yellow_green() Color

Yellow green color.

fn ColorPalette.new #

fn ColorPalette.new() ColorPalette

fn ColorPicker.new #

fn ColorPicker.new() ColorPicker

fn ColorPickerButton.new #

fn ColorPickerButton.new() ColorPickerButton

fn ColorRect.new #

fn ColorRect.new() ColorRect

fn Compositor.new #

fn Compositor.new() Compositor

fn CompositorEffect.new #

fn CompositorEffect.new() CompositorEffect

fn CompressedCubemap.new #

fn CompressedCubemap.new() CompressedCubemap

fn CompressedCubemapArray.new #

fn CompressedCubemapArray.new() CompressedCubemapArray

fn CompressedTexture2D.new #

fn CompressedTexture2D.new() CompressedTexture2D

fn CompressedTexture2DArray.new #

fn CompressedTexture2DArray.new() CompressedTexture2DArray

fn CompressedTexture3D.new #

fn CompressedTexture3D.new() CompressedTexture3D

fn ConcavePolygonShape2D.new #

fn ConcavePolygonShape2D.new() ConcavePolygonShape2D

fn ConcavePolygonShape3D.new #

fn ConcavePolygonShape3D.new() ConcavePolygonShape3D

fn ConeTwistJoint3D.new #

fn ConeTwistJoint3D.new() ConeTwistJoint3D

fn ConfigFile.new #

fn ConfigFile.new() ConfigFile

fn ConfirmationDialog.new #

fn ConfirmationDialog.new() ConfirmationDialog

fn Container.new #

fn Container.new() Container

fn Container.notification_pre_sort_children #

fn Container.notification_pre_sort_children() int

Notification just before children are going to be sorted, in case there's something to process beforehand.

fn Container.notification_sort_children #

fn Container.notification_sort_children() int

Notification for when sorting the children, it must be obeyed immediately.

fn Control.new #

fn Control.new() Control

fn Control.notification_focus_enter #

fn Control.notification_focus_enter() int

Sent when the node grabs focus.

fn Control.notification_focus_exit #

fn Control.notification_focus_exit() int

Sent when the node loses focus.

fn Control.notification_layout_direction_changed #

fn Control.notification_layout_direction_changed() int

Sent when the control layout direction is changed from LTR or RTL or vice versa. This notification is propagated to child Control nodes as result of a change to [member layout_direction].

fn Control.notification_mouse_enter #

fn Control.notification_mouse_enter() int

Sent when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. [b]Note:[/b] [member CanvasItem.z_index] doesn't affect which Control receives the notification. See also [constant NOTIFICATION_MOUSE_ENTER_SELF].

fn Control.notification_mouse_enter_self #

fn Control.notification_mouse_enter_self() int

Sent when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. [b]Note:[/b] [member CanvasItem.z_index] doesn't affect which Control receives the notification. See also [constant NOTIFICATION_MOUSE_ENTER].

fn Control.notification_mouse_exit #

fn Control.notification_mouse_exit() int

Sent when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. [b]Note:[/b] [member CanvasItem.z_index] doesn't affect which Control receives the notification. See also [constant NOTIFICATION_MOUSE_EXIT_SELF].

fn Control.notification_mouse_exit_self #

fn Control.notification_mouse_exit_self() int

Sent when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. [b]Note:[/b] [member CanvasItem.z_index] doesn't affect which Control receives the notification. See also [constant NOTIFICATION_MOUSE_EXIT].

fn Control.notification_resized #

fn Control.notification_resized() int

Sent when the node changes size. Use [member size] to get the new size.

fn Control.notification_scroll_begin #

fn Control.notification_scroll_begin() int

Sent when this node is inside a [ScrollContainer] which has begun being scrolled when dragging the scrollable area [i]with a touch event[/i]. This notification is [i]not[/i] sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. [b]Note:[/b] This signal is only emitted on Android or iOS, or on desktop/web platforms when [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is enabled.

fn Control.notification_scroll_end #

fn Control.notification_scroll_end() int

Sent when this node is inside a [ScrollContainer] which has stopped being scrolled when dragging the scrollable area [i]with a touch event[/i]. This notification is [i]not[/i] sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. [b]Note:[/b] This signal is only emitted on Android or iOS, or on desktop/web platforms when [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is enabled.

fn Control.notification_theme_changed #

fn Control.notification_theme_changed() int

Sent when the node needs to refresh its theme items. This happens in one of the following cases:- The [member theme] property is changed on this node or any of its ancestors.

  • The [member theme_type_variation] property is changed on this node.
  • One of the node's theme property overrides is changed.
  • The node enters the scene tree.[b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. [b]Note:[/b] This notification is received alongside [constant Node.NOTIFICATION_ENTER_TREE], so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using [method Node.is_node_ready].
func _notification(what):
if what == NOTIFICATION_THEME_CHANGED:
if not is_node_ready():
await ready ##$Label.add_theme_color_override('font_color', Color.YELLOW)

fn ConvertTransformModifier3D.new #

fn ConvertTransformModifier3D.new() ConvertTransformModifier3D

fn ConvexPolygonShape2D.new #

fn ConvexPolygonShape2D.new() ConvexPolygonShape2D

fn ConvexPolygonShape3D.new #

fn ConvexPolygonShape3D.new() ConvexPolygonShape3D

fn CopyTransformModifier3D.new #

fn CopyTransformModifier3D.new() CopyTransformModifier3D

fn Crypto.new #

fn Crypto.new() Crypto

fn CryptoKey.new #

fn CryptoKey.new() CryptoKey

fn Cubemap.new #

fn Cubemap.new() Cubemap

fn CubemapArray.new #

fn CubemapArray.new() CubemapArray

fn Curve.new #

fn Curve.new() Curve

fn Curve2D.new #

fn Curve2D.new() Curve2D

fn Curve3D.new #

fn Curve3D.new() Curve3D

fn CurveTexture.new #

fn CurveTexture.new() CurveTexture

fn CurveXYZTexture.new #

fn CurveXYZTexture.new() CurveXYZTexture

fn CylinderMesh.new #

fn CylinderMesh.new() CylinderMesh

fn CylinderShape3D.new #

fn CylinderShape3D.new() CylinderShape3D

fn DTLSServer.new #

fn DTLSServer.new() DTLSServer

fn DampedSpringJoint2D.new #

fn DampedSpringJoint2D.new() DampedSpringJoint2D

fn Decal.new #

fn Decal.new() Decal

fn Dictionary.new0 #

fn Dictionary.new0() Dictionary

Constructs an empty [Dictionary].

fn Dictionary.new1 #

fn Dictionary.new1(from Dictionary) Dictionary

Returns the same dictionary as [param from]. If you need a copy of the dictionary, use [method duplicate].

fn Dictionary.new2 #

fn Dictionary.new2(base Dictionary, key_type i64, key_class_name string, key_script_ ToVariant, value_type i64, value_class_name string, value_script_ ToVariant) Dictionary

Creates a typed dictionary from the [param base] dictionary. A typed dictionary can only contain keys and values of the given types, or that inherit from the given classes, as described by this constructor's parameters.

fn DirAccess.copy_absolute #

fn DirAccess.copy_absolute(from string, to string, cfg DirAccess_copy_absolute_Cfg) GDError

Static version of [method copy]. Supports only absolute paths.

fn DirAccess.create_temp #

fn DirAccess.create_temp(cfg DirAccess_create_temp_Cfg) DirAccess

Creates a temporary directory. This directory will be freed when the returned [DirAccess] is freed. If [param prefix] is not empty, it will be prefixed to the directory name, separated by a -. If [param keep] is true, the directory is not deleted when the returned [DirAccess] is freed. Returns null if opening the directory failed. You can use [method get_open_error] to check the error that occurred.

fn DirAccess.dir_exists_absolute #

fn DirAccess.dir_exists_absolute(path string) bool

Static version of [method dir_exists]. Supports only absolute paths. [b]Note:[/b] The returned [bool] in the editor and after exporting when used on a path in the res:// directory may be different. Some files are converted to engine-specific formats when exported, potentially changing the directory structure.

fn DirAccess.get_directories_at #

fn DirAccess.get_directories_at(path string) PackedStringArray

Returns a [PackedStringArray] containing filenames of the directory contents, excluding files, at the given [param path]. The array is sorted alphabetically. Use [method get_directories] if you want more control of what gets included. [b]Note:[/b] The returned directories in the editor and after exporting in the res:// directory may differ as some files are converted to engine-specific formats when exported.

fn DirAccess.get_drive_count #

fn DirAccess.get_drive_count() i64

On Windows, returns the number of drives (partitions) mounted on the current filesystem. On macOS, returns the number of mounted volumes. On Linux, returns the number of mounted volumes and GTK 3 bookmarks. On other platforms, the method returns 0.

fn DirAccess.get_drive_name #

fn DirAccess.get_drive_name(idx i64) string

On Windows, returns the name of the drive (partition) passed as an argument (e.g. C:). On macOS, returns the path to the mounted volume passed as an argument. On Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an argument. On other platforms, or if the requested drive does not exist, the method returns an empty String.

fn DirAccess.get_files_at #

fn DirAccess.get_files_at(path string) PackedStringArray

Returns a [PackedStringArray] containing filenames of the directory contents, excluding directories, at the given [param path]. The array is sorted alphabetically. Use [method get_files] if you want more control of what gets included. [b]Note:[/b] When used on a res:// path in an exported project, only the files included in the PCK at the given folder level are returned. In practice, this means that since imported resources are stored in a top-level .godot/ folder, only paths to .gd and .import files are returned (plus a few other files, such as project.godot or project.binary and the project icon). In an exported project, the list of returned files will also vary depending on [member ProjectSettings.editor/export/convert_text_resources_to_binary].

fn DirAccess.get_open_error #

fn DirAccess.get_open_error() GDError

Returns the result of the last [method open] call in the current thread.

fn DirAccess.make_dir_absolute #

fn DirAccess.make_dir_absolute(path string) GDError

Static version of [method make_dir]. Supports only absolute paths.

fn DirAccess.make_dir_recursive_absolute #

fn DirAccess.make_dir_recursive_absolute(path string) GDError

Static version of [method make_dir_recursive]. Supports only absolute paths.

fn DirAccess.open #

fn DirAccess.open(path string) DirAccess

Creates a new [DirAccess] object and opens an existing directory of the filesystem. The [param path] argument can be within the project tree (res://folder), the user directory (user://folder) or an absolute path of the user filesystem (e.g. /tmp/folder or C:\tmp\folder). Returns null if opening the directory failed. You can use [method get_open_error] to check the error that occurred.

fn DirAccess.remove_absolute #

fn DirAccess.remove_absolute(path string) GDError

Static version of [method remove]. Supports only absolute paths.

fn DirAccess.rename_absolute #

fn DirAccess.rename_absolute(from string, to string) GDError

Static version of [method rename]. Supports only absolute paths.

fn DirectionalLight2D.new #

fn DirectionalLight2D.new() DirectionalLight2D

fn DirectionalLight3D.new #

fn DirectionalLight3D.new() DirectionalLight3D

fn DisplayServer.invalid_indicator_id #

fn DisplayServer.invalid_indicator_id() int

The ID that refers to a nonexistent application status indicator.

fn DisplayServer.invalid_screen #

fn DisplayServer.invalid_screen() int

The ID that refers to a screen that does not exist. This is returned by some [DisplayServer] methods if no screen matches the requested result.

fn DisplayServer.invalid_window_id #

fn DisplayServer.invalid_window_id() int

The ID that refers to a nonexistent window. This is returned by some [DisplayServer] methods if no window matches the requested result.

fn DisplayServer.main_window_id #

fn DisplayServer.main_window_id() int

The ID of the main window spawned by the engine, which can be passed to methods expecting a window_id.

fn DisplayServer.screen_of_main_window #

fn DisplayServer.screen_of_main_window() int

Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. [b]Note:[/b] On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.

fn DisplayServer.screen_primary #

fn DisplayServer.screen_primary() int

Represents the primary screen. [b]Note:[/b] On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.

fn DisplayServer.screen_with_keyboard_focus #

fn DisplayServer.screen_with_keyboard_focus() int

Represents the screen containing the window with the keyboard focus. [b]Note:[/b] On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.

fn DisplayServer.screen_with_mouse_focus #

fn DisplayServer.screen_with_mouse_focus() int

Represents the screen containing the mouse pointer. [b]Note:[/b] On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.

fn DisplayServer.singleton #

fn DisplayServer.singleton() DisplayServer

fn ENetConnection.new #

fn ENetConnection.new() ENetConnection

fn ENetMultiplayerPeer.new #

fn ENetMultiplayerPeer.new() ENetMultiplayerPeer

fn ENetPacketPeer.flag_reliable #

fn ENetPacketPeer.flag_reliable() int

Mark the packet to be sent as reliable.

fn ENetPacketPeer.flag_unreliable_fragment #

fn ENetPacketPeer.flag_unreliable_fragment() int

Mark the packet to be sent unreliable even if the packet is too big and needs fragmentation (increasing the chance of it being dropped).

fn ENetPacketPeer.flag_unsequenced #

fn ENetPacketPeer.flag_unsequenced() int

Mark the packet to be sent unsequenced (unreliable).

fn ENetPacketPeer.packet_loss_scale #

fn ENetPacketPeer.packet_loss_scale() int

The reference scale for packet loss. See [method get_statistic] and [constant PEER_PACKET_LOSS].

fn ENetPacketPeer.packet_throttle_scale #

fn ENetPacketPeer.packet_throttle_scale() int

The reference value for throttle configuration. The default value is 32. See [method throttle_configure].

fn EditorCommandPalette.new #

fn EditorCommandPalette.new() EditorCommandPalette

fn EditorContextMenuPlugin.new #

fn EditorContextMenuPlugin.new() EditorContextMenuPlugin

fn EditorDebuggerPlugin.new #

fn EditorDebuggerPlugin.new() EditorDebuggerPlugin

fn EditorExportPlatform.get_forced_export_files #

fn EditorExportPlatform.get_forced_export_files(preset EditorExportPreset) PackedStringArray

Returns array of core file names that always should be exported regardless of preset config.

fn EditorExportPlatformAndroid.new #

fn EditorExportPlatformAndroid.new() EditorExportPlatformAndroid

fn EditorExportPlatformExtension.new #

fn EditorExportPlatformExtension.new() EditorExportPlatformExtension

fn EditorExportPlatformIOS.new #

fn EditorExportPlatformIOS.new() EditorExportPlatformIOS

fn EditorExportPlatformLinuxBSD.new #

fn EditorExportPlatformLinuxBSD.new() EditorExportPlatformLinuxBSD

fn EditorExportPlatformMacOS.new #

fn EditorExportPlatformMacOS.new() EditorExportPlatformMacOS

fn EditorExportPlatformVisionOS.new #

fn EditorExportPlatformVisionOS.new() EditorExportPlatformVisionOS

fn EditorExportPlatformWeb.new #

fn EditorExportPlatformWeb.new() EditorExportPlatformWeb

fn EditorExportPlatformWindows.new #

fn EditorExportPlatformWindows.new() EditorExportPlatformWindows

fn EditorExportPlugin.new #

fn EditorExportPlugin.new() EditorExportPlugin

fn EditorFeatureProfile.new #

fn EditorFeatureProfile.new() EditorFeatureProfile

fn EditorFileDialog.new #

fn EditorFileDialog.new() EditorFileDialog

fn EditorFileSystemDirectory.new #

fn EditorFileSystemDirectory.new() EditorFileSystemDirectory

fn EditorFileSystemImportFormatSupportQuery.new #

fn EditorFileSystemImportFormatSupportQuery.new() EditorFileSystemImportFormatSupportQuery

fn EditorImportPlugin.new #

fn EditorImportPlugin.new() EditorImportPlugin

fn EditorInspector.instantiate_property_editor #

fn EditorInspector.instantiate_property_editor(object Object, gd_type VariantType, path string, hint PropertyHint, hint_text string, usage i64, cfg EditorInspector_instantiate_property_editor_Cfg) EditorProperty

Creates a property editor that can be used by plugin UI to edit the specified property of an [param object].

fn EditorInspector.new #

fn EditorInspector.new() EditorInspector

fn EditorInspectorPlugin.new #

fn EditorInspectorPlugin.new() EditorInspectorPlugin

fn EditorInterface.singleton #

fn EditorInterface.singleton() EditorInterface

fn EditorNode3DGizmo.new #

fn EditorNode3DGizmo.new() EditorNode3DGizmo

fn EditorNode3DGizmoPlugin.new #

fn EditorNode3DGizmoPlugin.new() EditorNode3DGizmoPlugin

fn EditorPaths.new #

fn EditorPaths.new() EditorPaths

fn EditorPlugin.new #

fn EditorPlugin.new() EditorPlugin

fn EditorProperty.new #

fn EditorProperty.new() EditorProperty

fn EditorResourceConversionPlugin.new #

fn EditorResourceConversionPlugin.new() EditorResourceConversionPlugin

fn EditorResourcePicker.new #

fn EditorResourcePicker.new() EditorResourcePicker

fn EditorResourcePreviewGenerator.new #

fn EditorResourcePreviewGenerator.new() EditorResourcePreviewGenerator

fn EditorResourceTooltipPlugin.new #

fn EditorResourceTooltipPlugin.new() EditorResourceTooltipPlugin

fn EditorSceneFormatImporter.import_animation #

fn EditorSceneFormatImporter.import_animation() int

fn EditorSceneFormatImporter.import_discard_meshes_and_materials #

fn EditorSceneFormatImporter.import_discard_meshes_and_materials() int

fn EditorSceneFormatImporter.import_fail_on_missing_dependencies #

fn EditorSceneFormatImporter.import_fail_on_missing_dependencies() int

fn EditorSceneFormatImporter.import_force_disable_mesh_compression #

fn EditorSceneFormatImporter.import_force_disable_mesh_compression() int

fn EditorSceneFormatImporter.import_generate_tangent_arrays #

fn EditorSceneFormatImporter.import_generate_tangent_arrays() int

fn EditorSceneFormatImporter.import_scene #

fn EditorSceneFormatImporter.import_scene() int

fn EditorSceneFormatImporter.import_use_named_skin_binds #

fn EditorSceneFormatImporter.import_use_named_skin_binds() int

fn EditorSceneFormatImporter.new #

fn EditorSceneFormatImporter.new() EditorSceneFormatImporter

fn EditorSceneFormatImporterBlend.new #

fn EditorSceneFormatImporterBlend.new() EditorSceneFormatImporterBlend

fn EditorSceneFormatImporterFBX2GLTF.new #

fn EditorSceneFormatImporterFBX2GLTF.new() EditorSceneFormatImporterFBX2GLTF

fn EditorSceneFormatImporterGLTF.new #

fn EditorSceneFormatImporterGLTF.new() EditorSceneFormatImporterGLTF

fn EditorSceneFormatImporterUFBX.new #

fn EditorSceneFormatImporterUFBX.new() EditorSceneFormatImporterUFBX

fn EditorScenePostImport.new #

fn EditorScenePostImport.new() EditorScenePostImport

fn EditorScenePostImportPlugin.new #

fn EditorScenePostImportPlugin.new() EditorScenePostImportPlugin

fn EditorScript.new #

fn EditorScript.new() EditorScript

fn EditorScriptPicker.new #

fn EditorScriptPicker.new() EditorScriptPicker

fn EditorSelection.new #

fn EditorSelection.new() EditorSelection

fn EditorSettings.new #

fn EditorSettings.new() EditorSettings

fn EditorSettings.notification_editor_settings_changed #

fn EditorSettings.notification_editor_settings_changed() int

Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes.

fn EditorSpinSlider.new #

fn EditorSpinSlider.new() EditorSpinSlider

fn EditorSyntaxHighlighter.new #

fn EditorSyntaxHighlighter.new() EditorSyntaxHighlighter

fn EditorTranslationParserPlugin.new #

fn EditorTranslationParserPlugin.new() EditorTranslationParserPlugin

fn EditorVCSInterface.new #

fn EditorVCSInterface.new() EditorVCSInterface

fn EncodedObjectAsID.new #

fn EncodedObjectAsID.new() EncodedObjectAsID

fn Engine.new #

fn Engine.new() Engine

fn Engine.singleton #

fn Engine.singleton() Engine

fn EngineDebugger.new #

fn EngineDebugger.new() EngineDebugger

fn EngineDebugger.singleton #

fn EngineDebugger.singleton() EngineDebugger

fn EngineProfiler.new #

fn EngineProfiler.new() EngineProfiler

fn Environment.new #

fn Environment.new() Environment

fn Expression.new #

fn Expression.new() Expression

fn ExternalTexture.new #

fn ExternalTexture.new() ExternalTexture

fn FBXDocument.new #

fn FBXDocument.new() FBXDocument

fn FBXState.new #

fn FBXState.new() FBXState

fn FastNoiseLite.new #

fn FastNoiseLite.new() FastNoiseLite

fn FileAccess.create_temp #

fn FileAccess.create_temp(mode_flags i64, cfg FileAccess_create_temp_Cfg) FileAccess

Creates a temporary file. This file will be freed when the returned [FileAccess] is freed. If [param prefix] is not empty, it will be prefixed to the file name, separated by a -. If [param extension] is not empty, it will be appended to the temporary file name. If [param keep] is true, the file is not deleted when the returned [FileAccess] is freed. Returns null if opening the file failed. You can use [method get_open_error] to check the error that occurred.

fn FileAccess.file_exists #

fn FileAccess.file_exists(path string) bool

Returns true if the file exists in the given path. [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account. For a non-static, relative equivalent, use [method DirAccess.file_exists].

fn FileAccess.get_access_time #

fn FileAccess.get_access_time(file string) i64

Returns the last time the [param file] was accessed in Unix timestamp format, or 0 on error. This Unix timestamp can be converted to another format using the [Time] singleton.

fn FileAccess.get_file_as_bytes #

fn FileAccess.get_file_as_bytes(path string) PackedByteArray

Returns the whole [param path] file contents as a [PackedByteArray] without any decoding. Returns an empty [PackedByteArray] if an error occurred while opening the file. You can use [method get_open_error] to check the error that occurred.

fn FileAccess.get_file_as_string #

fn FileAccess.get_file_as_string(path string) string

Returns the whole [param path] file contents as a [String]. Text is interpreted as being UTF-8 encoded. Returns an empty [String] if an error occurred while opening the file. You can use [method get_open_error] to check the error that occurred.

fn FileAccess.get_hidden_attribute #

fn FileAccess.get_hidden_attribute(file string) bool

Returns true, if file hidden attribute is set. [b]Note:[/b] This method is implemented on iOS, BSD, macOS, and Windows.

fn FileAccess.get_md5 #

fn FileAccess.get_md5(path string) string

Returns an MD5 String representing the file at the given path or an empty [String] on failure.

fn FileAccess.get_modified_time #

fn FileAccess.get_modified_time(file string) i64

Returns the last time the [param file] was modified in Unix timestamp format, or 0 on error. This Unix timestamp can be converted to another format using the [Time] singleton.

fn FileAccess.get_open_error #

fn FileAccess.get_open_error() GDError

Returns the result of the last [method open] call in the current thread.

fn FileAccess.get_read_only_attribute #

fn FileAccess.get_read_only_attribute(file string) bool

Returns true, if file read only attribute is set. [b]Note:[/b] This method is implemented on iOS, BSD, macOS, and Windows.

fn FileAccess.get_sha256 #

fn FileAccess.get_sha256(path string) string

Returns an SHA-256 [String] representing the file at the given path or an empty [String] on failure.

fn FileAccess.get_size #

fn FileAccess.get_size(file string) i64

Returns file size in bytes, or -1 on error.

fn FileAccess.get_unix_permissions #

fn FileAccess.get_unix_permissions(file string) FileAccessUnixPermissionFlags

Returns file UNIX permissions. [b]Note:[/b] This method is implemented on iOS, Linux/BSD, and macOS.

fn FileAccess.open #

fn FileAccess.open(path string, flags FileAccessModeFlags) FileAccess

Creates a new [FileAccess] object and opens the file for writing or reading, depending on the flags. Returns null if opening the file failed. You can use [method get_open_error] to check the error that occurred.

fn FileAccess.open_compressed #

fn FileAccess.open_compressed(path string, mode_flags FileAccessModeFlags, cfg FileAccess_open_compressed_Cfg) FileAccess

Creates a new [FileAccess] object and opens a compressed file for reading or writing. [b]Note:[/b] [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround. Returns null if opening the file failed. You can use [method get_open_error] to check the error that occurred.

fn FileAccess.open_encrypted #

fn FileAccess.open_encrypted(path string, mode_flags FileAccessModeFlags, key PackedByteArray, cfg FileAccess_open_encrypted_Cfg) FileAccess

Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. [b]Note:[/b] The provided key must be 32 bytes long. Returns null if opening the file failed. You can use [method get_open_error] to check the error that occurred.

fn FileAccess.open_encrypted_with_pass #

fn FileAccess.open_encrypted_with_pass(path string, mode_flags FileAccessModeFlags, pass string) FileAccess

Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. Returns null if opening the file failed. You can use [method get_open_error] to check the error that occurred.

fn FileAccess.set_hidden_attribute #

fn FileAccess.set_hidden_attribute(file string, hidden bool) GDError

Sets file [b]hidden[/b] attribute. [b]Note:[/b] This method is implemented on iOS, BSD, macOS, and Windows.

fn FileAccess.set_read_only_attribute #

fn FileAccess.set_read_only_attribute(file string, ro bool) GDError

Sets file [b]read only[/b] attribute. [b]Note:[/b] This method is implemented on iOS, BSD, macOS, and Windows.

fn FileAccess.set_unix_permissions #

fn FileAccess.set_unix_permissions(file string, permissions FileAccessUnixPermissionFlags) GDError

Sets file UNIX permissions. [b]Note:[/b] This method is implemented on iOS, Linux/BSD, and macOS.

fn FileDialog.new #

fn FileDialog.new() FileDialog

fn FlowContainer.new #

fn FlowContainer.new() FlowContainer

fn FogMaterial.new #

fn FogMaterial.new() FogMaterial

fn FogVolume.new #

fn FogVolume.new() FogVolume

fn FoldableContainer.new #

fn FoldableContainer.new() FoldableContainer

fn FoldableGroup.new #

fn FoldableGroup.new() FoldableGroup

fn FontFile.new #

fn FontFile.new() FontFile

fn FontVariation.new #

fn FontVariation.new() FontVariation

fn FramebufferCacheRD.get_cache_multipass #

fn FramebufferCacheRD.get_cache_multipass(textures Array, passes Array, views i64) RID

Creates, or obtains a cached, framebuffer. [param textures] lists textures accessed. [param passes] defines the subpasses and texture allocation, if left empty a single pass is created and textures are allocated depending on their usage flags. [param views] defines the number of views used when rendering.

fn FramebufferCacheRD.new #

fn FramebufferCacheRD.new() FramebufferCacheRD

fn GDExtension.new #

fn GDExtension.new() GDExtension

fn GDExtensionManager.singleton #

fn GDExtensionManager.singleton() GDExtensionManager

fn GDScript.new #

fn GDScript.new() GDScript

fn GDScriptSyntaxHighlighter.new #

fn GDScriptSyntaxHighlighter.new() GDScriptSyntaxHighlighter

fn GLTFAccessor.new #

fn GLTFAccessor.new() GLTFAccessor

fn GLTFAnimation.new #

fn GLTFAnimation.new() GLTFAnimation

fn GLTFBufferView.new #

fn GLTFBufferView.new() GLTFBufferView

fn GLTFCamera.from_dictionary #

fn GLTFCamera.from_dictionary(dictionary Dictionary) GLTFCamera

Creates a new GLTFCamera instance by parsing the given [Dictionary].

fn GLTFCamera.from_node #

fn GLTFCamera.from_node(camera_node Camera3D) GLTFCamera

Create a new GLTFCamera instance from the given Godot [Camera3D] node.

fn GLTFCamera.new #

fn GLTFCamera.new() GLTFCamera

fn GLTFDocument.export_object_model_property #

fn GLTFDocument.export_object_model_property(state GLTFState, node_path NodePath, godot_node Node, gltf_node_index i64) GLTFObjectModelProperty

Determines a mapping between the given Godot [param node_path] and the corresponding glTF Object Model JSON pointer(s) in the generated glTF file. The details of this mapping are returned in a [GLTFObjectModelProperty] object. Additional mappings can be supplied via the [method GLTFDocumentExtension._import_object_model_property] callback method.

fn GLTFDocument.get_supported_gltf_extensions #

fn GLTFDocument.get_supported_gltf_extensions() PackedStringArray

Returns a list of all support glTF extensions, including extensions supported directly by the engine, and extensions supported by user plugins registering [GLTFDocumentExtension] classes. [b]Note:[/b] If this method is run before a GLTFDocumentExtension is registered, its extensions won't be included in the list. Be sure to only run this method after all extensions are registered. If you run this when the engine starts, consider waiting a frame before calling this method to ensure all extensions are registered.

fn GLTFDocument.import_object_model_property #

fn GLTFDocument.import_object_model_property(state GLTFState, json_pointer string) GLTFObjectModelProperty

Determines a mapping between the given glTF Object Model [param json_pointer] and the corresponding Godot node path(s) in the generated Godot scene. The details of this mapping are returned in a [GLTFObjectModelProperty] object. Additional mappings can be supplied via the [method GLTFDocumentExtension._export_object_model_property] callback method.

fn GLTFDocument.new #

fn GLTFDocument.new() GLTFDocument

fn GLTFDocument.register_gltf_document_extension #

fn GLTFDocument.register_gltf_document_extension(extension GLTFDocumentExtension, cfg GLTFDocument_register_gltf_document_extension_Cfg)

Registers the given [GLTFDocumentExtension] instance with GLTFDocument. If [param first_priority] is true, this extension will be run first. Otherwise, it will be run last. [b]Note:[/b] Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the set_additional_data and get_additional_data methods in [GLTFState] or [GLTFNode].

fn GLTFDocument.unregister_gltf_document_extension #

fn GLTFDocument.unregister_gltf_document_extension(extension GLTFDocumentExtension)

Unregisters the given [GLTFDocumentExtension] instance.

fn GLTFDocumentExtension.new #

fn GLTFDocumentExtension.new() GLTFDocumentExtension

fn GLTFDocumentExtensionConvertImporterMesh.new #

fn GLTFDocumentExtensionConvertImporterMesh.new() GLTFDocumentExtensionConvertImporterMesh

fn GLTFLight.from_dictionary #

fn GLTFLight.from_dictionary(dictionary Dictionary) GLTFLight

Creates a new GLTFLight instance by parsing the given [Dictionary].

fn GLTFLight.from_node #

fn GLTFLight.from_node(light_node Light3D) GLTFLight

Create a new GLTFLight instance from the given Godot [Light3D] node.

fn GLTFLight.new #

fn GLTFLight.new() GLTFLight

fn GLTFMesh.new #

fn GLTFMesh.new() GLTFMesh

fn GLTFNode.new #

fn GLTFNode.new() GLTFNode

fn GLTFObjectModelProperty.new #

fn GLTFObjectModelProperty.new() GLTFObjectModelProperty

fn GLTFPhysicsBody.from_dictionary #

fn GLTFPhysicsBody.from_dictionary(dictionary Dictionary) GLTFPhysicsBody

Creates a new GLTFPhysicsBody instance by parsing the given [Dictionary] in the OMI_physics_body glTF extension format.

fn GLTFPhysicsBody.from_node #

fn GLTFPhysicsBody.from_node(body_node CollisionObject3D) GLTFPhysicsBody

Creates a new GLTFPhysicsBody instance from the given Godot [CollisionObject3D] node.

fn GLTFPhysicsBody.new #

fn GLTFPhysicsBody.new() GLTFPhysicsBody

fn GLTFPhysicsShape.from_dictionary #

fn GLTFPhysicsShape.from_dictionary(dictionary Dictionary) GLTFPhysicsShape

Creates a new GLTFPhysicsShape instance by parsing the given [Dictionary].

fn GLTFPhysicsShape.from_node #

fn GLTFPhysicsShape.from_node(shape_node CollisionShape3D) GLTFPhysicsShape

Creates a new GLTFPhysicsShape instance from the given Godot [CollisionShape3D] node.

fn GLTFPhysicsShape.from_resource #

fn GLTFPhysicsShape.from_resource(shape_resource Shape3D) GLTFPhysicsShape

Creates a new GLTFPhysicsShape instance from the given Godot [Shape3D] resource.

fn GLTFPhysicsShape.new #

fn GLTFPhysicsShape.new() GLTFPhysicsShape

fn GLTFSkeleton.new #

fn GLTFSkeleton.new() GLTFSkeleton

fn GLTFSkin.new #

fn GLTFSkin.new() GLTFSkin

fn GLTFSpecGloss.new #

fn GLTFSpecGloss.new() GLTFSpecGloss

fn GLTFState.handle_binary_discard_textures #

fn GLTFState.handle_binary_discard_textures() int

Discards all embedded textures and uses untextured materials.

fn GLTFState.handle_binary_embed_as_basisu #

fn GLTFState.handle_binary_embed_as_basisu() int

Embeds textures VRAM compressed with Basis Universal into the generated scene.

fn GLTFState.handle_binary_embed_as_uncompressed #

fn GLTFState.handle_binary_embed_as_uncompressed() int

Embeds textures compressed losslessly into the generated scene, matching old behavior.

fn GLTFState.handle_binary_extract_textures #

fn GLTFState.handle_binary_extract_textures() int

Extracts embedded textures to be reimported and compressed. Editor only. Acts as uncompressed at runtime.

fn GLTFState.new #

fn GLTFState.new() GLTFState

fn GLTFTexture.new #

fn GLTFTexture.new() GLTFTexture

fn GLTFTextureSampler.new #

fn GLTFTextureSampler.new() GLTFTextureSampler

fn GPUParticles2D.new #

fn GPUParticles2D.new() GPUParticles2D

fn GPUParticles3D.max_draw_passes #

fn GPUParticles3D.max_draw_passes() int

Maximum number of draw passes supported.

fn GPUParticles3D.new #

fn GPUParticles3D.new() GPUParticles3D

fn GPUParticlesAttractorBox3D.new #

fn GPUParticlesAttractorBox3D.new() GPUParticlesAttractorBox3D

fn GPUParticlesAttractorSphere3D.new #

fn GPUParticlesAttractorSphere3D.new() GPUParticlesAttractorSphere3D

fn GPUParticlesAttractorVectorField3D.new #

fn GPUParticlesAttractorVectorField3D.new() GPUParticlesAttractorVectorField3D

fn GPUParticlesCollisionBox3D.new #

fn GPUParticlesCollisionBox3D.new() GPUParticlesCollisionBox3D

fn GPUParticlesCollisionHeightField3D.new #

fn GPUParticlesCollisionHeightField3D.new() GPUParticlesCollisionHeightField3D

fn GPUParticlesCollisionSDF3D.new #

fn GPUParticlesCollisionSDF3D.new() GPUParticlesCollisionSDF3D

fn GPUParticlesCollisionSphere3D.new #

fn GPUParticlesCollisionSphere3D.new() GPUParticlesCollisionSphere3D

fn Generic6DOFJoint3D.new #

fn Generic6DOFJoint3D.new() Generic6DOFJoint3D

fn Geometry2D.new #

fn Geometry2D.new() Geometry2D

fn Geometry2D.singleton #

fn Geometry2D.singleton() Geometry2D

fn Geometry3D.new #

fn Geometry3D.new() Geometry3D

fn Geometry3D.singleton #

fn Geometry3D.singleton() Geometry3D

fn GeometryInstance3D.new #

fn GeometryInstance3D.new() GeometryInstance3D

fn Gradient.new #

fn Gradient.new() Gradient

fn GradientTexture1D.new #

fn GradientTexture1D.new() GradientTexture1D

fn GradientTexture2D.new #

fn GradientTexture2D.new() GradientTexture2D

fn GraphEdit.new #

fn GraphEdit.new() GraphEdit

fn GraphElement.new #

fn GraphElement.new() GraphElement

fn GraphFrame.new #

fn GraphFrame.new() GraphFrame

fn GraphNode.new #

fn GraphNode.new() GraphNode

fn GridContainer.new #

fn GridContainer.new() GridContainer

fn GridMap.invalid_cell_item #

fn GridMap.invalid_cell_item() int

Invalid cell item that can be used in [method set_cell_item] to clear cells (or represent an empty cell in [method get_cell_item]).

fn GridMap.new #

fn GridMap.new() GridMap

fn GridMapEditorPlugin.new #

fn GridMapEditorPlugin.new() GridMapEditorPlugin

fn GrooveJoint2D.new #

fn GrooveJoint2D.new() GrooveJoint2D

fn HBoxContainer.new #

fn HBoxContainer.new() HBoxContainer

fn HFlowContainer.new #

fn HFlowContainer.new() HFlowContainer

fn HMACContext.new #

fn HMACContext.new() HMACContext

fn HScrollBar.new #

fn HScrollBar.new() HScrollBar

fn HSeparator.new #

fn HSeparator.new() HSeparator

fn HSlider.new #

fn HSlider.new() HSlider

fn HSplitContainer.new #

fn HSplitContainer.new() HSplitContainer

fn HTTPClient.new #

fn HTTPClient.new() HTTPClient

fn HTTPRequest.new #

fn HTTPRequest.new() HTTPRequest

fn HashingContext.new #

fn HashingContext.new() HashingContext

fn HeightMapShape3D.new #

fn HeightMapShape3D.new() HeightMapShape3D

fn HingeJoint3D.new #

fn HingeJoint3D.new() HingeJoint3D

fn IP.resolver_invalid_id #

fn IP.resolver_invalid_id() int

Invalid ID constant. Returned if [constant RESOLVER_MAX_QUERIES] is exceeded.

fn IP.resolver_max_queries #

fn IP.resolver_max_queries() int

Maximum number of concurrent DNS resolver queries allowed, [constant RESOLVER_INVALID_ID] is returned if exceeded.

fn IP.singleton #

fn IP.singleton() IP

fn Image.create #

fn Image.create(width i64, height i64, use_mipmaps bool, format ImageFormat) Image

Creates an empty image of the given size and format. If [param use_mipmaps] is true, generates mipmaps for this image. See the [method generate_mipmaps].

fn Image.create_empty #

fn Image.create_empty(width i64, height i64, use_mipmaps bool, format ImageFormat) Image

Creates an empty image of the given size and format. If [param use_mipmaps] is true, generates mipmaps for this image. See the [method generate_mipmaps].

fn Image.create_from_data #

fn Image.create_from_data(width i64, height i64, use_mipmaps bool, format ImageFormat, data PackedByteArray) Image

Creates a new image of the given size and format. Fills the image with the given raw data. If [param use_mipmaps] is true, loads the mipmaps for this image from [param data]. See [method generate_mipmaps].

fn Image.load_from_file #

fn Image.load_from_file(path string) Image

Creates a new [Image] and loads data from the specified file.

fn Image.max_height #

fn Image.max_height() int

The maximal height allowed for [Image] resources.

fn Image.max_width #

fn Image.max_width() int

The maximal width allowed for [Image] resources.

fn Image.new #

fn Image.new() Image

fn ImageFormatLoaderExtension.new #

fn ImageFormatLoaderExtension.new() ImageFormatLoaderExtension

fn ImageTexture.create_from_image #

fn ImageTexture.create_from_image(image Image) ImageTexture

Creates a new [ImageTexture] and initializes it by allocating and setting the data from an [Image].

fn ImageTexture.new #

fn ImageTexture.new() ImageTexture

fn ImageTexture3D.new #

fn ImageTexture3D.new() ImageTexture3D

fn ImmediateMesh.new #

fn ImmediateMesh.new() ImmediateMesh

fn ImporterMesh.new #

fn ImporterMesh.new() ImporterMesh

fn ImporterMeshInstance3D.new #

fn ImporterMeshInstance3D.new() ImporterMeshInstance3D

fn Input.singleton #

fn Input.singleton() Input

fn InputEvent.device_id_emulation #

fn InputEvent.device_id_emulation() int

Device ID used for emulated mouse input from a touchscreen, or for emulated touch input from a mouse. This can be used to distinguish emulated mouse input from physical mouse input, or emulated touch input from physical touch input.

fn InputEventAction.new #

fn InputEventAction.new() InputEventAction

fn InputEventJoypadButton.new #

fn InputEventJoypadButton.new() InputEventJoypadButton

fn InputEventJoypadMotion.new #

fn InputEventJoypadMotion.new() InputEventJoypadMotion

fn InputEventKey.new #

fn InputEventKey.new() InputEventKey

fn InputEventMIDI.new #

fn InputEventMIDI.new() InputEventMIDI

fn InputEventMagnifyGesture.new #

fn InputEventMagnifyGesture.new() InputEventMagnifyGesture

fn InputEventMouseButton.new #

fn InputEventMouseButton.new() InputEventMouseButton

fn InputEventMouseMotion.new #

fn InputEventMouseMotion.new() InputEventMouseMotion

fn InputEventPanGesture.new #

fn InputEventPanGesture.new() InputEventPanGesture

fn InputEventScreenDrag.new #

fn InputEventScreenDrag.new() InputEventScreenDrag

fn InputEventScreenTouch.new #

fn InputEventScreenTouch.new() InputEventScreenTouch

fn InputEventShortcut.new #

fn InputEventShortcut.new() InputEventShortcut

fn InputMap.new #

fn InputMap.new() InputMap

fn InputMap.singleton #

fn InputMap.singleton() InputMap

fn IntervalTweener.new #

fn IntervalTweener.new() IntervalTweener

fn ItemList.new #

fn ItemList.new() ItemList

fn JNISingleton.new #

fn JNISingleton.new() JNISingleton

fn JSON.from_native #

fn JSON.from_native(variant_ ToVariant, cfg JSON_from_native_Cfg) Variant

Converts a native engine type to a JSON-compliant value. By default, objects are ignored for security reasons, unless [param full_objects] is true. You can convert a native value to a JSON string like this:

func encode_data(value, full_objects = false):
return JSON.stringify(JSON.from_native(value, full_objects))

fn JSON.new #

fn JSON.new() JSON

fn JSON.parse_string #

fn JSON.parse_string(json_string string) Variant

Attempts to parse the [param json_string] provided and returns the parsed data. Returns null if parse failed.

fn JSON.stringify #

fn JSON.stringify(data_ ToVariant, cfg JSON_stringify_Cfg) string

Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network. [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types. [b]Note:[/b] If [param full_precision] is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding. The [param indent] parameter controls if and how something is indented; its contents will be used where there should be an indent in the output. Even spaces like " " will work. \t and \n can also be used for a tab indent, or to make a newline for each indent respectively. [b]Example output:[/b]

#{'name':'my_dictionary','version':'1.0.0','entities':[{'name':'entity_0','value':'value_0'},{'name':'entity_1','value':'value_1'}]}

#{
'name': 'my_dictionary',
'version': '1.0.0',
'entities': [
{
'name': 'entity_0',
'value': 'value_0'
},
{
'name': 'entity_1',
'value': 'value_1'
}
]
}

#{
...'name': 'my_dictionary',
...'version': '1.0.0',
...'entities': [
......{
.........'name': 'entity_0',
.........'value': 'value_0'
......},
......{
.........'name': 'entity_1',
.........'value': 'value_1'
......}
...]
}

fn JSON.to_native #

fn JSON.to_native(json_ ToVariant, cfg JSON_to_native_Cfg) Variant

Converts a JSON-compliant value that was created with [method from_native] back to native engine types. By default, objects are ignored for security reasons, unless [param allow_objects] is true. You can convert a JSON string back to a native value like this:

func decode_data(string, allow_objects = false):
return JSON.to_native(JSON.parse_string(string), allow_objects)

fn JSONRPC.new #

fn JSONRPC.new() JSONRPC

fn JavaClass.new #

fn JavaClass.new() JavaClass

fn JavaClassWrapper.new #

fn JavaClassWrapper.new() JavaClassWrapper

fn JavaClassWrapper.singleton #

fn JavaClassWrapper.singleton() JavaClassWrapper

fn JavaObject.new #

fn JavaObject.new() JavaObject

fn JavaScriptBridge.singleton #

fn JavaScriptBridge.singleton() JavaScriptBridge

fn KinematicCollision2D.new #

fn KinematicCollision2D.new() KinematicCollision2D

fn KinematicCollision3D.new #

fn KinematicCollision3D.new() KinematicCollision3D

fn Label.new #

fn Label.new() Label

fn Label3D.new #

fn Label3D.new() Label3D

fn LabelSettings.new #

fn LabelSettings.new() LabelSettings

fn LightOccluder2D.new #

fn LightOccluder2D.new() LightOccluder2D

fn LightmapGI.new #

fn LightmapGI.new() LightmapGI

fn LightmapGIData.new #

fn LightmapGIData.new() LightmapGIData

fn LightmapProbe.new #

fn LightmapProbe.new() LightmapProbe

fn LightmapperRD.new #

fn LightmapperRD.new() LightmapperRD

fn Line2D.new #

fn Line2D.new() Line2D

fn LineEdit.new #

fn LineEdit.new() LineEdit

fn LinkButton.new #

fn LinkButton.new() LinkButton

fn Logger.new #

fn Logger.new() Logger

fn LookAtModifier3D.new #

fn LookAtModifier3D.new() LookAtModifier3D

fn MainLoop.new #

fn MainLoop.new() MainLoop

fn MainLoop.notification_application_focus_in #

fn MainLoop.notification_application_focus_in() 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. Implemented on desktop and mobile platforms.

fn MainLoop.notification_application_focus_out #

fn MainLoop.notification_application_focus_out() 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. Implemented on desktop and mobile platforms.

fn MainLoop.notification_application_paused #

fn MainLoop.notification_application_paused() int

Notification received from the OS when the application is paused. Specific to the Android and iOS platforms. [b]Note:[/b] On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it.

fn MainLoop.notification_application_resumed #

fn MainLoop.notification_application_resumed() int

Notification received from the OS when the application is resumed. Specific to the Android and iOS platforms.

fn MainLoop.notification_crash #

fn MainLoop.notification_crash() int

Notification received from Godot's crash handler when the engine is about to crash. Implemented on desktop platforms if the crash handler is enabled.

fn MainLoop.notification_os_ime_update #

fn MainLoop.notification_os_ime_update() 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). Specific to the macOS platform.

fn MainLoop.notification_os_memory_warning #

fn MainLoop.notification_os_memory_warning() int

Notification received from the OS when the application is exceeding its allocated memory. Specific to the iOS platform.

fn MainLoop.notification_text_server_changed #

fn MainLoop.notification_text_server_changed() int

Notification received when text server is changed.

fn MainLoop.notification_translation_changed #

fn MainLoop.notification_translation_changed() 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 [method Object.tr].

fn MainLoop.notification_wm_about #

fn MainLoop.notification_wm_about() int

Notification received from the OS when a request for "About" information is sent. Specific to the macOS platform.

fn MarginContainer.new #

fn MarginContainer.new() MarginContainer

fn Marker2D.new #

fn Marker2D.new() Marker2D

fn Marker3D.new #

fn Marker3D.new() Marker3D

fn Marshalls.new #

fn Marshalls.new() Marshalls

fn Marshalls.singleton #

fn Marshalls.singleton() Marshalls

fn Material.new #

fn Material.new() Material

fn Material.render_priority_max #

fn Material.render_priority_max() int

Maximum value for the [member render_priority] parameter.

fn Material.render_priority_min #

fn Material.render_priority_min() int

Minimum value for the [member render_priority] parameter.

fn Mesh.new #

fn Mesh.new() Mesh

fn MeshConvexDecompositionSettings.new #

fn MeshConvexDecompositionSettings.new() MeshConvexDecompositionSettings

fn MeshDataTool.new #

fn MeshDataTool.new() MeshDataTool

fn MeshInstance2D.new #

fn MeshInstance2D.new() MeshInstance2D

fn MeshInstance3D.new #

fn MeshInstance3D.new() MeshInstance3D

fn MeshLibrary.new #

fn MeshLibrary.new() MeshLibrary

fn MeshTexture.new #

fn MeshTexture.new() MeshTexture

fn MethodTweener.new #

fn MethodTweener.new() MethodTweener

fn MissingNode.new #

fn MissingNode.new() MissingNode

fn MissingResource.new #

fn MissingResource.new() MissingResource

fn MobileVRInterface.new #

fn MobileVRInterface.new() MobileVRInterface

fn ModifierBoneTarget3D.new #

fn ModifierBoneTarget3D.new() ModifierBoneTarget3D

fn MovieWriter.add_writer #

fn MovieWriter.add_writer(writer MovieWriter)

Adds a writer to be usable by the engine. The supported file extensions can be set by overriding [method _handles_file]. [b]Note:[/b] [method add_writer] must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine.

fn MovieWriter.new #

fn MovieWriter.new() MovieWriter

fn MultiMesh.new #

fn MultiMesh.new() MultiMesh

fn MultiMeshInstance2D.new #

fn MultiMeshInstance2D.new() MultiMeshInstance2D

fn MultiMeshInstance3D.new #

fn MultiMeshInstance3D.new() MultiMeshInstance3D

fn MultiplayerAPI.create_default_interface #

fn MultiplayerAPI.create_default_interface() MultiplayerAPI

Returns a new instance of the default MultiplayerAPI.

fn MultiplayerAPI.get_default_interface #

fn MultiplayerAPI.get_default_interface() string

Returns the default MultiplayerAPI implementation class name. This is usually "SceneMultiplayer" when [SceneMultiplayer] is available. See [method set_default_interface].

fn MultiplayerAPI.set_default_interface #

fn MultiplayerAPI.set_default_interface(interface_name string)

Sets the default MultiplayerAPI implementation class. This method can be used by modules and extensions to configure which implementation will be used by [SceneTree] when the engine starts.

fn MultiplayerAPIExtension.new #

fn MultiplayerAPIExtension.new() MultiplayerAPIExtension

fn MultiplayerPeer.target_peer_broadcast #

fn MultiplayerPeer.target_peer_broadcast() int

Packets are sent to all connected peers.

fn MultiplayerPeer.target_peer_server #

fn MultiplayerPeer.target_peer_server() int

Packets are sent to the remote peer acting as server.

fn MultiplayerPeerExtension.new #

fn MultiplayerPeerExtension.new() MultiplayerPeerExtension

fn MultiplayerSpawner.new #

fn MultiplayerSpawner.new() MultiplayerSpawner

fn MultiplayerSynchronizer.new #

fn MultiplayerSynchronizer.new() MultiplayerSynchronizer

fn Mutex.new #

fn Mutex.new() Mutex

fn NativeMenu.new #

fn NativeMenu.new() NativeMenu

fn NativeMenu.singleton #

fn NativeMenu.singleton() NativeMenu

fn Nil.new0 #

fn Nil.new0() Nil

fn Nil.new1 #

fn Nil.new1(from_ ToVariant) Nil

fn NinePatchRect.new #

fn NinePatchRect.new() NinePatchRect

fn Node.get_orphan_node_ids #

fn Node.get_orphan_node_ids() Array

Returns object IDs of all orphan nodes (nodes outside the [SceneTree]). Used for debugging. [b]Note:[/b] [method get_orphan_node_ids] only works in debug builds. When called in a project exported in release mode, [method get_orphan_node_ids] will return an empty array.

fn Node.new #

fn Node.new() Node

fn Node.notification_accessibility_invalidate #

fn Node.notification_accessibility_invalidate() int

Notification received when accessibility elements are invalidated. All node accessibility elements are automatically deleted after receiving this message, therefore all existing references to such elements should be discarded.

fn Node.notification_accessibility_update #

fn Node.notification_accessibility_update() int

Notification received when an accessibility information update is required.

fn Node.notification_application_focus_in #

fn Node.notification_application_focus_in() 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. Implemented on desktop and mobile platforms.

fn Node.notification_application_focus_out #

fn Node.notification_application_focus_out() 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. Implemented on desktop and mobile platforms.

fn Node.notification_application_paused #

fn Node.notification_application_paused() int

Notification received from the OS when the application is paused. Specific to the Android and iOS platforms. [b]Note:[/b] On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it.

fn Node.notification_application_resumed #

fn Node.notification_application_resumed() int

Notification received from the OS when the application is resumed. Specific to the Android and iOS platforms.

fn Node.notification_child_order_changed #

fn Node.notification_child_order_changed() int

Notification received when the list of children is changed. This happens when child nodes are added, moved or removed.

fn Node.notification_crash #

fn Node.notification_crash() int

Notification received from Godot's crash handler when the engine is about to crash. Implemented on desktop platforms, if the crash handler is enabled.

fn Node.notification_disabled #

fn Node.notification_disabled() int

Notification received when the node is disabled. See [constant PROCESS_MODE_DISABLED].

fn Node.notification_drag_begin #

fn Node.notification_drag_begin() int

Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one. Can be triggered either by dragging a [Control] that provides drag data (see [method Control._get_drag_data]) or using [method Control.force_drag]. Use [method Viewport.gui_get_drag_data] to get the dragged data.

fn Node.notification_drag_end #

fn Node.notification_drag_end() int

Notification received when a drag operation ends. Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded.

fn Node.notification_editor_post_save #

fn Node.notification_editor_post_save() 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.

fn Node.notification_editor_pre_save #

fn Node.notification_editor_pre_save() 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.

fn Node.notification_enabled #

fn Node.notification_enabled() int

Notification received when the node is enabled again after being disabled. See [constant PROCESS_MODE_DISABLED].

fn Node.notification_enter_tree #

fn Node.notification_enter_tree() int

Notification received when the node enters a [SceneTree]. See [method _enter_tree]. This notification is received [i]before[/i] the related [signal tree_entered] signal.

fn Node.notification_exit_tree #

fn Node.notification_exit_tree() int

Notification received when the node is about to exit a [SceneTree]. See [method _exit_tree]. This notification is received [i]after[/i] the related [signal tree_exiting] signal.

fn Node.notification_internal_physics_process #

fn Node.notification_internal_physics_process() int

Notification received from the tree every physics frame when [method is_physics_processing_internal] returns true.

fn Node.notification_internal_process #

fn Node.notification_internal_process() int

Notification received from the tree every rendered frame when [method is_processing_internal] returns true.

fn Node.notification_moved_in_parent #

fn Node.notification_moved_in_parent() int

fn Node.notification_os_ime_update #

fn Node.notification_os_ime_update() 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). Implemented only on macOS.

fn Node.notification_os_memory_warning #

fn Node.notification_os_memory_warning() int

Notification received from the OS when the application is exceeding its allocated memory. Implemented only on iOS.

fn Node.notification_parented #

fn Node.notification_parented() int

Notification received when the node is set as a child of another node (see [method add_child] and [method add_sibling]). [b]Note:[/b] This does [i]not[/i] mean that the node entered the [SceneTree].

fn Node.notification_path_renamed #

fn Node.notification_path_renamed() int

Notification received when the node's [member name] or one of its ancestors' [member name] is changed. This notification is [i]not[/i] received when the node is removed from the [SceneTree].

fn Node.notification_paused #

fn Node.notification_paused() int

Notification received when the node is paused. See [member process_mode].

fn Node.notification_physics_process #

fn Node.notification_physics_process() int

Notification received from the tree every physics frame when [method is_physics_processing] returns true. See [method _physics_process].

fn Node.notification_post_enter_tree #

fn Node.notification_post_enter_tree() int

Notification received when the node enters the tree, just before [constant NOTIFICATION_READY] may be received. Unlike the latter, it is sent every time the node enters tree, not just once.

fn Node.notification_process #

fn Node.notification_process() int

Notification received from the tree every rendered frame when [method is_processing] returns true. See [method _process].

fn Node.notification_ready #

fn Node.notification_ready() int

Notification received when the node is ready. See [method _ready].

fn Node.notification_reset_physics_interpolation #

fn Node.notification_reset_physics_interpolation() int

Notification received when [method reset_physics_interpolation] is called on the node or its ancestors.

fn Node.notification_scene_instantiated #

fn Node.notification_scene_instantiated() int

Notification received [i]only[/i] by the newly instantiated scene root node, when [method PackedScene.instantiate] is completed.

fn Node.notification_text_server_changed #

fn Node.notification_text_server_changed() int

Notification received when the [TextServer] is changed.

fn Node.notification_translation_changed #

fn Node.notification_translation_changed() int

Notification received when translations may have changed. Can be triggered by the user changing the locale, changing [member auto_translate_mode] or when the node enters the scene tree. 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 [method Object.tr]. [b]Note:[/b] This notification is received alongside [constant NOTIFICATION_ENTER_TREE], so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup translations for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using [method is_node_ready].

func _notification(what):
if what == NOTIFICATION_TRANSLATION_CHANGED:
if not is_node_ready():
await ready ##$Label.text = atr('%d Bananas') % banana_counter

fn Node.notification_unparented #

fn Node.notification_unparented() int

Notification received when the parent node calls [method remove_child] on this node. [b]Note:[/b] This does [i]not[/i] mean that the node exited the [SceneTree].

fn Node.notification_unpaused #

fn Node.notification_unpaused() int

Notification received when the node is unpaused. See [member process_mode].

fn Node.notification_vp_mouse_enter #

fn Node.notification_vp_mouse_enter() int

Notification received when the mouse cursor enters the [Viewport]'s visible area, that is not occluded behind other [Control]s or [Window]s, provided its [member Viewport.gui_disable_input] is false and regardless if it's currently focused or not.

fn Node.notification_vp_mouse_exit #

fn Node.notification_vp_mouse_exit() int

Notification received when the mouse cursor leaves the [Viewport]'s visible area, that is not occluded behind other [Control]s or [Window]s, provided its [member Viewport.gui_disable_input] is false and regardless if it's currently focused or not.

fn Node.notification_wm_about #

fn Node.notification_wm_about() int

Notification received from the OS when a request for "About" information is sent. Implemented only on macOS.

fn Node.notification_wm_close_request #

fn Node.notification_wm_close_request() 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]). Implemented on desktop platforms.

fn Node.notification_wm_dpi_change #

fn Node.notification_wm_dpi_change() int

Notification received from the OS when the screen's dots per inch (DPI) scale is changed. Only implemented on macOS.

fn Node.notification_wm_go_back_request #

fn Node.notification_wm_go_back_request() int

Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). Implemented only on Android.

fn Node.notification_wm_mouse_enter #

fn Node.notification_wm_mouse_enter() int

Notification received when the mouse enters the window. Implemented for embedded windows and on desktop and web platforms.

fn Node.notification_wm_mouse_exit #

fn Node.notification_wm_mouse_exit() int

Notification received when the mouse leaves the window. Implemented for embedded windows and on desktop and web platforms.

fn Node.notification_wm_position_changed #

fn Node.notification_wm_position_changed() int

Notification received when the window is moved.

fn Node.notification_wm_size_changed #

fn Node.notification_wm_size_changed() int

Notification received when the window is resized. [b]Note:[/b] Only the resized [Window] node receives this notification, and it's not propagated to the child nodes.

fn Node.notification_wm_window_focus_in #

fn Node.notification_wm_window_focus_in() int

Notification received from the OS when the node's [Window] ancestor 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 case [constant NOTIFICATION_APPLICATION_FOCUS_IN] is also received). A [Window] node receives this notification when it is focused.

fn Node.notification_wm_window_focus_out #

fn Node.notification_wm_window_focus_out() int

Notification received from the OS when the node's [Window] ancestor 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 case [constant NOTIFICATION_APPLICATION_FOCUS_OUT] is also received). A [Window] node receives this notification when it is defocused.

fn Node.print_orphan_nodes #

fn Node.print_orphan_nodes()

Prints all orphan nodes (nodes outside the [SceneTree]). Useful for debugging. [b]Note:[/b] This method only works in debug builds. Does nothing in a project exported in release mode.

fn Node2D.new #

fn Node2D.new() Node2D

fn Node3D.new #

fn Node3D.new() Node3D

fn Node3D.notification_enter_world #

fn Node3D.notification_enter_world() int

Notification received when this node is registered to a new [World3D] (see [method get_world_3d]).

fn Node3D.notification_exit_world #

fn Node3D.notification_exit_world() int

Notification received when this node is unregistered from the current [World3D] (see [method get_world_3d]).

fn Node3D.notification_local_transform_changed #

fn Node3D.notification_local_transform_changed() int

Notification received when this node's [member transform] changes, if [method is_local_transform_notification_enabled] is true. This is not received when a parent [Node3D]'s [member transform] changes. See also [method set_notify_local_transform]. [b]Note:[/b] Some 3D nodes such as [CSGShape3D] or [CollisionShape3D] automatically enable this to function correctly.

fn Node3D.notification_transform_changed #

fn Node3D.notification_transform_changed() int

Notification received when this node's [member global_transform] changes, if [method is_transform_notification_enabled] is true. See also [method set_notify_transform]. [b]Note:[/b] Most 3D nodes such as [VisualInstance3D] or [CollisionObject3D] automatically enable this to function correctly. [b]Note:[/b] In the editor, nodes will propagate this notification to their children if a gizmo is attached (see [method add_gizmo]).

fn Node3D.notification_visibility_changed #

fn Node3D.notification_visibility_changed() int

Notification received when this node's visibility changes (see [member visible] and [method is_visible_in_tree]). This notification is received [i]before[/i] the related [signal visibility_changed] signal.

fn NodePath.new #

fn NodePath.new(value string) NodePath

fn NodePath.new0 #

fn NodePath.new0() NodePath

Constructs an empty [NodePath].

fn NodePath.new1 #

fn NodePath.new1(from NodePath) NodePath

Constructs a [NodePath] as a copy of the given [NodePath].

fn NodePath.new2 #

fn NodePath.new2(from string) NodePath

Constructs a [NodePath] from a [String]. The created path is absolute if prefixed with a slash (see [method is_absolute]). The "subnames" optionally included after the path to the target node can point to properties, and can also be nested. The following strings can be valid node paths:

##'Level/RigidBody2D/Sprite2D'

######'Level/RigidBody2D/Sprite2D:texture'

##'Level/RigidBody2D/Sprite2D:position'

##'Level/RigidBody2D/Sprite2D:position:x'

##'/root/Level/RigidBody2D'

[b]Note:[/b] In GDScript, it's also possible to convert a constant string into a node path by prefixing it with ^. ^"path/to/node" is equivalent to NodePath("path/to/node").

fn NoiseTexture2D.new #

fn NoiseTexture2D.new() NoiseTexture2D

fn NoiseTexture3D.new #

fn NoiseTexture3D.new() NoiseTexture3D

fn ORMMaterial3D.new #

fn ORMMaterial3D.new() ORMMaterial3D

fn OS.new #

fn OS.new() OS

fn OS.singleton #

fn OS.singleton() OS

fn Object.new #

fn Object.new() Object

fn Object.notification_extension_reloaded #

fn Object.notification_extension_reloaded() int

Notification received when the object finishes hot reloading. This notification is only sent for extensions classes and derived.

fn Object.notification_postinitialize #

fn Object.notification_postinitialize() int

Notification received when the object is initialized, before its script is attached. Used internally.

fn Object.notification_predelete #

fn Object.notification_predelete() int

Notification received when the object is about to be deleted. Can be used like destructors in object-oriented programming languages.

fn OccluderInstance3D.new #

fn OccluderInstance3D.new() OccluderInstance3D

fn OccluderPolygon2D.new #

fn OccluderPolygon2D.new() OccluderPolygon2D

fn OfflineMultiplayerPeer.new #

fn OfflineMultiplayerPeer.new() OfflineMultiplayerPeer

fn OggPacketSequence.new #

fn OggPacketSequence.new() OggPacketSequence

fn OggPacketSequencePlayback.new #

fn OggPacketSequencePlayback.new() OggPacketSequencePlayback

fn OmniLight3D.new #

fn OmniLight3D.new() OmniLight3D

fn OpenXRAPIExtension.new #

fn OpenXRAPIExtension.new() OpenXRAPIExtension

fn OpenXRAPIExtension.openxr_is_enabled #

fn OpenXRAPIExtension.openxr_is_enabled(check_run_in_editor bool) bool

Returns true if OpenXR is enabled.

fn OpenXRAction.new #

fn OpenXRAction.new() OpenXRAction

fn OpenXRActionBindingModifier.new #

fn OpenXRActionBindingModifier.new() OpenXRActionBindingModifier

fn OpenXRActionMap.new #

fn OpenXRActionMap.new() OpenXRActionMap

fn OpenXRActionSet.new #

fn OpenXRActionSet.new() OpenXRActionSet

fn OpenXRAnalogThresholdModifier.new #

fn OpenXRAnalogThresholdModifier.new() OpenXRAnalogThresholdModifier

fn OpenXRBindingModifierEditor.new #

fn OpenXRBindingModifierEditor.new() OpenXRBindingModifierEditor

fn OpenXRCompositionLayerCylinder.new #

fn OpenXRCompositionLayerCylinder.new() OpenXRCompositionLayerCylinder

fn OpenXRCompositionLayerEquirect.new #

fn OpenXRCompositionLayerEquirect.new() OpenXRCompositionLayerEquirect

fn OpenXRCompositionLayerQuad.new #

fn OpenXRCompositionLayerQuad.new() OpenXRCompositionLayerQuad

fn OpenXRDpadBindingModifier.new #

fn OpenXRDpadBindingModifier.new() OpenXRDpadBindingModifier

fn OpenXRExtensionWrapper.new #

fn OpenXRExtensionWrapper.new() OpenXRExtensionWrapper

fn OpenXRExtensionWrapperExtension.new #

fn OpenXRExtensionWrapperExtension.new() OpenXRExtensionWrapperExtension

fn OpenXRFutureExtension.new #

fn OpenXRFutureExtension.new() OpenXRFutureExtension

fn OpenXRHand.new #

fn OpenXRHand.new() OpenXRHand

fn OpenXRHapticVibration.new #

fn OpenXRHapticVibration.new() OpenXRHapticVibration

fn OpenXRIPBinding.new #

fn OpenXRIPBinding.new() OpenXRIPBinding

fn OpenXRIPBindingModifier.new #

fn OpenXRIPBindingModifier.new() OpenXRIPBindingModifier

fn OpenXRInteractionProfile.new #

fn OpenXRInteractionProfile.new() OpenXRInteractionProfile

fn OpenXRInteractionProfileEditor.new #

fn OpenXRInteractionProfileEditor.new() OpenXRInteractionProfileEditor

fn OpenXRInteractionProfileMetadata.new #

fn OpenXRInteractionProfileMetadata.new() OpenXRInteractionProfileMetadata

fn OpenXRInterface.new #

fn OpenXRInterface.new() OpenXRInterface

fn OpenXRVisibilityMask.new #

fn OpenXRVisibilityMask.new() OpenXRVisibilityMask

fn OptimizedTranslation.new #

fn OptimizedTranslation.new() OptimizedTranslation

fn OptionButton.new #

fn OptionButton.new() OptionButton

fn PCKPacker.new #

fn PCKPacker.new() PCKPacker

fn PackedByteArray.new0 #

fn PackedByteArray.new0() PackedByteArray

Constructs an empty [PackedByteArray].

fn PackedByteArray.new1 #

fn PackedByteArray.new1(from PackedByteArray) PackedByteArray

Constructs a [PackedByteArray] as a copy of the given [PackedByteArray].

fn PackedByteArray.new2 #

fn PackedByteArray.new2(from Array) PackedByteArray

Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted.

fn PackedColorArray.new0 #

fn PackedColorArray.new0() PackedColorArray

Constructs an empty [PackedColorArray].

fn PackedColorArray.new1 #

fn PackedColorArray.new1(from PackedColorArray) PackedColorArray

Constructs a [PackedColorArray] as a copy of the given [PackedColorArray].

fn PackedColorArray.new2 #

fn PackedColorArray.new2(from Array) PackedColorArray

Constructs a new [PackedColorArray]. Optionally, you can pass in a generic [Array] that will be converted. [b]Note:[/b] When initializing a [PackedColorArray] with elements, it must be initialized with an [Array] of [Color] values:

var array = PackedColorArray([Color(0.1, 0.2, 0.3), Color(0.4, 0.5, 0.6)])

fn PackedDataContainer.new #

fn PackedDataContainer.new() PackedDataContainer

fn PackedFloat32Array.new0 #

fn PackedFloat32Array.new0() PackedFloat32Array

Constructs an empty [PackedFloat32Array].

fn PackedFloat32Array.new1 #

fn PackedFloat32Array.new1(from PackedFloat32Array) PackedFloat32Array

Constructs a [PackedFloat32Array] as a copy of the given [PackedFloat32Array].

fn PackedFloat32Array.new2 #

fn PackedFloat32Array.new2(from Array) PackedFloat32Array

Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted.

fn PackedFloat64Array.new0 #

fn PackedFloat64Array.new0() PackedFloat64Array

Constructs an empty [PackedFloat64Array].

fn PackedFloat64Array.new1 #

fn PackedFloat64Array.new1(from PackedFloat64Array) PackedFloat64Array

Constructs a [PackedFloat64Array] as a copy of the given [PackedFloat64Array].

fn PackedFloat64Array.new2 #

fn PackedFloat64Array.new2(from Array) PackedFloat64Array

Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted.

fn PackedInt32Array.new0 #

fn PackedInt32Array.new0() PackedInt32Array

Constructs an empty [PackedInt32Array].

fn PackedInt32Array.new1 #

fn PackedInt32Array.new1(from PackedInt32Array) PackedInt32Array

Constructs a [PackedInt32Array] as a copy of the given [PackedInt32Array].

fn PackedInt32Array.new2 #

fn PackedInt32Array.new2(from Array) PackedInt32Array

Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted.

fn PackedInt64Array.new0 #

fn PackedInt64Array.new0() PackedInt64Array

Constructs an empty [PackedInt64Array].

fn PackedInt64Array.new1 #

fn PackedInt64Array.new1(from PackedInt64Array) PackedInt64Array

Constructs a [PackedInt64Array] as a copy of the given [PackedInt64Array].

fn PackedInt64Array.new2 #

fn PackedInt64Array.new2(from Array) PackedInt64Array

Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted.

fn PackedScene.new #

fn PackedScene.new() PackedScene

fn PackedStringArray.new0 #

fn PackedStringArray.new0() PackedStringArray

Constructs an empty [PackedStringArray].

fn PackedStringArray.new1 #

fn PackedStringArray.new1(from PackedStringArray) PackedStringArray

Constructs a [PackedStringArray] as a copy of the given [PackedStringArray].

fn PackedStringArray.new2 #

fn PackedStringArray.new2(from Array) PackedStringArray

Constructs a new [PackedStringArray]. Optionally, you can pass in a generic [Array] that will be converted.

fn PackedVector2Array.new0 #

fn PackedVector2Array.new0() PackedVector2Array

Constructs an empty [PackedVector2Array].

fn PackedVector2Array.new1 #

fn PackedVector2Array.new1(from PackedVector2Array) PackedVector2Array

Constructs a [PackedVector2Array] as a copy of the given [PackedVector2Array].

fn PackedVector2Array.new2 #

fn PackedVector2Array.new2(from Array) PackedVector2Array

Constructs a new [PackedVector2Array]. Optionally, you can pass in a generic [Array] that will be converted. [b]Note:[/b] When initializing a [PackedVector2Array] with elements, it must be initialized with an [Array] of [Vector2] values:

var array = PackedVector2Array([Vector2(12, 34), Vector2(56, 78)])

fn PackedVector3Array.new0 #

fn PackedVector3Array.new0() PackedVector3Array

Constructs an empty [PackedVector3Array].

fn PackedVector3Array.new1 #

fn PackedVector3Array.new1(from PackedVector3Array) PackedVector3Array

Constructs a [PackedVector3Array] as a copy of the given [PackedVector3Array].

fn PackedVector3Array.new2 #

fn PackedVector3Array.new2(from Array) PackedVector3Array

Constructs a new [PackedVector3Array]. Optionally, you can pass in a generic [Array] that will be converted. [b]Note:[/b] When initializing a [PackedVector3Array] with elements, it must be initialized with an [Array] of [Vector3] values:

var array = PackedVector3Array([Vector3(12, 34, 56), Vector3(78, 90, 12)])

fn PackedVector4Array.new0 #

fn PackedVector4Array.new0() PackedVector4Array

Constructs an empty [PackedVector4Array].

fn PackedVector4Array.new1 #

fn PackedVector4Array.new1(from PackedVector4Array) PackedVector4Array

Constructs a [PackedVector4Array] as a copy of the given [PackedVector4Array].

fn PackedVector4Array.new2 #

fn PackedVector4Array.new2(from Array) PackedVector4Array

Constructs a new [PackedVector4Array]. Optionally, you can pass in a generic [Array] that will be converted. [b]Note:[/b] When initializing a [PackedVector4Array] with elements, it must be initialized with an [Array] of [Vector4] values:

var array = PackedVector4Array([Vector4(12, 34, 56, 78), Vector4(90, 12, 34, 56)])

fn PacketPeerDTLS.new #

fn PacketPeerDTLS.new() PacketPeerDTLS

fn PacketPeerExtension.new #

fn PacketPeerExtension.new() PacketPeerExtension

fn PacketPeerStream.new #

fn PacketPeerStream.new() PacketPeerStream

fn PacketPeerUDP.new #

fn PacketPeerUDP.new() PacketPeerUDP

fn Panel.new #

fn Panel.new() Panel

fn PanelContainer.new #

fn PanelContainer.new() PanelContainer

fn PanoramaSkyMaterial.new #

fn PanoramaSkyMaterial.new() PanoramaSkyMaterial

fn Parallax2D.new #

fn Parallax2D.new() Parallax2D

fn ParallaxBackground.new #

fn ParallaxBackground.new() ParallaxBackground

fn ParallaxLayer.new #

fn ParallaxLayer.new() ParallaxLayer

fn ParticleProcessMaterial.new #

fn ParticleProcessMaterial.new() ParticleProcessMaterial

fn Path2D.new #

fn Path2D.new() Path2D

fn Path3D.new #

fn Path3D.new() Path3D

fn PathFollow2D.new #

fn PathFollow2D.new() PathFollow2D

fn PathFollow3D.correct_posture #

fn PathFollow3D.correct_posture(transform Transform3D, rotation_mode PathFollow3DRotationMode) Transform3D

Correct the [param transform]. [param rotation_mode] implicitly specifies how posture (forward, up and sideway direction) is calculated.

fn PathFollow3D.new #

fn PathFollow3D.new() PathFollow3D

fn Performance.new #

fn Performance.new() Performance

fn Performance.singleton #

fn Performance.singleton() Performance

fn PhysicalBone2D.new #

fn PhysicalBone2D.new() PhysicalBone2D

fn PhysicalBone3D.new #

fn PhysicalBone3D.new() PhysicalBone3D

fn PhysicalBoneSimulator3D.new #

fn PhysicalBoneSimulator3D.new() PhysicalBoneSimulator3D

fn PhysicalSkyMaterial.new #

fn PhysicalSkyMaterial.new() PhysicalSkyMaterial

fn PhysicsDirectBodyState2DExtension.new #

fn PhysicsDirectBodyState2DExtension.new() PhysicsDirectBodyState2DExtension

fn PhysicsDirectBodyState3DExtension.new #

fn PhysicsDirectBodyState3DExtension.new() PhysicsDirectBodyState3DExtension

fn PhysicsDirectSpaceState2DExtension.new #

fn PhysicsDirectSpaceState2DExtension.new() PhysicsDirectSpaceState2DExtension

fn PhysicsDirectSpaceState3DExtension.new #

fn PhysicsDirectSpaceState3DExtension.new() PhysicsDirectSpaceState3DExtension

fn PhysicsMaterial.new #

fn PhysicsMaterial.new() PhysicsMaterial

fn PhysicsPointQueryParameters2D.new #

fn PhysicsPointQueryParameters2D.new() PhysicsPointQueryParameters2D

fn PhysicsPointQueryParameters3D.new #

fn PhysicsPointQueryParameters3D.new() PhysicsPointQueryParameters3D

fn PhysicsRayQueryParameters2D.create #

fn PhysicsRayQueryParameters2D.create(from Vector2, to Vector2, cfg PhysicsRayQueryParameters2D_create_Cfg) PhysicsRayQueryParameters2D

Returns a new, pre-configured [PhysicsRayQueryParameters2D] object. Use it to quickly create query parameters using the most common options.

var query = PhysicsRayQueryParameters2D.create(global_position, global_position + Vector2(0, 100))
var collision = get_world_2d().direct_space_state.intersect_ray(query)

fn PhysicsRayQueryParameters2D.new #

fn PhysicsRayQueryParameters2D.new() PhysicsRayQueryParameters2D

fn PhysicsRayQueryParameters3D.create #

fn PhysicsRayQueryParameters3D.create(from Vector3, to Vector3, cfg PhysicsRayQueryParameters3D_create_Cfg) PhysicsRayQueryParameters3D

Returns a new, pre-configured [PhysicsRayQueryParameters3D] object. Use it to quickly create query parameters using the most common options.

var query = PhysicsRayQueryParameters3D.create(position, position + Vector3(0, -10, 0))
var collision = get_world_3d().direct_space_state.intersect_ray(query)

fn PhysicsRayQueryParameters3D.new #

fn PhysicsRayQueryParameters3D.new() PhysicsRayQueryParameters3D

fn PhysicsServer2D.singleton #

fn PhysicsServer2D.singleton() PhysicsServer2D

fn PhysicsServer2DExtension.new #

fn PhysicsServer2DExtension.new() PhysicsServer2DExtension

fn PhysicsServer2DManager.new #

fn PhysicsServer2DManager.new() PhysicsServer2DManager

fn PhysicsServer2DManager.singleton #

fn PhysicsServer2DManager.singleton() PhysicsServer2DManager

fn PhysicsServer3D.singleton #

fn PhysicsServer3D.singleton() PhysicsServer3D

fn PhysicsServer3DExtension.new #

fn PhysicsServer3DExtension.new() PhysicsServer3DExtension

fn PhysicsServer3DManager.new #

fn PhysicsServer3DManager.new() PhysicsServer3DManager

fn PhysicsServer3DManager.singleton #

fn PhysicsServer3DManager.singleton() PhysicsServer3DManager

fn PhysicsServer3DRenderingServerHandler.new #

fn PhysicsServer3DRenderingServerHandler.new() PhysicsServer3DRenderingServerHandler

fn PhysicsShapeQueryParameters2D.new #

fn PhysicsShapeQueryParameters2D.new() PhysicsShapeQueryParameters2D

fn PhysicsShapeQueryParameters3D.new #

fn PhysicsShapeQueryParameters3D.new() PhysicsShapeQueryParameters3D

fn PhysicsTestMotionParameters2D.new #

fn PhysicsTestMotionParameters2D.new() PhysicsTestMotionParameters2D

fn PhysicsTestMotionParameters3D.new #

fn PhysicsTestMotionParameters3D.new() PhysicsTestMotionParameters3D

fn PhysicsTestMotionResult2D.new #

fn PhysicsTestMotionResult2D.new() PhysicsTestMotionResult2D

fn PhysicsTestMotionResult3D.new #

fn PhysicsTestMotionResult3D.new() PhysicsTestMotionResult3D

fn PinJoint2D.new #

fn PinJoint2D.new() PinJoint2D

fn PinJoint3D.new #

fn PinJoint3D.new() PinJoint3D

fn PlaceholderCubemap.new #

fn PlaceholderCubemap.new() PlaceholderCubemap

fn PlaceholderCubemapArray.new #

fn PlaceholderCubemapArray.new() PlaceholderCubemapArray

fn PlaceholderMaterial.new #

fn PlaceholderMaterial.new() PlaceholderMaterial

fn PlaceholderMesh.new #

fn PlaceholderMesh.new() PlaceholderMesh

fn PlaceholderTexture2D.new #

fn PlaceholderTexture2D.new() PlaceholderTexture2D

fn PlaceholderTexture2DArray.new #

fn PlaceholderTexture2DArray.new() PlaceholderTexture2DArray

fn PlaceholderTexture3D.new #

fn PlaceholderTexture3D.new() PlaceholderTexture3D

fn Plane.new0 #

fn Plane.new0() Plane

Constructs a default-initialized [Plane] with all components set to 0.

fn Plane.new1 #

fn Plane.new1(from Plane) Plane

Constructs a [Plane] as a copy of the given [Plane].

fn Plane.new2 #

fn Plane.new2(normal Vector3) Plane

Creates a plane from the normal vector. The plane will intersect the origin. The [param normal] of the plane must be a unit vector.

fn Plane.new3 #

fn Plane.new3(normal Vector3, d f64) Plane

Creates a plane from the normal vector and the plane's distance from the origin. The [param normal] of the plane must be a unit vector.

fn Plane.new4 #

fn Plane.new4(normal Vector3, point Vector3) Plane

Creates a plane from the normal vector and a point on the plane. The [param normal] of the plane must be a unit vector.

fn Plane.new5 #

fn Plane.new5(point1 Vector3, point2 Vector3, point3 Vector3) Plane

Creates a plane from the three points, given in clockwise order.

fn Plane.new6 #

fn Plane.new6(a f64, b f64, c f64, d f64) Plane

Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [param a], [param b] and [param c], and the plane has a distance of [param d] from the origin.

fn Plane.plane_xy #

fn Plane.plane_xy() Plane

A plane that extends in the X and Y axes (normal vector points +Z).

fn Plane.plane_xz #

fn Plane.plane_xz() Plane

A plane that extends in the X and Z axes (normal vector points +Y).

fn Plane.plane_yz #

fn Plane.plane_yz() Plane

A plane that extends in the Y and Z axes (normal vector points +X).

fn PlaneMesh.new #

fn PlaneMesh.new() PlaneMesh

fn PointLight2D.new #

fn PointLight2D.new() PointLight2D

fn PointMesh.new #

fn PointMesh.new() PointMesh

fn Polygon2D.new #

fn Polygon2D.new() Polygon2D

fn PolygonOccluder3D.new #

fn PolygonOccluder3D.new() PolygonOccluder3D

fn PolygonPathFinder.new #

fn PolygonPathFinder.new() PolygonPathFinder

fn Popup.new #

fn Popup.new() Popup

fn PopupMenu.new #

fn PopupMenu.new() PopupMenu

fn PopupPanel.new #

fn PopupPanel.new() PopupPanel

fn PortableCompressedTexture2D.is_keeping_all_compressed_buffers #

fn PortableCompressedTexture2D.is_keeping_all_compressed_buffers() bool

Return whether the flag is overridden for all textures of this type.

fn PortableCompressedTexture2D.new #

fn PortableCompressedTexture2D.new() PortableCompressedTexture2D

fn PortableCompressedTexture2D.set_keep_all_compressed_buffers #

fn PortableCompressedTexture2D.set_keep_all_compressed_buffers(keep bool)

Overrides the flag globally for all textures of this type. This is used primarily by the editor.

fn PrimitiveMesh.new #

fn PrimitiveMesh.new() PrimitiveMesh

fn PrismMesh.new #

fn PrismMesh.new() PrismMesh

fn ProceduralSkyMaterial.new #

fn ProceduralSkyMaterial.new() ProceduralSkyMaterial

fn ProgressBar.new #

fn ProgressBar.new() ProgressBar

fn ProjectSettings.new #

fn ProjectSettings.new() ProjectSettings

fn ProjectSettings.singleton #

fn ProjectSettings.singleton() ProjectSettings

fn Projection.create_depth_correction #

fn Projection.create_depth_correction(flip_y bool) Projection

Creates a new [Projection] that projects positions from a depth range of -1 to 1 to one that ranges from 0 to 1, and flips the projected positions vertically, according to [param flip_y].

fn Projection.create_fit_aabb #

fn Projection.create_fit_aabb(aabb AABB) Projection

Creates a new [Projection] that scales a given projection to fit around a given [AABB] in projection space.

fn Projection.create_for_hmd #

fn Projection.create_for_hmd(eye i64, aspect f64, intraocular_dist f64, display_width f64, display_to_lens f64, oversample f64, z_near f64, z_far f64) Projection

Creates a new [Projection] for projecting positions onto a head-mounted display with the given X:Y aspect ratio, distance between eyes, display width, distance to lens, oversampling factor, and depth clipping planes. [param eye] creates the projection for the left eye when set to 1, or the right eye when set to 2.

fn Projection.create_frustum #

fn Projection.create_frustum(left f64, right f64, bottom f64, top f64, z_near f64, z_far f64) Projection

Creates a new [Projection] that projects positions in a frustum with the given clipping planes.

fn Projection.create_frustum_aspect #

fn Projection.create_frustum_aspect(size f64, aspect f64, offset Vector2, z_near f64, z_far f64, cfg Projection_create_frustum_aspect_Cfg) Projection

Creates a new [Projection] that projects positions in a frustum with the given size, X:Y aspect ratio, offset, and clipping planes. [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.

fn Projection.create_light_atlas_rect #

fn Projection.create_light_atlas_rect(rect Rect2) Projection

Creates a new [Projection] that projects positions into the given [Rect2].

fn Projection.create_orthogonal #

fn Projection.create_orthogonal(left f64, right f64, bottom f64, top f64, z_near f64, z_far f64) Projection

Creates a new [Projection] that projects positions using an orthogonal projection with the given clipping planes.

fn Projection.create_orthogonal_aspect #

fn Projection.create_orthogonal_aspect(size f64, aspect f64, z_near f64, z_far f64, cfg Projection_create_orthogonal_aspect_Cfg) Projection

Creates a new [Projection] that projects positions using an orthogonal projection with the given size, X:Y aspect ratio, and clipping planes. [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.

fn Projection.create_perspective #

fn Projection.create_perspective(fovy f64, aspect f64, z_near f64, z_far f64, cfg Projection_create_perspective_Cfg) Projection

Creates a new [Projection] that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping planes. [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.

fn Projection.create_perspective_hmd #

fn Projection.create_perspective_hmd(fovy f64, aspect f64, z_near f64, z_far f64, flip_fov bool, eye i64, intraocular_dist f64, convergence_dist f64) Projection

Creates a new [Projection] that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping distances. The projection is adjusted for a head-mounted display with the given distance between eyes and distance to a point that can be focused on. [param eye] creates the projection for the left eye when set to 1, or the right eye when set to 2. [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.

fn Projection.get_fovy #

fn Projection.get_fovy(fovx f64, aspect f64) f64

Returns the vertical field of view of the projection (in degrees) associated with the given horizontal field of view (in degrees) and aspect ratio. [b]Note:[/b] Unlike most methods of [Projection], [param aspect] is expected to be 1 divided by the X:Y aspect ratio.

fn Projection.identity #

fn Projection.identity() Projection

A [Projection] with no transformation defined. When applied to other data structures, no transformation is performed.

fn Projection.new0 #

fn Projection.new0() Projection

Constructs a default-initialized [Projection] identical to [constant IDENTITY]. [b]Note:[/b] In C#, this constructs a [Projection] identical to [constant ZERO].

fn Projection.new1 #

fn Projection.new1(from Projection) Projection

Constructs a [Projection] as a copy of the given [Projection].

fn Projection.new2 #

fn Projection.new2(from Transform3D) Projection

Constructs a Projection as a copy of the given [Transform3D].

fn Projection.new3 #

fn Projection.new3(x_axis Vector4, y_axis Vector4, z_axis Vector4, w_axis Vector4) Projection

Constructs a Projection from four [Vector4] values (matrix columns).

fn Projection.zero #

fn Projection.zero() Projection

A [Projection] with all values initialized to 0. When applied to other data structures, they will be zeroed.

fn PropertyTweener.new #

fn PropertyTweener.new() PropertyTweener

fn QuadMesh.new #

fn QuadMesh.new() QuadMesh

fn QuadOccluder3D.new #

fn QuadOccluder3D.new() QuadOccluder3D

fn Quaternion.from_euler #

fn Quaternion.from_euler(euler Vector3) Quaternion

Constructs a new [Quaternion] from the given [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians. This method always uses the YXZ convention ([constant EULER_ORDER_YXZ]).

fn Quaternion.identity #

fn Quaternion.identity() Quaternion

The identity quaternion, representing no rotation. This has the same rotation as [constant Basis.IDENTITY]. If a [Vector3] is rotated (multiplied) by this quaternion, it does not change. [b]Note:[/b] In GDScript, this constant is equivalent to creating a [constructor Quaternion] without any arguments. It can be used to make your code clearer, and for consistency with C#.

fn Quaternion.new0 #

fn Quaternion.new0() Quaternion

Constructs a [Quaternion] identical to [constant IDENTITY]. [b]Note:[/b] In C#, this constructs a [Quaternion] with all of its components set to 0.0.

fn Quaternion.new1 #

fn Quaternion.new1(from Quaternion) Quaternion

Constructs a [Quaternion] as a copy of the given [Quaternion].

fn Quaternion.new2 #

fn Quaternion.new2(from Basis) Quaternion

Constructs a [Quaternion] from the given rotation [Basis]. This constructor is faster than [method Basis.get_rotation_quaternion], but the given basis must be [i]orthonormalized[/i] (see [method Basis.orthonormalized]). Otherwise, the constructor fails and returns [constant IDENTITY].

fn Quaternion.new3 #

fn Quaternion.new3(axis Vector3, angle f64) Quaternion

Constructs a [Quaternion] representing rotation around the [param axis] by the given [param angle], in radians. The axis must be a normalized vector.

fn Quaternion.new4 #

fn Quaternion.new4(arc_from Vector3, arc_to Vector3) Quaternion

Constructs a [Quaternion] representing the shortest arc between [param arc_from] and [param arc_to]. These can be imagined as two points intersecting a sphere's surface, with a radius of 1.0.

fn Quaternion.new5 #

fn Quaternion.new5(x f64, y f64, z f64, w f64) Quaternion

Constructs a [Quaternion] defined by the given values. [b]Note:[/b] Only normalized quaternions represent rotation; if these values are not normalized, the new [Quaternion] will not be a valid rotation.

fn RDAttachmentFormat.new #

fn RDAttachmentFormat.new() RDAttachmentFormat

fn RDFramebufferPass.attachment_unused #

fn RDFramebufferPass.attachment_unused() int

Attachment is unused.

fn RDFramebufferPass.new #

fn RDFramebufferPass.new() RDFramebufferPass

fn RDPipelineColorBlendState.new #

fn RDPipelineColorBlendState.new() RDPipelineColorBlendState

fn RDPipelineColorBlendStateAttachment.new #

fn RDPipelineColorBlendStateAttachment.new() RDPipelineColorBlendStateAttachment

fn RDPipelineDepthStencilState.new #

fn RDPipelineDepthStencilState.new() RDPipelineDepthStencilState

fn RDPipelineMultisampleState.new #

fn RDPipelineMultisampleState.new() RDPipelineMultisampleState

fn RDPipelineRasterizationState.new #

fn RDPipelineRasterizationState.new() RDPipelineRasterizationState

fn RDPipelineSpecializationConstant.new #

fn RDPipelineSpecializationConstant.new() RDPipelineSpecializationConstant

fn RDSamplerState.new #

fn RDSamplerState.new() RDSamplerState

fn RDShaderFile.new #

fn RDShaderFile.new() RDShaderFile

fn RDShaderSPIRV.new #

fn RDShaderSPIRV.new() RDShaderSPIRV

fn RDShaderSource.new #

fn RDShaderSource.new() RDShaderSource

fn RDTextureFormat.new #

fn RDTextureFormat.new() RDTextureFormat

fn RDTextureView.new #

fn RDTextureView.new() RDTextureView

fn RDUniform.new #

fn RDUniform.new() RDUniform

fn RDVertexAttribute.new #

fn RDVertexAttribute.new() RDVertexAttribute

fn RID.new0 #

fn RID.new0() RID

Constructs an empty [RID] with the invalid ID 0.

fn RID.new1 #

fn RID.new1(from RID) RID

Constructs a [RID] as a copy of the given [RID].

fn RandomNumberGenerator.new #

fn RandomNumberGenerator.new() RandomNumberGenerator

fn Range.new #

fn Range.new() Range

fn RayCast2D.new #

fn RayCast2D.new() RayCast2D

fn RayCast3D.new #

fn RayCast3D.new() RayCast3D

fn Rect2.new0 #

fn Rect2.new0() Rect2

Constructs a [Rect2] with its [member position] and [member size] set to [constant Vector2.ZERO].

fn Rect2.new1 #

fn Rect2.new1(from Rect2) Rect2

Constructs a [Rect2] as a copy of the given [Rect2].

fn Rect2.new2 #

fn Rect2.new2(from Rect2i) Rect2

Constructs a [Rect2] from a [Rect2i].

fn Rect2.new3 #

fn Rect2.new3(position Vector2, size Vector2) Rect2

Constructs a [Rect2] by [param position] and [param size].

fn Rect2.new4 #

fn Rect2.new4(x f64, y f64, width f64, height f64) Rect2

Constructs a [Rect2] by setting its [member position] to ([param x], [param y]), and its [member size] to ([param width], [param height]).

fn Rect2i.new0 #

fn Rect2i.new0() Rect2i

Constructs a [Rect2i] with its [member position] and [member size] set to [constant Vector2i.ZERO].

fn Rect2i.new1 #

fn Rect2i.new1(from Rect2i) Rect2i

Constructs a [Rect2i] as a copy of the given [Rect2i].

fn Rect2i.new2 #

fn Rect2i.new2(from Rect2) Rect2i

Constructs a [Rect2i] from a [Rect2]. The floating-point coordinates are truncated.

fn Rect2i.new3 #

fn Rect2i.new3(position Vector2i, size Vector2i) Rect2i

Constructs a [Rect2i] by [param position] and [param size].

fn Rect2i.new4 #

fn Rect2i.new4(x i64, y i64, width i64, height i64) Rect2i

Constructs a [Rect2i] by setting its [member position] to ([param x], [param y]), and its [member size] to ([param width], [param height]).

fn RectangleShape2D.new #

fn RectangleShape2D.new() RectangleShape2D

fn Ref.new #

fn Ref.new[T]() Ref[T]

Constructor

fn RefCounted.new #

fn RefCounted.new() RefCounted

fn ReferenceRect.new #

fn ReferenceRect.new() ReferenceRect

fn ReflectionProbe.new #

fn ReflectionProbe.new() ReflectionProbe

fn RegEx.create_from_string #

fn RegEx.create_from_string(pattern string, cfg RegEx_create_from_string_Cfg) RegEx

Creates and compiles a new [RegEx] object. See also [method compile].

fn RegEx.new #

fn RegEx.new() RegEx

fn RegExMatch.new #

fn RegExMatch.new() RegExMatch

fn RemoteTransform2D.new #

fn RemoteTransform2D.new() RemoteTransform2D

fn RemoteTransform3D.new #

fn RemoteTransform3D.new() RemoteTransform3D

fn RenderDataExtension.new #

fn RenderDataExtension.new() RenderDataExtension

fn RenderDataRD.new #

fn RenderDataRD.new() RenderDataRD

fn RenderSceneBuffersConfiguration.new #

fn RenderSceneBuffersConfiguration.new() RenderSceneBuffersConfiguration

fn RenderSceneBuffersExtension.new #

fn RenderSceneBuffersExtension.new() RenderSceneBuffersExtension

fn RenderSceneBuffersRD.new #

fn RenderSceneBuffersRD.new() RenderSceneBuffersRD

fn RenderSceneDataExtension.new #

fn RenderSceneDataExtension.new() RenderSceneDataExtension

fn RenderSceneDataRD.new #

fn RenderSceneDataRD.new() RenderSceneDataRD

fn RenderingDevice.invalid_format_id #

fn RenderingDevice.invalid_format_id() int

Returned by functions that return a format ID if a value is invalid.

fn RenderingDevice.invalid_id #

fn RenderingDevice.invalid_id() int

Returned by functions that return an ID if a value is invalid.

fn RenderingServer.array_custom_count #

fn RenderingServer.array_custom_count() int

The number of custom data arrays available ([constant ARRAY_CUSTOM0], [constant ARRAY_CUSTOM1], [constant ARRAY_CUSTOM2], [constant ARRAY_CUSTOM3]).

fn RenderingServer.array_weights_size #

fn RenderingServer.array_weights_size() int

Number of weights/bones per vertex.

fn RenderingServer.canvas_item_z_max #

fn RenderingServer.canvas_item_z_max() int

The maximum Z-layer for canvas items.

fn RenderingServer.canvas_item_z_min #

fn RenderingServer.canvas_item_z_min() int

The minimum Z-layer for canvas items.

fn RenderingServer.canvas_layer_max #

fn RenderingServer.canvas_layer_max() int

The maximum canvas layer.

fn RenderingServer.canvas_layer_min #

fn RenderingServer.canvas_layer_min() int

The minimum canvas layer.

fn RenderingServer.material_render_priority_max #

fn RenderingServer.material_render_priority_max() int

The maximum renderpriority of all materials.

fn RenderingServer.material_render_priority_min #

fn RenderingServer.material_render_priority_min() int

The minimum renderpriority of all materials.

fn RenderingServer.max_2d_directional_lights #

fn RenderingServer.max_2d_directional_lights() int

The maximum number of directional lights that can be rendered at a given time in 2D.

fn RenderingServer.max_cursors #

fn RenderingServer.max_cursors() int

fn RenderingServer.max_glow_levels #

fn RenderingServer.max_glow_levels() int

The maximum number of glow levels that can be used with the glow post-processing effect.

fn RenderingServer.max_mesh_surfaces #

fn RenderingServer.max_mesh_surfaces() int

The maximum number of surfaces a mesh can have.

fn RenderingServer.no_index_array #

fn RenderingServer.no_index_array() int

Marks an error that shows that the index array is empty.

fn RenderingServer.particles_emit_flag_color #

fn RenderingServer.particles_emit_flag_color() int

fn RenderingServer.particles_emit_flag_custom #

fn RenderingServer.particles_emit_flag_custom() int

fn RenderingServer.particles_emit_flag_position #

fn RenderingServer.particles_emit_flag_position() int

fn RenderingServer.particles_emit_flag_rotation_scale #

fn RenderingServer.particles_emit_flag_rotation_scale() int

fn RenderingServer.particles_emit_flag_velocity #

fn RenderingServer.particles_emit_flag_velocity() int

fn RenderingServer.singleton #

fn RenderingServer.singleton() RenderingServer

fn Resource.generate_scene_unique_id #

fn Resource.generate_scene_unique_id() string

Generates a unique identifier for a resource to be contained inside a [PackedScene], based on the current date, time, and a random value. The returned string is only composed of letters (a to y) and numbers (0 to 8). See also [member resource_scene_unique_id].

fn Resource.new #

fn Resource.new() Resource

fn ResourceFormatLoader.new #

fn ResourceFormatLoader.new() ResourceFormatLoader

fn ResourceFormatSaver.new #

fn ResourceFormatSaver.new() ResourceFormatSaver

fn ResourceImporterBMFont.new #

fn ResourceImporterBMFont.new() ResourceImporterBMFont

fn ResourceImporterBitMap.new #

fn ResourceImporterBitMap.new() ResourceImporterBitMap

fn ResourceImporterCSVTranslation.new #

fn ResourceImporterCSVTranslation.new() ResourceImporterCSVTranslation

fn ResourceImporterDynamicFont.new #

fn ResourceImporterDynamicFont.new() ResourceImporterDynamicFont

fn ResourceImporterImage.new #

fn ResourceImporterImage.new() ResourceImporterImage

fn ResourceImporterImageFont.new #

fn ResourceImporterImageFont.new() ResourceImporterImageFont

fn ResourceImporterLayeredTexture.new #

fn ResourceImporterLayeredTexture.new() ResourceImporterLayeredTexture

fn ResourceImporterMP3.new #

fn ResourceImporterMP3.new() ResourceImporterMP3

fn ResourceImporterOBJ.new #

fn ResourceImporterOBJ.new() ResourceImporterOBJ

fn ResourceImporterOggVorbis.load_from_buffer #

fn ResourceImporterOggVorbis.load_from_buffer(stream_data PackedByteArray) AudioStreamOggVorbis

Creates a new [AudioStreamOggVorbis] instance from the given buffer. The buffer must contain Ogg Vorbis data.

fn ResourceImporterOggVorbis.load_from_file #

fn ResourceImporterOggVorbis.load_from_file(path string) AudioStreamOggVorbis

Creates a new [AudioStreamOggVorbis] instance from the given file path. The file must be in Ogg Vorbis format.

fn ResourceImporterOggVorbis.new #

fn ResourceImporterOggVorbis.new() ResourceImporterOggVorbis

fn ResourceImporterSVG.new #

fn ResourceImporterSVG.new() ResourceImporterSVG

fn ResourceImporterScene.new #

fn ResourceImporterScene.new() ResourceImporterScene

fn ResourceImporterShaderFile.new #

fn ResourceImporterShaderFile.new() ResourceImporterShaderFile

fn ResourceImporterTexture.new #

fn ResourceImporterTexture.new() ResourceImporterTexture

fn ResourceImporterTextureAtlas.new #

fn ResourceImporterTextureAtlas.new() ResourceImporterTextureAtlas

fn ResourceImporterWAV.new #

fn ResourceImporterWAV.new() ResourceImporterWAV

fn ResourceLoader.new #

fn ResourceLoader.new() ResourceLoader

fn ResourceLoader.singleton #

fn ResourceLoader.singleton() ResourceLoader

fn ResourcePreloader.new #

fn ResourcePreloader.new() ResourcePreloader

fn ResourceSaver.new #

fn ResourceSaver.new() ResourceSaver

fn ResourceSaver.singleton #

fn ResourceSaver.singleton() ResourceSaver

fn ResourceUID.ensure_path #

fn ResourceUID.ensure_path(path_or_uid string) string

Returns a path, converting [param path_or_uid] if necessary. Prints an error if provided an invalid UID.

fn ResourceUID.invalid_id #

fn ResourceUID.invalid_id() int

The value to use for an invalid UID, for example if the resource could not be loaded. Its text representation is uid://<invalid>.

fn ResourceUID.path_to_uid #

fn ResourceUID.path_to_uid(path string) string

Converts the provided resource [param path] to a UID. Returns the unchanged path if it has no associated UID.

fn ResourceUID.singleton #

fn ResourceUID.singleton() ResourceUID

fn ResourceUID.uid_to_path #

fn ResourceUID.uid_to_path(uid string) string

Converts the provided [param uid] to a path. Prints an error if the UID is invalid.

fn RetargetModifier3D.new #

fn RetargetModifier3D.new() RetargetModifier3D

fn RibbonTrailMesh.new #

fn RibbonTrailMesh.new() RibbonTrailMesh

fn RichTextEffect.new #

fn RichTextEffect.new() RichTextEffect

fn RichTextLabel.new #

fn RichTextLabel.new() RichTextLabel

fn RigidBody2D.new #

fn RigidBody2D.new() RigidBody2D

fn RigidBody3D.new #

fn RigidBody3D.new() RigidBody3D

fn RootMotionView.new #

fn RootMotionView.new() RootMotionView

fn SVGTexture.create_from_string #

fn SVGTexture.create_from_string(source string, cfg SVGTexture_create_from_string_Cfg) SVGTexture

Creates a new [SVGTexture] and initializes it by allocating and setting the SVG data from string.

fn SVGTexture.new #

fn SVGTexture.new() SVGTexture

fn SceneMultiplayer.new #

fn SceneMultiplayer.new() SceneMultiplayer

fn SceneReplicationConfig.new #

fn SceneReplicationConfig.new() SceneReplicationConfig

fn SceneTree.new #

fn SceneTree.new() SceneTree

fn ScriptBacktrace.new #

fn ScriptBacktrace.new() ScriptBacktrace

fn ScriptCreateDialog.new #

fn ScriptCreateDialog.new() ScriptCreateDialog

fn ScriptExtension.new #

fn ScriptExtension.new() ScriptExtension

fn ScriptLanguageExtension.new #

fn ScriptLanguageExtension.new() ScriptLanguageExtension

fn ScrollContainer.new #

fn ScrollContainer.new() ScrollContainer

fn SegmentShape2D.new #

fn SegmentShape2D.new() SegmentShape2D

fn Semaphore.new #

fn Semaphore.new() Semaphore

fn SeparationRayShape2D.new #

fn SeparationRayShape2D.new() SeparationRayShape2D

fn SeparationRayShape3D.new #

fn SeparationRayShape3D.new() SeparationRayShape3D

fn Shader.new #

fn Shader.new() Shader

fn ShaderGlobalsOverride.new #

fn ShaderGlobalsOverride.new() ShaderGlobalsOverride

fn ShaderInclude.new #

fn ShaderInclude.new() ShaderInclude

fn ShaderIncludeDB.get_built_in_include_file #

fn ShaderIncludeDB.get_built_in_include_file(filename string) string

Returns the code for the built-in shader fragment. You can also access this in your shader code through #include "filename".

fn ShaderIncludeDB.has_built_in_include_file #

fn ShaderIncludeDB.has_built_in_include_file(filename string) bool

Returns true if an include file with this name exists.

fn ShaderIncludeDB.list_built_in_include_files #

fn ShaderIncludeDB.list_built_in_include_files() PackedStringArray

Returns a list of built-in include files that are currently registered.

fn ShaderIncludeDB.new #

fn ShaderIncludeDB.new() ShaderIncludeDB

fn ShaderMaterial.new #

fn ShaderMaterial.new() ShaderMaterial

fn ShapeCast2D.new #

fn ShapeCast2D.new() ShapeCast2D

fn ShapeCast3D.new #

fn ShapeCast3D.new() ShapeCast3D

fn Shortcut.new #

fn Shortcut.new() Shortcut

fn Signal.new0 #

fn Signal.new0() Signal

Constructs an empty [Signal] with no object nor signal name bound.

fn Signal.new1 #

fn Signal.new1(from Signal) Signal

Constructs a [Signal] as a copy of the given [Signal].

fn Signal.new2 #

fn Signal.new2(object Object, signal string) Signal

Creates a [Signal] object referencing a signal named [param signal] in the specified [param object].

fn Skeleton2D.new #

fn Skeleton2D.new() Skeleton2D

fn Skeleton3D.new #

fn Skeleton3D.new() Skeleton3D

fn Skeleton3D.notification_update_skeleton #

fn Skeleton3D.notification_update_skeleton() int

Notification received when this skeleton's pose needs to be updated. In that case, this is called only once per frame in a deferred process.

fn SkeletonIK3D.new #

fn SkeletonIK3D.new() SkeletonIK3D

fn SkeletonModification2D.new #

fn SkeletonModification2D.new() SkeletonModification2D

fn SkeletonModification2DCCDIK.new #

fn SkeletonModification2DCCDIK.new() SkeletonModification2DCCDIK

fn SkeletonModification2DFABRIK.new #

fn SkeletonModification2DFABRIK.new() SkeletonModification2DFABRIK

fn SkeletonModification2DJiggle.new #

fn SkeletonModification2DJiggle.new() SkeletonModification2DJiggle

fn SkeletonModification2DLookAt.new #

fn SkeletonModification2DLookAt.new() SkeletonModification2DLookAt

fn SkeletonModification2DPhysicalBones.new #

fn SkeletonModification2DPhysicalBones.new() SkeletonModification2DPhysicalBones

fn SkeletonModification2DStackHolder.new #

fn SkeletonModification2DStackHolder.new() SkeletonModification2DStackHolder

fn SkeletonModification2DTwoBoneIK.new #

fn SkeletonModification2DTwoBoneIK.new() SkeletonModification2DTwoBoneIK

fn SkeletonModificationStack2D.new #

fn SkeletonModificationStack2D.new() SkeletonModificationStack2D

fn SkeletonModifier3D.new #

fn SkeletonModifier3D.new() SkeletonModifier3D

fn SkeletonProfile.new #

fn SkeletonProfile.new() SkeletonProfile

fn SkeletonProfileHumanoid.new #

fn SkeletonProfileHumanoid.new() SkeletonProfileHumanoid

fn Skin.new #

fn Skin.new() Skin

fn Sky.new #

fn Sky.new() Sky

fn SliderJoint3D.new #

fn SliderJoint3D.new() SliderJoint3D

fn SoftBody3D.new #

fn SoftBody3D.new() SoftBody3D

fn SphereMesh.new #

fn SphereMesh.new() SphereMesh

fn SphereOccluder3D.new #

fn SphereOccluder3D.new() SphereOccluder3D

fn SphereShape3D.new #

fn SphereShape3D.new() SphereShape3D

fn SpinBox.new #

fn SpinBox.new() SpinBox

fn SplitContainer.new #

fn SplitContainer.new() SplitContainer

fn SpotLight3D.new #

fn SpotLight3D.new() SpotLight3D

fn SpringArm3D.new #

fn SpringArm3D.new() SpringArm3D

fn SpringBoneCollision3D.new #

fn SpringBoneCollision3D.new() SpringBoneCollision3D

fn SpringBoneCollisionCapsule3D.new #

fn SpringBoneCollisionCapsule3D.new() SpringBoneCollisionCapsule3D

fn SpringBoneCollisionPlane3D.new #

fn SpringBoneCollisionPlane3D.new() SpringBoneCollisionPlane3D

fn SpringBoneCollisionSphere3D.new #

fn SpringBoneCollisionSphere3D.new() SpringBoneCollisionSphere3D

fn SpringBoneSimulator3D.new #

fn SpringBoneSimulator3D.new() SpringBoneSimulator3D

fn Sprite2D.new #

fn Sprite2D.new() Sprite2D

fn Sprite3D.new #

fn Sprite3D.new() Sprite3D

fn SpriteFrames.new #

fn SpriteFrames.new() SpriteFrames

fn StandardMaterial3D.new #

fn StandardMaterial3D.new() StandardMaterial3D

fn StaticBody2D.new #

fn StaticBody2D.new() StaticBody2D

fn StaticBody3D.new #

fn StaticBody3D.new() StaticBody3D

fn StatusIndicator.new #

fn StatusIndicator.new() StatusIndicator

fn StreamPeerBuffer.new #

fn StreamPeerBuffer.new() StreamPeerBuffer

fn StreamPeerExtension.new #

fn StreamPeerExtension.new() StreamPeerExtension

fn StreamPeerGZIP.new #

fn StreamPeerGZIP.new() StreamPeerGZIP

fn StreamPeerTCP.new #

fn StreamPeerTCP.new() StreamPeerTCP

fn StreamPeerTLS.new #

fn StreamPeerTLS.new() StreamPeerTLS

fn String.chr #

fn String.chr(code i64) String

Returns a single Unicode character from the integer [param code]. You may use [url=https://unicodelookup.com/]unicodelookup.com[/url] or [url=https://www.unicode.org/charts/]unicode.org[/url] as points of reference.

print(String.chr(65))     ##print(String.chr(129302)) ##

See also [method unicode_at], [method @GDScript.char], and [method @GDScript.ord].

fn String.humanize_size #

fn String.humanize_size(size i64) String

Converts [param size] which represents a number of bytes into a human-readable form. The result is in [url=https://en.wikipedia.org/wiki/Binary_prefix#IEC_prefixes]IEC prefix format[/url], which may end in either "B", "KiB", "MiB", "GiB", "TiB", "PiB", or "EiB".

fn String.new #

fn String.new(value string) String

fn String.new0 #

fn String.new0() String

Constructs an empty [String] ("").

fn String.new1 #

fn String.new1(from string) String

Constructs a [String] as a copy of the given [String].

fn String.new2 #

fn String.new2(from string) String

Constructs a new [String] from the given [StringName].

fn String.new3 #

fn String.new3(from NodePath) String

Constructs a new [String] from the given [NodePath].

fn String.num #

fn String.num(number f64, cfg String_num_Cfg) String

Converts a [float] to a string representation of a decimal number, with the number of decimal places specified in [param decimals]. If [param decimals] is -1 as by default, the string representation may only have up to 14 significant digits, with digits before the decimal point having priority over digits after. Trailing zeros are not included in the string. The last digit is rounded, not truncated.

String.num(3.141593)     ##String.num(3.141593, 3)  ##String.num(3.14159300)   ##
####String.num(42.129999, 5) ##
##String.num(-0.0000012345432123454321)     ##String.num(-10000.0000012345432123454321) ##

fn String.num_int64 #

fn String.num_int64(number i64, cfg String_num_int64_Cfg) String

Converts the given [param number] to a string representation, with the given [param base]. By default, [param base] is set to decimal (10). Other common bases in programming include binary (2), [url=https://en.wikipedia.org/wiki/Octal]octal[/url] (8), hexadecimal (16). If [param capitalize_hex] is true, digits higher than 9 are represented in uppercase.

fn String.num_scientific #

fn String.num_scientific(number f64) String

Converts the given [param number] to a string representation, in scientific notation. [codeblocks] [gdscript] var n = -5.2e8 print(n) # Prints -520000000 print(String.num_scientific(n)) # Prints -5.2e+08 [/gdscript] [csharp] // This method is not implemented in C#. // Use string.ToString() with "e" to achieve similar results. var n = -5.2e8f; GD.Print(n); // Prints -520000000 GD.Print(n.ToString("e1")); // Prints -5.2e+008 [/csharp] [/codeblocks] [b]Note:[/b] In C#, this method is not implemented. To achieve similar results, see C#'s [url=https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings]Standard numeric format strings[/url].

fn String.num_uint64 #

fn String.num_uint64(number i64, cfg String_num_uint64_Cfg) String

Converts the given unsigned [int] to a string representation, with the given [param base]. By default, [param base] is set to decimal (10). Other common bases in programming include binary (2), [url=https://en.wikipedia.org/wiki/Octal]octal[/url] (8), hexadecimal (16). If [param capitalize_hex] is true, digits higher than 9 are represented in uppercase.

fn StringName.new #

fn StringName.new(value string) StringName

fn StringName.new0 #

fn StringName.new0() StringName

Constructs an empty [StringName].

fn StringName.new1 #

fn StringName.new1(from string) StringName

Constructs a [StringName] as a copy of the given [StringName].

fn StringName.new2 #

fn StringName.new2(from string) StringName

Creates a new [StringName] from the given [String]. In GDScript, StringName("example") is equivalent to &"example".

fn StyleBox.new #

fn StyleBox.new() StyleBox

fn StyleBoxEmpty.new #

fn StyleBoxEmpty.new() StyleBoxEmpty

fn StyleBoxFlat.new #

fn StyleBoxFlat.new() StyleBoxFlat

fn StyleBoxLine.new #

fn StyleBoxLine.new() StyleBoxLine

fn StyleBoxTexture.new #

fn StyleBoxTexture.new() StyleBoxTexture

fn SubViewport.new #

fn SubViewport.new() SubViewport

fn SubViewportContainer.new #

fn SubViewportContainer.new() SubViewportContainer

fn SubtweenTweener.new #

fn SubtweenTweener.new() SubtweenTweener

fn SurfaceTool.new #

fn SurfaceTool.new() SurfaceTool

fn SyntaxHighlighter.new #

fn SyntaxHighlighter.new() SyntaxHighlighter

fn SystemFont.new #

fn SystemFont.new() SystemFont

fn TCPServer.new #

fn TCPServer.new() TCPServer

fn TLSOptions.client #

fn TLSOptions.client(cfg TLSOptions_client_Cfg) TLSOptions

Creates a TLS client configuration which validates certificates and their common names (fully qualified domain names). You can specify a custom [param trusted_chain] of certification authorities (the default CA list will be used if null), and optionally provide a [param common_name_override] if you expect the certificate to have a common name other than the server FQDN. [b]Note:[/b] On the Web platform, TLS verification is always enforced against the CA list of the web browser. This is considered a security feature.

fn TLSOptions.client_unsafe #

fn TLSOptions.client_unsafe(cfg TLSOptions_client_unsafe_Cfg) TLSOptions

Creates an [b]unsafe[/b] TLS client configuration where certificate validation is optional. You can optionally provide a valid [param trusted_chain], but the common name of the certificates will never be checked. Using this configuration for purposes other than testing [b]is not recommended[/b]. [b]Note:[/b] On the Web platform, TLS verification is always enforced against the CA list of the web browser. This is considered a security feature.

fn TLSOptions.server #

fn TLSOptions.server(key CryptoKey, certificate X509Certificate) TLSOptions

Creates a TLS server configuration using the provided [param key] and [param certificate]. [b]Note:[/b] The [param certificate] should include the full certificate chain up to the signing CA (certificates file can be concatenated using a general purpose text editor).

fn TabBar.new #

fn TabBar.new() TabBar

fn TabContainer.new #

fn TabContainer.new() TabContainer

fn TextEdit.new #

fn TextEdit.new() TextEdit

fn TextLine.new #

fn TextLine.new() TextLine

fn TextMesh.new #

fn TextMesh.new() TextMesh

fn TextParagraph.new #

fn TextParagraph.new() TextParagraph

fn TextServerAdvanced.new #

fn TextServerAdvanced.new() TextServerAdvanced

fn TextServerDummy.new #

fn TextServerDummy.new() TextServerDummy

fn TextServerExtension.new #

fn TextServerExtension.new() TextServerExtension

fn TextServerManager.new #

fn TextServerManager.new() TextServerManager

fn TextServerManager.singleton #

fn TextServerManager.singleton() TextServerManager

fn Texture.new #

fn Texture.new() Texture

fn Texture2D.new #

fn Texture2D.new() Texture2D

fn Texture2DArray.new #

fn Texture2DArray.new() Texture2DArray

fn Texture2DArrayRD.new #

fn Texture2DArrayRD.new() Texture2DArrayRD

fn Texture2DRD.new #

fn Texture2DRD.new() Texture2DRD

fn Texture3D.new #

fn Texture3D.new() Texture3D

fn Texture3DRD.new #

fn Texture3DRD.new() Texture3DRD

fn TextureButton.new #

fn TextureButton.new() TextureButton

fn TextureCubemapArrayRD.new #

fn TextureCubemapArrayRD.new() TextureCubemapArrayRD

fn TextureCubemapRD.new #

fn TextureCubemapRD.new() TextureCubemapRD

fn TextureLayered.new #

fn TextureLayered.new() TextureLayered

fn TextureProgressBar.new #

fn TextureProgressBar.new() TextureProgressBar

fn TextureRect.new #

fn TextureRect.new() TextureRect

fn Theme.new #

fn Theme.new() Theme

fn ThemeDB.new #

fn ThemeDB.new() ThemeDB

fn ThemeDB.singleton #

fn ThemeDB.singleton() ThemeDB

fn Thread.new #

fn Thread.new() Thread

fn Thread.set_thread_safety_checks_enabled #

fn Thread.set_thread_safety_checks_enabled(enabled bool)

Sets whether the thread safety checks the engine normally performs in methods of certain classes (e.g., [Node]) should happen [b]on the current thread[/b]. The default, for every thread, is that they are enabled (as if called with [param enabled] being true). Those checks are conservative. That means that they will only succeed in considering a call thread-safe (and therefore allow it to happen) if the engine can guarantee such safety. Because of that, there may be cases where the user may want to disable them ([param enabled] being false) to make certain operations allowed again. By doing so, it becomes the user's responsibility to ensure thread safety (e.g., by using [Mutex]) for those objects that are otherwise protected by the engine. [b]Note:[/b] This is an advanced usage of the engine. You are advised to use it only if you know what you are doing and there is no safer way. [b]Note:[/b] This is useful for scripts running on either arbitrary [Thread] objects or tasks submitted to the [WorkerThreadPool]. It doesn't apply to code running during [Node] group processing, where the checks will be always performed. [b]Note:[/b] Even in the case of having disabled the checks in a [WorkerThreadPool] task, there's no need to re-enable them at the end. The engine will do so.

fn TileData.new #

fn TileData.new() TileData

fn TileMap.new #

fn TileMap.new() TileMap

fn TileMapLayer.new #

fn TileMapLayer.new() TileMapLayer

fn TileMapPattern.new #

fn TileMapPattern.new() TileMapPattern

fn TileSet.new #

fn TileSet.new() TileSet

fn TileSetAtlasSource.new #

fn TileSetAtlasSource.new() TileSetAtlasSource

fn TileSetAtlasSource.transform_flip_h #

fn TileSetAtlasSource.transform_flip_h() int

Represents cell's horizontal flip flag. Should be used directly with [TileMapLayer] to flip placed tiles by altering their alternative IDs.

var alternate_id = $TileMapLayer.get_cell_alternative_tile(Vector2i(2, 2))
if not alternate_id & TileSetAtlasSource.TRANSFORM_FLIP_H:
##$TileMapLayer.set_cell(Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H)

[b]Note:[/b] These transformations can be combined to do the equivalent of 0, 90, 180, and 270 degree rotations, as shown below:

enum TileTransform {
ROTATE_0 = 0,
ROTATE_90 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_H,
ROTATE_180 = TileSetAtlasSource.TRANSFORM_FLIP_H | TileSetAtlasSource.TRANSFORM_FLIP_V,
ROTATE_270 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_V,
}

fn TileSetAtlasSource.transform_flip_v #

fn TileSetAtlasSource.transform_flip_v() int

Represents cell's vertical flip flag. See [constant TRANSFORM_FLIP_H] for usage.

fn TileSetAtlasSource.transform_transpose #

fn TileSetAtlasSource.transform_transpose() int

Represents cell's transposed flag. See [constant TRANSFORM_FLIP_H] for usage.

fn TileSetScenesCollectionSource.new #

fn TileSetScenesCollectionSource.new() TileSetScenesCollectionSource

fn Time.new #

fn Time.new() Time

fn Time.singleton #

fn Time.singleton() Time

fn Timer.new #

fn Timer.new() Timer

fn TorusMesh.new #

fn TorusMesh.new() TorusMesh

fn TouchScreenButton.new #

fn TouchScreenButton.new() TouchScreenButton

fn Transform2D.flip_x #

fn Transform2D.flip_x() Transform2D

When any transform is multiplied by [constant FLIP_X], it negates all components of the [member x] axis (the X column). When [constant FLIP_X] is multiplied by any transform, it negates the [member Vector2.x] component of all axes (the X row).

fn Transform2D.flip_y #

fn Transform2D.flip_y() Transform2D

When any transform is multiplied by [constant FLIP_Y], it negates all components of the [member y] axis (the Y column). When [constant FLIP_Y] is multiplied by any transform, it negates the [member Vector2.y] component of all axes (the Y row).

fn Transform2D.identity #

fn Transform2D.identity() Transform2D

The identity [Transform2D]. This is a transform with no translation, no rotation, and a scale of [constant Vector2.ONE]. This also means that:- The [member x] points right ([constant Vector2.RIGHT]);

  • The [member y] points down ([constant Vector2.DOWN]).
var transform = Transform2D.IDENTITY
print('| X | Y | Origin')
print('| %.f | %.f | %.f' % [transform.x.x, transform.y.x, transform.origin.x])
print('| %.f | %.f | %.f' % [transform.x.y, transform.y.y, transform.origin.y])
########

If a [Vector2], a [Rect2], a [PackedVector2Array], or another [Transform2D] is transformed (multiplied) by this constant, no transformation occurs. [b]Note:[/b] In GDScript, this constant is equivalent to creating a [constructor Transform2D] without any arguments. It can be used to make your code clearer, and for consistency with C#.

fn Transform2D.new0 #

fn Transform2D.new0() Transform2D

Constructs a [Transform2D] identical to [constant IDENTITY]. [b]Note:[/b] In C#, this constructs a [Transform2D] with all of its components set to [constant Vector2.ZERO].

fn Transform2D.new1 #

fn Transform2D.new1(from Transform2D) Transform2D

Constructs a [Transform2D] as a copy of the given [Transform2D].

fn Transform2D.new2 #

fn Transform2D.new2(rotation f64, position Vector2) Transform2D

Constructs a [Transform2D] from a given angle (in radians) and position.

fn Transform2D.new3 #

fn Transform2D.new3(rotation f64, scale Vector2, skew f64, position Vector2) Transform2D

Constructs a [Transform2D] from a given angle (in radians), scale, skew (in radians), and position.

fn Transform2D.new4 #

fn Transform2D.new4(x_axis Vector2, y_axis Vector2, origin Vector2) Transform2D

Constructs a [Transform2D] from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three matrix columns).

fn Transform3D.flip_x #

fn Transform3D.flip_x() Transform3D

[Transform3D] with mirroring applied perpendicular to the YZ plane. Its [member basis] is equal to [constant Basis.FLIP_X].

fn Transform3D.flip_y #

fn Transform3D.flip_y() Transform3D

[Transform3D] with mirroring applied perpendicular to the XZ plane. Its [member basis] is equal to [constant Basis.FLIP_Y].

fn Transform3D.flip_z #

fn Transform3D.flip_z() Transform3D

[Transform3D] with mirroring applied perpendicular to the XY plane. Its [member basis] is equal to [constant Basis.FLIP_Z].

fn Transform3D.identity #

fn Transform3D.identity() Transform3D

The identity [Transform3D]. This is a transform with no translation, no rotation, and a scale of [constant Vector3.ONE]. Its [member basis] is equal to [constant Basis.IDENTITY]. This also means that:- Its [member Basis.x] points right ([constant Vector3.RIGHT]);

  • Its [member Basis.y] points up ([constant Vector3.UP]);
  • Its [member Basis.z] points back ([constant Vector3.BACK]).
var transform = Transform3D.IDENTITY
var basis = transform.basis
print('| X | Y | Z | Origin')
print('| %.f | %.f | %.f | %.f' % [basis.x.x, basis.y.x, basis.z.x, transform.origin.x])
print('| %.f | %.f | %.f | %.f' % [basis.x.y, basis.y.y, basis.z.y, transform.origin.y])
print('| %.f | %.f | %.f | %.f' % [basis.x.z, basis.y.z, basis.z.z, transform.origin.z])
##########

If a [Vector3], an [AABB], a [Plane], a [PackedVector3Array], or another [Transform3D] is transformed (multiplied) by this constant, no transformation occurs. [b]Note:[/b] In GDScript, this constant is equivalent to creating a [constructor Transform3D] without any arguments. It can be used to make your code clearer, and for consistency with C#.

fn Transform3D.new0 #

fn Transform3D.new0() Transform3D

Constructs a [Transform3D] identical to [constant IDENTITY]. [b]Note:[/b] In C#, this constructs a [Transform3D] with its [member origin] and the components of its [member basis] set to [constant Vector3.ZERO].

fn Transform3D.new1 #

fn Transform3D.new1(from Transform3D) Transform3D

Constructs a [Transform3D] as a copy of the given [Transform3D].

fn Transform3D.new2 #

fn Transform3D.new2(basis Basis, origin Vector3) Transform3D

Constructs a [Transform3D] from a [Basis] and [Vector3].

fn Transform3D.new3 #

fn Transform3D.new3(x_axis Vector3, y_axis Vector3, z_axis Vector3, origin Vector3) Transform3D

Constructs a [Transform3D] from four [Vector3] values (also called matrix columns). The first three arguments are the [member basis]'s axes ([member Basis.x], [member Basis.y], and [member Basis.z]).

fn Transform3D.new4 #

fn Transform3D.new4(from Projection) Transform3D

Constructs a [Transform3D] from a [Projection]. Because [Transform3D] is a 3×4 matrix and [Projection] is a 4×4 matrix, this operation trims the last row of the projection matrix (from.x.w, from.y.w, from.z.w, and from.w.w are not included in the new transform).

fn Translation.new #

fn Translation.new() Translation

fn TranslationDomain.new #

fn TranslationDomain.new() TranslationDomain

fn TranslationServer.new #

fn TranslationServer.new() TranslationServer

fn TranslationServer.singleton #

fn TranslationServer.singleton() TranslationServer

fn Tree.new #

fn Tree.new() Tree

fn TriangleMesh.new #

fn TriangleMesh.new() TriangleMesh

fn TubeTrailMesh.new #

fn TubeTrailMesh.new() TubeTrailMesh

fn Tween.interpolate_value #

fn Tween.interpolate_value(initial_value_ ToVariant, delta_value_ ToVariant, elapsed_time f64, duration f64, trans_type TweenTransitionType, ease_type TweenEaseType) Variant

This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing. [param initial_value] is the starting value of the interpolation. [param delta_value] is the change of the value in the interpolation, i.e. it's equal to final_value - initial_value. [param elapsed_time] is the time in seconds that passed after the interpolation started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [param duration], the interpolated value will be halfway between initial and final values. This value can also be greater than [param duration] or lower than 0, which will extrapolate the value. [param duration] is the total time of the interpolation. [b]Note:[/b] If [param duration] is equal to 0, the method will always return the final value, regardless of [param elapsed_time] provided.

fn Tween.new #

fn Tween.new() Tween

fn UDPServer.new #

fn UDPServer.new() UDPServer

fn UPNP.new #

fn UPNP.new() UPNP

fn UPNPDevice.new #

fn UPNPDevice.new() UPNPDevice

fn UndoRedo.new #

fn UndoRedo.new() UndoRedo

fn UniformSetCacheRD.get_cache #

fn UniformSetCacheRD.get_cache(shader RID, set i64, uniforms Array) RID

Creates/returns a cached uniform set based on the provided uniforms for a given shader.

fn UniformSetCacheRD.new #

fn UniformSetCacheRD.new() UniformSetCacheRD

fn VBoxContainer.new #

fn VBoxContainer.new() VBoxContainer

fn VFlowContainer.new #

fn VFlowContainer.new() VFlowContainer

fn VScrollBar.new #

fn VScrollBar.new() VScrollBar

fn VSeparator.new #

fn VSeparator.new() VSeparator

fn VSlider.new #

fn VSlider.new() VSlider

fn VSplitContainer.new #

fn VSplitContainer.new() VSplitContainer

fn Variant.from_bool #

fn Variant.from_bool(src bool) Variant

fn Variant.from_f64 #

fn Variant.from_f64(src f64) Variant

fn Variant.from_i64 #

fn Variant.from_i64(src i64) Variant

fn Variant.from_int #

fn Variant.from_int(src int) Variant

fn Vector2.down #

fn Vector2.down() Vector2

Down unit vector. Y is down in 2D, so this vector points +Y.

fn Vector2.from_angle #

fn Vector2.from_angle(angle f64) Vector2

Creates a [Vector2] rotated to the given [param angle] in radians. This is equivalent to doing Vector2(cos(angle), sin(angle)) or Vector2.RIGHT.rotated(angle).

print(Vector2.from_angle(0)) ##print(Vector2(1, 0).angle()) ##print(Vector2.from_angle(PI / 2)) ##

[b]Note:[/b] The length of the returned [Vector2] is [i]approximately[/i] 1.0, but is is not guaranteed to be exactly 1.0 due to floating-point precision issues. Call [method normalized] on the returned [Vector2] if you require a unit vector.

fn Vector2.inf #

fn Vector2.inf() Vector2

Infinity vector, a vector with all components set to [constant @GDScript.INF].

fn Vector2.left #

fn Vector2.left() Vector2

Left unit vector. Represents the direction of left.

fn Vector2.new0 #

fn Vector2.new0() Vector2

Constructs a default-initialized [Vector2] with all components set to 0.

fn Vector2.new1 #

fn Vector2.new1(from Vector2) Vector2

Constructs a [Vector2] as a copy of the given [Vector2].

fn Vector2.new2 #

fn Vector2.new2(from Vector2i) Vector2

Constructs a new [Vector2] from [Vector2i].

fn Vector2.new3 #

fn Vector2.new3(x f64, y f64) Vector2

Constructs a new [Vector2] from the given [param x] and [param y].

fn Vector2.one #

fn Vector2.one() Vector2

One vector, a vector with all components set to 1.

fn Vector2.right #

fn Vector2.right() Vector2

Right unit vector. Represents the direction of right.

fn Vector2.up #

fn Vector2.up() Vector2

Up unit vector. Y is down in 2D, so this vector points -Y.

fn Vector2.zero #

fn Vector2.zero() Vector2

Zero vector, a vector with all components set to 0.

fn Vector2i.down #

fn Vector2i.down() Vector2i

Down unit vector. Y is down in 2D, so this vector points +Y.

fn Vector2i.left #

fn Vector2i.left() Vector2i

Left unit vector. Represents the direction of left.

fn Vector2i.max #

fn Vector2i.max() Vector2i

Max vector, a vector with all components equal to INT32_MAX. Can be used as an integer equivalent of [constant Vector2.INF].

fn Vector2i.min #

fn Vector2i.min() Vector2i

Min vector, a vector with all components equal to INT32_MIN. Can be used as a negative integer equivalent of [constant Vector2.INF].

fn Vector2i.new0 #

fn Vector2i.new0() Vector2i

Constructs a default-initialized [Vector2i] with all components set to 0.

fn Vector2i.new1 #

fn Vector2i.new1(from Vector2i) Vector2i

Constructs a [Vector2i] as a copy of the given [Vector2i].

fn Vector2i.new2 #

fn Vector2i.new2(from Vector2) Vector2i

Constructs a new [Vector2i] from the given [Vector2] by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of [method Vector2.ceil], [method Vector2.floor] or [method Vector2.round] to this constructor instead.

fn Vector2i.new3 #

fn Vector2i.new3(x i64, y i64) Vector2i

Constructs a new [Vector2i] from the given [param x] and [param y].

fn Vector2i.one #

fn Vector2i.one() Vector2i

One vector, a vector with all components set to 1.

fn Vector2i.right #

fn Vector2i.right() Vector2i

Right unit vector. Represents the direction of right.

fn Vector2i.up #

fn Vector2i.up() Vector2i

Up unit vector. Y is down in 2D, so this vector points -Y.

fn Vector2i.zero #

fn Vector2i.zero() Vector2i

Zero vector, a vector with all components set to 0.

fn Vector3.back #

fn Vector3.back() Vector3

Back unit vector. Represents the local direction of back, and the global direction of south.

fn Vector3.down #

fn Vector3.down() Vector3

Down unit vector.

fn Vector3.forward #

fn Vector3.forward() Vector3

Forward unit vector. Represents the local direction of forward, and the global direction of north. Keep in mind that the forward direction for lights, cameras, etc is different from 3D assets like characters, which face towards the camera by convention. Use [constant Vector3.MODEL_FRONT] and similar constants when working in 3D asset space.

fn Vector3.inf #

fn Vector3.inf() Vector3

Infinity vector, a vector with all components set to [constant @GDScript.INF].

fn Vector3.left #

fn Vector3.left() Vector3

Left unit vector. Represents the local direction of left, and the global direction of west.

fn Vector3.model_bottom #

fn Vector3.model_bottom() Vector3

Unit vector pointing towards the bottom side (down) of imported 3D assets.

fn Vector3.model_front #

fn Vector3.model_front() Vector3

Unit vector pointing towards the front side (facing forward) of imported 3D assets.

fn Vector3.model_left #

fn Vector3.model_left() Vector3

Unit vector pointing towards the left side of imported 3D assets.

fn Vector3.model_rear #

fn Vector3.model_rear() Vector3

Unit vector pointing towards the rear side (back) of imported 3D assets.

fn Vector3.model_right #

fn Vector3.model_right() Vector3

Unit vector pointing towards the right side of imported 3D assets.

fn Vector3.model_top #

fn Vector3.model_top() Vector3

Unit vector pointing towards the top side (up) of imported 3D assets.

fn Vector3.new0 #

fn Vector3.new0() Vector3

Constructs a default-initialized [Vector3] with all components set to 0.

fn Vector3.new1 #

fn Vector3.new1(from Vector3) Vector3

Constructs a [Vector3] as a copy of the given [Vector3].

fn Vector3.new2 #

fn Vector3.new2(from Vector3i) Vector3

Constructs a new [Vector3] from [Vector3i].

fn Vector3.new3 #

fn Vector3.new3(x f64, y f64, z f64) Vector3

Returns a [Vector3] with the given components.

fn Vector3.octahedron_decode #

fn Vector3.octahedron_decode(uv Vector2) Vector3

Returns the [Vector3] from an octahedral-compressed form created using [method octahedron_encode] (stored as a [Vector2]).

fn Vector3.one #

fn Vector3.one() Vector3

One vector, a vector with all components set to 1.

fn Vector3.right #

fn Vector3.right() Vector3

Right unit vector. Represents the local direction of right, and the global direction of east.

fn Vector3.up #

fn Vector3.up() Vector3

Up unit vector.

fn Vector3.zero #

fn Vector3.zero() Vector3

Zero vector, a vector with all components set to 0.

fn Vector3i.back #

fn Vector3i.back() Vector3i

Back unit vector. Represents the local direction of back, and the global direction of south.

fn Vector3i.down #

fn Vector3i.down() Vector3i

Down unit vector.

fn Vector3i.forward #

fn Vector3i.forward() Vector3i

Forward unit vector. Represents the local direction of forward, and the global direction of north.

fn Vector3i.left #

fn Vector3i.left() Vector3i

Left unit vector. Represents the local direction of left, and the global direction of west.

fn Vector3i.max #

fn Vector3i.max() Vector3i

Max vector, a vector with all components equal to INT32_MAX. Can be used as an integer equivalent of [constant Vector3.INF].

fn Vector3i.min #

fn Vector3i.min() Vector3i

Min vector, a vector with all components equal to INT32_MIN. Can be used as a negative integer equivalent of [constant Vector3.INF].

fn Vector3i.new0 #

fn Vector3i.new0() Vector3i

Constructs a default-initialized [Vector3i] with all components set to 0.

fn Vector3i.new1 #

fn Vector3i.new1(from Vector3i) Vector3i

Constructs a [Vector3i] as a copy of the given [Vector3i].

fn Vector3i.new2 #

fn Vector3i.new2(from Vector3) Vector3i

Constructs a new [Vector3i] from the given [Vector3] by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of [method Vector3.ceil], [method Vector3.floor] or [method Vector3.round] to this constructor instead.

fn Vector3i.new3 #

fn Vector3i.new3(x i64, y i64, z i64) Vector3i

Returns a [Vector3i] with the given components.

fn Vector3i.one #

fn Vector3i.one() Vector3i

One vector, a vector with all components set to 1.

fn Vector3i.right #

fn Vector3i.right() Vector3i

Right unit vector. Represents the local direction of right, and the global direction of east.

fn Vector3i.up #

fn Vector3i.up() Vector3i

Up unit vector.

fn Vector3i.zero #

fn Vector3i.zero() Vector3i

Zero vector, a vector with all components set to 0.

fn Vector4.inf #

fn Vector4.inf() Vector4

Infinity vector, a vector with all components set to [constant @GDScript.INF].

fn Vector4.new0 #

fn Vector4.new0() Vector4

Constructs a default-initialized [Vector4] with all components set to 0.

fn Vector4.new1 #

fn Vector4.new1(from Vector4) Vector4

Constructs a [Vector4] as a copy of the given [Vector4].

fn Vector4.new2 #

fn Vector4.new2(from Vector4i) Vector4

Constructs a new [Vector4] from the given [Vector4i].

fn Vector4.new3 #

fn Vector4.new3(x f64, y f64, z f64, w f64) Vector4

Returns a [Vector4] with the given components.

fn Vector4.one #

fn Vector4.one() Vector4

One vector, a vector with all components set to 1.

fn Vector4.zero #

fn Vector4.zero() Vector4

Zero vector, a vector with all components set to 0.

fn Vector4i.max #

fn Vector4i.max() Vector4i

Max vector, a vector with all components equal to INT32_MAX. Can be used as an integer equivalent of [constant Vector4.INF].

fn Vector4i.min #

fn Vector4i.min() Vector4i

Min vector, a vector with all components equal to INT32_MIN. Can be used as a negative integer equivalent of [constant Vector4.INF].

fn Vector4i.new0 #

fn Vector4i.new0() Vector4i

Constructs a default-initialized [Vector4i] with all components set to 0.

fn Vector4i.new1 #

fn Vector4i.new1(from Vector4i) Vector4i

Constructs a [Vector4i] as a copy of the given [Vector4i].

fn Vector4i.new2 #

fn Vector4i.new2(from Vector4) Vector4i

Constructs a new [Vector4i] from the given [Vector4] by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of [method Vector4.ceil], [method Vector4.floor] or [method Vector4.round] to this constructor instead.

fn Vector4i.new3 #

fn Vector4i.new3(x i64, y i64, z i64, w i64) Vector4i

Returns a [Vector4i] with the given components.

fn Vector4i.one #

fn Vector4i.one() Vector4i

One vector, a vector with all components set to 1.

fn Vector4i.zero #

fn Vector4i.zero() Vector4i

Zero vector, a vector with all components set to 0.

fn VehicleBody3D.new #

fn VehicleBody3D.new() VehicleBody3D

fn VehicleWheel3D.new #

fn VehicleWheel3D.new() VehicleWheel3D

fn VideoStream.new #

fn VideoStream.new() VideoStream

fn VideoStreamPlayback.new #

fn VideoStreamPlayback.new() VideoStreamPlayback

fn VideoStreamPlayer.new #

fn VideoStreamPlayer.new() VideoStreamPlayer

fn VideoStreamTheora.new #

fn VideoStreamTheora.new() VideoStreamTheora

fn ViewportTexture.new #

fn ViewportTexture.new() ViewportTexture

fn VisibleOnScreenEnabler2D.new #

fn VisibleOnScreenEnabler2D.new() VisibleOnScreenEnabler2D

fn VisibleOnScreenEnabler3D.new #

fn VisibleOnScreenEnabler3D.new() VisibleOnScreenEnabler3D

fn VisibleOnScreenNotifier2D.new #

fn VisibleOnScreenNotifier2D.new() VisibleOnScreenNotifier2D

fn VisibleOnScreenNotifier3D.new #

fn VisibleOnScreenNotifier3D.new() VisibleOnScreenNotifier3D

fn VisualInstance3D.new #

fn VisualInstance3D.new() VisualInstance3D

fn VisualShader.new #

fn VisualShader.new() VisualShader

fn VisualShader.node_id_invalid #

fn VisualShader.node_id_invalid() int

Indicates an invalid [VisualShader] node.

fn VisualShader.node_id_output #

fn VisualShader.node_id_output() int

Indicates an output node of [VisualShader].

fn VisualShaderNodeBillboard.new #

fn VisualShaderNodeBillboard.new() VisualShaderNodeBillboard

fn VisualShaderNodeBooleanConstant.new #

fn VisualShaderNodeBooleanConstant.new() VisualShaderNodeBooleanConstant

fn VisualShaderNodeBooleanParameter.new #

fn VisualShaderNodeBooleanParameter.new() VisualShaderNodeBooleanParameter

fn VisualShaderNodeClamp.new #

fn VisualShaderNodeClamp.new() VisualShaderNodeClamp

fn VisualShaderNodeColorConstant.new #

fn VisualShaderNodeColorConstant.new() VisualShaderNodeColorConstant

fn VisualShaderNodeColorFunc.new #

fn VisualShaderNodeColorFunc.new() VisualShaderNodeColorFunc

fn VisualShaderNodeColorOp.new #

fn VisualShaderNodeColorOp.new() VisualShaderNodeColorOp

fn VisualShaderNodeColorParameter.new #

fn VisualShaderNodeColorParameter.new() VisualShaderNodeColorParameter

fn VisualShaderNodeComment.new #

fn VisualShaderNodeComment.new() VisualShaderNodeComment

fn VisualShaderNodeCompare.new #

fn VisualShaderNodeCompare.new() VisualShaderNodeCompare

fn VisualShaderNodeCubemap.new #

fn VisualShaderNodeCubemap.new() VisualShaderNodeCubemap

fn VisualShaderNodeCubemapParameter.new #

fn VisualShaderNodeCubemapParameter.new() VisualShaderNodeCubemapParameter

fn VisualShaderNodeCurveTexture.new #

fn VisualShaderNodeCurveTexture.new() VisualShaderNodeCurveTexture

fn VisualShaderNodeCurveXYZTexture.new #

fn VisualShaderNodeCurveXYZTexture.new() VisualShaderNodeCurveXYZTexture

fn VisualShaderNodeCustom.new #

fn VisualShaderNodeCustom.new() VisualShaderNodeCustom

fn VisualShaderNodeDerivativeFunc.new #

fn VisualShaderNodeDerivativeFunc.new() VisualShaderNodeDerivativeFunc

fn VisualShaderNodeDeterminant.new #

fn VisualShaderNodeDeterminant.new() VisualShaderNodeDeterminant

fn VisualShaderNodeDistanceFade.new #

fn VisualShaderNodeDistanceFade.new() VisualShaderNodeDistanceFade

fn VisualShaderNodeDotProduct.new #

fn VisualShaderNodeDotProduct.new() VisualShaderNodeDotProduct

fn VisualShaderNodeExpression.new #

fn VisualShaderNodeExpression.new() VisualShaderNodeExpression

fn VisualShaderNodeFaceForward.new #

fn VisualShaderNodeFaceForward.new() VisualShaderNodeFaceForward

fn VisualShaderNodeFloatConstant.new #

fn VisualShaderNodeFloatConstant.new() VisualShaderNodeFloatConstant

fn VisualShaderNodeFloatFunc.new #

fn VisualShaderNodeFloatFunc.new() VisualShaderNodeFloatFunc

fn VisualShaderNodeFloatOp.new #

fn VisualShaderNodeFloatOp.new() VisualShaderNodeFloatOp

fn VisualShaderNodeFloatParameter.new #

fn VisualShaderNodeFloatParameter.new() VisualShaderNodeFloatParameter

fn VisualShaderNodeFrame.new #

fn VisualShaderNodeFrame.new() VisualShaderNodeFrame

fn VisualShaderNodeFresnel.new #

fn VisualShaderNodeFresnel.new() VisualShaderNodeFresnel

fn VisualShaderNodeGlobalExpression.new #

fn VisualShaderNodeGlobalExpression.new() VisualShaderNodeGlobalExpression

fn VisualShaderNodeIf.new #

fn VisualShaderNodeIf.new() VisualShaderNodeIf

fn VisualShaderNodeInput.new #

fn VisualShaderNodeInput.new() VisualShaderNodeInput

fn VisualShaderNodeIntConstant.new #

fn VisualShaderNodeIntConstant.new() VisualShaderNodeIntConstant

fn VisualShaderNodeIntFunc.new #

fn VisualShaderNodeIntFunc.new() VisualShaderNodeIntFunc

fn VisualShaderNodeIntOp.new #

fn VisualShaderNodeIntOp.new() VisualShaderNodeIntOp

fn VisualShaderNodeIntParameter.new #

fn VisualShaderNodeIntParameter.new() VisualShaderNodeIntParameter

fn VisualShaderNodeIs.new #

fn VisualShaderNodeIs.new() VisualShaderNodeIs

fn VisualShaderNodeLinearSceneDepth.new #

fn VisualShaderNodeLinearSceneDepth.new() VisualShaderNodeLinearSceneDepth

fn VisualShaderNodeMix.new #

fn VisualShaderNodeMix.new() VisualShaderNodeMix

fn VisualShaderNodeMultiplyAdd.new #

fn VisualShaderNodeMultiplyAdd.new() VisualShaderNodeMultiplyAdd

fn VisualShaderNodeOuterProduct.new #

fn VisualShaderNodeOuterProduct.new() VisualShaderNodeOuterProduct

fn VisualShaderNodeParameterRef.new #

fn VisualShaderNodeParameterRef.new() VisualShaderNodeParameterRef

fn VisualShaderNodeParticleAccelerator.new #

fn VisualShaderNodeParticleAccelerator.new() VisualShaderNodeParticleAccelerator

fn VisualShaderNodeParticleBoxEmitter.new #

fn VisualShaderNodeParticleBoxEmitter.new() VisualShaderNodeParticleBoxEmitter

fn VisualShaderNodeParticleConeVelocity.new #

fn VisualShaderNodeParticleConeVelocity.new() VisualShaderNodeParticleConeVelocity

fn VisualShaderNodeParticleEmit.new #

fn VisualShaderNodeParticleEmit.new() VisualShaderNodeParticleEmit

fn VisualShaderNodeParticleMeshEmitter.new #

fn VisualShaderNodeParticleMeshEmitter.new() VisualShaderNodeParticleMeshEmitter

fn VisualShaderNodeParticleMultiplyByAxisAngle.new #

fn VisualShaderNodeParticleMultiplyByAxisAngle.new() VisualShaderNodeParticleMultiplyByAxisAngle

fn VisualShaderNodeParticleOutput.new #

fn VisualShaderNodeParticleOutput.new() VisualShaderNodeParticleOutput

fn VisualShaderNodeParticleRandomness.new #

fn VisualShaderNodeParticleRandomness.new() VisualShaderNodeParticleRandomness

fn VisualShaderNodeParticleRingEmitter.new #

fn VisualShaderNodeParticleRingEmitter.new() VisualShaderNodeParticleRingEmitter

fn VisualShaderNodeParticleSphereEmitter.new #

fn VisualShaderNodeParticleSphereEmitter.new() VisualShaderNodeParticleSphereEmitter

fn VisualShaderNodeProximityFade.new #

fn VisualShaderNodeProximityFade.new() VisualShaderNodeProximityFade

fn VisualShaderNodeRandomRange.new #

fn VisualShaderNodeRandomRange.new() VisualShaderNodeRandomRange

fn VisualShaderNodeRemap.new #

fn VisualShaderNodeRemap.new() VisualShaderNodeRemap

fn VisualShaderNodeReroute.new #

fn VisualShaderNodeReroute.new() VisualShaderNodeReroute

fn VisualShaderNodeRotationByAxis.new #

fn VisualShaderNodeRotationByAxis.new() VisualShaderNodeRotationByAxis

fn VisualShaderNodeSDFRaymarch.new #

fn VisualShaderNodeSDFRaymarch.new() VisualShaderNodeSDFRaymarch

fn VisualShaderNodeSDFToScreenUV.new #

fn VisualShaderNodeSDFToScreenUV.new() VisualShaderNodeSDFToScreenUV

fn VisualShaderNodeScreenNormalWorldSpace.new #

fn VisualShaderNodeScreenNormalWorldSpace.new() VisualShaderNodeScreenNormalWorldSpace

fn VisualShaderNodeScreenUVToSDF.new #

fn VisualShaderNodeScreenUVToSDF.new() VisualShaderNodeScreenUVToSDF

fn VisualShaderNodeSmoothStep.new #

fn VisualShaderNodeSmoothStep.new() VisualShaderNodeSmoothStep

fn VisualShaderNodeStep.new #

fn VisualShaderNodeStep.new() VisualShaderNodeStep

fn VisualShaderNodeSwitch.new #

fn VisualShaderNodeSwitch.new() VisualShaderNodeSwitch

fn VisualShaderNodeTexture.new #

fn VisualShaderNodeTexture.new() VisualShaderNodeTexture

fn VisualShaderNodeTexture2DArray.new #

fn VisualShaderNodeTexture2DArray.new() VisualShaderNodeTexture2DArray

fn VisualShaderNodeTexture2DArrayParameter.new #

fn VisualShaderNodeTexture2DArrayParameter.new() VisualShaderNodeTexture2DArrayParameter

fn VisualShaderNodeTexture2DParameter.new #

fn VisualShaderNodeTexture2DParameter.new() VisualShaderNodeTexture2DParameter

fn VisualShaderNodeTexture3D.new #

fn VisualShaderNodeTexture3D.new() VisualShaderNodeTexture3D

fn VisualShaderNodeTexture3DParameter.new #

fn VisualShaderNodeTexture3DParameter.new() VisualShaderNodeTexture3DParameter

fn VisualShaderNodeTextureParameterTriplanar.new #

fn VisualShaderNodeTextureParameterTriplanar.new() VisualShaderNodeTextureParameterTriplanar

fn VisualShaderNodeTextureSDF.new #

fn VisualShaderNodeTextureSDF.new() VisualShaderNodeTextureSDF

fn VisualShaderNodeTextureSDFNormal.new #

fn VisualShaderNodeTextureSDFNormal.new() VisualShaderNodeTextureSDFNormal

fn VisualShaderNodeTransformCompose.new #

fn VisualShaderNodeTransformCompose.new() VisualShaderNodeTransformCompose

fn VisualShaderNodeTransformConstant.new #

fn VisualShaderNodeTransformConstant.new() VisualShaderNodeTransformConstant

fn VisualShaderNodeTransformDecompose.new #

fn VisualShaderNodeTransformDecompose.new() VisualShaderNodeTransformDecompose

fn VisualShaderNodeTransformFunc.new #

fn VisualShaderNodeTransformFunc.new() VisualShaderNodeTransformFunc

fn VisualShaderNodeTransformOp.new #

fn VisualShaderNodeTransformOp.new() VisualShaderNodeTransformOp

fn VisualShaderNodeTransformParameter.new #

fn VisualShaderNodeTransformParameter.new() VisualShaderNodeTransformParameter

fn VisualShaderNodeTransformVecMult.new #

fn VisualShaderNodeTransformVecMult.new() VisualShaderNodeTransformVecMult

fn VisualShaderNodeUIntConstant.new #

fn VisualShaderNodeUIntConstant.new() VisualShaderNodeUIntConstant

fn VisualShaderNodeUIntFunc.new #

fn VisualShaderNodeUIntFunc.new() VisualShaderNodeUIntFunc

fn VisualShaderNodeUIntOp.new #

fn VisualShaderNodeUIntOp.new() VisualShaderNodeUIntOp

fn VisualShaderNodeUIntParameter.new #

fn VisualShaderNodeUIntParameter.new() VisualShaderNodeUIntParameter

fn VisualShaderNodeUVFunc.new #

fn VisualShaderNodeUVFunc.new() VisualShaderNodeUVFunc

fn VisualShaderNodeUVPolarCoord.new #

fn VisualShaderNodeUVPolarCoord.new() VisualShaderNodeUVPolarCoord

fn VisualShaderNodeVaryingGetter.new #

fn VisualShaderNodeVaryingGetter.new() VisualShaderNodeVaryingGetter

fn VisualShaderNodeVaryingSetter.new #

fn VisualShaderNodeVaryingSetter.new() VisualShaderNodeVaryingSetter

fn VisualShaderNodeVec2Constant.new #

fn VisualShaderNodeVec2Constant.new() VisualShaderNodeVec2Constant

fn VisualShaderNodeVec2Parameter.new #

fn VisualShaderNodeVec2Parameter.new() VisualShaderNodeVec2Parameter

fn VisualShaderNodeVec3Constant.new #

fn VisualShaderNodeVec3Constant.new() VisualShaderNodeVec3Constant

fn VisualShaderNodeVec3Parameter.new #

fn VisualShaderNodeVec3Parameter.new() VisualShaderNodeVec3Parameter

fn VisualShaderNodeVec4Constant.new #

fn VisualShaderNodeVec4Constant.new() VisualShaderNodeVec4Constant

fn VisualShaderNodeVec4Parameter.new #

fn VisualShaderNodeVec4Parameter.new() VisualShaderNodeVec4Parameter

fn VisualShaderNodeVectorCompose.new #

fn VisualShaderNodeVectorCompose.new() VisualShaderNodeVectorCompose

fn VisualShaderNodeVectorDecompose.new #

fn VisualShaderNodeVectorDecompose.new() VisualShaderNodeVectorDecompose

fn VisualShaderNodeVectorDistance.new #

fn VisualShaderNodeVectorDistance.new() VisualShaderNodeVectorDistance

fn VisualShaderNodeVectorFunc.new #

fn VisualShaderNodeVectorFunc.new() VisualShaderNodeVectorFunc

fn VisualShaderNodeVectorLen.new #

fn VisualShaderNodeVectorLen.new() VisualShaderNodeVectorLen

fn VisualShaderNodeVectorOp.new #

fn VisualShaderNodeVectorOp.new() VisualShaderNodeVectorOp

fn VisualShaderNodeVectorRefract.new #

fn VisualShaderNodeVectorRefract.new() VisualShaderNodeVectorRefract

fn VisualShaderNodeWorldPositionFromDepth.new #

fn VisualShaderNodeWorldPositionFromDepth.new() VisualShaderNodeWorldPositionFromDepth

fn VoxelGI.new #

fn VoxelGI.new() VoxelGI

fn VoxelGIData.new #

fn VoxelGIData.new() VoxelGIData

fn WeakRef.new #

fn WeakRef.new() WeakRef

fn WebRTCDataChannelExtension.new #

fn WebRTCDataChannelExtension.new() WebRTCDataChannelExtension

fn WebRTCMultiplayerPeer.new #

fn WebRTCMultiplayerPeer.new() WebRTCMultiplayerPeer

fn WebRTCPeerConnection.new #

fn WebRTCPeerConnection.new() WebRTCPeerConnection

fn WebRTCPeerConnection.set_default_extension #

fn WebRTCPeerConnection.set_default_extension(extension_class string)

Sets the [param extension_class] as the default [WebRTCPeerConnectionExtension] returned when creating a new [WebRTCPeerConnection].

fn WebRTCPeerConnectionExtension.new #

fn WebRTCPeerConnectionExtension.new() WebRTCPeerConnectionExtension

fn WebSocketMultiplayerPeer.new #

fn WebSocketMultiplayerPeer.new() WebSocketMultiplayerPeer

fn WebSocketPeer.new #

fn WebSocketPeer.new() WebSocketPeer

fn Window.get_focused_window #

fn Window.get_focused_window() Window

Returns the focused window.

fn Window.new #

fn Window.new() Window

fn Window.notification_theme_changed #

fn Window.notification_theme_changed() int

Sent when the node needs to refresh its theme items. This happens in one of the following cases:- The [member theme] property is changed on this node or any of its ancestors.

  • The [member theme_type_variation] property is changed on this node.
  • The node enters the scene tree.[b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.

fn Window.notification_visibility_changed #

fn Window.notification_visibility_changed() int

Emitted when [Window]'s visibility changes, right before [signal visibility_changed].

fn WorkerThreadPool.singleton #

fn WorkerThreadPool.singleton() WorkerThreadPool

fn World2D.new #

fn World2D.new() World2D

fn World3D.new #

fn World3D.new() World3D

fn WorldBoundaryShape2D.new #

fn WorldBoundaryShape2D.new() WorldBoundaryShape2D

fn WorldBoundaryShape3D.new #

fn WorldBoundaryShape3D.new() WorldBoundaryShape3D

fn WorldEnvironment.new #

fn WorldEnvironment.new() WorldEnvironment

fn X509Certificate.new #

fn X509Certificate.new() X509Certificate

fn XMLParser.new #

fn XMLParser.new() XMLParser

fn XRAnchor3D.new #

fn XRAnchor3D.new() XRAnchor3D

fn XRBodyModifier3D.new #

fn XRBodyModifier3D.new() XRBodyModifier3D

fn XRBodyTracker.new #

fn XRBodyTracker.new() XRBodyTracker

fn XRCamera3D.new #

fn XRCamera3D.new() XRCamera3D

fn XRController3D.new #

fn XRController3D.new() XRController3D

fn XRControllerTracker.new #

fn XRControllerTracker.new() XRControllerTracker

fn XRFaceModifier3D.new #

fn XRFaceModifier3D.new() XRFaceModifier3D

fn XRFaceTracker.new #

fn XRFaceTracker.new() XRFaceTracker

fn XRHandModifier3D.new #

fn XRHandModifier3D.new() XRHandModifier3D

fn XRHandTracker.new #

fn XRHandTracker.new() XRHandTracker

fn XRInterfaceExtension.new #

fn XRInterfaceExtension.new() XRInterfaceExtension

fn XRNode3D.new #

fn XRNode3D.new() XRNode3D

fn XROrigin3D.new #

fn XROrigin3D.new() XROrigin3D

fn XRPose.new #

fn XRPose.new() XRPose

fn XRPositionalTracker.new #

fn XRPositionalTracker.new() XRPositionalTracker

fn XRServer.new #

fn XRServer.new() XRServer

fn XRServer.singleton #

fn XRServer.singleton() XRServer

fn XRVRS.new #

fn XRVRS.new() XRVRS

fn ZIPPacker.new #

fn ZIPPacker.new() ZIPPacker

fn ZIPReader.new #

fn ZIPReader.new() ZIPReader

interface FromVariant #

interface FromVariant {
mut:
	from_variant(var &Variant)
}

interface IAStar2DComputeCost #

interface IAStar2DComputeCost {
mut:
	compute_cost_(from_id i64, to_id i64) f64
}

interface IAStar2DEstimateCost #

interface IAStar2DEstimateCost {
mut:
	estimate_cost_(from_id i64, end_id i64) f64
}

interface IAStar3DComputeCost #

interface IAStar3DComputeCost {
mut:
	compute_cost_(from_id i64, to_id i64) f64
}

interface IAStar3DEstimateCost #

interface IAStar3DEstimateCost {
mut:
	estimate_cost_(from_id i64, end_id i64) f64
}

interface IAStarGrid2DComputeCost #

interface IAStarGrid2DComputeCost {
mut:
	compute_cost_(from_id Vector2i, to_id Vector2i) f64
}

interface IAStarGrid2DEstimateCost #

interface IAStarGrid2DEstimateCost {
mut:
	estimate_cost_(from_id Vector2i, end_id Vector2i) f64
}

interface IAnimationMixerPostProcessKeyValue #

interface IAnimationMixerPostProcessKeyValue {
mut:
	post_process_key_value_(animation Animation, track i64, value Variant, object_id i64, object_sub_idx i64) Variant
}

interface IAnimationNodeExtensionProcessAnimationNode #

interface IAnimationNodeExtensionProcessAnimationNode {
mut:
	process_animation_node_(playback_info PackedFloat64Array, test_only bool) PackedFloat32Array
}

interface IAnimationNodeGetCaption #

interface IAnimationNodeGetCaption {
mut:
	get_caption_() String
}

interface IAnimationNodeGetChildByName #

interface IAnimationNodeGetChildByName {
mut:
	get_child_by_name_(name StringName) AnimationNode
}

interface IAnimationNodeGetChildNodes #

interface IAnimationNodeGetChildNodes {
mut:
	get_child_nodes_() Dictionary
}

interface IAnimationNodeGetParameterDefaultValue #

interface IAnimationNodeGetParameterDefaultValue {
mut:
	get_parameter_default_value_(parameter StringName) Variant
}

interface IAnimationNodeGetParameterList #

interface IAnimationNodeGetParameterList {
mut:
	get_parameter_list_() Array
}

interface IAnimationNodeHasFilter #

interface IAnimationNodeHasFilter {
mut:
	has_filter_() bool
}

interface IAnimationNodeIsParameterReadOnly #

interface IAnimationNodeIsParameterReadOnly {
mut:
	is_parameter_read_only_(parameter StringName) bool
}

interface IAnimationNodeProcess #

interface IAnimationNodeProcess {
mut:
	process_(time f64, seek bool, is_external_seeking bool, test_only bool) f64
}

interface IAudioEffectInstanceProcess #

interface IAudioEffectInstanceProcess {
mut:
	process_(src_buffer voidptr, dst_buffer &AudioFrame, frame_count i64)
}

interface IAudioEffectInstanceProcessSilence #

interface IAudioEffectInstanceProcessSilence {
mut:
	process_silence_() bool
}

interface IAudioEffectInstantiate #

interface IAudioEffectInstantiate {
mut:
	instantiate_() AudioEffectInstance
}

interface IAudioStreamGetBarBeats #

interface IAudioStreamGetBarBeats {
mut:
	get_bar_beats_() i64
}

interface IAudioStreamGetBeatCount #

interface IAudioStreamGetBeatCount {
mut:
	get_beat_count_() i64
}

interface IAudioStreamGetBpm #

interface IAudioStreamGetBpm {
mut:
	get_bpm_() f64
}

interface IAudioStreamGetLength #

interface IAudioStreamGetLength {
mut:
	get_length_() f64
}

interface IAudioStreamGetParameterList #

interface IAudioStreamGetParameterList {
mut:
	get_parameter_list_() Array
}

interface IAudioStreamGetStreamName #

interface IAudioStreamGetStreamName {
mut:
	get_stream_name_() String
}

interface IAudioStreamGetTags #

interface IAudioStreamGetTags {
mut:
	get_tags_() Dictionary
}

interface IAudioStreamHasLoop #

interface IAudioStreamHasLoop {
mut:
	has_loop_() bool
}

interface IAudioStreamInstantiatePlayback #

interface IAudioStreamInstantiatePlayback {
mut:
	instantiate_playback_() AudioStreamPlayback
}

interface IAudioStreamIsMonophonic #

interface IAudioStreamIsMonophonic {
mut:
	is_monophonic_() bool
}

interface IAudioStreamPlaybackGetLoopCount #

interface IAudioStreamPlaybackGetLoopCount {
mut:
	get_loop_count_() i64
}

interface IAudioStreamPlaybackGetParameter #

interface IAudioStreamPlaybackGetParameter {
mut:
	get_parameter_(name StringName) Variant
}

interface IAudioStreamPlaybackGetPlaybackPosition #

interface IAudioStreamPlaybackGetPlaybackPosition {
mut:
	get_playback_position_() f64
}

interface IAudioStreamPlaybackIsPlaying #

interface IAudioStreamPlaybackIsPlaying {
mut:
	is_playing_() bool
}

interface IAudioStreamPlaybackMix #

interface IAudioStreamPlaybackMix {
mut:
	mix_(buffer &AudioFrame, rate_scale f64, frames i64) i64
}

interface IAudioStreamPlaybackResampledGetStreamSamplingRate #

interface IAudioStreamPlaybackResampledGetStreamSamplingRate {
mut:
	get_stream_sampling_rate_() f64
}

interface IAudioStreamPlaybackResampledMixResampled #

interface IAudioStreamPlaybackResampledMixResampled {
mut:
	mix_resampled_(dst_buffer &AudioFrame, frame_count i64) i64
}

interface IAudioStreamPlaybackSeek #

interface IAudioStreamPlaybackSeek {
mut:
	seek_(position f64)
}

interface IAudioStreamPlaybackSetParameter #

interface IAudioStreamPlaybackSetParameter {
mut:
	set_parameter_(name StringName, value Variant)
}

interface IAudioStreamPlaybackStart #

interface IAudioStreamPlaybackStart {
mut:
	start_(from_pos f64)
}

interface IAudioStreamPlaybackStop #

interface IAudioStreamPlaybackStop {
mut:
	stop_()
}

interface IAudioStreamPlaybackTagUsedStreams #

interface IAudioStreamPlaybackTagUsedStreams {
mut:
	tag_used_streams_()
}

interface IBaseButtonPressed #

interface IBaseButtonPressed {
mut:
	pressed_()
}

interface IBaseButtonToggled #

interface IBaseButtonToggled {
mut:
	toggled_(toggled_on bool)
}

interface ICameraFeedActivateFeed #

interface ICameraFeedActivateFeed {
mut:
	activate_feed_() bool
}

interface ICameraFeedDeactivateFeed #

interface ICameraFeedDeactivateFeed {
mut:
	deactivate_feed_()
}

interface ICanvasItemDraw #

interface ICanvasItemDraw {
mut:
	draw_()
}

interface IClass #

interface IClass {
	// ptr voidptr
	godot_class bool
}

HACK: using this to distinguish user-defined classes

interface ICodeEditConfirmCodeCompletion #

interface ICodeEditConfirmCodeCompletion {
mut:
	confirm_code_completion_(replace bool)
}

interface ICodeEditFilterCodeCompletionCandidates #

interface ICodeEditFilterCodeCompletionCandidates {
mut:
	filter_code_completion_candidates_(candidates Array) Array
}

interface ICodeEditRequestCodeCompletion #

interface ICodeEditRequestCodeCompletion {
mut:
	request_code_completion_(force bool)
}

interface ICollisionObject2DInputEvent #

interface ICollisionObject2DInputEvent {
mut:
	input_event_(viewport Viewport, event InputEvent, shape_idx i64)
}

interface ICollisionObject2DMouseEnter #

interface ICollisionObject2DMouseEnter {
mut:
	mouse_enter_()
}

interface ICollisionObject2DMouseExit #

interface ICollisionObject2DMouseExit {
mut:
	mouse_exit_()
}

interface ICollisionObject2DMouseShapeEnter #

interface ICollisionObject2DMouseShapeEnter {
mut:
	mouse_shape_enter_(shape_idx i64)
}

interface ICollisionObject2DMouseShapeExit #

interface ICollisionObject2DMouseShapeExit {
mut:
	mouse_shape_exit_(shape_idx i64)
}

interface ICollisionObject3DInputEvent #

interface ICollisionObject3DInputEvent {
mut:
	input_event_(camera Camera3D, event InputEvent, event_position Vector3, normal Vector3, shape_idx i64)
}

interface ICollisionObject3DMouseEnter #

interface ICollisionObject3DMouseEnter {
mut:
	mouse_enter_()
}

interface ICollisionObject3DMouseExit #

interface ICollisionObject3DMouseExit {
mut:
	mouse_exit_()
}

interface ICompositorEffectRenderCallback #

interface ICompositorEffectRenderCallback {
mut:
	render_callback_(effect_callback_type i64, render_data RenderData)
}

interface IContainerGetAllowedSizeFlagsHorizontal #

interface IContainerGetAllowedSizeFlagsHorizontal {
mut:
	get_allowed_size_flags_horizontal_() PackedInt32Array
}

interface IContainerGetAllowedSizeFlagsVertical #

interface IContainerGetAllowedSizeFlagsVertical {
mut:
	get_allowed_size_flags_vertical_() PackedInt32Array
}

interface IControlAccessibilityGetContextualInfo #

interface IControlAccessibilityGetContextualInfo {
mut:
	accessibility_get_contextual_info_() String
}

interface IControlCanDropData #

interface IControlCanDropData {
mut:
	can_drop_data_(at_position Vector2, data Variant) bool
}

interface IControlDropData #

interface IControlDropData {
mut:
	drop_data_(at_position Vector2, data Variant)
}

interface IControlGetAccessibilityContainerName #

interface IControlGetAccessibilityContainerName {
mut:
	get_accessibility_container_name_(node Node) String
}

interface IControlGetDragData #

interface IControlGetDragData {
mut:
	get_drag_data_(at_position Vector2) Variant
}

interface IControlGetMinimumSize #

interface IControlGetMinimumSize {
mut:
	get_minimum_size_() Vector2
}

interface IControlGetTooltip #

interface IControlGetTooltip {
mut:
	get_tooltip_(at_position Vector2) String
}

interface IControlGuiInput #

interface IControlGuiInput {
mut:
	gui_input_(event InputEvent)
}

interface IControlHasPoint #

interface IControlHasPoint {
mut:
	has_point_(point Vector2) bool
}

interface IControlMakeCustomTooltip #

interface IControlMakeCustomTooltip {
mut:
	make_custom_tooltip_(for_text String) Object
}

interface IControlStructuredTextParser #

interface IControlStructuredTextParser {
mut:
	structured_text_parser_(gd_args Array, text String) Array
}

interface IEditorContextMenuPluginPopupMenu #

interface IEditorContextMenuPluginPopupMenu {
mut:
	popup_menu_(paths PackedStringArray)
}

interface IEditorDebuggerPluginBreakpointSetInTree #

interface IEditorDebuggerPluginBreakpointSetInTree {
mut:
	breakpoint_set_in_tree_(script Script, line i64, enabled bool)
}

interface IEditorDebuggerPluginBreakpointsClearedInTree #

interface IEditorDebuggerPluginBreakpointsClearedInTree {
mut:
	breakpoints_cleared_in_tree_()
}

interface IEditorDebuggerPluginCapture #

interface IEditorDebuggerPluginCapture {
mut:
	capture_(message String, data Array, session_id i64) bool
}

interface IEditorDebuggerPluginGotoScriptLine #

interface IEditorDebuggerPluginGotoScriptLine {
mut:
	goto_script_line_(script Script, line i64)
}

interface IEditorDebuggerPluginHasCapture #

interface IEditorDebuggerPluginHasCapture {
mut:
	has_capture_(capture String) bool
}

interface IEditorDebuggerPluginSetupSession #

interface IEditorDebuggerPluginSetupSession {
mut:
	setup_session_(session_id i64)
}

interface IEditorExportPlatformExtensionCanExport #

interface IEditorExportPlatformExtensionCanExport {
mut:
	can_export_(preset EditorExportPreset, debug bool) bool
}

interface IEditorExportPlatformExtensionCleanup #

interface IEditorExportPlatformExtensionCleanup {
mut:
	cleanup_()
}

interface IEditorExportPlatformExtensionExportPack #

interface IEditorExportPlatformExtensionExportPack {
mut:
	export_pack_(preset EditorExportPreset, debug bool, path String, flags EditorExportPlatformDebugFlags) GDError
}

interface IEditorExportPlatformExtensionExportPackPatch #

interface IEditorExportPlatformExtensionExportPackPatch {
mut:
	export_pack_patch_(preset EditorExportPreset, debug bool, path String, patches PackedStringArray, flags EditorExportPlatformDebugFlags) GDError
}

interface IEditorExportPlatformExtensionExportProject #

interface IEditorExportPlatformExtensionExportProject {
mut:
	export_project_(preset EditorExportPreset, debug bool, path String, flags EditorExportPlatformDebugFlags) GDError
}

interface IEditorExportPlatformExtensionExportZip #

interface IEditorExportPlatformExtensionExportZip {
mut:
	export_zip_(preset EditorExportPreset, debug bool, path String, flags EditorExportPlatformDebugFlags) GDError
}

interface IEditorExportPlatformExtensionExportZipPatch #

interface IEditorExportPlatformExtensionExportZipPatch {
mut:
	export_zip_patch_(preset EditorExportPreset, debug bool, path String, patches PackedStringArray, flags EditorExportPlatformDebugFlags) GDError
}

interface IEditorExportPlatformExtensionGetBinaryExtensions #

interface IEditorExportPlatformExtensionGetBinaryExtensions {
mut:
	get_binary_extensions_(preset EditorExportPreset) PackedStringArray
}

interface IEditorExportPlatformExtensionGetDebugProtocol #

interface IEditorExportPlatformExtensionGetDebugProtocol {
mut:
	get_debug_protocol_() String
}

interface IEditorExportPlatformExtensionGetDeviceArchitecture #

interface IEditorExportPlatformExtensionGetDeviceArchitecture {
mut:
	get_device_architecture_(device i64) String
}

interface IEditorExportPlatformExtensionGetExportOptionVisibility #

interface IEditorExportPlatformExtensionGetExportOptionVisibility {
mut:
	get_export_option_visibility_(preset EditorExportPreset, option String) bool
}

interface IEditorExportPlatformExtensionGetExportOptionWarning #

interface IEditorExportPlatformExtensionGetExportOptionWarning {
mut:
	get_export_option_warning_(preset EditorExportPreset, option StringName) String
}

interface IEditorExportPlatformExtensionGetExportOptions #

interface IEditorExportPlatformExtensionGetExportOptions {
mut:
	get_export_options_() Array
}

interface IEditorExportPlatformExtensionGetName #

interface IEditorExportPlatformExtensionGetName {
mut:
	get_name_() String
}

interface IEditorExportPlatformExtensionGetOptionIcon #

interface IEditorExportPlatformExtensionGetOptionIcon {
mut:
	get_option_icon_(device i64) ImageTexture
}

interface IEditorExportPlatformExtensionGetOptionLabel #

interface IEditorExportPlatformExtensionGetOptionLabel {
mut:
	get_option_label_(device i64) String
}

interface IEditorExportPlatformExtensionGetOptionTooltip #

interface IEditorExportPlatformExtensionGetOptionTooltip {
mut:
	get_option_tooltip_(device i64) String
}

interface IEditorExportPlatformExtensionGetOptionsCount #

interface IEditorExportPlatformExtensionGetOptionsCount {
mut:
	get_options_count_() i64
}

interface IEditorExportPlatformExtensionGetOptionsTooltip #

interface IEditorExportPlatformExtensionGetOptionsTooltip {
mut:
	get_options_tooltip_() String
}

interface IEditorExportPlatformExtensionGetOsName #

interface IEditorExportPlatformExtensionGetOsName {
mut:
	get_os_name_() String
}

interface IEditorExportPlatformExtensionGetPlatformFeatures #

interface IEditorExportPlatformExtensionGetPlatformFeatures {
mut:
	get_platform_features_() PackedStringArray
}

interface IEditorExportPlatformExtensionGetPresetFeatures #

interface IEditorExportPlatformExtensionGetPresetFeatures {
mut:
	get_preset_features_(preset EditorExportPreset) PackedStringArray
}

interface IEditorExportPlatformExtensionGetRunIcon #

interface IEditorExportPlatformExtensionGetRunIcon {
mut:
	get_run_icon_() Texture2D
}

interface IEditorExportPlatformExtensionHasValidExportConfiguration #

interface IEditorExportPlatformExtensionHasValidExportConfiguration {
mut:
	has_valid_export_configuration_(preset EditorExportPreset, debug bool) bool
}

interface IEditorExportPlatformExtensionHasValidProjectConfiguration #

interface IEditorExportPlatformExtensionHasValidProjectConfiguration {
mut:
	has_valid_project_configuration_(preset EditorExportPreset) bool
}

interface IEditorExportPlatformExtensionIsExecutable #

interface IEditorExportPlatformExtensionIsExecutable {
mut:
	is_executable_(path String) bool
}

interface IEditorExportPlatformExtensionPollExport #

interface IEditorExportPlatformExtensionPollExport {
mut:
	poll_export_() bool
}

interface IEditorExportPlatformExtensionRun #

interface IEditorExportPlatformExtensionRun {
mut:
	run_(preset EditorExportPreset, device i64, debug_flags EditorExportPlatformDebugFlags) GDError
}

interface IEditorExportPlatformExtensionShouldUpdateExportOptions #

interface IEditorExportPlatformExtensionShouldUpdateExportOptions {
mut:
	should_update_export_options_() bool
}

interface IEditorExportPluginBeginCustomizeResources #

interface IEditorExportPluginBeginCustomizeResources {
mut:
	begin_customize_resources_(platform EditorExportPlatform, features PackedStringArray) bool
}

interface IEditorExportPluginBeginCustomizeScenes #

interface IEditorExportPluginBeginCustomizeScenes {
mut:
	begin_customize_scenes_(platform EditorExportPlatform, features PackedStringArray) bool
}

interface IEditorExportPluginCustomizeResource #

interface IEditorExportPluginCustomizeResource {
mut:
	customize_resource_(resource Resource, path String) Resource
}

interface IEditorExportPluginCustomizeScene #

interface IEditorExportPluginCustomizeScene {
mut:
	customize_scene_(scene Node, path String) Node
}

interface IEditorExportPluginEndCustomizeResources #

interface IEditorExportPluginEndCustomizeResources {
mut:
	end_customize_resources_()
}

interface IEditorExportPluginEndCustomizeScenes #

interface IEditorExportPluginEndCustomizeScenes {
mut:
	end_customize_scenes_()
}

interface IEditorExportPluginExportBegin #

interface IEditorExportPluginExportBegin {
mut:
	export_begin_(features PackedStringArray, is_debug bool, path String, flags i64)
}

interface IEditorExportPluginExportEnd #

interface IEditorExportPluginExportEnd {
mut:
	export_end_()
}

interface IEditorExportPluginExportFile #

interface IEditorExportPluginExportFile {
mut:
	export_file_(path String, gd_type String, features PackedStringArray)
}

interface IEditorExportPluginGetAndroidDependencies #

interface IEditorExportPluginGetAndroidDependencies {
mut:
	get_android_dependencies_(platform EditorExportPlatform, debug bool) PackedStringArray
}

interface IEditorExportPluginGetAndroidDependenciesMavenRepos #

interface IEditorExportPluginGetAndroidDependenciesMavenRepos {
mut:
	get_android_dependencies_maven_repos_(platform EditorExportPlatform, debug bool) PackedStringArray
}

interface IEditorExportPluginGetAndroidLibraries #

interface IEditorExportPluginGetAndroidLibraries {
mut:
	get_android_libraries_(platform EditorExportPlatform, debug bool) PackedStringArray
}

interface IEditorExportPluginGetAndroidManifestActivityElementContents #

interface IEditorExportPluginGetAndroidManifestActivityElementContents {
mut:
	get_android_manifest_activity_element_contents_(platform EditorExportPlatform, debug bool) String
}

interface IEditorExportPluginGetAndroidManifestApplicationElementContents #

interface IEditorExportPluginGetAndroidManifestApplicationElementContents {
mut:
	get_android_manifest_application_element_contents_(platform EditorExportPlatform, debug bool) String
}

interface IEditorExportPluginGetAndroidManifestElementContents #

interface IEditorExportPluginGetAndroidManifestElementContents {
mut:
	get_android_manifest_element_contents_(platform EditorExportPlatform, debug bool) String
}

interface IEditorExportPluginGetCustomizationConfigurationHash #

interface IEditorExportPluginGetCustomizationConfigurationHash {
mut:
	get_customization_configuration_hash_() i64
}

interface IEditorExportPluginGetExportFeatures #

interface IEditorExportPluginGetExportFeatures {
mut:
	get_export_features_(platform EditorExportPlatform, debug bool) PackedStringArray
}

interface IEditorExportPluginGetExportOptionVisibility #

interface IEditorExportPluginGetExportOptionVisibility {
mut:
	get_export_option_visibility_(platform EditorExportPlatform, option String) bool
}

interface IEditorExportPluginGetExportOptionWarning #

interface IEditorExportPluginGetExportOptionWarning {
mut:
	get_export_option_warning_(platform EditorExportPlatform, option String) String
}

interface IEditorExportPluginGetExportOptions #

interface IEditorExportPluginGetExportOptions {
mut:
	get_export_options_(platform EditorExportPlatform) Array
}

interface IEditorExportPluginGetExportOptionsOverrides #

interface IEditorExportPluginGetExportOptionsOverrides {
mut:
	get_export_options_overrides_(platform EditorExportPlatform) Dictionary
}

interface IEditorExportPluginGetName #

interface IEditorExportPluginGetName {
mut:
	get_name_() String
}

interface IEditorExportPluginShouldUpdateExportOptions #

interface IEditorExportPluginShouldUpdateExportOptions {
mut:
	should_update_export_options_(platform EditorExportPlatform) bool
}

interface IEditorExportPluginSupportsPlatform #

interface IEditorExportPluginSupportsPlatform {
mut:
	supports_platform_(platform EditorExportPlatform) bool
}

interface IEditorExportPluginUpdateAndroidPrebuiltManifest #

interface IEditorExportPluginUpdateAndroidPrebuiltManifest {
mut:
	update_android_prebuilt_manifest_(platform EditorExportPlatform, manifest_data PackedByteArray) PackedByteArray
}

interface IEditorFileSystemImportFormatSupportQueryGetFileExtensions #

interface IEditorFileSystemImportFormatSupportQueryGetFileExtensions {
mut:
	get_file_extensions_() PackedStringArray
}

interface IEditorFileSystemImportFormatSupportQueryIsActive #

interface IEditorFileSystemImportFormatSupportQueryIsActive {
mut:
	is_active_() bool
}

interface IEditorFileSystemImportFormatSupportQueryQuery #

interface IEditorFileSystemImportFormatSupportQueryQuery {
mut:
	query_() bool
}

interface IEditorImportPluginCanImportThreaded #

interface IEditorImportPluginCanImportThreaded {
mut:
	can_import_threaded_() bool
}

interface IEditorImportPluginGetFormatVersion #

interface IEditorImportPluginGetFormatVersion {
mut:
	get_format_version_() i64
}

interface IEditorImportPluginGetImportOptions #

interface IEditorImportPluginGetImportOptions {
mut:
	get_import_options_(path String, preset_index i64) Array
}

interface IEditorImportPluginGetImportOrder #

interface IEditorImportPluginGetImportOrder {
mut:
	get_import_order_() i64
}

interface IEditorImportPluginGetImporterName #

interface IEditorImportPluginGetImporterName {
mut:
	get_importer_name_() String
}

interface IEditorImportPluginGetOptionVisibility #

interface IEditorImportPluginGetOptionVisibility {
mut:
	get_option_visibility_(path String, option_name StringName, options Dictionary) bool
}

interface IEditorImportPluginGetPresetCount #

interface IEditorImportPluginGetPresetCount {
mut:
	get_preset_count_() i64
}

interface IEditorImportPluginGetPresetName #

interface IEditorImportPluginGetPresetName {
mut:
	get_preset_name_(preset_index i64) String
}

interface IEditorImportPluginGetPriority #

interface IEditorImportPluginGetPriority {
mut:
	get_priority_() f64
}

interface IEditorImportPluginGetRecognizedExtensions #

interface IEditorImportPluginGetRecognizedExtensions {
mut:
	get_recognized_extensions_() PackedStringArray
}

interface IEditorImportPluginGetResourceType #

interface IEditorImportPluginGetResourceType {
mut:
	get_resource_type_() String
}

interface IEditorImportPluginGetSaveExtension #

interface IEditorImportPluginGetSaveExtension {
mut:
	get_save_extension_() String
}

interface IEditorImportPluginGetVisibleName #

interface IEditorImportPluginGetVisibleName {
mut:
	get_visible_name_() String
}

interface IEditorImportPluginImport #

interface IEditorImportPluginImport {
mut:
	gd_import_(source_file String, save_path String, options Dictionary, platform_variants Array, gen_files Array) GDError
}

interface IEditorInspectorPluginCanHandle #

interface IEditorInspectorPluginCanHandle {
mut:
	can_handle_(object Object) bool
}

interface IEditorInspectorPluginParseBegin #

interface IEditorInspectorPluginParseBegin {
mut:
	parse_begin_(object Object)
}

interface IEditorInspectorPluginParseCategory #

interface IEditorInspectorPluginParseCategory {
mut:
	parse_category_(object Object, category String)
}

interface IEditorInspectorPluginParseEnd #

interface IEditorInspectorPluginParseEnd {
mut:
	parse_end_(object Object)
}

interface IEditorInspectorPluginParseGroup #

interface IEditorInspectorPluginParseGroup {
mut:
	parse_group_(object Object, group String)
}

interface IEditorInspectorPluginParseProperty #

interface IEditorInspectorPluginParseProperty {
mut:
	parse_property_(object Object, gd_type VariantType, name String, hint_type PropertyHint, hint_string String, usage_flags PropertyUsageFlags, wide bool) bool
}

interface IEditorNode3DGizmoBeginHandleAction #

interface IEditorNode3DGizmoBeginHandleAction {
mut:
	begin_handle_action_(id i64, secondary bool)
}

interface IEditorNode3DGizmoCommitHandle #

interface IEditorNode3DGizmoCommitHandle {
mut:
	commit_handle_(id i64, secondary bool, restore Variant, cancel bool)
}

interface IEditorNode3DGizmoCommitSubgizmos #

interface IEditorNode3DGizmoCommitSubgizmos {
mut:
	commit_subgizmos_(ids PackedInt32Array, restores Array, cancel bool)
}

interface IEditorNode3DGizmoGetHandleName #

interface IEditorNode3DGizmoGetHandleName {
mut:
	get_handle_name_(id i64, secondary bool) String
}

interface IEditorNode3DGizmoGetHandleValue #

interface IEditorNode3DGizmoGetHandleValue {
mut:
	get_handle_value_(id i64, secondary bool) Variant
}

interface IEditorNode3DGizmoGetSubgizmoTransform #

interface IEditorNode3DGizmoGetSubgizmoTransform {
mut:
	get_subgizmo_transform_(id i64) Transform3D
}

interface IEditorNode3DGizmoIsHandleHighlighted #

interface IEditorNode3DGizmoIsHandleHighlighted {
mut:
	is_handle_highlighted_(id i64, secondary bool) bool
}

interface IEditorNode3DGizmoPluginBeginHandleAction #

interface IEditorNode3DGizmoPluginBeginHandleAction {
mut:
	begin_handle_action_(gizmo EditorNode3DGizmo, handle_id i64, secondary bool)
}

interface IEditorNode3DGizmoPluginCanBeHidden #

interface IEditorNode3DGizmoPluginCanBeHidden {
mut:
	can_be_hidden_() bool
}

interface IEditorNode3DGizmoPluginCommitHandle #

interface IEditorNode3DGizmoPluginCommitHandle {
mut:
	commit_handle_(gizmo EditorNode3DGizmo, handle_id i64, secondary bool, restore Variant, cancel bool)
}

interface IEditorNode3DGizmoPluginCommitSubgizmos #

interface IEditorNode3DGizmoPluginCommitSubgizmos {
mut:
	commit_subgizmos_(gizmo EditorNode3DGizmo, ids PackedInt32Array, restores Array, cancel bool)
}

interface IEditorNode3DGizmoPluginCreateGizmo #

interface IEditorNode3DGizmoPluginCreateGizmo {
mut:
	create_gizmo_(for_node_3d Node3D) EditorNode3DGizmo
}

interface IEditorNode3DGizmoPluginGetGizmoName #

interface IEditorNode3DGizmoPluginGetGizmoName {
mut:
	get_gizmo_name_() String
}

interface IEditorNode3DGizmoPluginGetHandleName #

interface IEditorNode3DGizmoPluginGetHandleName {
mut:
	get_handle_name_(gizmo EditorNode3DGizmo, handle_id i64, secondary bool) String
}

interface IEditorNode3DGizmoPluginGetHandleValue #

interface IEditorNode3DGizmoPluginGetHandleValue {
mut:
	get_handle_value_(gizmo EditorNode3DGizmo, handle_id i64, secondary bool) Variant
}

interface IEditorNode3DGizmoPluginGetPriority #

interface IEditorNode3DGizmoPluginGetPriority {
mut:
	get_priority_() i64
}

interface IEditorNode3DGizmoPluginGetSubgizmoTransform #

interface IEditorNode3DGizmoPluginGetSubgizmoTransform {
mut:
	get_subgizmo_transform_(gizmo EditorNode3DGizmo, subgizmo_id i64) Transform3D
}

interface IEditorNode3DGizmoPluginHasGizmo #

interface IEditorNode3DGizmoPluginHasGizmo {
mut:
	has_gizmo_(for_node_3d Node3D) bool
}

interface IEditorNode3DGizmoPluginIsHandleHighlighted #

interface IEditorNode3DGizmoPluginIsHandleHighlighted {
mut:
	is_handle_highlighted_(gizmo EditorNode3DGizmo, handle_id i64, secondary bool) bool
}

interface IEditorNode3DGizmoPluginIsSelectableWhenHidden #

interface IEditorNode3DGizmoPluginIsSelectableWhenHidden {
mut:
	is_selectable_when_hidden_() bool
}

interface IEditorNode3DGizmoPluginRedraw #

interface IEditorNode3DGizmoPluginRedraw {
mut:
	redraw_(gizmo EditorNode3DGizmo)
}

interface IEditorNode3DGizmoPluginSetHandle #

interface IEditorNode3DGizmoPluginSetHandle {
mut:
	set_handle_(gizmo EditorNode3DGizmo, handle_id i64, secondary bool, camera Camera3D, screen_pos Vector2)
}

interface IEditorNode3DGizmoPluginSetSubgizmoTransform #

interface IEditorNode3DGizmoPluginSetSubgizmoTransform {
mut:
	set_subgizmo_transform_(gizmo EditorNode3DGizmo, subgizmo_id i64, transform Transform3D)
}

interface IEditorNode3DGizmoPluginSubgizmosIntersectFrustum #

interface IEditorNode3DGizmoPluginSubgizmosIntersectFrustum {
mut:
	subgizmos_intersect_frustum_(gizmo EditorNode3DGizmo, camera Camera3D, frustum_planes Array) PackedInt32Array
}

interface IEditorNode3DGizmoPluginSubgizmosIntersectRay #

interface IEditorNode3DGizmoPluginSubgizmosIntersectRay {
mut:
	subgizmos_intersect_ray_(gizmo EditorNode3DGizmo, camera Camera3D, screen_pos Vector2) i64
}

interface IEditorNode3DGizmoRedraw #

interface IEditorNode3DGizmoRedraw {
mut:
	redraw_()
}

interface IEditorNode3DGizmoSetHandle #

interface IEditorNode3DGizmoSetHandle {
mut:
	set_handle_(id i64, secondary bool, camera Camera3D, point Vector2)
}

interface IEditorNode3DGizmoSetSubgizmoTransform #

interface IEditorNode3DGizmoSetSubgizmoTransform {
mut:
	set_subgizmo_transform_(id i64, transform Transform3D)
}

interface IEditorNode3DGizmoSubgizmosIntersectFrustum #

interface IEditorNode3DGizmoSubgizmosIntersectFrustum {
mut:
	subgizmos_intersect_frustum_(camera Camera3D, frustum Array) PackedInt32Array
}

interface IEditorNode3DGizmoSubgizmosIntersectRay #

interface IEditorNode3DGizmoSubgizmosIntersectRay {
mut:
	subgizmos_intersect_ray_(camera Camera3D, point Vector2) i64
}

interface IEditorPluginApplyChanges #

interface IEditorPluginApplyChanges {
mut:
	apply_changes_()
}

interface IEditorPluginBuild #

interface IEditorPluginBuild {
mut:
	build_() bool
}

interface IEditorPluginClear #

interface IEditorPluginClear {
mut:
	clear_()
}

interface IEditorPluginDisablePlugin #

interface IEditorPluginDisablePlugin {
mut:
	disable_plugin_()
}

interface IEditorPluginEdit #

interface IEditorPluginEdit {
mut:
	edit_(object Object)
}

interface IEditorPluginEnablePlugin #

interface IEditorPluginEnablePlugin {
mut:
	enable_plugin_()
}

interface IEditorPluginForward3dDrawOverViewport #

interface IEditorPluginForward3dDrawOverViewport {
mut:
	forward_3d_draw_over_viewport_(viewport_control Control)
}

interface IEditorPluginForward3dForceDrawOverViewport #

interface IEditorPluginForward3dForceDrawOverViewport {
mut:
	forward_3d_force_draw_over_viewport_(viewport_control Control)
}

interface IEditorPluginForward3dGuiInput #

interface IEditorPluginForward3dGuiInput {
mut:
	forward_3d_gui_input_(viewport_camera Camera3D, event InputEvent) i64
}

interface IEditorPluginForwardCanvasDrawOverViewport #

interface IEditorPluginForwardCanvasDrawOverViewport {
mut:
	forward_canvas_draw_over_viewport_(viewport_control Control)
}

interface IEditorPluginForwardCanvasForceDrawOverViewport #

interface IEditorPluginForwardCanvasForceDrawOverViewport {
mut:
	forward_canvas_force_draw_over_viewport_(viewport_control Control)
}

interface IEditorPluginForwardCanvasGuiInput #

interface IEditorPluginForwardCanvasGuiInput {
mut:
	forward_canvas_gui_input_(event InputEvent) bool
}

interface IEditorPluginGetBreakpoints #

interface IEditorPluginGetBreakpoints {
mut:
	get_breakpoints_() PackedStringArray
}

interface IEditorPluginGetPluginIcon #

interface IEditorPluginGetPluginIcon {
mut:
	get_plugin_icon_() Texture2D
}

interface IEditorPluginGetPluginName #

interface IEditorPluginGetPluginName {
mut:
	get_plugin_name_() String
}

interface IEditorPluginGetState #

interface IEditorPluginGetState {
mut:
	get_state_() Dictionary
}

interface IEditorPluginGetUnsavedStatus #

interface IEditorPluginGetUnsavedStatus {
mut:
	get_unsaved_status_(for_scene String) String
}

interface IEditorPluginGetWindowLayout #

interface IEditorPluginGetWindowLayout {
mut:
	get_window_layout_(configuration ConfigFile)
}

interface IEditorPluginHandles #

interface IEditorPluginHandles {
mut:
	handles_(object Object) bool
}

interface IEditorPluginHasMainScreen #

interface IEditorPluginHasMainScreen {
mut:
	has_main_screen_() bool
}

interface IEditorPluginMakeVisible #

interface IEditorPluginMakeVisible {
mut:
	make_visible_(visible bool)
}

interface IEditorPluginSaveExternalData #

interface IEditorPluginSaveExternalData {
mut:
	save_external_data_()
}

interface IEditorPluginSetState #

interface IEditorPluginSetState {
mut:
	set_state_(state Dictionary)
}

interface IEditorPluginSetWindowLayout #

interface IEditorPluginSetWindowLayout {
mut:
	set_window_layout_(configuration ConfigFile)
}

interface IEditorPropertySetReadOnly #

interface IEditorPropertySetReadOnly {
mut:
	set_read_only_(read_only bool)
}

interface IEditorPropertyUpdateProperty #

interface IEditorPropertyUpdateProperty {
mut:
	update_property_()
}

interface IEditorResourceConversionPluginConvert #

interface IEditorResourceConversionPluginConvert {
mut:
	convert_(resource Resource) Resource
}

interface IEditorResourceConversionPluginConvertsTo #

interface IEditorResourceConversionPluginConvertsTo {
mut:
	converts_to_() String
}

interface IEditorResourceConversionPluginHandles #

interface IEditorResourceConversionPluginHandles {
mut:
	handles_(resource Resource) bool
}

interface IEditorResourcePickerHandleMenuSelected #

interface IEditorResourcePickerHandleMenuSelected {
mut:
	handle_menu_selected_(id i64) bool
}

interface IEditorResourcePickerSetCreateOptions #

interface IEditorResourcePickerSetCreateOptions {
mut:
	set_create_options_(menu_node Object)
}

interface IEditorResourcePreviewGeneratorCanGenerateSmallPreview #

interface IEditorResourcePreviewGeneratorCanGenerateSmallPreview {
mut:
	can_generate_small_preview_() bool
}

interface IEditorResourcePreviewGeneratorGenerate #

interface IEditorResourcePreviewGeneratorGenerate {
mut:
	generate_(resource Resource, size Vector2i, metadata Dictionary) Texture2D
}

interface IEditorResourcePreviewGeneratorGenerateFromPath #

interface IEditorResourcePreviewGeneratorGenerateFromPath {
mut:
	generate_from_path_(path String, size Vector2i, metadata Dictionary) Texture2D
}

interface IEditorResourcePreviewGeneratorGenerateSmallPreviewAutomatically #

interface IEditorResourcePreviewGeneratorGenerateSmallPreviewAutomatically {
mut:
	generate_small_preview_automatically_() bool
}

interface IEditorResourcePreviewGeneratorHandles #

interface IEditorResourcePreviewGeneratorHandles {
mut:
	handles_(gd_type String) bool
}

interface IEditorResourceTooltipPluginHandles #

interface IEditorResourceTooltipPluginHandles {
mut:
	handles_(gd_type String) bool
}

interface IEditorResourceTooltipPluginMakeTooltipForPath #

interface IEditorResourceTooltipPluginMakeTooltipForPath {
mut:
	make_tooltip_for_path_(path String, metadata Dictionary, base Control) Control
}

interface IEditorSceneFormatImporterGetExtensions #

interface IEditorSceneFormatImporterGetExtensions {
mut:
	get_extensions_() PackedStringArray
}

interface IEditorSceneFormatImporterGetImportOptions #

interface IEditorSceneFormatImporterGetImportOptions {
mut:
	get_import_options_(path String)
}

interface IEditorSceneFormatImporterGetOptionVisibility #

interface IEditorSceneFormatImporterGetOptionVisibility {
mut:
	get_option_visibility_(path String, for_animation bool, option String) Variant
}

interface IEditorSceneFormatImporterImportScene #

interface IEditorSceneFormatImporterImportScene {
mut:
	import_scene_(path String, flags i64, options Dictionary) Object
}

interface IEditorScenePostImportPluginGetImportOptions #

interface IEditorScenePostImportPluginGetImportOptions {
mut:
	get_import_options_(path String)
}

interface IEditorScenePostImportPluginGetInternalImportOptions #

interface IEditorScenePostImportPluginGetInternalImportOptions {
mut:
	get_internal_import_options_(category i64)
}

interface IEditorScenePostImportPluginGetInternalOptionUpdateViewRequired #

interface IEditorScenePostImportPluginGetInternalOptionUpdateViewRequired {
mut:
	get_internal_option_update_view_required_(category i64, option String) Variant
}

interface IEditorScenePostImportPluginGetInternalOptionVisibility #

interface IEditorScenePostImportPluginGetInternalOptionVisibility {
mut:
	get_internal_option_visibility_(category i64, for_animation bool, option String) Variant
}

interface IEditorScenePostImportPluginGetOptionVisibility #

interface IEditorScenePostImportPluginGetOptionVisibility {
mut:
	get_option_visibility_(path String, for_animation bool, option String) Variant
}

interface IEditorScenePostImportPluginInternalProcess #

interface IEditorScenePostImportPluginInternalProcess {
mut:
	internal_process_(category i64, base_node Node, node Node, resource Resource)
}

interface IEditorScenePostImportPluginPostProcess #

interface IEditorScenePostImportPluginPostProcess {
mut:
	post_process_(scene Node)
}

interface IEditorScenePostImportPluginPreProcess #

interface IEditorScenePostImportPluginPreProcess {
mut:
	pre_process_(scene Node)
}

interface IEditorScenePostImportPostImport #

interface IEditorScenePostImportPostImport {
mut:
	post_import_(scene Node) Object
}

interface IEditorScriptRun #

interface IEditorScriptRun {
mut:
	run_()
}

interface IEditorSyntaxHighlighterCreate #

interface IEditorSyntaxHighlighterCreate {
mut:
	create_() EditorSyntaxHighlighter
}

interface IEditorSyntaxHighlighterGetName #

interface IEditorSyntaxHighlighterGetName {
mut:
	get_name_() String
}

interface IEditorSyntaxHighlighterGetSupportedLanguages #

interface IEditorSyntaxHighlighterGetSupportedLanguages {
mut:
	get_supported_languages_() PackedStringArray
}

interface IEditorTranslationParserPluginGetRecognizedExtensions #

interface IEditorTranslationParserPluginGetRecognizedExtensions {
mut:
	get_recognized_extensions_() PackedStringArray
}

interface IEditorTranslationParserPluginParseFile #

interface IEditorTranslationParserPluginParseFile {
mut:
	parse_file_(path String) Array
}

interface IEditorVCSInterfaceCheckoutBranch #

interface IEditorVCSInterfaceCheckoutBranch {
mut:
	checkout_branch_(branch_name String) bool
}

interface IEditorVCSInterfaceCommit #

interface IEditorVCSInterfaceCommit {
mut:
	commit_(msg String)
}

interface IEditorVCSInterfaceCreateBranch #

interface IEditorVCSInterfaceCreateBranch {
mut:
	create_branch_(branch_name String)
}

interface IEditorVCSInterfaceCreateRemote #

interface IEditorVCSInterfaceCreateRemote {
mut:
	create_remote_(remote_name String, remote_url String)
}

interface IEditorVCSInterfaceDiscardFile #

interface IEditorVCSInterfaceDiscardFile {
mut:
	discard_file_(file_path String)
}

interface IEditorVCSInterfaceFetch #

interface IEditorVCSInterfaceFetch {
mut:
	fetch_(remote String)
}

interface IEditorVCSInterfaceGetBranchList #

interface IEditorVCSInterfaceGetBranchList {
mut:
	get_branch_list_() Array
}

interface IEditorVCSInterfaceGetCurrentBranchName #

interface IEditorVCSInterfaceGetCurrentBranchName {
mut:
	get_current_branch_name_() String
}

interface IEditorVCSInterfaceGetDiff #

interface IEditorVCSInterfaceGetDiff {
mut:
	get_diff_(identifier String, area i64) Array
}

interface IEditorVCSInterfaceGetLineDiff #

interface IEditorVCSInterfaceGetLineDiff {
mut:
	get_line_diff_(file_path String, text String) Array
}

interface IEditorVCSInterfaceGetModifiedFilesData #

interface IEditorVCSInterfaceGetModifiedFilesData {
mut:
	get_modified_files_data_() Array
}

interface IEditorVCSInterfaceGetPreviousCommits #

interface IEditorVCSInterfaceGetPreviousCommits {
mut:
	get_previous_commits_(max_commits i64) Array
}

interface IEditorVCSInterfaceGetRemotes #

interface IEditorVCSInterfaceGetRemotes {
mut:
	get_remotes_() Array
}

interface IEditorVCSInterfaceGetVcsName #

interface IEditorVCSInterfaceGetVcsName {
mut:
	get_vcs_name_() String
}

interface IEditorVCSInterfaceInitialize #

interface IEditorVCSInterfaceInitialize {
mut:
	initialize_(project_path String) bool
}

interface IEditorVCSInterfacePull #

interface IEditorVCSInterfacePull {
mut:
	pull_(remote String)
}

interface IEditorVCSInterfacePush #

interface IEditorVCSInterfacePush {
mut:
	push_(remote String, force bool)
}

interface IEditorVCSInterfaceRemoveBranch #

interface IEditorVCSInterfaceRemoveBranch {
mut:
	remove_branch_(branch_name String)
}

interface IEditorVCSInterfaceRemoveRemote #

interface IEditorVCSInterfaceRemoveRemote {
mut:
	remove_remote_(remote_name String)
}

interface IEditorVCSInterfaceSetCredentials #

interface IEditorVCSInterfaceSetCredentials {
mut:
	set_credentials_(username String, password String, ssh_public_key_path String, ssh_private_key_path String, ssh_passphrase String)
}

interface IEditorVCSInterfaceShutDown #

interface IEditorVCSInterfaceShutDown {
mut:
	shut_down_() bool
}

interface IEditorVCSInterfaceStageFile #

interface IEditorVCSInterfaceStageFile {
mut:
	stage_file_(file_path String)
}

interface IEditorVCSInterfaceUnstageFile #

interface IEditorVCSInterfaceUnstageFile {
mut:
	unstage_file_(file_path String)
}

interface IEngineProfilerAddFrame #

interface IEngineProfilerAddFrame {
mut:
	add_frame_(data Array)
}

interface IEngineProfilerTick #

interface IEngineProfilerTick {
mut:
	tick_(frame_time f64, process_time f64, physics_time f64, physics_frame_time f64)
}

interface IEngineProfilerToggle #

interface IEngineProfilerToggle {
mut:
	toggle_(enable bool, options Array)
}

interface IGLTFDocumentExtensionConvertSceneNode #

interface IGLTFDocumentExtensionConvertSceneNode {
mut:
	convert_scene_node_(state GLTFState, gltf_node GLTFNode, scene_node Node)
}

interface IGLTFDocumentExtensionExportNode #

interface IGLTFDocumentExtensionExportNode {
mut:
	export_node_(state GLTFState, gltf_node GLTFNode, json Dictionary, node Node) GDError
}

interface IGLTFDocumentExtensionExportObjectModelProperty #

interface IGLTFDocumentExtensionExportObjectModelProperty {
mut:
	export_object_model_property_(state GLTFState, node_path NodePath, godot_node Node, gltf_node_index i64, target_object Object, target_depth i64) GLTFObjectModelProperty
}

interface IGLTFDocumentExtensionExportPost #

interface IGLTFDocumentExtensionExportPost {
mut:
	export_post_(state GLTFState) GDError
}

interface IGLTFDocumentExtensionExportPostConvert #

interface IGLTFDocumentExtensionExportPostConvert {
mut:
	export_post_convert_(state GLTFState, root Node) GDError
}

interface IGLTFDocumentExtensionExportPreflight #

interface IGLTFDocumentExtensionExportPreflight {
mut:
	export_preflight_(state GLTFState, root Node) GDError
}

interface IGLTFDocumentExtensionExportPreserialize #

interface IGLTFDocumentExtensionExportPreserialize {
mut:
	export_preserialize_(state GLTFState) GDError
}

interface IGLTFDocumentExtensionGenerateSceneNode #

interface IGLTFDocumentExtensionGenerateSceneNode {
mut:
	generate_scene_node_(state GLTFState, gltf_node GLTFNode, scene_parent Node) Node3D
}

interface IGLTFDocumentExtensionGetImageFileExtension #

interface IGLTFDocumentExtensionGetImageFileExtension {
mut:
	get_image_file_extension_() String
}

interface IGLTFDocumentExtensionGetSaveableImageFormats #

interface IGLTFDocumentExtensionGetSaveableImageFormats {
mut:
	get_saveable_image_formats_() PackedStringArray
}

interface IGLTFDocumentExtensionGetSupportedExtensions #

interface IGLTFDocumentExtensionGetSupportedExtensions {
mut:
	get_supported_extensions_() PackedStringArray
}

interface IGLTFDocumentExtensionImportNode #

interface IGLTFDocumentExtensionImportNode {
mut:
	import_node_(state GLTFState, gltf_node GLTFNode, json Dictionary, node Node) GDError
}

interface IGLTFDocumentExtensionImportObjectModelProperty #

interface IGLTFDocumentExtensionImportObjectModelProperty {
mut:
	import_object_model_property_(state GLTFState, split_json_pointer PackedStringArray, partial_paths Array) GLTFObjectModelProperty
}

interface IGLTFDocumentExtensionImportPost #

interface IGLTFDocumentExtensionImportPost {
mut:
	import_post_(state GLTFState, root Node) GDError
}

interface IGLTFDocumentExtensionImportPostParse #

interface IGLTFDocumentExtensionImportPostParse {
mut:
	import_post_parse_(state GLTFState) GDError
}

interface IGLTFDocumentExtensionImportPreGenerate #

interface IGLTFDocumentExtensionImportPreGenerate {
mut:
	import_pre_generate_(state GLTFState) GDError
}

interface IGLTFDocumentExtensionImportPreflight #

interface IGLTFDocumentExtensionImportPreflight {
mut:
	import_preflight_(state GLTFState, extensions PackedStringArray) GDError
}

interface IGLTFDocumentExtensionParseImageData #

interface IGLTFDocumentExtensionParseImageData {
mut:
	parse_image_data_(state GLTFState, image_data PackedByteArray, mime_type String, ret_image Image) GDError
}

interface IGLTFDocumentExtensionParseNodeExtensions #

interface IGLTFDocumentExtensionParseNodeExtensions {
mut:
	parse_node_extensions_(state GLTFState, gltf_node GLTFNode, extensions Dictionary) GDError
}

interface IGLTFDocumentExtensionParseTextureJson #

interface IGLTFDocumentExtensionParseTextureJson {
mut:
	parse_texture_json_(state GLTFState, texture_json Dictionary, ret_gltf_texture GLTFTexture) GDError
}

interface IGLTFDocumentExtensionSaveImageAtPath #

interface IGLTFDocumentExtensionSaveImageAtPath {
mut:
	save_image_at_path_(state GLTFState, image Image, file_path String, image_format String, lossy_quality f64) GDError
}

interface IGLTFDocumentExtensionSerializeImageToBytes #

interface IGLTFDocumentExtensionSerializeImageToBytes {
mut:
	serialize_image_to_bytes_(state GLTFState, image Image, image_dict Dictionary, image_format String, lossy_quality f64) PackedByteArray
}

interface IGLTFDocumentExtensionSerializeTextureJson #

interface IGLTFDocumentExtensionSerializeTextureJson {
mut:
	serialize_texture_json_(state GLTFState, texture_json Dictionary, gltf_texture GLTFTexture, image_format String) GDError
}

interface IGraphEditGetConnectionLine #

interface IGraphEditGetConnectionLine {
mut:
	get_connection_line_(from_position Vector2, to_position Vector2) PackedVector2Array
}

interface IGraphEditIsInInputHotzone #

interface IGraphEditIsInInputHotzone {
mut:
	is_in_input_hotzone_(in_node Object, in_port i64, mouse_position Vector2) bool
}

interface IGraphEditIsInOutputHotzone #

interface IGraphEditIsInOutputHotzone {
mut:
	is_in_output_hotzone_(in_node Object, in_port i64, mouse_position Vector2) bool
}

interface IGraphEditIsNodeHoverValid #

interface IGraphEditIsNodeHoverValid {
mut:
	is_node_hover_valid_(from_node StringName, from_port i64, to_node StringName, to_port i64) bool
}

interface IGraphNodeDrawPort #

interface IGraphNodeDrawPort {
mut:
	draw_port_(slot_index i64, position Vector2i, left bool, color Color)
}

interface IImageFormatLoaderExtensionGetRecognizedExtensions #

interface IImageFormatLoaderExtensionGetRecognizedExtensions {
mut:
	get_recognized_extensions_() PackedStringArray
}

interface IImageFormatLoaderExtensionLoadImage #

interface IImageFormatLoaderExtensionLoadImage {
mut:
	load_image_(image Image, fileaccess FileAccess, flags ImageFormatLoaderLoaderFlags, scale f64) GDError
}

interface ILoggerLogError #

interface ILoggerLogError {
mut:
	log_error_(function String, file String, line i64, code String, rationale String, editor_notify bool, error_type i64, script_backtraces Array)
}

interface ILoggerLogMessage #

interface ILoggerLogMessage {
mut:
	log_message_(message String, error bool)
}

interface IMainLoopFinalize #

interface IMainLoopFinalize {
mut:
	finalize_()
}

interface IMainLoopInitialize #

interface IMainLoopInitialize {
mut:
	initialize_()
}

interface IMainLoopPhysicsProcess #

interface IMainLoopPhysicsProcess {
mut:
	physics_process_(delta f64) bool
}

interface IMainLoopProcess #

interface IMainLoopProcess {
mut:
	process_(delta f64) bool
}

interface IMaterialCanDoNextPass #

interface IMaterialCanDoNextPass {
mut:
	can_do_next_pass_() bool
}

interface IMaterialCanUseRenderPriority #

interface IMaterialCanUseRenderPriority {
mut:
	can_use_render_priority_() bool
}

interface IMaterialGetShaderMode #

interface IMaterialGetShaderMode {
mut:
	get_shader_mode_() ShaderMode
}

interface IMaterialGetShaderRid #

interface IMaterialGetShaderRid {
mut:
	get_shader_rid_() RID
}

interface IMeshGetAabb #

interface IMeshGetAabb {
mut:
	get_aabb_() AABB
}

interface IMeshGetBlendShapeCount #

interface IMeshGetBlendShapeCount {
mut:
	get_blend_shape_count_() i64
}

interface IMeshGetBlendShapeName #

interface IMeshGetBlendShapeName {
mut:
	get_blend_shape_name_(index i64) StringName
}

interface IMeshGetSurfaceCount #

interface IMeshGetSurfaceCount {
mut:
	get_surface_count_() i64
}

interface IMeshSetBlendShapeName #

interface IMeshSetBlendShapeName {
mut:
	set_blend_shape_name_(index i64, name StringName)
}

interface IMeshSurfaceGetArrayIndexLen #

interface IMeshSurfaceGetArrayIndexLen {
mut:
	surface_get_array_index_len_(index i64) i64
}

interface IMeshSurfaceGetArrayLen #

interface IMeshSurfaceGetArrayLen {
mut:
	surface_get_array_len_(index i64) i64
}

interface IMeshSurfaceGetArrays #

interface IMeshSurfaceGetArrays {
mut:
	surface_get_arrays_(index i64) Array
}

interface IMeshSurfaceGetBlendShapeArrays #

interface IMeshSurfaceGetBlendShapeArrays {
mut:
	surface_get_blend_shape_arrays_(index i64) Array
}

interface IMeshSurfaceGetFormat #

interface IMeshSurfaceGetFormat {
mut:
	surface_get_format_(index i64) i64
}

interface IMeshSurfaceGetLods #

interface IMeshSurfaceGetLods {
mut:
	surface_get_lods_(index i64) Dictionary
}

interface IMeshSurfaceGetMaterial #

interface IMeshSurfaceGetMaterial {
mut:
	surface_get_material_(index i64) Material
}

interface IMeshSurfaceGetPrimitiveType #

interface IMeshSurfaceGetPrimitiveType {
mut:
	surface_get_primitive_type_(index i64) i64
}

interface IMeshSurfaceSetMaterial #

interface IMeshSurfaceSetMaterial {
mut:
	surface_set_material_(index i64, material Material)
}

interface IMovieWriterGetAudioMixRate #

interface IMovieWriterGetAudioMixRate {
mut:
	get_audio_mix_rate_() i64
}

interface IMovieWriterGetAudioSpeakerMode #

interface IMovieWriterGetAudioSpeakerMode {
mut:
	get_audio_speaker_mode_() AudioServerSpeakerMode
}

interface IMovieWriterHandlesFile #

interface IMovieWriterHandlesFile {
mut:
	handles_file_(path String) bool
}

interface IMovieWriterWriteBegin #

interface IMovieWriterWriteBegin {
mut:
	write_begin_(movie_size Vector2i, fps i64, base_path String) GDError
}

interface IMovieWriterWriteEnd #

interface IMovieWriterWriteEnd {
mut:
	write_end_()
}

interface IMovieWriterWriteFrame #

interface IMovieWriterWriteFrame {
mut:
	write_frame_(frame_image Image, audio_frame_block voidptr) GDError
}

interface IMultiplayerAPIExtensionGetMultiplayerPeer #

interface IMultiplayerAPIExtensionGetMultiplayerPeer {
mut:
	get_multiplayer_peer_() MultiplayerPeer
}

interface IMultiplayerAPIExtensionGetPeerIds #

interface IMultiplayerAPIExtensionGetPeerIds {
mut:
	get_peer_ids_() PackedInt32Array
}

interface IMultiplayerAPIExtensionGetRemoteSenderId #

interface IMultiplayerAPIExtensionGetRemoteSenderId {
mut:
	get_remote_sender_id_() i64
}

interface IMultiplayerAPIExtensionGetUniqueId #

interface IMultiplayerAPIExtensionGetUniqueId {
mut:
	get_unique_id_() i64
}

interface IMultiplayerAPIExtensionObjectConfigurationAdd #

interface IMultiplayerAPIExtensionObjectConfigurationAdd {
mut:
	object_configuration_add_(object Object, configuration Variant) GDError
}

interface IMultiplayerAPIExtensionObjectConfigurationRemove #

interface IMultiplayerAPIExtensionObjectConfigurationRemove {
mut:
	object_configuration_remove_(object Object, configuration Variant) GDError
}

interface IMultiplayerAPIExtensionPoll #

interface IMultiplayerAPIExtensionPoll {
mut:
	poll_() GDError
}

interface IMultiplayerAPIExtensionRpc #

interface IMultiplayerAPIExtensionRpc {
mut:
	rpc_(peer i64, object Object, method StringName, gd_args Array) GDError
}

interface IMultiplayerAPIExtensionSetMultiplayerPeer #

interface IMultiplayerAPIExtensionSetMultiplayerPeer {
mut:
	set_multiplayer_peer_(multiplayer_peer MultiplayerPeer)
}

interface IMultiplayerPeerExtensionClose #

interface IMultiplayerPeerExtensionClose {
mut:
	close_()
}

interface IMultiplayerPeerExtensionDisconnectPeer #

interface IMultiplayerPeerExtensionDisconnectPeer {
mut:
	disconnect_peer_(p_peer i64, p_force bool)
}

interface IMultiplayerPeerExtensionGetAvailablePacketCount #

interface IMultiplayerPeerExtensionGetAvailablePacketCount {
mut:
	get_available_packet_count_() i64
}

interface IMultiplayerPeerExtensionGetConnectionStatus #

interface IMultiplayerPeerExtensionGetConnectionStatus {
mut:
	get_connection_status_() MultiplayerPeerConnectionStatus
}

interface IMultiplayerPeerExtensionGetMaxPacketSize #

interface IMultiplayerPeerExtensionGetMaxPacketSize {
mut:
	get_max_packet_size_() i64
}

interface IMultiplayerPeerExtensionGetPacket #

interface IMultiplayerPeerExtensionGetPacket {
mut:
	get_packet_(r_buffer &&u8, r_buffer_size &i32) GDError
}

interface IMultiplayerPeerExtensionGetPacketChannel #

interface IMultiplayerPeerExtensionGetPacketChannel {
mut:
	get_packet_channel_() i64
}

interface IMultiplayerPeerExtensionGetPacketMode #

interface IMultiplayerPeerExtensionGetPacketMode {
mut:
	get_packet_mode_() MultiplayerPeerTransferMode
}

interface IMultiplayerPeerExtensionGetPacketPeer #

interface IMultiplayerPeerExtensionGetPacketPeer {
mut:
	get_packet_peer_() i64
}

interface IMultiplayerPeerExtensionGetPacketScript #

interface IMultiplayerPeerExtensionGetPacketScript {
mut:
	get_packet_script_() PackedByteArray
}

interface IMultiplayerPeerExtensionGetTransferChannel #

interface IMultiplayerPeerExtensionGetTransferChannel {
mut:
	get_transfer_channel_() i64
}

interface IMultiplayerPeerExtensionGetTransferMode #

interface IMultiplayerPeerExtensionGetTransferMode {
mut:
	get_transfer_mode_() MultiplayerPeerTransferMode
}

interface IMultiplayerPeerExtensionGetUniqueId #

interface IMultiplayerPeerExtensionGetUniqueId {
mut:
	get_unique_id_() i64
}

interface IMultiplayerPeerExtensionIsRefusingNewConnections #

interface IMultiplayerPeerExtensionIsRefusingNewConnections {
mut:
	is_refusing_new_connections_() bool
}

interface IMultiplayerPeerExtensionIsServer #

interface IMultiplayerPeerExtensionIsServer {
mut:
	is_server_() bool
}

interface IMultiplayerPeerExtensionIsServerRelaySupported #

interface IMultiplayerPeerExtensionIsServerRelaySupported {
mut:
	is_server_relay_supported_() bool
}

interface IMultiplayerPeerExtensionPoll #

interface IMultiplayerPeerExtensionPoll {
mut:
	poll_()
}

interface IMultiplayerPeerExtensionPutPacket #

interface IMultiplayerPeerExtensionPutPacket {
mut:
	put_packet_(p_buffer &u8, p_buffer_size i64) GDError
}

interface IMultiplayerPeerExtensionPutPacketScript #

interface IMultiplayerPeerExtensionPutPacketScript {
mut:
	put_packet_script_(p_buffer PackedByteArray) GDError
}

interface IMultiplayerPeerExtensionSetRefuseNewConnections #

interface IMultiplayerPeerExtensionSetRefuseNewConnections {
mut:
	set_refuse_new_connections_(p_enable bool)
}

interface IMultiplayerPeerExtensionSetTargetPeer #

interface IMultiplayerPeerExtensionSetTargetPeer {
mut:
	set_target_peer_(p_peer i64)
}

interface IMultiplayerPeerExtensionSetTransferChannel #

interface IMultiplayerPeerExtensionSetTransferChannel {
mut:
	set_transfer_channel_(p_channel i64)
}

interface IMultiplayerPeerExtensionSetTransferMode #

interface IMultiplayerPeerExtensionSetTransferMode {
mut:
	set_transfer_mode_(p_mode MultiplayerPeerTransferMode)
}

interface INodeEnterTree #

interface INodeEnterTree {
mut:
	enter_tree_()
}

interface INodeExitTree #

interface INodeExitTree {
mut:
	exit_tree_()
}

interface INodeGetAccessibilityConfigurationWarnings #

interface INodeGetAccessibilityConfigurationWarnings {
mut:
	get_accessibility_configuration_warnings_() PackedStringArray
}

interface INodeGetConfigurationWarnings #

interface INodeGetConfigurationWarnings {
mut:
	get_configuration_warnings_() PackedStringArray
}

interface INodeGetFocusedAccessibilityElement #

interface INodeGetFocusedAccessibilityElement {
mut:
	get_focused_accessibility_element_() RID
}

interface INodeInput #

interface INodeInput {
mut:
	input_(event InputEvent)
}

interface INodePhysicsProcess #

interface INodePhysicsProcess {
mut:
	physics_process_(delta f64)
}

interface INodeProcess #

interface INodeProcess {
mut:
	process_(delta f64)
}

interface INodeReady #

interface INodeReady {
mut:
	ready_()
}

interface INodeShortcutInput #

interface INodeShortcutInput {
mut:
	shortcut_input_(event InputEvent)
}

interface INodeUnhandledInput #

interface INodeUnhandledInput {
mut:
	unhandled_input_(event InputEvent)
}

interface INodeUnhandledKeyInput #

interface INodeUnhandledKeyInput {
mut:
	unhandled_key_input_(event InputEvent)
}

interface IOpenXRBindingModifierGetDescription #

interface IOpenXRBindingModifierGetDescription {
mut:
	get_description_() String
}

interface IOpenXRBindingModifierGetIpModification #

interface IOpenXRBindingModifierGetIpModification {
mut:
	get_ip_modification_() PackedByteArray
}

interface IOpenXRExtensionWrapperGetCompositionLayer #

interface IOpenXRExtensionWrapperGetCompositionLayer {
mut:
	get_composition_layer_(index i64) i64
}

interface IOpenXRExtensionWrapperGetCompositionLayerCount #

interface IOpenXRExtensionWrapperGetCompositionLayerCount {
mut:
	get_composition_layer_count_() i64
}

interface IOpenXRExtensionWrapperGetCompositionLayerOrder #

interface IOpenXRExtensionWrapperGetCompositionLayerOrder {
mut:
	get_composition_layer_order_(index i64) i64
}

interface IOpenXRExtensionWrapperGetRequestedExtensions #

interface IOpenXRExtensionWrapperGetRequestedExtensions {
mut:
	get_requested_extensions_() Dictionary
}

interface IOpenXRExtensionWrapperGetSuggestedTrackerNames #

interface IOpenXRExtensionWrapperGetSuggestedTrackerNames {
mut:
	get_suggested_tracker_names_() PackedStringArray
}

interface IOpenXRExtensionWrapperGetViewportCompositionLayerExtensionProperties #

interface IOpenXRExtensionWrapperGetViewportCompositionLayerExtensionProperties {
mut:
	get_viewport_composition_layer_extension_properties_() Array
}

interface IOpenXRExtensionWrapperGetViewportCompositionLayerExtensionPropertyDefaults #

interface IOpenXRExtensionWrapperGetViewportCompositionLayerExtensionPropertyDefaults {
mut:
	get_viewport_composition_layer_extension_property_defaults_() Dictionary
}

interface IOpenXRExtensionWrapperOnBeforeInstanceCreated #

interface IOpenXRExtensionWrapperOnBeforeInstanceCreated {
mut:
	on_before_instance_created_()
}

interface IOpenXRExtensionWrapperOnEventPolled #

interface IOpenXRExtensionWrapperOnEventPolled {
mut:
	on_event_polled_(event voidptr) bool
}

interface IOpenXRExtensionWrapperOnInstanceCreated #

interface IOpenXRExtensionWrapperOnInstanceCreated {
mut:
	on_instance_created_(instance i64)
}

interface IOpenXRExtensionWrapperOnInstanceDestroyed #

interface IOpenXRExtensionWrapperOnInstanceDestroyed {
mut:
	on_instance_destroyed_()
}

interface IOpenXRExtensionWrapperOnMainSwapchainsCreated #

interface IOpenXRExtensionWrapperOnMainSwapchainsCreated {
mut:
	on_main_swapchains_created_()
}

interface IOpenXRExtensionWrapperOnPostDrawViewport #

interface IOpenXRExtensionWrapperOnPostDrawViewport {
mut:
	on_post_draw_viewport_(viewport RID)
}

interface IOpenXRExtensionWrapperOnPreDrawViewport #

interface IOpenXRExtensionWrapperOnPreDrawViewport {
mut:
	on_pre_draw_viewport_(viewport RID)
}

interface IOpenXRExtensionWrapperOnPreRender #

interface IOpenXRExtensionWrapperOnPreRender {
mut:
	on_pre_render_()
}

interface IOpenXRExtensionWrapperOnProcess #

interface IOpenXRExtensionWrapperOnProcess {
mut:
	on_process_()
}

interface IOpenXRExtensionWrapperOnRegisterMetadata #

interface IOpenXRExtensionWrapperOnRegisterMetadata {
mut:
	on_register_metadata_()
}

interface IOpenXRExtensionWrapperOnSessionCreated #

interface IOpenXRExtensionWrapperOnSessionCreated {
mut:
	on_session_created_(session i64)
}

interface IOpenXRExtensionWrapperOnSessionDestroyed #

interface IOpenXRExtensionWrapperOnSessionDestroyed {
mut:
	on_session_destroyed_()
}

interface IOpenXRExtensionWrapperOnStateExiting #

interface IOpenXRExtensionWrapperOnStateExiting {
mut:
	on_state_exiting_()
}

interface IOpenXRExtensionWrapperOnStateFocused #

interface IOpenXRExtensionWrapperOnStateFocused {
mut:
	on_state_focused_()
}

interface IOpenXRExtensionWrapperOnStateIdle #

interface IOpenXRExtensionWrapperOnStateIdle {
mut:
	on_state_idle_()
}

interface IOpenXRExtensionWrapperOnStateLossPending #

interface IOpenXRExtensionWrapperOnStateLossPending {
mut:
	on_state_loss_pending_()
}

interface IOpenXRExtensionWrapperOnStateReady #

interface IOpenXRExtensionWrapperOnStateReady {
mut:
	on_state_ready_()
}

interface IOpenXRExtensionWrapperOnStateStopping #

interface IOpenXRExtensionWrapperOnStateStopping {
mut:
	on_state_stopping_()
}

interface IOpenXRExtensionWrapperOnStateSynchronized #

interface IOpenXRExtensionWrapperOnStateSynchronized {
mut:
	on_state_synchronized_()
}

interface IOpenXRExtensionWrapperOnStateVisible #

interface IOpenXRExtensionWrapperOnStateVisible {
mut:
	on_state_visible_()
}

interface IOpenXRExtensionWrapperOnViewportCompositionLayerDestroyed #

interface IOpenXRExtensionWrapperOnViewportCompositionLayerDestroyed {
mut:
	on_viewport_composition_layer_destroyed_(layer voidptr)
}

interface IOpenXRExtensionWrapperSetAndroidSurfaceSwapchainCreateInfoAndGetNextPointer #

interface IOpenXRExtensionWrapperSetAndroidSurfaceSwapchainCreateInfoAndGetNextPointer {
mut:
	set_android_surface_swapchain_create_info_and_get_next_pointer_(property_values Dictionary, next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetFrameEndInfoAndGetNextPointer #

interface IOpenXRExtensionWrapperSetFrameEndInfoAndGetNextPointer {
mut:
	set_frame_end_info_and_get_next_pointer_(next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetFrameWaitInfoAndGetNextPointer #

interface IOpenXRExtensionWrapperSetFrameWaitInfoAndGetNextPointer {
mut:
	set_frame_wait_info_and_get_next_pointer_(next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetHandJointLocationsAndGetNextPointer #

interface IOpenXRExtensionWrapperSetHandJointLocationsAndGetNextPointer {
mut:
	set_hand_joint_locations_and_get_next_pointer_(hand_index i64, next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetInstanceCreateInfoAndGetNextPointer #

interface IOpenXRExtensionWrapperSetInstanceCreateInfoAndGetNextPointer {
mut:
	set_instance_create_info_and_get_next_pointer_(next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetProjectionViewsAndGetNextPointer #

interface IOpenXRExtensionWrapperSetProjectionViewsAndGetNextPointer {
mut:
	set_projection_views_and_get_next_pointer_(view_index i64, next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetReferenceSpaceCreateInfoAndGetNextPointer #

interface IOpenXRExtensionWrapperSetReferenceSpaceCreateInfoAndGetNextPointer {
mut:
	set_reference_space_create_info_and_get_next_pointer_(reference_space_type i64, next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetSessionCreateAndGetNextPointer #

interface IOpenXRExtensionWrapperSetSessionCreateAndGetNextPointer {
mut:
	set_session_create_and_get_next_pointer_(next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetSwapchainCreateInfoAndGetNextPointer #

interface IOpenXRExtensionWrapperSetSwapchainCreateInfoAndGetNextPointer {
mut:
	set_swapchain_create_info_and_get_next_pointer_(next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetSystemPropertiesAndGetNextPointer #

interface IOpenXRExtensionWrapperSetSystemPropertiesAndGetNextPointer {
mut:
	set_system_properties_and_get_next_pointer_(next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetViewLocateInfoAndGetNextPointer #

interface IOpenXRExtensionWrapperSetViewLocateInfoAndGetNextPointer {
mut:
	set_view_locate_info_and_get_next_pointer_(next_pointer voidptr) i64
}

interface IOpenXRExtensionWrapperSetViewportCompositionLayerAndGetNextPointer #

interface IOpenXRExtensionWrapperSetViewportCompositionLayerAndGetNextPointer {
mut:
	set_viewport_composition_layer_and_get_next_pointer_(layer voidptr, property_values Dictionary, next_pointer voidptr) i64
}

interface IPacketPeerExtensionGetAvailablePacketCount #

interface IPacketPeerExtensionGetAvailablePacketCount {
mut:
	get_available_packet_count_() i64
}

interface IPacketPeerExtensionGetMaxPacketSize #

interface IPacketPeerExtensionGetMaxPacketSize {
mut:
	get_max_packet_size_() i64
}

interface IPacketPeerExtensionGetPacket #

interface IPacketPeerExtensionGetPacket {
mut:
	get_packet_(r_buffer &&u8, r_buffer_size &i32) GDError
}

interface IPacketPeerExtensionPutPacket #

interface IPacketPeerExtensionPutPacket {
mut:
	put_packet_(p_buffer &u8, p_buffer_size i64) GDError
}

interface IPhysicalBone3DIntegrateForces #

interface IPhysicalBone3DIntegrateForces {
mut:
	integrate_forces_(state PhysicsDirectBodyState3D)
}

interface IPhysicsDirectBodyState2DExtensionAddConstantCentralForce #

interface IPhysicsDirectBodyState2DExtensionAddConstantCentralForce {
mut:
	add_constant_central_force_(force Vector2)
}

interface IPhysicsDirectBodyState2DExtensionAddConstantForce #

interface IPhysicsDirectBodyState2DExtensionAddConstantForce {
mut:
	add_constant_force_(force Vector2, position Vector2)
}

interface IPhysicsDirectBodyState2DExtensionAddConstantTorque #

interface IPhysicsDirectBodyState2DExtensionAddConstantTorque {
mut:
	add_constant_torque_(torque f64)
}

interface IPhysicsDirectBodyState2DExtensionApplyCentralForce #

interface IPhysicsDirectBodyState2DExtensionApplyCentralForce {
mut:
	apply_central_force_(force Vector2)
}

interface IPhysicsDirectBodyState2DExtensionApplyCentralImpulse #

interface IPhysicsDirectBodyState2DExtensionApplyCentralImpulse {
mut:
	apply_central_impulse_(impulse Vector2)
}

interface IPhysicsDirectBodyState2DExtensionApplyForce #

interface IPhysicsDirectBodyState2DExtensionApplyForce {
mut:
	apply_force_(force Vector2, position Vector2)
}

interface IPhysicsDirectBodyState2DExtensionApplyImpulse #

interface IPhysicsDirectBodyState2DExtensionApplyImpulse {
mut:
	apply_impulse_(impulse Vector2, position Vector2)
}

interface IPhysicsDirectBodyState2DExtensionApplyTorque #

interface IPhysicsDirectBodyState2DExtensionApplyTorque {
mut:
	apply_torque_(torque f64)
}

interface IPhysicsDirectBodyState2DExtensionApplyTorqueImpulse #

interface IPhysicsDirectBodyState2DExtensionApplyTorqueImpulse {
mut:
	apply_torque_impulse_(impulse f64)
}

interface IPhysicsDirectBodyState2DExtensionGetAngularVelocity #

interface IPhysicsDirectBodyState2DExtensionGetAngularVelocity {
mut:
	get_angular_velocity_() f64
}

interface IPhysicsDirectBodyState2DExtensionGetCenterOfMass #

interface IPhysicsDirectBodyState2DExtensionGetCenterOfMass {
mut:
	get_center_of_mass_() Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetCenterOfMassLocal #

interface IPhysicsDirectBodyState2DExtensionGetCenterOfMassLocal {
mut:
	get_center_of_mass_local_() Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetConstantForce #

interface IPhysicsDirectBodyState2DExtensionGetConstantForce {
mut:
	get_constant_force_() Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetConstantTorque #

interface IPhysicsDirectBodyState2DExtensionGetConstantTorque {
mut:
	get_constant_torque_() f64
}

interface IPhysicsDirectBodyState2DExtensionGetContactCollider #

interface IPhysicsDirectBodyState2DExtensionGetContactCollider {
mut:
	get_contact_collider_(contact_idx i64) RID
}

interface IPhysicsDirectBodyState2DExtensionGetContactColliderId #

interface IPhysicsDirectBodyState2DExtensionGetContactColliderId {
mut:
	get_contact_collider_id_(contact_idx i64) i64
}

interface IPhysicsDirectBodyState2DExtensionGetContactColliderObject #

interface IPhysicsDirectBodyState2DExtensionGetContactColliderObject {
mut:
	get_contact_collider_object_(contact_idx i64) Object
}

interface IPhysicsDirectBodyState2DExtensionGetContactColliderPosition #

interface IPhysicsDirectBodyState2DExtensionGetContactColliderPosition {
mut:
	get_contact_collider_position_(contact_idx i64) Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetContactColliderShape #

interface IPhysicsDirectBodyState2DExtensionGetContactColliderShape {
mut:
	get_contact_collider_shape_(contact_idx i64) i64
}

interface IPhysicsDirectBodyState2DExtensionGetContactColliderVelocityAtPosition #

interface IPhysicsDirectBodyState2DExtensionGetContactColliderVelocityAtPosition {
mut:
	get_contact_collider_velocity_at_position_(contact_idx i64) Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetContactCount #

interface IPhysicsDirectBodyState2DExtensionGetContactCount {
mut:
	get_contact_count_() i64
}

interface IPhysicsDirectBodyState2DExtensionGetContactImpulse #

interface IPhysicsDirectBodyState2DExtensionGetContactImpulse {
mut:
	get_contact_impulse_(contact_idx i64) Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetContactLocalNormal #

interface IPhysicsDirectBodyState2DExtensionGetContactLocalNormal {
mut:
	get_contact_local_normal_(contact_idx i64) Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetContactLocalPosition #

interface IPhysicsDirectBodyState2DExtensionGetContactLocalPosition {
mut:
	get_contact_local_position_(contact_idx i64) Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetContactLocalShape #

interface IPhysicsDirectBodyState2DExtensionGetContactLocalShape {
mut:
	get_contact_local_shape_(contact_idx i64) i64
}

interface IPhysicsDirectBodyState2DExtensionGetContactLocalVelocityAtPosition #

interface IPhysicsDirectBodyState2DExtensionGetContactLocalVelocityAtPosition {
mut:
	get_contact_local_velocity_at_position_(contact_idx i64) Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetInverseInertia #

interface IPhysicsDirectBodyState2DExtensionGetInverseInertia {
mut:
	get_inverse_inertia_() f64
}

interface IPhysicsDirectBodyState2DExtensionGetInverseMass #

interface IPhysicsDirectBodyState2DExtensionGetInverseMass {
mut:
	get_inverse_mass_() f64
}

interface IPhysicsDirectBodyState2DExtensionGetLinearVelocity #

interface IPhysicsDirectBodyState2DExtensionGetLinearVelocity {
mut:
	get_linear_velocity_() Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetSpaceState #

interface IPhysicsDirectBodyState2DExtensionGetSpaceState {
mut:
	get_space_state_() PhysicsDirectSpaceState2D
}

interface IPhysicsDirectBodyState2DExtensionGetStep #

interface IPhysicsDirectBodyState2DExtensionGetStep {
mut:
	get_step_() f64
}

interface IPhysicsDirectBodyState2DExtensionGetTotalAngularDamp #

interface IPhysicsDirectBodyState2DExtensionGetTotalAngularDamp {
mut:
	get_total_angular_damp_() f64
}

interface IPhysicsDirectBodyState2DExtensionGetTotalGravity #

interface IPhysicsDirectBodyState2DExtensionGetTotalGravity {
mut:
	get_total_gravity_() Vector2
}

interface IPhysicsDirectBodyState2DExtensionGetTotalLinearDamp #

interface IPhysicsDirectBodyState2DExtensionGetTotalLinearDamp {
mut:
	get_total_linear_damp_() f64
}

interface IPhysicsDirectBodyState2DExtensionGetTransform #

interface IPhysicsDirectBodyState2DExtensionGetTransform {
mut:
	get_transform_() Transform2D
}

interface IPhysicsDirectBodyState2DExtensionGetVelocityAtLocalPosition #

interface IPhysicsDirectBodyState2DExtensionGetVelocityAtLocalPosition {
mut:
	get_velocity_at_local_position_(local_position Vector2) Vector2
}

interface IPhysicsDirectBodyState2DExtensionIntegrateForces #

interface IPhysicsDirectBodyState2DExtensionIntegrateForces {
mut:
	integrate_forces_()
}

interface IPhysicsDirectBodyState2DExtensionIsSleeping #

interface IPhysicsDirectBodyState2DExtensionIsSleeping {
mut:
	is_sleeping_() bool
}

interface IPhysicsDirectBodyState2DExtensionSetAngularVelocity #

interface IPhysicsDirectBodyState2DExtensionSetAngularVelocity {
mut:
	set_angular_velocity_(velocity f64)
}

interface IPhysicsDirectBodyState2DExtensionSetConstantForce #

interface IPhysicsDirectBodyState2DExtensionSetConstantForce {
mut:
	set_constant_force_(force Vector2)
}

interface IPhysicsDirectBodyState2DExtensionSetConstantTorque #

interface IPhysicsDirectBodyState2DExtensionSetConstantTorque {
mut:
	set_constant_torque_(torque f64)
}

interface IPhysicsDirectBodyState2DExtensionSetLinearVelocity #

interface IPhysicsDirectBodyState2DExtensionSetLinearVelocity {
mut:
	set_linear_velocity_(velocity Vector2)
}

interface IPhysicsDirectBodyState2DExtensionSetSleepState #

interface IPhysicsDirectBodyState2DExtensionSetSleepState {
mut:
	set_sleep_state_(enabled bool)
}

interface IPhysicsDirectBodyState2DExtensionSetTransform #

interface IPhysicsDirectBodyState2DExtensionSetTransform {
mut:
	set_transform_(transform Transform2D)
}

interface IPhysicsDirectBodyState3DExtensionAddConstantCentralForce #

interface IPhysicsDirectBodyState3DExtensionAddConstantCentralForce {
mut:
	add_constant_central_force_(force Vector3)
}

interface IPhysicsDirectBodyState3DExtensionAddConstantForce #

interface IPhysicsDirectBodyState3DExtensionAddConstantForce {
mut:
	add_constant_force_(force Vector3, position Vector3)
}

interface IPhysicsDirectBodyState3DExtensionAddConstantTorque #

interface IPhysicsDirectBodyState3DExtensionAddConstantTorque {
mut:
	add_constant_torque_(torque Vector3)
}

interface IPhysicsDirectBodyState3DExtensionApplyCentralForce #

interface IPhysicsDirectBodyState3DExtensionApplyCentralForce {
mut:
	apply_central_force_(force Vector3)
}

interface IPhysicsDirectBodyState3DExtensionApplyCentralImpulse #

interface IPhysicsDirectBodyState3DExtensionApplyCentralImpulse {
mut:
	apply_central_impulse_(impulse Vector3)
}

interface IPhysicsDirectBodyState3DExtensionApplyForce #

interface IPhysicsDirectBodyState3DExtensionApplyForce {
mut:
	apply_force_(force Vector3, position Vector3)
}

interface IPhysicsDirectBodyState3DExtensionApplyImpulse #

interface IPhysicsDirectBodyState3DExtensionApplyImpulse {
mut:
	apply_impulse_(impulse Vector3, position Vector3)
}

interface IPhysicsDirectBodyState3DExtensionApplyTorque #

interface IPhysicsDirectBodyState3DExtensionApplyTorque {
mut:
	apply_torque_(torque Vector3)
}

interface IPhysicsDirectBodyState3DExtensionApplyTorqueImpulse #

interface IPhysicsDirectBodyState3DExtensionApplyTorqueImpulse {
mut:
	apply_torque_impulse_(impulse Vector3)
}

interface IPhysicsDirectBodyState3DExtensionGetAngularVelocity #

interface IPhysicsDirectBodyState3DExtensionGetAngularVelocity {
mut:
	get_angular_velocity_() Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetCenterOfMass #

interface IPhysicsDirectBodyState3DExtensionGetCenterOfMass {
mut:
	get_center_of_mass_() Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetCenterOfMassLocal #

interface IPhysicsDirectBodyState3DExtensionGetCenterOfMassLocal {
mut:
	get_center_of_mass_local_() Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetConstantForce #

interface IPhysicsDirectBodyState3DExtensionGetConstantForce {
mut:
	get_constant_force_() Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetConstantTorque #

interface IPhysicsDirectBodyState3DExtensionGetConstantTorque {
mut:
	get_constant_torque_() Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetContactCollider #

interface IPhysicsDirectBodyState3DExtensionGetContactCollider {
mut:
	get_contact_collider_(contact_idx i64) RID
}

interface IPhysicsDirectBodyState3DExtensionGetContactColliderId #

interface IPhysicsDirectBodyState3DExtensionGetContactColliderId {
mut:
	get_contact_collider_id_(contact_idx i64) i64
}

interface IPhysicsDirectBodyState3DExtensionGetContactColliderObject #

interface IPhysicsDirectBodyState3DExtensionGetContactColliderObject {
mut:
	get_contact_collider_object_(contact_idx i64) Object
}

interface IPhysicsDirectBodyState3DExtensionGetContactColliderPosition #

interface IPhysicsDirectBodyState3DExtensionGetContactColliderPosition {
mut:
	get_contact_collider_position_(contact_idx i64) Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetContactColliderShape #

interface IPhysicsDirectBodyState3DExtensionGetContactColliderShape {
mut:
	get_contact_collider_shape_(contact_idx i64) i64
}

interface IPhysicsDirectBodyState3DExtensionGetContactColliderVelocityAtPosition #

interface IPhysicsDirectBodyState3DExtensionGetContactColliderVelocityAtPosition {
mut:
	get_contact_collider_velocity_at_position_(contact_idx i64) Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetContactCount #

interface IPhysicsDirectBodyState3DExtensionGetContactCount {
mut:
	get_contact_count_() i64
}

interface IPhysicsDirectBodyState3DExtensionGetContactImpulse #

interface IPhysicsDirectBodyState3DExtensionGetContactImpulse {
mut:
	get_contact_impulse_(contact_idx i64) Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetContactLocalNormal #

interface IPhysicsDirectBodyState3DExtensionGetContactLocalNormal {
mut:
	get_contact_local_normal_(contact_idx i64) Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetContactLocalPosition #

interface IPhysicsDirectBodyState3DExtensionGetContactLocalPosition {
mut:
	get_contact_local_position_(contact_idx i64) Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetContactLocalShape #

interface IPhysicsDirectBodyState3DExtensionGetContactLocalShape {
mut:
	get_contact_local_shape_(contact_idx i64) i64
}

interface IPhysicsDirectBodyState3DExtensionGetContactLocalVelocityAtPosition #

interface IPhysicsDirectBodyState3DExtensionGetContactLocalVelocityAtPosition {
mut:
	get_contact_local_velocity_at_position_(contact_idx i64) Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetInverseInertia #

interface IPhysicsDirectBodyState3DExtensionGetInverseInertia {
mut:
	get_inverse_inertia_() Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetInverseInertiaTensor #

interface IPhysicsDirectBodyState3DExtensionGetInverseInertiaTensor {
mut:
	get_inverse_inertia_tensor_() Basis
}

interface IPhysicsDirectBodyState3DExtensionGetInverseMass #

interface IPhysicsDirectBodyState3DExtensionGetInverseMass {
mut:
	get_inverse_mass_() f64
}

interface IPhysicsDirectBodyState3DExtensionGetLinearVelocity #

interface IPhysicsDirectBodyState3DExtensionGetLinearVelocity {
mut:
	get_linear_velocity_() Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetPrincipalInertiaAxes #

interface IPhysicsDirectBodyState3DExtensionGetPrincipalInertiaAxes {
mut:
	get_principal_inertia_axes_() Basis
}

interface IPhysicsDirectBodyState3DExtensionGetSpaceState #

interface IPhysicsDirectBodyState3DExtensionGetSpaceState {
mut:
	get_space_state_() PhysicsDirectSpaceState3D
}

interface IPhysicsDirectBodyState3DExtensionGetStep #

interface IPhysicsDirectBodyState3DExtensionGetStep {
mut:
	get_step_() f64
}

interface IPhysicsDirectBodyState3DExtensionGetTotalAngularDamp #

interface IPhysicsDirectBodyState3DExtensionGetTotalAngularDamp {
mut:
	get_total_angular_damp_() f64
}

interface IPhysicsDirectBodyState3DExtensionGetTotalGravity #

interface IPhysicsDirectBodyState3DExtensionGetTotalGravity {
mut:
	get_total_gravity_() Vector3
}

interface IPhysicsDirectBodyState3DExtensionGetTotalLinearDamp #

interface IPhysicsDirectBodyState3DExtensionGetTotalLinearDamp {
mut:
	get_total_linear_damp_() f64
}

interface IPhysicsDirectBodyState3DExtensionGetTransform #

interface IPhysicsDirectBodyState3DExtensionGetTransform {
mut:
	get_transform_() Transform3D
}

interface IPhysicsDirectBodyState3DExtensionGetVelocityAtLocalPosition #

interface IPhysicsDirectBodyState3DExtensionGetVelocityAtLocalPosition {
mut:
	get_velocity_at_local_position_(local_position Vector3) Vector3
}

interface IPhysicsDirectBodyState3DExtensionIntegrateForces #

interface IPhysicsDirectBodyState3DExtensionIntegrateForces {
mut:
	integrate_forces_()
}

interface IPhysicsDirectBodyState3DExtensionIsSleeping #

interface IPhysicsDirectBodyState3DExtensionIsSleeping {
mut:
	is_sleeping_() bool
}

interface IPhysicsDirectBodyState3DExtensionSetAngularVelocity #

interface IPhysicsDirectBodyState3DExtensionSetAngularVelocity {
mut:
	set_angular_velocity_(velocity Vector3)
}

interface IPhysicsDirectBodyState3DExtensionSetConstantForce #

interface IPhysicsDirectBodyState3DExtensionSetConstantForce {
mut:
	set_constant_force_(force Vector3)
}

interface IPhysicsDirectBodyState3DExtensionSetConstantTorque #

interface IPhysicsDirectBodyState3DExtensionSetConstantTorque {
mut:
	set_constant_torque_(torque Vector3)
}

interface IPhysicsDirectBodyState3DExtensionSetLinearVelocity #

interface IPhysicsDirectBodyState3DExtensionSetLinearVelocity {
mut:
	set_linear_velocity_(velocity Vector3)
}

interface IPhysicsDirectBodyState3DExtensionSetSleepState #

interface IPhysicsDirectBodyState3DExtensionSetSleepState {
mut:
	set_sleep_state_(enabled bool)
}

interface IPhysicsDirectBodyState3DExtensionSetTransform #

interface IPhysicsDirectBodyState3DExtensionSetTransform {
mut:
	set_transform_(transform Transform3D)
}

interface IPhysicsDirectSpaceState2DExtensionCastMotion #

interface IPhysicsDirectSpaceState2DExtensionCastMotion {
mut:
	cast_motion_(shape_rid RID, transform Transform2D, motion Vector2, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, closest_safe &f64, closest_unsafe &f64) bool
}

interface IPhysicsDirectSpaceState2DExtensionCollideShape #

interface IPhysicsDirectSpaceState2DExtensionCollideShape {
mut:
	collide_shape_(shape_rid RID, transform Transform2D, motion Vector2, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, results voidptr, max_results i64, result_count &i32) bool
}

interface IPhysicsDirectSpaceState2DExtensionIntersectPoint #

interface IPhysicsDirectSpaceState2DExtensionIntersectPoint {
mut:
	intersect_point_(position Vector2, canvas_instance_id i64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, results &PhysicsServer2DExtensionShapeResult, max_results i64) i64
}

interface IPhysicsDirectSpaceState2DExtensionIntersectRay #

interface IPhysicsDirectSpaceState2DExtensionIntersectRay {
mut:
	intersect_ray_(from Vector2, to Vector2, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, hit_from_inside bool, gd_result &PhysicsServer2DExtensionRayResult) bool
}

interface IPhysicsDirectSpaceState2DExtensionIntersectShape #

interface IPhysicsDirectSpaceState2DExtensionIntersectShape {
mut:
	intersect_shape_(shape_rid RID, transform Transform2D, motion Vector2, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, gd_result &PhysicsServer2DExtensionShapeResult, max_results i64) i64
}

interface IPhysicsDirectSpaceState2DExtensionRestInfo #

interface IPhysicsDirectSpaceState2DExtensionRestInfo {
mut:
	rest_info_(shape_rid RID, transform Transform2D, motion Vector2, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, rest_info &PhysicsServer2DExtensionShapeRestInfo) bool
}

interface IPhysicsDirectSpaceState3DExtensionCastMotion #

interface IPhysicsDirectSpaceState3DExtensionCastMotion {
mut:
	cast_motion_(shape_rid RID, transform Transform3D, motion Vector3, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, closest_safe &f64, closest_unsafe &f64, info &PhysicsServer3DExtensionShapeRestInfo) bool
}

interface IPhysicsDirectSpaceState3DExtensionCollideShape #

interface IPhysicsDirectSpaceState3DExtensionCollideShape {
mut:
	collide_shape_(shape_rid RID, transform Transform3D, motion Vector3, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, results voidptr, max_results i64, result_count &i32) bool
}

interface IPhysicsDirectSpaceState3DExtensionGetClosestPointToObjectVolume #

interface IPhysicsDirectSpaceState3DExtensionGetClosestPointToObjectVolume {
mut:
	get_closest_point_to_object_volume_(object RID, point Vector3) Vector3
}

interface IPhysicsDirectSpaceState3DExtensionIntersectPoint #

interface IPhysicsDirectSpaceState3DExtensionIntersectPoint {
mut:
	intersect_point_(position Vector3, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, results &PhysicsServer3DExtensionShapeResult, max_results i64) i64
}

interface IPhysicsDirectSpaceState3DExtensionIntersectRay #

interface IPhysicsDirectSpaceState3DExtensionIntersectRay {
mut:
	intersect_ray_(from Vector3, to Vector3, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, hit_from_inside bool, hit_back_faces bool, pick_ray bool, gd_result &PhysicsServer3DExtensionRayResult) bool
}

interface IPhysicsDirectSpaceState3DExtensionIntersectShape #

interface IPhysicsDirectSpaceState3DExtensionIntersectShape {
mut:
	intersect_shape_(shape_rid RID, transform Transform3D, motion Vector3, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, result_count &PhysicsServer3DExtensionShapeResult, max_results i64) i64
}

interface IPhysicsDirectSpaceState3DExtensionRestInfo #

interface IPhysicsDirectSpaceState3DExtensionRestInfo {
mut:
	rest_info_(shape_rid RID, transform Transform3D, motion Vector3, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, rest_info &PhysicsServer3DExtensionShapeRestInfo) bool
}

interface IPhysicsServer2DExtensionAreaAddShape #

interface IPhysicsServer2DExtensionAreaAddShape {
mut:
	area_add_shape_(area RID, shape RID, transform Transform2D, disabled bool)
}

interface IPhysicsServer2DExtensionAreaAttachCanvasInstanceId #

interface IPhysicsServer2DExtensionAreaAttachCanvasInstanceId {
mut:
	area_attach_canvas_instance_id_(area RID, id i64)
}

interface IPhysicsServer2DExtensionAreaAttachObjectInstanceId #

interface IPhysicsServer2DExtensionAreaAttachObjectInstanceId {
mut:
	area_attach_object_instance_id_(area RID, id i64)
}

interface IPhysicsServer2DExtensionAreaClearShapes #

interface IPhysicsServer2DExtensionAreaClearShapes {
mut:
	area_clear_shapes_(area RID)
}

interface IPhysicsServer2DExtensionAreaCreate #

interface IPhysicsServer2DExtensionAreaCreate {
mut:
	area_create_() RID
}

interface IPhysicsServer2DExtensionAreaGetCanvasInstanceId #

interface IPhysicsServer2DExtensionAreaGetCanvasInstanceId {
mut:
	area_get_canvas_instance_id_(area RID) i64
}

interface IPhysicsServer2DExtensionAreaGetCollisionLayer #

interface IPhysicsServer2DExtensionAreaGetCollisionLayer {
mut:
	area_get_collision_layer_(area RID) i64
}

interface IPhysicsServer2DExtensionAreaGetCollisionMask #

interface IPhysicsServer2DExtensionAreaGetCollisionMask {
mut:
	area_get_collision_mask_(area RID) i64
}

interface IPhysicsServer2DExtensionAreaGetObjectInstanceId #

interface IPhysicsServer2DExtensionAreaGetObjectInstanceId {
mut:
	area_get_object_instance_id_(area RID) i64
}

interface IPhysicsServer2DExtensionAreaGetParam #

interface IPhysicsServer2DExtensionAreaGetParam {
mut:
	area_get_param_(area RID, param PhysicsServer2DAreaParameter) Variant
}

interface IPhysicsServer2DExtensionAreaGetShape #

interface IPhysicsServer2DExtensionAreaGetShape {
mut:
	area_get_shape_(area RID, shape_idx i64) RID
}

interface IPhysicsServer2DExtensionAreaGetShapeCount #

interface IPhysicsServer2DExtensionAreaGetShapeCount {
mut:
	area_get_shape_count_(area RID) i64
}

interface IPhysicsServer2DExtensionAreaGetShapeTransform #

interface IPhysicsServer2DExtensionAreaGetShapeTransform {
mut:
	area_get_shape_transform_(area RID, shape_idx i64) Transform2D
}

interface IPhysicsServer2DExtensionAreaGetSpace #

interface IPhysicsServer2DExtensionAreaGetSpace {
mut:
	area_get_space_(area RID) RID
}

interface IPhysicsServer2DExtensionAreaGetTransform #

interface IPhysicsServer2DExtensionAreaGetTransform {
mut:
	area_get_transform_(area RID) Transform2D
}

interface IPhysicsServer2DExtensionAreaRemoveShape #

interface IPhysicsServer2DExtensionAreaRemoveShape {
mut:
	area_remove_shape_(area RID, shape_idx i64)
}

interface IPhysicsServer2DExtensionAreaSetAreaMonitorCallback #

interface IPhysicsServer2DExtensionAreaSetAreaMonitorCallback {
mut:
	area_set_area_monitor_callback_(area RID, callback Callable)
}

interface IPhysicsServer2DExtensionAreaSetCollisionLayer #

interface IPhysicsServer2DExtensionAreaSetCollisionLayer {
mut:
	area_set_collision_layer_(area RID, layer i64)
}

interface IPhysicsServer2DExtensionAreaSetCollisionMask #

interface IPhysicsServer2DExtensionAreaSetCollisionMask {
mut:
	area_set_collision_mask_(area RID, mask i64)
}

interface IPhysicsServer2DExtensionAreaSetMonitorCallback #

interface IPhysicsServer2DExtensionAreaSetMonitorCallback {
mut:
	area_set_monitor_callback_(area RID, callback Callable)
}

interface IPhysicsServer2DExtensionAreaSetMonitorable #

interface IPhysicsServer2DExtensionAreaSetMonitorable {
mut:
	area_set_monitorable_(area RID, monitorable bool)
}

interface IPhysicsServer2DExtensionAreaSetParam #

interface IPhysicsServer2DExtensionAreaSetParam {
mut:
	area_set_param_(area RID, param PhysicsServer2DAreaParameter, value Variant)
}

interface IPhysicsServer2DExtensionAreaSetPickable #

interface IPhysicsServer2DExtensionAreaSetPickable {
mut:
	area_set_pickable_(area RID, pickable bool)
}

interface IPhysicsServer2DExtensionAreaSetShape #

interface IPhysicsServer2DExtensionAreaSetShape {
mut:
	area_set_shape_(area RID, shape_idx i64, shape RID)
}

interface IPhysicsServer2DExtensionAreaSetShapeDisabled #

interface IPhysicsServer2DExtensionAreaSetShapeDisabled {
mut:
	area_set_shape_disabled_(area RID, shape_idx i64, disabled bool)
}

interface IPhysicsServer2DExtensionAreaSetShapeTransform #

interface IPhysicsServer2DExtensionAreaSetShapeTransform {
mut:
	area_set_shape_transform_(area RID, shape_idx i64, transform Transform2D)
}

interface IPhysicsServer2DExtensionAreaSetSpace #

interface IPhysicsServer2DExtensionAreaSetSpace {
mut:
	area_set_space_(area RID, space RID)
}

interface IPhysicsServer2DExtensionAreaSetTransform #

interface IPhysicsServer2DExtensionAreaSetTransform {
mut:
	area_set_transform_(area RID, transform Transform2D)
}

interface IPhysicsServer2DExtensionBodyAddCollisionException #

interface IPhysicsServer2DExtensionBodyAddCollisionException {
mut:
	body_add_collision_exception_(body RID, excepted_body RID)
}

interface IPhysicsServer2DExtensionBodyAddConstantCentralForce #

interface IPhysicsServer2DExtensionBodyAddConstantCentralForce {
mut:
	body_add_constant_central_force_(body RID, force Vector2)
}

interface IPhysicsServer2DExtensionBodyAddConstantForce #

interface IPhysicsServer2DExtensionBodyAddConstantForce {
mut:
	body_add_constant_force_(body RID, force Vector2, position Vector2)
}

interface IPhysicsServer2DExtensionBodyAddConstantTorque #

interface IPhysicsServer2DExtensionBodyAddConstantTorque {
mut:
	body_add_constant_torque_(body RID, torque f64)
}

interface IPhysicsServer2DExtensionBodyAddShape #

interface IPhysicsServer2DExtensionBodyAddShape {
mut:
	body_add_shape_(body RID, shape RID, transform Transform2D, disabled bool)
}

interface IPhysicsServer2DExtensionBodyApplyCentralForce #

interface IPhysicsServer2DExtensionBodyApplyCentralForce {
mut:
	body_apply_central_force_(body RID, force Vector2)
}

interface IPhysicsServer2DExtensionBodyApplyCentralImpulse #

interface IPhysicsServer2DExtensionBodyApplyCentralImpulse {
mut:
	body_apply_central_impulse_(body RID, impulse Vector2)
}

interface IPhysicsServer2DExtensionBodyApplyForce #

interface IPhysicsServer2DExtensionBodyApplyForce {
mut:
	body_apply_force_(body RID, force Vector2, position Vector2)
}

interface IPhysicsServer2DExtensionBodyApplyImpulse #

interface IPhysicsServer2DExtensionBodyApplyImpulse {
mut:
	body_apply_impulse_(body RID, impulse Vector2, position Vector2)
}

interface IPhysicsServer2DExtensionBodyApplyTorque #

interface IPhysicsServer2DExtensionBodyApplyTorque {
mut:
	body_apply_torque_(body RID, torque f64)
}

interface IPhysicsServer2DExtensionBodyApplyTorqueImpulse #

interface IPhysicsServer2DExtensionBodyApplyTorqueImpulse {
mut:
	body_apply_torque_impulse_(body RID, impulse f64)
}

interface IPhysicsServer2DExtensionBodyAttachCanvasInstanceId #

interface IPhysicsServer2DExtensionBodyAttachCanvasInstanceId {
mut:
	body_attach_canvas_instance_id_(body RID, id i64)
}

interface IPhysicsServer2DExtensionBodyAttachObjectInstanceId #

interface IPhysicsServer2DExtensionBodyAttachObjectInstanceId {
mut:
	body_attach_object_instance_id_(body RID, id i64)
}

interface IPhysicsServer2DExtensionBodyClearShapes #

interface IPhysicsServer2DExtensionBodyClearShapes {
mut:
	body_clear_shapes_(body RID)
}

interface IPhysicsServer2DExtensionBodyCollideShape #

interface IPhysicsServer2DExtensionBodyCollideShape {
mut:
	body_collide_shape_(body RID, body_shape i64, shape RID, shape_xform Transform2D, motion Vector2, results voidptr, result_max i64, result_count &i32) bool
}

interface IPhysicsServer2DExtensionBodyCreate #

interface IPhysicsServer2DExtensionBodyCreate {
mut:
	body_create_() RID
}

interface IPhysicsServer2DExtensionBodyGetCanvasInstanceId #

interface IPhysicsServer2DExtensionBodyGetCanvasInstanceId {
mut:
	body_get_canvas_instance_id_(body RID) i64
}

interface IPhysicsServer2DExtensionBodyGetCollisionExceptions #

interface IPhysicsServer2DExtensionBodyGetCollisionExceptions {
mut:
	body_get_collision_exceptions_(body RID) Array
}

interface IPhysicsServer2DExtensionBodyGetCollisionLayer #

interface IPhysicsServer2DExtensionBodyGetCollisionLayer {
mut:
	body_get_collision_layer_(body RID) i64
}

interface IPhysicsServer2DExtensionBodyGetCollisionMask #

interface IPhysicsServer2DExtensionBodyGetCollisionMask {
mut:
	body_get_collision_mask_(body RID) i64
}

interface IPhysicsServer2DExtensionBodyGetCollisionPriority #

interface IPhysicsServer2DExtensionBodyGetCollisionPriority {
mut:
	body_get_collision_priority_(body RID) f64
}

interface IPhysicsServer2DExtensionBodyGetConstantForce #

interface IPhysicsServer2DExtensionBodyGetConstantForce {
mut:
	body_get_constant_force_(body RID) Vector2
}

interface IPhysicsServer2DExtensionBodyGetConstantTorque #

interface IPhysicsServer2DExtensionBodyGetConstantTorque {
mut:
	body_get_constant_torque_(body RID) f64
}

interface IPhysicsServer2DExtensionBodyGetContactsReportedDepthThreshold #

interface IPhysicsServer2DExtensionBodyGetContactsReportedDepthThreshold {
mut:
	body_get_contacts_reported_depth_threshold_(body RID) f64
}

interface IPhysicsServer2DExtensionBodyGetContinuousCollisionDetectionMode #

interface IPhysicsServer2DExtensionBodyGetContinuousCollisionDetectionMode {
mut:
	body_get_continuous_collision_detection_mode_(body RID) PhysicsServer2DCCDMode
}

interface IPhysicsServer2DExtensionBodyGetDirectState #

interface IPhysicsServer2DExtensionBodyGetDirectState {
mut:
	body_get_direct_state_(body RID) PhysicsDirectBodyState2D
}

interface IPhysicsServer2DExtensionBodyGetMaxContactsReported #

interface IPhysicsServer2DExtensionBodyGetMaxContactsReported {
mut:
	body_get_max_contacts_reported_(body RID) i64
}

interface IPhysicsServer2DExtensionBodyGetMode #

interface IPhysicsServer2DExtensionBodyGetMode {
mut:
	body_get_mode_(body RID) PhysicsServer2DBodyMode
}

interface IPhysicsServer2DExtensionBodyGetObjectInstanceId #

interface IPhysicsServer2DExtensionBodyGetObjectInstanceId {
mut:
	body_get_object_instance_id_(body RID) i64
}

interface IPhysicsServer2DExtensionBodyGetParam #

interface IPhysicsServer2DExtensionBodyGetParam {
mut:
	body_get_param_(body RID, param PhysicsServer2DBodyParameter) Variant
}

interface IPhysicsServer2DExtensionBodyGetShape #

interface IPhysicsServer2DExtensionBodyGetShape {
mut:
	body_get_shape_(body RID, shape_idx i64) RID
}

interface IPhysicsServer2DExtensionBodyGetShapeCount #

interface IPhysicsServer2DExtensionBodyGetShapeCount {
mut:
	body_get_shape_count_(body RID) i64
}

interface IPhysicsServer2DExtensionBodyGetShapeTransform #

interface IPhysicsServer2DExtensionBodyGetShapeTransform {
mut:
	body_get_shape_transform_(body RID, shape_idx i64) Transform2D
}

interface IPhysicsServer2DExtensionBodyGetSpace #

interface IPhysicsServer2DExtensionBodyGetSpace {
mut:
	body_get_space_(body RID) RID
}

interface IPhysicsServer2DExtensionBodyGetState #

interface IPhysicsServer2DExtensionBodyGetState {
mut:
	body_get_state_(body RID, state PhysicsServer2DBodyState) Variant
}

interface IPhysicsServer2DExtensionBodyIsOmittingForceIntegration #

interface IPhysicsServer2DExtensionBodyIsOmittingForceIntegration {
mut:
	body_is_omitting_force_integration_(body RID) bool
}

interface IPhysicsServer2DExtensionBodyRemoveCollisionException #

interface IPhysicsServer2DExtensionBodyRemoveCollisionException {
mut:
	body_remove_collision_exception_(body RID, excepted_body RID)
}

interface IPhysicsServer2DExtensionBodyRemoveShape #

interface IPhysicsServer2DExtensionBodyRemoveShape {
mut:
	body_remove_shape_(body RID, shape_idx i64)
}

interface IPhysicsServer2DExtensionBodyResetMassProperties #

interface IPhysicsServer2DExtensionBodyResetMassProperties {
mut:
	body_reset_mass_properties_(body RID)
}

interface IPhysicsServer2DExtensionBodySetAxisVelocity #

interface IPhysicsServer2DExtensionBodySetAxisVelocity {
mut:
	body_set_axis_velocity_(body RID, axis_velocity Vector2)
}

interface IPhysicsServer2DExtensionBodySetCollisionLayer #

interface IPhysicsServer2DExtensionBodySetCollisionLayer {
mut:
	body_set_collision_layer_(body RID, layer i64)
}

interface IPhysicsServer2DExtensionBodySetCollisionMask #

interface IPhysicsServer2DExtensionBodySetCollisionMask {
mut:
	body_set_collision_mask_(body RID, mask i64)
}

interface IPhysicsServer2DExtensionBodySetCollisionPriority #

interface IPhysicsServer2DExtensionBodySetCollisionPriority {
mut:
	body_set_collision_priority_(body RID, priority f64)
}

interface IPhysicsServer2DExtensionBodySetConstantForce #

interface IPhysicsServer2DExtensionBodySetConstantForce {
mut:
	body_set_constant_force_(body RID, force Vector2)
}

interface IPhysicsServer2DExtensionBodySetConstantTorque #

interface IPhysicsServer2DExtensionBodySetConstantTorque {
mut:
	body_set_constant_torque_(body RID, torque f64)
}

interface IPhysicsServer2DExtensionBodySetContactsReportedDepthThreshold #

interface IPhysicsServer2DExtensionBodySetContactsReportedDepthThreshold {
mut:
	body_set_contacts_reported_depth_threshold_(body RID, threshold f64)
}

interface IPhysicsServer2DExtensionBodySetContinuousCollisionDetectionMode #

interface IPhysicsServer2DExtensionBodySetContinuousCollisionDetectionMode {
mut:
	body_set_continuous_collision_detection_mode_(body RID, mode PhysicsServer2DCCDMode)
}

interface IPhysicsServer2DExtensionBodySetForceIntegrationCallback #

interface IPhysicsServer2DExtensionBodySetForceIntegrationCallback {
mut:
	body_set_force_integration_callback_(body RID, callable Callable, userdata Variant)
}

interface IPhysicsServer2DExtensionBodySetMaxContactsReported #

interface IPhysicsServer2DExtensionBodySetMaxContactsReported {
mut:
	body_set_max_contacts_reported_(body RID, amount i64)
}

interface IPhysicsServer2DExtensionBodySetMode #

interface IPhysicsServer2DExtensionBodySetMode {
mut:
	body_set_mode_(body RID, mode PhysicsServer2DBodyMode)
}

interface IPhysicsServer2DExtensionBodySetOmitForceIntegration #

interface IPhysicsServer2DExtensionBodySetOmitForceIntegration {
mut:
	body_set_omit_force_integration_(body RID, enable bool)
}

interface IPhysicsServer2DExtensionBodySetParam #

interface IPhysicsServer2DExtensionBodySetParam {
mut:
	body_set_param_(body RID, param PhysicsServer2DBodyParameter, value Variant)
}

interface IPhysicsServer2DExtensionBodySetPickable #

interface IPhysicsServer2DExtensionBodySetPickable {
mut:
	body_set_pickable_(body RID, pickable bool)
}

interface IPhysicsServer2DExtensionBodySetShape #

interface IPhysicsServer2DExtensionBodySetShape {
mut:
	body_set_shape_(body RID, shape_idx i64, shape RID)
}

interface IPhysicsServer2DExtensionBodySetShapeAsOneWayCollision #

interface IPhysicsServer2DExtensionBodySetShapeAsOneWayCollision {
mut:
	body_set_shape_as_one_way_collision_(body RID, shape_idx i64, enable bool, margin f64)
}

interface IPhysicsServer2DExtensionBodySetShapeDisabled #

interface IPhysicsServer2DExtensionBodySetShapeDisabled {
mut:
	body_set_shape_disabled_(body RID, shape_idx i64, disabled bool)
}

interface IPhysicsServer2DExtensionBodySetShapeTransform #

interface IPhysicsServer2DExtensionBodySetShapeTransform {
mut:
	body_set_shape_transform_(body RID, shape_idx i64, transform Transform2D)
}

interface IPhysicsServer2DExtensionBodySetSpace #

interface IPhysicsServer2DExtensionBodySetSpace {
mut:
	body_set_space_(body RID, space RID)
}

interface IPhysicsServer2DExtensionBodySetState #

interface IPhysicsServer2DExtensionBodySetState {
mut:
	body_set_state_(body RID, state PhysicsServer2DBodyState, value Variant)
}

interface IPhysicsServer2DExtensionBodySetStateSyncCallback #

interface IPhysicsServer2DExtensionBodySetStateSyncCallback {
mut:
	body_set_state_sync_callback_(body RID, callable Callable)
}

interface IPhysicsServer2DExtensionBodyTestMotion #

interface IPhysicsServer2DExtensionBodyTestMotion {
mut:
	body_test_motion_(body RID, from Transform2D, motion Vector2, margin f64, collide_separation_ray bool, recovery_as_collision bool, gd_result &PhysicsServer2DExtensionMotionResult) bool
}

interface IPhysicsServer2DExtensionCapsuleShapeCreate #

interface IPhysicsServer2DExtensionCapsuleShapeCreate {
mut:
	capsule_shape_create_() RID
}

interface IPhysicsServer2DExtensionCircleShapeCreate #

interface IPhysicsServer2DExtensionCircleShapeCreate {
mut:
	circle_shape_create_() RID
}

interface IPhysicsServer2DExtensionConcavePolygonShapeCreate #

interface IPhysicsServer2DExtensionConcavePolygonShapeCreate {
mut:
	concave_polygon_shape_create_() RID
}

interface IPhysicsServer2DExtensionConvexPolygonShapeCreate #

interface IPhysicsServer2DExtensionConvexPolygonShapeCreate {
mut:
	convex_polygon_shape_create_() RID
}

interface IPhysicsServer2DExtensionDampedSpringJointGetParam #

interface IPhysicsServer2DExtensionDampedSpringJointGetParam {
mut:
	damped_spring_joint_get_param_(joint RID, param PhysicsServer2DDampedSpringParam) f64
}

interface IPhysicsServer2DExtensionDampedSpringJointSetParam #

interface IPhysicsServer2DExtensionDampedSpringJointSetParam {
mut:
	damped_spring_joint_set_param_(joint RID, param PhysicsServer2DDampedSpringParam, value f64)
}

interface IPhysicsServer2DExtensionEndSync #

interface IPhysicsServer2DExtensionEndSync {
mut:
	end_sync_()
}

interface IPhysicsServer2DExtensionFinish #

interface IPhysicsServer2DExtensionFinish {
mut:
	finish_()
}

interface IPhysicsServer2DExtensionFlushQueries #

interface IPhysicsServer2DExtensionFlushQueries {
mut:
	flush_queries_()
}

interface IPhysicsServer2DExtensionFreeRid #

interface IPhysicsServer2DExtensionFreeRid {
mut:
	free_rid_(rid RID)
}

interface IPhysicsServer2DExtensionGetProcessInfo #

interface IPhysicsServer2DExtensionGetProcessInfo {
mut:
	get_process_info_(process_info PhysicsServer2DProcessInfo) i64
}

interface IPhysicsServer2DExtensionInit #

interface IPhysicsServer2DExtensionInit {
mut:
	init_()
}

interface IPhysicsServer2DExtensionIsFlushingQueries #

interface IPhysicsServer2DExtensionIsFlushingQueries {
mut:
	is_flushing_queries_() bool
}

interface IPhysicsServer2DExtensionJointClear #

interface IPhysicsServer2DExtensionJointClear {
mut:
	joint_clear_(joint RID)
}

interface IPhysicsServer2DExtensionJointCreate #

interface IPhysicsServer2DExtensionJointCreate {
mut:
	joint_create_() RID
}

interface IPhysicsServer2DExtensionJointDisableCollisionsBetweenBodies #

interface IPhysicsServer2DExtensionJointDisableCollisionsBetweenBodies {
mut:
	joint_disable_collisions_between_bodies_(joint RID, disable bool)
}

interface IPhysicsServer2DExtensionJointGetParam #

interface IPhysicsServer2DExtensionJointGetParam {
mut:
	joint_get_param_(joint RID, param PhysicsServer2DJointParam) f64
}

interface IPhysicsServer2DExtensionJointGetType #

interface IPhysicsServer2DExtensionJointGetType {
mut:
	joint_get_type_(joint RID) PhysicsServer2DJointType
}

interface IPhysicsServer2DExtensionJointIsDisabledCollisionsBetweenBodies #

interface IPhysicsServer2DExtensionJointIsDisabledCollisionsBetweenBodies {
mut:
	joint_is_disabled_collisions_between_bodies_(joint RID) bool
}

interface IPhysicsServer2DExtensionJointMakeDampedSpring #

interface IPhysicsServer2DExtensionJointMakeDampedSpring {
mut:
	joint_make_damped_spring_(joint RID, anchor_a Vector2, anchor_b Vector2, body_a RID, body_b RID)
}

interface IPhysicsServer2DExtensionJointMakeGroove #

interface IPhysicsServer2DExtensionJointMakeGroove {
mut:
	joint_make_groove_(joint RID, a_groove1 Vector2, a_groove2 Vector2, b_anchor Vector2, body_a RID, body_b RID)
}

interface IPhysicsServer2DExtensionJointMakePin #

interface IPhysicsServer2DExtensionJointMakePin {
mut:
	joint_make_pin_(joint RID, anchor Vector2, body_a RID, body_b RID)
}

interface IPhysicsServer2DExtensionJointSetParam #

interface IPhysicsServer2DExtensionJointSetParam {
mut:
	joint_set_param_(joint RID, param PhysicsServer2DJointParam, value f64)
}

interface IPhysicsServer2DExtensionPinJointGetFlag #

interface IPhysicsServer2DExtensionPinJointGetFlag {
mut:
	pin_joint_get_flag_(joint RID, flag PhysicsServer2DPinJointFlag) bool
}

interface IPhysicsServer2DExtensionPinJointGetParam #

interface IPhysicsServer2DExtensionPinJointGetParam {
mut:
	pin_joint_get_param_(joint RID, param PhysicsServer2DPinJointParam) f64
}

interface IPhysicsServer2DExtensionPinJointSetFlag #

interface IPhysicsServer2DExtensionPinJointSetFlag {
mut:
	pin_joint_set_flag_(joint RID, flag PhysicsServer2DPinJointFlag, enabled bool)
}

interface IPhysicsServer2DExtensionPinJointSetParam #

interface IPhysicsServer2DExtensionPinJointSetParam {
mut:
	pin_joint_set_param_(joint RID, param PhysicsServer2DPinJointParam, value f64)
}

interface IPhysicsServer2DExtensionRectangleShapeCreate #

interface IPhysicsServer2DExtensionRectangleShapeCreate {
mut:
	rectangle_shape_create_() RID
}

interface IPhysicsServer2DExtensionSegmentShapeCreate #

interface IPhysicsServer2DExtensionSegmentShapeCreate {
mut:
	segment_shape_create_() RID
}

interface IPhysicsServer2DExtensionSeparationRayShapeCreate #

interface IPhysicsServer2DExtensionSeparationRayShapeCreate {
mut:
	separation_ray_shape_create_() RID
}

interface IPhysicsServer2DExtensionSetActive #

interface IPhysicsServer2DExtensionSetActive {
mut:
	set_active_(active bool)
}

interface IPhysicsServer2DExtensionShapeCollide #

interface IPhysicsServer2DExtensionShapeCollide {
mut:
	shape_collide_(shape_a RID, xform_a Transform2D, motion_a Vector2, shape_b RID, xform_b Transform2D, motion_b Vector2, results voidptr, result_max i64, result_count &i32) bool
}

interface IPhysicsServer2DExtensionShapeGetCustomSolverBias #

interface IPhysicsServer2DExtensionShapeGetCustomSolverBias {
mut:
	shape_get_custom_solver_bias_(shape RID) f64
}

interface IPhysicsServer2DExtensionShapeGetData #

interface IPhysicsServer2DExtensionShapeGetData {
mut:
	shape_get_data_(shape RID) Variant
}

interface IPhysicsServer2DExtensionShapeGetType #

interface IPhysicsServer2DExtensionShapeGetType {
mut:
	shape_get_type_(shape RID) PhysicsServer2DShapeType
}

interface IPhysicsServer2DExtensionShapeSetCustomSolverBias #

interface IPhysicsServer2DExtensionShapeSetCustomSolverBias {
mut:
	shape_set_custom_solver_bias_(shape RID, bias f64)
}

interface IPhysicsServer2DExtensionShapeSetData #

interface IPhysicsServer2DExtensionShapeSetData {
mut:
	shape_set_data_(shape RID, data Variant)
}

interface IPhysicsServer2DExtensionSpaceCreate #

interface IPhysicsServer2DExtensionSpaceCreate {
mut:
	space_create_() RID
}

interface IPhysicsServer2DExtensionSpaceGetContactCount #

interface IPhysicsServer2DExtensionSpaceGetContactCount {
mut:
	space_get_contact_count_(space RID) i64
}

interface IPhysicsServer2DExtensionSpaceGetContacts #

interface IPhysicsServer2DExtensionSpaceGetContacts {
mut:
	space_get_contacts_(space RID) PackedVector2Array
}

interface IPhysicsServer2DExtensionSpaceGetDirectState #

interface IPhysicsServer2DExtensionSpaceGetDirectState {
mut:
	space_get_direct_state_(space RID) PhysicsDirectSpaceState2D
}

interface IPhysicsServer2DExtensionSpaceGetParam #

interface IPhysicsServer2DExtensionSpaceGetParam {
mut:
	space_get_param_(space RID, param PhysicsServer2DSpaceParameter) f64
}

interface IPhysicsServer2DExtensionSpaceIsActive #

interface IPhysicsServer2DExtensionSpaceIsActive {
mut:
	space_is_active_(space RID) bool
}

interface IPhysicsServer2DExtensionSpaceSetActive #

interface IPhysicsServer2DExtensionSpaceSetActive {
mut:
	space_set_active_(space RID, active bool)
}

interface IPhysicsServer2DExtensionSpaceSetDebugContacts #

interface IPhysicsServer2DExtensionSpaceSetDebugContacts {
mut:
	space_set_debug_contacts_(space RID, max_contacts i64)
}

interface IPhysicsServer2DExtensionSpaceSetParam #

interface IPhysicsServer2DExtensionSpaceSetParam {
mut:
	space_set_param_(space RID, param PhysicsServer2DSpaceParameter, value f64)
}

interface IPhysicsServer2DExtensionStep #

interface IPhysicsServer2DExtensionStep {
mut:
	step_(step f64)
}

interface IPhysicsServer2DExtensionSync #

interface IPhysicsServer2DExtensionSync {
mut:
	sync_()
}

interface IPhysicsServer2DExtensionWorldBoundaryShapeCreate #

interface IPhysicsServer2DExtensionWorldBoundaryShapeCreate {
mut:
	world_boundary_shape_create_() RID
}

interface IPhysicsServer3DExtensionAreaAddShape #

interface IPhysicsServer3DExtensionAreaAddShape {
mut:
	area_add_shape_(area RID, shape RID, transform Transform3D, disabled bool)
}

interface IPhysicsServer3DExtensionAreaAttachObjectInstanceId #

interface IPhysicsServer3DExtensionAreaAttachObjectInstanceId {
mut:
	area_attach_object_instance_id_(area RID, id i64)
}

interface IPhysicsServer3DExtensionAreaClearShapes #

interface IPhysicsServer3DExtensionAreaClearShapes {
mut:
	area_clear_shapes_(area RID)
}

interface IPhysicsServer3DExtensionAreaCreate #

interface IPhysicsServer3DExtensionAreaCreate {
mut:
	area_create_() RID
}

interface IPhysicsServer3DExtensionAreaGetCollisionLayer #

interface IPhysicsServer3DExtensionAreaGetCollisionLayer {
mut:
	area_get_collision_layer_(area RID) i64
}

interface IPhysicsServer3DExtensionAreaGetCollisionMask #

interface IPhysicsServer3DExtensionAreaGetCollisionMask {
mut:
	area_get_collision_mask_(area RID) i64
}

interface IPhysicsServer3DExtensionAreaGetObjectInstanceId #

interface IPhysicsServer3DExtensionAreaGetObjectInstanceId {
mut:
	area_get_object_instance_id_(area RID) i64
}

interface IPhysicsServer3DExtensionAreaGetParam #

interface IPhysicsServer3DExtensionAreaGetParam {
mut:
	area_get_param_(area RID, param PhysicsServer3DAreaParameter) Variant
}

interface IPhysicsServer3DExtensionAreaGetShape #

interface IPhysicsServer3DExtensionAreaGetShape {
mut:
	area_get_shape_(area RID, shape_idx i64) RID
}

interface IPhysicsServer3DExtensionAreaGetShapeCount #

interface IPhysicsServer3DExtensionAreaGetShapeCount {
mut:
	area_get_shape_count_(area RID) i64
}

interface IPhysicsServer3DExtensionAreaGetShapeTransform #

interface IPhysicsServer3DExtensionAreaGetShapeTransform {
mut:
	area_get_shape_transform_(area RID, shape_idx i64) Transform3D
}

interface IPhysicsServer3DExtensionAreaGetSpace #

interface IPhysicsServer3DExtensionAreaGetSpace {
mut:
	area_get_space_(area RID) RID
}

interface IPhysicsServer3DExtensionAreaGetTransform #

interface IPhysicsServer3DExtensionAreaGetTransform {
mut:
	area_get_transform_(area RID) Transform3D
}

interface IPhysicsServer3DExtensionAreaRemoveShape #

interface IPhysicsServer3DExtensionAreaRemoveShape {
mut:
	area_remove_shape_(area RID, shape_idx i64)
}

interface IPhysicsServer3DExtensionAreaSetAreaMonitorCallback #

interface IPhysicsServer3DExtensionAreaSetAreaMonitorCallback {
mut:
	area_set_area_monitor_callback_(area RID, callback Callable)
}

interface IPhysicsServer3DExtensionAreaSetCollisionLayer #

interface IPhysicsServer3DExtensionAreaSetCollisionLayer {
mut:
	area_set_collision_layer_(area RID, layer i64)
}

interface IPhysicsServer3DExtensionAreaSetCollisionMask #

interface IPhysicsServer3DExtensionAreaSetCollisionMask {
mut:
	area_set_collision_mask_(area RID, mask i64)
}

interface IPhysicsServer3DExtensionAreaSetMonitorCallback #

interface IPhysicsServer3DExtensionAreaSetMonitorCallback {
mut:
	area_set_monitor_callback_(area RID, callback Callable)
}

interface IPhysicsServer3DExtensionAreaSetMonitorable #

interface IPhysicsServer3DExtensionAreaSetMonitorable {
mut:
	area_set_monitorable_(area RID, monitorable bool)
}

interface IPhysicsServer3DExtensionAreaSetParam #

interface IPhysicsServer3DExtensionAreaSetParam {
mut:
	area_set_param_(area RID, param PhysicsServer3DAreaParameter, value Variant)
}

interface IPhysicsServer3DExtensionAreaSetRayPickable #

interface IPhysicsServer3DExtensionAreaSetRayPickable {
mut:
	area_set_ray_pickable_(area RID, enable bool)
}

interface IPhysicsServer3DExtensionAreaSetShape #

interface IPhysicsServer3DExtensionAreaSetShape {
mut:
	area_set_shape_(area RID, shape_idx i64, shape RID)
}

interface IPhysicsServer3DExtensionAreaSetShapeDisabled #

interface IPhysicsServer3DExtensionAreaSetShapeDisabled {
mut:
	area_set_shape_disabled_(area RID, shape_idx i64, disabled bool)
}

interface IPhysicsServer3DExtensionAreaSetShapeTransform #

interface IPhysicsServer3DExtensionAreaSetShapeTransform {
mut:
	area_set_shape_transform_(area RID, shape_idx i64, transform Transform3D)
}

interface IPhysicsServer3DExtensionAreaSetSpace #

interface IPhysicsServer3DExtensionAreaSetSpace {
mut:
	area_set_space_(area RID, space RID)
}

interface IPhysicsServer3DExtensionAreaSetTransform #

interface IPhysicsServer3DExtensionAreaSetTransform {
mut:
	area_set_transform_(area RID, transform Transform3D)
}

interface IPhysicsServer3DExtensionBodyAddCollisionException #

interface IPhysicsServer3DExtensionBodyAddCollisionException {
mut:
	body_add_collision_exception_(body RID, excepted_body RID)
}

interface IPhysicsServer3DExtensionBodyAddConstantCentralForce #

interface IPhysicsServer3DExtensionBodyAddConstantCentralForce {
mut:
	body_add_constant_central_force_(body RID, force Vector3)
}

interface IPhysicsServer3DExtensionBodyAddConstantForce #

interface IPhysicsServer3DExtensionBodyAddConstantForce {
mut:
	body_add_constant_force_(body RID, force Vector3, position Vector3)
}

interface IPhysicsServer3DExtensionBodyAddConstantTorque #

interface IPhysicsServer3DExtensionBodyAddConstantTorque {
mut:
	body_add_constant_torque_(body RID, torque Vector3)
}

interface IPhysicsServer3DExtensionBodyAddShape #

interface IPhysicsServer3DExtensionBodyAddShape {
mut:
	body_add_shape_(body RID, shape RID, transform Transform3D, disabled bool)
}

interface IPhysicsServer3DExtensionBodyApplyCentralForce #

interface IPhysicsServer3DExtensionBodyApplyCentralForce {
mut:
	body_apply_central_force_(body RID, force Vector3)
}

interface IPhysicsServer3DExtensionBodyApplyCentralImpulse #

interface IPhysicsServer3DExtensionBodyApplyCentralImpulse {
mut:
	body_apply_central_impulse_(body RID, impulse Vector3)
}

interface IPhysicsServer3DExtensionBodyApplyForce #

interface IPhysicsServer3DExtensionBodyApplyForce {
mut:
	body_apply_force_(body RID, force Vector3, position Vector3)
}

interface IPhysicsServer3DExtensionBodyApplyImpulse #

interface IPhysicsServer3DExtensionBodyApplyImpulse {
mut:
	body_apply_impulse_(body RID, impulse Vector3, position Vector3)
}

interface IPhysicsServer3DExtensionBodyApplyTorque #

interface IPhysicsServer3DExtensionBodyApplyTorque {
mut:
	body_apply_torque_(body RID, torque Vector3)
}

interface IPhysicsServer3DExtensionBodyApplyTorqueImpulse #

interface IPhysicsServer3DExtensionBodyApplyTorqueImpulse {
mut:
	body_apply_torque_impulse_(body RID, impulse Vector3)
}

interface IPhysicsServer3DExtensionBodyAttachObjectInstanceId #

interface IPhysicsServer3DExtensionBodyAttachObjectInstanceId {
mut:
	body_attach_object_instance_id_(body RID, id i64)
}

interface IPhysicsServer3DExtensionBodyClearShapes #

interface IPhysicsServer3DExtensionBodyClearShapes {
mut:
	body_clear_shapes_(body RID)
}

interface IPhysicsServer3DExtensionBodyCreate #

interface IPhysicsServer3DExtensionBodyCreate {
mut:
	body_create_() RID
}

interface IPhysicsServer3DExtensionBodyGetCollisionExceptions #

interface IPhysicsServer3DExtensionBodyGetCollisionExceptions {
mut:
	body_get_collision_exceptions_(body RID) Array
}

interface IPhysicsServer3DExtensionBodyGetCollisionLayer #

interface IPhysicsServer3DExtensionBodyGetCollisionLayer {
mut:
	body_get_collision_layer_(body RID) i64
}

interface IPhysicsServer3DExtensionBodyGetCollisionMask #

interface IPhysicsServer3DExtensionBodyGetCollisionMask {
mut:
	body_get_collision_mask_(body RID) i64
}

interface IPhysicsServer3DExtensionBodyGetCollisionPriority #

interface IPhysicsServer3DExtensionBodyGetCollisionPriority {
mut:
	body_get_collision_priority_(body RID) f64
}

interface IPhysicsServer3DExtensionBodyGetConstantForce #

interface IPhysicsServer3DExtensionBodyGetConstantForce {
mut:
	body_get_constant_force_(body RID) Vector3
}

interface IPhysicsServer3DExtensionBodyGetConstantTorque #

interface IPhysicsServer3DExtensionBodyGetConstantTorque {
mut:
	body_get_constant_torque_(body RID) Vector3
}

interface IPhysicsServer3DExtensionBodyGetContactsReportedDepthThreshold #

interface IPhysicsServer3DExtensionBodyGetContactsReportedDepthThreshold {
mut:
	body_get_contacts_reported_depth_threshold_(body RID) f64
}

interface IPhysicsServer3DExtensionBodyGetDirectState #

interface IPhysicsServer3DExtensionBodyGetDirectState {
mut:
	body_get_direct_state_(body RID) PhysicsDirectBodyState3D
}

interface IPhysicsServer3DExtensionBodyGetMaxContactsReported #

interface IPhysicsServer3DExtensionBodyGetMaxContactsReported {
mut:
	body_get_max_contacts_reported_(body RID) i64
}

interface IPhysicsServer3DExtensionBodyGetMode #

interface IPhysicsServer3DExtensionBodyGetMode {
mut:
	body_get_mode_(body RID) PhysicsServer3DBodyMode
}

interface IPhysicsServer3DExtensionBodyGetObjectInstanceId #

interface IPhysicsServer3DExtensionBodyGetObjectInstanceId {
mut:
	body_get_object_instance_id_(body RID) i64
}

interface IPhysicsServer3DExtensionBodyGetParam #

interface IPhysicsServer3DExtensionBodyGetParam {
mut:
	body_get_param_(body RID, param PhysicsServer3DBodyParameter) Variant
}

interface IPhysicsServer3DExtensionBodyGetShape #

interface IPhysicsServer3DExtensionBodyGetShape {
mut:
	body_get_shape_(body RID, shape_idx i64) RID
}

interface IPhysicsServer3DExtensionBodyGetShapeCount #

interface IPhysicsServer3DExtensionBodyGetShapeCount {
mut:
	body_get_shape_count_(body RID) i64
}

interface IPhysicsServer3DExtensionBodyGetShapeTransform #

interface IPhysicsServer3DExtensionBodyGetShapeTransform {
mut:
	body_get_shape_transform_(body RID, shape_idx i64) Transform3D
}

interface IPhysicsServer3DExtensionBodyGetSpace #

interface IPhysicsServer3DExtensionBodyGetSpace {
mut:
	body_get_space_(body RID) RID
}

interface IPhysicsServer3DExtensionBodyGetState #

interface IPhysicsServer3DExtensionBodyGetState {
mut:
	body_get_state_(body RID, state PhysicsServer3DBodyState) Variant
}

interface IPhysicsServer3DExtensionBodyGetUserFlags #

interface IPhysicsServer3DExtensionBodyGetUserFlags {
mut:
	body_get_user_flags_(body RID) i64
}

interface IPhysicsServer3DExtensionBodyIsAxisLocked #

interface IPhysicsServer3DExtensionBodyIsAxisLocked {
mut:
	body_is_axis_locked_(body RID, axis PhysicsServer3DBodyAxis) bool
}

interface IPhysicsServer3DExtensionBodyIsContinuousCollisionDetectionEnabled #

interface IPhysicsServer3DExtensionBodyIsContinuousCollisionDetectionEnabled {
mut:
	body_is_continuous_collision_detection_enabled_(body RID) bool
}

interface IPhysicsServer3DExtensionBodyIsOmittingForceIntegration #

interface IPhysicsServer3DExtensionBodyIsOmittingForceIntegration {
mut:
	body_is_omitting_force_integration_(body RID) bool
}

interface IPhysicsServer3DExtensionBodyRemoveCollisionException #

interface IPhysicsServer3DExtensionBodyRemoveCollisionException {
mut:
	body_remove_collision_exception_(body RID, excepted_body RID)
}

interface IPhysicsServer3DExtensionBodyRemoveShape #

interface IPhysicsServer3DExtensionBodyRemoveShape {
mut:
	body_remove_shape_(body RID, shape_idx i64)
}

interface IPhysicsServer3DExtensionBodyResetMassProperties #

interface IPhysicsServer3DExtensionBodyResetMassProperties {
mut:
	body_reset_mass_properties_(body RID)
}

interface IPhysicsServer3DExtensionBodySetAxisLock #

interface IPhysicsServer3DExtensionBodySetAxisLock {
mut:
	body_set_axis_lock_(body RID, axis PhysicsServer3DBodyAxis, gd_lock bool)
}

interface IPhysicsServer3DExtensionBodySetAxisVelocity #

interface IPhysicsServer3DExtensionBodySetAxisVelocity {
mut:
	body_set_axis_velocity_(body RID, axis_velocity Vector3)
}

interface IPhysicsServer3DExtensionBodySetCollisionLayer #

interface IPhysicsServer3DExtensionBodySetCollisionLayer {
mut:
	body_set_collision_layer_(body RID, layer i64)
}

interface IPhysicsServer3DExtensionBodySetCollisionMask #

interface IPhysicsServer3DExtensionBodySetCollisionMask {
mut:
	body_set_collision_mask_(body RID, mask i64)
}

interface IPhysicsServer3DExtensionBodySetCollisionPriority #

interface IPhysicsServer3DExtensionBodySetCollisionPriority {
mut:
	body_set_collision_priority_(body RID, priority f64)
}

interface IPhysicsServer3DExtensionBodySetConstantForce #

interface IPhysicsServer3DExtensionBodySetConstantForce {
mut:
	body_set_constant_force_(body RID, force Vector3)
}

interface IPhysicsServer3DExtensionBodySetConstantTorque #

interface IPhysicsServer3DExtensionBodySetConstantTorque {
mut:
	body_set_constant_torque_(body RID, torque Vector3)
}

interface IPhysicsServer3DExtensionBodySetContactsReportedDepthThreshold #

interface IPhysicsServer3DExtensionBodySetContactsReportedDepthThreshold {
mut:
	body_set_contacts_reported_depth_threshold_(body RID, threshold f64)
}

interface IPhysicsServer3DExtensionBodySetEnableContinuousCollisionDetection #

interface IPhysicsServer3DExtensionBodySetEnableContinuousCollisionDetection {
mut:
	body_set_enable_continuous_collision_detection_(body RID, enable bool)
}

interface IPhysicsServer3DExtensionBodySetForceIntegrationCallback #

interface IPhysicsServer3DExtensionBodySetForceIntegrationCallback {
mut:
	body_set_force_integration_callback_(body RID, callable Callable, userdata Variant)
}

interface IPhysicsServer3DExtensionBodySetMaxContactsReported #

interface IPhysicsServer3DExtensionBodySetMaxContactsReported {
mut:
	body_set_max_contacts_reported_(body RID, amount i64)
}

interface IPhysicsServer3DExtensionBodySetMode #

interface IPhysicsServer3DExtensionBodySetMode {
mut:
	body_set_mode_(body RID, mode PhysicsServer3DBodyMode)
}

interface IPhysicsServer3DExtensionBodySetOmitForceIntegration #

interface IPhysicsServer3DExtensionBodySetOmitForceIntegration {
mut:
	body_set_omit_force_integration_(body RID, enable bool)
}

interface IPhysicsServer3DExtensionBodySetParam #

interface IPhysicsServer3DExtensionBodySetParam {
mut:
	body_set_param_(body RID, param PhysicsServer3DBodyParameter, value Variant)
}

interface IPhysicsServer3DExtensionBodySetRayPickable #

interface IPhysicsServer3DExtensionBodySetRayPickable {
mut:
	body_set_ray_pickable_(body RID, enable bool)
}

interface IPhysicsServer3DExtensionBodySetShape #

interface IPhysicsServer3DExtensionBodySetShape {
mut:
	body_set_shape_(body RID, shape_idx i64, shape RID)
}

interface IPhysicsServer3DExtensionBodySetShapeDisabled #

interface IPhysicsServer3DExtensionBodySetShapeDisabled {
mut:
	body_set_shape_disabled_(body RID, shape_idx i64, disabled bool)
}

interface IPhysicsServer3DExtensionBodySetShapeTransform #

interface IPhysicsServer3DExtensionBodySetShapeTransform {
mut:
	body_set_shape_transform_(body RID, shape_idx i64, transform Transform3D)
}

interface IPhysicsServer3DExtensionBodySetSpace #

interface IPhysicsServer3DExtensionBodySetSpace {
mut:
	body_set_space_(body RID, space RID)
}

interface IPhysicsServer3DExtensionBodySetState #

interface IPhysicsServer3DExtensionBodySetState {
mut:
	body_set_state_(body RID, state PhysicsServer3DBodyState, value Variant)
}

interface IPhysicsServer3DExtensionBodySetStateSyncCallback #

interface IPhysicsServer3DExtensionBodySetStateSyncCallback {
mut:
	body_set_state_sync_callback_(body RID, callable Callable)
}

interface IPhysicsServer3DExtensionBodySetUserFlags #

interface IPhysicsServer3DExtensionBodySetUserFlags {
mut:
	body_set_user_flags_(body RID, flags i64)
}

interface IPhysicsServer3DExtensionBodyTestMotion #

interface IPhysicsServer3DExtensionBodyTestMotion {
mut:
	body_test_motion_(body RID, from Transform3D, motion Vector3, margin f64, max_collisions i64, collide_separation_ray bool, recovery_as_collision bool, gd_result &PhysicsServer3DExtensionMotionResult) bool
}

interface IPhysicsServer3DExtensionBoxShapeCreate #

interface IPhysicsServer3DExtensionBoxShapeCreate {
mut:
	box_shape_create_() RID
}

interface IPhysicsServer3DExtensionCapsuleShapeCreate #

interface IPhysicsServer3DExtensionCapsuleShapeCreate {
mut:
	capsule_shape_create_() RID
}

interface IPhysicsServer3DExtensionConcavePolygonShapeCreate #

interface IPhysicsServer3DExtensionConcavePolygonShapeCreate {
mut:
	concave_polygon_shape_create_() RID
}

interface IPhysicsServer3DExtensionConeTwistJointGetParam #

interface IPhysicsServer3DExtensionConeTwistJointGetParam {
mut:
	cone_twist_joint_get_param_(joint RID, param PhysicsServer3DConeTwistJointParam) f64
}

interface IPhysicsServer3DExtensionConeTwistJointSetParam #

interface IPhysicsServer3DExtensionConeTwistJointSetParam {
mut:
	cone_twist_joint_set_param_(joint RID, param PhysicsServer3DConeTwistJointParam, value f64)
}

interface IPhysicsServer3DExtensionConvexPolygonShapeCreate #

interface IPhysicsServer3DExtensionConvexPolygonShapeCreate {
mut:
	convex_polygon_shape_create_() RID
}

interface IPhysicsServer3DExtensionCustomShapeCreate #

interface IPhysicsServer3DExtensionCustomShapeCreate {
mut:
	custom_shape_create_() RID
}

interface IPhysicsServer3DExtensionCylinderShapeCreate #

interface IPhysicsServer3DExtensionCylinderShapeCreate {
mut:
	cylinder_shape_create_() RID
}

interface IPhysicsServer3DExtensionEndSync #

interface IPhysicsServer3DExtensionEndSync {
mut:
	end_sync_()
}

interface IPhysicsServer3DExtensionFinish #

interface IPhysicsServer3DExtensionFinish {
mut:
	finish_()
}

interface IPhysicsServer3DExtensionFlushQueries #

interface IPhysicsServer3DExtensionFlushQueries {
mut:
	flush_queries_()
}

interface IPhysicsServer3DExtensionFreeRid #

interface IPhysicsServer3DExtensionFreeRid {
mut:
	free_rid_(rid RID)
}

interface IPhysicsServer3DExtensionGeneric6dofJointGetFlag #

interface IPhysicsServer3DExtensionGeneric6dofJointGetFlag {
mut:
	generic_6dof_joint_get_flag_(joint RID, axis Vector3Axis, flag PhysicsServer3DG6DOFJointAxisFlag) bool
}

interface IPhysicsServer3DExtensionGeneric6dofJointGetParam #

interface IPhysicsServer3DExtensionGeneric6dofJointGetParam {
mut:
	generic_6dof_joint_get_param_(joint RID, axis Vector3Axis, param PhysicsServer3DG6DOFJointAxisParam) f64
}

interface IPhysicsServer3DExtensionGeneric6dofJointSetFlag #

interface IPhysicsServer3DExtensionGeneric6dofJointSetFlag {
mut:
	generic_6dof_joint_set_flag_(joint RID, axis Vector3Axis, flag PhysicsServer3DG6DOFJointAxisFlag, enable bool)
}

interface IPhysicsServer3DExtensionGeneric6dofJointSetParam #

interface IPhysicsServer3DExtensionGeneric6dofJointSetParam {
mut:
	generic_6dof_joint_set_param_(joint RID, axis Vector3Axis, param PhysicsServer3DG6DOFJointAxisParam, value f64)
}

interface IPhysicsServer3DExtensionGetProcessInfo #

interface IPhysicsServer3DExtensionGetProcessInfo {
mut:
	get_process_info_(process_info PhysicsServer3DProcessInfo) i64
}

interface IPhysicsServer3DExtensionHeightmapShapeCreate #

interface IPhysicsServer3DExtensionHeightmapShapeCreate {
mut:
	heightmap_shape_create_() RID
}

interface IPhysicsServer3DExtensionHingeJointGetFlag #

interface IPhysicsServer3DExtensionHingeJointGetFlag {
mut:
	hinge_joint_get_flag_(joint RID, flag PhysicsServer3DHingeJointFlag) bool
}

interface IPhysicsServer3DExtensionHingeJointGetParam #

interface IPhysicsServer3DExtensionHingeJointGetParam {
mut:
	hinge_joint_get_param_(joint RID, param PhysicsServer3DHingeJointParam) f64
}

interface IPhysicsServer3DExtensionHingeJointSetFlag #

interface IPhysicsServer3DExtensionHingeJointSetFlag {
mut:
	hinge_joint_set_flag_(joint RID, flag PhysicsServer3DHingeJointFlag, enabled bool)
}

interface IPhysicsServer3DExtensionHingeJointSetParam #

interface IPhysicsServer3DExtensionHingeJointSetParam {
mut:
	hinge_joint_set_param_(joint RID, param PhysicsServer3DHingeJointParam, value f64)
}

interface IPhysicsServer3DExtensionInit #

interface IPhysicsServer3DExtensionInit {
mut:
	init_()
}

interface IPhysicsServer3DExtensionIsFlushingQueries #

interface IPhysicsServer3DExtensionIsFlushingQueries {
mut:
	is_flushing_queries_() bool
}

interface IPhysicsServer3DExtensionJointClear #

interface IPhysicsServer3DExtensionJointClear {
mut:
	joint_clear_(joint RID)
}

interface IPhysicsServer3DExtensionJointCreate #

interface IPhysicsServer3DExtensionJointCreate {
mut:
	joint_create_() RID
}

interface IPhysicsServer3DExtensionJointDisableCollisionsBetweenBodies #

interface IPhysicsServer3DExtensionJointDisableCollisionsBetweenBodies {
mut:
	joint_disable_collisions_between_bodies_(joint RID, disable bool)
}

interface IPhysicsServer3DExtensionJointGetSolverPriority #

interface IPhysicsServer3DExtensionJointGetSolverPriority {
mut:
	joint_get_solver_priority_(joint RID) i64
}

interface IPhysicsServer3DExtensionJointGetType #

interface IPhysicsServer3DExtensionJointGetType {
mut:
	joint_get_type_(joint RID) PhysicsServer3DJointType
}

interface IPhysicsServer3DExtensionJointIsDisabledCollisionsBetweenBodies #

interface IPhysicsServer3DExtensionJointIsDisabledCollisionsBetweenBodies {
mut:
	joint_is_disabled_collisions_between_bodies_(joint RID) bool
}

interface IPhysicsServer3DExtensionJointMakeConeTwist #

interface IPhysicsServer3DExtensionJointMakeConeTwist {
mut:
	joint_make_cone_twist_(joint RID, body_a RID, local_ref_a Transform3D, body_b RID, local_ref_b Transform3D)
}

interface IPhysicsServer3DExtensionJointMakeGeneric6dof #

interface IPhysicsServer3DExtensionJointMakeGeneric6dof {
mut:
	joint_make_generic_6dof_(joint RID, body_a RID, local_ref_a Transform3D, body_b RID, local_ref_b Transform3D)
}

interface IPhysicsServer3DExtensionJointMakeHinge #

interface IPhysicsServer3DExtensionJointMakeHinge {
mut:
	joint_make_hinge_(joint RID, body_a RID, hinge_a Transform3D, body_b RID, hinge_b Transform3D)
}

interface IPhysicsServer3DExtensionJointMakeHingeSimple #

interface IPhysicsServer3DExtensionJointMakeHingeSimple {
mut:
	joint_make_hinge_simple_(joint RID, body_a RID, pivot_a Vector3, axis_a Vector3, body_b RID, pivot_b Vector3, axis_b Vector3)
}

interface IPhysicsServer3DExtensionJointMakePin #

interface IPhysicsServer3DExtensionJointMakePin {
mut:
	joint_make_pin_(joint RID, body_a RID, local_a Vector3, body_b RID, local_b Vector3)
}

interface IPhysicsServer3DExtensionJointMakeSlider #

interface IPhysicsServer3DExtensionJointMakeSlider {
mut:
	joint_make_slider_(joint RID, body_a RID, local_ref_a Transform3D, body_b RID, local_ref_b Transform3D)
}

interface IPhysicsServer3DExtensionJointSetSolverPriority #

interface IPhysicsServer3DExtensionJointSetSolverPriority {
mut:
	joint_set_solver_priority_(joint RID, priority i64)
}

interface IPhysicsServer3DExtensionPinJointGetLocalA #

interface IPhysicsServer3DExtensionPinJointGetLocalA {
mut:
	pin_joint_get_local_a_(joint RID) Vector3
}

interface IPhysicsServer3DExtensionPinJointGetLocalB #

interface IPhysicsServer3DExtensionPinJointGetLocalB {
mut:
	pin_joint_get_local_b_(joint RID) Vector3
}

interface IPhysicsServer3DExtensionPinJointGetParam #

interface IPhysicsServer3DExtensionPinJointGetParam {
mut:
	pin_joint_get_param_(joint RID, param PhysicsServer3DPinJointParam) f64
}

interface IPhysicsServer3DExtensionPinJointSetLocalA #

interface IPhysicsServer3DExtensionPinJointSetLocalA {
mut:
	pin_joint_set_local_a_(joint RID, local_a Vector3)
}

interface IPhysicsServer3DExtensionPinJointSetLocalB #

interface IPhysicsServer3DExtensionPinJointSetLocalB {
mut:
	pin_joint_set_local_b_(joint RID, local_b Vector3)
}

interface IPhysicsServer3DExtensionPinJointSetParam #

interface IPhysicsServer3DExtensionPinJointSetParam {
mut:
	pin_joint_set_param_(joint RID, param PhysicsServer3DPinJointParam, value f64)
}

interface IPhysicsServer3DExtensionSeparationRayShapeCreate #

interface IPhysicsServer3DExtensionSeparationRayShapeCreate {
mut:
	separation_ray_shape_create_() RID
}

interface IPhysicsServer3DExtensionSetActive #

interface IPhysicsServer3DExtensionSetActive {
mut:
	set_active_(active bool)
}

interface IPhysicsServer3DExtensionShapeGetCustomSolverBias #

interface IPhysicsServer3DExtensionShapeGetCustomSolverBias {
mut:
	shape_get_custom_solver_bias_(shape RID) f64
}

interface IPhysicsServer3DExtensionShapeGetData #

interface IPhysicsServer3DExtensionShapeGetData {
mut:
	shape_get_data_(shape RID) Variant
}

interface IPhysicsServer3DExtensionShapeGetMargin #

interface IPhysicsServer3DExtensionShapeGetMargin {
mut:
	shape_get_margin_(shape RID) f64
}

interface IPhysicsServer3DExtensionShapeGetType #

interface IPhysicsServer3DExtensionShapeGetType {
mut:
	shape_get_type_(shape RID) PhysicsServer3DShapeType
}

interface IPhysicsServer3DExtensionShapeSetCustomSolverBias #

interface IPhysicsServer3DExtensionShapeSetCustomSolverBias {
mut:
	shape_set_custom_solver_bias_(shape RID, bias f64)
}

interface IPhysicsServer3DExtensionShapeSetData #

interface IPhysicsServer3DExtensionShapeSetData {
mut:
	shape_set_data_(shape RID, data Variant)
}

interface IPhysicsServer3DExtensionShapeSetMargin #

interface IPhysicsServer3DExtensionShapeSetMargin {
mut:
	shape_set_margin_(shape RID, margin f64)
}

interface IPhysicsServer3DExtensionSliderJointGetParam #

interface IPhysicsServer3DExtensionSliderJointGetParam {
mut:
	slider_joint_get_param_(joint RID, param PhysicsServer3DSliderJointParam) f64
}

interface IPhysicsServer3DExtensionSliderJointSetParam #

interface IPhysicsServer3DExtensionSliderJointSetParam {
mut:
	slider_joint_set_param_(joint RID, param PhysicsServer3DSliderJointParam, value f64)
}

interface IPhysicsServer3DExtensionSoftBodyAddCollisionException #

interface IPhysicsServer3DExtensionSoftBodyAddCollisionException {
mut:
	soft_body_add_collision_exception_(body RID, body_b RID)
}

interface IPhysicsServer3DExtensionSoftBodyApplyCentralForce #

interface IPhysicsServer3DExtensionSoftBodyApplyCentralForce {
mut:
	soft_body_apply_central_force_(body RID, force Vector3)
}

interface IPhysicsServer3DExtensionSoftBodyApplyCentralImpulse #

interface IPhysicsServer3DExtensionSoftBodyApplyCentralImpulse {
mut:
	soft_body_apply_central_impulse_(body RID, impulse Vector3)
}

interface IPhysicsServer3DExtensionSoftBodyApplyPointForce #

interface IPhysicsServer3DExtensionSoftBodyApplyPointForce {
mut:
	soft_body_apply_point_force_(body RID, point_index i64, force Vector3)
}

interface IPhysicsServer3DExtensionSoftBodyApplyPointImpulse #

interface IPhysicsServer3DExtensionSoftBodyApplyPointImpulse {
mut:
	soft_body_apply_point_impulse_(body RID, point_index i64, impulse Vector3)
}

interface IPhysicsServer3DExtensionSoftBodyCreate #

interface IPhysicsServer3DExtensionSoftBodyCreate {
mut:
	soft_body_create_() RID
}

interface IPhysicsServer3DExtensionSoftBodyGetBounds #

interface IPhysicsServer3DExtensionSoftBodyGetBounds {
mut:
	soft_body_get_bounds_(body RID) AABB
}

interface IPhysicsServer3DExtensionSoftBodyGetCollisionExceptions #

interface IPhysicsServer3DExtensionSoftBodyGetCollisionExceptions {
mut:
	soft_body_get_collision_exceptions_(body RID) Array
}

interface IPhysicsServer3DExtensionSoftBodyGetCollisionLayer #

interface IPhysicsServer3DExtensionSoftBodyGetCollisionLayer {
mut:
	soft_body_get_collision_layer_(body RID) i64
}

interface IPhysicsServer3DExtensionSoftBodyGetCollisionMask #

interface IPhysicsServer3DExtensionSoftBodyGetCollisionMask {
mut:
	soft_body_get_collision_mask_(body RID) i64
}

interface IPhysicsServer3DExtensionSoftBodyGetDampingCoefficient #

interface IPhysicsServer3DExtensionSoftBodyGetDampingCoefficient {
mut:
	soft_body_get_damping_coefficient_(body RID) f64
}

interface IPhysicsServer3DExtensionSoftBodyGetDragCoefficient #

interface IPhysicsServer3DExtensionSoftBodyGetDragCoefficient {
mut:
	soft_body_get_drag_coefficient_(body RID) f64
}

interface IPhysicsServer3DExtensionSoftBodyGetLinearStiffness #

interface IPhysicsServer3DExtensionSoftBodyGetLinearStiffness {
mut:
	soft_body_get_linear_stiffness_(body RID) f64
}

interface IPhysicsServer3DExtensionSoftBodyGetPointGlobalPosition #

interface IPhysicsServer3DExtensionSoftBodyGetPointGlobalPosition {
mut:
	soft_body_get_point_global_position_(body RID, point_index i64) Vector3
}

interface IPhysicsServer3DExtensionSoftBodyGetPressureCoefficient #

interface IPhysicsServer3DExtensionSoftBodyGetPressureCoefficient {
mut:
	soft_body_get_pressure_coefficient_(body RID) f64
}

interface IPhysicsServer3DExtensionSoftBodyGetShrinkingFactor #

interface IPhysicsServer3DExtensionSoftBodyGetShrinkingFactor {
mut:
	soft_body_get_shrinking_factor_(body RID) f64
}

interface IPhysicsServer3DExtensionSoftBodyGetSimulationPrecision #

interface IPhysicsServer3DExtensionSoftBodyGetSimulationPrecision {
mut:
	soft_body_get_simulation_precision_(body RID) i64
}

interface IPhysicsServer3DExtensionSoftBodyGetSpace #

interface IPhysicsServer3DExtensionSoftBodyGetSpace {
mut:
	soft_body_get_space_(body RID) RID
}

interface IPhysicsServer3DExtensionSoftBodyGetState #

interface IPhysicsServer3DExtensionSoftBodyGetState {
mut:
	soft_body_get_state_(body RID, state PhysicsServer3DBodyState) Variant
}

interface IPhysicsServer3DExtensionSoftBodyGetTotalMass #

interface IPhysicsServer3DExtensionSoftBodyGetTotalMass {
mut:
	soft_body_get_total_mass_(body RID) f64
}

interface IPhysicsServer3DExtensionSoftBodyIsPointPinned #

interface IPhysicsServer3DExtensionSoftBodyIsPointPinned {
mut:
	soft_body_is_point_pinned_(body RID, point_index i64) bool
}

interface IPhysicsServer3DExtensionSoftBodyMovePoint #

interface IPhysicsServer3DExtensionSoftBodyMovePoint {
mut:
	soft_body_move_point_(body RID, point_index i64, global_position Vector3)
}

interface IPhysicsServer3DExtensionSoftBodyPinPoint #

interface IPhysicsServer3DExtensionSoftBodyPinPoint {
mut:
	soft_body_pin_point_(body RID, point_index i64, pin bool)
}

interface IPhysicsServer3DExtensionSoftBodyRemoveAllPinnedPoints #

interface IPhysicsServer3DExtensionSoftBodyRemoveAllPinnedPoints {
mut:
	soft_body_remove_all_pinned_points_(body RID)
}

interface IPhysicsServer3DExtensionSoftBodyRemoveCollisionException #

interface IPhysicsServer3DExtensionSoftBodyRemoveCollisionException {
mut:
	soft_body_remove_collision_exception_(body RID, body_b RID)
}

interface IPhysicsServer3DExtensionSoftBodySetCollisionLayer #

interface IPhysicsServer3DExtensionSoftBodySetCollisionLayer {
mut:
	soft_body_set_collision_layer_(body RID, layer i64)
}

interface IPhysicsServer3DExtensionSoftBodySetCollisionMask #

interface IPhysicsServer3DExtensionSoftBodySetCollisionMask {
mut:
	soft_body_set_collision_mask_(body RID, mask i64)
}

interface IPhysicsServer3DExtensionSoftBodySetDampingCoefficient #

interface IPhysicsServer3DExtensionSoftBodySetDampingCoefficient {
mut:
	soft_body_set_damping_coefficient_(body RID, damping_coefficient f64)
}

interface IPhysicsServer3DExtensionSoftBodySetDragCoefficient #

interface IPhysicsServer3DExtensionSoftBodySetDragCoefficient {
mut:
	soft_body_set_drag_coefficient_(body RID, drag_coefficient f64)
}

interface IPhysicsServer3DExtensionSoftBodySetLinearStiffness #

interface IPhysicsServer3DExtensionSoftBodySetLinearStiffness {
mut:
	soft_body_set_linear_stiffness_(body RID, linear_stiffness f64)
}

interface IPhysicsServer3DExtensionSoftBodySetMesh #

interface IPhysicsServer3DExtensionSoftBodySetMesh {
mut:
	soft_body_set_mesh_(body RID, mesh RID)
}

interface IPhysicsServer3DExtensionSoftBodySetPressureCoefficient #

interface IPhysicsServer3DExtensionSoftBodySetPressureCoefficient {
mut:
	soft_body_set_pressure_coefficient_(body RID, pressure_coefficient f64)
}

interface IPhysicsServer3DExtensionSoftBodySetRayPickable #

interface IPhysicsServer3DExtensionSoftBodySetRayPickable {
mut:
	soft_body_set_ray_pickable_(body RID, enable bool)
}

interface IPhysicsServer3DExtensionSoftBodySetShrinkingFactor #

interface IPhysicsServer3DExtensionSoftBodySetShrinkingFactor {
mut:
	soft_body_set_shrinking_factor_(body RID, shrinking_factor f64)
}

interface IPhysicsServer3DExtensionSoftBodySetSimulationPrecision #

interface IPhysicsServer3DExtensionSoftBodySetSimulationPrecision {
mut:
	soft_body_set_simulation_precision_(body RID, simulation_precision i64)
}

interface IPhysicsServer3DExtensionSoftBodySetSpace #

interface IPhysicsServer3DExtensionSoftBodySetSpace {
mut:
	soft_body_set_space_(body RID, space RID)
}

interface IPhysicsServer3DExtensionSoftBodySetState #

interface IPhysicsServer3DExtensionSoftBodySetState {
mut:
	soft_body_set_state_(body RID, state PhysicsServer3DBodyState, variant Variant)
}

interface IPhysicsServer3DExtensionSoftBodySetTotalMass #

interface IPhysicsServer3DExtensionSoftBodySetTotalMass {
mut:
	soft_body_set_total_mass_(body RID, total_mass f64)
}

interface IPhysicsServer3DExtensionSoftBodySetTransform #

interface IPhysicsServer3DExtensionSoftBodySetTransform {
mut:
	soft_body_set_transform_(body RID, transform Transform3D)
}

interface IPhysicsServer3DExtensionSoftBodyUpdateRenderingServer #

interface IPhysicsServer3DExtensionSoftBodyUpdateRenderingServer {
mut:
	soft_body_update_rendering_server_(body RID, rendering_server_handler PhysicsServer3DRenderingServerHandler)
}

interface IPhysicsServer3DExtensionSpaceCreate #

interface IPhysicsServer3DExtensionSpaceCreate {
mut:
	space_create_() RID
}

interface IPhysicsServer3DExtensionSpaceGetContactCount #

interface IPhysicsServer3DExtensionSpaceGetContactCount {
mut:
	space_get_contact_count_(space RID) i64
}

interface IPhysicsServer3DExtensionSpaceGetContacts #

interface IPhysicsServer3DExtensionSpaceGetContacts {
mut:
	space_get_contacts_(space RID) PackedVector3Array
}

interface IPhysicsServer3DExtensionSpaceGetDirectState #

interface IPhysicsServer3DExtensionSpaceGetDirectState {
mut:
	space_get_direct_state_(space RID) PhysicsDirectSpaceState3D
}

interface IPhysicsServer3DExtensionSpaceGetParam #

interface IPhysicsServer3DExtensionSpaceGetParam {
mut:
	space_get_param_(space RID, param PhysicsServer3DSpaceParameter) f64
}

interface IPhysicsServer3DExtensionSpaceIsActive #

interface IPhysicsServer3DExtensionSpaceIsActive {
mut:
	space_is_active_(space RID) bool
}

interface IPhysicsServer3DExtensionSpaceSetActive #

interface IPhysicsServer3DExtensionSpaceSetActive {
mut:
	space_set_active_(space RID, active bool)
}

interface IPhysicsServer3DExtensionSpaceSetDebugContacts #

interface IPhysicsServer3DExtensionSpaceSetDebugContacts {
mut:
	space_set_debug_contacts_(space RID, max_contacts i64)
}

interface IPhysicsServer3DExtensionSpaceSetParam #

interface IPhysicsServer3DExtensionSpaceSetParam {
mut:
	space_set_param_(space RID, param PhysicsServer3DSpaceParameter, value f64)
}

interface IPhysicsServer3DExtensionSphereShapeCreate #

interface IPhysicsServer3DExtensionSphereShapeCreate {
mut:
	sphere_shape_create_() RID
}

interface IPhysicsServer3DExtensionStep #

interface IPhysicsServer3DExtensionStep {
mut:
	step_(step f64)
}

interface IPhysicsServer3DExtensionSync #

interface IPhysicsServer3DExtensionSync {
mut:
	sync_()
}

interface IPhysicsServer3DExtensionWorldBoundaryShapeCreate #

interface IPhysicsServer3DExtensionWorldBoundaryShapeCreate {
mut:
	world_boundary_shape_create_() RID
}

interface IPhysicsServer3DRenderingServerHandlerSetAabb #

interface IPhysicsServer3DRenderingServerHandlerSetAabb {
mut:
	set_aabb_(aabb AABB)
}

interface IPhysicsServer3DRenderingServerHandlerSetNormal #

interface IPhysicsServer3DRenderingServerHandlerSetNormal {
mut:
	set_normal_(vertex_id i64, normal Vector3)
}

interface IPhysicsServer3DRenderingServerHandlerSetVertex #

interface IPhysicsServer3DRenderingServerHandlerSetVertex {
mut:
	set_vertex_(vertex_id i64, vertex Vector3)
}

interface IPrimitiveMeshCreateMeshArray #

interface IPrimitiveMeshCreateMeshArray {
mut:
	create_mesh_array_() Array
}

interface IRangeValueChanged #

interface IRangeValueChanged {
mut:
	value_changed_(new_value f64)
}

interface IRenderDataExtensionGetCameraAttributes #

interface IRenderDataExtensionGetCameraAttributes {
mut:
	get_camera_attributes_() RID
}

interface IRenderDataExtensionGetEnvironment #

interface IRenderDataExtensionGetEnvironment {
mut:
	get_environment_() RID
}

interface IRenderDataExtensionGetRenderSceneBuffers #

interface IRenderDataExtensionGetRenderSceneBuffers {
mut:
	get_render_scene_buffers_() RenderSceneBuffers
}

interface IRenderDataExtensionGetRenderSceneData #

interface IRenderDataExtensionGetRenderSceneData {
mut:
	get_render_scene_data_() RenderSceneData
}

interface IRenderSceneBuffersExtensionConfigure #

interface IRenderSceneBuffersExtensionConfigure {
mut:
	configure_(config RenderSceneBuffersConfiguration)
}

interface IRenderSceneBuffersExtensionSetAnisotropicFilteringLevel #

interface IRenderSceneBuffersExtensionSetAnisotropicFilteringLevel {
mut:
	set_anisotropic_filtering_level_(anisotropic_filtering_level i64)
}

interface IRenderSceneBuffersExtensionSetFsrSharpness #

interface IRenderSceneBuffersExtensionSetFsrSharpness {
mut:
	set_fsr_sharpness_(fsr_sharpness f64)
}

interface IRenderSceneBuffersExtensionSetTextureMipmapBias #

interface IRenderSceneBuffersExtensionSetTextureMipmapBias {
mut:
	set_texture_mipmap_bias_(texture_mipmap_bias f64)
}

interface IRenderSceneBuffersExtensionSetUseDebanding #

interface IRenderSceneBuffersExtensionSetUseDebanding {
mut:
	set_use_debanding_(use_debanding bool)
}

interface IRenderSceneDataExtensionGetCamProjection #

interface IRenderSceneDataExtensionGetCamProjection {
mut:
	get_cam_projection_() Projection
}

interface IRenderSceneDataExtensionGetCamTransform #

interface IRenderSceneDataExtensionGetCamTransform {
mut:
	get_cam_transform_() Transform3D
}

interface IRenderSceneDataExtensionGetUniformBuffer #

interface IRenderSceneDataExtensionGetUniformBuffer {
mut:
	get_uniform_buffer_() RID
}

interface IRenderSceneDataExtensionGetViewCount #

interface IRenderSceneDataExtensionGetViewCount {
mut:
	get_view_count_() i64
}

interface IRenderSceneDataExtensionGetViewEyeOffset #

interface IRenderSceneDataExtensionGetViewEyeOffset {
mut:
	get_view_eye_offset_(view i64) Vector3
}

interface IRenderSceneDataExtensionGetViewProjection #

interface IRenderSceneDataExtensionGetViewProjection {
mut:
	get_view_projection_(view i64) Projection
}

interface IResourceFormatLoaderExists #

interface IResourceFormatLoaderExists {
mut:
	exists_(path String) bool
}

interface IResourceFormatLoaderGetClassesUsed #

interface IResourceFormatLoaderGetClassesUsed {
mut:
	get_classes_used_(path String) PackedStringArray
}

interface IResourceFormatLoaderGetDependencies #

interface IResourceFormatLoaderGetDependencies {
mut:
	get_dependencies_(path String, add_types bool) PackedStringArray
}

interface IResourceFormatLoaderGetRecognizedExtensions #

interface IResourceFormatLoaderGetRecognizedExtensions {
mut:
	get_recognized_extensions_() PackedStringArray
}

interface IResourceFormatLoaderGetResourceScriptClass #

interface IResourceFormatLoaderGetResourceScriptClass {
mut:
	get_resource_script_class_(path String) String
}

interface IResourceFormatLoaderGetResourceType #

interface IResourceFormatLoaderGetResourceType {
mut:
	get_resource_type_(path String) String
}

interface IResourceFormatLoaderGetResourceUid #

interface IResourceFormatLoaderGetResourceUid {
mut:
	get_resource_uid_(path String) i64
}

interface IResourceFormatLoaderHandlesType #

interface IResourceFormatLoaderHandlesType {
mut:
	handles_type_(gd_type StringName) bool
}

interface IResourceFormatLoaderLoad #

interface IResourceFormatLoaderLoad {
mut:
	load_(path String, original_path String, use_sub_threads bool, cache_mode i64) Variant
}

interface IResourceFormatLoaderRecognizePath #

interface IResourceFormatLoaderRecognizePath {
mut:
	recognize_path_(path String, gd_type StringName) bool
}

interface IResourceFormatLoaderRenameDependencies #

interface IResourceFormatLoaderRenameDependencies {
mut:
	rename_dependencies_(path String, renames Dictionary) GDError
}

interface IResourceFormatSaverGetRecognizedExtensions #

interface IResourceFormatSaverGetRecognizedExtensions {
mut:
	get_recognized_extensions_(resource Resource) PackedStringArray
}

interface IResourceFormatSaverRecognize #

interface IResourceFormatSaverRecognize {
mut:
	recognize_(resource Resource) bool
}

interface IResourceFormatSaverRecognizePath #

interface IResourceFormatSaverRecognizePath {
mut:
	recognize_path_(resource Resource, path String) bool
}

interface IResourceFormatSaverSave #

interface IResourceFormatSaverSave {
mut:
	save_(resource Resource, path String, flags i64) GDError
}

interface IResourceFormatSaverSetUid #

interface IResourceFormatSaverSetUid {
mut:
	set_uid_(path String, uid i64) GDError
}

interface IResourceGetRid #

interface IResourceGetRid {
mut:
	get_rid_() RID
}

interface IResourceImporterGetBuildDependencies #

interface IResourceImporterGetBuildDependencies {
mut:
	get_build_dependencies_(path String) PackedStringArray
}

interface IResourceResetState #

interface IResourceResetState {
mut:
	reset_state_()
}

interface IResourceSetPathCache #

interface IResourceSetPathCache {
mut:
	set_path_cache_(path String)
}

interface IResourceSetupLocalToScene #

interface IResourceSetupLocalToScene {
mut:
	setup_local_to_scene_()
}

interface IRichTextEffectProcessCustomFx #

interface IRichTextEffectProcessCustomFx {
mut:
	process_custom_fx_(char_fx CharFXTransform) bool
}

interface IRigidBody2DIntegrateForces #

interface IRigidBody2DIntegrateForces {
mut:
	integrate_forces_(state PhysicsDirectBodyState2D)
}

interface IRigidBody3DIntegrateForces #

interface IRigidBody3DIntegrateForces {
mut:
	integrate_forces_(state PhysicsDirectBodyState3D)
}

interface IScriptExtensionCanInstantiate #

interface IScriptExtensionCanInstantiate {
mut:
	can_instantiate_() bool
}

interface IScriptExtensionEditorCanReloadFromFile #

interface IScriptExtensionEditorCanReloadFromFile {
mut:
	editor_can_reload_from_file_() bool
}

interface IScriptExtensionGetBaseScript #

interface IScriptExtensionGetBaseScript {
mut:
	get_base_script_() Script
}

interface IScriptExtensionGetClassIconPath #

interface IScriptExtensionGetClassIconPath {
mut:
	get_class_icon_path_() String
}

interface IScriptExtensionGetConstants #

interface IScriptExtensionGetConstants {
mut:
	get_constants_() Dictionary
}

interface IScriptExtensionGetDocClassName #

interface IScriptExtensionGetDocClassName {
mut:
	get_doc_class_name_() StringName
}

interface IScriptExtensionGetDocumentation #

interface IScriptExtensionGetDocumentation {
mut:
	get_documentation_() Array
}

interface IScriptExtensionGetGlobalName #

interface IScriptExtensionGetGlobalName {
mut:
	get_global_name_() StringName
}

interface IScriptExtensionGetInstanceBaseType #

interface IScriptExtensionGetInstanceBaseType {
mut:
	get_instance_base_type_() StringName
}

interface IScriptExtensionGetLanguage #

interface IScriptExtensionGetLanguage {
mut:
	get_language_() ScriptLanguage
}

interface IScriptExtensionGetMemberLine #

interface IScriptExtensionGetMemberLine {
mut:
	get_member_line_(member StringName) i64
}

interface IScriptExtensionGetMembers #

interface IScriptExtensionGetMembers {
mut:
	get_members_() Array
}

interface IScriptExtensionGetMethodInfo #

interface IScriptExtensionGetMethodInfo {
mut:
	get_method_info_(method StringName) Dictionary
}

interface IScriptExtensionGetPropertyDefaultValue #

interface IScriptExtensionGetPropertyDefaultValue {
mut:
	get_property_default_value_(property StringName) Variant
}

interface IScriptExtensionGetRpcConfig #

interface IScriptExtensionGetRpcConfig {
mut:
	get_rpc_config_() Variant
}

interface IScriptExtensionGetScriptMethodArgumentCount #

interface IScriptExtensionGetScriptMethodArgumentCount {
mut:
	get_script_method_argument_count_(method StringName) Variant
}

interface IScriptExtensionGetScriptMethodList #

interface IScriptExtensionGetScriptMethodList {
mut:
	get_script_method_list_() Array
}

interface IScriptExtensionGetScriptPropertyList #

interface IScriptExtensionGetScriptPropertyList {
mut:
	get_script_property_list_() Array
}

interface IScriptExtensionGetScriptSignalList #

interface IScriptExtensionGetScriptSignalList {
mut:
	get_script_signal_list_() Array
}

interface IScriptExtensionGetSourceCode #

interface IScriptExtensionGetSourceCode {
mut:
	get_source_code_() String
}

interface IScriptExtensionHasMethod #

interface IScriptExtensionHasMethod {
mut:
	has_method_(method StringName) bool
}

interface IScriptExtensionHasPropertyDefaultValue #

interface IScriptExtensionHasPropertyDefaultValue {
mut:
	has_property_default_value_(property StringName) bool
}

interface IScriptExtensionHasScriptSignal #

interface IScriptExtensionHasScriptSignal {
mut:
	has_script_signal_(signal StringName) bool
}

interface IScriptExtensionHasSourceCode #

interface IScriptExtensionHasSourceCode {
mut:
	has_source_code_() bool
}

interface IScriptExtensionHasStaticMethod #

interface IScriptExtensionHasStaticMethod {
mut:
	has_static_method_(method StringName) bool
}

interface IScriptExtensionInheritsScript #

interface IScriptExtensionInheritsScript {
mut:
	inherits_script_(script Script) bool
}

interface IScriptExtensionInstanceCreate #

interface IScriptExtensionInstanceCreate {
mut:
	instance_create_(for_object Object) voidptr
}

interface IScriptExtensionInstanceHas #

interface IScriptExtensionInstanceHas {
mut:
	instance_has_(object Object) bool
}

interface IScriptExtensionIsAbstract #

interface IScriptExtensionIsAbstract {
mut:
	is_abstract_() bool
}

interface IScriptExtensionIsPlaceholderFallbackEnabled #

interface IScriptExtensionIsPlaceholderFallbackEnabled {
mut:
	is_placeholder_fallback_enabled_() bool
}

interface IScriptExtensionIsTool #

interface IScriptExtensionIsTool {
mut:
	is_tool_() bool
}

interface IScriptExtensionIsValid #

interface IScriptExtensionIsValid {
mut:
	is_valid_() bool
}

interface IScriptExtensionPlaceholderErased #

interface IScriptExtensionPlaceholderErased {
mut:
	placeholder_erased_(placeholder voidptr)
}

interface IScriptExtensionPlaceholderInstanceCreate #

interface IScriptExtensionPlaceholderInstanceCreate {
mut:
	placeholder_instance_create_(for_object Object) voidptr
}

interface IScriptExtensionReload #

interface IScriptExtensionReload {
mut:
	reload_(keep_state bool) GDError
}

interface IScriptExtensionSetSourceCode #

interface IScriptExtensionSetSourceCode {
mut:
	set_source_code_(code String)
}

interface IScriptExtensionUpdateExports #

interface IScriptExtensionUpdateExports {
mut:
	update_exports_()
}

interface IScriptLanguageExtensionAddGlobalConstant #

interface IScriptLanguageExtensionAddGlobalConstant {
mut:
	add_global_constant_(name StringName, value Variant)
}

interface IScriptLanguageExtensionAddNamedGlobalConstant #

interface IScriptLanguageExtensionAddNamedGlobalConstant {
mut:
	add_named_global_constant_(name StringName, value Variant)
}

interface IScriptLanguageExtensionAutoIndentCode #

interface IScriptLanguageExtensionAutoIndentCode {
mut:
	auto_indent_code_(code String, from_line i64, to_line i64) String
}

interface IScriptLanguageExtensionCanInheritFromFile #

interface IScriptLanguageExtensionCanInheritFromFile {
mut:
	can_inherit_from_file_() bool
}

interface IScriptLanguageExtensionCanMakeFunction #

interface IScriptLanguageExtensionCanMakeFunction {
mut:
	can_make_function_() bool
}

interface IScriptLanguageExtensionCompleteCode #

interface IScriptLanguageExtensionCompleteCode {
mut:
	complete_code_(code String, path String, owner Object) Dictionary
}

interface IScriptLanguageExtensionCreateScript #

interface IScriptLanguageExtensionCreateScript {
mut:
	create_script_() Object
}

interface IScriptLanguageExtensionDebugGetCurrentStackInfo #

interface IScriptLanguageExtensionDebugGetCurrentStackInfo {
mut:
	debug_get_current_stack_info_() Array
}

interface IScriptLanguageExtensionDebugGetError #

interface IScriptLanguageExtensionDebugGetError {
mut:
	debug_get_error_() String
}

interface IScriptLanguageExtensionDebugGetGlobals #

interface IScriptLanguageExtensionDebugGetGlobals {
mut:
	debug_get_globals_(max_subitems i64, max_depth i64) Dictionary
}

interface IScriptLanguageExtensionDebugGetStackLevelCount #

interface IScriptLanguageExtensionDebugGetStackLevelCount {
mut:
	debug_get_stack_level_count_() i64
}

interface IScriptLanguageExtensionDebugGetStackLevelFunction #

interface IScriptLanguageExtensionDebugGetStackLevelFunction {
mut:
	debug_get_stack_level_function_(level i64) String
}

interface IScriptLanguageExtensionDebugGetStackLevelInstance #

interface IScriptLanguageExtensionDebugGetStackLevelInstance {
mut:
	debug_get_stack_level_instance_(level i64) voidptr
}

interface IScriptLanguageExtensionDebugGetStackLevelLine #

interface IScriptLanguageExtensionDebugGetStackLevelLine {
mut:
	debug_get_stack_level_line_(level i64) i64
}

interface IScriptLanguageExtensionDebugGetStackLevelLocals #

interface IScriptLanguageExtensionDebugGetStackLevelLocals {
mut:
	debug_get_stack_level_locals_(level i64, max_subitems i64, max_depth i64) Dictionary
}

interface IScriptLanguageExtensionDebugGetStackLevelMembers #

interface IScriptLanguageExtensionDebugGetStackLevelMembers {
mut:
	debug_get_stack_level_members_(level i64, max_subitems i64, max_depth i64) Dictionary
}

interface IScriptLanguageExtensionDebugGetStackLevelSource #

interface IScriptLanguageExtensionDebugGetStackLevelSource {
mut:
	debug_get_stack_level_source_(level i64) String
}

interface IScriptLanguageExtensionDebugParseStackLevelExpression #

interface IScriptLanguageExtensionDebugParseStackLevelExpression {
mut:
	debug_parse_stack_level_expression_(level i64, expression String, max_subitems i64, max_depth i64) String
}

interface IScriptLanguageExtensionFindFunction #

interface IScriptLanguageExtensionFindFunction {
mut:
	find_function_(function String, code String) i64
}

interface IScriptLanguageExtensionFinish #

interface IScriptLanguageExtensionFinish {
mut:
	finish_()
}

interface IScriptLanguageExtensionFrame #

interface IScriptLanguageExtensionFrame {
mut:
	frame_()
}

interface IScriptLanguageExtensionGetBuiltInTemplates #

interface IScriptLanguageExtensionGetBuiltInTemplates {
mut:
	get_built_in_templates_(object StringName) Array
}

interface IScriptLanguageExtensionGetCommentDelimiters #

interface IScriptLanguageExtensionGetCommentDelimiters {
mut:
	get_comment_delimiters_() PackedStringArray
}

interface IScriptLanguageExtensionGetDocCommentDelimiters #

interface IScriptLanguageExtensionGetDocCommentDelimiters {
mut:
	get_doc_comment_delimiters_() PackedStringArray
}

interface IScriptLanguageExtensionGetExtension #

interface IScriptLanguageExtensionGetExtension {
mut:
	get_extension_() String
}

interface IScriptLanguageExtensionGetGlobalClassName #

interface IScriptLanguageExtensionGetGlobalClassName {
mut:
	get_global_class_name_(path String) Dictionary
}

interface IScriptLanguageExtensionGetName #

interface IScriptLanguageExtensionGetName {
mut:
	get_name_() String
}

interface IScriptLanguageExtensionGetPublicAnnotations #

interface IScriptLanguageExtensionGetPublicAnnotations {
mut:
	get_public_annotations_() Array
}

interface IScriptLanguageExtensionGetPublicConstants #

interface IScriptLanguageExtensionGetPublicConstants {
mut:
	get_public_constants_() Dictionary
}

interface IScriptLanguageExtensionGetPublicFunctions #

interface IScriptLanguageExtensionGetPublicFunctions {
mut:
	get_public_functions_() Array
}

interface IScriptLanguageExtensionGetRecognizedExtensions #

interface IScriptLanguageExtensionGetRecognizedExtensions {
mut:
	get_recognized_extensions_() PackedStringArray
}

interface IScriptLanguageExtensionGetReservedWords #

interface IScriptLanguageExtensionGetReservedWords {
mut:
	get_reserved_words_() PackedStringArray
}

interface IScriptLanguageExtensionGetStringDelimiters #

interface IScriptLanguageExtensionGetStringDelimiters {
mut:
	get_string_delimiters_() PackedStringArray
}

interface IScriptLanguageExtensionGetType #

interface IScriptLanguageExtensionGetType {
mut:
	get_type_() String
}

interface IScriptLanguageExtensionHandlesGlobalClassType #

interface IScriptLanguageExtensionHandlesGlobalClassType {
mut:
	handles_global_class_type_(gd_type String) bool
}

interface IScriptLanguageExtensionHasNamedClasses #

interface IScriptLanguageExtensionHasNamedClasses {
mut:
	has_named_classes_() bool
}

interface IScriptLanguageExtensionInit #

interface IScriptLanguageExtensionInit {
mut:
	init_()
}

interface IScriptLanguageExtensionIsControlFlowKeyword #

interface IScriptLanguageExtensionIsControlFlowKeyword {
mut:
	is_control_flow_keyword_(keyword String) bool
}

interface IScriptLanguageExtensionIsUsingTemplates #

interface IScriptLanguageExtensionIsUsingTemplates {
mut:
	is_using_templates_() bool
}

interface IScriptLanguageExtensionLookupCode #

interface IScriptLanguageExtensionLookupCode {
mut:
	lookup_code_(code String, symbol String, path String, owner Object) Dictionary
}

interface IScriptLanguageExtensionMakeFunction #

interface IScriptLanguageExtensionMakeFunction {
mut:
	make_function_(class_name String, function_name String, function_args PackedStringArray) String
}

interface IScriptLanguageExtensionMakeTemplate #

interface IScriptLanguageExtensionMakeTemplate {
mut:
	make_template_(template String, class_name String, base_class_name String) Script
}

interface IScriptLanguageExtensionOpenInExternalEditor #

interface IScriptLanguageExtensionOpenInExternalEditor {
mut:
	open_in_external_editor_(script Script, line i64, column i64) GDError
}

interface IScriptLanguageExtensionOverridesExternalEditor #

interface IScriptLanguageExtensionOverridesExternalEditor {
mut:
	overrides_external_editor_() bool
}

interface IScriptLanguageExtensionPreferredFileNameCasing #

interface IScriptLanguageExtensionPreferredFileNameCasing {
mut:
	preferred_file_name_casing_() ScriptLanguageScriptNameCasing
}

interface IScriptLanguageExtensionProfilingGetAccumulatedData #

interface IScriptLanguageExtensionProfilingGetAccumulatedData {
mut:
	profiling_get_accumulated_data_(info_array &ScriptLanguageExtensionProfilingInfo, info_max i64) i64
}

interface IScriptLanguageExtensionProfilingGetFrameData #

interface IScriptLanguageExtensionProfilingGetFrameData {
mut:
	profiling_get_frame_data_(info_array &ScriptLanguageExtensionProfilingInfo, info_max i64) i64
}

interface IScriptLanguageExtensionProfilingSetSaveNativeCalls #

interface IScriptLanguageExtensionProfilingSetSaveNativeCalls {
mut:
	profiling_set_save_native_calls_(enable bool)
}

interface IScriptLanguageExtensionProfilingStart #

interface IScriptLanguageExtensionProfilingStart {
mut:
	profiling_start_()
}

interface IScriptLanguageExtensionProfilingStop #

interface IScriptLanguageExtensionProfilingStop {
mut:
	profiling_stop_()
}

interface IScriptLanguageExtensionReloadAllScripts #

interface IScriptLanguageExtensionReloadAllScripts {
mut:
	reload_all_scripts_()
}

interface IScriptLanguageExtensionReloadScripts #

interface IScriptLanguageExtensionReloadScripts {
mut:
	reload_scripts_(scripts Array, soft_reload bool)
}

interface IScriptLanguageExtensionReloadToolScript #

interface IScriptLanguageExtensionReloadToolScript {
mut:
	reload_tool_script_(script Script, soft_reload bool)
}

interface IScriptLanguageExtensionRemoveNamedGlobalConstant #

interface IScriptLanguageExtensionRemoveNamedGlobalConstant {
mut:
	remove_named_global_constant_(name StringName)
}

interface IScriptLanguageExtensionSupportsBuiltinMode #

interface IScriptLanguageExtensionSupportsBuiltinMode {
mut:
	supports_builtin_mode_() bool
}

interface IScriptLanguageExtensionSupportsDocumentation #

interface IScriptLanguageExtensionSupportsDocumentation {
mut:
	supports_documentation_() bool
}

interface IScriptLanguageExtensionThreadEnter #

interface IScriptLanguageExtensionThreadEnter {
mut:
	thread_enter_()
}

interface IScriptLanguageExtensionThreadExit #

interface IScriptLanguageExtensionThreadExit {
mut:
	thread_exit_()
}

interface IScriptLanguageExtensionValidate #

interface IScriptLanguageExtensionValidate {
mut:
	validate_(script String, path String, validate_functions bool, validate_errors bool, validate_warnings bool, validate_safe_lines bool) Dictionary
}

interface IScriptLanguageExtensionValidatePath #

interface IScriptLanguageExtensionValidatePath {
mut:
	validate_path_(path String) String
}

interface ISkeletonModification2DDrawEditorGizmo #

interface ISkeletonModification2DDrawEditorGizmo {
mut:
	draw_editor_gizmo_()
}

interface ISkeletonModification2DExecute #

interface ISkeletonModification2DExecute {
mut:
	execute_(delta f64)
}

interface ISkeletonModification2DSetupModification #

interface ISkeletonModification2DSetupModification {
mut:
	setup_modification_(modification_stack SkeletonModificationStack2D)
}

interface ISkeletonModifier3DProcessModification #

interface ISkeletonModifier3DProcessModification {
mut:
	process_modification_()
}

interface ISkeletonModifier3DProcessModificationWithDelta #

interface ISkeletonModifier3DProcessModificationWithDelta {
mut:
	process_modification_with_delta_(delta f64)
}

interface ISkeletonModifier3DSkeletonChanged #

interface ISkeletonModifier3DSkeletonChanged {
mut:
	skeleton_changed_(old_skeleton Skeleton3D, new_skeleton Skeleton3D)
}

interface ISkeletonModifier3DValidateBoneNames #

interface ISkeletonModifier3DValidateBoneNames {
mut:
	validate_bone_names_()
}

interface IStreamPeerExtensionGetAvailableBytes #

interface IStreamPeerExtensionGetAvailableBytes {
mut:
	get_available_bytes_() i64
}

interface IStreamPeerExtensionGetData #

interface IStreamPeerExtensionGetData {
mut:
	get_data_(r_buffer &u8, r_bytes i64, r_received &i32) GDError
}

interface IStreamPeerExtensionGetPartialData #

interface IStreamPeerExtensionGetPartialData {
mut:
	get_partial_data_(r_buffer &u8, r_bytes i64, r_received &i32) GDError
}

interface IStreamPeerExtensionPutData #

interface IStreamPeerExtensionPutData {
mut:
	put_data_(p_data &u8, p_bytes i64, r_sent &i32) GDError
}

interface IStreamPeerExtensionPutPartialData #

interface IStreamPeerExtensionPutPartialData {
mut:
	put_partial_data_(p_data &u8, p_bytes i64, r_sent &i32) GDError
}

interface IStyleBoxDraw #

interface IStyleBoxDraw {
mut:
	draw_(to_canvas_item RID, rect Rect2)
}

interface IStyleBoxGetDrawRect #

interface IStyleBoxGetDrawRect {
mut:
	get_draw_rect_(rect Rect2) Rect2
}

interface IStyleBoxGetMinimumSize #

interface IStyleBoxGetMinimumSize {
mut:
	get_minimum_size_() Vector2
}

interface IStyleBoxTestMask #

interface IStyleBoxTestMask {
mut:
	test_mask_(point Vector2, rect Rect2) bool
}

interface ISubViewportContainerPropagateInputEvent #

interface ISubViewportContainerPropagateInputEvent {
mut:
	propagate_input_event_(event InputEvent) bool
}

interface ISyntaxHighlighterClearHighlightingCache #

interface ISyntaxHighlighterClearHighlightingCache {
mut:
	clear_highlighting_cache_()
}

interface ISyntaxHighlighterGetLineSyntaxHighlighting #

interface ISyntaxHighlighterGetLineSyntaxHighlighting {
mut:
	get_line_syntax_highlighting_(line i64) Dictionary
}

interface ISyntaxHighlighterUpdateCache #

interface ISyntaxHighlighterUpdateCache {
mut:
	update_cache_()
}

interface ITextEditBackspace #

interface ITextEditBackspace {
mut:
	backspace_(caret_index i64)
}

interface ITextEditCopy #

interface ITextEditCopy {
mut:
	copy_(caret_index i64)
}

interface ITextEditCut #

interface ITextEditCut {
mut:
	cut_(caret_index i64)
}

interface ITextEditHandleUnicodeInput #

interface ITextEditHandleUnicodeInput {
mut:
	handle_unicode_input_(unicode_char i64, caret_index i64)
}

interface ITextEditPaste #

interface ITextEditPaste {
mut:
	paste_(caret_index i64)
}

interface ITextEditPastePrimaryClipboard #

interface ITextEditPastePrimaryClipboard {
mut:
	paste_primary_clipboard_(caret_index i64)
}

interface ITextServerExtensionCleanup #

interface ITextServerExtensionCleanup {
mut:
	cleanup_()
}

interface ITextServerExtensionCreateFont #

interface ITextServerExtensionCreateFont {
mut:
	create_font_() RID
}

interface ITextServerExtensionCreateFontLinkedVariation #

interface ITextServerExtensionCreateFontLinkedVariation {
mut:
	create_font_linked_variation_(font_rid RID) RID
}

interface ITextServerExtensionCreateShapedText #

interface ITextServerExtensionCreateShapedText {
mut:
	create_shaped_text_(direction TextServerDirection, orientation TextServerOrientation) RID
}

interface ITextServerExtensionDrawHexCodeBox #

interface ITextServerExtensionDrawHexCodeBox {
mut:
	draw_hex_code_box_(canvas RID, size i64, pos Vector2, index i64, color Color)
}

interface ITextServerExtensionFontClearGlyphs #

interface ITextServerExtensionFontClearGlyphs {
mut:
	font_clear_glyphs_(font_rid RID, size Vector2i)
}

interface ITextServerExtensionFontClearKerningMap #

interface ITextServerExtensionFontClearKerningMap {
mut:
	font_clear_kerning_map_(font_rid RID, size i64)
}

interface ITextServerExtensionFontClearSizeCache #

interface ITextServerExtensionFontClearSizeCache {
mut:
	font_clear_size_cache_(font_rid RID)
}

interface ITextServerExtensionFontClearSystemFallbackCache #

interface ITextServerExtensionFontClearSystemFallbackCache {
mut:
	font_clear_system_fallback_cache_()
}

interface ITextServerExtensionFontClearTextures #

interface ITextServerExtensionFontClearTextures {
mut:
	font_clear_textures_(font_rid RID, size Vector2i)
}

interface ITextServerExtensionFontDrawGlyph #

interface ITextServerExtensionFontDrawGlyph {
mut:
	font_draw_glyph_(font_rid RID, canvas RID, size i64, pos Vector2, index i64, color Color, oversampling f64)
}

interface ITextServerExtensionFontDrawGlyphOutline #

interface ITextServerExtensionFontDrawGlyphOutline {
mut:
	font_draw_glyph_outline_(font_rid RID, canvas RID, size i64, outline_size i64, pos Vector2, index i64, color Color, oversampling f64)
}

interface ITextServerExtensionFontGetAntialiasing #

interface ITextServerExtensionFontGetAntialiasing {
mut:
	font_get_antialiasing_(font_rid RID) TextServerFontAntialiasing
}

interface ITextServerExtensionFontGetAscent #

interface ITextServerExtensionFontGetAscent {
mut:
	font_get_ascent_(font_rid RID, size i64) f64
}

interface ITextServerExtensionFontGetBaselineOffset #

interface ITextServerExtensionFontGetBaselineOffset {
mut:
	font_get_baseline_offset_(font_rid RID) f64
}

interface ITextServerExtensionFontGetCharFromGlyphIndex #

interface ITextServerExtensionFontGetCharFromGlyphIndex {
mut:
	font_get_char_from_glyph_index_(font_rid RID, size i64, glyph_index i64) i64
}

interface ITextServerExtensionFontGetDescent #

interface ITextServerExtensionFontGetDescent {
mut:
	font_get_descent_(font_rid RID, size i64) f64
}

interface ITextServerExtensionFontGetDisableEmbeddedBitmaps #

interface ITextServerExtensionFontGetDisableEmbeddedBitmaps {
mut:
	font_get_disable_embedded_bitmaps_(font_rid RID) bool
}

interface ITextServerExtensionFontGetEmbolden #

interface ITextServerExtensionFontGetEmbolden {
mut:
	font_get_embolden_(font_rid RID) f64
}

interface ITextServerExtensionFontGetFaceCount #

interface ITextServerExtensionFontGetFaceCount {
mut:
	font_get_face_count_(font_rid RID) i64
}

interface ITextServerExtensionFontGetFaceIndex #

interface ITextServerExtensionFontGetFaceIndex {
mut:
	font_get_face_index_(font_rid RID) i64
}

interface ITextServerExtensionFontGetFixedSize #

interface ITextServerExtensionFontGetFixedSize {
mut:
	font_get_fixed_size_(font_rid RID) i64
}

interface ITextServerExtensionFontGetFixedSizeScaleMode #

interface ITextServerExtensionFontGetFixedSizeScaleMode {
mut:
	font_get_fixed_size_scale_mode_(font_rid RID) TextServerFixedSizeScaleMode
}

interface ITextServerExtensionFontGetGenerateMipmaps #

interface ITextServerExtensionFontGetGenerateMipmaps {
mut:
	font_get_generate_mipmaps_(font_rid RID) bool
}

interface ITextServerExtensionFontGetGlobalOversampling #

interface ITextServerExtensionFontGetGlobalOversampling {
mut:
	font_get_global_oversampling_() f64
}

interface ITextServerExtensionFontGetGlyphAdvance #

interface ITextServerExtensionFontGetGlyphAdvance {
mut:
	font_get_glyph_advance_(font_rid RID, size i64, glyph i64) Vector2
}

interface ITextServerExtensionFontGetGlyphContours #

interface ITextServerExtensionFontGetGlyphContours {
mut:
	font_get_glyph_contours_(font_rid RID, size i64, index i64) Dictionary
}

interface ITextServerExtensionFontGetGlyphIndex #

interface ITextServerExtensionFontGetGlyphIndex {
mut:
	font_get_glyph_index_(font_rid RID, size i64, gd_char i64, variation_selector i64) i64
}

interface ITextServerExtensionFontGetGlyphList #

interface ITextServerExtensionFontGetGlyphList {
mut:
	font_get_glyph_list_(font_rid RID, size Vector2i) PackedInt32Array
}

interface ITextServerExtensionFontGetGlyphOffset #

interface ITextServerExtensionFontGetGlyphOffset {
mut:
	font_get_glyph_offset_(font_rid RID, size Vector2i, glyph i64) Vector2
}

interface ITextServerExtensionFontGetGlyphSize #

interface ITextServerExtensionFontGetGlyphSize {
mut:
	font_get_glyph_size_(font_rid RID, size Vector2i, glyph i64) Vector2
}

interface ITextServerExtensionFontGetGlyphTextureIdx #

interface ITextServerExtensionFontGetGlyphTextureIdx {
mut:
	font_get_glyph_texture_idx_(font_rid RID, size Vector2i, glyph i64) i64
}

interface ITextServerExtensionFontGetGlyphTextureRid #

interface ITextServerExtensionFontGetGlyphTextureRid {
mut:
	font_get_glyph_texture_rid_(font_rid RID, size Vector2i, glyph i64) RID
}

interface ITextServerExtensionFontGetGlyphTextureSize #

interface ITextServerExtensionFontGetGlyphTextureSize {
mut:
	font_get_glyph_texture_size_(font_rid RID, size Vector2i, glyph i64) Vector2
}

interface ITextServerExtensionFontGetGlyphUvRect #

interface ITextServerExtensionFontGetGlyphUvRect {
mut:
	font_get_glyph_uv_rect_(font_rid RID, size Vector2i, glyph i64) Rect2
}

interface ITextServerExtensionFontGetHinting #

interface ITextServerExtensionFontGetHinting {
mut:
	font_get_hinting_(font_rid RID) TextServerHinting
}

interface ITextServerExtensionFontGetKeepRoundingRemainders #

interface ITextServerExtensionFontGetKeepRoundingRemainders {
mut:
	font_get_keep_rounding_remainders_(font_rid RID) bool
}

interface ITextServerExtensionFontGetKerning #

interface ITextServerExtensionFontGetKerning {
mut:
	font_get_kerning_(font_rid RID, size i64, glyph_pair Vector2i) Vector2
}

interface ITextServerExtensionFontGetKerningList #

interface ITextServerExtensionFontGetKerningList {
mut:
	font_get_kerning_list_(font_rid RID, size i64) Array
}

interface ITextServerExtensionFontGetLanguageSupportOverride #

interface ITextServerExtensionFontGetLanguageSupportOverride {
mut:
	font_get_language_support_override_(font_rid RID, language String) bool
}

interface ITextServerExtensionFontGetLanguageSupportOverrides #

interface ITextServerExtensionFontGetLanguageSupportOverrides {
mut:
	font_get_language_support_overrides_(font_rid RID) PackedStringArray
}

interface ITextServerExtensionFontGetMsdfPixelRange #

interface ITextServerExtensionFontGetMsdfPixelRange {
mut:
	font_get_msdf_pixel_range_(font_rid RID) i64
}

interface ITextServerExtensionFontGetMsdfSize #

interface ITextServerExtensionFontGetMsdfSize {
mut:
	font_get_msdf_size_(font_rid RID) i64
}

interface ITextServerExtensionFontGetName #

interface ITextServerExtensionFontGetName {
mut:
	font_get_name_(font_rid RID) String
}

interface ITextServerExtensionFontGetOpentypeFeatureOverrides #

interface ITextServerExtensionFontGetOpentypeFeatureOverrides {
mut:
	font_get_opentype_feature_overrides_(font_rid RID) Dictionary
}

interface ITextServerExtensionFontGetOtNameStrings #

interface ITextServerExtensionFontGetOtNameStrings {
mut:
	font_get_ot_name_strings_(font_rid RID) Dictionary
}

interface ITextServerExtensionFontGetOversampling #

interface ITextServerExtensionFontGetOversampling {
mut:
	font_get_oversampling_(font_rid RID) f64
}

interface ITextServerExtensionFontGetScale #

interface ITextServerExtensionFontGetScale {
mut:
	font_get_scale_(font_rid RID, size i64) f64
}

interface ITextServerExtensionFontGetScriptSupportOverride #

interface ITextServerExtensionFontGetScriptSupportOverride {
mut:
	font_get_script_support_override_(font_rid RID, script String) bool
}

interface ITextServerExtensionFontGetScriptSupportOverrides #

interface ITextServerExtensionFontGetScriptSupportOverrides {
mut:
	font_get_script_support_overrides_(font_rid RID) PackedStringArray
}

interface ITextServerExtensionFontGetSizeCacheInfo #

interface ITextServerExtensionFontGetSizeCacheInfo {
mut:
	font_get_size_cache_info_(font_rid RID) Array
}

interface ITextServerExtensionFontGetSizeCacheList #

interface ITextServerExtensionFontGetSizeCacheList {
mut:
	font_get_size_cache_list_(font_rid RID) Array
}

interface ITextServerExtensionFontGetSpacing #

interface ITextServerExtensionFontGetSpacing {
mut:
	font_get_spacing_(font_rid RID, spacing TextServerSpacingType) i64
}

interface ITextServerExtensionFontGetStretch #

interface ITextServerExtensionFontGetStretch {
mut:
	font_get_stretch_(font_rid RID) i64
}

interface ITextServerExtensionFontGetStyle #

interface ITextServerExtensionFontGetStyle {
mut:
	font_get_style_(font_rid RID) TextServerFontStyle
}

interface ITextServerExtensionFontGetStyleName #

interface ITextServerExtensionFontGetStyleName {
mut:
	font_get_style_name_(font_rid RID) String
}

interface ITextServerExtensionFontGetSubpixelPositioning #

interface ITextServerExtensionFontGetSubpixelPositioning {
mut:
	font_get_subpixel_positioning_(font_rid RID) TextServerSubpixelPositioning
}

interface ITextServerExtensionFontGetSupportedChars #

interface ITextServerExtensionFontGetSupportedChars {
mut:
	font_get_supported_chars_(font_rid RID) String
}

interface ITextServerExtensionFontGetSupportedGlyphs #

interface ITextServerExtensionFontGetSupportedGlyphs {
mut:
	font_get_supported_glyphs_(font_rid RID) PackedInt32Array
}

interface ITextServerExtensionFontGetTextureCount #

interface ITextServerExtensionFontGetTextureCount {
mut:
	font_get_texture_count_(font_rid RID, size Vector2i) i64
}

interface ITextServerExtensionFontGetTextureImage #

interface ITextServerExtensionFontGetTextureImage {
mut:
	font_get_texture_image_(font_rid RID, size Vector2i, texture_index i64) Image
}

interface ITextServerExtensionFontGetTextureOffsets #

interface ITextServerExtensionFontGetTextureOffsets {
mut:
	font_get_texture_offsets_(font_rid RID, size Vector2i, texture_index i64) PackedInt32Array
}

interface ITextServerExtensionFontGetTransform #

interface ITextServerExtensionFontGetTransform {
mut:
	font_get_transform_(font_rid RID) Transform2D
}

interface ITextServerExtensionFontGetUnderlinePosition #

interface ITextServerExtensionFontGetUnderlinePosition {
mut:
	font_get_underline_position_(font_rid RID, size i64) f64
}

interface ITextServerExtensionFontGetUnderlineThickness #

interface ITextServerExtensionFontGetUnderlineThickness {
mut:
	font_get_underline_thickness_(font_rid RID, size i64) f64
}

interface ITextServerExtensionFontGetVariationCoordinates #

interface ITextServerExtensionFontGetVariationCoordinates {
mut:
	font_get_variation_coordinates_(font_rid RID) Dictionary
}

interface ITextServerExtensionFontGetWeight #

interface ITextServerExtensionFontGetWeight {
mut:
	font_get_weight_(font_rid RID) i64
}

interface ITextServerExtensionFontHasChar #

interface ITextServerExtensionFontHasChar {
mut:
	font_has_char_(font_rid RID, gd_char i64) bool
}

interface ITextServerExtensionFontIsAllowSystemFallback #

interface ITextServerExtensionFontIsAllowSystemFallback {
mut:
	font_is_allow_system_fallback_(font_rid RID) bool
}

interface ITextServerExtensionFontIsForceAutohinter #

interface ITextServerExtensionFontIsForceAutohinter {
mut:
	font_is_force_autohinter_(font_rid RID) bool
}

interface ITextServerExtensionFontIsLanguageSupported #

interface ITextServerExtensionFontIsLanguageSupported {
mut:
	font_is_language_supported_(font_rid RID, language String) bool
}

interface ITextServerExtensionFontIsModulateColorGlyphs #

interface ITextServerExtensionFontIsModulateColorGlyphs {
mut:
	font_is_modulate_color_glyphs_(font_rid RID) bool
}

interface ITextServerExtensionFontIsMultichannelSignedDistanceField #

interface ITextServerExtensionFontIsMultichannelSignedDistanceField {
mut:
	font_is_multichannel_signed_distance_field_(font_rid RID) bool
}

interface ITextServerExtensionFontIsScriptSupported #

interface ITextServerExtensionFontIsScriptSupported {
mut:
	font_is_script_supported_(font_rid RID, script String) bool
}

interface ITextServerExtensionFontRemoveGlyph #

interface ITextServerExtensionFontRemoveGlyph {
mut:
	font_remove_glyph_(font_rid RID, size Vector2i, glyph i64)
}

interface ITextServerExtensionFontRemoveKerning #

interface ITextServerExtensionFontRemoveKerning {
mut:
	font_remove_kerning_(font_rid RID, size i64, glyph_pair Vector2i)
}

interface ITextServerExtensionFontRemoveLanguageSupportOverride #

interface ITextServerExtensionFontRemoveLanguageSupportOverride {
mut:
	font_remove_language_support_override_(font_rid RID, language String)
}

interface ITextServerExtensionFontRemoveScriptSupportOverride #

interface ITextServerExtensionFontRemoveScriptSupportOverride {
mut:
	font_remove_script_support_override_(font_rid RID, script String)
}

interface ITextServerExtensionFontRemoveSizeCache #

interface ITextServerExtensionFontRemoveSizeCache {
mut:
	font_remove_size_cache_(font_rid RID, size Vector2i)
}

interface ITextServerExtensionFontRemoveTexture #

interface ITextServerExtensionFontRemoveTexture {
mut:
	font_remove_texture_(font_rid RID, size Vector2i, texture_index i64)
}

interface ITextServerExtensionFontRenderGlyph #

interface ITextServerExtensionFontRenderGlyph {
mut:
	font_render_glyph_(font_rid RID, size Vector2i, index i64)
}

interface ITextServerExtensionFontRenderRange #

interface ITextServerExtensionFontRenderRange {
mut:
	font_render_range_(font_rid RID, size Vector2i, start i64, end i64)
}

interface ITextServerExtensionFontSetAllowSystemFallback #

interface ITextServerExtensionFontSetAllowSystemFallback {
mut:
	font_set_allow_system_fallback_(font_rid RID, allow_system_fallback bool)
}

interface ITextServerExtensionFontSetAntialiasing #

interface ITextServerExtensionFontSetAntialiasing {
mut:
	font_set_antialiasing_(font_rid RID, antialiasing TextServerFontAntialiasing)
}

interface ITextServerExtensionFontSetAscent #

interface ITextServerExtensionFontSetAscent {
mut:
	font_set_ascent_(font_rid RID, size i64, ascent f64)
}

interface ITextServerExtensionFontSetBaselineOffset #

interface ITextServerExtensionFontSetBaselineOffset {
mut:
	font_set_baseline_offset_(font_rid RID, baseline_offset f64)
}

interface ITextServerExtensionFontSetData #

interface ITextServerExtensionFontSetData {
mut:
	font_set_data_(font_rid RID, data PackedByteArray)
}

interface ITextServerExtensionFontSetDataPtr #

interface ITextServerExtensionFontSetDataPtr {
mut:
	font_set_data_ptr_(font_rid RID, data_ptr &u8, data_size i64)
}

interface ITextServerExtensionFontSetDescent #

interface ITextServerExtensionFontSetDescent {
mut:
	font_set_descent_(font_rid RID, size i64, descent f64)
}

interface ITextServerExtensionFontSetDisableEmbeddedBitmaps #

interface ITextServerExtensionFontSetDisableEmbeddedBitmaps {
mut:
	font_set_disable_embedded_bitmaps_(font_rid RID, disable_embedded_bitmaps bool)
}

interface ITextServerExtensionFontSetEmbolden #

interface ITextServerExtensionFontSetEmbolden {
mut:
	font_set_embolden_(font_rid RID, strength f64)
}

interface ITextServerExtensionFontSetFaceIndex #

interface ITextServerExtensionFontSetFaceIndex {
mut:
	font_set_face_index_(font_rid RID, face_index i64)
}

interface ITextServerExtensionFontSetFixedSize #

interface ITextServerExtensionFontSetFixedSize {
mut:
	font_set_fixed_size_(font_rid RID, fixed_size i64)
}

interface ITextServerExtensionFontSetFixedSizeScaleMode #

interface ITextServerExtensionFontSetFixedSizeScaleMode {
mut:
	font_set_fixed_size_scale_mode_(font_rid RID, fixed_size_scale_mode TextServerFixedSizeScaleMode)
}

interface ITextServerExtensionFontSetForceAutohinter #

interface ITextServerExtensionFontSetForceAutohinter {
mut:
	font_set_force_autohinter_(font_rid RID, force_autohinter bool)
}

interface ITextServerExtensionFontSetGenerateMipmaps #

interface ITextServerExtensionFontSetGenerateMipmaps {
mut:
	font_set_generate_mipmaps_(font_rid RID, generate_mipmaps bool)
}

interface ITextServerExtensionFontSetGlobalOversampling #

interface ITextServerExtensionFontSetGlobalOversampling {
mut:
	font_set_global_oversampling_(oversampling f64)
}

interface ITextServerExtensionFontSetGlyphAdvance #

interface ITextServerExtensionFontSetGlyphAdvance {
mut:
	font_set_glyph_advance_(font_rid RID, size i64, glyph i64, advance Vector2)
}

interface ITextServerExtensionFontSetGlyphOffset #

interface ITextServerExtensionFontSetGlyphOffset {
mut:
	font_set_glyph_offset_(font_rid RID, size Vector2i, glyph i64, offset Vector2)
}

interface ITextServerExtensionFontSetGlyphSize #

interface ITextServerExtensionFontSetGlyphSize {
mut:
	font_set_glyph_size_(font_rid RID, size Vector2i, glyph i64, gl_size Vector2)
}

interface ITextServerExtensionFontSetGlyphTextureIdx #

interface ITextServerExtensionFontSetGlyphTextureIdx {
mut:
	font_set_glyph_texture_idx_(font_rid RID, size Vector2i, glyph i64, texture_idx i64)
}

interface ITextServerExtensionFontSetGlyphUvRect #

interface ITextServerExtensionFontSetGlyphUvRect {
mut:
	font_set_glyph_uv_rect_(font_rid RID, size Vector2i, glyph i64, uv_rect Rect2)
}

interface ITextServerExtensionFontSetHinting #

interface ITextServerExtensionFontSetHinting {
mut:
	font_set_hinting_(font_rid RID, hinting TextServerHinting)
}

interface ITextServerExtensionFontSetKeepRoundingRemainders #

interface ITextServerExtensionFontSetKeepRoundingRemainders {
mut:
	font_set_keep_rounding_remainders_(font_rid RID, keep_rounding_remainders bool)
}

interface ITextServerExtensionFontSetKerning #

interface ITextServerExtensionFontSetKerning {
mut:
	font_set_kerning_(font_rid RID, size i64, glyph_pair Vector2i, kerning Vector2)
}

interface ITextServerExtensionFontSetLanguageSupportOverride #

interface ITextServerExtensionFontSetLanguageSupportOverride {
mut:
	font_set_language_support_override_(font_rid RID, language String, supported bool)
}

interface ITextServerExtensionFontSetModulateColorGlyphs #

interface ITextServerExtensionFontSetModulateColorGlyphs {
mut:
	font_set_modulate_color_glyphs_(font_rid RID, modulate bool)
}

interface ITextServerExtensionFontSetMsdfPixelRange #

interface ITextServerExtensionFontSetMsdfPixelRange {
mut:
	font_set_msdf_pixel_range_(font_rid RID, msdf_pixel_range i64)
}

interface ITextServerExtensionFontSetMsdfSize #

interface ITextServerExtensionFontSetMsdfSize {
mut:
	font_set_msdf_size_(font_rid RID, msdf_size i64)
}

interface ITextServerExtensionFontSetMultichannelSignedDistanceField #

interface ITextServerExtensionFontSetMultichannelSignedDistanceField {
mut:
	font_set_multichannel_signed_distance_field_(font_rid RID, msdf bool)
}

interface ITextServerExtensionFontSetName #

interface ITextServerExtensionFontSetName {
mut:
	font_set_name_(font_rid RID, name String)
}

interface ITextServerExtensionFontSetOpentypeFeatureOverrides #

interface ITextServerExtensionFontSetOpentypeFeatureOverrides {
mut:
	font_set_opentype_feature_overrides_(font_rid RID, overrides Dictionary)
}

interface ITextServerExtensionFontSetOversampling #

interface ITextServerExtensionFontSetOversampling {
mut:
	font_set_oversampling_(font_rid RID, oversampling f64)
}

interface ITextServerExtensionFontSetScale #

interface ITextServerExtensionFontSetScale {
mut:
	font_set_scale_(font_rid RID, size i64, scale f64)
}

interface ITextServerExtensionFontSetScriptSupportOverride #

interface ITextServerExtensionFontSetScriptSupportOverride {
mut:
	font_set_script_support_override_(font_rid RID, script String, supported bool)
}

interface ITextServerExtensionFontSetSpacing #

interface ITextServerExtensionFontSetSpacing {
mut:
	font_set_spacing_(font_rid RID, spacing TextServerSpacingType, value i64)
}

interface ITextServerExtensionFontSetStretch #

interface ITextServerExtensionFontSetStretch {
mut:
	font_set_stretch_(font_rid RID, stretch i64)
}

interface ITextServerExtensionFontSetStyle #

interface ITextServerExtensionFontSetStyle {
mut:
	font_set_style_(font_rid RID, style TextServerFontStyle)
}

interface ITextServerExtensionFontSetStyleName #

interface ITextServerExtensionFontSetStyleName {
mut:
	font_set_style_name_(font_rid RID, name_style String)
}

interface ITextServerExtensionFontSetSubpixelPositioning #

interface ITextServerExtensionFontSetSubpixelPositioning {
mut:
	font_set_subpixel_positioning_(font_rid RID, subpixel_positioning TextServerSubpixelPositioning)
}

interface ITextServerExtensionFontSetTextureImage #

interface ITextServerExtensionFontSetTextureImage {
mut:
	font_set_texture_image_(font_rid RID, size Vector2i, texture_index i64, image Image)
}

interface ITextServerExtensionFontSetTextureOffsets #

interface ITextServerExtensionFontSetTextureOffsets {
mut:
	font_set_texture_offsets_(font_rid RID, size Vector2i, texture_index i64, offset PackedInt32Array)
}

interface ITextServerExtensionFontSetTransform #

interface ITextServerExtensionFontSetTransform {
mut:
	font_set_transform_(font_rid RID, transform Transform2D)
}

interface ITextServerExtensionFontSetUnderlinePosition #

interface ITextServerExtensionFontSetUnderlinePosition {
mut:
	font_set_underline_position_(font_rid RID, size i64, underline_position f64)
}

interface ITextServerExtensionFontSetUnderlineThickness #

interface ITextServerExtensionFontSetUnderlineThickness {
mut:
	font_set_underline_thickness_(font_rid RID, size i64, underline_thickness f64)
}

interface ITextServerExtensionFontSetVariationCoordinates #

interface ITextServerExtensionFontSetVariationCoordinates {
mut:
	font_set_variation_coordinates_(font_rid RID, variation_coordinates Dictionary)
}

interface ITextServerExtensionFontSetWeight #

interface ITextServerExtensionFontSetWeight {
mut:
	font_set_weight_(font_rid RID, weight i64)
}

interface ITextServerExtensionFontSupportedFeatureList #

interface ITextServerExtensionFontSupportedFeatureList {
mut:
	font_supported_feature_list_(font_rid RID) Dictionary
}

interface ITextServerExtensionFontSupportedVariationList #

interface ITextServerExtensionFontSupportedVariationList {
mut:
	font_supported_variation_list_(font_rid RID) Dictionary
}

interface ITextServerExtensionFormatNumber #

interface ITextServerExtensionFormatNumber {
mut:
	format_number_(number String, language String) String
}

interface ITextServerExtensionFreeRid #

interface ITextServerExtensionFreeRid {
mut:
	free_rid_(rid RID)
}

interface ITextServerExtensionGetFeatures #

interface ITextServerExtensionGetFeatures {
mut:
	get_features_() i64
}

interface ITextServerExtensionGetHexCodeBoxSize #

interface ITextServerExtensionGetHexCodeBoxSize {
mut:
	get_hex_code_box_size_(size i64, index i64) Vector2
}

interface ITextServerExtensionGetName #

interface ITextServerExtensionGetName {
mut:
	get_name_() String
}

interface ITextServerExtensionGetSupportData #

interface ITextServerExtensionGetSupportData {
mut:
	get_support_data_() PackedByteArray
}

interface ITextServerExtensionGetSupportDataFilename #

interface ITextServerExtensionGetSupportDataFilename {
mut:
	get_support_data_filename_() String
}

interface ITextServerExtensionGetSupportDataInfo #

interface ITextServerExtensionGetSupportDataInfo {
mut:
	get_support_data_info_() String
}

interface ITextServerExtensionHas #

interface ITextServerExtensionHas {
mut:
	has_(rid RID) bool
}

interface ITextServerExtensionHasFeature #

interface ITextServerExtensionHasFeature {
mut:
	has_feature_(feature TextServerFeature) bool
}

interface ITextServerExtensionIsConfusable #

interface ITextServerExtensionIsConfusable {
mut:
	is_confusable_(gd_string String, dict PackedStringArray) i64
}

interface ITextServerExtensionIsLocaleRightToLeft #

interface ITextServerExtensionIsLocaleRightToLeft {
mut:
	is_locale_right_to_left_(locale String) bool
}

interface ITextServerExtensionIsValidIdentifier #

interface ITextServerExtensionIsValidIdentifier {
mut:
	is_valid_identifier_(gd_string String) bool
}

interface ITextServerExtensionIsValidLetter #

interface ITextServerExtensionIsValidLetter {
mut:
	is_valid_letter_(unicode i64) bool
}

interface ITextServerExtensionLoadSupportData #

interface ITextServerExtensionLoadSupportData {
mut:
	load_support_data_(filename String) bool
}

interface ITextServerExtensionNameToTag #

interface ITextServerExtensionNameToTag {
mut:
	name_to_tag_(name String) i64
}

interface ITextServerExtensionParseNumber #

interface ITextServerExtensionParseNumber {
mut:
	parse_number_(number String, language String) String
}

interface ITextServerExtensionParseStructuredText #

interface ITextServerExtensionParseStructuredText {
mut:
	parse_structured_text_(parser_type TextServerStructuredTextParser, gd_args Array, text String) Array
}

interface ITextServerExtensionPercentSign #

interface ITextServerExtensionPercentSign {
mut:
	percent_sign_(language String) String
}

interface ITextServerExtensionReferenceOversamplingLevel #

interface ITextServerExtensionReferenceOversamplingLevel {
mut:
	reference_oversampling_level_(oversampling f64)
}

interface ITextServerExtensionSaveSupportData #

interface ITextServerExtensionSaveSupportData {
mut:
	save_support_data_(filename String) bool
}

interface ITextServerExtensionShapedGetRunCount #

interface ITextServerExtensionShapedGetRunCount {
mut:
	shaped_get_run_count_(shaped RID) i64
}

interface ITextServerExtensionShapedGetRunDirection #

interface ITextServerExtensionShapedGetRunDirection {
mut:
	shaped_get_run_direction_(shaped RID, index i64) TextServerDirection
}

interface ITextServerExtensionShapedGetRunFontRid #

interface ITextServerExtensionShapedGetRunFontRid {
mut:
	shaped_get_run_font_rid_(shaped RID, index i64) RID
}

interface ITextServerExtensionShapedGetRunFontSize #

interface ITextServerExtensionShapedGetRunFontSize {
mut:
	shaped_get_run_font_size_(shaped RID, index i64) i64
}

interface ITextServerExtensionShapedGetRunLanguage #

interface ITextServerExtensionShapedGetRunLanguage {
mut:
	shaped_get_run_language_(shaped RID, index i64) String
}

interface ITextServerExtensionShapedGetRunObject #

interface ITextServerExtensionShapedGetRunObject {
mut:
	shaped_get_run_object_(shaped RID, index i64) Variant
}

interface ITextServerExtensionShapedGetRunRange #

interface ITextServerExtensionShapedGetRunRange {
mut:
	shaped_get_run_range_(shaped RID, index i64) Vector2i
}

interface ITextServerExtensionShapedGetRunText #

interface ITextServerExtensionShapedGetRunText {
mut:
	shaped_get_run_text_(shaped RID, index i64) String
}

interface ITextServerExtensionShapedGetSpanCount #

interface ITextServerExtensionShapedGetSpanCount {
mut:
	shaped_get_span_count_(shaped RID) i64
}

interface ITextServerExtensionShapedGetSpanEmbeddedObject #

interface ITextServerExtensionShapedGetSpanEmbeddedObject {
mut:
	shaped_get_span_embedded_object_(shaped RID, index i64) Variant
}

interface ITextServerExtensionShapedGetSpanMeta #

interface ITextServerExtensionShapedGetSpanMeta {
mut:
	shaped_get_span_meta_(shaped RID, index i64) Variant
}

interface ITextServerExtensionShapedGetSpanObject #

interface ITextServerExtensionShapedGetSpanObject {
mut:
	shaped_get_span_object_(shaped RID, index i64) Variant
}

interface ITextServerExtensionShapedGetSpanText #

interface ITextServerExtensionShapedGetSpanText {
mut:
	shaped_get_span_text_(shaped RID, index i64) String
}

interface ITextServerExtensionShapedGetText #

interface ITextServerExtensionShapedGetText {
mut:
	shaped_get_text_(shaped RID) String
}

interface ITextServerExtensionShapedSetSpanUpdateFont #

interface ITextServerExtensionShapedSetSpanUpdateFont {
mut:
	shaped_set_span_update_font_(shaped RID, index i64, fonts Array, size i64, opentype_features Dictionary)
}

interface ITextServerExtensionShapedTextAddObject #

interface ITextServerExtensionShapedTextAddObject {
mut:
	shaped_text_add_object_(shaped RID, key Variant, size Vector2, inline_align InlineAlignment, length i64, baseline f64) bool
}

interface ITextServerExtensionShapedTextAddString #

interface ITextServerExtensionShapedTextAddString {
mut:
	shaped_text_add_string_(shaped RID, text String, fonts Array, size i64, opentype_features Dictionary, language String, meta Variant) bool
}

interface ITextServerExtensionShapedTextClear #

interface ITextServerExtensionShapedTextClear {
mut:
	shaped_text_clear_(shaped RID)
}

interface ITextServerExtensionShapedTextClosestCharacterPos #

interface ITextServerExtensionShapedTextClosestCharacterPos {
mut:
	shaped_text_closest_character_pos_(shaped RID, pos i64) i64
}

interface ITextServerExtensionShapedTextDraw #

interface ITextServerExtensionShapedTextDraw {
mut:
	shaped_text_draw_(shaped RID, canvas RID, pos Vector2, clip_l f64, clip_r f64, color Color, oversampling f64)
}

interface ITextServerExtensionShapedTextDrawOutline #

interface ITextServerExtensionShapedTextDrawOutline {
mut:
	shaped_text_draw_outline_(shaped RID, canvas RID, pos Vector2, clip_l f64, clip_r f64, outline_size i64, color Color, oversampling f64)
}

interface ITextServerExtensionShapedTextFitToWidth #

interface ITextServerExtensionShapedTextFitToWidth {
mut:
	shaped_text_fit_to_width_(shaped RID, width f64, justification_flags TextServerJustificationFlag) f64
}

interface ITextServerExtensionShapedTextGetAscent #

interface ITextServerExtensionShapedTextGetAscent {
mut:
	shaped_text_get_ascent_(shaped RID) f64
}

interface ITextServerExtensionShapedTextGetCarets #

interface ITextServerExtensionShapedTextGetCarets {
mut:
	shaped_text_get_carets_(shaped RID, position i64, caret &CaretInfo)
}

interface ITextServerExtensionShapedTextGetCharacterBreaks #

interface ITextServerExtensionShapedTextGetCharacterBreaks {
mut:
	shaped_text_get_character_breaks_(shaped RID) PackedInt32Array
}

interface ITextServerExtensionShapedTextGetCustomEllipsis #

interface ITextServerExtensionShapedTextGetCustomEllipsis {
mut:
	shaped_text_get_custom_ellipsis_(shaped RID) i64
}

interface ITextServerExtensionShapedTextGetCustomPunctuation #

interface ITextServerExtensionShapedTextGetCustomPunctuation {
mut:
	shaped_text_get_custom_punctuation_(shaped RID) String
}

interface ITextServerExtensionShapedTextGetDescent #

interface ITextServerExtensionShapedTextGetDescent {
mut:
	shaped_text_get_descent_(shaped RID) f64
}

interface ITextServerExtensionShapedTextGetDirection #

interface ITextServerExtensionShapedTextGetDirection {
mut:
	shaped_text_get_direction_(shaped RID) TextServerDirection
}

interface ITextServerExtensionShapedTextGetDominantDirectionInRange #

interface ITextServerExtensionShapedTextGetDominantDirectionInRange {
mut:
	shaped_text_get_dominant_direction_in_range_(shaped RID, start i64, end i64) i64
}

interface ITextServerExtensionShapedTextGetEllipsisGlyphCount #

interface ITextServerExtensionShapedTextGetEllipsisGlyphCount {
mut:
	shaped_text_get_ellipsis_glyph_count_(shaped RID) i64
}

interface ITextServerExtensionShapedTextGetEllipsisGlyphs #

interface ITextServerExtensionShapedTextGetEllipsisGlyphs {
mut:
	shaped_text_get_ellipsis_glyphs_(shaped RID) &Glyph
}

interface ITextServerExtensionShapedTextGetEllipsisPos #

interface ITextServerExtensionShapedTextGetEllipsisPos {
mut:
	shaped_text_get_ellipsis_pos_(shaped RID) i64
}

interface ITextServerExtensionShapedTextGetGlyphCount #

interface ITextServerExtensionShapedTextGetGlyphCount {
mut:
	shaped_text_get_glyph_count_(shaped RID) i64
}

interface ITextServerExtensionShapedTextGetGlyphs #

interface ITextServerExtensionShapedTextGetGlyphs {
mut:
	shaped_text_get_glyphs_(shaped RID) &Glyph
}

interface ITextServerExtensionShapedTextGetGraphemeBounds #

interface ITextServerExtensionShapedTextGetGraphemeBounds {
mut:
	shaped_text_get_grapheme_bounds_(shaped RID, pos i64) Vector2
}

interface ITextServerExtensionShapedTextGetInferredDirection #

interface ITextServerExtensionShapedTextGetInferredDirection {
mut:
	shaped_text_get_inferred_direction_(shaped RID) TextServerDirection
}

interface ITextServerExtensionShapedTextGetLineBreaks #

interface ITextServerExtensionShapedTextGetLineBreaks {
mut:
	shaped_text_get_line_breaks_(shaped RID, width f64, start i64, break_flags TextServerLineBreakFlag) PackedInt32Array
}

interface ITextServerExtensionShapedTextGetLineBreaksAdv #

interface ITextServerExtensionShapedTextGetLineBreaksAdv {
mut:
	shaped_text_get_line_breaks_adv_(shaped RID, width PackedFloat32Array, start i64, once bool, break_flags TextServerLineBreakFlag) PackedInt32Array
}

interface ITextServerExtensionShapedTextGetObjectGlyph #

interface ITextServerExtensionShapedTextGetObjectGlyph {
mut:
	shaped_text_get_object_glyph_(shaped RID, key Variant) i64
}

interface ITextServerExtensionShapedTextGetObjectRange #

interface ITextServerExtensionShapedTextGetObjectRange {
mut:
	shaped_text_get_object_range_(shaped RID, key Variant) Vector2i
}

interface ITextServerExtensionShapedTextGetObjectRect #

interface ITextServerExtensionShapedTextGetObjectRect {
mut:
	shaped_text_get_object_rect_(shaped RID, key Variant) Rect2
}

interface ITextServerExtensionShapedTextGetObjects #

interface ITextServerExtensionShapedTextGetObjects {
mut:
	shaped_text_get_objects_(shaped RID) Array
}

interface ITextServerExtensionShapedTextGetOrientation #

interface ITextServerExtensionShapedTextGetOrientation {
mut:
	shaped_text_get_orientation_(shaped RID) TextServerOrientation
}

interface ITextServerExtensionShapedTextGetParent #

interface ITextServerExtensionShapedTextGetParent {
mut:
	shaped_text_get_parent_(shaped RID) RID
}

interface ITextServerExtensionShapedTextGetPreserveControl #

interface ITextServerExtensionShapedTextGetPreserveControl {
mut:
	shaped_text_get_preserve_control_(shaped RID) bool
}

interface ITextServerExtensionShapedTextGetPreserveInvalid #

interface ITextServerExtensionShapedTextGetPreserveInvalid {
mut:
	shaped_text_get_preserve_invalid_(shaped RID) bool
}

interface ITextServerExtensionShapedTextGetRange #

interface ITextServerExtensionShapedTextGetRange {
mut:
	shaped_text_get_range_(shaped RID) Vector2i
}

interface ITextServerExtensionShapedTextGetSelection #

interface ITextServerExtensionShapedTextGetSelection {
mut:
	shaped_text_get_selection_(shaped RID, start i64, end i64) PackedVector2Array
}

interface ITextServerExtensionShapedTextGetSize #

interface ITextServerExtensionShapedTextGetSize {
mut:
	shaped_text_get_size_(shaped RID) Vector2
}

interface ITextServerExtensionShapedTextGetSpacing #

interface ITextServerExtensionShapedTextGetSpacing {
mut:
	shaped_text_get_spacing_(shaped RID, spacing TextServerSpacingType) i64
}

interface ITextServerExtensionShapedTextGetTrimPos #

interface ITextServerExtensionShapedTextGetTrimPos {
mut:
	shaped_text_get_trim_pos_(shaped RID) i64
}

interface ITextServerExtensionShapedTextGetUnderlinePosition #

interface ITextServerExtensionShapedTextGetUnderlinePosition {
mut:
	shaped_text_get_underline_position_(shaped RID) f64
}

interface ITextServerExtensionShapedTextGetUnderlineThickness #

interface ITextServerExtensionShapedTextGetUnderlineThickness {
mut:
	shaped_text_get_underline_thickness_(shaped RID) f64
}

interface ITextServerExtensionShapedTextGetWidth #

interface ITextServerExtensionShapedTextGetWidth {
mut:
	shaped_text_get_width_(shaped RID) f64
}

interface ITextServerExtensionShapedTextGetWordBreaks #

interface ITextServerExtensionShapedTextGetWordBreaks {
mut:
	shaped_text_get_word_breaks_(shaped RID, grapheme_flags TextServerGraphemeFlag, skip_grapheme_flags TextServerGraphemeFlag) PackedInt32Array
}

interface ITextServerExtensionShapedTextHitTestGrapheme #

interface ITextServerExtensionShapedTextHitTestGrapheme {
mut:
	shaped_text_hit_test_grapheme_(shaped RID, coord f64) i64
}

interface ITextServerExtensionShapedTextHitTestPosition #

interface ITextServerExtensionShapedTextHitTestPosition {
mut:
	shaped_text_hit_test_position_(shaped RID, coord f64) i64
}

interface ITextServerExtensionShapedTextIsReady #

interface ITextServerExtensionShapedTextIsReady {
mut:
	shaped_text_is_ready_(shaped RID) bool
}

interface ITextServerExtensionShapedTextNextCharacterPos #

interface ITextServerExtensionShapedTextNextCharacterPos {
mut:
	shaped_text_next_character_pos_(shaped RID, pos i64) i64
}

interface ITextServerExtensionShapedTextNextGraphemePos #

interface ITextServerExtensionShapedTextNextGraphemePos {
mut:
	shaped_text_next_grapheme_pos_(shaped RID, pos i64) i64
}

interface ITextServerExtensionShapedTextOverrunTrimToWidth #

interface ITextServerExtensionShapedTextOverrunTrimToWidth {
mut:
	shaped_text_overrun_trim_to_width_(shaped RID, width f64, trim_flags TextServerTextOverrunFlag)
}

interface ITextServerExtensionShapedTextPrevCharacterPos #

interface ITextServerExtensionShapedTextPrevCharacterPos {
mut:
	shaped_text_prev_character_pos_(shaped RID, pos i64) i64
}

interface ITextServerExtensionShapedTextPrevGraphemePos #

interface ITextServerExtensionShapedTextPrevGraphemePos {
mut:
	shaped_text_prev_grapheme_pos_(shaped RID, pos i64) i64
}

interface ITextServerExtensionShapedTextResizeObject #

interface ITextServerExtensionShapedTextResizeObject {
mut:
	shaped_text_resize_object_(shaped RID, key Variant, size Vector2, inline_align InlineAlignment, baseline f64) bool
}

interface ITextServerExtensionShapedTextSetBidiOverride #

interface ITextServerExtensionShapedTextSetBidiOverride {
mut:
	shaped_text_set_bidi_override_(shaped RID, override Array)
}

interface ITextServerExtensionShapedTextSetCustomEllipsis #

interface ITextServerExtensionShapedTextSetCustomEllipsis {
mut:
	shaped_text_set_custom_ellipsis_(shaped RID, gd_char i64)
}

interface ITextServerExtensionShapedTextSetCustomPunctuation #

interface ITextServerExtensionShapedTextSetCustomPunctuation {
mut:
	shaped_text_set_custom_punctuation_(shaped RID, punct String)
}

interface ITextServerExtensionShapedTextSetDirection #

interface ITextServerExtensionShapedTextSetDirection {
mut:
	shaped_text_set_direction_(shaped RID, direction TextServerDirection)
}

interface ITextServerExtensionShapedTextSetOrientation #

interface ITextServerExtensionShapedTextSetOrientation {
mut:
	shaped_text_set_orientation_(shaped RID, orientation TextServerOrientation)
}

interface ITextServerExtensionShapedTextSetPreserveControl #

interface ITextServerExtensionShapedTextSetPreserveControl {
mut:
	shaped_text_set_preserve_control_(shaped RID, enabled bool)
}

interface ITextServerExtensionShapedTextSetPreserveInvalid #

interface ITextServerExtensionShapedTextSetPreserveInvalid {
mut:
	shaped_text_set_preserve_invalid_(shaped RID, enabled bool)
}

interface ITextServerExtensionShapedTextSetSpacing #

interface ITextServerExtensionShapedTextSetSpacing {
mut:
	shaped_text_set_spacing_(shaped RID, spacing TextServerSpacingType, value i64)
}

interface ITextServerExtensionShapedTextShape #

interface ITextServerExtensionShapedTextShape {
mut:
	shaped_text_shape_(shaped RID) bool
}

interface ITextServerExtensionShapedTextSortLogical #

interface ITextServerExtensionShapedTextSortLogical {
mut:
	shaped_text_sort_logical_(shaped RID) &Glyph
}

interface ITextServerExtensionShapedTextSubstr #

interface ITextServerExtensionShapedTextSubstr {
mut:
	shaped_text_substr_(shaped RID, start i64, length i64) RID
}

interface ITextServerExtensionShapedTextTabAlign #

interface ITextServerExtensionShapedTextTabAlign {
mut:
	shaped_text_tab_align_(shaped RID, tab_stops PackedFloat32Array) f64
}

interface ITextServerExtensionShapedTextUpdateBreaks #

interface ITextServerExtensionShapedTextUpdateBreaks {
mut:
	shaped_text_update_breaks_(shaped RID) bool
}

interface ITextServerExtensionShapedTextUpdateJustificationOps #

interface ITextServerExtensionShapedTextUpdateJustificationOps {
mut:
	shaped_text_update_justification_ops_(shaped RID) bool
}

interface ITextServerExtensionSpoofCheck #

interface ITextServerExtensionSpoofCheck {
mut:
	spoof_check_(gd_string String) bool
}

interface ITextServerExtensionStringGetCharacterBreaks #

interface ITextServerExtensionStringGetCharacterBreaks {
mut:
	string_get_character_breaks_(gd_string String, language String) PackedInt32Array
}

interface ITextServerExtensionStringGetWordBreaks #

interface ITextServerExtensionStringGetWordBreaks {
mut:
	string_get_word_breaks_(gd_string String, language String, chars_per_line i64) PackedInt32Array
}

interface ITextServerExtensionStringToLower #

interface ITextServerExtensionStringToLower {
mut:
	string_to_lower_(gd_string String, language String) String
}

interface ITextServerExtensionStringToTitle #

interface ITextServerExtensionStringToTitle {
mut:
	string_to_title_(gd_string String, language String) String
}

interface ITextServerExtensionStringToUpper #

interface ITextServerExtensionStringToUpper {
mut:
	string_to_upper_(gd_string String, language String) String
}

interface ITextServerExtensionStripDiacritics #

interface ITextServerExtensionStripDiacritics {
mut:
	strip_diacritics_(gd_string String) String
}

interface ITextServerExtensionTagToName #

interface ITextServerExtensionTagToName {
mut:
	tag_to_name_(tag i64) String
}

interface ITextServerExtensionUnreferenceOversamplingLevel #

interface ITextServerExtensionUnreferenceOversamplingLevel {
mut:
	unreference_oversampling_level_(oversampling f64)
}

interface ITexture2DDraw #

interface ITexture2DDraw {
mut:
	draw_(to_canvas_item RID, pos Vector2, modulate Color, transpose bool)
}

interface ITexture2DDrawRect #

interface ITexture2DDrawRect {
mut:
	draw_rect_(to_canvas_item RID, rect Rect2, tile bool, modulate Color, transpose bool)
}

interface ITexture2DDrawRectRegion #

interface ITexture2DDrawRectRegion {
mut:
	draw_rect_region_(to_canvas_item RID, rect Rect2, src_rect Rect2, modulate Color, transpose bool, clip_uv bool)
}

interface ITexture2DGetHeight #

interface ITexture2DGetHeight {
mut:
	get_height_() i64
}

interface ITexture2DGetWidth #

interface ITexture2DGetWidth {
mut:
	get_width_() i64
}

interface ITexture2DHasAlpha #

interface ITexture2DHasAlpha {
mut:
	has_alpha_() bool
}

interface ITexture2DIsPixelOpaque #

interface ITexture2DIsPixelOpaque {
mut:
	is_pixel_opaque_(x i64, y i64) bool
}

interface ITexture3DGetData #

interface ITexture3DGetData {
mut:
	get_data_() Array
}

interface ITexture3DGetDepth #

interface ITexture3DGetDepth {
mut:
	get_depth_() i64
}

interface ITexture3DGetFormat #

interface ITexture3DGetFormat {
mut:
	get_format_() ImageFormat
}

interface ITexture3DGetHeight #

interface ITexture3DGetHeight {
mut:
	get_height_() i64
}

interface ITexture3DGetWidth #

interface ITexture3DGetWidth {
mut:
	get_width_() i64
}

interface ITexture3DHasMipmaps #

interface ITexture3DHasMipmaps {
mut:
	has_mipmaps_() bool
}

interface ITextureLayeredGetFormat #

interface ITextureLayeredGetFormat {
mut:
	get_format_() ImageFormat
}

interface ITextureLayeredGetHeight #

interface ITextureLayeredGetHeight {
mut:
	get_height_() i64
}

interface ITextureLayeredGetLayerData #

interface ITextureLayeredGetLayerData {
mut:
	get_layer_data_(layer_index i64) Image
}

interface ITextureLayeredGetLayeredType #

interface ITextureLayeredGetLayeredType {
mut:
	get_layered_type_() i64
}

interface ITextureLayeredGetLayers #

interface ITextureLayeredGetLayers {
mut:
	get_layers_() i64
}

interface ITextureLayeredGetWidth #

interface ITextureLayeredGetWidth {
mut:
	get_width_() i64
}

interface ITextureLayeredHasMipmaps #

interface ITextureLayeredHasMipmaps {
mut:
	has_mipmaps_() bool
}

interface ITileMapLayerTileDataRuntimeUpdate #

interface ITileMapLayerTileDataRuntimeUpdate {
mut:
	tile_data_runtime_update_(coords Vector2i, tile_data TileData)
}

interface ITileMapLayerUpdateCells #

interface ITileMapLayerUpdateCells {
mut:
	update_cells_(coords Array, forced_cleanup bool)
}

interface ITileMapLayerUseTileDataRuntimeUpdate #

interface ITileMapLayerUseTileDataRuntimeUpdate {
mut:
	use_tile_data_runtime_update_(coords Vector2i) bool
}

interface ITileMapTileDataRuntimeUpdate #

interface ITileMapTileDataRuntimeUpdate {
mut:
	tile_data_runtime_update_(layer i64, coords Vector2i, tile_data TileData)
}

interface ITileMapUseTileDataRuntimeUpdate #

interface ITileMapUseTileDataRuntimeUpdate {
mut:
	use_tile_data_runtime_update_(layer i64, coords Vector2i) bool
}

interface ITranslationGetMessage #

interface ITranslationGetMessage {
mut:
	get_message_(src_message StringName, context StringName) StringName
}

interface ITranslationGetPluralMessage #

interface ITranslationGetPluralMessage {
mut:
	get_plural_message_(src_message StringName, src_plural_message StringName, n i64, context StringName) StringName
}

interface IVideoStreamInstantiatePlayback #

interface IVideoStreamInstantiatePlayback {
mut:
	instantiate_playback_() VideoStreamPlayback
}

interface IVideoStreamPlaybackGetChannels #

interface IVideoStreamPlaybackGetChannels {
mut:
	get_channels_() i64
}

interface IVideoStreamPlaybackGetLength #

interface IVideoStreamPlaybackGetLength {
mut:
	get_length_() f64
}

interface IVideoStreamPlaybackGetMixRate #

interface IVideoStreamPlaybackGetMixRate {
mut:
	get_mix_rate_() i64
}

interface IVideoStreamPlaybackGetPlaybackPosition #

interface IVideoStreamPlaybackGetPlaybackPosition {
mut:
	get_playback_position_() f64
}

interface IVideoStreamPlaybackGetTexture #

interface IVideoStreamPlaybackGetTexture {
mut:
	get_texture_() Texture2D
}

interface IVideoStreamPlaybackIsPaused #

interface IVideoStreamPlaybackIsPaused {
mut:
	is_paused_() bool
}

interface IVideoStreamPlaybackIsPlaying #

interface IVideoStreamPlaybackIsPlaying {
mut:
	is_playing_() bool
}

interface IVideoStreamPlaybackPlay #

interface IVideoStreamPlaybackPlay {
mut:
	play_()
}

interface IVideoStreamPlaybackSeek #

interface IVideoStreamPlaybackSeek {
mut:
	seek_(time f64)
}

interface IVideoStreamPlaybackSetAudioTrack #

interface IVideoStreamPlaybackSetAudioTrack {
mut:
	set_audio_track_(idx i64)
}

interface IVideoStreamPlaybackSetPaused #

interface IVideoStreamPlaybackSetPaused {
mut:
	set_paused_(paused bool)
}

interface IVideoStreamPlaybackStop #

interface IVideoStreamPlaybackStop {
mut:
	stop_()
}

interface IVideoStreamPlaybackUpdate #

interface IVideoStreamPlaybackUpdate {
mut:
	update_(delta f64)
}

interface IVisualInstance3DGetAabb #

interface IVisualInstance3DGetAabb {
mut:
	get_aabb_() AABB
}

interface IVisualShaderNodeCustomGetCategory #

interface IVisualShaderNodeCustomGetCategory {
mut:
	get_category_() String
}

interface IVisualShaderNodeCustomGetCode #

interface IVisualShaderNodeCustomGetCode {
mut:
	get_code_(input_vars Array, output_vars Array, mode ShaderMode, gd_type VisualShaderType) String
}

interface IVisualShaderNodeCustomGetDefaultInputPort #

interface IVisualShaderNodeCustomGetDefaultInputPort {
mut:
	get_default_input_port_(gd_type VisualShaderNodePortType) i64
}

interface IVisualShaderNodeCustomGetDescription #

interface IVisualShaderNodeCustomGetDescription {
mut:
	get_description_() String
}

interface IVisualShaderNodeCustomGetFuncCode #

interface IVisualShaderNodeCustomGetFuncCode {
mut:
	get_func_code_(mode ShaderMode, gd_type VisualShaderType) String
}

interface IVisualShaderNodeCustomGetGlobalCode #

interface IVisualShaderNodeCustomGetGlobalCode {
mut:
	get_global_code_(mode ShaderMode) String
}

interface IVisualShaderNodeCustomGetInputPortCount #

interface IVisualShaderNodeCustomGetInputPortCount {
mut:
	get_input_port_count_() i64
}

interface IVisualShaderNodeCustomGetInputPortDefaultValue #

interface IVisualShaderNodeCustomGetInputPortDefaultValue {
mut:
	get_input_port_default_value_(port i64) Variant
}

interface IVisualShaderNodeCustomGetInputPortName #

interface IVisualShaderNodeCustomGetInputPortName {
mut:
	get_input_port_name_(port i64) String
}

interface IVisualShaderNodeCustomGetInputPortType #

interface IVisualShaderNodeCustomGetInputPortType {
mut:
	get_input_port_type_(port i64) VisualShaderNodePortType
}

interface IVisualShaderNodeCustomGetName #

interface IVisualShaderNodeCustomGetName {
mut:
	get_name_() String
}

interface IVisualShaderNodeCustomGetOutputPortCount #

interface IVisualShaderNodeCustomGetOutputPortCount {
mut:
	get_output_port_count_() i64
}

interface IVisualShaderNodeCustomGetOutputPortName #

interface IVisualShaderNodeCustomGetOutputPortName {
mut:
	get_output_port_name_(port i64) String
}

interface IVisualShaderNodeCustomGetOutputPortType #

interface IVisualShaderNodeCustomGetOutputPortType {
mut:
	get_output_port_type_(port i64) VisualShaderNodePortType
}

interface IVisualShaderNodeCustomGetPropertyCount #

interface IVisualShaderNodeCustomGetPropertyCount {
mut:
	get_property_count_() i64
}

interface IVisualShaderNodeCustomGetPropertyDefaultIndex #

interface IVisualShaderNodeCustomGetPropertyDefaultIndex {
mut:
	get_property_default_index_(index i64) i64
}

interface IVisualShaderNodeCustomGetPropertyName #

interface IVisualShaderNodeCustomGetPropertyName {
mut:
	get_property_name_(index i64) String
}

interface IVisualShaderNodeCustomGetPropertyOptions #

interface IVisualShaderNodeCustomGetPropertyOptions {
mut:
	get_property_options_(index i64) PackedStringArray
}

interface IVisualShaderNodeCustomGetReturnIconType #

interface IVisualShaderNodeCustomGetReturnIconType {
mut:
	get_return_icon_type_() VisualShaderNodePortType
}

interface IVisualShaderNodeCustomIsAvailable #

interface IVisualShaderNodeCustomIsAvailable {
mut:
	is_available_(mode ShaderMode, gd_type VisualShaderType) bool
}

interface IVisualShaderNodeCustomIsHighend #

interface IVisualShaderNodeCustomIsHighend {
mut:
	is_highend_() bool
}

interface IWebRTCDataChannelExtensionClose #

interface IWebRTCDataChannelExtensionClose {
mut:
	close_()
}

interface IWebRTCDataChannelExtensionGetAvailablePacketCount #

interface IWebRTCDataChannelExtensionGetAvailablePacketCount {
mut:
	get_available_packet_count_() i64
}

interface IWebRTCDataChannelExtensionGetBufferedAmount #

interface IWebRTCDataChannelExtensionGetBufferedAmount {
mut:
	get_buffered_amount_() i64
}

interface IWebRTCDataChannelExtensionGetId #

interface IWebRTCDataChannelExtensionGetId {
mut:
	get_id_() i64
}

interface IWebRTCDataChannelExtensionGetLabel #

interface IWebRTCDataChannelExtensionGetLabel {
mut:
	get_label_() String
}

interface IWebRTCDataChannelExtensionGetMaxPacketLifeTime #

interface IWebRTCDataChannelExtensionGetMaxPacketLifeTime {
mut:
	get_max_packet_life_time_() i64
}

interface IWebRTCDataChannelExtensionGetMaxPacketSize #

interface IWebRTCDataChannelExtensionGetMaxPacketSize {
mut:
	get_max_packet_size_() i64
}

interface IWebRTCDataChannelExtensionGetMaxRetransmits #

interface IWebRTCDataChannelExtensionGetMaxRetransmits {
mut:
	get_max_retransmits_() i64
}

interface IWebRTCDataChannelExtensionGetPacket #

interface IWebRTCDataChannelExtensionGetPacket {
mut:
	get_packet_(r_buffer &&u8, r_buffer_size &i32) GDError
}

interface IWebRTCDataChannelExtensionGetProtocol #

interface IWebRTCDataChannelExtensionGetProtocol {
mut:
	get_protocol_() String
}

interface IWebRTCDataChannelExtensionGetReadyState #

interface IWebRTCDataChannelExtensionGetReadyState {
mut:
	get_ready_state_() WebRTCDataChannelChannelState
}

interface IWebRTCDataChannelExtensionGetWriteMode #

interface IWebRTCDataChannelExtensionGetWriteMode {
mut:
	get_write_mode_() WebRTCDataChannelWriteMode
}

interface IWebRTCDataChannelExtensionIsNegotiated #

interface IWebRTCDataChannelExtensionIsNegotiated {
mut:
	is_negotiated_() bool
}

interface IWebRTCDataChannelExtensionIsOrdered #

interface IWebRTCDataChannelExtensionIsOrdered {
mut:
	is_ordered_() bool
}

interface IWebRTCDataChannelExtensionPoll #

interface IWebRTCDataChannelExtensionPoll {
mut:
	poll_() GDError
}

interface IWebRTCDataChannelExtensionPutPacket #

interface IWebRTCDataChannelExtensionPutPacket {
mut:
	put_packet_(p_buffer &u8, p_buffer_size i64) GDError
}

interface IWebRTCDataChannelExtensionSetWriteMode #

interface IWebRTCDataChannelExtensionSetWriteMode {
mut:
	set_write_mode_(p_write_mode WebRTCDataChannelWriteMode)
}

interface IWebRTCDataChannelExtensionWasStringPacket #

interface IWebRTCDataChannelExtensionWasStringPacket {
mut:
	was_string_packet_() bool
}

interface IWebRTCPeerConnectionExtensionAddIceCandidate #

interface IWebRTCPeerConnectionExtensionAddIceCandidate {
mut:
	add_ice_candidate_(p_sdp_mid_name String, p_sdp_mline_index i64, p_sdp_name String) GDError
}

interface IWebRTCPeerConnectionExtensionClose #

interface IWebRTCPeerConnectionExtensionClose {
mut:
	close_()
}

interface IWebRTCPeerConnectionExtensionCreateDataChannel #

interface IWebRTCPeerConnectionExtensionCreateDataChannel {
mut:
	create_data_channel_(p_label String, p_config Dictionary) WebRTCDataChannel
}

interface IWebRTCPeerConnectionExtensionCreateOffer #

interface IWebRTCPeerConnectionExtensionCreateOffer {
mut:
	create_offer_() GDError
}

interface IWebRTCPeerConnectionExtensionGetConnectionState #

interface IWebRTCPeerConnectionExtensionGetConnectionState {
mut:
	get_connection_state_() WebRTCPeerConnectionConnectionState
}

interface IWebRTCPeerConnectionExtensionGetGatheringState #

interface IWebRTCPeerConnectionExtensionGetGatheringState {
mut:
	get_gathering_state_() WebRTCPeerConnectionGatheringState
}

interface IWebRTCPeerConnectionExtensionGetSignalingState #

interface IWebRTCPeerConnectionExtensionGetSignalingState {
mut:
	get_signaling_state_() WebRTCPeerConnectionSignalingState
}

interface IWebRTCPeerConnectionExtensionInitialize #

interface IWebRTCPeerConnectionExtensionInitialize {
mut:
	initialize_(p_config Dictionary) GDError
}

interface IWebRTCPeerConnectionExtensionPoll #

interface IWebRTCPeerConnectionExtensionPoll {
mut:
	poll_() GDError
}

interface IWebRTCPeerConnectionExtensionSetLocalDescription #

interface IWebRTCPeerConnectionExtensionSetLocalDescription {
mut:
	set_local_description_(p_type String, p_sdp String) GDError
}

interface IWebRTCPeerConnectionExtensionSetRemoteDescription #

interface IWebRTCPeerConnectionExtensionSetRemoteDescription {
mut:
	set_remote_description_(p_type String, p_sdp String) GDError
}

interface IWindowGetContentsMinimumSize #

interface IWindowGetContentsMinimumSize {
mut:
	get_contents_minimum_size_() Vector2
}

interface IXRInterfaceExtensionEndFrame #

interface IXRInterfaceExtensionEndFrame {
mut:
	end_frame_()
}

interface IXRInterfaceExtensionGetAnchorDetectionIsEnabled #

interface IXRInterfaceExtensionGetAnchorDetectionIsEnabled {
mut:
	get_anchor_detection_is_enabled_() bool
}

interface IXRInterfaceExtensionGetCameraFeedId #

interface IXRInterfaceExtensionGetCameraFeedId {
mut:
	get_camera_feed_id_() i64
}

interface IXRInterfaceExtensionGetCameraTransform #

interface IXRInterfaceExtensionGetCameraTransform {
mut:
	get_camera_transform_() Transform3D
}

interface IXRInterfaceExtensionGetCapabilities #

interface IXRInterfaceExtensionGetCapabilities {
mut:
	get_capabilities_() i64
}

interface IXRInterfaceExtensionGetColorTexture #

interface IXRInterfaceExtensionGetColorTexture {
mut:
	get_color_texture_() RID
}

interface IXRInterfaceExtensionGetDepthTexture #

interface IXRInterfaceExtensionGetDepthTexture {
mut:
	get_depth_texture_() RID
}

interface IXRInterfaceExtensionGetName #

interface IXRInterfaceExtensionGetName {
mut:
	get_name_() StringName
}

interface IXRInterfaceExtensionGetPlayArea #

interface IXRInterfaceExtensionGetPlayArea {
mut:
	get_play_area_() PackedVector3Array
}

interface IXRInterfaceExtensionGetPlayAreaMode #

interface IXRInterfaceExtensionGetPlayAreaMode {
mut:
	get_play_area_mode_() XRInterfacePlayAreaMode
}

interface IXRInterfaceExtensionGetProjectionForView #

interface IXRInterfaceExtensionGetProjectionForView {
mut:
	get_projection_for_view_(view i64, aspect f64, z_near f64, z_far f64) PackedFloat64Array
}

interface IXRInterfaceExtensionGetRenderTargetSize #

interface IXRInterfaceExtensionGetRenderTargetSize {
mut:
	get_render_target_size_() Vector2
}

interface IXRInterfaceExtensionGetSuggestedPoseNames #

interface IXRInterfaceExtensionGetSuggestedPoseNames {
mut:
	get_suggested_pose_names_(tracker_name StringName) PackedStringArray
}

interface IXRInterfaceExtensionGetSuggestedTrackerNames #

interface IXRInterfaceExtensionGetSuggestedTrackerNames {
mut:
	get_suggested_tracker_names_() PackedStringArray
}

interface IXRInterfaceExtensionGetSystemInfo #

interface IXRInterfaceExtensionGetSystemInfo {
mut:
	get_system_info_() Dictionary
}

interface IXRInterfaceExtensionGetTrackingStatus #

interface IXRInterfaceExtensionGetTrackingStatus {
mut:
	get_tracking_status_() XRInterfaceTrackingStatus
}

interface IXRInterfaceExtensionGetTransformForView #

interface IXRInterfaceExtensionGetTransformForView {
mut:
	get_transform_for_view_(view i64, cam_transform Transform3D) Transform3D
}

interface IXRInterfaceExtensionGetVelocityTexture #

interface IXRInterfaceExtensionGetVelocityTexture {
mut:
	get_velocity_texture_() RID
}

interface IXRInterfaceExtensionGetViewCount #

interface IXRInterfaceExtensionGetViewCount {
mut:
	get_view_count_() i64
}

interface IXRInterfaceExtensionGetVrsTexture #

interface IXRInterfaceExtensionGetVrsTexture {
mut:
	get_vrs_texture_() RID
}

interface IXRInterfaceExtensionGetVrsTextureFormat #

interface IXRInterfaceExtensionGetVrsTextureFormat {
mut:
	get_vrs_texture_format_() XRInterfaceVRSTextureFormat
}

interface IXRInterfaceExtensionInitialize #

interface IXRInterfaceExtensionInitialize {
mut:
	initialize_() bool
}

interface IXRInterfaceExtensionIsInitialized #

interface IXRInterfaceExtensionIsInitialized {
mut:
	is_initialized_() bool
}

interface IXRInterfaceExtensionPostDrawViewport #

interface IXRInterfaceExtensionPostDrawViewport {
mut:
	post_draw_viewport_(render_target RID, screen_rect Rect2)
}

interface IXRInterfaceExtensionPreDrawViewport #

interface IXRInterfaceExtensionPreDrawViewport {
mut:
	pre_draw_viewport_(render_target RID) bool
}

interface IXRInterfaceExtensionPreRender #

interface IXRInterfaceExtensionPreRender {
mut:
	pre_render_()
}

interface IXRInterfaceExtensionProcess #

interface IXRInterfaceExtensionProcess {
mut:
	process_()
}

interface IXRInterfaceExtensionSetAnchorDetectionIsEnabled #

interface IXRInterfaceExtensionSetAnchorDetectionIsEnabled {
mut:
	set_anchor_detection_is_enabled_(enabled bool)
}

interface IXRInterfaceExtensionSetPlayAreaMode #

interface IXRInterfaceExtensionSetPlayAreaMode {
mut:
	set_play_area_mode_(mode XRInterfacePlayAreaMode) bool
}

interface IXRInterfaceExtensionSupportsPlayAreaMode #

interface IXRInterfaceExtensionSupportsPlayAreaMode {
mut:
	supports_play_area_mode_(mode XRInterfacePlayAreaMode) bool
}

interface IXRInterfaceExtensionTriggerHapticPulse #

interface IXRInterfaceExtensionTriggerHapticPulse {
mut:
	trigger_haptic_pulse_(action_name String, tracker_name StringName, frequency f64, amplitude f64, duration_sec f64, delay_sec f64)
}

interface IXRInterfaceExtensionUninitialize #

interface IXRInterfaceExtensionUninitialize {
mut:
	uninitialize_()
}

interface Stringy #

interface Stringy {
	str() string
}

interface ToVariant #

interface ToVariant {
	to_variant() Variant
}

type Bool #

type Bool = bool

fn (Bool) to_variant #

fn (s Bool) to_variant() Variant

type Float #

type Float = f64

fn (Float) to_variant #

fn (s Float) to_variant() Variant

type GDExtensionBool #

type GDExtensionBool = u8

type GDExtensionClassCallVirtual #

type GDExtensionClassCallVirtual = fn (GDExtensionClassInstancePtr, &GDExtensionConstTypePtr, GDExtensionTypePtr)

type GDExtensionClassCallVirtualWithData #

type GDExtensionClassCallVirtualWithData = fn (GDExtensionClassInstancePtr, &StringName, voidptr, &GDExtensionConstTypePtr, GDExtensionTypePtr)

type GDExtensionClassConstructor #

type GDExtensionClassConstructor = fn () &Object

type GDExtensionClassCreateInstance #

type GDExtensionClassCreateInstance = fn (voidptr) &Object

type GDExtensionClassCreateInstance2 #

type GDExtensionClassCreateInstance2 = fn (voidptr, &GDExtensionBool) &Object

type GDExtensionClassFreeInstance #

type GDExtensionClassFreeInstance = fn (voidptr, GDExtensionClassInstancePtr)

type GDExtensionClassFreePropertyList #

type GDExtensionClassFreePropertyList = fn (GDExtensionClassInstancePtr, &GDExtensionPropertyInfo)

type GDExtensionClassGet #

type GDExtensionClassGet = fn (GDExtensionClassInstancePtr, &StringName, &Variant) GDExtensionBool

type GDExtensionClassGetPropertyList #

type GDExtensionClassGetPropertyList = fn (GDExtensionClassInstancePtr, &u32) &GDExtensionPropertyInfo

type GDExtensionClassGetRID #

type GDExtensionClassGetRID = fn (GDExtensionClassInstancePtr) u64

type GDExtensionClassGetVirtual #

type GDExtensionClassGetVirtual = fn (voidptr, &StringName) GDExtensionClassCallVirtual

type GDExtensionClassGetVirtual2 #

type GDExtensionClassGetVirtual2 = fn (voidptr, &StringName, int) GDExtensionClassCallVirtual

type GDExtensionClassGetVirtualCallData #

type GDExtensionClassGetVirtualCallData = fn (voidptr, &StringName)

type GDExtensionClassGetVirtualCallData2 #

type GDExtensionClassGetVirtualCallData2 = fn (voidptr, &StringName, int)

type GDExtensionClassInstancePtr #

type GDExtensionClassInstancePtr = voidptr

type GDExtensionClassLibraryPtr #

type GDExtensionClassLibraryPtr = voidptr

type GDExtensionClassMethodCall #

type GDExtensionClassMethodCall = fn (voidptr, GDExtensionClassInstancePtr, &&Variant, GDExtensionInt, &Variant, &GDExtensionCallError)

type GDExtensionClassMethodPtrCall #

type GDExtensionClassMethodPtrCall = fn (voidptr, GDExtensionClassInstancePtr, &GDExtensionConstTypePtr, GDExtensionTypePtr)

type GDExtensionClassMethodValidatedCall #

type GDExtensionClassMethodValidatedCall = fn (voidptr, GDExtensionClassInstancePtr, &&Variant, &Variant)

type GDExtensionClassNotification #

type GDExtensionClassNotification = fn (GDExtensionClassInstancePtr, int)

type GDExtensionClassNotification2 #

type GDExtensionClassNotification2 = fn (GDExtensionClassInstancePtr, int, &GDExtensionBool)

type GDExtensionClassPropertyCanRevert #

type GDExtensionClassPropertyCanRevert = fn (GDExtensionClassInstancePtr, &StringName) GDExtensionBool

type GDExtensionClassPropertyGetRevert #

type GDExtensionClassPropertyGetRevert = fn (GDExtensionClassInstancePtr, &StringName, &Variant) GDExtensionBool

type GDExtensionClassRecreateInstance #

type GDExtensionClassRecreateInstance = fn (voidptr, &Object) GDExtensionClassInstancePtr

type GDExtensionClassReference #

type GDExtensionClassReference = fn (GDExtensionClassInstancePtr)

type GDExtensionClassSet #

type GDExtensionClassSet = fn (GDExtensionClassInstancePtr, &StringName, &Variant) GDExtensionBool

type GDExtensionClassToString #

type GDExtensionClassToString = fn (GDExtensionClassInstancePtr, &GDExtensionBool, &String)

type GDExtensionClassUnreference #

type GDExtensionClassUnreference = fn (GDExtensionClassInstancePtr)

type GDExtensionClassValidateProperty #

type GDExtensionClassValidateProperty = fn (GDExtensionClassInstancePtr, &GDExtensionPropertyInfo) GDExtensionBool

type GDExtensionConstRefPtr #

type GDExtensionConstRefPtr = voidptr

type GDExtensionConstStringPtr #

type GDExtensionConstStringPtr = voidptr

type GDExtensionConstTypePtr #

type GDExtensionConstTypePtr = voidptr

type GDExtensionInitFn #

type GDExtensionInitFn = fn (voidptr, GDExtensionInitializationLevel)

type GDExtensionInitializationFunction #

type GDExtensionInitializationFunction = fn (GDExtensionInterfaceGetProcAddress, GDExtensionClassLibraryPtr, &GDExtensionInitialization) GDExtensionBool

type GDExtensionInstanceBindingCreateCallback #

type GDExtensionInstanceBindingCreateCallback = fn (voidptr, voidptr) voidptr

type GDExtensionInstanceBindingFreeCallback #

type GDExtensionInstanceBindingFreeCallback = fn (voidptr, voidptr, voidptr)

type GDExtensionInstanceBindingReferenceCallback #

type GDExtensionInstanceBindingReferenceCallback = fn (voidptr, voidptr, GDExtensionBool) GDExtensionBool

type GDExtensionInt #

type GDExtensionInt = i64

type GDExtensionInterfaceArrayOperatorIndex #

type GDExtensionInterfaceArrayOperatorIndex = fn (GDExtensionTypePtr, GDExtensionInt) &Variant

type GDExtensionInterfaceArrayOperatorIndexConst #

type GDExtensionInterfaceArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) &Variant

type GDExtensionInterfaceArrayRef #

type GDExtensionInterfaceArrayRef = fn (GDExtensionTypePtr, GDExtensionConstTypePtr)

type GDExtensionInterfaceArraySetTyped #

type GDExtensionInterfaceArraySetTyped = fn (GDExtensionTypePtr, GDExtensionVariantType, &StringName, &Variant)

type GDExtensionInterfaceClassdbConstructObject #

type GDExtensionInterfaceClassdbConstructObject = fn (&StringName) &Object

type GDExtensionInterfaceClassdbConstructObject2 #

type GDExtensionInterfaceClassdbConstructObject2 = fn (&StringName) &Object

type GDExtensionInterfaceClassdbGetClassTag #

type GDExtensionInterfaceClassdbGetClassTag = fn (&StringName) voidptr

type GDExtensionInterfaceClassdbGetMethodBind #

type GDExtensionInterfaceClassdbGetMethodBind = fn (&StringName, &StringName, GDExtensionInt) GDExtensionMethodBindPtr

type GDExtensionInterfaceClassdbRegisterExtensionClass #

type GDExtensionInterfaceClassdbRegisterExtensionClass = fn (GDExtensionClassLibraryPtr, &StringName, &StringName, &GDExtensionClassCreationInfo)

type GDExtensionInterfaceClassdbRegisterExtensionClass2 #

type GDExtensionInterfaceClassdbRegisterExtensionClass2 = fn (GDExtensionClassLibraryPtr, &StringName, &StringName, &GDExtensionClassCreationInfo2)

type GDExtensionInterfaceClassdbRegisterExtensionClass3 #

type GDExtensionInterfaceClassdbRegisterExtensionClass3 = fn (GDExtensionClassLibraryPtr, &StringName, &StringName, &GDExtensionClassCreationInfo3)

type GDExtensionInterfaceClassdbRegisterExtensionClass4 #

type GDExtensionInterfaceClassdbRegisterExtensionClass4 = fn (GDExtensionClassLibraryPtr, &StringName, &StringName, &GDExtensionClassCreationInfo4)

type GDExtensionInterfaceClassdbRegisterExtensionClassIntegerConstant #

type GDExtensionInterfaceClassdbRegisterExtensionClassIntegerConstant = fn (GDExtensionClassLibraryPtr, &StringName, &StringName, &StringName, GDExtensionInt, GDExtensionBool)

type GDExtensionInterfaceClassdbRegisterExtensionClassMethod #

type GDExtensionInterfaceClassdbRegisterExtensionClassMethod = fn (GDExtensionClassLibraryPtr, &StringName, &GDExtensionClassMethodInfo)

type GDExtensionInterfaceClassdbRegisterExtensionClassProperty #

type GDExtensionInterfaceClassdbRegisterExtensionClassProperty = fn (GDExtensionClassLibraryPtr, &StringName, &GDExtensionPropertyInfo, &StringName, &StringName)

type GDExtensionInterfaceClassdbRegisterExtensionClassPropertyGroup #

type GDExtensionInterfaceClassdbRegisterExtensionClassPropertyGroup = fn (GDExtensionClassLibraryPtr, &StringName, &String, &String)

type GDExtensionInterfaceClassdbRegisterExtensionClassPropertySubgroup #

type GDExtensionInterfaceClassdbRegisterExtensionClassPropertySubgroup = fn (GDExtensionClassLibraryPtr, &StringName, &String, &String)

type GDExtensionInterfaceClassdbRegisterExtensionClassSignal #

type GDExtensionInterfaceClassdbRegisterExtensionClassSignal = fn (GDExtensionClassLibraryPtr, &StringName, &StringName, &GDExtensionPropertyInfo, GDExtensionInt)

type GDExtensionInterfaceClassdbUnregisterExtensionClass #

type GDExtensionInterfaceClassdbUnregisterExtensionClass = fn (GDExtensionClassLibraryPtr, &StringName)

type GDExtensionInterfaceDictionaryOperatorIndex #

type GDExtensionInterfaceDictionaryOperatorIndex = fn (GDExtensionTypePtr, &Variant) &Variant

type GDExtensionInterfaceDictionaryOperatorIndexConst #

type GDExtensionInterfaceDictionaryOperatorIndexConst = fn (GDExtensionConstTypePtr, &Variant) &Variant

type GDExtensionInterfaceEditorAddPlugin #

type GDExtensionInterfaceEditorAddPlugin = fn (&StringName)

type GDExtensionInterfaceEditorRemovePlugin #

type GDExtensionInterfaceEditorRemovePlugin = fn (&StringName)

type GDExtensionInterfaceFileAccessGetBuffer #

type GDExtensionInterfaceFileAccessGetBuffer = fn (&Object, &u8, u64) u64

type GDExtensionInterfaceFileAccessStoreBuffer #

type GDExtensionInterfaceFileAccessStoreBuffer = fn (&Object, &u8, u64)

type GDExtensionInterfaceFunctionPtr #

type GDExtensionInterfaceFunctionPtr = fn ()

type GDExtensionInterfaceGetGodotVersion #

type GDExtensionInterfaceGetGodotVersion = fn (&GDExtensionGodotVersion)

type GDExtensionInterfaceGetGodotVersion2 #

type GDExtensionInterfaceGetGodotVersion2 = fn (&GDExtensionGodotVersion2)

type GDExtensionInterfaceGetLibraryPath #

type GDExtensionInterfaceGetLibraryPath = fn (GDExtensionClassLibraryPtr, GDExtensionUninitializedStringPtr)

type GDExtensionInterfaceGetNativeStructSize #

type GDExtensionInterfaceGetNativeStructSize = fn (&StringName) u64

type GDExtensionInterfaceGetProcAddress #

type GDExtensionInterfaceGetProcAddress = fn (&i8) GDExtensionInterfaceFunctionPtr

type GDExtensionInterfaceGetVariantFromTypeConstructor #

type GDExtensionInterfaceGetVariantFromTypeConstructor = fn (GDExtensionVariantType) GDExtensionVariantFromTypeConstructorFunc

type GDExtensionInterfaceGetVariantToTypeConstructor #

type GDExtensionInterfaceGetVariantToTypeConstructor = fn (GDExtensionVariantType) GDExtensionTypeFromVariantConstructorFunc

type GDExtensionInterfaceGlobalGetSingleton #

type GDExtensionInterfaceGlobalGetSingleton = fn (&StringName) &Object

type GDExtensionInterfaceMemAlloc #

type GDExtensionInterfaceMemAlloc = fn (usize) voidptr

type GDExtensionInterfaceMemFree #

type GDExtensionInterfaceMemFree = fn (voidptr)

type GDExtensionInterfaceMemRealloc #

type GDExtensionInterfaceMemRealloc = fn (voidptr, usize) voidptr

type GDExtensionInterfaceObjectCastTo #

type GDExtensionInterfaceObjectCastTo = fn (&Object, voidptr) &Object

type GDExtensionInterfaceObjectDestroy #

type GDExtensionInterfaceObjectDestroy = fn (&Object)

type GDExtensionInterfaceObjectGetClassName #

type GDExtensionInterfaceObjectGetClassName = fn (&Object, GDExtensionClassLibraryPtr, GDExtensionUninitializedStringNamePtr) GDExtensionBool

type GDExtensionInterfaceObjectGetInstanceBinding #

type GDExtensionInterfaceObjectGetInstanceBinding = fn (&Object, voidptr, &GDExtensionInstanceBindingCallbacks) voidptr

type GDExtensionInterfaceObjectGetInstanceFromId #

type GDExtensionInterfaceObjectGetInstanceFromId = fn (GDObjectInstanceID) &Object

type GDExtensionInterfaceObjectGetInstanceId #

type GDExtensionInterfaceObjectGetInstanceId = fn (&Object) GDObjectInstanceID

type GDExtensionInterfaceObjectMethodBindCall #

type GDExtensionInterfaceObjectMethodBindCall = fn (GDExtensionMethodBindPtr, &Object, &&Variant, GDExtensionInt, GDExtensionUninitializedVariantPtr, &GDExtensionCallError)

type GDExtensionInterfaceObjectMethodBindPtrcall #

type GDExtensionInterfaceObjectMethodBindPtrcall = fn (GDExtensionMethodBindPtr, &Object, &GDExtensionConstTypePtr, GDExtensionTypePtr)

type GDExtensionInterfaceObjectSetInstance #

type GDExtensionInterfaceObjectSetInstance = fn (&Object, &StringName, GDExtensionClassInstancePtr)

type GDExtensionInterfaceObjectSetInstanceBinding #

type GDExtensionInterfaceObjectSetInstanceBinding = fn (&Object, voidptr, voidptr, &GDExtensionInstanceBindingCallbacks)

type GDExtensionInterfacePackedByteArrayOperatorIndexConst #

type GDExtensionInterfacePackedByteArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) &u8

type GDExtensionInterfacePackedColorArrayOperatorIndex #

type GDExtensionInterfacePackedColorArrayOperatorIndex = fn (GDExtensionTypePtr, GDExtensionInt) GDExtensionTypePtr

type GDExtensionInterfacePackedColorArrayOperatorIndexConst #

type GDExtensionInterfacePackedColorArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) GDExtensionTypePtr

type GDExtensionInterfacePackedFloat32ArrayOperatorIndex #

type GDExtensionInterfacePackedFloat32ArrayOperatorIndex = fn (GDExtensionTypePtr, GDExtensionInt) &f32

type GDExtensionInterfacePackedFloat32ArrayOperatorIndexConst #

type GDExtensionInterfacePackedFloat32ArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) &f32

type GDExtensionInterfacePackedFloat64ArrayOperatorIndex #

type GDExtensionInterfacePackedFloat64ArrayOperatorIndex = fn (GDExtensionTypePtr, GDExtensionInt) &f64

type GDExtensionInterfacePackedFloat64ArrayOperatorIndexConst #

type GDExtensionInterfacePackedFloat64ArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) &f64

type GDExtensionInterfacePackedInt32ArrayOperatorIndex #

type GDExtensionInterfacePackedInt32ArrayOperatorIndex = fn (GDExtensionTypePtr, GDExtensionInt) &int

type GDExtensionInterfacePackedInt32ArrayOperatorIndexConst #

type GDExtensionInterfacePackedInt32ArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) &int

type GDExtensionInterfacePackedInt64ArrayOperatorIndex #

type GDExtensionInterfacePackedInt64ArrayOperatorIndex = fn (GDExtensionTypePtr, GDExtensionInt) &i64

type GDExtensionInterfacePackedInt64ArrayOperatorIndexConst #

type GDExtensionInterfacePackedInt64ArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) &i64

type GDExtensionInterfacePackedStringArrayOperatorIndex #

type GDExtensionInterfacePackedStringArrayOperatorIndex = fn (GDExtensionTypePtr, GDExtensionInt) &String

type GDExtensionInterfacePackedStringArrayOperatorIndexConst #

type GDExtensionInterfacePackedStringArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) &String

type GDExtensionInterfacePackedVector2ArrayOperatorIndex #

type GDExtensionInterfacePackedVector2ArrayOperatorIndex = fn (GDExtensionTypePtr, GDExtensionInt) GDExtensionTypePtr

type GDExtensionInterfacePackedVector2ArrayOperatorIndexConst #

type GDExtensionInterfacePackedVector2ArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) GDExtensionTypePtr

type GDExtensionInterfacePackedVector3ArrayOperatorIndex #

type GDExtensionInterfacePackedVector3ArrayOperatorIndex = fn (GDExtensionTypePtr, GDExtensionInt) GDExtensionTypePtr

type GDExtensionInterfacePackedVector3ArrayOperatorIndexConst #

type GDExtensionInterfacePackedVector3ArrayOperatorIndexConst = fn (GDExtensionConstTypePtr, GDExtensionInt) GDExtensionTypePtr

type GDExtensionInterfacePrintError #

type GDExtensionInterfacePrintError = fn (&i8, &i8, &i8, int, GDExtensionBool)

type GDExtensionInterfacePrintErrorWithMessage #

type GDExtensionInterfacePrintErrorWithMessage = fn (&i8, &i8, &i8, &i8, int, GDExtensionBool)

type GDExtensionInterfacePrintScriptError #

type GDExtensionInterfacePrintScriptError = fn (&i8, &i8, &i8, int, GDExtensionBool)

type GDExtensionInterfacePrintScriptErrorWithMessage #

type GDExtensionInterfacePrintScriptErrorWithMessage = fn (&i8, &i8, &i8, &i8, int, GDExtensionBool)

type GDExtensionInterfacePrintWarning #

type GDExtensionInterfacePrintWarning = fn (&i8, &i8, &i8, int, GDExtensionBool)

type GDExtensionInterfacePrintWarningWithMessage #

type GDExtensionInterfacePrintWarningWithMessage = fn (&i8, &i8, &i8, &i8, int, GDExtensionBool)

type GDExtensionInterfaceRefGetObject #

type GDExtensionInterfaceRefGetObject = fn (GDExtensionConstRefPtr) &Object

type GDExtensionInterfaceRefSetObject #

type GDExtensionInterfaceRefSetObject = fn (GDExtensionRefPtr, &Object)

type GDExtensionInterfaceScriptInstanceCreate #

type GDExtensionInterfaceScriptInstanceCreate = fn (&GDExtensionScriptInstanceInfo, GDExtensionScriptInstanceDataPtr) GDExtensionScriptInstancePtr

type GDExtensionInterfaceScriptInstanceCreate3 #

type GDExtensionInterfaceScriptInstanceCreate3 = fn (&GDExtensionScriptInstanceInfo3, GDExtensionScriptInstanceDataPtr) GDExtensionScriptInstancePtr

type GDExtensionInterfaceStringNewWithLatin1Chars #

type GDExtensionInterfaceStringNewWithLatin1Chars = fn (GDExtensionUninitializedStringPtr, &i8)

type GDExtensionInterfaceStringNewWithLatin1CharsAndLen #

type GDExtensionInterfaceStringNewWithLatin1CharsAndLen = fn (GDExtensionUninitializedStringPtr, &i8, GDExtensionInt)

type GDExtensionInterfaceStringNewWithUtf16Chars #

type GDExtensionInterfaceStringNewWithUtf16Chars = fn (GDExtensionUninitializedStringPtr, &i16)

type GDExtensionInterfaceStringNewWithUtf16CharsAndLen #

type GDExtensionInterfaceStringNewWithUtf16CharsAndLen = fn (GDExtensionUninitializedStringPtr, &u16, GDExtensionInt)

type GDExtensionInterfaceStringNewWithUtf16CharsAndLen2 #

type GDExtensionInterfaceStringNewWithUtf16CharsAndLen2 = fn (GDExtensionUninitializedStringPtr, &u16, GDExtensionInt, GDExtensionBool) GDExtensionInt

type GDExtensionInterfaceStringNewWithUtf32Chars #

type GDExtensionInterfaceStringNewWithUtf32Chars = fn (GDExtensionUninitializedStringPtr, &i32)

type GDExtensionInterfaceStringNewWithUtf32CharsAndLen #

type GDExtensionInterfaceStringNewWithUtf32CharsAndLen = fn (GDExtensionUninitializedStringPtr, &u32, GDExtensionInt)

type GDExtensionInterfaceStringNewWithUtf8Chars #

type GDExtensionInterfaceStringNewWithUtf8Chars = fn (GDExtensionUninitializedStringPtr, &i8)

type GDExtensionInterfaceStringNewWithUtf8CharsAndLen #

type GDExtensionInterfaceStringNewWithUtf8CharsAndLen = fn (GDExtensionUninitializedStringPtr, &i8, GDExtensionInt)

type GDExtensionInterfaceStringNewWithUtf8CharsAndLen2 #

type GDExtensionInterfaceStringNewWithUtf8CharsAndLen2 = fn (GDExtensionUninitializedStringPtr, &i8, GDExtensionInt) GDExtensionInt

type GDExtensionInterfaceStringNewWithWideChars #

type GDExtensionInterfaceStringNewWithWideChars = fn (GDExtensionUninitializedStringPtr, &u16)

type GDExtensionInterfaceStringNewWithWideCharsAndLen #

type GDExtensionInterfaceStringNewWithWideCharsAndLen = fn (GDExtensionUninitializedStringPtr, &u16, GDExtensionInt)

type GDExtensionInterfaceStringOperatorIndex #

type GDExtensionInterfaceStringOperatorIndex = fn (&String, GDExtensionInt) &u32

type GDExtensionInterfaceStringOperatorIndexConst #

type GDExtensionInterfaceStringOperatorIndexConst = fn (&String, GDExtensionInt) &u32

type GDExtensionInterfaceStringOperatorPlusEqC32str #

type GDExtensionInterfaceStringOperatorPlusEqC32str = fn (&String, &u32)

type GDExtensionInterfaceStringOperatorPlusEqChar #

type GDExtensionInterfaceStringOperatorPlusEqChar = fn (&String, u32)

type GDExtensionInterfaceStringOperatorPlusEqCstr #

type GDExtensionInterfaceStringOperatorPlusEqCstr = fn (&String, &i8)

type GDExtensionInterfaceStringOperatorPlusEqString #

type GDExtensionInterfaceStringOperatorPlusEqString = fn (&String, &String)

type GDExtensionInterfaceStringOperatorPlusEqWcstr #

type GDExtensionInterfaceStringOperatorPlusEqWcstr = fn (&String, &u16)

type GDExtensionInterfaceStringToLatin1Chars #

type GDExtensionInterfaceStringToLatin1Chars = fn (&String, &i8, GDExtensionInt) GDExtensionInt

type GDExtensionInterfaceStringToUtf16Chars #

type GDExtensionInterfaceStringToUtf16Chars = fn (&String, &u16, GDExtensionInt) GDExtensionInt

type GDExtensionInterfaceStringToUtf32Chars #

type GDExtensionInterfaceStringToUtf32Chars = fn (&String, &u32, GDExtensionInt) GDExtensionInt

type GDExtensionInterfaceStringToUtf8Chars #

type GDExtensionInterfaceStringToUtf8Chars = fn (&String, &i8, GDExtensionInt) GDExtensionInt

type GDExtensionInterfaceStringToWideChars #

type GDExtensionInterfaceStringToWideChars = fn (&String, &u16, GDExtensionInt) GDExtensionInt

type GDExtensionInterfaceVariantBooleanize #

type GDExtensionInterfaceVariantBooleanize = fn (&Variant) GDExtensionBool

type GDExtensionInterfaceVariantCall #

type GDExtensionInterfaceVariantCall = fn (&Variant, &StringName, &&Variant, GDExtensionInt, GDExtensionUninitializedVariantPtr, &GDExtensionCallError)

type GDExtensionInterfaceVariantCallStatic #

type GDExtensionInterfaceVariantCallStatic = fn (GDExtensionVariantType, &StringName, &&Variant, GDExtensionInt, GDExtensionUninitializedVariantPtr, &GDExtensionCallError)

type GDExtensionInterfaceVariantCanConvert #

type GDExtensionInterfaceVariantCanConvert = fn (GDExtensionVariantType, GDExtensionVariantType) GDExtensionBool

type GDExtensionInterfaceVariantCanConvertStrict #

type GDExtensionInterfaceVariantCanConvertStrict = fn (GDExtensionVariantType, GDExtensionVariantType) GDExtensionBool

type GDExtensionInterfaceVariantConstruct #

type GDExtensionInterfaceVariantConstruct = fn (GDExtensionVariantType, GDExtensionUninitializedVariantPtr, &&Variant, int, &GDExtensionCallError)

type GDExtensionInterfaceVariantDestroy #

type GDExtensionInterfaceVariantDestroy = fn (&Variant)

type GDExtensionInterfaceVariantDuplicate #

type GDExtensionInterfaceVariantDuplicate = fn (&Variant, &Variant, GDExtensionBool)

type GDExtensionInterfaceVariantEvaluate #

type GDExtensionInterfaceVariantEvaluate = fn (GDExtensionVariantOperator, &Variant, &Variant, GDExtensionUninitializedVariantPtr, &GDExtensionBool)

type GDExtensionInterfaceVariantGet #

type GDExtensionInterfaceVariantGet = fn (&Variant, &Variant, GDExtensionUninitializedVariantPtr, &GDExtensionBool)

type GDExtensionInterfaceVariantGetConstantValue #

type GDExtensionInterfaceVariantGetConstantValue = fn (GDExtensionVariantType, &StringName, GDExtensionUninitializedVariantPtr)

type GDExtensionInterfaceVariantGetIndexed #

type GDExtensionInterfaceVariantGetIndexed = fn (&Variant, GDExtensionInt, GDExtensionUninitializedVariantPtr, &GDExtensionBool, &GDExtensionBool)

type GDExtensionInterfaceVariantGetKeyed #

type GDExtensionInterfaceVariantGetKeyed = fn (&Variant, &Variant, GDExtensionUninitializedVariantPtr, &GDExtensionBool)

type GDExtensionInterfaceVariantGetNamed #

type GDExtensionInterfaceVariantGetNamed = fn (&Variant, &StringName, GDExtensionUninitializedVariantPtr, &GDExtensionBool)

type GDExtensionInterfaceVariantGetPtrBuiltinMethod #

type GDExtensionInterfaceVariantGetPtrBuiltinMethod = fn (GDExtensionVariantType, &StringName, GDExtensionInt) GDExtensionPtrBuiltInMethod

type GDExtensionInterfaceVariantGetPtrConstructor #

type GDExtensionInterfaceVariantGetPtrConstructor = fn (GDExtensionVariantType, int) GDExtensionPtrConstructor

type GDExtensionInterfaceVariantGetPtrDestructor #

type GDExtensionInterfaceVariantGetPtrDestructor = fn (GDExtensionVariantType) GDExtensionPtrDestructor

type GDExtensionInterfaceVariantGetPtrGetter #

type GDExtensionInterfaceVariantGetPtrGetter = fn (GDExtensionVariantType, &StringName) GDExtensionPtrGetter

type GDExtensionInterfaceVariantGetPtrIndexedGetter #

type GDExtensionInterfaceVariantGetPtrIndexedGetter = fn (GDExtensionVariantType) GDExtensionPtrIndexedGetter

type GDExtensionInterfaceVariantGetPtrIndexedSetter #

type GDExtensionInterfaceVariantGetPtrIndexedSetter = fn (GDExtensionVariantType) GDExtensionPtrIndexedSetter

type GDExtensionInterfaceVariantGetPtrKeyedChecker #

type GDExtensionInterfaceVariantGetPtrKeyedChecker = fn (GDExtensionVariantType) GDExtensionPtrKeyedChecker

type GDExtensionInterfaceVariantGetPtrKeyedGetter #

type GDExtensionInterfaceVariantGetPtrKeyedGetter = fn (GDExtensionVariantType) GDExtensionPtrKeyedGetter

type GDExtensionInterfaceVariantGetPtrKeyedSetter #

type GDExtensionInterfaceVariantGetPtrKeyedSetter = fn (GDExtensionVariantType) GDExtensionPtrKeyedSetter

type GDExtensionInterfaceVariantGetPtrOperatorEvaluator #

type GDExtensionInterfaceVariantGetPtrOperatorEvaluator = fn (GDExtensionVariantOperator, GDExtensionVariantType, GDExtensionVariantType) GDExtensionPtrOperatorEvaluator

type GDExtensionInterfaceVariantGetPtrSetter #

type GDExtensionInterfaceVariantGetPtrSetter = fn (GDExtensionVariantType, &StringName) GDExtensionPtrSetter

type GDExtensionInterfaceVariantGetPtrUtilityFunction #

type GDExtensionInterfaceVariantGetPtrUtilityFunction = fn (&StringName, GDExtensionInt) GDExtensionPtrUtilityFunction

type GDExtensionInterfaceVariantGetType #

type GDExtensionInterfaceVariantGetType = fn (&Variant) GDExtensionVariantType

type GDExtensionInterfaceVariantGetTypeName #

type GDExtensionInterfaceVariantGetTypeName = fn (GDExtensionVariantType, GDExtensionUninitializedStringPtr)

type GDExtensionInterfaceVariantHasKey #

type GDExtensionInterfaceVariantHasKey = fn (&Variant, &Variant, &GDExtensionBool) GDExtensionBool

type GDExtensionInterfaceVariantHasMember #

type GDExtensionInterfaceVariantHasMember = fn (GDExtensionVariantType, &StringName) GDExtensionBool

type GDExtensionInterfaceVariantHasMethod #

type GDExtensionInterfaceVariantHasMethod = fn (&Variant, &StringName) GDExtensionBool

type GDExtensionInterfaceVariantHash #

type GDExtensionInterfaceVariantHash = fn (&Variant) GDExtensionInt

type GDExtensionInterfaceVariantHashCompare #

type GDExtensionInterfaceVariantHashCompare = fn (&Variant, &Variant) GDExtensionBool

type GDExtensionInterfaceVariantIterGet #

type GDExtensionInterfaceVariantIterGet = fn (&Variant, &Variant, GDExtensionUninitializedVariantPtr, &GDExtensionBool)

type GDExtensionInterfaceVariantIterInit #

type GDExtensionInterfaceVariantIterInit = fn (&Variant, GDExtensionUninitializedVariantPtr, &GDExtensionBool) GDExtensionBool

type GDExtensionInterfaceVariantIterNext #

type GDExtensionInterfaceVariantIterNext = fn (&Variant, &Variant, &GDExtensionBool) GDExtensionBool

type GDExtensionInterfaceVariantNewCopy #

type GDExtensionInterfaceVariantNewCopy = fn (GDExtensionUninitializedVariantPtr, &Variant)

type GDExtensionInterfaceVariantNewNil #

type GDExtensionInterfaceVariantNewNil = fn (GDExtensionUninitializedVariantPtr)

type GDExtensionInterfaceVariantRecursiveHash #

type GDExtensionInterfaceVariantRecursiveHash = fn (&Variant, GDExtensionInt) GDExtensionInt

type GDExtensionInterfaceVariantSet #

type GDExtensionInterfaceVariantSet = fn (&Variant, &Variant, &Variant, &GDExtensionBool)

type GDExtensionInterfaceVariantSetIndexed #

type GDExtensionInterfaceVariantSetIndexed = fn (&Variant, GDExtensionInt, &Variant, &GDExtensionBool, &GDExtensionBool)

type GDExtensionInterfaceVariantSetKeyed #

type GDExtensionInterfaceVariantSetKeyed = fn (&Variant, &Variant, &Variant, &GDExtensionBool)

type GDExtensionInterfaceVariantSetNamed #

type GDExtensionInterfaceVariantSetNamed = fn (&Variant, &StringName, &Variant, &GDExtensionBool)

type GDExtensionInterfaceVariantStringify #

type GDExtensionInterfaceVariantStringify = fn (&Variant, &String)

type GDExtensionInterfaceXmlParserOpenBuffer #

type GDExtensionInterfaceXmlParserOpenBuffer = fn (&Object, &u8, usize) GDExtensionInt

type GDExtensionMethodBindPtr #

type GDExtensionMethodBindPtr = voidptr

type GDExtensionPtrBuiltInMethod #

type GDExtensionPtrBuiltInMethod = fn (GDExtensionTypePtr, &GDExtensionConstTypePtr, GDExtensionTypePtr, int)

type GDExtensionPtrConstructor #

type GDExtensionPtrConstructor = fn (GDExtensionUninitializedTypePtr, &GDExtensionConstTypePtr)

type GDExtensionPtrDestructor #

type GDExtensionPtrDestructor = fn (GDExtensionTypePtr)

type GDExtensionPtrGetter #

type GDExtensionPtrGetter = fn (GDExtensionConstTypePtr, GDExtensionTypePtr)

type GDExtensionPtrIndexedGetter #

type GDExtensionPtrIndexedGetter = fn (GDExtensionConstTypePtr, GDExtensionInt, GDExtensionTypePtr)

type GDExtensionPtrIndexedSetter #

type GDExtensionPtrIndexedSetter = fn (GDExtensionTypePtr, GDExtensionInt, GDExtensionConstTypePtr)

type GDExtensionPtrKeyedChecker #

type GDExtensionPtrKeyedChecker = fn (&Variant, &Variant) u32

type GDExtensionPtrKeyedGetter #

type GDExtensionPtrKeyedGetter = fn (GDExtensionConstTypePtr, GDExtensionConstTypePtr, GDExtensionTypePtr)

type GDExtensionPtrKeyedSetter #

type GDExtensionPtrKeyedSetter = fn (GDExtensionTypePtr, GDExtensionConstTypePtr, GDExtensionConstTypePtr)

type GDExtensionPtrOperatorEvaluator #

type GDExtensionPtrOperatorEvaluator = fn (GDExtensionConstTypePtr, GDExtensionConstTypePtr, GDExtensionTypePtr)

type GDExtensionPtrSetter #

type GDExtensionPtrSetter = fn (GDExtensionTypePtr, GDExtensionConstTypePtr)

type GDExtensionPtrUtilityFunction #

type GDExtensionPtrUtilityFunction = fn (GDExtensionTypePtr, &GDExtensionConstTypePtr, int)

type GDExtensionRefPtr #

type GDExtensionRefPtr = voidptr

type GDExtensionScriptInstanceCall #

type GDExtensionScriptInstanceCall = fn (GDExtensionScriptInstanceDataPtr, &StringName, &&Variant, GDExtensionInt, &Variant, &GDExtensionCallError)

type GDExtensionScriptInstanceDataPtr #

type GDExtensionScriptInstanceDataPtr = usize

type GDExtensionScriptInstanceFree #

type GDExtensionScriptInstanceFree = fn (GDExtensionScriptInstanceDataPtr)

type GDExtensionScriptInstanceFreeMethodList #

type GDExtensionScriptInstanceFreeMethodList = fn (GDExtensionScriptInstanceDataPtr, &GDExtensionMethodInfo)

type GDExtensionScriptInstanceFreeMethodList2 #

type GDExtensionScriptInstanceFreeMethodList2 = fn (GDExtensionScriptInstanceDataPtr, &GDExtensionMethodInfo, &u32)

type GDExtensionScriptInstanceFreePropertyList #

type GDExtensionScriptInstanceFreePropertyList = fn (GDExtensionScriptInstanceDataPtr, &GDExtensionPropertyInfo)

type GDExtensionScriptInstanceFreePropertyList2 #

type GDExtensionScriptInstanceFreePropertyList2 = fn (GDExtensionScriptInstanceDataPtr, &GDExtensionPropertyInfo, &u32)

type GDExtensionScriptInstanceGet #

type GDExtensionScriptInstanceGet = fn (GDExtensionScriptInstanceDataPtr, &StringName, &Variant) GDExtensionBool

type GDExtensionScriptInstanceGetClassCategory #

type GDExtensionScriptInstanceGetClassCategory = fn (GDExtensionScriptInstanceDataPtr, &GDExtensionPropertyInfo) GDExtensionBool

type GDExtensionScriptInstanceGetLanguage #

type GDExtensionScriptInstanceGetLanguage = fn (GDExtensionScriptInstanceDataPtr) GDExtensionScriptLanguagePtr

type GDExtensionScriptInstanceGetMethodArgumentCount #

type GDExtensionScriptInstanceGetMethodArgumentCount = fn (GDExtensionScriptInstanceDataPtr, &StringName, &GDExtensionBool) GDExtensionInt

type GDExtensionScriptInstanceGetMethodList #

type GDExtensionScriptInstanceGetMethodList = fn (GDExtensionScriptInstanceDataPtr, &u32) &GDExtensionMethodInfo

type GDExtensionScriptInstanceGetOwner #

type GDExtensionScriptInstanceGetOwner = fn (GDExtensionScriptInstanceDataPtr) &Object

type GDExtensionScriptInstanceGetPropertyList #

type GDExtensionScriptInstanceGetPropertyList = fn (GDExtensionScriptInstanceDataPtr, &u32) &GDExtensionPropertyInfo

type GDExtensionScriptInstanceGetPropertyState #

type GDExtensionScriptInstanceGetPropertyState = fn (GDExtensionScriptInstanceDataPtr, GDExtensionScriptInstancePropertyStateAdd, voidptr)

type GDExtensionScriptInstanceGetPropertyType #

type GDExtensionScriptInstanceGetPropertyType = fn (GDExtensionScriptInstanceDataPtr, &StringName, &GDExtensionBool) GDExtensionVariantType

type GDExtensionScriptInstanceGetScript #

type GDExtensionScriptInstanceGetScript = fn (GDExtensionScriptInstanceDataPtr) &Object

type GDExtensionScriptInstanceHasMethod #

type GDExtensionScriptInstanceHasMethod = fn (GDExtensionScriptInstanceDataPtr, &StringName) GDExtensionBool

type GDExtensionScriptInstanceIsPlaceholder #

type GDExtensionScriptInstanceIsPlaceholder = fn (GDExtensionScriptInstanceDataPtr) GDExtensionBool

type GDExtensionScriptInstanceNotification #

type GDExtensionScriptInstanceNotification = fn (GDExtensionScriptInstanceDataPtr, int)

type GDExtensionScriptInstanceNotification2 #

type GDExtensionScriptInstanceNotification2 = fn (GDExtensionScriptInstanceDataPtr, int, &GDExtensionBool)

type GDExtensionScriptInstancePropertyCanRevert #

type GDExtensionScriptInstancePropertyCanRevert = fn (GDExtensionScriptInstanceDataPtr, &StringName) GDExtensionBool

type GDExtensionScriptInstancePropertyGetRevert #

type GDExtensionScriptInstancePropertyGetRevert = fn (GDExtensionScriptInstanceDataPtr, &StringName, &Variant) GDExtensionBool

type GDExtensionScriptInstancePropertyStateAdd #

type GDExtensionScriptInstancePropertyStateAdd = fn (&StringName, &Variant, voidptr)

type GDExtensionScriptInstancePtr #

type GDExtensionScriptInstancePtr = voidptr

type GDExtensionScriptInstanceRefCountDecremented #

type GDExtensionScriptInstanceRefCountDecremented = fn (GDExtensionScriptInstanceDataPtr) GDExtensionBool

type GDExtensionScriptInstanceRefCountIncremented #

type GDExtensionScriptInstanceRefCountIncremented = fn (GDExtensionScriptInstanceDataPtr)

type GDExtensionScriptInstanceSet #

type GDExtensionScriptInstanceSet = fn (GDExtensionScriptInstanceDataPtr, &StringName, &Variant) GDExtensionBool

type GDExtensionScriptInstanceToString #

type GDExtensionScriptInstanceToString = fn (GDExtensionScriptInstanceDataPtr, &GDExtensionBool, &String)

type GDExtensionScriptInstanceValidateProperty #

type GDExtensionScriptInstanceValidateProperty = fn (GDExtensionScriptInstanceDataPtr, &GDExtensionPropertyInfo) GDExtensionBool

type GDExtensionScriptLanguagePtr #

type GDExtensionScriptLanguagePtr = voidptr

type GDExtensionTypeFromVariantConstructorFunc #

type GDExtensionTypeFromVariantConstructorFunc = fn (GDExtensionUninitializedTypePtr, &Variant)

type GDExtensionTypePtr #

type GDExtensionTypePtr = voidptr

type GDExtensionUninitializedObjectPtr #

type GDExtensionUninitializedObjectPtr = voidptr

type GDExtensionUninitializedStringNamePtr #

type GDExtensionUninitializedStringNamePtr = voidptr

type GDExtensionUninitializedStringPtr #

type GDExtensionUninitializedStringPtr = voidptr

type GDExtensionUninitializedTypePtr #

type GDExtensionUninitializedTypePtr = voidptr

type GDExtensionUninitializedVariantPtr #

type GDExtensionUninitializedVariantPtr = voidptr

type GDExtensionVariantFromTypeConstructorFunc #

type GDExtensionVariantFromTypeConstructorFunc = fn (GDExtensionUninitializedVariantPtr, GDExtensionTypePtr)

type GDObjectInstanceID #

type GDObjectInstanceID = u64

type Int #

type Int = i64

fn (Int) to_variant #

fn (s Int) to_variant() Variant

fn (Ref[T]) init #

fn (mut r Ref[T]) init(obj T)

Initialize with an object

fn (Ref[T]) deinit #

fn (mut r Ref[T]) deinit()

Clean up

fn (Ref[T]) get #

fn (r Ref[T]) get() T

Access the underlying object

fn (Ref[T]) from_variant #

fn (mut r Ref[T]) from_variant(v &Variant)

pub fn (r Ref[T]) to_variant() Variant { return r.obj.to_variant() }

enum AESContextMode #

enum AESContextMode as i64 {
	// AES electronic codebook encryption mode.
	mode_ecb_encrypt = 0
	// AES electronic codebook decryption mode.
	mode_ecb_decrypt = 1
	// AES cipher blocker chaining encryption mode.
	mode_cbc_encrypt = 2
	// AES cipher blocker chaining decryption mode.
	mode_cbc_decrypt = 3
	// Maximum value for the mode enum.
	mode_max = 4
}

enum AStarGrid2DCellShape #

enum AStarGrid2DCellShape as i64 {
	// Rectangular cell shape.
	cell_shape_square = 0
	// Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right.
	cell_shape_isometric_right = 1
	// Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left.
	cell_shape_isometric_down = 2
	// Represents the size of the [enum CellShape] enum.
	cell_shape_max = 3
}

enum AStarGrid2DDiagonalMode #

enum AStarGrid2DDiagonalMode as i64 {
	// The pathfinding algorithm will ignore solid neighbors around the target cell and allow passing using diagonals.
	diagonal_mode_always = 0
	// The pathfinding algorithm will ignore all diagonals and the way will be always orthogonal.
	diagonal_mode_never = 1
	// The pathfinding algorithm will avoid using diagonals if at least two obstacles have been placed around the neighboring cells of the specific path segment.
	diagonal_mode_at_least_one_walkable = 2
	// The pathfinding algorithm will avoid using diagonals if any obstacle has been placed around the neighboring cells of the specific path segment.
	diagonal_mode_only_if_no_obstacles = 3
	// Represents the size of the [enum DiagonalMode] enum.
	diagonal_mode_max = 4
}

enum AStarGrid2DHeuristic #

enum AStarGrid2DHeuristic as i64 {
	// The [url=https://en.wikipedia.org/wiki/Euclidean_distance]Euclidean heuristic[/url] to be used for the pathfinding using the following formula:
	// ```gdscript
	// dx = abs(to_id.x - from_id.x)
	// dy = abs(to_id.y - from_id.y)
	// result = sqrt(dx * dx + dy * dy)
	// ```
	// [b]Note:[/b] This is also the internal heuristic used in [AStar3D] and [AStar2D] by default (with the inclusion of possible z-axis coordinate).
	heuristic_euclidean = 0
	// The [url=https://en.wikipedia.org/wiki/Taxicab_geometry]Manhattan heuristic[/url] to be used for the pathfinding using the following formula:
	// ```gdscript
	// dx = abs(to_id.x - from_id.x)
	// dy = abs(to_id.y - from_id.y)
	// result = dx + dy
	// ```
	// [b]Note:[/b] This heuristic is intended to be used with 4-side orthogonal movements, provided by setting the [member diagonal_mode] to [constant DIAGONAL_MODE_NEVER].
	heuristic_manhattan = 1
	// The Octile heuristic to be used for the pathfinding using the following formula:
	// ```gdscript
	// dx = abs(to_id.x - from_id.x)
	// dy = abs(to_id.y - from_id.y)
	// f = sqrt(2) - 1
	// result = (dx < dy) ? f * dx + dy : f * dy + dx;
	// ```
	heuristic_octile = 2
	// The [url=https://en.wikipedia.org/wiki/Chebyshev_distance]Chebyshev heuristic[/url] to be used for the pathfinding using the following formula:
	// ```gdscript
	// dx = abs(to_id.x - from_id.x)
	// dy = abs(to_id.y - from_id.y)
	// result = max(dx, dy)
	// ```
	heuristic_chebyshev = 3
	// Represents the size of the [enum Heuristic] enum.
	heuristic_max = 4
}

enum AnimationFindMode #

enum AnimationFindMode as i64 {
	// Finds the nearest time key.
	find_mode_nearest = 0
	// Finds only the key with approximating the time.
	find_mode_approx = 1
	// Finds only the key with matching the time.
	find_mode_exact = 2
}

enum AnimationInterpolationType #

enum AnimationInterpolationType as i64 {
	// No interpolation (nearest value).
	interpolation_nearest = 0
	// Linear interpolation.
	interpolation_linear = 1
	// Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to [constant INTERPOLATION_LINEAR] for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return.
	interpolation_cubic = 2
	// Linear interpolation with shortest path rotation.
	// [b]Note:[/b] The result value is always normalized and may not match the key value.
	interpolation_linear_angle = 3
	// Cubic interpolation with shortest path rotation.
	// [b]Note:[/b] The result value is always normalized and may not match the key value.
	interpolation_cubic_angle = 4
}

enum AnimationLoopMode #

enum AnimationLoopMode as i64 {
	// At both ends of the animation, the animation will stop playing.
	loop_none = 0
	// At both ends of the animation, the animation will be repeated without changing the playback direction.
	loop_linear = 1
	// Repeats playback and reverse playback at both ends of the animation.
	loop_pingpong = 2
}

enum AnimationLoopedFlag #

enum AnimationLoopedFlag as i64 {
	// This flag indicates that the animation proceeds without any looping.
	looped_flag_none = 0
	// This flag indicates that the animation has reached the end of the animation and just after loop processed.
	looped_flag_end = 1
	// This flag indicates that the animation has reached the start of the animation and just after loop processed.
	looped_flag_start = 2
}

enum AnimationMixerAnimationCallbackModeDiscrete #

enum AnimationMixerAnimationCallbackModeDiscrete as i64 {
	// An [constant Animation.UPDATE_DISCRETE] track value takes precedence when blending [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and [constant Animation.UPDATE_DISCRETE] track values.
	animation_callback_mode_discrete_dominant = 0
	// An [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track value takes precedence when blending the [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and the [constant Animation.UPDATE_DISCRETE] track values. This is the default behavior for [AnimationPlayer].
	animation_callback_mode_discrete_recessive = 1
	// Always treat the [constant Animation.UPDATE_DISCRETE] track value as [constant Animation.UPDATE_CONTINUOUS] with [constant Animation.INTERPOLATION_NEAREST]. This is the default behavior for [AnimationTree].
	// If a value track has un-interpolatable type key values, it is internally converted to use [constant ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE] with [constant Animation.UPDATE_DISCRETE].
	// Un-interpolatable type list:
	// - [constant @GlobalScope.TYPE_NIL]
	// - [constant @GlobalScope.TYPE_NODE_PATH]
	// - [constant @GlobalScope.TYPE_RID]
	// - [constant @GlobalScope.TYPE_OBJECT]
	// - [constant @GlobalScope.TYPE_CALLABLE]
	// - [constant @GlobalScope.TYPE_SIGNAL]
	// - [constant @GlobalScope.TYPE_DICTIONARY]
	// - [constant @GlobalScope.TYPE_PACKED_BYTE_ARRAY]
	// [constant @GlobalScope.TYPE_BOOL] and [constant @GlobalScope.TYPE_INT] are treated as [constant @GlobalScope.TYPE_FLOAT] during blending and rounded when the result is retrieved.
	// It is same for arrays and vectors with them such as [constant @GlobalScope.TYPE_PACKED_INT32_ARRAY] or [constant @GlobalScope.TYPE_VECTOR2I], they are treated as [constant @GlobalScope.TYPE_PACKED_FLOAT32_ARRAY] or [constant @GlobalScope.TYPE_VECTOR2]. Also note that for arrays, the size is also interpolated.
	// [constant @GlobalScope.TYPE_STRING] and [constant @GlobalScope.TYPE_STRING_NAME] are interpolated between character codes and lengths, but note that there is a difference in algorithm between interpolation between keys and interpolation by blending.
	animation_callback_mode_discrete_force_continuous = 2
}

enum AnimationMixerAnimationCallbackModeMethod #

enum AnimationMixerAnimationCallbackModeMethod as i64 {
	// Batch method calls during the animation process, then do the calls after events are processed. This avoids bugs involving deleting nodes or modifying the AnimationPlayer while playing.
	animation_callback_mode_method_deferred = 0
	// Make method calls immediately when reached in the animation.
	animation_callback_mode_method_immediate = 1
}

enum AnimationMixerAnimationCallbackModeProcess #

enum AnimationMixerAnimationCallbackModeProcess as i64 {
	// Process animation during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]). This is especially useful when animating physics bodies.
	animation_callback_mode_process_physics = 0
	// Process animation during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]).
	animation_callback_mode_process_idle = 1
	// Do not process animation. Use [method advance] to process the animation manually.
	animation_callback_mode_process_manual = 2
}

enum AnimationNodeAnimationPlayMode #

enum AnimationNodeAnimationPlayMode as i64 {
	// Plays animation in forward direction.
	play_mode_forward = 0
	// Plays animation in backward direction.
	play_mode_backward = 1
}

enum AnimationNodeBlendSpace1DBlendMode #

enum AnimationNodeBlendSpace1DBlendMode as i64 {
	// The interpolation between animations is linear.
	blend_mode_interpolated = 0
	// The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations.
	blend_mode_discrete = 1
	// Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position.
	blend_mode_discrete_carry = 2
}

enum AnimationNodeBlendSpace2DBlendMode #

enum AnimationNodeBlendSpace2DBlendMode as i64 {
	// The interpolation between animations is linear.
	blend_mode_interpolated = 0
	// The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations.
	blend_mode_discrete = 1
	// Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position.
	blend_mode_discrete_carry = 2
}

enum AnimationNodeFilterAction #

enum AnimationNodeFilterAction as i64 {
	// Do not use filtering.
	filter_ignore = 0
	// Paths matching the filter will be allowed to pass.
	filter_pass = 1
	// Paths matching the filter will be discarded.
	filter_stop = 2
	// Paths matching the filter will be blended (by the blend value).
	filter_blend = 3
}

enum AnimationNodeOneShotMixMode #

enum AnimationNodeOneShotMixMode as i64 {
	// Blends two animations. See also [AnimationNodeBlend2].
	mix_mode_blend = 0
	// Blends two animations additively. See also [AnimationNodeAdd2].
	mix_mode_add = 1
}

enum AnimationNodeOneShotOneShotRequest #

enum AnimationNodeOneShotOneShotRequest as i64 {
	// The default state of the request. Nothing is done.
	one_shot_request_none = 0
	// The request to play the animation connected to "shot" port.
	one_shot_request_fire = 1
	// The request to stop the animation connected to "shot" port.
	one_shot_request_abort = 2
	// The request to fade out the animation connected to "shot" port.
	one_shot_request_fade_out = 3
}

enum AnimationNodeStateMachineStateMachineType #

enum AnimationNodeStateMachineStateMachineType as i64 {
	// Seeking to the beginning is treated as playing from the start state. Transition to the end state is treated as exiting the state machine.
	state_machine_type_root = 0
	// Seeking to the beginning is treated as seeking to the beginning of the animation in the current state. Transition to the end state, or the absence of transitions in each state, is treated as exiting the state machine.
	state_machine_type_nested = 1
	// This is a grouped state machine that can be controlled from a parent state machine. It does not work independently. There must be a state machine with [member state_machine_type] of [constant STATE_MACHINE_TYPE_ROOT] or [constant STATE_MACHINE_TYPE_NESTED] in the parent or ancestor.
	state_machine_type_grouped = 2
}

enum AnimationNodeStateMachineTransitionAdvanceMode #

enum AnimationNodeStateMachineTransitionAdvanceMode as i64 {
	// Don't use this transition.
	advance_mode_disabled = 0
	// Only use this transition during [method AnimationNodeStateMachinePlayback.travel].
	advance_mode_enabled = 1
	// Automatically use this transition if the [member advance_condition] and [member advance_expression] checks are `true` (if assigned).
	advance_mode_auto = 2
}

enum AnimationNodeStateMachineTransitionSwitchMode #

enum AnimationNodeStateMachineTransitionSwitchMode as i64 {
	// Switch to the next state immediately. The current state will end and blend into the beginning of the new one.
	switch_mode_immediate = 0
	// Switch to the next state immediately, but will seek the new state to the playback position of the old state.
	switch_mode_sync = 1
	// Wait for the current state playback to end, then switch to the beginning of the next state animation.
	switch_mode_at_end = 2
}

enum AnimationPlayerAnimationMethodCallMode #

enum AnimationPlayerAnimationMethodCallMode as i64 {
	animation_method_call_deferred  = 0
	animation_method_call_immediate = 1
}

enum AnimationPlayerAnimationProcessCallback #

enum AnimationPlayerAnimationProcessCallback as i64 {
	animation_process_physics = 0
	animation_process_idle    = 1
	animation_process_manual  = 2
}

enum AnimationTrackType #

enum AnimationTrackType as i64 {
	// Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated [constant TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] track types instead of [constant TYPE_VALUE] is recommended for performance reasons.
	type_value = 0
	// 3D position track (values are stored in [Vector3]s).
	type_position_3d = 1
	// 3D rotation track (values are stored in [Quaternion]s).
	type_rotation_3d = 2
	// 3D scale track (values are stored in [Vector3]s).
	type_scale_3d = 3
	// Blend shape track.
	type_blend_shape = 4
	// Method tracks call functions with given arguments per key.
	type_method = 5
	// Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]).
	type_bezier = 6
	// Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation.
	type_audio = 7
	// Animation tracks play animations in other [AnimationPlayer] nodes.
	type_animation = 8
}

enum AnimationTreeAnimationProcessCallback #

enum AnimationTreeAnimationProcessCallback as i64 {
	animation_process_physics = 0
	animation_process_idle    = 1
	animation_process_manual  = 2
}

enum AnimationUpdateMode #

enum AnimationUpdateMode as i64 {
	// Update between keyframes and hold the value.
	update_continuous = 0
	// Update at the keyframes.
	update_discrete = 1
	// Same as [constant UPDATE_CONTINUOUS] but works as a flag to capture the value of the current object and perform interpolation in some methods. See also [method AnimationMixer.capture], [member AnimationPlayer.playback_auto_capture], and [method AnimationPlayer.play_with_capture].
	update_capture = 2
}

enum Area2DSpaceOverride #

enum Area2DSpaceOverride as i64 {
	// This area does not affect gravity/damping.
	space_override_disabled = 0
	// This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order).
	space_override_combine = 1
	// This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas.
	space_override_combine_replace = 2
	// This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
	space_override_replace = 3
	// This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas.
	space_override_replace_combine = 4
}

enum Area3DSpaceOverride #

enum Area3DSpaceOverride as i64 {
	// This area does not affect gravity/damping.
	space_override_disabled = 0
	// This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order).
	space_override_combine = 1
	// This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas.
	space_override_combine_replace = 2
	// This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
	space_override_replace = 3
	// This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas.
	space_override_replace_combine = 4
}

enum AspectRatioContainerAlignmentMode #

enum AspectRatioContainerAlignmentMode as i64 {
	// Aligns child controls with the beginning (left or top) of the container.
	alignment_begin = 0
	// Aligns child controls with the center of the container.
	alignment_center = 1
	// Aligns child controls with the end (right or bottom) of the container.
	alignment_end = 2
}

enum AspectRatioContainerStretchMode #

enum AspectRatioContainerStretchMode as i64 {
	// The height of child controls is automatically adjusted based on the width of the container.
	stretch_width_controls_height = 0
	// The width of child controls is automatically adjusted based on the height of the container.
	stretch_height_controls_width = 1
	// The bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio.
	stretch_fit = 2
	// The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio.
	// When the bounding rectangle of child controls exceed the container's size and [member Control.clip_contents] is enabled, this allows to show only the container's area restricted by its own bounding rectangle.
	stretch_cover = 3
}

enum AudioEffectDistortionMode #

enum AudioEffectDistortionMode as i64 {
	// Digital distortion effect which cuts off peaks at the top and bottom of the waveform.
	mode_clip = 0
	mode_atan = 1
	// Low-resolution digital distortion effect (bit depth reduction). You can use it to emulate the sound of early digital audio devices.
	mode_lofi = 2
	// Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers. The [member drive] property has no effect in this mode.
	mode_overdrive = 3
	// Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound.
	mode_waveshape = 4
}

enum AudioEffectFilterFilterDB #

enum AudioEffectFilterFilterDB as i64 {
	// Cutting off at 6dB per octave.
	filter_6db = 0
	// Cutting off at 12dB per octave.
	filter_12db = 1
	// Cutting off at 18dB per octave.
	filter_18db = 2
	// Cutting off at 24dB per octave.
	filter_24db = 3
}

enum AudioEffectPitchShiftFFTSize #

enum AudioEffectPitchShiftFFTSize as i64 {
	// Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time.
	fft_size_256 = 0
	// Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time.
	fft_size_512 = 1
	// Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time.
	fft_size_1024 = 2
	// Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time.
	fft_size_2048 = 3
	// Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time.
	fft_size_4096 = 4
	// Represents the size of the [enum FFTSize] enum.
	fft_size_max = 5
}

enum AudioEffectSpectrumAnalyzerFFTSize #

enum AudioEffectSpectrumAnalyzerFFTSize as i64 {
	// Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time.
	fft_size_256 = 0
	// Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time.
	fft_size_512 = 1
	// Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time.
	fft_size_1024 = 2
	// Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time.
	fft_size_2048 = 3
	// Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time.
	fft_size_4096 = 4
	// Represents the size of the [enum FFTSize] enum.
	fft_size_max = 5
}

enum AudioEffectSpectrumAnalyzerInstanceMagnitudeMode #

enum AudioEffectSpectrumAnalyzerInstanceMagnitudeMode as i64 {
	// Use the average value across the frequency range as magnitude.
	magnitude_average = 0
	// Use the maximum value of the frequency range as magnitude.
	magnitude_max = 1
}

enum AudioServerPlaybackType #

enum AudioServerPlaybackType as i64 {
	// The playback will be considered of the type declared at [member ProjectSettings.audio/general/default_playback_type].
	playback_type_default = 0
	// Force the playback to be considered as a stream.
	playback_type_stream = 1
	// Force the playback to be considered as a sample. This can provide lower latency and more stable playback (with less risk of audio crackling), at the cost of having less flexibility.
	// [b]Note:[/b] Only currently supported on the web platform.
	// [b]Note:[/b] [AudioEffect]s are not supported when playback is considered as a sample.
	playback_type_sample = 2
	// Represents the size of the [enum PlaybackType] enum.
	playback_type_max = 3
}

enum AudioServerSpeakerMode #

enum AudioServerSpeakerMode as i64 {
	// Two or fewer speakers were detected.
	speaker_mode_stereo = 0
	// A 3.1 channel surround setup was detected.
	speaker_surround_31 = 1
	// A 5.1 channel surround setup was detected.
	speaker_surround_51 = 2
	// A 7.1 channel surround setup was detected.
	speaker_surround_71 = 3
}

enum AudioStreamGeneratorMixRate #

enum AudioStreamGeneratorMixRate as i64 {
	// Current [AudioServer] output mixing rate.
	mix_rate_output = 0
	// Current [AudioServer] input mixing rate.
	mix_rate_input = 1
	// Custom mixing rate, specified by [member mix_rate].
	mix_rate_custom = 2
	// Maximum value for the mixing rate mode enum.
	mix_rate_max = 3
}

enum AudioStreamInteractiveAutoAdvanceMode #

enum AudioStreamInteractiveAutoAdvanceMode as i64 {
	// Disable auto-advance (default).
	auto_advance_disabled = 0
	// Enable auto-advance, a clip must be specified.
	auto_advance_enabled = 1
	// Enable auto-advance, but instead of specifying a clip, the playback will return to hold (see [method add_transition]).
	auto_advance_return_to_hold = 2
}

enum AudioStreamInteractiveFadeMode #

enum AudioStreamInteractiveFadeMode as i64 {
	// Do not use fade for the transition. This is useful when transitioning from a clip-end to clip-beginning, and each clip has their begin/end.
	fade_disabled = 0
	// Use a fade-in in the next clip, let the current clip finish.
	fade_in = 1
	// Use a fade-out in the current clip, the next clip will start by itself.
	fade_out = 2
	// Use a cross-fade between clips.
	fade_cross = 3
	// Use automatic fade logic depending on the transition from/to. It is recommended to use this by default.
	fade_automatic = 4
}

enum AudioStreamInteractiveTransitionFromTime #

enum AudioStreamInteractiveTransitionFromTime as i64 {
	// Start transition as soon as possible, don't wait for any specific time position.
	transition_from_time_immediate = 0
	// Transition when the clip playback position reaches the next beat.
	transition_from_time_next_beat = 1
	// Transition when the clip playback position reaches the next bar.
	transition_from_time_next_bar = 2
	// Transition when the current clip finished playing.
	transition_from_time_end = 3
}

enum AudioStreamInteractiveTransitionToTime #

enum AudioStreamInteractiveTransitionToTime as i64 {
	// Transition to the same position in the destination clip. This is useful when both clips have exactly the same length and the music should fade between them.
	transition_to_time_same_position = 0
	// Transition to the start of the destination clip.
	transition_to_time_start = 1
}

enum AudioStreamPlayer3DAttenuationModel #

enum AudioStreamPlayer3DAttenuationModel as i64 {
	// Attenuation of loudness according to linear distance.
	attenuation_inverse_distance = 0
	// Attenuation of loudness according to squared distance.
	attenuation_inverse_square_distance = 1
	// Attenuation of loudness according to logarithmic distance.
	attenuation_logarithmic = 2
	// No attenuation of loudness according to distance. The sound will still be heard positionally, unlike an [AudioStreamPlayer]. [constant ATTENUATION_DISABLED] can be combined with a [member max_distance] value greater than `0.0` to achieve linear attenuation clamped to a sphere of a defined size.
	attenuation_disabled = 3
}

enum AudioStreamPlayer3DDopplerTracking #

enum AudioStreamPlayer3DDopplerTracking as i64 {
	// Disables doppler tracking.
	doppler_tracking_disabled = 0
	// Executes doppler tracking during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]).
	doppler_tracking_idle_step = 1
	// Executes doppler tracking during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]).
	doppler_tracking_physics_step = 2
}

enum AudioStreamPlayerMixTarget #

enum AudioStreamPlayerMixTarget as i64 {
	// The audio will be played only on the first channel. This is the default.
	mix_target_stereo = 0
	// The audio will be played on all surround channels.
	mix_target_surround = 1
	// The audio will be played on the second channel, which is usually the center.
	mix_target_center = 2
}

enum AudioStreamRandomizerPlaybackMode #

enum AudioStreamRandomizerPlaybackMode as i64 {
	// Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible. If only 1 sound is present in the pool, the same sound will always play, effectively allowing repeats to occur.
	playback_random_no_repeats = 0
	// Pick a stream at random according to the probability weights chosen for each stream. If only 1 sound is present in the pool, the same sound will always play.
	playback_random = 1
	// Play streams in the order they appear in the stream pool. If only 1 sound is present in the pool, the same sound will always play.
	playback_sequential = 2
}

enum AudioStreamWAVFormat #

enum AudioStreamWAVFormat as i64 {
	// 8-bit PCM audio codec.
	format_8_bits = 0
	// 16-bit PCM audio codec.
	format_16_bits = 1
	// Audio is lossily compressed as IMA ADPCM.
	format_ima_adpcm = 2
	// Audio is lossily compressed as [url=https://qoaformat.org/]Quite OK Audio[/url].
	format_qoa = 3
}

enum AudioStreamWAVLoopMode #

enum AudioStreamWAVLoopMode as i64 {
	// Audio does not loop.
	loop_disabled = 0
	// Audio loops the data between [member loop_begin] and [member loop_end], playing forward only.
	loop_forward = 1
	// Audio loops the data between [member loop_begin] and [member loop_end], playing back and forth.
	loop_pingpong = 2
	// Audio loops the data between [member loop_begin] and [member loop_end], playing backward only.
	loop_backward = 3
}

enum BackBufferCopyCopyMode #

enum BackBufferCopyCopyMode as i64 {
	// Disables the buffering mode. This means the [BackBufferCopy] node will directly use the portion of screen it covers.
	copy_mode_disabled = 0
	// [BackBufferCopy] buffers a rectangular region.
	copy_mode_rect = 1
	// [BackBufferCopy] buffers the entire screen.
	copy_mode_viewport = 2
}

enum BaseButtonActionMode #

enum BaseButtonActionMode as i64 {
	// Require just a press to consider the button clicked.
	action_mode_button_press = 0
	// Require a press and a subsequent release before considering the button clicked.
	action_mode_button_release = 1
}

enum BaseButtonDrawMode #

enum BaseButtonDrawMode as i64 {
	// The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons.
	draw_normal = 0
	// The state of buttons are pressed.
	draw_pressed = 1
	// The state of buttons are hovered.
	draw_hover = 2
	// The state of buttons are disabled.
	draw_disabled = 3
	// The state of buttons are both hovered and pressed.
	draw_hover_pressed = 4
}

enum BaseMaterial3DAlphaAntiAliasing #

enum BaseMaterial3DAlphaAntiAliasing as i64 {
	// Disables Alpha AntiAliasing for the material.
	alpha_antialiasing_off = 0
	// Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask.
	alpha_antialiasing_alpha_to_coverage = 1
	// Enables AlphaToCoverage and forces all non-zero alpha values to `1`. Alpha values in the material are passed to the AntiAliasing sample mask.
	alpha_antialiasing_alpha_to_coverage_and_to_one = 2
}

enum BaseMaterial3DBillboardMode #

enum BaseMaterial3DBillboardMode as i64 {
	// Billboard mode is disabled.
	billboard_disabled = 0
	// The object's Z axis will always face the camera.
	billboard_enabled = 1
	// The object's X axis will always face the camera.
	billboard_fixed_y = 2
	// Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes (flipbook animation). Enables `particles_anim_*` properties.
	// The [member ParticleProcessMaterial.anim_speed_min] or [member CPUParticles3D.anim_speed_min] should also be set to a value bigger than zero for the animation to play.
	billboard_particles = 3
}

enum BaseMaterial3DBlendMode #

enum BaseMaterial3DBlendMode as i64 {
	// Default blend mode. The color of the object is blended over the background based on the object's alpha value.
	blend_mode_mix = 0
	// The color of the object is added to the background.
	blend_mode_add = 1
	// The color of the object is subtracted from the background.
	blend_mode_sub = 2
	// The color of the object is multiplied by the background.
	blend_mode_mul = 3
	// The color of the object is added to the background and the alpha channel is used to mask out the background. This is effectively a hybrid of the blend mix and add modes, useful for effects like fire where you want the flame to add but the smoke to mix. By default, this works with unshaded materials using premultiplied textures. For shaded materials, use the `PREMUL_ALPHA_FACTOR` built-in so that lighting can be modulated as well.
	blend_mode_premult_alpha = 4
}

enum BaseMaterial3DCullMode #

enum BaseMaterial3DCullMode as i64 {
	// Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes, this means that only the exterior of the mesh will be visible.
	cull_back = 0
	// Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes, this means that the interior of the mesh will be drawn instead of the exterior.
	cull_front = 1
	// No face culling is performed; both the front face and back face will be visible.
	cull_disabled = 2
}

enum BaseMaterial3DDepthDrawMode #

enum BaseMaterial3DDepthDrawMode as i64 {
	// Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass.
	depth_draw_opaque_only = 0
	// Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them.
	// [b]Note:[/b] This does not influence whether transparent objects are included in the depth prepass or not. For that, see [enum Transparency].
	depth_draw_always = 1
	// Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled).
	depth_draw_disabled = 2
}

enum BaseMaterial3DDepthTest #

enum BaseMaterial3DDepthTest as i64 {
	// Depth test will discard the pixel if it is behind other pixels.
	depth_test_default = 0
	// Depth test will discard the pixel if it is in front of other pixels. Useful for stencil effects.
	depth_test_inverted = 1
}

enum BaseMaterial3DDetailUV #

enum BaseMaterial3DDetailUV as i64 {
	// Use `UV` with the detail texture.
	detail_uv_1 = 0
	// Use `UV2` with the detail texture.
	detail_uv_2 = 1
}

enum BaseMaterial3DDiffuseMode #

enum BaseMaterial3DDiffuseMode as i64 {
	// Default diffuse scattering algorithm.
	diffuse_burley = 0
	// Diffuse scattering ignores roughness.
	diffuse_lambert = 1
	// Extends Lambert to cover more than 90 degrees when roughness increases.
	diffuse_lambert_wrap = 2
	// Uses a hard cut for lighting, with smoothing affected by roughness.
	diffuse_toon = 3
}

enum BaseMaterial3DDistanceFadeMode #

enum BaseMaterial3DDistanceFadeMode as i64 {
	// Do not use distance fade.
	distance_fade_disabled = 0
	// Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel.
	distance_fade_pixel_alpha = 1
	// Smoothly fades the object out based on each pixel's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA].
	distance_fade_pixel_dither = 2
	// Smoothly fades the object out based on the object's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA] and [constant DISTANCE_FADE_PIXEL_DITHER].
	distance_fade_object_dither = 3
}

enum BaseMaterial3DEmissionOperator #

enum BaseMaterial3DEmissionOperator as i64 {
	// Adds the emission color to the color from the emission texture.
	emission_op_add = 0
	// Multiplies the emission color by the color from the emission texture.
	emission_op_multiply = 1
}

enum BaseMaterial3DFeature #

enum BaseMaterial3DFeature as i64 {
	// Constant for setting [member emission_enabled].
	feature_emission = 0
	// Constant for setting [member normal_enabled].
	feature_normal_mapping = 1
	// Constant for setting [member rim_enabled].
	feature_rim = 2
	// Constant for setting [member clearcoat_enabled].
	feature_clearcoat = 3
	// Constant for setting [member anisotropy_enabled].
	feature_anisotropy = 4
	// Constant for setting [member ao_enabled].
	feature_ambient_occlusion = 5
	// Constant for setting [member heightmap_enabled].
	feature_height_mapping = 6
	// Constant for setting [member subsurf_scatter_enabled].
	feature_subsurface_scattering = 7
	// Constant for setting [member subsurf_scatter_transmittance_enabled].
	feature_subsurface_transmittance = 8
	// Constant for setting [member backlight_enabled].
	feature_backlight = 9
	// Constant for setting [member refraction_enabled].
	feature_refraction = 10
	// Constant for setting [member detail_enabled].
	feature_detail = 11
	// Constant for setting [member bent_normal_enabled].
	feature_bent_normal_mapping = 12
	// Represents the size of the [enum Feature] enum.
	feature_max = 13
}

enum BaseMaterial3DFlags #

enum BaseMaterial3DFlags as i64 {
	// Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth.
	flag_disable_depth_test = 0
	// Set `ALBEDO` to the per-vertex color specified in the mesh.
	flag_albedo_from_vertex_color = 1
	// Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also [member vertex_color_is_srgb].
	// [b]Note:[/b] Only effective when using the Forward+ and Mobile rendering methods.
	flag_srgb_vertex_color = 2
	// Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use `POINT_COORD` instead of `UV`.
	flag_use_point_size = 3
	// Object is scaled by depth so that it always appears the same size on screen.
	flag_fixed_size = 4
	// Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED].
	flag_billboard_keep_scale = 5
	// Use triplanar texture lookup for all texture lookups that would normally use `UV`.
	flag_uv1_use_triplanar = 6
	// Use triplanar texture lookup for all texture lookups that would normally use `UV2`.
	flag_uv2_use_triplanar = 7
	// Use triplanar texture lookup for all texture lookups that would normally use `UV`.
	flag_uv1_use_world_triplanar = 8
	// Use triplanar texture lookup for all texture lookups that would normally use `UV2`.
	flag_uv2_use_world_triplanar = 9
	// Use `UV2` coordinates to look up from the [member ao_texture].
	flag_ao_on_uv2 = 10
	// Use `UV2` coordinates to look up from the [member emission_texture].
	flag_emission_on_uv2 = 11
	// Forces the shader to convert albedo from sRGB space to linear space. See also [member albedo_texture_force_srgb].
	flag_albedo_texture_force_srgb = 12
	// Disables receiving shadows from other objects.
	flag_dont_receive_shadows = 13
	// Disables receiving ambient light.
	flag_disable_ambient_light = 14
	// Enables the shadow to opacity feature.
	flag_use_shadow_to_opacity = 15
	// Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.
	flag_use_texture_repeat = 16
	// Invert values read from a depth texture to convert them to height values (heightmap).
	flag_invert_heightmap = 17
	// Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin.
	flag_subsurface_mode_skin = 18
	// Enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering.
	flag_particle_trails_mode = 19
	// Enables multichannel signed distance field rendering shader.
	flag_albedo_texture_msdf = 20
	// Disables receiving depth-based or volumetric fog.
	flag_disable_fog = 21
	// Disables specular occlusion.
	flag_disable_specular_occlusion = 22
	// Enables using [member z_clip_scale].
	flag_use_z_clip_scale = 23
	// Enables using [member fov_override].
	flag_use_fov_override = 24
	// Represents the size of the [enum Flags] enum.
	flag_max = 25
}

enum BaseMaterial3DShadingMode #

enum BaseMaterial3DShadingMode as i64 {
	// The object will not receive shadows. This is the fastest to render, but it disables all interactions with lights.
	shading_mode_unshaded = 0
	// The object will be shaded per pixel. Useful for realistic shading effects.
	shading_mode_per_pixel = 1
	// The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality.
	shading_mode_per_vertex = 2
	// Represents the size of the [enum ShadingMode] enum.
	shading_mode_max = 3
}

enum BaseMaterial3DSpecularMode #

enum BaseMaterial3DSpecularMode as i64 {
	// Default specular blob.
	// [b]Note:[/b] Forward+ uses multiscattering for more accurate reflections, although the impact of multiscattering is more noticeable on rough metallic surfaces than on smooth, non-metallic surfaces.
	// [b]Note:[/b] Mobile and Compatibility don't perform multiscattering for performance reasons. Instead, they perform single scattering, which means rough metallic surfaces may look slightly darker than intended.
	specular_schlick_ggx = 0
	// Toon blob which changes size based on roughness.
	specular_toon = 1
	// No specular blob. This is slightly faster to render than other specular modes.
	specular_disabled = 2
}

enum BaseMaterial3DStencilCompare #

enum BaseMaterial3DStencilCompare as i64 {
	// Always passes the stencil test.
	stencil_compare_always = 0
	// Passes the stencil test when the reference value is less than the existing stencil value.
	stencil_compare_less = 1
	// Passes the stencil test when the reference value is equal to the existing stencil value.
	stencil_compare_equal = 2
	// Passes the stencil test when the reference value is less than or equal to the existing stencil value.
	stencil_compare_less_or_equal = 3
	// Passes the stencil test when the reference value is greater than the existing stencil value.
	stencil_compare_greater = 4
	// Passes the stencil test when the reference value is not equal to the existing stencil value.
	stencil_compare_not_equal = 5
	// Passes the stencil test when the reference value is greater than or equal to the existing stencil value.
	stencil_compare_greater_or_equal = 6
}

enum BaseMaterial3DStencilFlags #

enum BaseMaterial3DStencilFlags as i64 {
	// The material will only be rendered where it passes a stencil comparison with existing stencil buffer values. See [enum StencilCompare].
	stencil_flag_read = 1
	// The material will write the reference value to the stencil buffer where it passes the depth test.
	stencil_flag_write = 2
	// The material will write the reference value to the stencil buffer where it fails the depth test.
	stencil_flag_write_depth_fail = 4
}

enum BaseMaterial3DStencilMode #

enum BaseMaterial3DStencilMode as i64 {
	// Disables stencil operations.
	stencil_mode_disabled = 0
	// Stencil preset which applies an outline to the object.
	// [b]Note:[/b] Requires a [member Material.next_pass] material which will be automatically applied. Any manual changes made to [member Material.next_pass] will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a [member Material.next_pass] material on a material that uses stencil presets, use [member GeometryInstance3D.material_overlay] instead.
	stencil_mode_outline = 1
	// Stencil preset which shows a silhouette of the object behind walls.
	// [b]Note:[/b] Requires a [member Material.next_pass] material which will be automatically applied. Any manual changes made to [member Material.next_pass] will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a [member Material.next_pass] material on a material that uses stencil presets, use [member GeometryInstance3D.material_overlay] instead.
	stencil_mode_xray = 2
	// Enables stencil operations without a preset.
	stencil_mode_custom = 3
}

enum BaseMaterial3DTextureChannel #

enum BaseMaterial3DTextureChannel as i64 {
	// Used to read from the red channel of a texture.
	texture_channel_red = 0
	// Used to read from the green channel of a texture.
	texture_channel_green = 1
	// Used to read from the blue channel of a texture.
	texture_channel_blue = 2
	// Used to read from the alpha channel of a texture.
	texture_channel_alpha = 3
	// Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture.
	texture_channel_grayscale = 4
}

enum BaseMaterial3DTextureFilter #

enum BaseMaterial3DTextureFilter as i64 {
	// The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
	texture_filter_nearest = 0
	// The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
	texture_filter_linear = 1
	// The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look pixelated from up close, and smooth from a distance.
	texture_filter_nearest_with_mipmaps = 2
	// The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look smooth from up close, and smooth from a distance.
	texture_filter_linear_with_mipmaps = 3
	// The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	texture_filter_nearest_with_mipmaps_anisotropic = 4
	// The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	texture_filter_linear_with_mipmaps_anisotropic = 5
	// Represents the size of the [enum TextureFilter] enum.
	texture_filter_max = 6
}

enum BaseMaterial3DTextureParam #

enum BaseMaterial3DTextureParam as i64 {
	// Texture specifying per-pixel color.
	texture_albedo = 0
	// Texture specifying per-pixel metallic value.
	texture_metallic = 1
	// Texture specifying per-pixel roughness value.
	texture_roughness = 2
	// Texture specifying per-pixel emission color.
	texture_emission = 3
	// Texture specifying per-pixel normal vector.
	texture_normal = 4
	// Texture specifying per-pixel bent normal vector.
	texture_bent_normal = 18
	// Texture specifying per-pixel rim value.
	texture_rim = 5
	// Texture specifying per-pixel clearcoat value.
	texture_clearcoat = 6
	// Texture specifying per-pixel flowmap direction for use with [member anisotropy].
	texture_flowmap = 7
	// Texture specifying per-pixel ambient occlusion value.
	texture_ambient_occlusion = 8
	// Texture specifying per-pixel height.
	texture_heightmap = 9
	// Texture specifying per-pixel subsurface scattering.
	texture_subsurface_scattering = 10
	// Texture specifying per-pixel transmittance for subsurface scattering.
	texture_subsurface_transmittance = 11
	// Texture specifying per-pixel backlight color.
	texture_backlight = 12
	// Texture specifying per-pixel refraction strength.
	texture_refraction = 13
	// Texture specifying per-pixel detail mask blending value.
	texture_detail_mask = 14
	// Texture specifying per-pixel detail color.
	texture_detail_albedo = 15
	// Texture specifying per-pixel detail normal.
	texture_detail_normal = 16
	// Texture holding ambient occlusion, roughness, and metallic.
	texture_orm = 17
	// Represents the size of the [enum TextureParam] enum.
	texture_max = 19
}

enum BaseMaterial3DTransparency #

enum BaseMaterial3DTransparency as i64 {
	// The material will not use transparency. This is the fastest to render.
	transparency_disabled = 0
	// The material will use the texture's alpha values for transparency. This is the slowest to render, and disables shadow casting.
	transparency_alpha = 1
	// The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendered in the depth prepass. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows.
	transparency_alpha_scissor = 2
	// The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. Alpha hashing is suited for hair rendering.
	transparency_alpha_hash = 3
	// The material will use the texture's alpha value for transparency, but will discard fragments with an alpha of less than 0.99 during the depth prepass and fragments with an alpha less than 0.1 during the shadow pass. This also supports casting shadows.
	transparency_alpha_depth_pre_pass = 4
	// Represents the size of the [enum Transparency] enum.
	transparency_max = 5
}

enum BoxContainerAlignmentMode #

enum BoxContainerAlignmentMode as i64 {
	// The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout).
	alignment_begin = 0
	// The child controls will be centered in the container.
	alignment_center = 1
	// The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout).
	alignment_end = 2
}

enum CPUParticles2DDrawOrder #

enum CPUParticles2DDrawOrder as i64 {
	// Particles are drawn in the order emitted.
	draw_order_index = 0
	// Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front.
	draw_order_lifetime = 1
}

enum CPUParticles2DEmissionShape #

enum CPUParticles2DEmissionShape as i64 {
	// All particles will be emitted from a single point.
	emission_shape_point = 0
	// Particles will be emitted in the volume of a sphere flattened to two dimensions.
	emission_shape_sphere = 1
	// Particles will be emitted on the surface of a sphere flattened to two dimensions.
	emission_shape_sphere_surface = 2
	// Particles will be emitted in the area of a rectangle.
	emission_shape_rectangle = 3
	// Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors].
	emission_shape_points = 4
	// Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors].
	emission_shape_directed_points = 5
	// Represents the size of the [enum EmissionShape] enum.
	emission_shape_max = 6
}

enum CPUParticles2DParameter #

enum CPUParticles2DParameter as i64 {
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties.
	param_initial_linear_velocity = 0
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties.
	param_angular_velocity = 1
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties.
	param_orbit_velocity = 2
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties.
	param_linear_accel = 3
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties.
	param_radial_accel = 4
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties.
	param_tangential_accel = 5
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties.
	param_damping = 6
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties.
	param_angle = 7
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties.
	param_scale = 8
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties.
	param_hue_variation = 9
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties.
	param_anim_speed = 10
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties.
	param_anim_offset = 11
	// Represents the size of the [enum Parameter] enum.
	param_max = 12
}

enum CPUParticles2DParticleFlags #

enum CPUParticles2DParticleFlags as i64 {
	// Use with [method set_particle_flag] to set [member particle_flag_align_y].
	particle_flag_align_y_to_velocity = 0
	// Present for consistency with 3D particle nodes, not used in 2D.
	particle_flag_rotate_y = 1
	// Present for consistency with 3D particle nodes, not used in 2D.
	particle_flag_disable_z = 2
	// Represents the size of the [enum ParticleFlags] enum.
	particle_flag_max = 3
}

enum CPUParticles3DDrawOrder #

enum CPUParticles3DDrawOrder as i64 {
	// Particles are drawn in the order emitted.
	draw_order_index = 0
	// Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front.
	draw_order_lifetime = 1
	// Particles are drawn in order of depth.
	draw_order_view_depth = 2
}

enum CPUParticles3DEmissionShape #

enum CPUParticles3DEmissionShape as i64 {
	// All particles will be emitted from a single point.
	emission_shape_point = 0
	// Particles will be emitted in the volume of a sphere.
	emission_shape_sphere = 1
	// Particles will be emitted on the surface of a sphere.
	emission_shape_sphere_surface = 2
	// Particles will be emitted in the volume of a box.
	emission_shape_box = 3
	// Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors].
	emission_shape_points = 4
	// Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors].
	emission_shape_directed_points = 5
	// Particles will be emitted in a ring or cylinder.
	emission_shape_ring = 6
	// Represents the size of the [enum EmissionShape] enum.
	emission_shape_max = 7
}

enum CPUParticles3DParameter #

enum CPUParticles3DParameter as i64 {
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties.
	param_initial_linear_velocity = 0
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties.
	param_angular_velocity = 1
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties.
	param_orbit_velocity = 2
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties.
	param_linear_accel = 3
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties.
	param_radial_accel = 4
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties.
	param_tangential_accel = 5
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties.
	param_damping = 6
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties.
	param_angle = 7
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties.
	param_scale = 8
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties.
	param_hue_variation = 9
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties.
	param_anim_speed = 10
	// Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties.
	param_anim_offset = 11
	// Represents the size of the [enum Parameter] enum.
	param_max = 12
}

enum CPUParticles3DParticleFlags #

enum CPUParticles3DParticleFlags as i64 {
	// Use with [method set_particle_flag] to set [member particle_flag_align_y].
	particle_flag_align_y_to_velocity = 0
	// Use with [method set_particle_flag] to set [member particle_flag_rotate_y].
	particle_flag_rotate_y = 1
	// Use with [method set_particle_flag] to set [member particle_flag_disable_z].
	particle_flag_disable_z = 2
	// Represents the size of the [enum ParticleFlags] enum.
	particle_flag_max = 3
}

enum CSGPolygon3DMode #

enum CSGPolygon3DMode as i64 {
	// The [member polygon] shape is extruded along the negative Z axis.
	mode_depth = 0
	// The [member polygon] shape is extruded by rotating it around the Y axis.
	mode_spin = 1
	// The [member polygon] shape is extruded along the [Path3D] specified in [member path_node].
	mode_path = 2
}

enum CSGPolygon3DPathIntervalType #

enum CSGPolygon3DPathIntervalType as i64 {
	// When [member mode] is set to [constant MODE_PATH], [member path_interval] will determine the distance, in meters, each interval of the path will extrude.
	path_interval_distance = 0
	// When [member mode] is set to [constant MODE_PATH], [member path_interval] will subdivide the polygons along the path.
	path_interval_subdivide = 1
}

enum CSGPolygon3DPathRotation #

enum CSGPolygon3DPathRotation as i64 {
	// The [member polygon] shape is not rotated.
	// [b]Note:[/b] Requires the path Z coordinates to continually decrease to ensure viable shapes.
	path_rotation_polygon = 0
	// The [member polygon] shape is rotated along the path, but it is not rotated around the path axis.
	// [b]Note:[/b] Requires the path Z coordinates to continually decrease to ensure viable shapes.
	path_rotation_path = 1
	// The [member polygon] shape follows the path and its rotations around the path axis.
	path_rotation_path_follow = 2
}

enum CSGShape3DOperation #

enum CSGShape3DOperation as i64 {
	// Geometry of both primitives is merged, intersecting geometry is removed.
	operation_union = 0
	// Only intersecting geometry remains, the rest is removed.
	operation_intersection = 1
	// The second shape is subtracted from the first, leaving a dent with its shape.
	operation_subtraction = 2
}

enum Camera2DAnchorMode #

enum Camera2DAnchorMode as i64 {
	// The camera's position is fixed so that the top-left corner is always at the origin.
	anchor_mode_fixed_top_left = 0
	// The camera's position takes into account vertical/horizontal offsets and the screen size.
	anchor_mode_drag_center = 1
}

enum Camera2DProcessCallback #

enum Camera2DProcessCallback as i64 {
	// The camera updates during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]).
	camera2d_process_physics = 0
	// The camera updates during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]).
	camera2d_process_idle = 1
}

enum Camera3DDopplerTracking #

enum Camera3DDopplerTracking as i64 {
	// Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default).
	doppler_tracking_disabled = 0
	// Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in `_process`. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale]).
	doppler_tracking_idle_step = 1
	// Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in `_physics_process`. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale]).
	doppler_tracking_physics_step = 2
}

enum Camera3DKeepAspect #

enum Camera3DKeepAspect as i64 {
	// Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV.
	keep_width = 0
	// Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV.
	keep_height = 1
}

enum Camera3DProjectionType #

enum Camera3DProjectionType as i64 {
	// Perspective projection. Objects on the screen becomes smaller when they are far away.
	projection_perspective = 0
	// Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are.
	projection_orthogonal = 1
	// Frustum projection. This mode allows adjusting [member frustum_offset] to create "tilted frustum" effects.
	projection_frustum = 2
}

enum CameraFeedFeedDataType #

enum CameraFeedFeedDataType as i64 {
	// No image set for the feed.
	feed_noimage = 0
	// Feed supplies RGB images.
	feed_rgb = 1
	// Feed supplies YCbCr images that need to be converted to RGB.
	feed_ycbcr = 2
	// Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
	feed_ycbcr_sep = 3
	// Feed supplies external image.
	feed_external = 4
}

enum CameraFeedFeedPosition #

enum CameraFeedFeedPosition as i64 {
	// Unspecified position.
	feed_unspecified = 0
	// Camera is mounted at the front of the device.
	feed_front = 1
	// Camera is mounted at the back of the device.
	feed_back = 2
}

enum CameraServerFeedImage #

enum CameraServerFeedImage as i64 {
	// The RGBA camera image.
	feed_rgba_image = 0
	// The CbCr component camera image.
	feed_cbcr_image = 1
}

enum CanvasItemClipChildrenMode #

enum CanvasItemClipChildrenMode as i64 {
	// Children are drawn over this node and are not clipped.
	clip_children_disabled = 0
	// This node is used as a mask and is [b]not[/b] drawn. The mask is based on this node's alpha channel: Opaque pixels are kept, transparent pixels are discarded, and semi-transparent pixels are blended in according to their opacity. Children are clipped to this node's drawn area.
	clip_children_only = 1
	// This node is used as a mask and is also drawn. The mask is based on this node's alpha channel: Opaque pixels are kept, transparent pixels are discarded, and semi-transparent pixels are blended in according to their opacity. Children are clipped to the parent's drawn area.
	clip_children_and_draw = 2
	// Represents the size of the [enum ClipChildrenMode] enum.
	clip_children_max = 3
}

enum CanvasItemMaterialBlendMode #

enum CanvasItemMaterialBlendMode as i64 {
	// Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
	blend_mode_mix = 0
	// Additive blending mode.
	blend_mode_add = 1
	// Subtractive blending mode.
	blend_mode_sub = 2
	// Multiplicative blending mode.
	blend_mode_mul = 3
	// Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
	blend_mode_premult_alpha = 4
}

enum CanvasItemMaterialLightMode #

enum CanvasItemMaterialLightMode as i64 {
	// Render the material using both light and non-light sensitive material properties.
	light_mode_normal = 0
	// Render the material as if there were no light.
	light_mode_unshaded = 1
	// Render the material as if there were only light.
	light_mode_light_only = 2
}

enum CanvasItemTextureFilter #

enum CanvasItemTextureFilter as i64 {
	// The [CanvasItem] will inherit the filter from its parent.
	texture_filter_parent_node = 0
	// The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
	texture_filter_nearest = 1
	// The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
	texture_filter_linear = 2
	// The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look pixelated from up close, and smooth from a distance.
	// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
	texture_filter_nearest_with_mipmaps = 3
	// The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look smooth from up close, and smooth from a distance.
	// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
	texture_filter_linear_with_mipmaps = 4
	// The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	// [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate in this case.
	texture_filter_nearest_with_mipmaps_anisotropic = 5
	// The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	// [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate in this case.
	texture_filter_linear_with_mipmaps_anisotropic = 6
	// Represents the size of the [enum TextureFilter] enum.
	texture_filter_max = 7
}

enum CanvasItemTextureRepeat #

enum CanvasItemTextureRepeat as i64 {
	// The [CanvasItem] will inherit the filter from its parent.
	texture_repeat_parent_node = 0
	// The texture does not repeat. Sampling the texture outside its extents will result in "stretching" of the edge pixels. You can avoid this by ensuring a 1-pixel fully transparent border on each side of the texture.
	texture_repeat_disabled = 1
	// The texture repeats when exceeding the texture's size.
	texture_repeat_enabled = 2
	// The texture repeats when the exceeding the texture's size in a "2×2 tiled mode". Repeated textures at even positions are mirrored.
	texture_repeat_mirror = 3
	// Represents the size of the [enum TextureRepeat] enum.
	texture_repeat_max = 4
}

enum CharacterBody2DMotionMode #

enum CharacterBody2DMotionMode as i64 {
	// Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for sided games like platformers.
	motion_mode_grounded = 0
	// Apply when there is no notion of floor or ceiling. All collisions will be reported as `on_wall`. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games.
	motion_mode_floating = 1
}

enum CharacterBody2DPlatformOnLeave #

enum CharacterBody2DPlatformOnLeave as i64 {
	// Add the last platform velocity to the [member velocity] when you leave a moving platform.
	platform_on_leave_add_velocity = 0
	// Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
	platform_on_leave_add_upward_velocity = 1
	// Do nothing when leaving a platform.
	platform_on_leave_do_nothing = 2
}

enum CharacterBody3DMotionMode #

enum CharacterBody3DMotionMode as i64 {
	// Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for grounded games like platformers.
	motion_mode_grounded = 0
	// Apply when there is no notion of floor or ceiling. All collisions will be reported as `on_wall`. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games.
	motion_mode_floating = 1
}

enum CharacterBody3DPlatformOnLeave #

enum CharacterBody3DPlatformOnLeave as i64 {
	// Add the last platform velocity to the [member velocity] when you leave a moving platform.
	platform_on_leave_add_velocity = 0
	// Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
	platform_on_leave_add_upward_velocity = 1
	// Do nothing when leaving a platform.
	platform_on_leave_do_nothing = 2
}

enum ClassDBAPIType #

enum ClassDBAPIType as i64 {
	// Native Core class type.
	api_core = 0
	// Native Editor class type.
	api_editor = 1
	// GDExtension class type.
	api_extension = 2
	// GDExtension Editor class type.
	api_editor_extension = 3
	// Unknown class type.
	api_none = 4
}

enum ClockDirection #

enum ClockDirection as i64 {
	// Clockwise rotation. Used by some methods (e.g. [method Image.rotate_90]).
	clockwise = 0
	// Counter-clockwise rotation. Used by some methods (e.g. [method Image.rotate_90]).
	counterclockwise = 1
}

enum CodeEditCodeCompletionKind #

enum CodeEditCodeCompletionKind as i64 {
	// Marks the option as a class.
	kind_class = 0
	// Marks the option as a function.
	kind_function = 1
	// Marks the option as a Godot signal.
	kind_signal = 2
	// Marks the option as a variable.
	kind_variable = 3
	// Marks the option as a member.
	kind_member = 4
	// Marks the option as an enum entry.
	kind_enum = 5
	// Marks the option as a constant.
	kind_constant = 6
	// Marks the option as a Godot node path.
	kind_node_path = 7
	// Marks the option as a file path.
	kind_file_path = 8
	// Marks the option as unclassified or plain text.
	kind_plain_text = 9
}

enum CodeEditCodeCompletionLocation #

enum CodeEditCodeCompletionLocation as i64 {
	// The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes).
	location_local = 0
	// The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. `0` for the local class, `1` for the parent, `2` for the grandparent, etc.) to store the depth of an option in the class or a parent class.
	location_parent_mask = 256
	// The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons).
	location_other_user_code = 512
	// The option is from other engine code, not covered by the other enum constants - e.g. built-in classes.
	location_other = 1024
}

enum CollisionObject2DDisableMode #

enum CollisionObject2DDisableMode as i64 {
	// When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [CollisionObject2D].
	// Automatically re-added to the physics simulation when the [Node] is processed again.
	disable_mode_remove = 0
	// When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], make the body static. Doesn't affect [Area2D]. [PhysicsBody2D] can't be affected by forces or other bodies while static.
	// Automatically set [PhysicsBody2D] back to its original mode when the [Node] is processed again.
	disable_mode_make_static = 1
	// When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation.
	disable_mode_keep_active = 2
}

enum CollisionObject3DDisableMode #

enum CollisionObject3DDisableMode as i64 {
	// When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [CollisionObject3D].
	// Automatically re-added to the physics simulation when the [Node] is processed again.
	disable_mode_remove = 0
	// When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], make the body static. Doesn't affect [Area3D]. [PhysicsBody3D] can't be affected by forces or other bodies while static.
	// Automatically set [PhysicsBody3D] back to its original mode when the [Node] is processed again.
	disable_mode_make_static = 1
	// When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation.
	disable_mode_keep_active = 2
}

enum CollisionPolygon2DBuildMode #

enum CollisionPolygon2DBuildMode as i64 {
	// Collisions will include the polygon and its contained area. In this mode the node has the same effect as several [ConvexPolygonShape2D] nodes, one for each convex shape in the convex decomposition of the polygon (but without the overhead of multiple nodes).
	build_solids = 0
	// Collisions will only include the polygon edges. In this mode the node has the same effect as a single [ConcavePolygonShape2D] made of segments, with the restriction that each segment (after the first one) starts where the previous one ends, and the last one ends where the first one starts (forming a closed but hollow polygon).
	build_segments = 1
}

enum ColorPickerColorModeType #

enum ColorPickerColorModeType as i64 {
	// Allows editing the color with Red/Green/Blue sliders in sRGB color space.
	mode_rgb = 0
	// Allows editing the color with Hue/Saturation/Value sliders.
	mode_hsv = 1
	mode_raw = 2
	// Allows editing the color with Hue/Saturation/Lightness sliders.
	// OKHSL is a new color space similar to HSL but that better match perception by leveraging the Oklab color space which is designed to be simple to use, while doing a good job at predicting perceived lightness, chroma and hue.
	// [url=https://bottosson.github.io/posts/colorpicker/]Okhsv and Okhsl color spaces[/url]
	mode_okhsl = 3
}

enum ColorPickerPickerShapeType #

enum ColorPickerPickerShapeType as i64 {
	// HSV Color Model rectangle color space.
	shape_hsv_rectangle = 0
	// HSV Color Model rectangle color space with a wheel.
	shape_hsv_wheel = 1
	// HSV Color Model circle color space. Use Saturation as a radius.
	shape_vhs_circle = 2
	// HSL OK Color Model circle color space.
	shape_okhsl_circle = 3
	// The color space shape and the shape select button are hidden. Can't be selected from the shapes popup.
	shape_none = 4
	// OKHSL Color Model rectangle with constant lightness.
	shape_ok_hs_rectangle = 5
	// OKHSL Color Model rectangle with constant saturation.
	shape_ok_hl_rectangle = 6
}

enum CompositorEffectEffectCallbackType #

enum CompositorEffectEffectCallbackType as i64 {
	// The callback is called before our opaque rendering pass, but after depth prepass (if applicable).
	effect_callback_type_pre_opaque = 0
	// The callback is called after our opaque rendering pass, but before our sky is rendered.
	effect_callback_type_post_opaque = 1
	// The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections).
	effect_callback_type_post_sky = 2
	// The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers.
	effect_callback_type_pre_transparent = 3
	// The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target.
	effect_callback_type_post_transparent = 4
	// Represents the size of the [enum EffectCallbackType] enum.
	effect_callback_type_max = 5
}

enum ConeTwistJoint3DParam #

enum ConeTwistJoint3DParam as i64 {
	// Swing is rotation from side to side, around the axis perpendicular to the twist axis.
	// The swing span defines, how much rotation will not get corrected along the swing axis.
	// Could be defined as looseness in the [ConeTwistJoint3D].
	// If below 0.05, this behavior is locked.
	param_swing_span = 0
	// Twist is the rotation around the twist axis, this value defined how far the joint can twist.
	// Twist is locked if below 0.05.
	param_twist_span = 1
	// The speed with which the swing or twist will take place.
	// The higher, the faster.
	param_bias = 2
	// The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.
	param_softness = 3
	// Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
	param_relaxation = 4
	// Represents the size of the [enum Param] enum.
	param_max = 5
}

enum ControlAnchor #

enum ControlAnchor as i64 {
	// Snaps one of the 4 anchor's sides to the origin of the node's `Rect`, in the top left. Use it with one of the `anchor_*` member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset].
	anchor_begin = 0
	// Snaps one of the 4 anchor's sides to the end of the node's `Rect`, in the bottom right. Use it with one of the `anchor_*` member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset].
	anchor_end = 1
}

enum ControlCursorShape #

enum ControlCursorShape as i64 {
	// Show the system's arrow mouse cursor when the user hovers the node. Use with [member mouse_default_cursor_shape].
	cursor_arrow = 0
	// Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text.
	cursor_ibeam = 1
	// Show the system's pointing hand mouse cursor when the user hovers the node.
	cursor_pointing_hand = 2
	// Show the system's cross mouse cursor when the user hovers the node.
	cursor_cross = 3
	// Show the system's wait mouse cursor when the user hovers the node. Often an hourglass.
	cursor_wait = 4
	// Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass.
	cursor_busy = 5
	// Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock.
	cursor_drag = 6
	// Show the system's drop mouse cursor when the user hovers the node. It can be an open hand. It tells the user they can drop an item they're currently grabbing, like a node in the Scene dock.
	cursor_can_drop = 7
	// Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle.
	cursor_forbidden = 8
	// Show the system's vertical resize mouse cursor when the user hovers the node. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically.
	cursor_vsize = 9
	// Show the system's horizontal resize mouse cursor when the user hovers the node. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally.
	cursor_hsize = 10
	// Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically.
	cursor_bdiagsize = 11
	// Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically.
	cursor_fdiagsize = 12
	// Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely.
	cursor_move = 13
	// Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as [constant CURSOR_VSIZE].
	cursor_vsplit = 14
	// Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as [constant CURSOR_HSIZE].
	cursor_hsplit = 15
	// Show the system's help mouse cursor when the user hovers the node, a question mark.
	cursor_help = 16
}

enum ControlFocusBehaviorRecursive #

enum ControlFocusBehaviorRecursive as i64 {
	// Inherits the [member focus_behavior_recursive] from the parent control. If there is no parent control, this is the same as [constant FOCUS_BEHAVIOR_ENABLED].
	focus_behavior_inherited = 0
	// Prevents the control from getting focused. [method get_focus_mode_with_override] will return [constant FOCUS_NONE].
	focus_behavior_disabled = 1
	// Allows the control to be focused, depending on the [member focus_mode]. This can be used to ignore the parent's [member focus_behavior_recursive]. [method get_focus_mode_with_override] will return the [member focus_mode].
	focus_behavior_enabled = 2
}

enum ControlFocusMode #

enum ControlFocusMode as i64 {
	// The node cannot grab focus. Use with [member focus_mode].
	focus_none = 0
	// The node can only grab focus on mouse clicks. Use with [member focus_mode].
	focus_click = 1
	// The node can grab focus on mouse click, using the arrows and the Tab keys on the keyboard, or using the D-pad buttons on a gamepad. Use with [member focus_mode].
	focus_all = 2
	// The node can grab focus only when screen reader is active. Use with [member focus_mode].
	focus_accessibility = 3
}

enum ControlGrowDirection #

enum ControlGrowDirection as i64 {
	// The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis.
	grow_direction_begin = 0
	// The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis.
	grow_direction_end = 1
	// The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size.
	grow_direction_both = 2
}

enum ControlLayoutDirection #

enum ControlLayoutDirection as i64 {
	// Automatic layout direction, determined from the parent control layout direction.
	layout_direction_inherited = 0
	// Automatic layout direction, determined from the current locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language (unless said language is configured as a fallback in [member ProjectSettings.internationalization/locale/fallback]). For all other languages (or if no valid translation file is found by Godot), left-to-right layout direction is used. If using [TextServerFallback] ([member ProjectSettings.internationalization/rendering/text_driver]), left-to-right layout direction is always used regardless of the language. Right-to-left layout direction can also be forced using [member ProjectSettings.internationalization/rendering/force_right_to_left_layout_direction].
	layout_direction_application_locale = 1
	// Left-to-right layout direction.
	layout_direction_ltr = 2
	// Right-to-left layout direction.
	layout_direction_rtl = 3
	// Automatic layout direction, determined from the system locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language.. For all other languages (or if no valid translation file is found by Godot), left-to-right layout direction is used. If using [TextServerFallback] ([member ProjectSettings.internationalization/rendering/text_driver]), left-to-right layout direction is always used regardless of the language.
	layout_direction_system_locale = 4
	// Represents the size of the [enum LayoutDirection] enum.
	layout_direction_max = 5
}

enum ControlLayoutPreset #

enum ControlLayoutPreset as i64 {
	// Snap all 4 anchors to the top-left of the parent control's bounds. Use with [method set_anchors_preset].
	preset_top_left = 0
	// Snap all 4 anchors to the top-right of the parent control's bounds. Use with [method set_anchors_preset].
	preset_top_right = 1
	// Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with [method set_anchors_preset].
	preset_bottom_left = 2
	// Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with [method set_anchors_preset].
	preset_bottom_right = 3
	// Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with [method set_anchors_preset].
	preset_center_left = 4
	// Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with [method set_anchors_preset].
	preset_center_top = 5
	// Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with [method set_anchors_preset].
	preset_center_right = 6
	// Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with [method set_anchors_preset].
	preset_center_bottom = 7
	// Snap all 4 anchors to the center of the parent control's bounds. Use with [method set_anchors_preset].
	preset_center = 8
	// Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with [method set_anchors_preset].
	preset_left_wide = 9
	// Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with [method set_anchors_preset].
	preset_top_wide = 10
	// Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with [method set_anchors_preset].
	preset_right_wide = 11
	// Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with [method set_anchors_preset].
	preset_bottom_wide = 12
	// Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with [method set_anchors_preset].
	preset_vcenter_wide = 13
	// Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset].
	preset_hcenter_wide = 14
	// Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. Use with [method set_anchors_preset].
	preset_full_rect = 15
}

enum ControlLayoutPresetMode #

enum ControlLayoutPresetMode as i64 {
	// The control will be resized to its minimum size.
	preset_mode_minsize = 0
	// The control's width will not change.
	preset_mode_keep_width = 1
	// The control's height will not change.
	preset_mode_keep_height = 2
	// The control's size will not change.
	preset_mode_keep_size = 3
}

enum ControlMouseBehaviorRecursive #

enum ControlMouseBehaviorRecursive as i64 {
	// Inherits the [member mouse_behavior_recursive] from the parent control. If there is no parent control, this is the same as [constant MOUSE_BEHAVIOR_ENABLED].
	mouse_behavior_inherited = 0
	// Prevents the control from receiving mouse input. [method get_mouse_filter_with_override] will return [constant MOUSE_FILTER_IGNORE].
	mouse_behavior_disabled = 1
	// Allows the control to be receive mouse input, depending on the [member mouse_filter]. This can be used to ignore the parent's [member mouse_behavior_recursive]. [method get_mouse_filter_with_override] will return the [member mouse_filter].
	mouse_behavior_enabled = 2
}

enum ControlMouseFilter #

enum ControlMouseFilter as i64 {
	// The control will receive mouse movement input events and mouse button input events if clicked on through [method _gui_input]. The control will also receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls.
	mouse_filter_stop = 0
	// The control will receive mouse movement input events and mouse button input events if clicked on through [method _gui_input]. The control will also receive the [signal mouse_entered] and [signal mouse_exited] signals.
	// If this control does not handle the event, the event will propagate up to its parent control if it has one. The event is bubbled up the node hierarchy until it reaches a non-[CanvasItem], a control with [constant MOUSE_FILTER_STOP], or a [CanvasItem] with [member CanvasItem.top_level] enabled. This will allow signals to fire in all controls it reaches. If no control handled it, the event will be passed to [method Node._shortcut_input] for further processing.
	mouse_filter_pass = 1
	// The control will not receive any mouse movement input events nor mouse button input events through [method _gui_input]. The control will also not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. If a child has [constant MOUSE_FILTER_PASS] and an event was passed to this control, the event will further propagate up to the control's parent.
	// [b]Note:[/b] If the control has received [signal mouse_entered] but not [signal mouse_exited], changing the [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] will cause [signal mouse_exited] to be emitted.
	mouse_filter_ignore = 2
}

enum ControlSizeFlags #

enum ControlSizeFlags as i64 {
	// Tells the parent [Container] to align the node with its start, either the top or the left edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical].
	// [b]Note:[/b] Setting this flag is equal to not having any size flags.
	size_shrink_begin = 0
	// Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical].
	size_fill = 1
	// Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical].
	size_expand = 2
	// Sets the node's size flags to both fill and expand. See [constant SIZE_FILL] and [constant SIZE_EXPAND] for more information.
	size_expand_fill = 3
	// Tells the parent [Container] to center the node in the available space. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical].
	size_shrink_center = 4
	// Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical].
	size_shrink_end = 8
}

enum ControlTextDirection #

enum ControlTextDirection as i64 {
	// Text writing direction is the same as layout direction.
	text_direction_inherited = 3
	// Automatic text writing direction, determined from the current locale and text content.
	text_direction_auto = 0
	// Left-to-right text writing direction.
	text_direction_ltr = 1
	// Right-to-left text writing direction.
	text_direction_rtl = 2
}

enum ConvertTransformModifier3DTransformMode #

enum ConvertTransformModifier3DTransformMode as i64 {
	// Convert with position. Transfer the difference.
	transform_mode_position = 0
	// Convert with rotation. The angle is the roll for the specified axis.
	transform_mode_rotation = 1
	// Convert with scale. Transfers the ratio, not the difference.
	transform_mode_scale = 2
}

enum CopyTransformModifier3DAxisFlag #

enum CopyTransformModifier3DAxisFlag as i64 {
	// If set, allows to process the X-axis.
	axis_flag_x = 1
	// If set, allows to process the Y-axis.
	axis_flag_y = 2
	// If set, allows to process the Z-axis.
	axis_flag_z = 4
	// If set, allows to process the all axes.
	axis_flag_all = 7
}

enum CopyTransformModifier3DTransformFlag #

enum CopyTransformModifier3DTransformFlag as i64 {
	// If set, allows to copy the position.
	transform_flag_position = 1
	// If set, allows to copy the rotation.
	transform_flag_rotation = 2
	// If set, allows to copy the scale.
	transform_flag_scale = 4
	// If set, allows to copy the position/rotation/scale.
	transform_flag_all = 7
}

enum Corner #

enum Corner as i64 {
	// Top-left corner.
	corner_top_left = 0
	// Top-right corner.
	corner_top_right = 1
	// Bottom-right corner.
	corner_bottom_right = 2
	// Bottom-left corner.
	corner_bottom_left = 3
}

enum CurveTangentMode #

enum CurveTangentMode as i64 {
	// The tangent on this side of the point is user-defined.
	tangent_free = 0
	// The curve calculates the tangent on this side of the point as the slope halfway towards the adjacent point.
	tangent_linear = 1
	// The total number of available tangent modes.
	tangent_mode_count = 2
}

enum CurveTextureTextureMode #

enum CurveTextureTextureMode as i64 {
	// Store the curve equally across the red, green and blue channels. This uses more video memory, but is more compatible with shaders that only read the green and blue values.
	texture_mode_rgb = 0
	// Store the curve only in the red channel. This saves video memory, but some custom shaders may not be able to work with this.
	texture_mode_red = 1
}

enum DecalTexture #

enum DecalTexture as i64 {
	// [Texture2D] corresponding to [member texture_albedo].
	texture_albedo = 0
	// [Texture2D] corresponding to [member texture_normal].
	texture_normal = 1
	// [Texture2D] corresponding to [member texture_orm].
	texture_orm = 2
	// [Texture2D] corresponding to [member texture_emission].
	texture_emission = 3
	// Max size of [enum DecalTexture] enum.
	texture_max = 4
}

enum DirectionalLight3DShadowMode #

enum DirectionalLight3DShadowMode as i64 {
	// Renders the entire scene's shadow map from an orthogonal point of view. This is the fastest directional shadow mode. May result in blurrier shadows on close objects.
	shadow_orthogonal = 0
	// Splits the view frustum in 2 areas, each with its own shadow map. This shadow mode is a compromise between [constant SHADOW_ORTHOGONAL] and [constant SHADOW_PARALLEL_4_SPLITS] in terms of performance.
	shadow_parallel_2_splits = 1
	// Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode.
	shadow_parallel_4_splits = 2
}

enum DirectionalLight3DSkyMode #

enum DirectionalLight3DSkyMode as i64 {
	// Makes the light visible in both scene lighting and sky rendering.
	sky_mode_light_and_sky = 0
	// Makes the light visible in scene lighting only (including direct lighting and global illumination). When using this mode, the light will not be visible from sky shaders.
	sky_mode_light_only = 1
	// Makes the light visible to sky shaders only. When using this mode the light will not cast light into the scene (either through direct lighting or through global illumination), but can be accessed through sky shaders. This can be useful, for example, when you want to control sky effects without illuminating the scene (during a night cycle, for example).
	sky_mode_sky_only = 2
}

enum DisplayServerAccessibilityAction #

enum DisplayServerAccessibilityAction as i64 {
	// Single click action, callback argument is not set.
	action_click = 0
	// Focus action, callback argument is not set.
	action_focus = 1
	// Blur action, callback argument is not set.
	action_blur = 2
	// Collapse action, callback argument is not set.
	action_collapse = 3
	// Expand action, callback argument is not set.
	action_expand = 4
	// Decrement action, callback argument is not set.
	action_decrement = 5
	// Increment action, callback argument is not set.
	action_increment = 6
	// Hide tooltip action, callback argument is not set.
	action_hide_tooltip = 7
	// Show tooltip action, callback argument is not set.
	action_show_tooltip = 8
	// Set text selection action, callback argument is set to [Dictionary] with the following keys:
	// - `"start_element"` accessibility element of the selection start.
	// - `"start_char"` character offset relative to the accessibility element of the selection start.
	// - `"end_element"` accessibility element of the selection end.
	// - `"end_char"` character offset relative to the accessibility element of the selection end.
	action_set_text_selection = 9
	// Replace text action, callback argument is set to [String] with the replacement text.
	action_replace_selected_text = 10
	// Scroll backward action, callback argument is not set.
	action_scroll_backward = 11
	// Scroll down action, callback argument is not set.
	action_scroll_down = 12
	// Scroll forward action, callback argument is not set.
	action_scroll_forward = 13
	// Scroll left action, callback argument is not set.
	action_scroll_left = 14
	// Scroll right action, callback argument is not set.
	action_scroll_right = 15
	// Scroll up action, callback argument is not set.
	action_scroll_up = 16
	// Scroll into view action, callback argument is not set.
	action_scroll_into_view = 17
	// Scroll to point action, callback argument is set to [Vector2] with the relative point coordinates.
	action_scroll_to_point = 18
	// Set scroll offset action, callback argument is set to [Vector2] with the scroll offset.
	action_set_scroll_offset = 19
	// Set value action, callback argument is set to [String] or number with the new value.
	action_set_value = 20
	// Show context menu action, callback argument is not set.
	action_show_context_menu = 21
	// Custom action, callback argument is set to the integer action ID.
	action_custom = 22
}

enum DisplayServerAccessibilityFlags #

enum DisplayServerAccessibilityFlags as i64 {
	// Element is hidden for accessibility tools.
	flag_hidden = 0
	// Element is support multiple item selection.
	flag_multiselectable = 1
	// Element require user input.
	flag_required = 2
	// Element is a visited link.
	flag_visited = 3
	// Element content is not ready (e.g. loading).
	flag_busy = 4
	// Element is modal window.
	flag_modal = 5
	// Element allows touches to be passed through when a screen reader is in touch exploration mode.
	flag_touch_passthrough = 6
	// Element is text field with selectable but read-only text.
	flag_readonly = 7
	// Element is disabled.
	flag_disabled = 8
	// Element clips children.
	flag_clips_children = 9
}

enum DisplayServerAccessibilityLiveMode #

enum DisplayServerAccessibilityLiveMode as i64 {
	// Indicates that updates to the live region should not be presented.
	live_off = 0
	// Indicates that updates to the live region should be presented at the next opportunity (for example at the end of speaking the current sentence).
	live_polite = 1
	// Indicates that updates to the live region have the highest priority and should be presented immediately.
	live_assertive = 2
}

enum DisplayServerAccessibilityPopupType #

enum DisplayServerAccessibilityPopupType as i64 {
	// Popup menu.
	popup_menu = 0
	// Popup list.
	popup_list = 1
	// Popup tree view.
	popup_tree = 2
	// Popup dialog.
	popup_dialog = 3
}

enum DisplayServerAccessibilityRole #

enum DisplayServerAccessibilityRole as i64 {
	// Unknown or custom role.
	role_unknown = 0
	// Default dialog button element.
	role_default_button = 1
	// Audio player element.
	role_audio = 2
	// Video player element.
	role_video = 3
	// Non-editable text label.
	role_static_text = 4
	// Container element. Elements with this role are used for internal structure and ignored by screen readers.
	role_container = 5
	// Panel container element.
	role_panel = 6
	// Button element.
	role_button = 7
	// Link element.
	role_link = 8
	// Check box element.
	role_check_box = 9
	// Radio button element.
	role_radio_button = 10
	// Check button element.
	role_check_button = 11
	// Scroll bar element.
	role_scroll_bar = 12
	// Scroll container element.
	role_scroll_view = 13
	// Container splitter handle element.
	role_splitter = 14
	// Slider element.
	role_slider = 15
	// Spin box element.
	role_spin_button = 16
	// Progress indicator element.
	role_progress_indicator = 17
	// Editable text field element.
	role_text_field = 18
	// Multiline editable text field element.
	role_multiline_text_field = 19
	// Color picker element.
	role_color_picker = 20
	// Table element.
	role_table = 21
	// Table/tree cell element.
	role_cell = 22
	// Table/tree row element.
	role_row = 23
	// Table/tree row group element.
	role_row_group = 24
	// Table/tree row header element.
	role_row_header = 25
	// Table/tree column header element.
	role_column_header = 26
	// Tree view element.
	role_tree = 27
	// Tree view item element.
	role_tree_item = 28
	// List element.
	role_list = 29
	// List item element.
	role_list_item = 30
	// List view element.
	role_list_box = 31
	// List view item element.
	role_list_box_option = 32
	// Tab bar element.
	role_tab_bar = 33
	// Tab bar item element.
	role_tab = 34
	// Tab panel element.
	role_tab_panel = 35
	// Menu bar element.
	role_menu_bar = 36
	// Popup menu element.
	role_menu = 37
	// Popup menu item element.
	role_menu_item = 38
	// Popup menu check button item element.
	role_menu_item_check_box = 39
	// Popup menu radio button item element.
	role_menu_item_radio = 40
	// Image element.
	role_image = 41
	// Window element.
	role_window = 42
	// Embedded window title bar element.
	role_title_bar = 43
	// Dialog window element.
	role_dialog = 44
	// Tooltip element.
	role_tooltip = 45
}

enum DisplayServerCursorShape #

enum DisplayServerCursorShape as i64 {
	// Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a [LineEdit] or [TextEdit].
	cursor_arrow = 0
	// I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as [LineEdit] or [TextEdit].
	cursor_ibeam = 1
	// Pointing hand cursor shape. This is used by default when hovering a [LinkButton] or a URL tag in a [RichTextLabel].
	cursor_pointing_hand = 2
	// Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker.
	cursor_cross = 3
	// Wait cursor. On most cursor themes, this displays a spinning icon [i]besides[/i] the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also [constant CURSOR_BUSY].
	cursor_wait = 4
	// Wait cursor. On most cursor themes, this [i]replaces[/i] the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also [constant CURSOR_WAIT].
	cursor_busy = 5
	// Dragging hand cursor. This is displayed during drag-and-drop operations. See also [constant CURSOR_CAN_DROP].
	cursor_drag = 6
	// "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a [Control] that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also [constant CURSOR_DRAG].
	cursor_can_drop = 7
	// Forbidden cursor. This is displayed during drag-and-drop operations if the hovered [Control] can't accept the drag-and-drop event.
	cursor_forbidden = 8
	// Vertical resize cursor. Intended to be displayed when the hovered [Control] can be vertically resized using the mouse. See also [constant CURSOR_VSPLIT].
	cursor_vsize = 9
	// Horizontal resize cursor. Intended to be displayed when the hovered [Control] can be horizontally resized using the mouse. See also [constant CURSOR_HSPLIT].
	cursor_hsize = 10
	// Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse.
	cursor_bdiagsize = 11
	// Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse.
	cursor_fdiagsize = 12
	// Move cursor. Intended to be displayed when the hovered [Control] can be moved using the mouse.
	cursor_move = 13
	// Vertical split cursor. This is displayed when hovering a [Control] with splits that can be vertically resized using the mouse, such as [VSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_VSIZE].
	cursor_vsplit = 14
	// Horizontal split cursor. This is displayed when hovering a [Control] with splits that can be horizontally resized using the mouse, such as [HSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_HSIZE].
	cursor_hsplit = 15
	// Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked.
	cursor_help = 16
	// Represents the size of the [enum CursorShape] enum.
	cursor_max = 17
}

enum DisplayServerFeature #

enum DisplayServerFeature as i64 {
	// Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. [b]macOS[/b]
	feature_global_menu = 0
	// Display server supports multiple windows that can be moved outside of the main window. [b]Windows, macOS, Linux (X11)[/b]
	feature_subwindows = 1
	// Display server supports touchscreen input. [b]Windows, Linux (X11), Android, iOS, Web[/b]
	feature_touchscreen = 2
	// Display server supports mouse input. [b]Windows, macOS, Linux (X11/Wayland), Android, Web[/b]
	feature_mouse = 3
	// Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. [b]Windows, macOS, Linux (X11/Wayland)[/b]
	feature_mouse_warp = 4
	// Display server supports setting and getting clipboard data. See also [constant FEATURE_CLIPBOARD_PRIMARY]. [b]Windows, macOS, Linux (X11/Wayland), Android, iOS, Web[/b]
	feature_clipboard = 5
	// Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. [b]Android, iOS, Web[/b]
	feature_virtual_keyboard = 6
	// Display server supports setting the mouse cursor shape to be different from the default. [b]Windows, macOS, Linux (X11/Wayland), Android, Web[/b]
	feature_cursor_shape = 7
	// Display server supports setting the mouse cursor shape to a custom image. [b]Windows, macOS, Linux (X11/Wayland), Web[/b]
	feature_custom_cursor_shape = 8
	// Display server supports spawning text dialogs using the operating system's native look-and-feel. See [method dialog_show]. [b]Windows, macOS[/b]
	feature_native_dialog = 9
	// Display server supports [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url], which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. [b]Windows, macOS, Linux (X11)[/b]
	feature_ime = 10
	// Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. [b]Windows, macOS, Linux (X11/Wayland), Android[/b]
	feature_window_transparency = 11
	// Display server supports querying the operating system's display scale factor. This allows automatically detecting the hiDPI display [i]reliably[/i], instead of guessing based on the screen resolution and the display's reported DPI (which might be unreliable due to broken monitor EDID). [b]Windows, Linux (Wayland), macOS[/b]
	feature_hidpi = 12
	// Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS, Linux (X11)[/b]
	feature_icon = 13
	// Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS[/b]
	feature_native_icon = 14
	// Display server supports changing the screen orientation. [b]Android, iOS[/b]
	feature_orientation = 15
	// Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). [b]Windows, macOS, Linux (X11/Wayland)[/b]
	feature_swap_buffers = 16
	// Display server supports Primary clipboard can be used. This is a different clipboard from [constant FEATURE_CLIPBOARD]. [b]Linux (X11/Wayland)[/b]
	feature_clipboard_primary = 18
	// Display server supports text-to-speech. See `tts_*` methods. [b]Windows, macOS, Linux (X11/Wayland), Android, iOS, Web[/b]
	feature_text_to_speech = 19
	// Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE]. [b]macOS[/b]
	feature_extend_to_title = 20
	// Display server supports reading screen pixels. See [method screen_get_pixel].
	feature_screen_capture = 21
	// Display server supports application status indicators.
	feature_status_indicator = 22
	// Display server supports native help system search callbacks. See [method help_set_search_callbacks].
	feature_native_help = 23
	// Display server supports spawning text input dialogs using the operating system's native look-and-feel. See [method dialog_input_text]. [b]Windows, macOS[/b]
	feature_native_dialog_input = 24
	// Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See [method file_dialog_show]. [b]Windows, macOS, Linux (X11/Wayland), Android[/b]
	feature_native_dialog_file = 25
	// The display server supports all features of [constant FEATURE_NATIVE_DIALOG_FILE], with the added functionality of Options and native dialog file access to `res://` and `user://` paths. See [method file_dialog_show] and [method file_dialog_with_options_show]. [b]Windows, macOS, Linux (X11/Wayland)[/b]
	feature_native_dialog_file_extra = 26
	// The display server supports initiating window drag and resize operations on demand. See [method window_start_drag] and [method window_start_resize].
	feature_window_drag = 27
	// Display server supports [constant WINDOW_FLAG_EXCLUDE_FROM_CAPTURE] window flag.
	feature_screen_exclude_from_capture = 28
	// Display server supports embedding a window from another process. [b]Windows, Linux (X11)[/b]
	feature_window_embedding = 29
	// Native file selection dialog supports MIME types as filters.
	feature_native_dialog_file_mime = 30
	// Display server supports system emoji and symbol picker. [b]Windows, macOS[/b]
	feature_emoji_and_symbol_picker = 31
	// Display server supports native color picker. [b]Linux (X11/Wayland)[/b]
	feature_native_color_picker = 32
	// Display server automatically fits popups according to the screen boundaries. Window nodes should not attempt to do that themselves.
	feature_self_fitting_windows = 33
	// Display server supports interaction with screen reader or Braille display. [b]Linux (X11/Wayland), macOS, Windows[/b]
	feature_accessibility_screen_reader = 34
}

enum DisplayServerFileDialogMode #

enum DisplayServerFileDialogMode as i64 {
	// The native file dialog allows selecting one, and only one file.
	file_dialog_mode_open_file = 0
	// The native file dialog allows selecting multiple files.
	file_dialog_mode_open_files = 1
	// The native file dialog only allows selecting a directory, disallowing the selection of any file.
	file_dialog_mode_open_dir = 2
	// The native file dialog allows selecting one file or directory.
	file_dialog_mode_open_any = 3
	// The native file dialog will warn when a file exists.
	file_dialog_mode_save_file = 4
}

enum DisplayServerHandleType #

enum DisplayServerHandleType as i64 {
	// Display handle:
	// - Linux (X11): `X11::Display*` for the display.
	// - Linux (Wayland): `wl_display` for the display.
	// - Android: `EGLDisplay` for the display.
	display_handle = 0
	// Window handle:
	// - Windows: `HWND` for the window.
	// - Linux (X11): `X11::Window*` for the window.
	// - Linux (Wayland): `wl_surface` for the window.
	// - macOS: `NSWindow*` for the window.
	// - iOS: `UIViewController*` for the view controller.
	// - Android: `jObject` for the activity.
	window_handle = 1
	// Window view:
	// - Windows: `HDC` for the window (only with the Compatibility renderer).
	// - macOS: `NSView*` for the window main view.
	// - iOS: `UIView*` for the window main view.
	window_view = 2
	// OpenGL context (only with the Compatibility renderer):
	// - Windows: `HGLRC` for the window (native GL), or `EGLContext` for the window (ANGLE).
	// - Linux (X11): `GLXContext*` for the window.
	// - Linux (Wayland): `EGLContext` for the window.
	// - macOS: `NSOpenGLContext*` for the window (native GL), or `EGLContext` for the window (ANGLE).
	// - Android: `EGLContext` for the window.
	opengl_context = 3
	// - Windows: `EGLDisplay` for the window (ANGLE).
	// - macOS: `EGLDisplay` for the window (ANGLE).
	// - Linux (Wayland): `EGLDisplay` for the window.
	egl_display = 4
	// - Windows: `EGLConfig` for the window (ANGLE).
	// - macOS: `EGLConfig` for the window (ANGLE).
	// - Linux (Wayland): `EGLConfig` for the window.
	egl_config = 5
}

enum DisplayServerMouseMode #

enum DisplayServerMouseMode as i64 {
	// Makes the mouse cursor visible if it is hidden.
	mouse_mode_visible = 0
	// Makes the mouse cursor hidden if it is visible.
	mouse_mode_hidden = 1
	// Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window.
	// [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative].
	mouse_mode_captured = 2
	// Confines the mouse cursor to the game window, and make it visible.
	mouse_mode_confined = 3
	// Confines the mouse cursor to the game window, and make it hidden.
	mouse_mode_confined_hidden = 4
	// Max value of the [enum MouseMode].
	mouse_mode_max = 5
}

enum DisplayServerScreenOrientation #

enum DisplayServerScreenOrientation as i64 {
	// Default landscape orientation.
	screen_landscape = 0
	// Default portrait orientation.
	screen_portrait = 1
	// Reverse landscape orientation (upside down).
	screen_reverse_landscape = 2
	// Reverse portrait orientation (upside down).
	screen_reverse_portrait = 3
	// Automatic landscape orientation (default or reverse depending on sensor).
	screen_sensor_landscape = 4
	// Automatic portrait orientation (default or reverse depending on sensor).
	screen_sensor_portrait = 5
	// Automatic landscape or portrait orientation (default or reverse depending on sensor).
	screen_sensor = 6
}

enum DisplayServerTTSUtteranceEvent #

enum DisplayServerTTSUtteranceEvent as i64 {
	// Utterance has begun to be spoken.
	tts_utterance_started = 0
	// Utterance was successfully finished.
	tts_utterance_ended = 1
	// Utterance was canceled, or TTS service was unable to process it.
	tts_utterance_canceled = 2
	// Utterance reached a word or sentence boundary.
	tts_utterance_boundary = 3
}

enum DisplayServerVSyncMode #

enum DisplayServerVSyncMode as i64 {
	// No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (regardless of [member Engine.max_fps]).
	vsync_disabled = 0
	// Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (regardless of [member Engine.max_fps]).
	vsync_enabled = 1
	// Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (regardless of [member Engine.max_fps]). Behaves like [constant VSYNC_ENABLED] when using the Compatibility rendering method.
	vsync_adaptive = 2
	// Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (regardless of [member Engine.max_fps]).
	// Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). [constant VSYNC_MAILBOX] works best when at least twice as many frames as the display refresh rate are rendered. Behaves like [constant VSYNC_ENABLED] when using the Compatibility rendering method.
	vsync_mailbox = 3
}

enum DisplayServerVirtualKeyboardType #

enum DisplayServerVirtualKeyboardType as i64 {
	// Default text virtual keyboard.
	keyboard_type_default = 0
	// Multiline virtual keyboard.
	keyboard_type_multiline = 1
	// Virtual number keypad, useful for PIN entry.
	keyboard_type_number = 2
	// Virtual number keypad, useful for entering fractional numbers.
	keyboard_type_number_decimal = 3
	// Virtual phone number keypad.
	keyboard_type_phone = 4
	// Virtual keyboard with additional keys to assist with typing email addresses.
	keyboard_type_email_address = 5
	// Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
	// [b]Note:[/b] This is not supported on Web. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT].
	keyboard_type_password = 6
	// Virtual keyboard with additional keys to assist with typing URLs.
	keyboard_type_url = 7
}

enum DisplayServerWindowEvent #

enum DisplayServerWindowEvent as i64 {
	// Sent when the mouse pointer enters the window.
	window_event_mouse_enter = 0
	// Sent when the mouse pointer exits the window.
	window_event_mouse_exit = 1
	// Sent when the window grabs focus.
	window_event_focus_in = 2
	// Sent when the window loses focus.
	window_event_focus_out = 3
	// Sent when the user has attempted to close the window (e.g. close button is pressed).
	window_event_close_request = 4
	// Sent when the device "Back" button is pressed.
	// [b]Note:[/b] This event is implemented only on Android.
	window_event_go_back_request = 5
	// Sent when the window is moved to the display with different DPI, or display DPI is changed.
	// [b]Note:[/b] This flag is implemented only on macOS and Linux (Wayland).
	window_event_dpi_change = 6
	// Sent when the window title bar decoration is changed (e.g. [constant WINDOW_FLAG_EXTEND_TO_TITLE] is set or window entered/exited full screen mode).
	// [b]Note:[/b] This flag is implemented only on macOS.
	window_event_titlebar_change = 7
	// Sent when the window has been forcibly closed by the Display Server. The window shall immediately hide and clean any internal rendering references.
	// [b]Note:[/b] This flag is implemented only on Linux (Wayland).
	window_event_force_close = 8
}

enum DisplayServerWindowFlags #

enum DisplayServerWindowFlags as i64 {
	// The window can't be resized by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows.
	window_flag_resize_disabled = 0
	// The window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
	window_flag_borderless = 1
	// The window is floating on top of all other windows. This flag is ignored for full-screen windows.
	window_flag_always_on_top = 2
	// The window background can be transparent.
	// [b]Note:[/b] This flag has no effect if [method is_window_transparency_available] returns `false`.
	// [b]Note:[/b] Transparency support is implemented on Android, Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
	window_flag_transparent = 3
	// The window can't be focused. No-focus window will ignore all input, except mouse clicks.
	window_flag_no_focus = 4
	// Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see [method window_set_transient]).
	window_flag_popup = 5
	// Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons.
	// Use [method window_set_window_buttons_offset] to adjust minimize/maximize/close buttons offset.
	// Use [method window_get_safe_title_margins] to determine area under the title bar that is not covered by decorations.
	// [b]Note:[/b] This flag is implemented only on macOS.
	window_flag_extend_to_title = 6
	// All mouse events are passed to the underlying window of the same application.
	window_flag_mouse_passthrough = 7
	// Window style is overridden, forcing sharp corners.
	// [b]Note:[/b] This flag is implemented only on Windows (11).
	window_flag_sharp_corners = 8
	// Window is excluded from screenshots taken by [method screen_get_image], [method screen_get_image_rect], and [method screen_get_pixel].
	// [b]Note:[/b] This flag is implemented on macOS and Windows.
	// [b]Note:[/b] Setting this flag will prevent standard screenshot methods from capturing a window image, but does [b]NOT[/b] guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.
	window_flag_exclude_from_capture = 9
	// Signals the window manager that this window is supposed to be an implementation-defined "popup" (usually a floating, borderless, untileable and immovable child window).
	window_flag_popup_wm_hint = 10
	// Window minimize button is disabled.
	// [b]Note:[/b] This flag is implemented on macOS and Windows.
	window_flag_minimize_disabled = 11
	// Window maximize button is disabled.
	// [b]Note:[/b] This flag is implemented on macOS and Windows.
	window_flag_maximize_disabled = 12
	// Max value of the [enum WindowFlags].
	window_flag_max = 13
}

enum DisplayServerWindowMode #

enum DisplayServerWindowMode as i64 {
	// Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen).
	window_mode_windowed = 0
	// Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is pressed.
	window_mode_minimized = 1
	// Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed.
	window_mode_maximized = 2
	// Full screen mode with full multi-window support.
	// Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed.
	// [b]On Android:[/b] This enables immersive mode.
	// [b]On macOS:[/b] A new desktop is used to display the running project.
	// [b]Note:[/b] Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
	window_mode_fullscreen = 3
	// A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition).
	// Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed.
	// [b]Note:[/b] This mode might not work with screen recording software.
	// [b]On Android:[/b] This enables immersive mode.
	// [b]On Windows:[/b] Depending on video driver, full screen transition might cause screens to go black for a moment.
	// [b]On macOS:[/b] A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen.
	// [b]On Linux (X11):[/b] Exclusive full screen mode bypasses compositor.
	// [b]On Linux (Wayland):[/b] Equivalent to [constant WINDOW_MODE_FULLSCREEN].
	// [b]Note:[/b] Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
	window_mode_exclusive_fullscreen = 4
}

enum DisplayServerWindowResizeEdge #

enum DisplayServerWindowResizeEdge as i64 {
	// Top-left edge of a window.
	window_edge_top_left = 0
	// Top edge of a window.
	window_edge_top = 1
	// Top-right edge of a window.
	window_edge_top_right = 2
	// Left edge of a window.
	window_edge_left = 3
	// Right edge of a window.
	window_edge_right = 4
	// Bottom-left edge of a window.
	window_edge_bottom_left = 5
	// Bottom edge of a window.
	window_edge_bottom = 6
	// Bottom-right edge of a window.
	window_edge_bottom_right = 7
	// Represents the size of the [enum WindowResizeEdge] enum.
	window_edge_max = 8
}

enum ENetConnectionCompressionMode #

enum ENetConnectionCompressionMode as i64 {
	// No compression. This uses the most bandwidth, but has the upside of requiring the fewest CPU resources. This option may also be used to make network debugging using tools like Wireshark easier.
	compress_none = 0
	// ENet's built-in range encoding. Works well on small packets, but is not the most efficient algorithm on packets larger than 4 KB.
	compress_range_coder = 1
	// [url=https://fastlz.org/]FastLZ[/url] compression. This option uses less CPU resources compared to [constant COMPRESS_ZLIB], at the expense of using more bandwidth.
	compress_fastlz = 2
	// [url=https://www.zlib.net/]Zlib[/url] compression. This option uses less bandwidth compared to [constant COMPRESS_FASTLZ], at the expense of using more CPU resources.
	compress_zlib = 3
	// [url=https://facebook.github.io/zstd/]Zstandard[/url] compression. Note that this algorithm is not very efficient on packets smaller than 4 KB. Therefore, it's recommended to use other compression algorithms in most cases.
	compress_zstd = 4
}

enum ENetConnectionEventType #

enum ENetConnectionEventType as i64 {
	// An error occurred during [method service]. You will likely need to [method destroy] the host and recreate it.
	event_error = -1
	// No event occurred within the specified time limit.
	event_none = 0
	// A connection request initiated by enet_host_connect has completed. The array will contain the peer which successfully connected.
	event_connect = 1
	// A peer has disconnected. This event is generated on a successful completion of a disconnect initiated by [method ENetPacketPeer.peer_disconnect], if a peer has timed out, or if a connection request initialized by [method connect_to_host] has timed out. The array will contain the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available.
	event_disconnect = 2
	// A packet has been received from a peer. The array will contain the peer which sent the packet and the channel number upon which the packet was received. The received packet will be queued to the associated [ENetPacketPeer].
	event_receive = 3
}

enum ENetConnectionHostStatistic #

enum ENetConnectionHostStatistic as i64 {
	// Total data sent.
	host_total_sent_data = 0
	// Total UDP packets sent.
	host_total_sent_packets = 1
	// Total data received.
	host_total_received_data = 2
	// Total UDP packets received.
	host_total_received_packets = 3
}

enum ENetPacketPeerPeerState #

enum ENetPacketPeerPeerState as i64 {
	// The peer is disconnected.
	state_disconnected = 0
	// The peer is currently attempting to connect.
	state_connecting = 1
	// The peer has acknowledged the connection request.
	state_acknowledging_connect = 2
	// The peer is currently connecting.
	state_connection_pending = 3
	// The peer has successfully connected, but is not ready to communicate with yet ([constant STATE_CONNECTED]).
	state_connection_succeeded = 4
	// The peer is currently connected and ready to communicate with.
	state_connected = 5
	// The peer is expected to disconnect after it has no more outgoing packets to send.
	state_disconnect_later = 6
	// The peer is currently disconnecting.
	state_disconnecting = 7
	// The peer has acknowledged the disconnection request.
	state_acknowledging_disconnect = 8
	// The peer has lost connection, but is not considered truly disconnected (as the peer didn't acknowledge the disconnection request).
	state_zombie = 9
}

enum ENetPacketPeerPeerStatistic #

enum ENetPacketPeerPeerStatistic as i64 {
	// Mean packet loss of reliable packets as a ratio with respect to the [constant PACKET_LOSS_SCALE].
	peer_packet_loss = 0
	// Packet loss variance.
	peer_packet_loss_variance = 1
	// The time at which packet loss statistics were last updated (in milliseconds since the connection started). The interval for packet loss statistics updates is 10 seconds, and at least one packet must have been sent since the last statistics update.
	peer_packet_loss_epoch = 2
	// Mean packet round trip time for reliable packets.
	peer_round_trip_time = 3
	// Variance of the mean round trip time.
	peer_round_trip_time_variance = 4
	// Last recorded round trip time for a reliable packet.
	peer_last_round_trip_time = 5
	// Variance of the last trip time recorded.
	peer_last_round_trip_time_variance = 6
	// The peer's current throttle status.
	peer_packet_throttle = 7
	// The maximum number of unreliable packets that should not be dropped. This value is always greater than or equal to `1`. The initial value is equal to [constant PACKET_THROTTLE_SCALE].
	peer_packet_throttle_limit = 8
	// Internal value used to increment the packet throttle counter. The value is hardcoded to `7` and cannot be changed. You probably want to look at [constant PEER_PACKET_THROTTLE_ACCELERATION] instead.
	peer_packet_throttle_counter = 9
	// The time at which throttle statistics were last updated (in milliseconds since the connection started). The interval for throttle statistics updates is [constant PEER_PACKET_THROTTLE_INTERVAL].
	peer_packet_throttle_epoch = 10
	// The throttle's acceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent [i]more[/i] often. The default value is `2`.
	peer_packet_throttle_acceleration = 11
	// The throttle's deceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent [i]less[/i] often. The default value is `2`.
	peer_packet_throttle_deceleration = 12
	// The interval over which the lowest mean round trip time should be measured for use by the throttle mechanism (in milliseconds). The default value is `5000`.
	peer_packet_throttle_interval = 13
}

enum EditorContextMenuPluginContextMenuSlot #

enum EditorContextMenuPluginContextMenuSlot as i64 {
	// Context menu of Scene dock. [method _popup_menu] will be called with a list of paths to currently selected nodes, while option callback will receive the list of currently selected nodes.
	context_slot_scene_tree = 0
	// Context menu of FileSystem dock. [method _popup_menu] and option callback will be called with list of paths of the currently selected files.
	context_slot_filesystem = 1
	// Context menu of Script editor's script tabs. [method _popup_menu] will be called with the path to the currently edited script, while option callback will receive reference to that script.
	context_slot_script_editor = 2
	// The "Create..." submenu of FileSystem dock's context menu, or the "New" section of the main context menu when empty space is clicked. [method _popup_menu] and option callback will be called with the path of the currently selected folder. When clicking the empty space, the list of paths for popup method will be empty.
	// ```gdscript
	// func _popup_menu(paths):
	//     if paths.is_empty():
	//         add_context_menu_item("New Image File...", create_image)
	//     else:
	//         add_context_menu_item("Image File...", create_image)
	// ```
	context_slot_filesystem_create = 3
	// Context menu of Script editor's code editor. [method _popup_menu] will be called with the path to the [CodeEdit] node. You can fetch it using this code:
	// ```gdscript
	// func _popup_menu(paths):
	// var code_edit = Engine.get_main_loop().root.get_node(paths[0]);
	// ```
	// The option callback will receive reference to that node. You can use [CodeEdit] methods to perform symbol lookups etc.
	context_slot_script_editor_code = 4
	// Context menu of scene tabs. [method _popup_menu] will be called with the path of the clicked scene, or empty [PackedStringArray] if the menu was opened on empty space. The option callback will receive the path of the clicked scene, or empty [String] if none was clicked.
	context_slot_scene_tabs = 5
	// Context menu of 2D editor's basic right-click menu. [method _popup_menu] will be called with paths to all [CanvasItem] nodes under the cursor. You can fetch them using this code:
	// ```gdscript
	// func _popup_menu(paths):
	// var canvas_item = Engine.get_main_loop().root.get_node(paths[0]); # Replace 0 with the desired index.
	// ```
	// The paths array is empty if there weren't any nodes under cursor. The option callback will receive a typed array of [CanvasItem] nodes.
	context_slot_2d_editor = 6
}

enum EditorExportPlatformDebugFlags #

enum EditorExportPlatformDebugFlags as i64 {
	// Flag is set if the remotely debugged project is expected to use the remote file system. If set, [method gen_export_flags] will append `--remote-fs` and `--remote-fs-password` (if [member EditorSettings.filesystem/file_server/password] is defined) command line arguments to the returned list.
	debug_flag_dumb_client = 1
	// Flag is set if remote debug is enabled. If set, [method gen_export_flags] will append `--remote-debug` and `--breakpoints` (if breakpoints are selected in the script editor or added by the plugin) command line arguments to the returned list.
	debug_flag_remote_debug = 2
	// Flag is set if remotely debugged project is running on the localhost. If set, [method gen_export_flags] will use `localhost` instead of [member EditorSettings.network/debug/remote_host] as remote debugger host.
	debug_flag_remote_debug_localhost = 4
	// Flag is set if the "Visible Collision Shapes" remote debug option is enabled. If set, [method gen_export_flags] will append the `--debug-collisions` command line argument to the returned list.
	debug_flag_view_collisions = 8
	// Flag is set if the "Visible Navigation" remote debug option is enabled. If set, [method gen_export_flags] will append the `--debug-navigation` command line argument to the returned list.
	debug_flag_view_navigation = 16
}

enum EditorExportPlatformExportMessageType #

enum EditorExportPlatformExportMessageType as i64 {
	// Invalid message type used as the default value when no type is specified.
	export_message_none = 0
	// Message type for informational messages that have no effect on the export.
	export_message_info = 1
	// Message type for warning messages that should be addressed but still allow to complete the export.
	export_message_warning = 2
	// Message type for error messages that must be addressed and fail the export.
	export_message_error = 3
}

enum EditorExportPresetExportFilter #

enum EditorExportPresetExportFilter as i64 {
	export_all_resources       = 0
	export_selected_scenes     = 1
	export_selected_resources  = 2
	exclude_selected_resources = 3
	export_customized          = 4
}

enum EditorExportPresetFileExportMode #

enum EditorExportPresetFileExportMode as i64 {
	mode_file_not_customized = 0
	mode_file_strip          = 1
	mode_file_keep           = 2
	mode_file_remove         = 3
}

enum EditorExportPresetScriptExportMode #

enum EditorExportPresetScriptExportMode as i64 {
	mode_script_text                     = 0
	mode_script_binary_tokens            = 1
	mode_script_binary_tokens_compressed = 2
}

enum EditorFeatureProfileFeature #

enum EditorFeatureProfileFeature as i64 {
	// The 3D editor. If this feature is disabled, the 3D editor won't display but 3D nodes will still display in the Create New Node dialog.
	feature_3d = 0
	// The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display.
	feature_script = 1
	// The AssetLib tab. If this feature is disabled, the AssetLib tab won't display.
	feature_asset_lib = 2
	// Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only.
	feature_scene_tree = 3
	// The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor.
	feature_node_dock = 4
	// The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible.
	feature_filesystem_dock = 5
	// The Import dock. If this feature is disabled, the Import dock won't be visible.
	feature_import_dock = 6
	// The History dock. If this feature is disabled, the History dock won't be visible.
	feature_history_dock = 7
	// The Game tab, which allows embedding the game window and selecting nodes by clicking inside of it. If this feature is disabled, the Game tab won't display.
	feature_game = 8
	// Represents the size of the [enum Feature] enum.
	feature_max = 9
}

enum EditorFileDialogAccess #

enum EditorFileDialogAccess as i64 {
	// The [EditorFileDialog] can only view `res://` directory contents.
	access_resources = 0
	// The [EditorFileDialog] can only view `user://` directory contents.
	access_userdata = 1
	// The [EditorFileDialog] can view the entire local file system.
	access_filesystem = 2
}

enum EditorFileDialogDisplayMode #

enum EditorFileDialogDisplayMode as i64 {
	// The [EditorFileDialog] displays resources as thumbnails.
	display_thumbnails = 0
	// The [EditorFileDialog] displays resources as a list of filenames.
	display_list = 1
}

enum EditorFileDialogFileMode #

enum EditorFileDialogFileMode as i64 {
	// The [EditorFileDialog] can select only one file. Accepting the window will open the file.
	file_mode_open_file = 0
	// The [EditorFileDialog] can select multiple files. Accepting the window will open all files.
	file_mode_open_files = 1
	// The [EditorFileDialog] can select only one directory. Accepting the window will open the directory.
	file_mode_open_dir = 2
	// The [EditorFileDialog] can select a file or directory. Accepting the window will open it.
	file_mode_open_any = 3
	// The [EditorFileDialog] can select only one file. Accepting the window will save the file.
	file_mode_save_file = 4
}

enum EditorPluginAfterGUIInput #

enum EditorPluginAfterGUIInput as i64 {
	// Forwards the [InputEvent] to other EditorPlugins.
	after_gui_input_pass = 0
	// Prevents the [InputEvent] from reaching other Editor classes.
	after_gui_input_stop = 1
	// Pass the [InputEvent] to other editor plugins except the main [Node3D] one. This can be used to prevent node selection changes and work with sub-gizmos instead.
	after_gui_input_custom = 2
}

enum EditorPluginCustomControlContainer #

enum EditorPluginCustomControlContainer as i64 {
	// Main editor toolbar, next to play buttons.
	container_toolbar = 0
	// The toolbar that appears when 3D editor is active.
	container_spatial_editor_menu = 1
	// Left sidebar of the 3D editor.
	container_spatial_editor_side_left = 2
	// Right sidebar of the 3D editor.
	container_spatial_editor_side_right = 3
	// Bottom panel of the 3D editor.
	container_spatial_editor_bottom = 4
	// The toolbar that appears when 2D editor is active.
	container_canvas_editor_menu = 5
	// Left sidebar of the 2D editor.
	container_canvas_editor_side_left = 6
	// Right sidebar of the 2D editor.
	container_canvas_editor_side_right = 7
	// Bottom panel of the 2D editor.
	container_canvas_editor_bottom = 8
	// Bottom section of the inspector.
	container_inspector_bottom = 9
	// Tab of Project Settings dialog, to the left of other tabs.
	container_project_setting_tab_left = 10
	// Tab of Project Settings dialog, to the right of other tabs.
	container_project_setting_tab_right = 11
}

enum EditorPluginDockSlot #

enum EditorPluginDockSlot as i64 {
	// Dock slot, left side, upper-left (empty in default layout).
	dock_slot_left_ul = 0
	// Dock slot, left side, bottom-left (empty in default layout).
	dock_slot_left_bl = 1
	// Dock slot, left side, upper-right (in default layout includes Scene and Import docks).
	dock_slot_left_ur = 2
	// Dock slot, left side, bottom-right (in default layout includes FileSystem dock).
	dock_slot_left_br = 3
	// Dock slot, right side, upper-left (in default layout includes Inspector, Node, and History docks).
	dock_slot_right_ul = 4
	// Dock slot, right side, bottom-left (empty in default layout).
	dock_slot_right_bl = 5
	// Dock slot, right side, upper-right (empty in default layout).
	dock_slot_right_ur = 6
	// Dock slot, right side, bottom-right (empty in default layout).
	dock_slot_right_br = 7
	// Represents the size of the [enum DockSlot] enum.
	dock_slot_max = 8
}

enum EditorScenePostImportPluginInternalImportCategory #

enum EditorScenePostImportPluginInternalImportCategory as i64 {
	internal_import_category_node             = 0
	internal_import_category_mesh_3d_node     = 1
	internal_import_category_mesh             = 2
	internal_import_category_material         = 3
	internal_import_category_animation        = 4
	internal_import_category_animation_node   = 5
	internal_import_category_skeleton_3d_node = 6
	internal_import_category_max              = 7
}

enum EditorToasterSeverity #

enum EditorToasterSeverity as i64 {
	// Toast will display with an INFO severity.
	severity_info = 0
	// Toast will display with a WARNING severity and have a corresponding color.
	severity_warning = 1
	// Toast will display with an ERROR severity and have a corresponding color.
	severity_error = 2
}

enum EditorUndoRedoManagerSpecialHistory #

enum EditorUndoRedoManagerSpecialHistory as i64 {
	// Global history not associated with any scene, but with external resources etc.
	global_history = 0
	// History associated with remote inspector. Used when live editing a running project.
	remote_history = -9
	// Invalid "null" history. It's a special value, not associated with any object.
	invalid_history = -99
}

enum EditorVCSInterfaceChangeType #

enum EditorVCSInterfaceChangeType as i64 {
	// A new file has been added.
	change_type_new = 0
	// An earlier added file has been modified.
	change_type_modified = 1
	// An earlier added file has been renamed.
	change_type_renamed = 2
	// An earlier added file has been deleted.
	change_type_deleted = 3
	// An earlier added file has been typechanged.
	change_type_typechange = 4
	// A file is left unmerged.
	change_type_unmerged = 5
}

enum EditorVCSInterfaceTreeArea #

enum EditorVCSInterfaceTreeArea as i64 {
	// A commit is encountered from the commit area.
	tree_area_commit = 0
	// A file is encountered from the staged area.
	tree_area_staged = 1
	// A file is encountered from the unstaged area.
	tree_area_unstaged = 2
}

enum EnvironmentAmbientSource #

enum EnvironmentAmbientSource as i64 {
	// Gather ambient light from whichever source is specified as the background.
	ambient_source_bg = 0
	// Disable ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY].
	ambient_source_disabled = 1
	// Specify a specific [Color] for ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY].
	ambient_source_color = 2
	// Gather ambient light from the [Sky] regardless of what the background is.
	ambient_source_sky = 3
}

enum EnvironmentBGMode #

enum EnvironmentBGMode as i64 {
	// Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/defaults/default_clear_color].
	bg_clear_color = 0
	// Clears the background using a custom clear color.
	bg_color = 1
	// Displays a user-defined sky in the background.
	bg_sky = 2
	// Displays a [CanvasLayer] in the background.
	bg_canvas = 3
	// Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera.
	bg_keep = 4
	// Displays a camera feed in the background.
	bg_camera_feed = 5
	// Represents the size of the [enum BGMode] enum.
	bg_max = 6
}

enum EnvironmentFogMode #

enum EnvironmentFogMode as i64 {
	// Use a physically-based fog model defined primarily by fog density.
	fog_mode_exponential = 0
	// Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control.
	fog_mode_depth = 1
}

enum EnvironmentGlowBlendMode #

enum EnvironmentGlowBlendMode as i64 {
	// Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
	glow_blend_mode_additive = 0
	// Screen glow blending mode. Increases brightness, used frequently with bloom.
	glow_blend_mode_screen = 1
	// Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).
	glow_blend_mode_softlight = 2
	// Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.
	glow_blend_mode_replace = 3
	// Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
	glow_blend_mode_mix = 4
}

enum EnvironmentReflectionSource #

enum EnvironmentReflectionSource as i64 {
	// Use the background for reflections.
	reflection_source_bg = 0
	// Disable reflections. This provides a slight performance boost over other options.
	reflection_source_disabled = 1
	// Use the [Sky] for reflections regardless of what the background is.
	reflection_source_sky = 2
}

enum EnvironmentSDFGIYScale #

enum EnvironmentSDFGIYScale as i64 {
	// Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality.
	sdfgi_y_scale_50_percent = 0
	// Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales.
	sdfgi_y_scale_75_percent = 1
	// Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings.
	sdfgi_y_scale_100_percent = 2
}

enum EnvironmentToneMapper #

enum EnvironmentToneMapper as i64 {
	// Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper.
	tone_mapper_linear = 0
	// A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than [constant TONE_MAPPER_LINEAR].
	// [b]Note:[/b] When [member tonemap_white] is left at the default value of `1.0`, [constant TONE_MAPPER_REINHARDT] produces an identical image to [constant TONE_MAPPER_LINEAR].
	tone_mapper_reinhardt = 1
	// Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than [constant TONE_MAPPER_REINHARDT]. Slightly slower than [constant TONE_MAPPER_REINHARDT].
	tone_mapper_filmic = 2
	// Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than [constant TONE_MAPPER_FILMIC].
	// [b]Note:[/b] This tonemapping operator is called "ACES Fitted" in Godot 3.x.
	tone_mapper_aces = 3
	// Uses a film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option.
	// [b]Note:[/b] [member tonemap_white] is fixed at a value of `16.29`, which makes [constant TONE_MAPPER_AGX] unsuitable for use with the Mobile rendering method.
	tone_mapper_agx = 4
}

enum EulerOrder #

enum EulerOrder as i64 {
	// Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last.
	euler_order_xyz = 0
	// Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last.
	euler_order_xzy = 1
	// Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last.
	euler_order_yxz = 2
	// Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last.
	euler_order_yzx = 3
	// Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last.
	euler_order_zxy = 4
	// Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last.
	euler_order_zyx = 5
}

enum FastNoiseLiteCellularDistanceFunction #

enum FastNoiseLiteCellularDistanceFunction as i64 {
	// Euclidean distance to the nearest point.
	distance_euclidean = 0
	// Squared Euclidean distance to the nearest point.
	distance_euclidean_squared = 1
	// Manhattan distance (taxicab metric) to the nearest point.
	distance_manhattan = 2
	// Blend of [constant DISTANCE_EUCLIDEAN] and [constant DISTANCE_MANHATTAN] to give curved cell boundaries.
	distance_hybrid = 3
}

enum FastNoiseLiteCellularReturnType #

enum FastNoiseLiteCellularReturnType as i64 {
	// The cellular distance function will return the same value for all points within a cell.
	return_cell_value = 0
	// The cellular distance function will return a value determined by the distance to the nearest point.
	return_distance = 1
	// The cellular distance function returns the distance to the second-nearest point.
	return_distance2 = 2
	// The distance to the nearest point is added to the distance to the second-nearest point.
	return_distance2_add = 3
	// The distance to the nearest point is subtracted from the distance to the second-nearest point.
	return_distance2_sub = 4
	// The distance to the nearest point is multiplied with the distance to the second-nearest point.
	return_distance2_mul = 5
	// The distance to the nearest point is divided by the distance to the second-nearest point.
	return_distance2_div = 6
}

enum FastNoiseLiteDomainWarpFractalType #

enum FastNoiseLiteDomainWarpFractalType as i64 {
	// No fractal noise for warping the space.
	domain_warp_fractal_none = 0
	// Warping the space progressively, octave for octave, resulting in a more "liquified" distortion.
	domain_warp_fractal_progressive = 1
	// Warping the space independently for each octave, resulting in a more chaotic distortion.
	domain_warp_fractal_independent = 2
}

enum FastNoiseLiteDomainWarpType #

enum FastNoiseLiteDomainWarpType as i64 {
	// The domain is warped using the simplex noise algorithm.
	domain_warp_simplex = 0
	// The domain is warped using a simplified version of the simplex noise algorithm.
	domain_warp_simplex_reduced = 1
	// The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant).
	domain_warp_basic_grid = 2
}

enum FastNoiseLiteFractalType #

enum FastNoiseLiteFractalType as i64 {
	// No fractal noise.
	fractal_none = 0
	// Method using Fractional Brownian Motion to combine octaves into a fractal.
	fractal_fbm = 1
	// Method of combining octaves into a fractal resulting in a "ridged" look.
	fractal_ridged = 2
	// Method of combining octaves into a fractal with a ping pong effect.
	fractal_ping_pong = 3
}

enum FastNoiseLiteNoiseType #

enum FastNoiseLiteNoiseType as i64 {
	// A lattice of points are assigned random values then interpolated based on neighboring values.
	type_value = 5
	// Similar to value noise ([constant TYPE_VALUE]), but slower. Has more variance in peaks and valleys.
	// Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap.
	type_value_cubic = 4
	// A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices.
	type_perlin = 3
	// Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value.
	type_cellular = 2
	// As opposed to [constant TYPE_PERLIN], gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. Internally uses FastNoiseLite's OpenSimplex2 noise type.
	type_simplex = 0
	// Modified, higher quality version of [constant TYPE_SIMPLEX], but slower. Internally uses FastNoiseLite's OpenSimplex2S noise type.
	type_simplex_smooth = 1
}

enum FileAccessCompressionMode #

enum FileAccessCompressionMode as i64 {
	// Uses the [url=https://fastlz.org/]FastLZ[/url] compression method.
	compression_fastlz = 0
	// Uses the [url=https://en.wikipedia.org/wiki/DEFLATE]DEFLATE[/url] compression method.
	compression_deflate = 1
	// Uses the [url=https://facebook.github.io/zstd/]Zstandard[/url] compression method.
	compression_zstd = 2
	// Uses the [url=https://www.gzip.org/]gzip[/url] compression method.
	compression_gzip = 3
	// Uses the [url=https://github.com/google/brotli]brotli[/url] compression method (only decompression is supported).
	compression_brotli = 4
}

enum FileAccessModeFlags #

enum FileAccessModeFlags as i64 {
	// Opens the file for read operations. The file cursor is positioned at the beginning of the file.
	read = 1
	// Opens the file for write operations. The file is created if it does not exist, and truncated if it does.
	// [b]Note:[/b] When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive].
	write = 2
	// Opens the file for read and write operations. Does not truncate the file. The file cursor is positioned at the beginning of the file.
	read_write = 3
	// Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The file cursor is positioned at the beginning of the file.
	// [b]Note:[/b] When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive].
	write_read = 7
}

enum FileAccessUnixPermissionFlags #

enum FileAccessUnixPermissionFlags as i64 {
	// Read for owner bit.
	unix_read_owner = 256
	// Write for owner bit.
	unix_write_owner = 128
	// Execute for owner bit.
	unix_execute_owner = 64
	// Read for group bit.
	unix_read_group = 32
	// Write for group bit.
	unix_write_group = 16
	// Execute for group bit.
	unix_execute_group = 8
	// Read for other bit.
	unix_read_other = 4
	// Write for other bit.
	unix_write_other = 2
	// Execute for other bit.
	unix_execute_other = 1
	// Set user id on execution bit.
	unix_set_user_id = 2048
	// Set group id on execution bit.
	unix_set_group_id = 1024
	// Restricted deletion (sticky) bit.
	unix_restricted_delete = 512
}

enum FileDialogAccess #

enum FileDialogAccess as i64 {
	// The dialog only allows accessing files under the [Resource] path (`res://`).
	access_resources = 0
	// The dialog only allows accessing files under user data path (`user://`).
	access_userdata = 1
	// The dialog allows accessing files on the whole file system.
	access_filesystem = 2
}

enum FileDialogCustomization #

enum FileDialogCustomization as i64 {
	// Toggles visibility of the favorite button, and the favorite list on the left side of the dialog.
	// Equivalent to [member hidden_files_toggle_enabled].
	customization_hidden_files = 0
	// If enabled, shows the button for creating new directories (when using [constant FILE_MODE_OPEN_DIR], [constant FILE_MODE_OPEN_ANY], or [constant FILE_MODE_SAVE_FILE]).
	// Equivalent to [member folder_creation_enabled].
	customization_create_folder = 1
	// If enabled, shows the toggle file filter button.
	// Equivalent to [member file_filter_toggle_enabled].
	customization_file_filter = 2
	// If enabled, shows the file sorting options button.
	// Equivalent to [member file_sort_options_enabled].
	customization_file_sort = 3
	// If enabled, shows the toggle favorite button and favorite list on the left side of the dialog.
	// Equivalent to [member favorites_enabled].
	customization_favorites = 4
	// If enabled, shows the recent directories list on the left side of the dialog.
	// Equivalent to [member recent_list_enabled].
	customization_recent = 5
	// If enabled, shows the layout switch buttons (list/thumbnails).
	// Equivalent to [member layout_toggle_enabled].
	customization_layout = 6
}

enum FileDialogDisplayMode #

enum FileDialogDisplayMode as i64 {
	// The dialog displays files as a grid of thumbnails. Use [theme_item thumbnail_size] to adjust their size.
	display_thumbnails = 0
	// The dialog displays files as a list of filenames.
	display_list = 1
}

enum FileDialogFileMode #

enum FileDialogFileMode as i64 {
	// The dialog allows selecting one, and only one file.
	file_mode_open_file = 0
	// The dialog allows selecting multiple files.
	file_mode_open_files = 1
	// The dialog only allows selecting a directory, disallowing the selection of any file.
	file_mode_open_dir = 2
	// The dialog allows selecting one file or directory.
	file_mode_open_any = 3
	// The dialog will warn when a file exists.
	file_mode_save_file = 4
}

enum FlowContainerAlignmentMode #

enum FlowContainerAlignmentMode as i64 {
	// The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout).
	alignment_begin = 0
	// The child controls will be centered in the container.
	alignment_center = 1
	// The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout).
	alignment_end = 2
}

enum FlowContainerLastWrapAlignmentMode #

enum FlowContainerLastWrapAlignmentMode as i64 {
	// The last partially filled row or column will wrap aligned to the previous row or column in accordance with [member alignment].
	last_wrap_alignment_inherit = 0
	// The last partially filled row or column will wrap aligned to the beginning of the previous row or column.
	last_wrap_alignment_begin = 1
	// The last partially filled row or column will wrap aligned to the center of the previous row or column.
	last_wrap_alignment_center = 2
	// The last partially filled row or column will wrap aligned to the end of the previous row or column.
	last_wrap_alignment_end = 3
}

enum FoldableContainerTitlePosition #

enum FoldableContainerTitlePosition as i64 {
	// Makes the title appear at the top of the container.
	position_top = 0
	// Makes the title appear at the bottom of the container. Also makes all StyleBoxes flipped vertically.
	position_bottom = 1
}

enum GDError #

enum GDError as i64 {
	// Methods that return [enum Error] return [constant OK] when no error occurred.
	// Since [constant OK] has value `0`, and all other error constants are positive integers, it can also be used in boolean checks.
	// ```gdscript
	// var error = method_that_returns_error()
	// if error != OK:
	// printerr("Failure!")
	//
	// # Or, alternatively:
	// if error:
	// printerr("Still failing!")
	// ```
	// [b]Note:[/b] Many functions do not return an error code, but will print error messages to standard output.
	ok = 0
	// Generic error.
	failed = 1
	// Unavailable error.
	err_unavailable = 2
	// Unconfigured error.
	err_unconfigured = 3
	// Unauthorized error.
	err_unauthorized = 4
	// Parameter range error.
	err_parameter_range_error = 5
	// Out of memory (OOM) error.
	err_out_of_memory = 6
	// File: Not found error.
	err_file_not_found = 7
	// File: Bad drive error.
	err_file_bad_drive = 8
	// File: Bad path error.
	err_file_bad_path = 9
	// File: No permission error.
	err_file_no_permission = 10
	// File: Already in use error.
	err_file_already_in_use = 11
	// File: Can't open error.
	err_file_cant_open = 12
	// File: Can't write error.
	err_file_cant_write = 13
	// File: Can't read error.
	err_file_cant_read = 14
	// File: Unrecognized error.
	err_file_unrecognized = 15
	// File: Corrupt error.
	err_file_corrupt = 16
	// File: Missing dependencies error.
	err_file_missing_dependencies = 17
	// File: End of file (EOF) error.
	err_file_eof = 18
	// Can't open error.
	err_cant_open = 19
	// Can't create error.
	err_cant_create = 20
	// Query failed error.
	err_query_failed = 21
	// Already in use error.
	err_already_in_use = 22
	// Locked error.
	err_locked = 23
	// Timeout error.
	err_timeout = 24
	// Can't connect error.
	err_cant_connect = 25
	// Can't resolve error.
	err_cant_resolve = 26
	// Connection error.
	err_connection_error = 27
	// Can't acquire resource error.
	err_cant_acquire_resource = 28
	// Can't fork process error.
	err_cant_fork = 29
	// Invalid data error.
	err_invalid_data = 30
	// Invalid parameter error.
	err_invalid_parameter = 31
	// Already exists error.
	err_already_exists = 32
	// Does not exist error.
	err_does_not_exist = 33
	// Database: Read error.
	err_database_cant_read = 34
	// Database: Write error.
	err_database_cant_write = 35
	// Compilation failed error.
	err_compilation_failed = 36
	// Method not found error.
	err_method_not_found = 37
	// Linking failed error.
	err_link_failed = 38
	// Script failed error.
	err_script_failed = 39
	// Cycling link (import cycle) error.
	err_cyclic_link = 40
	// Invalid declaration error.
	err_invalid_declaration = 41
	// Duplicate symbol error.
	err_duplicate_symbol = 42
	// Parse error.
	err_parse_error = 43
	// Busy error.
	err_busy = 44
	// Skip error.
	err_skip = 45
	// Help error. Used internally when passing `--version` or `--help` as executable options.
	err_help = 46
	// Bug error, caused by an implementation issue in the method.
	// [b]Note:[/b] If a built-in method returns this code, please open an issue on [url=https://github.com/godotengine/godot/issues]the GitHub Issue Tracker[/url].
	err_bug = 47
	// Printer on fire error (This is an easter egg, no built-in methods return this error code).
	err_printer_on_fire = 48
}

enum GDExtensionCallErrorType #

enum GDExtensionCallErrorType {
	gdextension_call_ok
	gdextension_call_error_invalid_method
	gdextension_call_error_invalid_argument
	gdextension_call_error_too_many_arguments
	gdextension_call_error_too_few_arguments
	gdextension_call_error_instance_is_null
	gdextension_call_error_method_not_const
}

enum GDExtensionClassMethodArgumentMetadata #

enum GDExtensionClassMethodArgumentMetadata {
	gdextension_method_argument_metadata_none
	gdextension_method_argument_metadata_int_is_int8
	gdextension_method_argument_metadata_int_is_int16
	gdextension_method_argument_metadata_int_is_int32
	gdextension_method_argument_metadata_int_is_int64
	gdextension_method_argument_metadata_int_is_uint8
	gdextension_method_argument_metadata_int_is_uint16
	gdextension_method_argument_metadata_int_is_uint32
	gdextension_method_argument_metadata_int_is_uint64
	gdextension_method_argument_metadata_real_is_float
	gdextension_method_argument_metadata_real_is_double
}

enum GDExtensionClassMethodFlags #

enum GDExtensionClassMethodFlags {
	gdextension_method_flag_normal  = 1
	gdextension_method_flag_editor  = 2
	gdextension_method_flag_const   = 4
	gdextension_method_flag_virtual = 8
	gdextension_method_flag_vararg  = 16
	gdextension_method_flag_static  = 32
}

enum GDExtensionInitializationLevel #

enum GDExtensionInitializationLevel as i64 {
	// The library is initialized at the same time as the core features of the engine.
	initialization_level_core = 0
	// The library is initialized at the same time as the engine's servers (such as [RenderingServer] or [PhysicsServer3D]).
	initialization_level_servers = 1
	// The library is initialized at the same time as the engine's scene-related classes.
	initialization_level_scene = 2
	// The library is initialized at the same time as the engine's editor classes. Only happens when loading the GDExtension in the editor.
	initialization_level_editor = 3
}

enum GDExtensionManagerLoadStatus #

enum GDExtensionManagerLoadStatus as i64 {
	// The extension has loaded successfully.
	load_status_ok = 0
	// The extension has failed to load, possibly because it does not exist or has missing dependencies.
	load_status_failed = 1
	// The extension has already been loaded.
	load_status_already_loaded = 2
	// The extension has not been loaded.
	load_status_not_loaded = 3
	// The extension requires the application to restart to fully load.
	load_status_needs_restart = 4
}

enum GDExtensionVariantOperator #

enum GDExtensionVariantOperator {
	op_equal
	op_not_equal
	op_less
	op_less_equal
	op_greater
	op_greater_equal
	op_add
	op_subtract
	op_multiply
	op_divide
	op_negate
	op_positive
	op_module
	op_power
	op_shift_left
	op_shift_right
	op_bit_and
	op_bit_or
	op_bit_xor
	op_bit_negate
	op_and
	op_or
	op_xor
	op_not
	op_in
	op_max
}

enum GDExtensionVariantType #

enum GDExtensionVariantType {
	type_nil
	type_bool
	type_i64
	type_f64
	type_string
	type_vector2
	type_vector2i
	type_rect2
	type_rect2i
	type_vector3
	type_vector3i
	type_transform2d
	type_vector4
	type_vector4i
	type_plane
	type_quaternion
	type_aabb
	type_basis
	type_transform3d
	type_projection
	type_color
	type_stringname
	type_nodepath
	type_rid
	type_object
	type_callable
	type_signal
	type_dictionary
	type_array
	type_packedbytearray
	type_packedint32array
	type_packedint64array
	type_packedfloat32array
	type_packedfloat64array
	type_packedstringarray
	type_packedvector2array
	type_packedvector3array
	type_packedcolorarray
	type_packedvector4array
	type_variantmax
}

Todo: use the enums generated from api dump

enum GLTFAccessorGLTFComponentType #

enum GLTFAccessorGLTFComponentType as i64 {
	// Component type "NONE". This is not a valid component type, and is used to indicate that the component type is not set.
	component_type_none = 0
	// Component type "BYTE". The value is `0x1400` which comes from OpenGL. This indicates data is stored in 1-byte or 8-bit signed integers. This is a core part of the glTF specification.
	component_type_signed_byte = 5120
	// Component type "UNSIGNED_BYTE". The value is `0x1401` which comes from OpenGL. This indicates data is stored in 1-byte or 8-bit unsigned integers. This is a core part of the glTF specification.
	component_type_unsigned_byte = 5121
	// Component type "SHORT". The value is `0x1402` which comes from OpenGL. This indicates data is stored in 2-byte or 16-bit signed integers. This is a core part of the glTF specification.
	component_type_signed_short = 5122
	// Component type "UNSIGNED_SHORT". The value is `0x1403` which comes from OpenGL. This indicates data is stored in 2-byte or 16-bit unsigned integers. This is a core part of the glTF specification.
	component_type_unsigned_short = 5123
	// Component type "INT". The value is `0x1404` which comes from OpenGL. This indicates data is stored in 4-byte or 32-bit signed integers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including `KHR_interactivity`.
	component_type_signed_int = 5124
	// Component type "UNSIGNED_INT". The value is `0x1405` which comes from OpenGL. This indicates data is stored in 4-byte or 32-bit unsigned integers. This is a core part of the glTF specification.
	component_type_unsigned_int = 5125
	// Component type "FLOAT". The value is `0x1406` which comes from OpenGL. This indicates data is stored in 4-byte or 32-bit floating-point numbers. This is a core part of the glTF specification.
	component_type_single_float = 5126
	// Component type "DOUBLE". The value is `0x140A` which comes from OpenGL. This indicates data is stored in 8-byte or 64-bit floating-point numbers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including `KHR_interactivity`.
	component_type_double_float = 5130
	// Component type "HALF_FLOAT". The value is `0x140B` which comes from OpenGL. This indicates data is stored in 2-byte or 16-bit floating-point numbers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including `KHR_interactivity`.
	component_type_half_float = 5131
	// Component type "LONG". The value is `0x140E` which comes from OpenGL. This indicates data is stored in 8-byte or 64-bit signed integers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including `KHR_interactivity`.
	component_type_signed_long = 5134
	// Component type "UNSIGNED_LONG". The value is `0x140F` which comes from OpenGL. This indicates data is stored in 8-byte or 64-bit unsigned integers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including `KHR_interactivity`.
	component_type_unsigned_long = 5135
}

enum GLTFAccessorType #

enum GLTFAccessorType as i64 {
	// Accessor type "SCALAR". For the glTF object model, this can be used to map to a single float, int, or bool value, or a float array.
	type_scalar = 0
	// Accessor type "VEC2". For the glTF object model, this maps to "float2", represented in the glTF JSON as an array of two floats.
	type_vec2 = 1
	// Accessor type "VEC3". For the glTF object model, this maps to "float3", represented in the glTF JSON as an array of three floats.
	type_vec3 = 2
	// Accessor type "VEC4". For the glTF object model, this maps to "float4", represented in the glTF JSON as an array of four floats.
	type_vec4 = 3
	// Accessor type "MAT2". For the glTF object model, this maps to "float2x2", represented in the glTF JSON as an array of four floats.
	type_mat2 = 4
	// Accessor type "MAT3". For the glTF object model, this maps to "float3x3", represented in the glTF JSON as an array of nine floats.
	type_mat3 = 5
	// Accessor type "MAT4". For the glTF object model, this maps to "float4x4", represented in the glTF JSON as an array of sixteen floats.
	type_mat4 = 6
}

enum GLTFDocumentRootNodeMode #

enum GLTFDocumentRootNodeMode as i64 {
	// Treat the Godot scene's root node as the root node of the glTF file, and mark it as the single root node via the `GODOT_single_root` glTF extension. This will be parsed the same as [constant ROOT_NODE_MODE_KEEP_ROOT] if the implementation does not support `GODOT_single_root`.
	root_node_mode_single_root = 0
	// Treat the Godot scene's root node as the root node of the glTF file, but do not mark it as anything special. An extra root node will be generated when importing into Godot. This uses only vanilla glTF features. This is equivalent to the behavior in Godot 4.1 and earlier.
	root_node_mode_keep_root = 1
	// Treat the Godot scene's root node as the name of the glTF scene, and add all of its children as root nodes of the glTF file. This uses only vanilla glTF features. This avoids an extra root node, but only the name of the Godot scene's root node will be preserved, as it will not be saved as a node.
	root_node_mode_multi_root = 2
}

enum GLTFDocumentVisibilityMode #

enum GLTFDocumentVisibilityMode as i64 {
	// If the scene contains any non-visible nodes, include them, mark them as non-visible with `KHR_node_visibility`, and require that importers respect their non-visibility. Downside: If the importer does not support `KHR_node_visibility`, the file cannot be imported.
	visibility_mode_include_required = 0
	// If the scene contains any non-visible nodes, include them, mark them as non-visible with `KHR_node_visibility`, and do not impose any requirements on importers. Downside: If the importer does not support `KHR_node_visibility`, invisible objects will be visible.
	visibility_mode_include_optional = 1
	// If the scene contains any non-visible nodes, do not include them in the export. This is the same as the behavior in Godot 4.4 and earlier. Downside: Invisible nodes will not exist in the exported file.
	visibility_mode_exclude = 2
}

enum GLTFObjectModelPropertyGLTFObjectModelType #

enum GLTFObjectModelPropertyGLTFObjectModelType as i64 {
	// Unknown or not set object model type. If the object model type is set to this value, the real type still needs to be determined.
	gltf_object_model_type_unknown = 0
	// Object model type "bool". Represented in the glTF JSON as a boolean, and encoded in a [GLTFAccessor] as "SCALAR". When encoded in an accessor, a value of `0` is `false`, and any other value is `true`.
	gltf_object_model_type_bool = 1
	// Object model type "float". Represented in the glTF JSON as a number, and encoded in a [GLTFAccessor] as "SCALAR".
	gltf_object_model_type_float = 2
	// Object model type "float[lb][rb]". Represented in the glTF JSON as an array of numbers, and encoded in a [GLTFAccessor] as "SCALAR".
	gltf_object_model_type_float_array = 3
	// Object model type "float2". Represented in the glTF JSON as an array of two numbers, and encoded in a [GLTFAccessor] as "VEC2".
	gltf_object_model_type_float2 = 4
	// Object model type "float3". Represented in the glTF JSON as an array of three numbers, and encoded in a [GLTFAccessor] as "VEC3".
	gltf_object_model_type_float3 = 5
	// Object model type "float4". Represented in the glTF JSON as an array of four numbers, and encoded in a [GLTFAccessor] as "VEC4".
	gltf_object_model_type_float4 = 6
	// Object model type "float2x2". Represented in the glTF JSON as an array of four numbers, and encoded in a [GLTFAccessor] as "MAT2".
	gltf_object_model_type_float2x2 = 7
	// Object model type "float3x3". Represented in the glTF JSON as an array of nine numbers, and encoded in a [GLTFAccessor] as "MAT3".
	gltf_object_model_type_float3x3 = 8
	// Object model type "float4x4". Represented in the glTF JSON as an array of sixteen numbers, and encoded in a [GLTFAccessor] as "MAT4".
	gltf_object_model_type_float4x4 = 9
	// Object model type "int". Represented in the glTF JSON as a number, and encoded in a [GLTFAccessor] as "SCALAR". The range of values is limited to signed integers. For `KHR_interactivity`, only 32-bit integers are supported.
	gltf_object_model_type_int = 10
}

enum GPUParticles2DDrawOrder #

enum GPUParticles2DDrawOrder as i64 {
	// Particles are drawn in the order emitted.
	draw_order_index = 0
	// Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front.
	draw_order_lifetime = 1
	// Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front.
	draw_order_reverse_lifetime = 2
}

enum GPUParticles2DEmitFlags #

enum GPUParticles2DEmitFlags as i64 {
	// Particle starts at the specified position.
	emit_flag_position = 1
	// Particle starts with specified rotation and scale.
	emit_flag_rotation_scale = 2
	// Particle starts with the specified velocity vector, which defines the emission direction and speed.
	emit_flag_velocity = 4
	// Particle starts with specified color.
	emit_flag_color = 8
	// Particle starts with specified `CUSTOM` data.
	emit_flag_custom = 16
}

enum GPUParticles3DDrawOrder #

enum GPUParticles3DDrawOrder as i64 {
	// Particles are drawn in the order emitted.
	draw_order_index = 0
	// Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front.
	draw_order_lifetime = 1
	// Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front.
	draw_order_reverse_lifetime = 2
	// Particles are drawn in order of depth.
	draw_order_view_depth = 3
}

enum GPUParticles3DEmitFlags #

enum GPUParticles3DEmitFlags as i64 {
	// Particle starts at the specified position.
	emit_flag_position = 1
	// Particle starts with specified rotation and scale.
	emit_flag_rotation_scale = 2
	// Particle starts with the specified velocity vector, which defines the emission direction and speed.
	emit_flag_velocity = 4
	// Particle starts with specified color.
	emit_flag_color = 8
	// Particle starts with specified `CUSTOM` data.
	emit_flag_custom = 16
}

enum GPUParticles3DTransformAlign #

enum GPUParticles3DTransformAlign as i64 {
	transform_align_disabled                  = 0
	transform_align_z_billboard               = 1
	transform_align_y_to_velocity             = 2
	transform_align_z_billboard_y_to_velocity = 3
}

enum GPUParticlesCollisionHeightField3DResolution #

enum GPUParticlesCollisionHeightField3DResolution as i64 {
	// Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles.
	resolution_256 = 0
	// Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles.
	resolution_512 = 1
	// Generate a 1024×1024 heightmap. Intended for large scenes with distant particles.
	resolution_1024 = 2
	// Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles.
	resolution_2048 = 3
	// Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles.
	resolution_4096 = 4
	// Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles.
	resolution_8192 = 5
	// Represents the size of the [enum Resolution] enum.
	resolution_max = 6
}

enum GPUParticlesCollisionHeightField3DUpdateMode #

enum GPUParticlesCollisionHeightField3DUpdateMode as i64 {
	// Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is `true`. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction, or by calling [method RenderingServer.particles_collision_height_field_update].
	update_mode_when_moved = 0
	// Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay.
	update_mode_always = 1
}

enum GPUParticlesCollisionSDF3DResolution #

enum GPUParticlesCollisionSDF3DResolution as i64 {
	// Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise.
	resolution_16 = 0
	// Bake a 32×32×32 signed distance field.
	resolution_32 = 1
	// Bake a 64×64×64 signed distance field.
	resolution_64 = 2
	// Bake a 128×128×128 signed distance field.
	resolution_128 = 3
	// Bake a 256×256×256 signed distance field.
	resolution_256 = 4
	// Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise.
	resolution_512 = 5
	// Represents the size of the [enum Resolution] enum.
	resolution_max = 6
}

enum Generic6DOFJoint3DFlag #

enum Generic6DOFJoint3DFlag as i64 {
	// If enabled, linear motion is possible within the given limits.
	flag_enable_linear_limit = 0
	// If enabled, rotational motion is possible within the given limits.
	flag_enable_angular_limit  = 1
	flag_enable_linear_spring  = 3
	flag_enable_angular_spring = 2
	// If enabled, there is a rotational motor across these axes.
	flag_enable_motor = 4
	// If enabled, there is a linear motor across these axes.
	flag_enable_linear_motor = 5
	// Represents the size of the [enum Flag] enum.
	flag_max = 6
}

enum Generic6DOFJoint3DParam #

enum Generic6DOFJoint3DParam as i64 {
	// The minimum difference between the pivot points' axes.
	param_linear_lower_limit = 0
	// The maximum difference between the pivot points' axes.
	param_linear_upper_limit = 1
	// A factor applied to the movement across the axes. The lower, the slower the movement.
	param_linear_limit_softness = 2
	// The amount of restitution on the axes' movement. The lower, the more momentum gets lost.
	param_linear_restitution = 3
	// The amount of damping that happens at the linear motion across the axes.
	param_linear_damping = 4
	// The velocity the linear motor will try to reach.
	param_linear_motor_target_velocity = 5
	// The maximum force the linear motor will apply while trying to reach the velocity target.
	param_linear_motor_force_limit        = 6
	param_linear_spring_stiffness         = 7
	param_linear_spring_damping           = 8
	param_linear_spring_equilibrium_point = 9
	// The minimum rotation in negative direction to break loose and rotate around the axes.
	param_angular_lower_limit = 10
	// The minimum rotation in positive direction to break loose and rotate around the axes.
	param_angular_upper_limit = 11
	// The speed of all rotations across the axes.
	param_angular_limit_softness = 12
	// The amount of rotational damping across the axes. The lower, the more damping occurs.
	param_angular_damping = 13
	// The amount of rotational restitution across the axes. The lower, the more restitution occurs.
	param_angular_restitution = 14
	// The maximum amount of force that can occur, when rotating around the axes.
	param_angular_force_limit = 15
	// When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
	param_angular_erp = 16
	// Target speed for the motor at the axes.
	param_angular_motor_target_velocity = 17
	// Maximum acceleration for the motor at the axes.
	param_angular_motor_force_limit        = 18
	param_angular_spring_stiffness         = 19
	param_angular_spring_damping           = 20
	param_angular_spring_equilibrium_point = 21
	// Represents the size of the [enum Param] enum.
	param_max = 22
}

enum Geometry2DPolyBooleanOperation #

enum Geometry2DPolyBooleanOperation as i64 {
	// Create regions where either subject or clip polygons (or both) are filled.
	operation_union = 0
	// Create regions where subject polygons are filled except where clip polygons are filled.
	operation_difference = 1
	// Create regions where both subject and clip polygons are filled.
	operation_intersection = 2
	// Create regions where either subject or clip polygons are filled but not where both are filled.
	operation_xor = 3
}

enum Geometry2DPolyEndType #

enum Geometry2DPolyEndType as i64 {
	// Endpoints are joined using the [enum PolyJoinType] value and the path filled as a polygon.
	end_polygon = 0
	// Endpoints are joined using the [enum PolyJoinType] value and the path filled as a polyline.
	end_joined = 1
	// Endpoints are squared off with no extension.
	end_butt = 2
	// Endpoints are squared off and extended by `delta` units.
	end_square = 3
	// Endpoints are rounded off and extended by `delta` units.
	end_round = 4
}

enum Geometry2DPolyJoinType #

enum Geometry2DPolyJoinType as i64 {
	// Squaring is applied uniformally at all convex edge joins at `1 * delta`.
	join_square = 0
	// While flattened paths can never perfectly trace an arc, they are approximated by a series of arc chords.
	join_round = 1
	// There's a necessary limit to mitered joins since offsetting edges that join at very acute angles will produce excessively long and narrow "spikes". For any given edge join, when miter offsetting would exceed that maximum distance, "square" joining is applied.
	join_miter = 2
}

enum GeometryInstance3DGIMode #

enum GeometryInstance3DGIMode as i64 {
	// Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using [VoxelGI] and SDFGI, the geometry will [i]receive[/i] indirect lighting and reflections but the geometry will not be considered in GI baking.
	gi_mode_disabled = 0
	// Baked global illumination mode. Use for static objects that contribute to global illumination (such as level geometry). This GI mode is effective when using [VoxelGI], SDFGI and [LightmapGI].
	gi_mode_static = 1
	// Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using [VoxelGI], but it has a higher performance impact than [constant GI_MODE_STATIC]. When using other GI methods, this will act the same as [constant GI_MODE_DISABLED]. When using [LightmapGI], the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture.
	gi_mode_dynamic = 2
}

enum GeometryInstance3DLightmapScale #

enum GeometryInstance3DLightmapScale as i64 {
	// The standard texel density for lightmapping with [LightmapGI].
	lightmap_scale_1x = 0
	// Multiplies texel density by 2× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 1.5 and 3.0.
	lightmap_scale_2x = 1
	// Multiplies texel density by 4× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 3.0 and 6.0.
	lightmap_scale_4x = 2
	// Multiplies texel density by 8× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor greater than 6.0.
	lightmap_scale_8x = 3
	// Represents the size of the [enum LightmapScale] enum.
	lightmap_scale_max = 4
}

enum GeometryInstance3DShadowCastingSetting #

enum GeometryInstance3DShadowCastingSetting as i64 {
	// Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris).
	shadow_casting_setting_off = 0
	// Will cast shadows from all visible faces in the GeometryInstance3D.
	// Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.
	shadow_casting_setting_on = 1
	// Will cast shadows from all visible faces in the GeometryInstance3D.
	// Will not take culling into account, so all faces will be taken into account when shadow casting.
	shadow_casting_setting_double_sided = 2
	// Will only show the shadows casted from this object.
	// In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
	shadow_casting_setting_shadows_only = 3
}

enum GeometryInstance3DVisibilityRangeFadeMode #

enum GeometryInstance3DVisibilityRangeFadeMode as i64 {
	// Will not fade itself nor its visibility dependencies, hysteresis will be used instead. This is the fastest approach to manual LOD, but it can result in noticeable LOD transitions depending on how the LOD meshes are authored. See [member visibility_range_begin] and [member Node3D.visibility_parent] for more information.
	visibility_range_fade_disabled = 0
	// Will fade-out itself when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
	// [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled.
	visibility_range_fade_self = 1
	// Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
	// [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled.
	visibility_range_fade_dependencies = 2
}

enum GradientColorSpace #

enum GradientColorSpace as i64 {
	// sRGB color space.
	gradient_color_space_srgb = 0
	// Linear sRGB color space.
	gradient_color_space_linear_srgb = 1
	// [url=https://bottosson.github.io/posts/oklab/]Oklab[/url] color space. This color space provides a smooth and uniform-looking transition between colors.
	gradient_color_space_oklab = 2
}

enum GradientInterpolationMode #

enum GradientInterpolationMode as i64 {
	// Linear interpolation.
	gradient_interpolate_linear = 0
	// Constant interpolation, color changes abruptly at each point and stays uniform between. This might cause visible aliasing when used for a gradient texture in some cases.
	gradient_interpolate_constant = 1
	// Cubic interpolation.
	gradient_interpolate_cubic = 2
}

enum GradientTexture2DFill #

enum GradientTexture2DFill as i64 {
	// The colors are linearly interpolated in a straight line.
	fill_linear = 0
	// The colors are linearly interpolated in a circular pattern.
	fill_radial = 1
	// The colors are linearly interpolated in a square pattern.
	fill_square = 2
}

enum GradientTexture2DRepeat #

enum GradientTexture2DRepeat as i64 {
	// The gradient fill is restricted to the range defined by [member fill_from] to [member fill_to] offsets.
	repeat_none = 0
	// The texture is filled starting from [member fill_from] to [member fill_to] offsets, repeating the same pattern in both directions.
	repeat = 1
	// The texture is filled starting from [member fill_from] to [member fill_to] offsets, mirroring the pattern in both directions.
	repeat_mirror = 2
}

enum GraphEditGridPattern #

enum GraphEditGridPattern as i64 {
	// Draw the grid using solid lines.
	grid_pattern_lines = 0
	// Draw the grid using dots.
	grid_pattern_dots = 1
}

enum GraphEditPanningScheme #

enum GraphEditPanningScheme as i64 {
	// [kbd]Mouse Wheel[/kbd] will zoom, [kbd]Ctrl + Mouse Wheel[/kbd] will move the view.
	scroll_zooms = 0
	// [kbd]Mouse Wheel[/kbd] will move the view, [kbd]Ctrl + Mouse Wheel[/kbd] will zoom.
	scroll_pans = 1
}

enum HTTPClientMethod #

enum HTTPClientMethod as i64 {
	// HTTP GET method. The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
	method_get = 0
	// HTTP HEAD method. The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful to request metadata like HTTP headers or to check if a resource exists.
	method_head = 1
	// HTTP POST method. The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. This is often used for forms and submitting data or uploading files.
	method_post = 2
	// HTTP PUT method. The PUT method asks to replace all current representations of the target resource with the request payload. (You can think of POST as "create or update" and PUT as "update", although many services tend to not make a clear distinction or change their meaning).
	method_put = 3
	// HTTP DELETE method. The DELETE method requests to delete the specified resource.
	method_delete = 4
	// HTTP OPTIONS method. The OPTIONS method asks for a description of the communication options for the target resource. Rarely used.
	method_options = 5
	// HTTP TRACE method. The TRACE method performs a message loop-back test along the path to the target resource. Returns the entire HTTP request received in the response body. Rarely used.
	method_trace = 6
	// HTTP CONNECT method. The CONNECT method establishes a tunnel to the server identified by the target resource. Rarely used.
	method_connect = 7
	// HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource.
	method_patch = 8
	// Represents the size of the [enum Method] enum.
	method_max = 9
}

enum HTTPClientResponseCode #

enum HTTPClientResponseCode as i64 {
	// HTTP status code `100 Continue`. Interim response that indicates everything so far is OK and that the client should continue with the request (or ignore this status if already finished).
	response_continue = 100
	// HTTP status code `101 Switching Protocol`. Sent in response to an `Upgrade` request header by the client. Indicates the protocol the server is switching to.
	response_switching_protocols = 101
	// HTTP status code `102 Processing` (WebDAV). Indicates that the server has received and is processing the request, but no response is available yet.
	response_processing = 102
	// HTTP status code `200 OK`. The request has succeeded. Default response for successful requests. Meaning varies depending on the request:
	// - [constant METHOD_GET]: The resource has been fetched and is transmitted in the message body.
	// - [constant METHOD_HEAD]: The entity headers are in the message body.
	// - [constant METHOD_POST]: The resource describing the result of the action is transmitted in the message body.
	// - [constant METHOD_TRACE]: The message body contains the request message as received by the server.
	response_ok = 200
	// HTTP status code `201 Created`. The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request.
	response_created = 201
	// HTTP status code `202 Accepted`. The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing.
	response_accepted = 202
	// HTTP status code `203 Non-Authoritative Information`. This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response.
	response_non_authoritative_information = 203
	// HTTP status code `204 No Content`. There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones.
	response_no_content = 204
	// HTTP status code `205 Reset Content`. The server has fulfilled the request and desires that the client resets the "document view" that caused the request to be sent to its original state as received from the origin server.
	response_reset_content = 205
	// HTTP status code `206 Partial Content`. This response code is used because of a range header sent by the client to separate download into multiple streams.
	response_partial_content = 206
	// HTTP status code `207 Multi-Status` (WebDAV). A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.
	response_multi_status = 207
	// HTTP status code `208 Already Reported` (WebDAV). Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly.
	response_already_reported = 208
	// HTTP status code `226 IM Used` (WebDAV). The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
	response_im_used = 226
	// HTTP status code `300 Multiple Choice`. The request has more than one possible responses and there is no standardized way to choose one of the responses. User-agent or user should choose one of them.
	response_multiple_choices = 300
	// HTTP status code `301 Moved Permanently`. Redirection. This response code means the URI of requested resource has been changed. The new URI is usually included in the response.
	response_moved_permanently = 301
	// HTTP status code `302 Found`. Temporary redirection. This response code means the URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.
	response_found = 302
	// HTTP status code `303 See Other`. The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request.
	response_see_other = 303
	// HTTP status code `304 Not Modified`. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to `false`.
	response_not_modified = 304
	// HTTP status code `305 Use Proxy`.
	response_use_proxy = 305
	// HTTP status code `306 Switch Proxy`.
	response_switch_proxy = 306
	// HTTP status code `307 Temporary Redirect`. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.
	response_temporary_redirect = 307
	// HTTP status code `308 Permanent Redirect`. The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.
	response_permanent_redirect = 308
	// HTTP status code `400 Bad Request`. The request was invalid. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, invalid request contents, or deceptive request routing).
	response_bad_request = 400
	// HTTP status code `401 Unauthorized`. Credentials required. The request has not been applied because it lacks valid authentication credentials for the target resource.
	response_unauthorized = 401
	// HTTP status code `402 Payment Required`. This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems, however this is not currently used.
	response_payment_required = 402
	// HTTP status code `403 Forbidden`. The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike `401`, the client's identity is known to the server.
	response_forbidden = 403
	// HTTP status code `404 Not Found`. The server can not find requested resource. Either the URL is not recognized or the endpoint is valid but the resource itself does not exist. May also be sent instead of 403 to hide existence of a resource if the client is not authorized.
	response_not_found = 404
	// HTTP status code `405 Method Not Allowed`. The request's HTTP method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code.
	response_method_not_allowed = 405
	// HTTP status code `406 Not Acceptable`. The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request. Used when negotiation content.
	response_not_acceptable = 406
	// HTTP status code `407 Proxy Authentication Required`. Similar to 401 Unauthorized, but it indicates that the client needs to authenticate itself in order to use a proxy.
	response_proxy_authentication_required = 407
	// HTTP status code `408 Request Timeout`. The server did not receive a complete request message within the time that it was prepared to wait.
	response_request_timeout = 408
	// HTTP status code `409 Conflict`. The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request.
	response_conflict = 409
	// HTTP status code `410 Gone`. The target resource is no longer available at the origin server and this condition is likely permanent.
	response_gone = 410
	// HTTP status code `411 Length Required`. The server refuses to accept the request without a defined Content-Length header.
	response_length_required = 411
	// HTTP status code `412 Precondition Failed`. One or more conditions given in the request header fields evaluated to `false` when tested on the server.
	response_precondition_failed = 412
	// HTTP status code `413 Entity Too Large`. The server is refusing to process a request because the request payload is larger than the server is willing or able to process.
	response_request_entity_too_large = 413
	// HTTP status code `414 Request-URI Too Long`. The server is refusing to service the request because the request-target is longer than the server is willing to interpret.
	response_request_uri_too_long = 414
	// HTTP status code `415 Unsupported Media Type`. The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource.
	response_unsupported_media_type = 415
	// HTTP status code `416 Requested Range Not Satisfiable`. None of the ranges in the request's Range header field overlap the current extent of the selected resource or the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.
	response_requested_range_not_satisfiable = 416
	// HTTP status code `417 Expectation Failed`. The expectation given in the request's Expect header field could not be met by at least one of the inbound servers.
	response_expectation_failed = 417
	// HTTP status code `418 I'm A Teapot`. Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.
	response_im_a_teapot = 418
	// HTTP status code `421 Misdirected Request`. The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI.
	response_misdirected_request = 421
	// HTTP status code `422 Unprocessable Entity` (WebDAV). The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions.
	response_unprocessable_entity = 422
	// HTTP status code `423 Locked` (WebDAV). The source or destination resource of a method is locked.
	response_locked = 423
	// HTTP status code `424 Failed Dependency` (WebDAV). The method could not be performed on the resource because the requested action depended on another action and that action failed.
	response_failed_dependency = 424
	// HTTP status code `426 Upgrade Required`. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
	response_upgrade_required = 426
	// HTTP status code `428 Precondition Required`. The origin server requires the request to be conditional.
	response_precondition_required = 428
	// HTTP status code `429 Too Many Requests`. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later.
	response_too_many_requests = 429
	// HTTP status code `431 Request Header Fields Too Large`. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.
	response_request_header_fields_too_large = 431
	// HTTP status code `451 Response Unavailable For Legal Reasons`. The server is denying access to the resource as a consequence of a legal demand.
	response_unavailable_for_legal_reasons = 451
	// HTTP status code `500 Internal Server Error`. The server encountered an unexpected condition that prevented it from fulfilling the request.
	response_internal_server_error = 500
	// HTTP status code `501 Not Implemented`. The server does not support the functionality required to fulfill the request.
	response_not_implemented = 501
	// HTTP status code `502 Bad Gateway`. The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request. Usually returned by load balancers or proxies.
	response_bad_gateway = 502
	// HTTP status code `503 Service Unavailable`. The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. Try again later.
	response_service_unavailable = 503
	// HTTP status code `504 Gateway Timeout`. The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. Usually returned by load balancers or proxies.
	response_gateway_timeout = 504
	// HTTP status code `505 HTTP Version Not Supported`. The server does not support, or refuses to support, the major version of HTTP that was used in the request message.
	response_http_version_not_supported = 505
	// HTTP status code `506 Variant Also Negotiates`. The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.
	response_variant_also_negotiates = 506
	// HTTP status code `507 Insufficient Storage`. The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.
	response_insufficient_storage = 507
	// HTTP status code `508 Loop Detected`. The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". This status indicates that the entire operation failed.
	response_loop_detected = 508
	// HTTP status code `510 Not Extended`. The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request.
	response_not_extended = 510
	// HTTP status code `511 Network Authentication Required`. The client needs to authenticate to gain network access.
	response_network_auth_required = 511
}

enum HTTPClientStatus #

enum HTTPClientStatus as i64 {
	// Status: Disconnected from the server.
	status_disconnected = 0
	// Status: Currently resolving the hostname for the given URL into an IP.
	status_resolving = 1
	// Status: DNS failure: Can't resolve the hostname for the given URL.
	status_cant_resolve = 2
	// Status: Currently connecting to server.
	status_connecting = 3
	// Status: Can't connect to the server.
	status_cant_connect = 4
	// Status: Connection established.
	status_connected = 5
	// Status: Currently sending request.
	status_requesting = 6
	// Status: HTTP body received.
	status_body = 7
	// Status: Error in HTTP connection.
	status_connection_error = 8
	// Status: Error in TLS handshake.
	status_tls_handshake_error = 9
}

enum HTTPRequestResult #

enum HTTPRequestResult as i64 {
	// Request successful.
	result_success = 0
	// Request failed due to a mismatch between the expected and actual chunked body size during transfer. Possible causes include network errors, server misconfiguration, or issues with chunked encoding.
	result_chunked_body_size_mismatch = 1
	// Request failed while connecting.
	result_cant_connect = 2
	// Request failed while resolving.
	result_cant_resolve = 3
	// Request failed due to connection (read/write) error.
	result_connection_error = 4
	// Request failed on TLS handshake.
	result_tls_handshake_error = 5
	// Request does not have a response (yet).
	result_no_response = 6
	// Request exceeded its maximum size limit, see [member body_size_limit].
	result_body_size_limit_exceeded = 7
	// Request failed due to an error while decompressing the response body. Possible causes include unsupported or incorrect compression format, corrupted data, or incomplete transfer.
	result_body_decompress_failed = 8
	// Request failed (currently unused).
	result_request_failed = 9
	// HTTPRequest couldn't open the download file.
	result_download_file_cant_open = 10
	// HTTPRequest couldn't write to the download file.
	result_download_file_write_error = 11
	// Request reached its maximum redirect limit, see [member max_redirects].
	result_redirect_limit_reached = 12
	// Request failed due to a timeout. If you expect requests to take a long time, try increasing the value of [member timeout] or setting it to `0.0` to remove the timeout completely.
	result_timeout = 13
}

enum HashingContextHashType #

enum HashingContextHashType as i64 {
	// Hashing algorithm: MD5.
	hash_md5 = 0
	// Hashing algorithm: SHA-1.
	hash_sha1 = 1
	// Hashing algorithm: SHA-256.
	hash_sha256 = 2
}

enum HingeJoint3DFlag #

enum HingeJoint3DFlag as i64 {
	// If `true`, the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
	flag_use_limit = 0
	// When activated, a motor turns the hinge.
	flag_enable_motor = 1
	// Represents the size of the [enum Flag] enum.
	flag_max = 2
}

enum HingeJoint3DParam #

enum HingeJoint3DParam as i64 {
	// The speed with which the two bodies get pulled together when they move in different directions.
	param_bias = 0
	// The maximum rotation. Only active if [member angular_limit/enable] is `true`.
	param_limit_upper = 1
	// The minimum rotation. Only active if [member angular_limit/enable] is `true`.
	param_limit_lower = 2
	// The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
	param_limit_bias     = 3
	param_limit_softness = 4
	// The lower this value, the more the rotation gets slowed down.
	param_limit_relaxation = 5
	// Target speed for the motor.
	param_motor_target_velocity = 6
	// Maximum acceleration for the motor.
	param_motor_max_impulse = 7
	// Represents the size of the [enum Param] enum.
	param_max = 8
}

enum HorizontalAlignment #

enum HorizontalAlignment as i64 {
	// Horizontal left alignment, usually for text-derived classes.
	horizontal_alignment_left = 0
	// Horizontal center alignment, usually for text-derived classes.
	horizontal_alignment_center = 1
	// Horizontal right alignment, usually for text-derived classes.
	horizontal_alignment_right = 2
	// Expand row to fit width, usually for text-derived classes.
	horizontal_alignment_fill = 3
}

enum IPResolverStatus #

enum IPResolverStatus as i64 {
	// DNS hostname resolver status: No status.
	resolver_status_none = 0
	// DNS hostname resolver status: Waiting.
	resolver_status_waiting = 1
	// DNS hostname resolver status: Done.
	resolver_status_done = 2
	// DNS hostname resolver status: Error.
	resolver_status_error = 3
}

enum IPType #

enum IPType as i64 {
	// Address type: None.
	type_none = 0
	// Address type: Internet protocol version 4 (IPv4).
	type_ipv4 = 1
	// Address type: Internet protocol version 6 (IPv6).
	type_ipv6 = 2
	// Address type: Any.
	type_any = 3
}

enum ImageASTCFormat #

enum ImageASTCFormat as i64 {
	// Hint to indicate that the high quality 4×4 ASTC compression format should be used.
	astc_format_4x4 = 0
	// Hint to indicate that the low quality 8×8 ASTC compression format should be used.
	astc_format_8x8 = 1
}

enum ImageAlphaMode #

enum ImageAlphaMode as i64 {
	// Image does not have alpha.
	alpha_none = 0
	// Image stores alpha in a single bit.
	alpha_bit = 1
	// Image uses alpha.
	alpha_blend = 2
}

enum ImageCompressMode #

enum ImageCompressMode as i64 {
	// Use S3TC compression.
	compress_s3tc = 0
	// Use ETC compression.
	compress_etc = 1
	// Use ETC2 compression.
	compress_etc2 = 2
	// Use BPTC compression.
	compress_bptc = 3
	// Use ASTC compression.
	compress_astc = 4
	// Represents the size of the [enum CompressMode] enum.
	compress_max = 5
}

enum ImageCompressSource #

enum ImageCompressSource as i64 {
	// Source texture (before compression) is a regular texture. Default for all textures.
	compress_source_generic = 0
	// Source texture (before compression) is in sRGB space.
	compress_source_srgb = 1
	// Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels).
	compress_source_normal = 2
}

enum ImageFormat #

enum ImageFormat as i64 {
	// Texture format with a single 8-bit depth representing luminance.
	format_l8 = 0
	// OpenGL texture format with two values, luminance and alpha each stored with 8 bits.
	format_la8 = 1
	// OpenGL texture format `RED` with a single component and a bitdepth of 8.
	format_r8 = 2
	// OpenGL texture format `RG` with two components and a bitdepth of 8 for each.
	format_rg8 = 3
	// OpenGL texture format `RGB` with three components, each with a bitdepth of 8.
	// [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
	format_rgb8 = 4
	// OpenGL texture format `RGBA` with four components, each with a bitdepth of 8.
	// [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
	format_rgba8 = 5
	// OpenGL texture format `RGBA` with four components, each with a bitdepth of 4.
	format_rgba4444 = 6
	// OpenGL texture format `RGB` with three components. Red and blue have a bitdepth of 5, and green has a bitdepth of 6.
	format_rgb565 = 7
	// OpenGL texture format `GL_R32F` where there's one component, a 32-bit floating-point value.
	format_rf = 8
	// OpenGL texture format `GL_RG32F` where there are two components, each a 32-bit floating-point values.
	format_rgf = 9
	// OpenGL texture format `GL_RGB32F` where there are three components, each a 32-bit floating-point values.
	format_rgbf = 10
	// OpenGL texture format `GL_RGBA32F` where there are four components, each a 32-bit floating-point values.
	format_rgbaf = 11
	// OpenGL texture format `GL_R16F` where there's one component, a 16-bit "half-precision" floating-point value.
	format_rh = 12
	// OpenGL texture format `GL_RG16F` where there are two components, each a 16-bit "half-precision" floating-point value.
	format_rgh = 13
	// OpenGL texture format `GL_RGB16F` where there are three components, each a 16-bit "half-precision" floating-point value.
	format_rgbh = 14
	// OpenGL texture format `GL_RGBA16F` where there are four components, each a 16-bit "half-precision" floating-point value.
	format_rgbah = 15
	// A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single 5-bit exponent.
	format_rgbe9995 = 16
	// The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha.
	// [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
	format_dxt1 = 17
	// The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas.
	// [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
	format_dxt3 = 18
	// The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparent gradients compared to DXT3.
	// [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
	format_dxt5 = 19
	// Texture format that uses [url=https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression]Red Green Texture Compression[/url], normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel.
	format_rgtc_r = 20
	// Texture format that uses [url=https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression]Red Green Texture Compression[/url], normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel.
	format_rgtc_rg = 21
	// Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned normalized RGBA components.
	// [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
	format_bptc_rgba = 22
	// Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with signed floating-point RGB components.
	format_bptc_rgbf = 23
	// Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned floating-point RGB components.
	format_bptc_rgbfu = 24
	// [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC1]Ericsson Texture Compression format 1[/url], also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel.
	format_etc = 25
	// [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`R11_EAC` variant), which provides one channel of unsigned data.
	format_etc2_r11 = 26
	// [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`SIGNED_R11_EAC` variant), which provides one channel of signed data.
	format_etc2_r11s = 27
	// [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RG11_EAC` variant), which provides two channels of unsigned data.
	format_etc2_rg11 = 28
	// [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`SIGNED_RG11_EAC` variant), which provides two channels of signed data.
	format_etc2_rg11s = 29
	// [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RGB8` variant), which is a follow-up of ETC1 and compresses RGB888 data.
	// [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
	format_etc2_rgb8 = 30
	// [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RGBA8`variant), which compresses RGBA8888 data with full alpha support.
	// [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
	format_etc2_rgba8 = 31
	// [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RGB8_PUNCHTHROUGH_ALPHA1` variant), which compresses RGBA data to make alpha either fully transparent or fully opaque.
	// [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
	format_etc2_rgb8a1 = 32
	// [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RGBA8` variant), which compresses RA data and interprets it as two channels (red and green). See also [constant FORMAT_ETC2_RGBA8].
	format_etc2_ra_as_rg = 33
	// The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format also known as Block Compression 3 or BC3, which compresses RA data and interprets it as two channels (red and green). See also [constant FORMAT_DXT5].
	format_dxt5_ra_as_rg = 34
	// [url=https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression]Adaptive Scalable Texture Compression[/url]. This implements the 4×4 (high quality) mode.
	format_astc_4x4 = 35
	// Same format as [constant FORMAT_ASTC_4x4], but with the hint to let the GPU know it is used for HDR.
	format_astc_4x4_hdr = 36
	// [url=https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression]Adaptive Scalable Texture Compression[/url]. This implements the 8×8 (low quality) mode.
	format_astc_8x8 = 37
	// Same format as [constant FORMAT_ASTC_8x8], but with the hint to let the GPU know it is used for HDR.
	format_astc_8x8_hdr = 38
	// Represents the size of the [enum Format] enum.
	format_max = 39
}

enum ImageFormatLoaderLoaderFlags #

enum ImageFormatLoaderLoaderFlags as i64 {
	flag_none           = 0
	flag_force_linear   = 1
	flag_convert_colors = 2
}

enum ImageInterpolation #

enum ImageInterpolation as i64 {
	// Performs nearest-neighbor interpolation. If the image is resized, it will be pixelated.
	interpolate_nearest = 0
	// Performs bilinear interpolation. If the image is resized, it will be blurry. This mode is faster than [constant INTERPOLATE_CUBIC], but it results in lower quality.
	interpolate_bilinear = 1
	// Performs cubic interpolation. If the image is resized, it will be blurry. This mode often gives better results compared to [constant INTERPOLATE_BILINEAR], at the cost of being slower.
	interpolate_cubic = 2
	// Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them.
	// It's slower than [constant INTERPOLATE_BILINEAR], but produces higher-quality results with far fewer aliasing artifacts.
	// If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image.
	// [b]Note:[/b] If you intend to scale multiple copies of the original image, it's better to call [method generate_mipmaps]] on it in advance, to avoid wasting processing power in generating them again and again.
	// On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image.
	interpolate_trilinear = 3
	// Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscaling images.
	interpolate_lanczos = 4
}

enum ImageUsedChannels #

enum ImageUsedChannels as i64 {
	// The image only uses one channel for luminance (grayscale).
	used_channels_l = 0
	// The image uses two channels for luminance and alpha, respectively.
	used_channels_la = 1
	// The image only uses the red channel.
	used_channels_r = 2
	// The image uses two channels for red and green.
	used_channels_rg = 3
	// The image uses three channels for red, green, and blue.
	used_channels_rgb = 4
	// The image uses four channels for red, green, blue, and alpha.
	used_channels_rgba = 5
}

enum InlineAlignment #

enum InlineAlignment as i64 {
	// Aligns the top of the inline object (e.g. image, table) to the position of the text specified by `INLINE_ALIGNMENT_TO_*` constant.
	inline_alignment_top_to = 0
	// Aligns the center of the inline object (e.g. image, table) to the position of the text specified by `INLINE_ALIGNMENT_TO_*` constant.
	inline_alignment_center_to = 1
	// Aligns the baseline (user defined) of the inline object (e.g. image, table) to the position of the text specified by `INLINE_ALIGNMENT_TO_*` constant.
	inline_alignment_baseline_to = 3
	// Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by `INLINE_ALIGNMENT_TO_*` constant.
	inline_alignment_bottom_to = 2
	// Aligns the position of the inline object (e.g. image, table) specified by `INLINE_ALIGNMENT_*_TO` constant to the center of the text.
	inline_alignment_to_center = 4
	// Aligns the position of the inline object (e.g. image, table) specified by `INLINE_ALIGNMENT_*_TO` constant to the baseline of the text.
	inline_alignment_to_baseline = 8
	// Aligns inline object (e.g. image, table) to the bottom of the text.
	inline_alignment_to_bottom = 12
	// Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to `INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER`.
	inline_alignment_center = 5
	// Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to `INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM`.
	inline_alignment_bottom = 14
}

enum InputCursorShape #

enum InputCursorShape as i64 {
	// Arrow cursor. Standard, default pointing cursor.
	cursor_arrow = 0
	// I-beam cursor. Usually used to show where the text cursor will appear when the mouse is clicked.
	cursor_ibeam = 1
	// Pointing hand cursor. Usually used to indicate the pointer is over a link or other interactable item.
	cursor_pointing_hand = 2
	// Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections.
	cursor_cross = 3
	// Wait cursor. Indicates that the application is busy performing an operation, and that it cannot be used during the operation (e.g. something is blocking its main thread).
	cursor_wait = 4
	// Busy cursor. Indicates that the application is busy performing an operation, and that it is still usable during the operation.
	cursor_busy = 5
	// Drag cursor. Usually displayed when dragging something.
	// [b]Note:[/b] Windows lacks a dragging cursor, so [constant CURSOR_DRAG] is the same as [constant CURSOR_MOVE] for this platform.
	cursor_drag = 6
	// Can drop cursor. Usually displayed when dragging something to indicate that it can be dropped at the current position.
	cursor_can_drop = 7
	// Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled.
	cursor_forbidden = 8
	// Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically.
	cursor_vsize = 9
	// Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally.
	cursor_hsize = 10
	// Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically.
	cursor_bdiagsize = 11
	// Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically.
	cursor_fdiagsize = 12
	// Move cursor. Indicates that something can be moved.
	cursor_move = 13
	// Vertical split mouse cursor. On Windows, it's the same as [constant CURSOR_VSIZE].
	cursor_vsplit = 14
	// Horizontal split mouse cursor. On Windows, it's the same as [constant CURSOR_HSIZE].
	cursor_hsplit = 15
	// Help cursor. Usually a question mark.
	cursor_help = 16
}

enum InputMouseMode #

enum InputMouseMode as i64 {
	// Makes the mouse cursor visible if it is hidden.
	mouse_mode_visible = 0
	// Makes the mouse cursor hidden if it is visible.
	mouse_mode_hidden = 1
	// Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window.
	// [b]Note:[/b] If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative].
	mouse_mode_captured = 2
	// Confines the mouse cursor to the game window, and make it visible.
	mouse_mode_confined = 3
	// Confines the mouse cursor to the game window, and make it hidden.
	mouse_mode_confined_hidden = 4
	// Max value of the [enum MouseMode].
	mouse_mode_max = 5
}

enum ItemListIconMode #

enum ItemListIconMode as i64 {
	// Icon is drawn above the text.
	icon_mode_top = 0
	// Icon is drawn to the left of the text.
	icon_mode_left = 1
}

enum ItemListSelectMode #

enum ItemListSelectMode as i64 {
	// Only allow selecting a single item.
	select_single = 0
	// Allows selecting multiple items by holding [kbd]Ctrl[/kbd] or [kbd]Shift[/kbd].
	select_multi = 1
	// Allows selecting multiple items by toggling them on and off.
	select_toggle = 2
}

enum JSONRPCErrorCode #

enum JSONRPCErrorCode as i64 {
	// The request could not be parsed as it was not valid by JSON standard ([method JSON.parse] failed).
	parse_error = -32700
	// A method call was requested but the request's format is not valid.
	invalid_request = -32600
	// A method call was requested but no function of that name existed in the JSONRPC subclass.
	method_not_found = -32601
	// A method call was requested but the given method parameters are not valid. Not used by the built-in JSONRPC.
	invalid_params = -32602
	// An internal error occurred while processing the request. Not used by the built-in JSONRPC.
	internal_error = -32603
}

enum JoyAxis #

enum JoyAxis as i64 {
	// An invalid game controller axis.
	joy_axis_invalid = -1
	// Game controller left joystick x-axis.
	joy_axis_left_x = 0
	// Game controller left joystick y-axis.
	joy_axis_left_y = 1
	// Game controller right joystick x-axis.
	joy_axis_right_x = 2
	// Game controller right joystick y-axis.
	joy_axis_right_y = 3
	// Game controller left trigger axis.
	joy_axis_trigger_left = 4
	// Game controller right trigger axis.
	joy_axis_trigger_right = 5
	// The number of SDL game controller axes.
	joy_axis_sdl_max = 6
	// The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.
	joy_axis_max = 10
}

enum JoyButton #

enum JoyButton as i64 {
	// An invalid game controller button.
	joy_button_invalid = -1
	// Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B.
	joy_button_a = 0
	// Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A.
	joy_button_b = 1
	// Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y.
	joy_button_x = 2
	// Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X.
	joy_button_y = 3
	// Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button.
	joy_button_back = 4
	// Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button.
	joy_button_guide = 5
	// Game controller SDL start button. Corresponds to the Sony Options, Xbox Menu, Nintendo + button.
	joy_button_start = 6
	// Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button.
	joy_button_left_stick = 7
	// Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button.
	joy_button_right_stick = 8
	// Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button.
	joy_button_left_shoulder = 9
	// Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button.
	joy_button_right_shoulder = 10
	// Game controller D-pad up button.
	joy_button_dpad_up = 11
	// Game controller D-pad down button.
	joy_button_dpad_down = 12
	// Game controller D-pad left button.
	joy_button_dpad_left = 13
	// Game controller D-pad right button.
	joy_button_dpad_right = 14
	// Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo Switch capture button.
	joy_button_misc1 = 15
	// Game controller SDL paddle 1 button.
	joy_button_paddle1 = 16
	// Game controller SDL paddle 2 button.
	joy_button_paddle2 = 17
	// Game controller SDL paddle 3 button.
	joy_button_paddle3 = 18
	// Game controller SDL paddle 4 button.
	joy_button_paddle4 = 19
	// Game controller SDL touchpad button.
	joy_button_touchpad = 20
	// The number of SDL game controller buttons.
	joy_button_sdl_max = 21
	// The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:
	// - [b]Android:[/b] Up to 36 buttons.
	// - [b]Linux:[/b] Up to 80 buttons.
	// - [b]Windows[/b] and [b]macOS:[/b] Up to 128 buttons.
	joy_button_max = 128
}

enum Key #

enum Key as i64 {
	// Enum value which doesn't correspond to any key. This is used to initialize [enum Key] properties with a generic state.
	key_none = 0
	// Keycodes with this bit applied are non-printable.
	key_special = 4194304
	// Escape key.
	key_escape = 4194305
	// Tab key.
	key_tab = 4194306
	// Shift + Tab key.
	key_backtab = 4194307
	// Backspace key.
	key_backspace = 4194308
	// Return key (on the main keyboard).
	key_enter = 4194309
	// Enter key on the numeric keypad.
	key_kp_enter = 4194310
	// Insert key.
	key_insert = 4194311
	// Delete key.
	key_delete = 4194312
	// Pause key.
	key_pause = 4194313
	// Print Screen key.
	key_print = 4194314
	// System Request key.
	key_sysreq = 4194315
	// Clear key.
	key_clear = 4194316
	// Home key.
	key_home = 4194317
	// End key.
	key_end = 4194318
	// Left arrow key.
	key_left = 4194319
	// Up arrow key.
	key_up = 4194320
	// Right arrow key.
	key_right = 4194321
	// Down arrow key.
	key_down = 4194322
	// Page Up key.
	key_pageup = 4194323
	// Page Down key.
	key_pagedown = 4194324
	// Shift key.
	key_shift = 4194325
	// Control key.
	key_ctrl = 4194326
	// Meta key.
	key_meta = 4194327
	// Alt key.
	key_alt = 4194328
	// Caps Lock key.
	key_capslock = 4194329
	// Num Lock key.
	key_numlock = 4194330
	// Scroll Lock key.
	key_scrolllock = 4194331
	// F1 key.
	key_f1 = 4194332
	// F2 key.
	key_f2 = 4194333
	// F3 key.
	key_f3 = 4194334
	// F4 key.
	key_f4 = 4194335
	// F5 key.
	key_f5 = 4194336
	// F6 key.
	key_f6 = 4194337
	// F7 key.
	key_f7 = 4194338
	// F8 key.
	key_f8 = 4194339
	// F9 key.
	key_f9 = 4194340
	// F10 key.
	key_f10 = 4194341
	// F11 key.
	key_f11 = 4194342
	// F12 key.
	key_f12 = 4194343
	// F13 key.
	key_f13 = 4194344
	// F14 key.
	key_f14 = 4194345
	// F15 key.
	key_f15 = 4194346
	// F16 key.
	key_f16 = 4194347
	// F17 key.
	key_f17 = 4194348
	// F18 key.
	key_f18 = 4194349
	// F19 key.
	key_f19 = 4194350
	// F20 key.
	key_f20 = 4194351
	// F21 key.
	key_f21 = 4194352
	// F22 key.
	key_f22 = 4194353
	// F23 key.
	key_f23 = 4194354
	// F24 key.
	key_f24 = 4194355
	// F25 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f25 = 4194356
	// F26 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f26 = 4194357
	// F27 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f27 = 4194358
	// F28 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f28 = 4194359
	// F29 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f29 = 4194360
	// F30 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f30 = 4194361
	// F31 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f31 = 4194362
	// F32 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f32 = 4194363
	// F33 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f33 = 4194364
	// F34 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f34 = 4194365
	// F35 key. Only supported on macOS and Linux due to a Windows limitation.
	key_f35 = 4194366
	// Multiply (*) key on the numeric keypad.
	key_kp_multiply = 4194433
	// Divide (/) key on the numeric keypad.
	key_kp_divide = 4194434
	// Subtract (-) key on the numeric keypad.
	key_kp_subtract = 4194435
	// Period (.) key on the numeric keypad.
	key_kp_period = 4194436
	// Add (+) key on the numeric keypad.
	key_kp_add = 4194437
	// Number 0 on the numeric keypad.
	key_kp_0 = 4194438
	// Number 1 on the numeric keypad.
	key_kp_1 = 4194439
	// Number 2 on the numeric keypad.
	key_kp_2 = 4194440
	// Number 3 on the numeric keypad.
	key_kp_3 = 4194441
	// Number 4 on the numeric keypad.
	key_kp_4 = 4194442
	// Number 5 on the numeric keypad.
	key_kp_5 = 4194443
	// Number 6 on the numeric keypad.
	key_kp_6 = 4194444
	// Number 7 on the numeric keypad.
	key_kp_7 = 4194445
	// Number 8 on the numeric keypad.
	key_kp_8 = 4194446
	// Number 9 on the numeric keypad.
	key_kp_9 = 4194447
	// Context menu key.
	key_menu = 4194370
	// Hyper key. (On Linux/X11 only).
	key_hyper = 4194371
	// Help key.
	key_help = 4194373
	// Back key.
	key_back = 4194376
	// Forward key.
	key_forward = 4194377
	// Media stop key.
	key_stop = 4194378
	// Refresh key.
	key_refresh = 4194379
	// Volume down key.
	key_volumedown = 4194380
	// Mute volume key.
	key_volumemute = 4194381
	// Volume up key.
	key_volumeup = 4194382
	// Media play key.
	key_mediaplay = 4194388
	// Media stop key.
	key_mediastop = 4194389
	// Previous song key.
	key_mediaprevious = 4194390
	// Next song key.
	key_medianext = 4194391
	// Media record key.
	key_mediarecord = 4194392
	// Home page key.
	key_homepage = 4194393
	// Favorites key.
	key_favorites = 4194394
	// Search key.
	key_search = 4194395
	// Standby key.
	key_standby = 4194396
	// Open URL / Launch Browser key.
	key_openurl = 4194397
	// Launch Mail key.
	key_launchmail = 4194398
	// Launch Media key.
	key_launchmedia = 4194399
	// Launch Shortcut 0 key.
	key_launch0 = 4194400
	// Launch Shortcut 1 key.
	key_launch1 = 4194401
	// Launch Shortcut 2 key.
	key_launch2 = 4194402
	// Launch Shortcut 3 key.
	key_launch3 = 4194403
	// Launch Shortcut 4 key.
	key_launch4 = 4194404
	// Launch Shortcut 5 key.
	key_launch5 = 4194405
	// Launch Shortcut 6 key.
	key_launch6 = 4194406
	// Launch Shortcut 7 key.
	key_launch7 = 4194407
	// Launch Shortcut 8 key.
	key_launch8 = 4194408
	// Launch Shortcut 9 key.
	key_launch9 = 4194409
	// Launch Shortcut A key.
	key_launcha = 4194410
	// Launch Shortcut B key.
	key_launchb = 4194411
	// Launch Shortcut C key.
	key_launchc = 4194412
	// Launch Shortcut D key.
	key_launchd = 4194413
	// Launch Shortcut E key.
	key_launche = 4194414
	// Launch Shortcut F key.
	key_launchf = 4194415
	// "Globe" key on Mac / iPad keyboard.
	key_globe = 4194416
	// "On-screen keyboard" key on iPad keyboard.
	key_keyboard = 4194417
	// 英数 key on Mac keyboard.
	key_jis_eisu = 4194418
	// かな key on Mac keyboard.
	key_jis_kana = 4194419
	// Unknown key.
	key_unknown = 8388607
	// Space key.
	key_space = 32
	// Exclamation mark (`!`) key.
	key_exclam = 33
	// Double quotation mark (`"`) key.
	key_quotedbl = 34
	// Number sign or [i]hash[/i] (`#`) key.
	key_numbersign = 35
	// Dollar sign (`$`) key.
	key_dollar = 36
	// Percent sign (`%`) key.
	key_percent = 37
	// Ampersand (`&`) key.
	key_ampersand = 38
	// Apostrophe (`'`) key.
	key_apostrophe = 39
	// Left parenthesis (`(`) key.
	key_parenleft = 40
	// Right parenthesis (`)`) key.
	key_parenright = 41
	// Asterisk (`*`) key.
	key_asterisk = 42
	// Plus (`+`) key.
	key_plus = 43
	// Comma (`,`) key.
	key_comma = 44
	// Minus (`-`) key.
	key_minus = 45
	// Period (`.`) key.
	key_period = 46
	// Slash (`/`) key.
	key_slash = 47
	// Number 0 key.
	key_0 = 48
	// Number 1 key.
	key_1 = 49
	// Number 2 key.
	key_2 = 50
	// Number 3 key.
	key_3 = 51
	// Number 4 key.
	key_4 = 52
	// Number 5 key.
	key_5 = 53
	// Number 6 key.
	key_6 = 54
	// Number 7 key.
	key_7 = 55
	// Number 8 key.
	key_8 = 56
	// Number 9 key.
	key_9 = 57
	// Colon (`:`) key.
	key_colon = 58
	// Semicolon (`;`) key.
	key_semicolon = 59
	// Less-than sign (`<`) key.
	key_less = 60
	// Equal sign (`=`) key.
	key_equal = 61
	// Greater-than sign (`>`) key.
	key_greater = 62
	// Question mark (`?`) key.
	key_question = 63
	// At sign (`@`) key.
	key_at = 64
	// A key.
	key_a = 65
	// B key.
	key_b = 66
	// C key.
	key_c = 67
	// D key.
	key_d = 68
	// E key.
	key_e = 69
	// F key.
	key_f = 70
	// G key.
	key_g = 71
	// H key.
	key_h = 72
	// I key.
	key_i = 73
	// J key.
	key_j = 74
	// K key.
	key_k = 75
	// L key.
	key_l = 76
	// M key.
	key_m = 77
	// N key.
	key_n = 78
	// O key.
	key_o = 79
	// P key.
	key_p = 80
	// Q key.
	key_q = 81
	// R key.
	key_r = 82
	// S key.
	key_s = 83
	// T key.
	key_t = 84
	// U key.
	key_u = 85
	// V key.
	key_v = 86
	// W key.
	key_w = 87
	// X key.
	key_x = 88
	// Y key.
	key_y = 89
	// Z key.
	key_z = 90
	// Left bracket (`[lb]`) key.
	key_bracketleft = 91
	// Backslash (`\`) key.
	key_backslash = 92
	// Right bracket (`[rb]`) key.
	key_bracketright = 93
	// Caret (`^`) key.
	key_asciicircum = 94
	// Underscore (`_`) key.
	key_underscore = 95
	// Backtick (```) key.
	key_quoteleft = 96
	// Left brace (`{`) key.
	key_braceleft = 123
	// Vertical bar or [i]pipe[/i] (`|`) key.
	key_bar = 124
	// Right brace (`}`) key.
	key_braceright = 125
	// Tilde (`~`) key.
	key_asciitilde = 126
	// Yen symbol (`¥`) key.
	key_yen = 165
	// Section sign (`§`) key.
	key_section = 167
}

enum KeyLocation #

enum KeyLocation as i64 {
	// Used for keys which only appear once, or when a comparison doesn't need to differentiate the `LEFT` and `RIGHT` versions.
	// For example, when using [method InputEvent.is_match], an event which has [constant KEY_LOCATION_UNSPECIFIED] will match any [enum KeyLocation] on the passed event.
	key_location_unspecified = 0
	// A key which is to the left of its twin.
	key_location_left = 1
	// A key which is to the right of its twin.
	key_location_right = 2
}

enum KeyModifierMask #

enum KeyModifierMask as i64 {
	// Key Code mask.
	key_code_mask = 8388607
	// Modifier key mask.
	key_modifier_mask = 2130706432
	// Automatically remapped to [constant KEY_META] on macOS and [constant KEY_CTRL] on other platforms, this mask is never set in the actual events, and should be used for key mapping only.
	key_mask_cmd_or_ctrl = 16777216
	// Shift key mask.
	key_mask_shift = 33554432
	// Alt or Option (on macOS) key mask.
	key_mask_alt = 67108864
	// Command (on macOS) or Meta/Windows key mask.
	key_mask_meta = 134217728
	// Control key mask.
	key_mask_ctrl = 268435456
	// Keypad key mask.
	key_mask_kpad = 536870912
	// Group Switch key mask.
	key_mask_group_switch = 1073741824
}

enum Label3DAlphaCutMode #

enum Label3DAlphaCutMode as i64 {
	// This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. [member GeometryInstance3D.cast_shadow] has no effect when this transparency mode is used; the [Label3D] will never cast shadows.
	alpha_cut_disabled = 0
	// This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa]). This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i].
	// [b]Note:[/b] This mode might have issues with anti-aliased fonts and outlines, try adjusting [member alpha_scissor_threshold] or using MSDF font.
	// [b]Note:[/b] When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.
	alpha_cut_discard = 1
	// This mode draws fully opaque pixels in the depth prepass. This is slower than [constant ALPHA_CUT_DISABLED] or [constant ALPHA_CUT_DISCARD], but it allows displaying translucent areas and smooth edges while using proper sorting.
	// [b]Note:[/b] When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.
	alpha_cut_opaque_prepass = 2
	// This mode draws cuts off all values below a spatially-deterministic threshold, the rest will remain opaque.
	alpha_cut_hash = 3
}

enum Label3DDrawFlags #

enum Label3DDrawFlags as i64 {
	// If set, lights in the environment affect the label.
	flag_shaded = 0
	// If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind.
	flag_double_sided = 1
	// Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
	flag_disable_depth_test = 2
	// Label is scaled by depth so that it always appears the same size on screen.
	flag_fixed_size = 3
	// Represents the size of the [enum DrawFlags] enum.
	flag_max = 4
}

enum Light2DBlendMode #

enum Light2DBlendMode as i64 {
	// Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light.
	blend_mode_add = 0
	// Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect.
	blend_mode_sub = 1
	// Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation.
	blend_mode_mix = 2
}

enum Light2DShadowFilter #

enum Light2DShadowFilter as i64 {
	// No filter applies to the shadow map. This provides hard shadow edges and is the fastest to render. See [member shadow_filter].
	shadow_filter_none = 0
	// Percentage closer filtering (5 samples) applies to the shadow map. This is slower compared to hard shadow rendering. See [member shadow_filter].
	shadow_filter_pcf5 = 1
	// Percentage closer filtering (13 samples) applies to the shadow map. This is the slowest shadow filtering mode, and should be used sparingly. See [member shadow_filter].
	shadow_filter_pcf13 = 2
}

enum Light3DBakeMode #

enum Light3DBakeMode as i64 {
	// Light is ignored when baking. This is the fastest mode, but the light will not be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights.
	// [b]Note:[/b] Hiding a light does [i]not[/i] affect baking [LightmapGI]. Hiding a light will still affect baking [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]).
	bake_disabled = 0
	// Light is taken into account in static baking ([VoxelGI], [LightmapGI], SDFGI ([member Environment.sdfgi_enabled])). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off.
	// [b]Note:[/b] The light is not baked in [LightmapGI] if [member editor_only] is `true`.
	bake_static = 1
	// Light is taken into account in dynamic baking ([VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to [constant BAKE_STATIC]. This has a greater performance cost compared to [constant BAKE_STATIC]. When using SDFGI, the update speed of dynamic lights is affected by [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights].
	bake_dynamic = 2
}

enum Light3DParam #

enum Light3DParam as i64 {
	// Constant for accessing [member light_energy].
	param_energy = 0
	// Constant for accessing [member light_indirect_energy].
	param_indirect_energy = 1
	// Constant for accessing [member light_volumetric_fog_energy].
	param_volumetric_fog_energy = 2
	// Constant for accessing [member light_specular].
	param_specular = 3
	// Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range].
	param_range = 4
	// Constant for accessing [member light_size].
	param_size = 5
	// Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation].
	param_attenuation = 6
	// Constant for accessing [member SpotLight3D.spot_angle].
	param_spot_angle = 7
	// Constant for accessing [member SpotLight3D.spot_angle_attenuation].
	param_spot_attenuation = 8
	// Constant for accessing [member DirectionalLight3D.directional_shadow_max_distance].
	param_shadow_max_distance = 9
	// Constant for accessing [member DirectionalLight3D.directional_shadow_split_1].
	param_shadow_split_1_offset = 10
	// Constant for accessing [member DirectionalLight3D.directional_shadow_split_2].
	param_shadow_split_2_offset = 11
	// Constant for accessing [member DirectionalLight3D.directional_shadow_split_3].
	param_shadow_split_3_offset = 12
	// Constant for accessing [member DirectionalLight3D.directional_shadow_fade_start].
	param_shadow_fade_start = 13
	// Constant for accessing [member shadow_normal_bias].
	param_shadow_normal_bias = 14
	// Constant for accessing [member shadow_bias].
	param_shadow_bias = 15
	// Constant for accessing [member DirectionalLight3D.directional_shadow_pancake_size].
	param_shadow_pancake_size = 16
	// Constant for accessing [member shadow_opacity].
	param_shadow_opacity = 17
	// Constant for accessing [member shadow_blur].
	param_shadow_blur = 18
	// Constant for accessing [member shadow_transmittance_bias].
	param_transmittance_bias = 19
	// Constant for accessing [member light_intensity_lumens] and [member light_intensity_lux]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is `true`.
	param_intensity = 20
	// Represents the size of the [enum Param] enum.
	param_max = 21
}

enum LightmapGIBakeError #

enum LightmapGIBakeError as i64 {
	// Lightmap baking was successful.
	bake_error_ok = 0
	// Lightmap baking failed because the root node for the edited scene could not be accessed.
	bake_error_no_scene_root = 1
	// Lightmap baking failed as the lightmap data resource is embedded in a foreign resource.
	bake_error_foreign_data = 2
	// Lightmap baking failed as there is no lightmapper available in this Godot build.
	bake_error_no_lightmapper = 3
	// Lightmap baking failed as the [LightmapGIData] save path isn't configured in the resource.
	bake_error_no_save_path = 4
	// Lightmap baking failed as there are no meshes whose [member GeometryInstance3D.gi_mode] is [constant GeometryInstance3D.GI_MODE_STATIC] and with valid UV2 mapping in the current scene. You may need to select 3D scenes in the Import dock and change their global illumination mode accordingly.
	bake_error_no_meshes = 5
	// Lightmap baking failed as the lightmapper failed to analyze some of the meshes marked as static for baking.
	bake_error_meshes_invalid = 6
	// Lightmap baking failed as the resulting image couldn't be saved or imported by Godot after it was saved.
	bake_error_cant_create_image = 7
	// The user aborted the lightmap baking operation (typically by clicking the [b]Cancel[/b] button in the progress dialog).
	bake_error_user_aborted = 8
	// Lightmap baking failed as the maximum texture size is too small to fit some of the meshes marked for baking.
	bake_error_texture_size_too_small = 9
	// Lightmap baking failed as the lightmap is too small.
	bake_error_lightmap_too_small = 10
	// Lightmap baking failed as the lightmap was unable to fit into an atlas.
	bake_error_atlas_too_small = 11
}

enum LightmapGIBakeQuality #

enum LightmapGIBakeQuality as i64 {
	// Low bake quality (fastest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_probe_ray_count].
	bake_quality_low = 0
	// Medium bake quality (fast bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_probe_ray_count].
	bake_quality_medium = 1
	// High bake quality (slow bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_probe_ray_count].
	bake_quality_high = 2
	// Highest bake quality (slowest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count].
	bake_quality_ultra = 3
}

enum LightmapGIDataShadowmaskMode #

enum LightmapGIDataShadowmaskMode as i64 {
	// Shadowmasking is disabled. No shadowmask texture will be created when baking lightmaps. Existing shadowmask textures will be removed during baking.
	shadowmask_mode_none = 0
	// Shadowmasking is enabled. Directional shadows that are outside the [member DirectionalLight3D.directional_shadow_max_distance] will be rendered using the shadowmask texture. Shadows that are inside the range will be rendered using real-time shadows exclusively. This mode allows for more precise real-time shadows up close, without the potential "smearing" effect that can occur when using lightmaps with a high texel size. The downside is that when the camera moves fast, the transition between the real-time light and shadowmask can be obvious. Also, objects that only have shadows baked in the shadowmask (and no real-time shadows) won't display any shadows up close.
	shadowmask_mode_replace = 1
	// Shadowmasking is enabled. Directional shadows will be rendered with real-time shadows overlaid on top of the shadowmask texture. This mode makes for smoother shadow transitions when the camera moves fast, at the cost of a potential smearing effect for directional shadows that are up close (due to the real-time shadow being mixed with a low-resolution shadowmask). Objects that only have shadows baked in the shadowmask (and no real-time shadows) will keep their shadows up close.
	shadowmask_mode_overlay = 2
}

enum LightmapGIEnvironmentMode #

enum LightmapGIEnvironmentMode as i64 {
	// Ignore environment lighting when baking lightmaps.
	environment_mode_disabled = 0
	// Use the scene's environment lighting when baking lightmaps.
	// [b]Note:[/b] If baking lightmaps in a scene with no [WorldEnvironment] node, this will act like [constant ENVIRONMENT_MODE_DISABLED]. The editor's preview sky and sun is [i]not[/i] taken into account by [LightmapGI] when baking lightmaps.
	environment_mode_scene = 1
	// Use [member environment_custom_sky] as a source of environment lighting when baking lightmaps.
	environment_mode_custom_sky = 2
	// Use [member environment_custom_color] multiplied by [member environment_custom_energy] as a constant source of environment lighting when baking lightmaps.
	environment_mode_custom_color = 3
}

enum LightmapGIGenerateProbes #

enum LightmapGIGenerateProbes as i64 {
	// Don't generate lightmap probes for lighting dynamic objects.
	generate_probes_disabled = 0
	// Lowest level of subdivision (fastest bake times, smallest file sizes).
	generate_probes_subdiv_4 = 1
	// Low level of subdivision (fast bake times, small file sizes).
	generate_probes_subdiv_8 = 2
	// High level of subdivision (slow bake times, large file sizes).
	generate_probes_subdiv_16 = 3
	// Highest level of subdivision (slowest bake times, largest file sizes).
	generate_probes_subdiv_32 = 4
}

enum Line2DLineCapMode #

enum Line2DLineCapMode as i64 {
	// Draws no line cap.
	line_cap_none = 0
	// Draws the line cap as a box, slightly extending the first/last segment.
	line_cap_box = 1
	// Draws the line cap as a semicircle attached to the first/last segment.
	line_cap_round = 2
}

enum Line2DLineJointMode #

enum Line2DLineJointMode as i64 {
	// Makes the polyline's joints pointy, connecting the sides of the two segments by extending them until they intersect. If the rotation of a joint is too big (based on [member sharp_limit]), the joint falls back to [constant LINE_JOINT_BEVEL] to prevent very long miters.
	line_joint_sharp = 0
	// Makes the polyline's joints bevelled/chamfered, connecting the sides of the two segments with a simple line.
	line_joint_bevel = 1
	// Makes the polyline's joints rounded, connecting the sides of the two segments with an arc. The detail of this arc depends on [member round_precision].
	line_joint_round = 2
}

enum Line2DLineTextureMode #

enum Line2DLineTextureMode as i64 {
	// Takes the left pixels of the texture and renders them over the whole polyline.
	line_texture_none = 0
	// Tiles the texture over the polyline. [member CanvasItem.texture_repeat] of the [Line2D] node must be [constant CanvasItem.TEXTURE_REPEAT_ENABLED] or [constant CanvasItem.TEXTURE_REPEAT_MIRROR] for it to work properly.
	line_texture_tile = 1
	// Stretches the texture across the polyline. [member CanvasItem.texture_repeat] of the [Line2D] node must be [constant CanvasItem.TEXTURE_REPEAT_DISABLED] for best results.
	line_texture_stretch = 2
}

enum LineEditMenuItems #

enum LineEditMenuItems as i64 {
	// Cuts (copies and clears) the selected text.
	menu_cut = 0
	// Copies the selected text.
	menu_copy = 1
	// Pastes the clipboard text over the selected text (or at the caret's position).
	// Non-printable escape characters are automatically stripped from the OS clipboard via [method String.strip_escapes].
	menu_paste = 2
	// Erases the whole [LineEdit] text.
	menu_clear = 3
	// Selects the whole [LineEdit] text.
	menu_select_all = 4
	// Undoes the previous action.
	menu_undo = 5
	// Reverse the last undo action.
	menu_redo = 6
	// ID of "Text Writing Direction" submenu.
	menu_submenu_text_dir = 7
	// Sets text direction to inherited.
	menu_dir_inherited = 8
	// Sets text direction to automatic.
	menu_dir_auto = 9
	// Sets text direction to left-to-right.
	menu_dir_ltr = 10
	// Sets text direction to right-to-left.
	menu_dir_rtl = 11
	// Toggles control character display.
	menu_display_ucc = 12
	// ID of "Insert Control Character" submenu.
	menu_submenu_insert_ucc = 13
	// Inserts left-to-right mark (LRM) character.
	menu_insert_lrm = 14
	// Inserts right-to-left mark (RLM) character.
	menu_insert_rlm = 15
	// Inserts start of left-to-right embedding (LRE) character.
	menu_insert_lre = 16
	// Inserts start of right-to-left embedding (RLE) character.
	menu_insert_rle = 17
	// Inserts start of left-to-right override (LRO) character.
	menu_insert_lro = 18
	// Inserts start of right-to-left override (RLO) character.
	menu_insert_rlo = 19
	// Inserts pop direction formatting (PDF) character.
	menu_insert_pdf = 20
	// Inserts Arabic letter mark (ALM) character.
	menu_insert_alm = 21
	// Inserts left-to-right isolate (LRI) character.
	menu_insert_lri = 22
	// Inserts right-to-left isolate (RLI) character.
	menu_insert_rli = 23
	// Inserts first strong isolate (FSI) character.
	menu_insert_fsi = 24
	// Inserts pop direction isolate (PDI) character.
	menu_insert_pdi = 25
	// Inserts zero width joiner (ZWJ) character.
	menu_insert_zwj = 26
	// Inserts zero width non-joiner (ZWNJ) character.
	menu_insert_zwnj = 27
	// Inserts word joiner (WJ) character.
	menu_insert_wj = 28
	// Inserts soft hyphen (SHY) character.
	menu_insert_shy = 29
	// Opens system emoji and symbol picker.
	menu_emoji_and_symbol = 30
	// Represents the size of the [enum MenuItems] enum.
	menu_max = 31
}

enum LineEditVirtualKeyboardType #

enum LineEditVirtualKeyboardType as i64 {
	// Default text virtual keyboard.
	keyboard_type_default = 0
	// Multiline virtual keyboard.
	keyboard_type_multiline = 1
	// Virtual number keypad, useful for PIN entry.
	keyboard_type_number = 2
	// Virtual number keypad, useful for entering fractional numbers.
	keyboard_type_number_decimal = 3
	// Virtual phone number keypad.
	keyboard_type_phone = 4
	// Virtual keyboard with additional keys to assist with typing email addresses.
	keyboard_type_email_address = 5
	// Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
	// [b]Note:[/b] This is not supported on Web. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT].
	keyboard_type_password = 6
	// Virtual keyboard with additional keys to assist with typing URLs.
	keyboard_type_url = 7
}

enum LinkButtonUnderlineMode #

enum LinkButtonUnderlineMode as i64 {
	// The LinkButton will always show an underline at the bottom of its text.
	underline_mode_always = 0
	// The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it.
	underline_mode_on_hover = 1
	// The LinkButton will never show an underline at the bottom of its text.
	underline_mode_never = 2
}

enum LoggerErrorType #

enum LoggerErrorType as i64 {
	// The message received is an error.
	error_type_error = 0
	// The message received is a warning.
	error_type_warning = 1
	// The message received is a script error.
	error_type_script = 2
	// The message received is a shader error.
	error_type_shader = 3
}

enum LookAtModifier3DOriginFrom #

enum LookAtModifier3DOriginFrom as i64 {
	// The bone rest position of the bone specified in [member bone] is used as origin.
	origin_from_self = 0
	// The bone global pose position of the bone specified in [member origin_bone] is used as origin.
	// [b]Note:[/b] It is recommended that you select only the parent bone unless you are familiar with the bone processing process. The specified bone pose at the time the [LookAtModifier3D] is processed is used as a reference. In other words, if you specify a child bone and the [LookAtModifier3D] causes the child bone to move, the rendered result and direction will not match.
	origin_from_specific_bone = 1
	// The global position of the [Node3D] specified in [member origin_external_node] is used as origin.
	// [b]Note:[/b] Same as [constant ORIGIN_FROM_SPECIFIC_BONE], when specifying a [BoneAttachment3D] with a child bone assigned, the rendered result and direction will not match.
	origin_from_external_node = 2
}

enum MIDIMessage #

enum MIDIMessage as i64 {
	// Does not correspond to any MIDI message. This is the default value of [member InputEventMIDI.message].
	midi_message_none = 0
	// MIDI message sent when a note is released.
	// [b]Note:[/b] Not all MIDI devices send this message; some may send [constant MIDI_MESSAGE_NOTE_ON] with [member InputEventMIDI.velocity] set to `0`.
	midi_message_note_off = 8
	// MIDI message sent when a note is pressed.
	midi_message_note_on = 9
	// MIDI message sent to indicate a change in pressure while a note is being pressed down, also called aftertouch.
	midi_message_aftertouch = 10
	// MIDI message sent when a controller value changes. In a MIDI device, a controller is any input that doesn't play notes. These may include sliders for volume, balance, and panning, as well as switches and pedals. See the [url=https://en.wikipedia.org/wiki/General_MIDI#Controller_events]General MIDI specification[/url] for a small list.
	midi_message_control_change = 11
	// MIDI message sent when the MIDI device changes its current instrument (also called [i]program[/i] or [i]preset[/i]).
	midi_message_program_change = 12
	// MIDI message sent to indicate a change in pressure for the whole channel. Some MIDI devices may send this instead of [constant MIDI_MESSAGE_AFTERTOUCH].
	midi_message_channel_pressure = 13
	// MIDI message sent when the value of the pitch bender changes, usually a wheel on the MIDI device.
	midi_message_pitch_bend = 14
	// MIDI system exclusive (SysEx) message. This type of message is not standardized and it's highly dependent on the MIDI device sending it.
	// [b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
	midi_message_system_exclusive = 240
	// MIDI message sent every quarter frame to keep connected MIDI devices synchronized. Related to [constant MIDI_MESSAGE_TIMING_CLOCK].
	// [b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
	midi_message_quarter_frame = 241
	// MIDI message sent to jump onto a new position in the current sequence or song.
	// [b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
	midi_message_song_position_pointer = 242
	// MIDI message sent to select a sequence or song to play.
	// [b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
	midi_message_song_select = 243
	// MIDI message sent to request a tuning calibration. Used on analog synthesizers. Most modern MIDI devices do not need this message.
	midi_message_tune_request = 246
	// MIDI message sent 24 times after [constant MIDI_MESSAGE_QUARTER_FRAME], to keep connected MIDI devices synchronized.
	midi_message_timing_clock = 248
	// MIDI message sent to start the current sequence or song from the beginning.
	midi_message_start = 250
	// MIDI message sent to resume from the point the current sequence or song was paused.
	midi_message_continue = 251
	// MIDI message sent to pause the current sequence or song.
	midi_message_stop = 252
	// MIDI message sent repeatedly while the MIDI device is idle, to tell the receiver that the connection is alive. Most MIDI devices do not send this message.
	midi_message_active_sensing = 254
	// MIDI message sent to reset a MIDI device to its default state, as if it was just turned on. It should not be sent when the MIDI device is being turned on.
	midi_message_system_reset = 255
}

enum MeshArrayCustomFormat #

enum MeshArrayCustomFormat as i64 {
	// Indicates this custom channel contains unsigned normalized byte colors from 0 to 1, encoded as [PackedByteArray].
	array_custom_rgba8_unorm = 0
	// Indicates this custom channel contains signed normalized byte colors from -1 to 1, encoded as [PackedByteArray].
	array_custom_rgba8_snorm = 1
	// Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray]. Only red and green channels are used.
	array_custom_rg_half = 2
	// Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray].
	array_custom_rgba_half = 3
	// Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only the red channel is used.
	array_custom_r_float = 4
	// Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red and green channels are used.
	array_custom_rg_float = 5
	// Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red, green and blue channels are used.
	array_custom_rgb_float = 6
	// Indicates this custom channel contains full float colors, in a [PackedFloat32Array].
	array_custom_rgba_float = 7
	// Represents the size of the [enum ArrayCustomFormat] enum.
	array_custom_max = 8
}

enum MeshArrayFormat #

enum MeshArrayFormat as i64 {
	// Mesh array contains vertices. All meshes require a vertex array so this should always be present.
	array_format_vertex = 1
	// Mesh array contains normals.
	array_format_normal = 2
	// Mesh array contains tangents.
	array_format_tangent = 4
	// Mesh array contains colors.
	array_format_color = 8
	// Mesh array contains UVs.
	array_format_tex_uv = 16
	// Mesh array contains second UV.
	array_format_tex_uv2 = 32
	// Mesh array contains custom channel index 0.
	array_format_custom0 = 64
	// Mesh array contains custom channel index 1.
	array_format_custom1 = 128
	// Mesh array contains custom channel index 2.
	array_format_custom2 = 256
	// Mesh array contains custom channel index 3.
	array_format_custom3 = 512
	// Mesh array contains bones.
	array_format_bones = 1024
	// Mesh array contains bone weights.
	array_format_weights = 2048
	// Mesh array uses indices.
	array_format_index = 4096
	// Mask of mesh channels permitted in blend shapes.
	array_format_blend_shape_mask = 7
	// Shift of first custom channel.
	array_format_custom_base = 13
	// Number of format bits per custom channel. See [enum ArrayCustomFormat].
	array_format_custom_bits = 3
	// Amount to shift [enum ArrayCustomFormat] for custom channel index 2.
	array_format_custom2_shift = 19
	// Amount to shift [enum ArrayCustomFormat] for custom channel index 3.
	array_format_custom3_shift = 22
	// Shift of first compress flag. Compress flags should be passed to [method ArrayMesh.add_surface_from_arrays] and [method SurfaceTool.commit].
	array_compress_flags_base = 25
	// Flag used to mark that the array contains 2D vertices.
	array_flag_use_2d_vertices = 33554432
	// Flag used to mark that the mesh data will use `GL_DYNAMIC_DRAW` on GLES. Unused on Vulkan.
	array_flag_use_dynamic_update = 67108864
	// Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that [constant ARRAY_BONES] and [constant ARRAY_WEIGHTS] elements will have double length.
	array_flag_use_8_bone_weights = 134217728
	// Flag used to mark that the mesh intentionally contains no vertex array.
	array_flag_uses_empty_vertex_array = 268435456
	// Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can.
	array_flag_compress_attributes = 536870912
}

enum MeshArrayType #

enum MeshArrayType as i64 {
	// [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions.
	array_vertex = 0
	// [PackedVector3Array] of vertex normals.
	// [b]Note:[/b] The array has to consist of normal vectors, otherwise they will be normalized by the engine, potentially causing visual discrepancies.
	array_normal = 1
	// [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
	array_tangent = 2
	// [PackedColorArray] of vertex colors.
	array_color = 3
	// [PackedVector2Array] for UV coordinates.
	array_tex_uv = 4
	// [PackedVector2Array] for second UV coordinates.
	array_tex_uv2 = 5
	// Contains custom color channel 0. [PackedByteArray] if `(format >> Mesh.ARRAY_FORMAT_CUSTOM0_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
	array_custom0 = 6
	// Contains custom color channel 1. [PackedByteArray] if `(format >> Mesh.ARRAY_FORMAT_CUSTOM1_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
	array_custom1 = 7
	// Contains custom color channel 2. [PackedByteArray] if `(format >> Mesh.ARRAY_FORMAT_CUSTOM2_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
	array_custom2 = 8
	// Contains custom color channel 3. [PackedByteArray] if `(format >> Mesh.ARRAY_FORMAT_CUSTOM3_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
	array_custom3 = 9
	// [PackedFloat32Array] or [PackedInt32Array] of bone indices. Contains either 4 or 8 numbers per vertex depending on the presence of the [constant ARRAY_FLAG_USE_8_BONE_WEIGHTS] flag.
	array_bones = 10
	// [PackedFloat32Array] or [PackedFloat64Array] of bone weights in the range `0.0` to `1.0` (inclusive). Contains either 4 or 8 numbers per vertex depending on the presence of the [constant ARRAY_FLAG_USE_8_BONE_WEIGHTS] flag.
	array_weights = 11
	// [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the [i]i[/i]'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
	// For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
	array_index = 12
	// Represents the size of the [enum ArrayType] enum.
	array_max = 13
}

enum MeshBlendShapeMode #

enum MeshBlendShapeMode as i64 {
	// Blend shapes are normalized.
	blend_shape_mode_normalized = 0
	// Blend shapes are relative to base weight.
	blend_shape_mode_relative = 1
}

enum MeshConvexDecompositionSettingsMode #

enum MeshConvexDecompositionSettingsMode as i64 {
	// Constant for voxel-based approximate convex decomposition.
	convex_decomposition_mode_voxel = 0
	// Constant for tetrahedron-based approximate convex decomposition.
	convex_decomposition_mode_tetrahedron = 1
}

enum MeshPrimitiveType #

enum MeshPrimitiveType as i64 {
	// Render array as points (one vertex equals one point).
	primitive_points = 0
	// Render array as lines (every two vertices a line is created).
	primitive_lines = 1
	// Render array as line strip.
	primitive_line_strip = 2
	// Render array as triangles (every three vertices a triangle is created).
	primitive_triangles = 3
	// Render array as triangle strips.
	primitive_triangle_strip = 4
}

enum MethodFlags #

enum MethodFlags as i64 {
	// Flag for a normal method.
	method_flag_normal = 1
	// Flag for an editor method.
	method_flag_editor = 2
	// Flag for a constant method.
	method_flag_const = 4
	// Flag for a virtual method.
	method_flag_virtual = 8
	// Flag for a method with a variable number of arguments.
	method_flag_vararg = 16
	// Flag for a static method.
	method_flag_static = 32
	// Used internally. Allows to not dump core virtual methods (such as [method Object._notification]) to the JSON API.
	method_flag_object_core = 64
	// Flag for a virtual method that is required. In GDScript, this flag is set for abstract functions.
	method_flag_virtual_required = 128
}

enum MouseButton #

enum MouseButton as i64 {
	// Enum value which doesn't correspond to any mouse button. This is used to initialize [enum MouseButton] properties with a generic state.
	mouse_button_none = 0
	// Primary mouse button, usually assigned to the left button.
	mouse_button_left = 1
	// Secondary mouse button, usually assigned to the right button.
	mouse_button_right = 2
	// Middle mouse button.
	mouse_button_middle = 3
	// Mouse wheel scrolling up.
	mouse_button_wheel_up = 4
	// Mouse wheel scrolling down.
	mouse_button_wheel_down = 5
	// Mouse wheel left button (only present on some mice).
	mouse_button_wheel_left = 6
	// Mouse wheel right button (only present on some mice).
	mouse_button_wheel_right = 7
	// Extra mouse button 1. This is sometimes present, usually to the sides of the mouse.
	mouse_button_xbutton1 = 8
	// Extra mouse button 2. This is sometimes present, usually to the sides of the mouse.
	mouse_button_xbutton2 = 9
}

enum MouseButtonMask #

enum MouseButtonMask as i64 {
	// Primary mouse button mask, usually for the left button.
	mouse_button_mask_left = 1
	// Secondary mouse button mask, usually for the right button.
	mouse_button_mask_right = 2
	// Middle mouse button mask.
	mouse_button_mask_middle = 4
	// Extra mouse button 1 mask.
	mouse_button_mask_mb_xbutton1 = 128
	// Extra mouse button 2 mask.
	mouse_button_mask_mb_xbutton2 = 256
}

enum MultiMeshPhysicsInterpolationQuality #

enum MultiMeshPhysicsInterpolationQuality as i64 {
	// Always interpolate using Basis lerping, which can produce warping artifacts in some situations.
	interp_quality_fast = 0
	// Attempt to interpolate using Basis slerping (spherical linear interpolation) where possible, otherwise fall back to lerping.
	interp_quality_high = 1
}

enum MultiMeshTransformFormat #

enum MultiMeshTransformFormat as i64 {
	// Use this when using 2D transforms.
	transform_2d = 0
	// Use this when using 3D transforms.
	transform_3d = 1
}

enum MultiplayerAPIRPCMode #

enum MultiplayerAPIRPCMode as i64 {
	// Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
	rpc_mode_disabled = 0
	// Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the `@rpc("any_peer")` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not.
	rpc_mode_any_peer = 1
	// Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the `@rpc("authority")` annotation. See [method Node.set_multiplayer_authority].
	rpc_mode_authority = 2
}

enum MultiplayerPeerConnectionStatus #

enum MultiplayerPeerConnectionStatus as i64 {
	// The MultiplayerPeer is disconnected.
	connection_disconnected = 0
	// The MultiplayerPeer is currently connecting to a server.
	connection_connecting = 1
	// This MultiplayerPeer is connected.
	connection_connected = 2
}

enum MultiplayerPeerTransferMode #

enum MultiplayerPeerTransferMode as i64 {
	// Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
	transfer_mode_unreliable = 0
	// Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
	transfer_mode_unreliable_ordered = 1
	// Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
	transfer_mode_reliable = 2
}

enum MultiplayerSynchronizerVisibilityUpdateMode #

enum MultiplayerSynchronizerVisibilityUpdateMode as i64 {
	// Visibility filters are updated during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]).
	visibility_process_idle = 0
	// Visibility filters are updated during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]).
	visibility_process_physics = 1
	// Visibility filters are not updated automatically, and must be updated manually by calling [method update_visibility].
	visibility_process_none = 2
}

enum NativeMenuFeature #

enum NativeMenuFeature as i64 {
	// [NativeMenu] supports native global main menu.
	feature_global_menu = 0
	// [NativeMenu] supports native popup menus.
	feature_popup_menu = 1
	// [NativeMenu] supports menu open and close callbacks.
	feature_open_close_callback = 2
	// [NativeMenu] supports menu item hover callback.
	feature_hover_callback = 3
	// [NativeMenu] supports menu item accelerator/key callback.
	feature_key_callback = 4
}

enum NativeMenuSystemMenus #

enum NativeMenuSystemMenus as i64 {
	// Invalid special system menu ID.
	invalid_menu_id = 0
	// Global main menu ID.
	main_menu_id = 1
	// Application (first menu after "Apple" menu on macOS) menu ID.
	application_menu_id = 2
	// "Window" menu ID (on macOS this menu includes standard window control items and a list of open windows).
	window_menu_id = 3
	// "Help" menu ID (on macOS this menu includes help search bar).
	help_menu_id = 4
	// Dock icon right-click menu ID (on macOS this menu include standard application control items and a list of open windows).
	dock_menu_id = 5
}

enum NinePatchRectAxisStretchMode #

enum NinePatchRectAxisStretchMode as i64 {
	// Stretches the center texture across the NinePatchRect. This may cause the texture to be distorted.
	axis_stretch_mode_stretch = 0
	// Repeats the center texture across the NinePatchRect. This won't cause any visible distortion. The texture must be seamless for this to work without displaying artifacts between edges.
	axis_stretch_mode_tile = 1
	// Repeats the center texture across the NinePatchRect, but will also stretch the texture to make sure each tile is visible in full. This may cause the texture to be distorted, but less than [constant AXIS_STRETCH_MODE_STRETCH]. The texture must be seamless for this to work without displaying artifacts between edges.
	axis_stretch_mode_tile_fit = 2
}

enum Node3DRotationEditMode #

enum Node3DRotationEditMode as i64 {
	// The rotation is edited using a [Vector3] in [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url].
	rotation_edit_mode_euler = 0
	// The rotation is edited using a [Quaternion].
	rotation_edit_mode_quaternion = 1
	// The rotation is edited using a [Basis]. In this mode, the raw [member basis]'s axes can be freely modified, but the [member scale] property is not available.
	rotation_edit_mode_basis = 2
}

enum NodeAutoTranslateMode #

enum NodeAutoTranslateMode as i64 {
	// Inherits [member auto_translate_mode] from the node's parent. This is the default for any newly created node.
	auto_translate_mode_inherit = 0
	// Always automatically translate. This is the inverse of [constant AUTO_TRANSLATE_MODE_DISABLED], and the default for the root node.
	auto_translate_mode_always = 1
	// Never automatically translate. This is the inverse of [constant AUTO_TRANSLATE_MODE_ALWAYS].
	// String parsing for POT generation will be skipped for this node and children that are set to [constant AUTO_TRANSLATE_MODE_INHERIT].
	auto_translate_mode_disabled = 2
}

enum NodeDuplicateFlags #

enum NodeDuplicateFlags as i64 {
	// Duplicate the node's signal connections that are connected with the [constant Object.CONNECT_PERSIST] flag.
	duplicate_signals = 1
	// Duplicate the node's groups.
	duplicate_groups = 2
	// Duplicate the node's script (also overriding the duplicated children's scripts, if combined with [constant DUPLICATE_USE_INSTANTIATION]).
	duplicate_scripts = 4
	// Duplicate using [method PackedScene.instantiate]. If the node comes from a scene saved on disk, reuses [method PackedScene.instantiate] as the base for the duplicated node and its children.
	duplicate_use_instantiation = 8
}

enum NodeInternalMode #

enum NodeInternalMode as i64 {
	// The node will not be internal.
	internal_mode_disabled = 0
	// The node will be placed at the beginning of the parent's children, before any non-internal sibling.
	internal_mode_front = 1
	// The node will be placed at the end of the parent's children, after any non-internal sibling.
	internal_mode_back = 2
}

enum NodePhysicsInterpolationMode #

enum NodePhysicsInterpolationMode as i64 {
	// Inherits [member physics_interpolation_mode] from the node's parent. This is the default for any newly created node.
	physics_interpolation_mode_inherit = 0
	// Enables physics interpolation for this node and for children set to [constant PHYSICS_INTERPOLATION_MODE_INHERIT]. This is the default for the root node.
	physics_interpolation_mode_on = 1
	// Disables physics interpolation for this node and for children set to [constant PHYSICS_INTERPOLATION_MODE_INHERIT].
	physics_interpolation_mode_off = 2
}

enum NodeProcessMode #

enum NodeProcessMode as i64 {
	// Inherits [member process_mode] from the node's parent. This is the default for any newly created node.
	process_mode_inherit = 0
	// Stops processing when [member SceneTree.paused] is `true`. This is the inverse of [constant PROCESS_MODE_WHEN_PAUSED], and the default for the root node.
	process_mode_pausable = 1
	// Process [b]only[/b] when [member SceneTree.paused] is `true`. This is the inverse of [constant PROCESS_MODE_PAUSABLE].
	process_mode_when_paused = 2
	// Always process. Keeps processing, ignoring [member SceneTree.paused]. This is the inverse of [constant PROCESS_MODE_DISABLED].
	process_mode_always = 3
	// Never process. Completely disables processing, ignoring [member SceneTree.paused]. This is the inverse of [constant PROCESS_MODE_ALWAYS].
	process_mode_disabled = 4
}

enum NodeProcessThreadGroup #

enum NodeProcessThreadGroup as i64 {
	// Process this node based on the thread group mode of the first parent (or grandparent) node that has a thread group mode that is not inherit. See [member process_thread_group] for more information.
	process_thread_group_inherit = 0
	// Process this node (and child nodes set to inherit) on the main thread. See [member process_thread_group] for more information.
	process_thread_group_main_thread = 1
	// Process this node (and child nodes set to inherit) on a sub-thread. See [member process_thread_group] for more information.
	process_thread_group_sub_thread = 2
}

enum NodeProcessThreadMessages #

enum NodeProcessThreadMessages as i64 {
	// Allows this node to process threaded messages created with [method call_deferred_thread_group] right before [method _process] is called.
	flag_process_thread_messages = 1
	// Allows this node to process threaded messages created with [method call_deferred_thread_group] right before [method _physics_process] is called.
	flag_process_thread_messages_physics = 2
	// Allows this node to process threaded messages created with [method call_deferred_thread_group] right before either [method _process] or [method _physics_process] are called.
	flag_process_thread_messages_all = 3
}

enum OSRenderingDriver #

enum OSRenderingDriver as i64 {
	// The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available.
	rendering_driver_vulkan = 0
	// The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web.
	rendering_driver_opengl3 = 1
	// The Direct3D 12 rendering driver.
	rendering_driver_d3d12 = 2
	// The Metal rendering driver.
	rendering_driver_metal = 3
}

enum OSStdHandleType #

enum OSStdHandleType as i64 {
	// Standard I/O device is invalid. No data can be received from or sent to these standard I/O devices.
	std_handle_invalid = 0
	// Standard I/O device is a console. This typically occurs when Godot is run from a terminal with no redirection. This is also used for all standard I/O devices when running Godot from the editor, at least on desktop platforms.
	std_handle_console = 1
	// Standard I/O device is a regular file. This typically occurs with redirection from a terminal, e.g. `godot > stdout.txt`, `godot < stdin.txt` or `godot > stdout_stderr.txt 2>&1`.
	std_handle_file = 2
	// Standard I/O device is a FIFO/pipe. This typically occurs with pipe usage from a terminal, e.g. `echo "Hello" | godot`.
	std_handle_pipe = 3
	// Standard I/O device type is unknown.
	std_handle_unknown = 4
}

enum OSSystemDir #

enum OSSystemDir as i64 {
	// Refers to the Desktop directory path.
	system_dir_desktop = 0
	// Refers to the DCIM (Digital Camera Images) directory path.
	system_dir_dcim = 1
	// Refers to the Documents directory path.
	system_dir_documents = 2
	// Refers to the Downloads directory path.
	system_dir_downloads = 3
	// Refers to the Movies (or Videos) directory path.
	system_dir_movies = 4
	// Refers to the Music directory path.
	system_dir_music = 5
	// Refers to the Pictures directory path.
	system_dir_pictures = 6
	// Refers to the Ringtones directory path.
	system_dir_ringtones = 7
}

enum ObjectConnectFlags #

enum ObjectConnectFlags as i64 {
	// Deferred connections trigger their [Callable]s on idle time (at the end of the frame), rather than instantly.
	connect_deferred = 1
	// Persisting connections are stored when the object is serialized (such as when using [method PackedScene.pack]). In the editor, connections created through the Node dock are always persisting.
	connect_persist = 2
	// One-shot connections disconnect themselves after emission.
	connect_one_shot = 4
	// Reference-counted connections can be assigned to the same [Callable] multiple times. Each disconnection decreases the internal counter. The signal fully disconnects only when the counter reaches 0.
	connect_reference_counted = 8
	// The source object is automatically bound when a [PackedScene] is instantiated. If this flag bit is enabled, the source object will be appended right after the original arguments of the signal.
	connect_append_source_object = 16
}

enum OccluderPolygon2DCullMode #

enum OccluderPolygon2DCullMode as i64 {
	// Culling is disabled. See [member cull_mode].
	cull_disabled = 0
	// Culling is performed in the clockwise direction. See [member cull_mode].
	cull_clockwise = 1
	// Culling is performed in the counterclockwise direction. See [member cull_mode].
	cull_counter_clockwise = 2
}

enum OmniLight3DShadowMode #

enum OmniLight3DShadowMode as i64 {
	// Shadows are rendered to a dual-paraboloid texture. Faster than [constant SHADOW_CUBE], but lower-quality.
	shadow_dual_paraboloid = 0
	// Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality.
	shadow_cube = 1
}

enum OpenXRAPIExtensionOpenXRAlphaBlendModeSupport #

enum OpenXRAPIExtensionOpenXRAlphaBlendModeSupport as i64 {
	// Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] isn't supported at all.
	openxr_alpha_blend_mode_support_none = 0
	// Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is really supported.
	openxr_alpha_blend_mode_support_real = 1
	// Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is emulated.
	openxr_alpha_blend_mode_support_emulating = 2
}

enum OpenXRActionActionType #

enum OpenXRActionActionType as i64 {
	// This action provides a boolean value.
	openxr_action_bool = 0
	// This action provides a float value between `0.0` and `1.0` for any analog input such as triggers.
	openxr_action_float = 1
	// This action provides a [Vector2] value and can be bound to embedded trackpads and joysticks.
	openxr_action_vector2 = 2
	openxr_action_pose    = 3
}

enum OpenXRCompositionLayerFilter #

enum OpenXRCompositionLayerFilter as i64 {
	// Perform nearest-neighbor filtering when sampling the texture.
	filter_nearest = 0
	// Perform linear filtering when sampling the texture.
	filter_linear = 1
	// Perform cubic filtering when sampling the texture.
	filter_cubic = 2
}

enum OpenXRCompositionLayerMipmapMode #

enum OpenXRCompositionLayerMipmapMode as i64 {
	// Disable mipmapping.
	// [b]Note:[/b] Mipmapping can only be disabled in the Compatibility renderer.
	mipmap_mode_disabled = 0
	// Use the mipmap of the nearest resolution.
	mipmap_mode_nearest = 1
	// Use linear interpolation of the two mipmaps of the nearest resolution.
	mipmap_mode_linear = 2
}

enum OpenXRCompositionLayerSwizzle #

enum OpenXRCompositionLayerSwizzle as i64 {
	// Maps a color channel to the value of the red channel.
	swizzle_red = 0
	// Maps a color channel to the value of the green channel.
	swizzle_green = 1
	// Maps a color channel to the value of the blue channel.
	swizzle_blue = 2
	// Maps a color channel to the value of the alpha channel.
	swizzle_alpha = 3
	// Maps a color channel to the value of zero.
	swizzle_zero = 4
	// Maps a color channel to the value of one.
	swizzle_one = 5
}

enum OpenXRCompositionLayerWrap #

enum OpenXRCompositionLayerWrap as i64 {
	// Clamp the texture to its specified border color.
	wrap_clamp_to_border = 0
	// Clamp the texture to its edge color.
	wrap_clamp_to_edge = 1
	// Repeat the texture infinitely.
	wrap_repeat = 2
	// Repeat the texture infinitely, mirroring it on each repeat.
	wrap_mirrored_repeat = 3
	// Mirror the texture once and then clamp the texture to its edge color.
	// [b]Note:[/b] This wrap mode is not available in the Compatibility renderer.
	wrap_mirror_clamp_to_edge = 4
}

enum OpenXRFutureResultResultStatus #

enum OpenXRFutureResultResultStatus as i64 {
	// The asynchronous function is running.
	result_running = 0
	// The asynchronous function has finished.
	result_finished = 1
	// The asynchronous function has been cancelled.
	result_cancelled = 2
}

enum OpenXRHandBoneUpdate #

enum OpenXRHandBoneUpdate as i64 {
	// The skeletons bones are fully updated (both position and rotation) to match the tracked bones.
	bone_update_full = 0
	// The skeletons bones are only rotated to align with the tracked bones, preserving bone length.
	bone_update_rotation_only = 1
	// Maximum supported bone update mode.
	bone_update_max = 2
}

enum OpenXRHandHands #

enum OpenXRHandHands as i64 {
	// Tracking the player's left hand.
	hand_left = 0
	// Tracking the player's right hand.
	hand_right = 1
	// Maximum supported hands.
	hand_max = 2
}

enum OpenXRHandMotionRange #

enum OpenXRHandMotionRange as i64 {
	// When player grips, hand skeleton will form a full fist.
	motion_range_unobstructed = 0
	// When player grips, hand skeleton conforms to the controller the player is holding.
	motion_range_conform_to_controller = 1
	// Maximum supported motion ranges.
	motion_range_max = 2
}

enum OpenXRHandSkeletonRig #

enum OpenXRHandSkeletonRig as i64 {
	// An OpenXR compliant skeleton.
	skeleton_rig_openxr = 0
	// A [SkeletonProfileHumanoid] compliant skeleton.
	skeleton_rig_humanoid = 1
	// Maximum supported hands.
	skeleton_rig_max = 2
}

enum OpenXRInterfaceHand #

enum OpenXRInterfaceHand as i64 {
	// Left hand.
	hand_left = 0
	// Right hand.
	hand_right = 1
	// Maximum value for the hand enum.
	hand_max = 2
}

enum OpenXRInterfaceHandJointFlags #

enum OpenXRInterfaceHandJointFlags as i64 {
	// No flags are set.
	hand_joint_none = 0
	// If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used.
	hand_joint_orientation_valid = 1
	// If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data.
	hand_joint_orientation_tracked = 2
	// If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used.
	hand_joint_position_valid = 4
	// If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data.
	hand_joint_position_tracked = 8
	// If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used.
	hand_joint_linear_velocity_valid = 16
	// If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used.
	hand_joint_angular_velocity_valid = 32
}

enum OpenXRInterfaceHandJoints #

enum OpenXRInterfaceHandJoints as i64 {
	// Palm joint.
	hand_joint_palm = 0
	// Wrist joint.
	hand_joint_wrist = 1
	// Thumb metacarpal joint.
	hand_joint_thumb_metacarpal = 2
	// Thumb proximal joint.
	hand_joint_thumb_proximal = 3
	// Thumb distal joint.
	hand_joint_thumb_distal = 4
	// Thumb tip joint.
	hand_joint_thumb_tip = 5
	// Index finger metacarpal joint.
	hand_joint_index_metacarpal = 6
	// Index finger phalanx proximal joint.
	hand_joint_index_proximal = 7
	// Index finger phalanx intermediate joint.
	hand_joint_index_intermediate = 8
	// Index finger phalanx distal joint.
	hand_joint_index_distal = 9
	// Index finger tip joint.
	hand_joint_index_tip = 10
	// Middle finger metacarpal joint.
	hand_joint_middle_metacarpal = 11
	// Middle finger phalanx proximal joint.
	hand_joint_middle_proximal = 12
	// Middle finger phalanx intermediate joint.
	hand_joint_middle_intermediate = 13
	// Middle finger phalanx distal joint.
	hand_joint_middle_distal = 14
	// Middle finger tip joint.
	hand_joint_middle_tip = 15
	// Ring finger metacarpal joint.
	hand_joint_ring_metacarpal = 16
	// Ring finger phalanx proximal joint.
	hand_joint_ring_proximal = 17
	// Ring finger phalanx intermediate joint.
	hand_joint_ring_intermediate = 18
	// Ring finger phalanx distal joint.
	hand_joint_ring_distal = 19
	// Ring finger tip joint.
	hand_joint_ring_tip = 20
	// Pinky finger metacarpal joint.
	hand_joint_little_metacarpal = 21
	// Pinky finger phalanx proximal joint.
	hand_joint_little_proximal = 22
	// Pinky finger phalanx intermediate joint.
	hand_joint_little_intermediate = 23
	// Pinky finger phalanx distal joint.
	hand_joint_little_distal = 24
	// Pinky finger tip joint.
	hand_joint_little_tip = 25
	// Represents the size of the [enum HandJoints] enum.
	hand_joint_max = 26
}

enum OpenXRInterfaceHandMotionRange #

enum OpenXRInterfaceHandMotionRange as i64 {
	// Full hand range, if user closes their hands, we make a full fist.
	hand_motion_range_unobstructed = 0
	// Conform to controller, if user closes their hands, the tracked data conforms to the shape of the controller.
	hand_motion_range_conform_to_controller = 1
	// Maximum value for the motion range enum.
	hand_motion_range_max = 2
}

enum OpenXRInterfaceHandTrackedSource #

enum OpenXRInterfaceHandTrackedSource as i64 {
	// The source of hand tracking data is unknown (the extension is likely unsupported).
	hand_tracked_source_unknown = 0
	// The source of hand tracking is unobstructed, this means that an accurate method of hand tracking is used, e.g. optical hand tracking, data gloves, etc.
	hand_tracked_source_unobstructed = 1
	// The source of hand tracking is a controller, bone positions are inferred from controller inputs.
	hand_tracked_source_controller = 2
	// Represents the size of the [enum HandTrackedSource] enum.
	hand_tracked_source_max = 3
}

enum OpenXRInterfacePerfSettingsLevel #

enum OpenXRInterfacePerfSettingsLevel as i64 {
	// The application has entered a non-XR section (head-locked / static screen), during which power savings are to be prioritized.
	perf_settings_level_power_savings = 0
	// The application has entered a low and stable complexity section, during which reducing power is more important than occasional late rendering frames.
	perf_settings_level_sustained_low = 1
	// The application has entered a high or dynamic complexity section, during which the XR Runtime strives for consistent XR compositing and frame rendering within a thermally sustainable range.
	perf_settings_level_sustained_high = 2
	// The application has entered a section with very high complexity, during which the XR Runtime is allowed to step up beyond the thermally sustainable range.
	perf_settings_level_boost = 3
}

enum OpenXRInterfacePerfSettingsNotificationLevel #

enum OpenXRInterfacePerfSettingsNotificationLevel as i64 {
	// The sub-domain has reached a level where no further actions other than currently applied are necessary.
	perf_settings_notif_level_normal = 0
	// The sub-domain has reached an early warning level where the application should start proactive mitigation actions.
	perf_settings_notif_level_warning = 1
	// The sub-domain has reached a critical level where the application should start drastic mitigation actions.
	perf_settings_notif_level_impaired = 2
}

enum OpenXRInterfacePerfSettingsSubDomain #

enum OpenXRInterfacePerfSettingsSubDomain as i64 {
	// The compositing performance within the runtime has reached a new level.
	perf_settings_sub_domain_compositing = 0
	// The application rendering performance has reached a new level.
	perf_settings_sub_domain_rendering = 1
	// The temperature of the device has reached a new level.
	perf_settings_sub_domain_thermal = 2
}

enum Orientation #

enum Orientation as i64 {
	// General vertical alignment, usually used for [Separator], [ScrollBar], [Slider], etc.
	vertical = 1
	// General horizontal alignment, usually used for [Separator], [ScrollBar], [Slider], etc.
	horizontal = 0
}

enum PackedSceneGenEditState #

enum PackedSceneGenEditState as i64 {
	// If passed to [method instantiate], blocks edits to the scene state.
	gen_edit_state_disabled = 0
	// If passed to [method instantiate], provides local scene resources to the local scene.
	// [b]Note:[/b] Only available in editor builds.
	gen_edit_state_instance = 1
	// If passed to [method instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
	// [b]Note:[/b] Only available in editor builds.
	gen_edit_state_main = 2
	// It's similar to [constant GEN_EDIT_STATE_MAIN], but for the case where the scene is being instantiated to be the base of another one.
	// [b]Note:[/b] Only available in editor builds.
	gen_edit_state_main_inherited = 3
}

enum PacketPeerDTLSStatus #

enum PacketPeerDTLSStatus as i64 {
	// A status representing a [PacketPeerDTLS] that is disconnected.
	status_disconnected = 0
	// A status representing a [PacketPeerDTLS] that is currently performing the handshake with a remote peer.
	status_handshaking = 1
	// A status representing a [PacketPeerDTLS] that is connected to a remote peer.
	status_connected = 2
	// A status representing a [PacketPeerDTLS] in a generic error state.
	status_error = 3
	// An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation.
	status_error_hostname_mismatch = 4
}

enum ParticleProcessMaterialCollisionMode #

enum ParticleProcessMaterialCollisionMode as i64 {
	// No collision for particles. Particles will go through [GPUParticlesCollision3D] nodes.
	collision_disabled = 0
	// [RigidBody3D]-style collision for particles using [GPUParticlesCollision3D] nodes.
	collision_rigid = 1
	// Hide particles instantly when colliding with a [GPUParticlesCollision3D] node. This can be combined with a subemitter that uses the [constant COLLISION_RIGID] collision mode to "replace" the parent particle with the subemitter on impact.
	collision_hide_on_contact = 2
	// Represents the size of the [enum CollisionMode] enum.
	collision_max = 3
}

enum ParticleProcessMaterialEmissionShape #

enum ParticleProcessMaterialEmissionShape as i64 {
	// All particles will be emitted from a single point.
	emission_shape_point = 0
	// Particles will be emitted in the volume of a sphere.
	emission_shape_sphere = 1
	// Particles will be emitted on the surface of a sphere.
	emission_shape_sphere_surface = 2
	// Particles will be emitted in the volume of a box.
	emission_shape_box = 3
	// Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle color will be modulated by [member emission_color_texture].
	emission_shape_points = 4
	// Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture].
	emission_shape_directed_points = 5
	// Particles will be emitted in a ring or cylinder.
	emission_shape_ring = 6
	// Represents the size of the [enum EmissionShape] enum.
	emission_shape_max = 7
}

enum ParticleProcessMaterialParameter #

enum ParticleProcessMaterialParameter as i64 {
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set initial velocity properties.
	param_initial_linear_velocity = 0
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angular velocity properties.
	param_angular_velocity = 1
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set orbital velocity properties.
	param_orbit_velocity = 2
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set linear acceleration properties.
	param_linear_accel = 3
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial acceleration properties.
	param_radial_accel = 4
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set tangential acceleration properties.
	param_tangential_accel = 5
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set damping properties.
	param_damping = 6
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angle properties.
	param_angle = 7
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale properties.
	param_scale = 8
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set hue variation properties.
	param_hue_variation = 9
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation speed properties.
	param_anim_speed = 10
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties.
	param_anim_offset = 11
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial velocity properties.
	param_radial_velocity = 15
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set directional velocity properties.
	param_directional_velocity = 16
	// Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale over velocity properties.
	param_scale_over_velocity = 17
	// Represents the size of the [enum Parameter] enum.
	param_max = 18
	// Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum und maximum influence on each particles velocity.
	param_turb_vel_influence = 13
	// Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum and maximum displacement of the particles spawn position.
	param_turb_init_displacement = 14
	// Use with [method set_param_texture] to set the turbulence influence over the particles life time.
	param_turb_influence_over_life = 12
}

enum ParticleProcessMaterialParticleFlags #

enum ParticleProcessMaterialParticleFlags as i64 {
	// Use with [method set_particle_flag] to set [member particle_flag_align_y].
	particle_flag_align_y_to_velocity = 0
	// Use with [method set_particle_flag] to set [member particle_flag_rotate_y].
	particle_flag_rotate_y = 1
	// Use with [method set_particle_flag] to set [member particle_flag_disable_z].
	particle_flag_disable_z           = 2
	particle_flag_damping_as_friction = 3
	// Represents the size of the [enum ParticleFlags] enum.
	particle_flag_max = 4
}

enum ParticleProcessMaterialSubEmitterMode #

enum ParticleProcessMaterialSubEmitterMode as i64 {
	sub_emitter_disabled     = 0
	sub_emitter_constant     = 1
	sub_emitter_at_end       = 2
	sub_emitter_at_collision = 3
	sub_emitter_at_start     = 4
	// Represents the size of the [enum SubEmitterMode] enum.
	sub_emitter_max = 5
}

enum PathFollow3DRotationMode #

enum PathFollow3DRotationMode as i64 {
	// Forbids the PathFollow3D to rotate.
	rotation_none = 0
	// Allows the PathFollow3D to rotate in the Y axis only.
	rotation_y = 1
	// Allows the PathFollow3D to rotate in both the X, and Y axes.
	rotation_xy = 2
	// Allows the PathFollow3D to rotate in any axis.
	rotation_xyz = 3
	// Uses the up vector information in a [Curve3D] to enforce orientation. This rotation mode requires the [Path3D]'s [member Curve3D.up_vector_enabled] property to be set to `true`.
	rotation_oriented = 4
}

enum PerformanceMonitor #

enum PerformanceMonitor as i64 {
	// The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. [i]Higher is better.[/i]
	time_fps = 0
	// Time it took to complete one frame, in seconds. [i]Lower is better.[/i]
	time_process = 1
	// Time it took to complete one physics frame, in seconds. [i]Lower is better.[/i]
	time_physics_process = 2
	// Time it took to complete one navigation step, in seconds. This includes navigation map updates as well as agent avoidance calculations. [i]Lower is better.[/i]
	time_navigation_process = 3
	// Static memory currently used, in bytes. Not available in release builds. [i]Lower is better.[/i]
	memory_static = 4
	// Available static memory. Not available in release builds. [i]Lower is better.[/i]
	memory_static_max = 5
	// Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. [i]Lower is better.[/i]
	memory_message_buffer_max = 6
	// Number of objects currently instantiated (including nodes). [i]Lower is better.[/i]
	object_count = 7
	// Number of resources currently used. [i]Lower is better.[/i]
	object_resource_count = 8
	// Number of nodes currently instantiated in the scene tree. This also includes the root node. [i]Lower is better.[/i]
	object_node_count = 9
	// Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. [i]Lower is better.[/i]
	object_orphan_node_count = 10
	// The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). [i]Lower is better.[/i]
	render_total_objects_in_frame = 11
	// The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). [i]Lower is better.[/i]
	render_total_primitives_in_frame = 12
	// The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. [i]Lower is better.[/i]
	render_total_draw_calls_in_frame = 13
	// The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of [constant RENDER_TEXTURE_MEM_USED] and [constant RENDER_BUFFER_MEM_USED]. [i]Lower is better.[/i]
	render_video_mem_used = 14
	// The amount of texture memory used (in bytes). [i]Lower is better.[/i]
	render_texture_mem_used = 15
	// The amount of render buffer memory used (in bytes). [i]Lower is better.[/i]
	render_buffer_mem_used = 16
	// Number of active [RigidBody2D] nodes in the game. [i]Lower is better.[/i]
	physics_2d_active_objects = 17
	// Number of collision pairs in the 2D physics engine. [i]Lower is better.[/i]
	physics_2d_collision_pairs = 18
	// Number of islands in the 2D physics engine. [i]Lower is better.[/i]
	physics_2d_island_count = 19
	// Number of active [RigidBody3D] and [VehicleBody3D] nodes in the game. [i]Lower is better.[/i]
	physics_3d_active_objects = 20
	// Number of collision pairs in the 3D physics engine. [i]Lower is better.[/i]
	physics_3d_collision_pairs = 21
	// Number of islands in the 3D physics engine. [i]Lower is better.[/i]
	physics_3d_island_count = 22
	// Output latency of the [AudioServer]. Equivalent to calling [method AudioServer.get_output_latency], it is not recommended to call this every frame.
	audio_output_latency = 23
	// Number of active navigation maps in [NavigationServer2D] and [NavigationServer3D]. This also includes the two empty default navigation maps created by World2D and World3D.
	navigation_active_maps = 24
	// Number of active navigation regions in [NavigationServer2D] and [NavigationServer3D].
	navigation_region_count = 25
	// Number of active navigation agents processing avoidance in [NavigationServer2D] and [NavigationServer3D].
	navigation_agent_count = 26
	// Number of active navigation links in [NavigationServer2D] and [NavigationServer3D].
	navigation_link_count = 27
	// Number of navigation mesh polygons in [NavigationServer2D] and [NavigationServer3D].
	navigation_polygon_count = 28
	// Number of navigation mesh polygon edges in [NavigationServer2D] and [NavigationServer3D].
	navigation_edge_count = 29
	// Number of navigation mesh polygon edges that were merged due to edge key overlap in [NavigationServer2D] and [NavigationServer3D].
	navigation_edge_merge_count = 30
	// Number of polygon edges that are considered connected by edge proximity [NavigationServer2D] and [NavigationServer3D].
	navigation_edge_connection_count = 31
	// Number of navigation mesh polygon edges that could not be merged in [NavigationServer2D] and [NavigationServer3D]. The edges still may be connected by edge proximity or with links.
	navigation_edge_free_count = 32
	// Number of active navigation obstacles in the [NavigationServer2D] and [NavigationServer3D].
	navigation_obstacle_count = 33
	// Number of pipeline compilations that were triggered by the 2D canvas renderer.
	pipeline_compilations_canvas = 34
	// Number of pipeline compilations that were triggered by loading meshes. These compilations will show up as longer loading times the first time a user runs the game and the pipeline is required.
	pipeline_compilations_mesh = 35
	// Number of pipeline compilations that were triggered by building the surface cache before rendering the scene. These compilations will show up as a stutter when loading an scene the first time a user runs the game and the pipeline is required.
	pipeline_compilations_surface = 36
	// Number of pipeline compilations that were triggered while drawing the scene. These compilations will show up as stutters during gameplay the first time a user runs the game and the pipeline is required.
	pipeline_compilations_draw = 37
	// Number of pipeline compilations that were triggered to optimize the current scene. These compilations are done in the background and should not cause any stutters whatsoever.
	pipeline_compilations_specialization = 38
	// Number of active navigation maps in the [NavigationServer2D]. This also includes the two empty default navigation maps created by World2D.
	navigation_2d_active_maps = 39
	// Number of active navigation regions in the [NavigationServer2D].
	navigation_2d_region_count = 40
	// Number of active navigation agents processing avoidance in the [NavigationServer2D].
	navigation_2d_agent_count = 41
	// Number of active navigation links in the [NavigationServer2D].
	navigation_2d_link_count = 42
	// Number of navigation mesh polygons in the [NavigationServer2D].
	navigation_2d_polygon_count = 43
	// Number of navigation mesh polygon edges in the [NavigationServer2D].
	navigation_2d_edge_count = 44
	// Number of navigation mesh polygon edges that were merged due to edge key overlap in the [NavigationServer2D].
	navigation_2d_edge_merge_count = 45
	// Number of polygon edges that are considered connected by edge proximity [NavigationServer2D].
	navigation_2d_edge_connection_count = 46
	// Number of navigation mesh polygon edges that could not be merged in the [NavigationServer2D]. The edges still may be connected by edge proximity or with links.
	navigation_2d_edge_free_count = 47
	// Number of active navigation obstacles in the [NavigationServer2D].
	navigation_2d_obstacle_count = 48
	// Number of active navigation maps in the [NavigationServer3D]. This also includes the two empty default navigation maps created by World3D.
	navigation_3d_active_maps = 49
	// Number of active navigation regions in the [NavigationServer3D].
	navigation_3d_region_count = 50
	// Number of active navigation agents processing avoidance in the [NavigationServer3D].
	navigation_3d_agent_count = 51
	// Number of active navigation links in the [NavigationServer3D].
	navigation_3d_link_count = 52
	// Number of navigation mesh polygons in the [NavigationServer3D].
	navigation_3d_polygon_count = 53
	// Number of navigation mesh polygon edges in the [NavigationServer3D].
	navigation_3d_edge_count = 54
	// Number of navigation mesh polygon edges that were merged due to edge key overlap in the [NavigationServer3D].
	navigation_3d_edge_merge_count = 55
	// Number of polygon edges that are considered connected by edge proximity [NavigationServer3D].
	navigation_3d_edge_connection_count = 56
	// Number of navigation mesh polygon edges that could not be merged in the [NavigationServer3D]. The edges still may be connected by edge proximity or with links.
	navigation_3d_edge_free_count = 57
	// Number of active navigation obstacles in the [NavigationServer3D].
	navigation_3d_obstacle_count = 58
	// Represents the size of the [enum Monitor] enum.
	monitor_max = 59
}

enum PhysicalBone3DDampMode #

enum PhysicalBone3DDampMode as i64 {
	// In this mode, the body's damping value is added to any value set in areas or the default value.
	damp_mode_combine = 0
	// In this mode, the body's damping value replaces any value set in areas or the default value.
	damp_mode_replace = 1
}

enum PhysicalBone3DJointType #

enum PhysicalBone3DJointType as i64 {
	// No joint is applied to the PhysicsBone3D.
	joint_type_none = 0
	// A pin joint is applied to the PhysicsBone3D.
	joint_type_pin = 1
	// A cone joint is applied to the PhysicsBone3D.
	joint_type_cone = 2
	// A hinge joint is applied to the PhysicsBone3D.
	joint_type_hinge = 3
	// A slider joint is applied to the PhysicsBone3D.
	joint_type_slider = 4
	// A 6 degrees of freedom joint is applied to the PhysicsBone3D.
	joint_type_6dof = 5
}

enum PhysicsServer2DAreaBodyStatus #

enum PhysicsServer2DAreaBodyStatus as i64 {
	// The value of the first parameter and area callback function receives, when an object enters one of its shapes.
	area_body_added = 0
	// The value of the first parameter and area callback function receives, when an object exits one of its shapes.
	area_body_removed = 1
}

enum PhysicsServer2DAreaParameter #

enum PhysicsServer2DAreaParameter as i64 {
	// Constant to set/get gravity override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. The default value of this parameter is [constant AREA_SPACE_OVERRIDE_DISABLED].
	area_param_gravity_override_mode = 0
	// Constant to set/get gravity strength in an area. The default value of this parameter is `9.80665`.
	area_param_gravity = 1
	// Constant to set/get gravity vector/center in an area. The default value of this parameter is `Vector2(0, -1)`.
	area_param_gravity_vector = 2
	// Constant to set/get whether the gravity vector of an area is a direction, or a center point. The default value of this parameter is `false`.
	area_param_gravity_is_point = 3
	// Constant to set/get the distance at which the gravity strength is equal to the gravity controlled by [constant AREA_PARAM_GRAVITY]. For example, on a planet 100 pixels in radius with a surface gravity of 4.0 px/s², set the gravity to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 pixels from the center the gravity will be 1.0 px/s² (twice the distance, 1/4th the gravity), at 50 pixels it will be 16.0 px/s² (half the distance, 4x the gravity), and so on.
	// The above is true only when the unit distance is a positive number. When the unit distance is set to 0.0, the gravity will be constant regardless of distance. The default value of this parameter is `0.0`.
	area_param_gravity_point_unit_distance = 4
	// Constant to set/get linear damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. The default value of this parameter is [constant AREA_SPACE_OVERRIDE_DISABLED].
	area_param_linear_damp_override_mode = 5
	// Constant to set/get the linear damping factor of an area. The default value of this parameter is `0.1`.
	area_param_linear_damp = 6
	// Constant to set/get angular damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. The default value of this parameter is [constant AREA_SPACE_OVERRIDE_DISABLED].
	area_param_angular_damp_override_mode = 7
	// Constant to set/get the angular damping factor of an area. The default value of this parameter is `1.0`.
	area_param_angular_damp = 8
	// Constant to set/get the priority (order of processing) of an area. The default value of this parameter is `0`.
	area_param_priority = 9
}

enum PhysicsServer2DAreaSpaceOverrideMode #

enum PhysicsServer2DAreaSpaceOverrideMode as i64 {
	// This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
	area_space_override_disabled = 0
	// This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
	area_space_override_combine = 1
	// This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
	area_space_override_combine_replace = 2
	// This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
	area_space_override_replace = 3
	// This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
	area_space_override_replace_combine = 4
}

enum PhysicsServer2DBodyDampMode #

enum PhysicsServer2DBodyDampMode as i64 {
	// The body's damping value is added to any value set in areas or the default value.
	body_damp_mode_combine = 0
	// The body's damping value replaces any value set in areas or the default value.
	body_damp_mode_replace = 1
}

enum PhysicsServer2DBodyMode #

enum PhysicsServer2DBodyMode as i64 {
	// Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved.
	body_mode_static = 0
	// Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
	body_mode_kinematic = 1
	// Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied.
	body_mode_rigid = 2
	// Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces.
	body_mode_rigid_linear = 3
}

enum PhysicsServer2DBodyParameter #

enum PhysicsServer2DBodyParameter as i64 {
	// Constant to set/get a body's bounce factor. The default value of this parameter is `0.0`.
	body_param_bounce = 0
	// Constant to set/get a body's friction. The default value of this parameter is `1.0`.
	body_param_friction = 1
	// Constant to set/get a body's mass. The default value of this parameter is `1.0`. If the body's mode is set to [constant BODY_MODE_RIGID], then setting this parameter will have the following additional effects:
	// - If the parameter [constant BODY_PARAM_CENTER_OF_MASS] has never been set explicitly, then the value of that parameter will be recalculated based on the body's shapes.
	// - If the parameter [constant BODY_PARAM_INERTIA] is set to a value `<= 0.0`, then the value of that parameter will be recalculated based on the body's shapes, mass, and center of mass.
	body_param_mass = 2
	// Constant to set/get a body's inertia. The default value of this parameter is `0.0`. If the body's inertia is set to a value `<= 0.0`, then the inertia will be recalculated based on the body's shapes, mass, and center of mass.
	body_param_inertia = 3
	// Constant to set/get a body's center of mass position in the body's local coordinate system. The default value of this parameter is `Vector2(0,0)`. If this parameter is never set explicitly, then it is recalculated based on the body's shapes when setting the parameter [constant BODY_PARAM_MASS] or when calling [method body_set_space].
	body_param_center_of_mass = 4
	// Constant to set/get a body's gravity multiplier. The default value of this parameter is `1.0`.
	body_param_gravity_scale = 5
	// Constant to set/get a body's linear damping mode. See [enum BodyDampMode] for possible values. The default value of this parameter is [constant BODY_DAMP_MODE_COMBINE].
	body_param_linear_damp_mode = 6
	// Constant to set/get a body's angular damping mode. See [enum BodyDampMode] for possible values. The default value of this parameter is [constant BODY_DAMP_MODE_COMBINE].
	body_param_angular_damp_mode = 7
	// Constant to set/get a body's linear damping factor. The default value of this parameter is `0.0`.
	body_param_linear_damp = 8
	// Constant to set/get a body's angular damping factor. The default value of this parameter is `0.0`.
	body_param_angular_damp = 9
	// Represents the size of the [enum BodyParameter] enum.
	body_param_max = 10
}

enum PhysicsServer2DBodyState #

enum PhysicsServer2DBodyState as i64 {
	// Constant to set/get the current transform matrix of the body.
	body_state_transform = 0
	// Constant to set/get the current linear velocity of the body.
	body_state_linear_velocity = 1
	// Constant to set/get the current angular velocity of the body.
	body_state_angular_velocity = 2
	// Constant to sleep/wake up a body, or to get whether it is sleeping.
	body_state_sleeping = 3
	// Constant to set/get whether the body can sleep.
	body_state_can_sleep = 4
}

enum PhysicsServer2DCCDMode #

enum PhysicsServer2DCCDMode as i64 {
	// Disables continuous collision detection. This is the fastest way to detect body collisions, but it can miss small and/or fast-moving objects.
	ccd_mode_disabled = 0
	// Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise.
	ccd_mode_cast_ray = 1
	// Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise.
	ccd_mode_cast_shape = 2
}

enum PhysicsServer2DDampedSpringParam #

enum PhysicsServer2DDampedSpringParam as i64 {
	// Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. The default value of this parameter is the distance between the joint's anchor points.
	damped_spring_rest_length = 0
	// Sets the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. The default value of this parameter is `20.0`.
	damped_spring_stiffness = 1
	// Sets the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). The default value of this parameter is `1.5`.
	damped_spring_damping = 2
}

enum PhysicsServer2DJointParam #

enum PhysicsServer2DJointParam as i64 {
	// Constant to set/get how fast the joint pulls the bodies back to satisfy the joint constraint. The lower the value, the more the two bodies can pull on the joint. The default value of this parameter is `0.0`.
	// [b]Note:[/b] In Godot Physics, this parameter is only used for pin joints and groove joints.
	joint_param_bias = 0
	// Constant to set/get the maximum speed with which the joint can apply corrections. The default value of this parameter is `3.40282e+38`.
	// [b]Note:[/b] In Godot Physics, this parameter is only used for groove joints.
	joint_param_max_bias = 1
	// Constant to set/get the maximum force that the joint can use to act on the two bodies. The default value of this parameter is `3.40282e+38`.
	// [b]Note:[/b] In Godot Physics, this parameter is only used for groove joints.
	joint_param_max_force = 2
}

enum PhysicsServer2DJointType #

enum PhysicsServer2DJointType as i64 {
	// Constant to create pin joints.
	joint_type_pin = 0
	// Constant to create groove joints.
	joint_type_groove = 1
	// Constant to create damped spring joints.
	joint_type_damped_spring = 2
	// Represents the size of the [enum JointType] enum.
	joint_type_max = 3
}

enum PhysicsServer2DPinJointFlag #

enum PhysicsServer2DPinJointFlag as i64 {
	// If `true`, the pin has a maximum and a minimum rotation.
	pin_joint_flag_angular_limit_enabled = 0
	// If `true`, a motor turns the pin.
	pin_joint_flag_motor_enabled = 1
}

enum PhysicsServer2DPinJointParam #

enum PhysicsServer2DPinJointParam as i64 {
	// Constant to set/get a how much the bond of the pin joint can flex. The default value of this parameter is `0.0`.
	pin_joint_softness = 0
	// The maximum rotation around the pin.
	pin_joint_limit_upper = 1
	// The minimum rotation around the pin.
	pin_joint_limit_lower = 2
	// Target speed for the motor. In radians per second.
	pin_joint_motor_target_velocity = 3
}

enum PhysicsServer2DProcessInfo #

enum PhysicsServer2DProcessInfo as i64 {
	// Constant to get the number of objects that are not sleeping.
	info_active_objects = 0
	// Constant to get the number of possible collisions.
	info_collision_pairs = 1
	// Constant to get the number of space regions where a collision could occur.
	info_island_count = 2
}

enum PhysicsServer2DShapeType #

enum PhysicsServer2DShapeType as i64 {
	// This is the constant for creating world boundary shapes. A world boundary shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks.
	shape_world_boundary = 0
	// This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers.
	shape_separation_ray = 1
	// This is the constant for creating segment shapes. A segment shape is a [i]finite[/i] line from a point A to a point B. It can be checked for intersections.
	shape_segment = 2
	// This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks.
	shape_circle = 3
	// This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks.
	shape_rectangle = 4
	// This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks.
	shape_capsule = 5
	// This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks.
	shape_convex_polygon = 6
	// This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks.
	shape_concave_polygon = 7
	// This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
	shape_custom = 8
}

enum PhysicsServer2DSpaceParameter #

enum PhysicsServer2DSpaceParameter as i64 {
	// Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. The default value of this parameter is [member ProjectSettings.physics/2d/solver/contact_recycle_radius].
	space_param_contact_recycle_radius = 0
	// Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. The default value of this parameter is [member ProjectSettings.physics/2d/solver/contact_max_separation].
	space_param_contact_max_separation = 1
	// Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. The default value of this parameter is [member ProjectSettings.physics/2d/solver/contact_max_allowed_penetration].
	space_param_contact_max_allowed_penetration = 2
	// Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. The default value of this parameter is [member ProjectSettings.physics/2d/solver/default_contact_bias].
	space_param_contact_default_bias = 3
	// Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. The default value of this parameter is [member ProjectSettings.physics/2d/sleep_threshold_linear].
	space_param_body_linear_velocity_sleep_threshold = 4
	// Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. The default value of this parameter is [member ProjectSettings.physics/2d/sleep_threshold_angular].
	space_param_body_angular_velocity_sleep_threshold = 5
	// Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. The default value of this parameter is [member ProjectSettings.physics/2d/time_before_sleep].
	space_param_body_time_to_sleep = 6
	// Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. The default value of this parameter is [member ProjectSettings.physics/2d/solver/default_constraint_bias].
	space_param_constraint_default_bias = 7
	// Constant to set/get the number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. The default value of this parameter is [member ProjectSettings.physics/2d/solver/solver_iterations].
	space_param_solver_iterations = 8
}

enum PhysicsServer3DAreaBodyStatus #

enum PhysicsServer3DAreaBodyStatus as i64 {
	// The value of the first parameter and area callback function receives, when an object enters one of its shapes.
	area_body_added = 0
	// The value of the first parameter and area callback function receives, when an object exits one of its shapes.
	area_body_removed = 1
}

enum PhysicsServer3DAreaParameter #

enum PhysicsServer3DAreaParameter as i64 {
	// Constant to set/get gravity override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
	area_param_gravity_override_mode = 0
	// Constant to set/get gravity strength in an area.
	area_param_gravity = 1
	// Constant to set/get gravity vector/center in an area.
	area_param_gravity_vector = 2
	// Constant to set/get whether the gravity vector of an area is a direction, or a center point.
	area_param_gravity_is_point = 3
	// Constant to set/get the distance at which the gravity strength is equal to the gravity controlled by [constant AREA_PARAM_GRAVITY]. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set the gravity to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 meters from the center the gravity will be 1.0 m/s² (twice the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half the distance, 4x the gravity), and so on.
	// The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance.
	area_param_gravity_point_unit_distance = 4
	// Constant to set/get linear damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
	area_param_linear_damp_override_mode = 5
	// Constant to set/get the linear damping factor of an area.
	area_param_linear_damp = 6
	// Constant to set/get angular damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values.
	area_param_angular_damp_override_mode = 7
	// Constant to set/get the angular damping factor of an area.
	area_param_angular_damp = 8
	// Constant to set/get the priority (order of processing) of an area.
	area_param_priority = 9
	// Constant to set/get the magnitude of area-specific wind force. This wind force only applies to [SoftBody3D] nodes. Other physics bodies are currently not affected by wind.
	area_param_wind_force_magnitude = 10
	// Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows.
	area_param_wind_source = 11
	// Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows.
	area_param_wind_direction = 12
	// Constant to set/get the exponential rate at which wind force decreases with distance from its origin.
	area_param_wind_attenuation_factor = 13
}

enum PhysicsServer3DAreaSpaceOverrideMode #

enum PhysicsServer3DAreaSpaceOverrideMode as i64 {
	// This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
	area_space_override_disabled = 0
	// This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
	area_space_override_combine = 1
	// This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
	area_space_override_combine_replace = 2
	// This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
	area_space_override_replace = 3
	// This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
	area_space_override_replace_combine = 4
}

enum PhysicsServer3DBodyAxis #

enum PhysicsServer3DBodyAxis as i64 {
	body_axis_linear_x  = 1
	body_axis_linear_y  = 2
	body_axis_linear_z  = 4
	body_axis_angular_x = 8
	body_axis_angular_y = 16
	body_axis_angular_z = 32
}

enum PhysicsServer3DBodyDampMode #

enum PhysicsServer3DBodyDampMode as i64 {
	// The body's damping value is added to any value set in areas or the default value.
	body_damp_mode_combine = 0
	// The body's damping value replaces any value set in areas or the default value.
	body_damp_mode_replace = 1
}

enum PhysicsServer3DBodyMode #

enum PhysicsServer3DBodyMode as i64 {
	// Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved.
	body_mode_static = 0
	// Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
	body_mode_kinematic = 1
	// Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied.
	body_mode_rigid = 2
	// Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces.
	body_mode_rigid_linear = 3
}

enum PhysicsServer3DBodyParameter #

enum PhysicsServer3DBodyParameter as i64 {
	// Constant to set/get a body's bounce factor.
	body_param_bounce = 0
	// Constant to set/get a body's friction.
	body_param_friction = 1
	// Constant to set/get a body's mass.
	body_param_mass = 2
	// Constant to set/get a body's inertia.
	body_param_inertia = 3
	// Constant to set/get a body's center of mass position in the body's local coordinate system.
	body_param_center_of_mass = 4
	// Constant to set/get a body's gravity multiplier.
	body_param_gravity_scale = 5
	// Constant to set/get a body's linear damping mode. See [enum BodyDampMode] for possible values.
	body_param_linear_damp_mode = 6
	// Constant to set/get a body's angular damping mode. See [enum BodyDampMode] for possible values.
	body_param_angular_damp_mode = 7
	// Constant to set/get a body's linear damping factor.
	body_param_linear_damp = 8
	// Constant to set/get a body's angular damping factor.
	body_param_angular_damp = 9
	// Represents the size of the [enum BodyParameter] enum.
	body_param_max = 10
}

enum PhysicsServer3DBodyState #

enum PhysicsServer3DBodyState as i64 {
	// Constant to set/get the current transform matrix of the body.
	body_state_transform = 0
	// Constant to set/get the current linear velocity of the body.
	body_state_linear_velocity = 1
	// Constant to set/get the current angular velocity of the body.
	body_state_angular_velocity = 2
	// Constant to sleep/wake up a body, or to get whether it is sleeping.
	body_state_sleeping = 3
	// Constant to set/get whether the body can sleep.
	body_state_can_sleep = 4
}

enum PhysicsServer3DConeTwistJointParam #

enum PhysicsServer3DConeTwistJointParam as i64 {
	// Swing is rotation from side to side, around the axis perpendicular to the twist axis.
	// The swing span defines, how much rotation will not get corrected along the swing axis.
	// Could be defined as looseness in the [ConeTwistJoint3D].
	// If below 0.05, this behavior is locked.
	cone_twist_joint_swing_span = 0
	// Twist is the rotation around the twist axis, this value defined how far the joint can twist.
	// Twist is locked if below 0.05.
	cone_twist_joint_twist_span = 1
	// The speed with which the swing or twist will take place.
	// The higher, the faster.
	cone_twist_joint_bias = 2
	// The ease with which the Joint3D twists, if it's too low, it takes more force to twist the joint.
	cone_twist_joint_softness = 3
	// Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
	cone_twist_joint_relaxation = 4
}

enum PhysicsServer3DG6DOFJointAxisFlag #

enum PhysicsServer3DG6DOFJointAxisFlag as i64 {
	// If set, linear motion is possible within the given limits.
	g6dof_joint_flag_enable_linear_limit = 0
	// If set, rotational motion is possible.
	g6dof_joint_flag_enable_angular_limit  = 1
	g6dof_joint_flag_enable_angular_spring = 2
	g6dof_joint_flag_enable_linear_spring  = 3
	// If set, there is a rotational motor across these axes.
	g6dof_joint_flag_enable_motor = 4
	// If set, there is a linear motor on this axis that targets a specific velocity.
	g6dof_joint_flag_enable_linear_motor = 5
	// Represents the size of the [enum G6DOFJointAxisFlag] enum.
	g6dof_joint_flag_max = 6
}

enum PhysicsServer3DG6DOFJointAxisParam #

enum PhysicsServer3DG6DOFJointAxisParam as i64 {
	// The minimum difference between the pivot points' axes.
	g6dof_joint_linear_lower_limit = 0
	// The maximum difference between the pivot points' axes.
	g6dof_joint_linear_upper_limit = 1
	// A factor that gets applied to the movement across the axes. The lower, the slower the movement.
	g6dof_joint_linear_limit_softness = 2
	// The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost.
	g6dof_joint_linear_restitution = 3
	// The amount of damping that happens at the linear motion across the axes.
	g6dof_joint_linear_damping = 4
	// The velocity that the joint's linear motor will attempt to reach.
	g6dof_joint_linear_motor_target_velocity = 5
	// The maximum force that the linear motor can apply while trying to reach the target velocity.
	g6dof_joint_linear_motor_force_limit        = 6
	g6dof_joint_linear_spring_stiffness         = 7
	g6dof_joint_linear_spring_damping           = 8
	g6dof_joint_linear_spring_equilibrium_point = 9
	// The minimum rotation in negative direction to break loose and rotate around the axes.
	g6dof_joint_angular_lower_limit = 10
	// The minimum rotation in positive direction to break loose and rotate around the axes.
	g6dof_joint_angular_upper_limit = 11
	// A factor that gets multiplied onto all rotations across the axes.
	g6dof_joint_angular_limit_softness = 12
	// The amount of rotational damping across the axes. The lower, the more damping occurs.
	g6dof_joint_angular_damping = 13
	// The amount of rotational restitution across the axes. The lower, the more restitution occurs.
	g6dof_joint_angular_restitution = 14
	// The maximum amount of force that can occur, when rotating around the axes.
	g6dof_joint_angular_force_limit = 15
	// When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
	g6dof_joint_angular_erp = 16
	// Target speed for the motor at the axes.
	g6dof_joint_angular_motor_target_velocity = 17
	// Maximum acceleration for the motor at the axes.
	g6dof_joint_angular_motor_force_limit        = 18
	g6dof_joint_angular_spring_stiffness         = 19
	g6dof_joint_angular_spring_damping           = 20
	g6dof_joint_angular_spring_equilibrium_point = 21
	// Represents the size of the [enum G6DOFJointAxisParam] enum.
	g6dof_joint_max = 22
}

enum PhysicsServer3DHingeJointFlag #

enum PhysicsServer3DHingeJointFlag as i64 {
	// If `true`, the Hinge has a maximum and a minimum rotation.
	hinge_joint_flag_use_limit = 0
	// If `true`, a motor turns the Hinge.
	hinge_joint_flag_enable_motor = 1
}

enum PhysicsServer3DHingeJointParam #

enum PhysicsServer3DHingeJointParam as i64 {
	// The speed with which the two bodies get pulled together when they move in different directions.
	hinge_joint_bias = 0
	// The maximum rotation across the Hinge.
	hinge_joint_limit_upper = 1
	// The minimum rotation across the Hinge.
	hinge_joint_limit_lower = 2
	// The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
	hinge_joint_limit_bias     = 3
	hinge_joint_limit_softness = 4
	// The lower this value, the more the rotation gets slowed down.
	hinge_joint_limit_relaxation = 5
	// Target speed for the motor.
	hinge_joint_motor_target_velocity = 6
	// Maximum acceleration for the motor.
	hinge_joint_motor_max_impulse = 7
}

enum PhysicsServer3DJointType #

enum PhysicsServer3DJointType as i64 {
	// The [Joint3D] is a [PinJoint3D].
	joint_type_pin = 0
	// The [Joint3D] is a [HingeJoint3D].
	joint_type_hinge = 1
	// The [Joint3D] is a [SliderJoint3D].
	joint_type_slider = 2
	// The [Joint3D] is a [ConeTwistJoint3D].
	joint_type_cone_twist = 3
	// The [Joint3D] is a [Generic6DOFJoint3D].
	joint_type_6dof = 4
	// Represents the size of the [enum JointType] enum.
	joint_type_max = 5
}

enum PhysicsServer3DPinJointParam #

enum PhysicsServer3DPinJointParam as i64 {
	// The strength with which the pinned objects try to stay in positional relation to each other.
	// The higher, the stronger.
	pin_joint_bias = 0
	// The strength with which the pinned objects try to stay in velocity relation to each other.
	// The higher, the stronger.
	pin_joint_damping = 1
	// If above 0, this value is the maximum value for an impulse that this Joint3D puts on its ends.
	pin_joint_impulse_clamp = 2
}

enum PhysicsServer3DProcessInfo #

enum PhysicsServer3DProcessInfo as i64 {
	// Constant to get the number of objects that are not sleeping.
	info_active_objects = 0
	// Constant to get the number of possible collisions.
	info_collision_pairs = 1
	// Constant to get the number of space regions where a collision could occur.
	info_island_count = 2
}

enum PhysicsServer3DShapeType #

enum PhysicsServer3DShapeType as i64 {
	// The [Shape3D] is a [WorldBoundaryShape3D].
	shape_world_boundary = 0
	// The [Shape3D] is a [SeparationRayShape3D].
	shape_separation_ray = 1
	// The [Shape3D] is a [SphereShape3D].
	shape_sphere = 2
	// The [Shape3D] is a [BoxShape3D].
	shape_box = 3
	// The [Shape3D] is a [CapsuleShape3D].
	shape_capsule = 4
	// The [Shape3D] is a [CylinderShape3D].
	shape_cylinder = 5
	// The [Shape3D] is a [ConvexPolygonShape3D].
	shape_convex_polygon = 6
	// The [Shape3D] is a [ConcavePolygonShape3D].
	shape_concave_polygon = 7
	// The [Shape3D] is a [HeightMapShape3D].
	shape_heightmap = 8
	// The [Shape3D] is used internally for a soft body. Any attempt to create this kind of shape results in an error.
	shape_soft_body = 9
	// This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
	shape_custom = 10
}

enum PhysicsServer3DSliderJointParam #

enum PhysicsServer3DSliderJointParam as i64 {
	// The maximum difference between the pivot points on their X axis before damping happens.
	slider_joint_linear_limit_upper = 0
	// The minimum difference between the pivot points on their X axis before damping happens.
	slider_joint_linear_limit_lower = 1
	// A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement.
	slider_joint_linear_limit_softness = 2
	// The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost.
	slider_joint_linear_limit_restitution = 3
	// The amount of damping once the slider limits are surpassed.
	slider_joint_linear_limit_damping = 4
	// A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement.
	slider_joint_linear_motion_softness = 5
	// The amount of restitution inside the slider limits.
	slider_joint_linear_motion_restitution = 6
	// The amount of damping inside the slider limits.
	slider_joint_linear_motion_damping = 7
	// A factor applied to the movement across axes orthogonal to the slider.
	slider_joint_linear_orthogonal_softness = 8
	// The amount of restitution when movement is across axes orthogonal to the slider.
	slider_joint_linear_orthogonal_restitution = 9
	// The amount of damping when movement is across axes orthogonal to the slider.
	slider_joint_linear_orthogonal_damping = 10
	// The upper limit of rotation in the slider.
	slider_joint_angular_limit_upper = 11
	// The lower limit of rotation in the slider.
	slider_joint_angular_limit_lower = 12
	// A factor applied to the all rotation once the limit is surpassed.
	slider_joint_angular_limit_softness = 13
	// The amount of restitution of the rotation when the limit is surpassed.
	slider_joint_angular_limit_restitution = 14
	// The amount of damping of the rotation when the limit is surpassed.
	slider_joint_angular_limit_damping = 15
	// A factor that gets applied to the all rotation in the limits.
	slider_joint_angular_motion_softness = 16
	// The amount of restitution of the rotation in the limits.
	slider_joint_angular_motion_restitution = 17
	// The amount of damping of the rotation in the limits.
	slider_joint_angular_motion_damping = 18
	// A factor that gets applied to the all rotation across axes orthogonal to the slider.
	slider_joint_angular_orthogonal_softness = 19
	// The amount of restitution of the rotation across axes orthogonal to the slider.
	slider_joint_angular_orthogonal_restitution = 20
	// The amount of damping of the rotation across axes orthogonal to the slider.
	slider_joint_angular_orthogonal_damping = 21
	// Represents the size of the [enum SliderJointParam] enum.
	slider_joint_max = 22
}

enum PhysicsServer3DSpaceParameter #

enum PhysicsServer3DSpaceParameter as i64 {
	// Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated.
	space_param_contact_recycle_radius = 0
	// Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded.
	space_param_contact_max_separation = 1
	// Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision.
	space_param_contact_max_allowed_penetration = 2
	// Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision.
	space_param_contact_default_bias = 3
	// Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
	space_param_body_linear_velocity_sleep_threshold = 4
	// Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given.
	space_param_body_angular_velocity_sleep_threshold = 5
	// Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time.
	space_param_body_time_to_sleep = 6
	// Constant to set/get the number of solver iterations for contacts and constraints. The greater the number of iterations, the more accurate the collisions and constraints will be. However, a greater number of iterations requires more CPU power, which can decrease performance.
	space_param_solver_iterations = 7
}

enum PinJoint3DParam #

enum PinJoint3DParam as i64 {
	// The force with which the pinned objects stay in positional relation to each other. The higher, the stronger.
	param_bias = 0
	// The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger.
	param_damping = 1
	// If above 0, this value is the maximum value for an impulse that this Joint3D produces.
	param_impulse_clamp = 2
}

enum PlaneMeshOrientation #

enum PlaneMeshOrientation as i64 {
	// [PlaneMesh] will face the positive X-axis.
	face_x = 0
	// [PlaneMesh] will face the positive Y-axis. This matches the behavior of the [PlaneMesh] in Godot 3.x.
	face_y = 1
	// [PlaneMesh] will face the positive Z-axis. This matches the behavior of the QuadMesh in Godot 3.x.
	face_z = 2
}

enum PortableCompressedTexture2DCompressionMode #

enum PortableCompressedTexture2DCompressionMode as i64 {
	compression_mode_lossless        = 0
	compression_mode_lossy           = 1
	compression_mode_basis_universal = 2
	compression_mode_s3tc            = 3
	compression_mode_etc2            = 4
	compression_mode_bptc            = 5
	compression_mode_astc            = 6
}

enum ProgressBarFillMode #

enum ProgressBarFillMode as i64 {
	// The progress bar fills from begin to end horizontally, according to the language direction. If [method Control.is_layout_rtl] returns `false`, it fills from left to right, and if it returns `true`, it fills from right to left.
	fill_begin_to_end = 0
	// The progress bar fills from end to begin horizontally, according to the language direction. If [method Control.is_layout_rtl] returns `false`, it fills from right to left, and if it returns `true`, it fills from left to right.
	fill_end_to_begin = 1
	// The progress fills from top to bottom.
	fill_top_to_bottom = 2
	// The progress fills from bottom to top.
	fill_bottom_to_top = 3
}

enum ProjectionPlanes #

enum ProjectionPlanes as i64 {
	// The index value of the projection's near clipping plane.
	plane_near = 0
	// The index value of the projection's far clipping plane.
	plane_far = 1
	// The index value of the projection's left clipping plane.
	plane_left = 2
	// The index value of the projection's top clipping plane.
	plane_top = 3
	// The index value of the projection's right clipping plane.
	plane_right = 4
	// The index value of the projection bottom clipping plane.
	plane_bottom = 5
}

enum PropertyHint #

enum PropertyHint as i64 {
	// The property has no hint for the editor.
	property_hint_none = 0
	// Hints that an [int] or [float] property should be within a range specified via the hint string `"min,max"` or `"min,max,step"`. The hint string can optionally include `"or_greater"` and/or `"or_less"` to allow manual input going respectively above the max or below the min values.
	// [b]Example:[/b] `"-360,360,1,or_greater,or_less"`.
	// Additionally, other keywords can be included: `"exp"` for exponential range editing, `"radians_as_degrees"` for editing radian angles in degrees (the range values are also in degrees), `"degrees"` to hint at an angle and `"hide_slider"` to hide the slider.
	property_hint_range = 1
	// Hints that an [int] or [String] property is an enumerated value to pick in a list specified via a hint string.
	// The hint string is a comma separated list of names such as `"Hello,Something,Else"`. Whitespaces are [b]not[/b] removed from either end of a name. For integer properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending `:integer` to the name, e.g. `"Zero,One,Three:3,Four,Six:6"`.
	property_hint_enum = 2
	// Hints that a [String] property can be an enumerated value to pick in a list specified via a hint string such as `"Hello,Something,Else"`.
	// Unlike [constant PROPERTY_HINT_ENUM], a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
	property_hint_enum_suggestion = 3
	// Hints that a [float] property should be edited via an exponential easing function. The hint string can include `"attenuation"` to flip the curve horizontally and/or `"positive_only"` to exclude in/out easing and limit values to be greater than or equal to zero.
	property_hint_exp_easing = 4
	// Hints that a vector property should allow its components to be linked. For example, this allows [member Vector2.x] and [member Vector2.y] to be edited together.
	property_hint_link = 5
	// Hints that an [int] property is a bitmask with named bit flags.
	// The hint string is a comma separated list of names such as `"Bit0,Bit1,Bit2,Bit3"`. Whitespaces are [b]not[/b] removed from either end of a name. The first name in the list has value 1, the next 2, then 4, 8, 16 and so on. Explicit values can also be specified by appending `:integer` to the name, e.g. `"A:4,B:8,C:16"`. You can also combine several flags (`"A:4,B:8,AB:12,C:16"`).
	// [b]Note:[/b] A flag value must be at least `1` and at most `2 ** 32 - 1`.
	// [b]Note:[/b] Unlike [constant PROPERTY_HINT_ENUM], the previous explicit value is not taken into account. For the hint `"A:16,B,C"`, A is 16, B is 2, C is 4.
	property_hint_flags = 6
	// Hints that an [int] property is a bitmask using the optionally named 2D render layers.
	property_hint_layers_2d_render = 7
	// Hints that an [int] property is a bitmask using the optionally named 2D physics layers.
	property_hint_layers_2d_physics = 8
	// Hints that an [int] property is a bitmask using the optionally named 2D navigation layers.
	property_hint_layers_2d_navigation = 9
	// Hints that an [int] property is a bitmask using the optionally named 3D render layers.
	property_hint_layers_3d_render = 10
	// Hints that an [int] property is a bitmask using the optionally named 3D physics layers.
	property_hint_layers_3d_physics = 11
	// Hints that an [int] property is a bitmask using the optionally named 3D navigation layers.
	property_hint_layers_3d_navigation = 12
	// Hints that an integer property is a bitmask using the optionally named avoidance layers.
	property_hint_layers_avoidance = 37
	// Hints that a [String] property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like `"*.png,*.jpg"`. By default the file will be stored as UID whenever available. You can use [ResourceUID] methods to convert it back to path. For storing a raw path, use [constant PROPERTY_HINT_FILE_PATH].
	property_hint_file = 13
	// Hints that a [String] property is a path to a directory. Editing it will show a file dialog for picking the path.
	property_hint_dir = 14
	// Hints that a [String] property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards, like `"*.png,*.jpg"`.
	property_hint_global_file = 15
	// Hints that a [String] property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
	property_hint_global_dir = 16
	// Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. `"Texture2D"`). Editing it will show a popup menu of valid resource types to instantiate.
	property_hint_resource_type = 17
	// Hints that a [String] property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
	property_hint_multiline_text = 18
	// Hints that a [String] property is an [Expression].
	property_hint_expression = 19
	// Hints that a [String] property should show a placeholder text on its input field, if empty. The hint string is the placeholder text to use.
	property_hint_placeholder_text = 20
	// Hints that a [Color] property should be edited without affecting its transparency ([member Color.a] is not editable).
	property_hint_color_no_alpha = 21
	// Hints that the property's value is an object encoded as object ID, with its type specified in the hint string. Used by the debugger.
	property_hint_object_id = 22
	// If a property is [String], hints that the property represents a particular type (class). This allows to select a type from the create dialog. The property will store the selected type as a string.
	// If a property is [Array], hints the editor how to show elements. The `hint_string` must encode nested types using `":"` and `"/"`.
	// If a property is [Dictionary], hints the editor how to show elements. The `hint_string` is the same as [Array], with a `";"` separating the key and value.
	// [codeblocks]
	// [gdscript]
	// # Array of elem_type.
	// hint_string = "%d:" % [elem_type]
	// hint_string = "%d/%d:%s" % [elem_type, elem_hint, elem_hint_string]
	// # Two-dimensional array of elem_type (array of arrays of elem_type).
	// hint_string = "%d:%d:" % [TYPE_ARRAY, elem_type]
	// hint_string = "%d:%d/%d:%s" % [TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
	// # Three-dimensional array of elem_type (array of arrays of arrays of elem_type).
	// hint_string = "%d:%d:%d:" % [TYPE_ARRAY, TYPE_ARRAY, elem_type]
	// hint_string = "%d:%d:%d/%d:%s" % [TYPE_ARRAY, TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
	// [/gdscript]
	// [csharp]
	// // Array of elemType.
	// hintString = $"{elemType:D}:";
	// hintString = $"{elemType:}/{elemHint:D}:{elemHintString}";
	// // Two-dimensional array of elemType (array of arrays of elemType).
	// hintString = $"{Variant.Type.Array:D}:{elemType:D}:";
	// hintString = $"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
	// // Three-dimensional array of elemType (array of arrays of arrays of elemType).
	// hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}:";
	// hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
	// [/csharp]
	// [/codeblocks]
	// [b]Examples:[/b]
	// [codeblocks]
	// [gdscript]
	// hint_string = "%d:" % [TYPE_INT] # Array of integers.
	// hint_string = "%d/%d:1,10,1" % [TYPE_INT, PROPERTY_HINT_RANGE] # Array of integers (in range from 1 to 10).
	// hint_string = "%d/%d:Zero,One,Two" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
	// hint_string = "%d/%d:Zero,One,Three:3,Six:6" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
	// hint_string = "%d/%d:*.png" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of strings (file paths).
	// hint_string = "%d/%d:Texture2D" % [TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Array of textures.
	//
	// hint_string = "%d:%d:" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array of floats.
	// hint_string = "%d:%d/%d:" % [TYPE_ARRAY, TYPE_STRING, PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings.
	// hint_string = "%d:%d/%d:-1,1,0.1" % [TYPE_ARRAY, TYPE_FLOAT, PROPERTY_HINT_RANGE] # Two-dimensional array of floats (in range from -1 to 1).
	// hint_string = "%d:%d/%d:Texture2D" % [TYPE_ARRAY, TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Two-dimensional array of textures.
	// [/gdscript]
	// [csharp]
	// hintString = $"{Variant.Type.Int:D}/{PropertyHint.Range:D}:1,10,1"; // Array of integers (in range from 1 to 10).
	// hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Two"; // Array of integers (an enum).
	// hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6"; // Array of integers (an enum).
	// hintString = $"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png"; // Array of strings (file paths).
	// hintString = $"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Array of textures.
	//
	// hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}:"; // Two-dimensional array of floats.
	// hintString = $"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:"; // Two-dimensional array of multiline strings.
	// hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}/{PropertyHint.Range:D}:-1,1,0.1"; // Two-dimensional array of floats (in range from -1 to 1).
	// hintString = $"{Variant.Type.Array:D}:{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Two-dimensional array of textures.
	// [/csharp]
	// [/codeblocks]
	// [b]Note:[/b] The trailing colon is required for properly detecting built-in types.
	property_hint_type_string              = 23
	property_hint_node_path_to_edited_node = 24
	// Hints that an object is too big to be sent via the debugger.
	property_hint_object_too_big = 25
	// Hints that the hint string specifies valid node types for property of type [NodePath].
	property_hint_node_path_valid_types = 26
	// Hints that a [String] property is a path to a file. Editing it will show a file dialog for picking the path for the file to be saved at. The dialog has access to the project's directory. The hint string can be a set of filters with wildcards like `"*.png,*.jpg"`. See also [member FileDialog.filters].
	property_hint_save_file = 27
	// Hints that a [String] property is a path to a file. Editing it will show a file dialog for picking the path for the file to be saved at. The dialog has access to the entire filesystem. The hint string can be a set of filters with wildcards like `"*.png,*.jpg"`. See also [member FileDialog.filters].
	property_hint_global_save_file = 28
	property_hint_int_is_objectid  = 29
	// Hints that an [int] property is a pointer. Used by GDExtension.
	property_hint_int_is_pointer = 30
	// Hints that a property is an [Array] with the stored type specified in the hint string. The hint string contains the type of the array (e.g. `"String"`).
	// Use the hint string format from [constant PROPERTY_HINT_TYPE_STRING] for more control over the stored type.
	property_hint_array_type = 31
	// Hints that a property is a [Dictionary] with the stored types specified in the hint string. The hint string contains the key and value types separated by a semicolon (e.g. `"int;String"`).
	// Use the hint string format from [constant PROPERTY_HINT_TYPE_STRING] for more control over the stored types.
	property_hint_dictionary_type = 38
	// Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
	property_hint_locale_id = 32
	// Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings.
	property_hint_localizable_string = 33
	// Hints that a property is an instance of a [Node]-derived type, optionally specified via the hint string (e.g. `"Node2D"`). Editing it will show a dialog for picking a node from the scene.
	property_hint_node_type = 34
	// Hints that a quaternion property should disable the temporary euler editor.
	property_hint_hide_quaternion_edit = 35
	// Hints that a string property is a password, and every character is replaced with the secret character.
	property_hint_password = 36
	// Hints that a [Callable] property should be displayed as a clickable button. When the button is pressed, the callable is called. The hint string specifies the button text and optionally an icon from the `"EditorIcons"` theme type.
	// [codeblock lang=text]
	// "Click me!" - A button with the text "Click me!" and the default "Callable" icon.
	// "Click me!,ColorRect" - A button with the text "Click me!" and the "ColorRect" icon.
	// ```
	// [b]Note:[/b] A [Callable] cannot be properly serialized and stored in a file, so it is recommended to use [constant PROPERTY_USAGE_EDITOR] instead of [constant PROPERTY_USAGE_DEFAULT].
	property_hint_tool_button = 39
	// Hints that a property will be changed on its own after setting, such as [member AudioStreamPlayer.playing] or [member GPUParticles3D.emitting].
	property_hint_oneshot = 40
	// Hints that a boolean property will enable the feature associated with the group that it occurs in. Only works within a group or subgroup. Use the optional hint string `"feature"` when the group only has properties that are meaningful when the feature is enabled.
	// [b]Note:[/b] The `"feature"` hint string does not modify or reset any values.
	property_hint_group_enable = 42
	// Hints that a [String] or [StringName] property is the name of an input action. This allows the selection of any action name from the Input Map in the Project Settings. The hint string may contain two options separated by commas:
	// - If it contains `"show_builtin"`, built-in input actions are included in the selection.
	// - If it contains `"loose_mode"`, loose mode is enabled. This allows inserting any action name even if it's not present in the input map.
	property_hint_input_name = 43
	// Like [constant PROPERTY_HINT_FILE], but the property is stored as a raw path, not UID. That means the reference will be broken if you move the file. Consider using [constant PROPERTY_HINT_FILE] when possible.
	property_hint_file_path = 44
	// Represents the size of the [enum PropertyHint] enum.
	property_hint_max = 45
}

enum PropertyUsageFlags #

enum PropertyUsageFlags as i64 {
	// The property is not stored, and does not display in the editor. This is the default for non-exported properties.
	property_usage_none = 0
	// The property is serialized and saved in the scene file (default for exported properties).
	property_usage_storage = 2
	// The property is shown in the [EditorInspector] (default for exported properties).
	property_usage_editor = 4
	// The property is excluded from the class reference.
	property_usage_internal = 8
	// The property can be checked in the [EditorInspector].
	property_usage_checkable = 16
	// The property is checked in the [EditorInspector].
	property_usage_checked = 32
	// Used to group properties together in the editor. See [EditorInspector].
	property_usage_group = 64
	// Used to categorize properties together in the editor.
	property_usage_category = 128
	// Used to group properties together in the editor in a subgroup (under a group). See [EditorInspector].
	property_usage_subgroup = 256
	// The property is a bitfield, i.e. it contains multiple flags represented as bits.
	property_usage_class_is_bitfield = 512
	// The property does not save its state in [PackedScene].
	property_usage_no_instance_state = 1024
	// Editing the property prompts the user for restarting the editor.
	property_usage_restart_if_changed = 2048
	// The property is a script variable. [constant PROPERTY_USAGE_SCRIPT_VARIABLE] can be used to distinguish between exported script variables from built-in variables (which don't have this usage flag). By default, [constant PROPERTY_USAGE_SCRIPT_VARIABLE] is [b]not[/b] applied to variables that are created by overriding [method Object._get_property_list] in a script.
	property_usage_script_variable = 4096
	// The property value of type [Object] will be stored even if its value is `null`.
	property_usage_store_if_null = 8192
	// If this property is modified, all inspector fields will be refreshed.
	property_usage_update_all_if_modified = 16384
	property_usage_script_default_value   = 32768
	// The property is a variable of enum type, i.e. it only takes named integer constants from its associated enumeration.
	property_usage_class_is_enum = 65536
	// If property has `nil` as default value, its type will be [Variant].
	property_usage_nil_is_variant = 131072
	// The property is an array.
	property_usage_array = 262144
	// When duplicating a resource with [method Resource.duplicate], and this flag is set on a property of that resource, the property should always be duplicated, regardless of the `subresources` bool parameter.
	property_usage_always_duplicate = 524288
	// When duplicating a resource with [method Resource.duplicate], and this flag is set on a property of that resource, the property should never be duplicated, regardless of the `subresources` bool parameter.
	property_usage_never_duplicate = 1048576
	// The property is only shown in the editor if modern renderers are supported (the Compatibility rendering method is excluded).
	property_usage_high_end_gfx = 2097152
	// The [NodePath] property will always be relative to the scene's root. Mostly useful for local resources.
	property_usage_node_path_from_scene_root = 4194304
	// Use when a resource is created on the fly, i.e. the getter will always return a different instance. [ResourceSaver] needs this information to properly save such resources.
	property_usage_resource_not_persistent = 8388608
	// Inserting an animation key frame of this property will automatically increment the value, allowing to easily keyframe multiple values in a row.
	property_usage_keying_increments     = 16777216
	property_usage_deferred_set_resource = 33554432
	// When this property is a [Resource] and base object is a [Node], a resource instance will be automatically created whenever the node is created in the editor.
	property_usage_editor_instantiate_object = 67108864
	// The property is considered a basic setting and will appear even when advanced mode is disabled. Used for project settings.
	property_usage_editor_basic_setting = 134217728
	// The property is read-only in the [EditorInspector].
	property_usage_read_only = 268435456
	// An export preset property with this flag contains confidential information and is stored separately from the rest of the export preset configuration.
	property_usage_secret = 536870912
	// Default usage (storage and editor).
	property_usage_default = 6
}

enum ReflectionProbeAmbientMode #

enum ReflectionProbeAmbientMode as i64 {
	// Do not apply any ambient lighting inside the [ReflectionProbe]'s box defined by its [member size].
	ambient_disabled = 0
	// Apply automatically-sourced environment lighting inside the [ReflectionProbe]'s box defined by its [member size].
	ambient_environment = 1
	// Apply custom ambient lighting inside the [ReflectionProbe]'s box defined by its [member size]. See [member ambient_color] and [member ambient_color_energy].
	ambient_color = 2
}

enum ReflectionProbeUpdateMode #

enum ReflectionProbeUpdateMode as i64 {
	// Update the probe once on the next frame (recommended for most objects). The corresponding radiance map will be generated over the following six frames. This takes more time to update than [constant UPDATE_ALWAYS], but it has a lower performance cost and can result in higher-quality reflections. The ReflectionProbe is updated when its transform changes, but not when nearby geometry changes. You can force a [ReflectionProbe] update by moving the [ReflectionProbe] slightly in any direction.
	update_once = 0
	// Update the probe every frame. This provides better results for fast-moving dynamic objects (such as cars). However, it has a significant performance cost. Due to the cost, it's recommended to only use one ReflectionProbe with [constant UPDATE_ALWAYS] at most per scene. For all other use cases, use [constant UPDATE_ONCE].
	update_always = 1
}

enum RenderingDeviceBarrierMask #

enum RenderingDeviceBarrierMask as i64 {
	// Vertex shader barrier mask.
	barrier_mask_vertex = 1
	// Fragment shader barrier mask.
	barrier_mask_fragment = 8
	// Compute barrier mask.
	barrier_mask_compute = 2
	// Transfer barrier mask.
	barrier_mask_transfer = 4
	// Raster barrier mask (vertex and fragment). Equivalent to `BARRIER_MASK_VERTEX | BARRIER_MASK_FRAGMENT`.
	barrier_mask_raster = 9
	// Barrier mask for all types (vertex, fragment, compute, transfer).
	barrier_mask_all_barriers = 32767
	// No barrier for any type.
	barrier_mask_no_barrier = 32768
}

enum RenderingDeviceBlendFactor #

enum RenderingDeviceBlendFactor as i64 {
	// Constant `0.0` blend factor.
	blend_factor_zero = 0
	// Constant `1.0` blend factor.
	blend_factor_one = 1
	// Color blend factor is `source color`. Alpha blend factor is `source alpha`.
	blend_factor_src_color = 2
	// Color blend factor is `1.0 - source color`. Alpha blend factor is `1.0 - source alpha`.
	blend_factor_one_minus_src_color = 3
	// Color blend factor is `destination color`. Alpha blend factor is `destination alpha`.
	blend_factor_dst_color = 4
	// Color blend factor is `1.0 - destination color`. Alpha blend factor is `1.0 - destination alpha`.
	blend_factor_one_minus_dst_color = 5
	// Color and alpha blend factor is `source alpha`.
	blend_factor_src_alpha = 6
	// Color and alpha blend factor is `1.0 - source alpha`.
	blend_factor_one_minus_src_alpha = 7
	// Color and alpha blend factor is `destination alpha`.
	blend_factor_dst_alpha = 8
	// Color and alpha blend factor is `1.0 - destination alpha`.
	blend_factor_one_minus_dst_alpha = 9
	// Color blend factor is `blend constant color`. Alpha blend factor is `blend constant alpha` (see [method draw_list_set_blend_constants]).
	blend_factor_constant_color = 10
	// Color blend factor is `1.0 - blend constant color`. Alpha blend factor is `1.0 - blend constant alpha` (see [method draw_list_set_blend_constants]).
	blend_factor_one_minus_constant_color = 11
	// Color and alpha blend factor is `blend constant alpha` (see [method draw_list_set_blend_constants]).
	blend_factor_constant_alpha = 12
	// Color and alpha blend factor is `1.0 - blend constant alpha` (see [method draw_list_set_blend_constants]).
	blend_factor_one_minus_constant_alpha = 13
	// Color blend factor is `min(source alpha, 1.0 - destination alpha)`. Alpha blend factor is `1.0`.
	blend_factor_src_alpha_saturate = 14
	// Color blend factor is `second source color`. Alpha blend factor is `second source alpha`. Only relevant for dual-source blending.
	blend_factor_src1_color = 15
	// Color blend factor is `1.0 - second source color`. Alpha blend factor is `1.0 - second source alpha`. Only relevant for dual-source blending.
	blend_factor_one_minus_src1_color = 16
	// Color and alpha blend factor is `second source alpha`. Only relevant for dual-source blending.
	blend_factor_src1_alpha = 17
	// Color and alpha blend factor is `1.0 - second source alpha`. Only relevant for dual-source blending.
	blend_factor_one_minus_src1_alpha = 18
	// Represents the size of the [enum BlendFactor] enum.
	blend_factor_max = 19
}

enum RenderingDeviceBlendOperation #

enum RenderingDeviceBlendOperation as i64 {
	// Additive blending operation (`source + destination`).
	blend_op_add = 0
	// Subtractive blending operation (`source - destination`).
	blend_op_subtract = 1
	// Reverse subtractive blending operation (`destination - source`).
	blend_op_reverse_subtract = 2
	// Minimum blending operation (keep the lowest value of the two).
	blend_op_minimum = 3
	// Maximum blending operation (keep the highest value of the two).
	blend_op_maximum = 4
	// Represents the size of the [enum BlendOperation] enum.
	blend_op_max = 5
}

enum RenderingDeviceBreadcrumbMarker #

enum RenderingDeviceBreadcrumbMarker as i64 {
	// No breadcrumb marker will be added.
	none = 0
	// During a GPU crash in dev or debug mode, Godot's error message will include `"REFLECTION_PROBES"` for added context as to when the crash occurred.
	reflection_probes = 65536
	// During a GPU crash in dev or debug mode, Godot's error message will include `"SKY_PASS"` for added context as to when the crash occurred.
	sky_pass = 131072
	// During a GPU crash in dev or debug mode, Godot's error message will include `"LIGHTMAPPER_PASS"` for added context as to when the crash occurred.
	lightmapper_pass = 196608
	// During a GPU crash in dev or debug mode, Godot's error message will include `"SHADOW_PASS_DIRECTIONAL"` for added context as to when the crash occurred.
	shadow_pass_directional = 262144
	// During a GPU crash in dev or debug mode, Godot's error message will include `"SHADOW_PASS_CUBE"` for added context as to when the crash occurred.
	shadow_pass_cube = 327680
	// During a GPU crash in dev or debug mode, Godot's error message will include `"OPAQUE_PASS"` for added context as to when the crash occurred.
	opaque_pass = 393216
	// During a GPU crash in dev or debug mode, Godot's error message will include `"ALPHA_PASS"` for added context as to when the crash occurred.
	alpha_pass = 458752
	// During a GPU crash in dev or debug mode, Godot's error message will include `"TRANSPARENT_PASS"` for added context as to when the crash occurred.
	transparent_pass = 524288
	// During a GPU crash in dev or debug mode, Godot's error message will include `"POST_PROCESSING_PASS"` for added context as to when the crash occurred.
	post_processing_pass = 589824
	// During a GPU crash in dev or debug mode, Godot's error message will include `"BLIT_PASS"` for added context as to when the crash occurred.
	blit_pass = 655360
	// During a GPU crash in dev or debug mode, Godot's error message will include `"UI_PASS"` for added context as to when the crash occurred.
	ui_pass = 720896
	// During a GPU crash in dev or debug mode, Godot's error message will include `"DEBUG_PASS"` for added context as to when the crash occurred.
	debug_pass = 786432
}

enum RenderingDeviceBufferCreationBits #

enum RenderingDeviceBufferCreationBits as i64 {
	// Optionally, set this flag if you wish to use [method buffer_get_device_address] functionality. You must first check the GPU supports it:
	// [codeblocks]
	// [gdscript]
	// rd = RenderingServer.get_rendering_device()
	//
	// if rd.has_feature(RenderingDevice.SUPPORTS_BUFFER_DEVICE_ADDRESS):
	// storage_buffer = rd.storage_buffer_create(bytes.size(), bytes, RenderingDevice.STORAGE_BUFFER_USAGE_SHADER_DEVICE_ADDRESS)
	// storage_buffer_address = rd.buffer_get_device_address(storage_buffer)
	// [/gdscript]
	// [/codeblocks]
	buffer_creation_device_address_bit = 1
	// Set this flag so that it is created as storage. This is useful if Compute Shaders need access (for reading or writing) to the buffer, e.g. skeletal animations are processed in Compute Shaders which need access to vertex buffers, to be later consumed by vertex shaders as part of the regular rasterization pipeline.
	buffer_creation_as_storage_bit = 2
}

enum RenderingDeviceCompareOperator #

enum RenderingDeviceCompareOperator as i64 {
	// "Never" comparison (opposite of [constant COMPARE_OP_ALWAYS]).
	compare_op_never = 0
	// "Less than" comparison.
	compare_op_less = 1
	// "Equal" comparison.
	compare_op_equal = 2
	// "Less than or equal" comparison.
	compare_op_less_or_equal = 3
	// "Greater than" comparison.
	compare_op_greater = 4
	// "Not equal" comparison.
	compare_op_not_equal = 5
	// "Greater than or equal" comparison.
	compare_op_greater_or_equal = 6
	// "Always" comparison (opposite of [constant COMPARE_OP_NEVER]).
	compare_op_always = 7
	// Represents the size of the [enum CompareOperator] enum.
	compare_op_max = 8
}

enum RenderingDeviceDataFormat #

enum RenderingDeviceDataFormat as i64 {
	// 4-bit-per-channel red/green channel data format, packed into 8 bits. Values are in the `[0.0, 1.0]` range.
	// [b]Note:[/b] More information on all data formats can be found on the [url=https://registry.khronos.org/vulkan/specs/1.1/html/vkspec.html#_identification_of_formats]Identification of formats[/url] section of the Vulkan specification, as well as the [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkFormat.html]VkFormat[/url] enum.
	data_format_r4g4_unorm_pack8 = 0
	// 4-bit-per-channel red/green/blue/alpha channel data format, packed into 16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_r4g4b4a4_unorm_pack16 = 1
	// 4-bit-per-channel blue/green/red/alpha channel data format, packed into 16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_b4g4r4a4_unorm_pack16 = 2
	// Red/green/blue channel data format with 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_r5g6b5_unorm_pack16 = 3
	// Blue/green/red channel data format with 5 bits of blue, 6 bits of green and 5 bits of red, packed into 16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_b5g6r5_unorm_pack16 = 4
	// Red/green/blue/alpha channel data format with 5 bits of red, 6 bits of green, 5 bits of blue and 1 bit of alpha, packed into 16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_r5g5b5a1_unorm_pack16 = 5
	// Blue/green/red/alpha channel data format with 5 bits of blue, 6 bits of green, 5 bits of red and 1 bit of alpha, packed into 16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_b5g5r5a1_unorm_pack16 = 6
	// Alpha/red/green/blue channel data format with 1 bit of alpha, 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_a1r5g5b5_unorm_pack16 = 7
	// 8-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_r8_unorm = 8
	// 8-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_r8_snorm = 9
	// 8-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range.
	data_format_r8_uscaled = 10
	// 8-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range.
	data_format_r8_sscaled = 11
	// 8-bit-per-channel unsigned integer red channel data format. Values are in the `[0, 255]` range.
	data_format_r8_uint = 12
	// 8-bit-per-channel signed integer red channel data format. Values are in the `[-127, 127]` range.
	data_format_r8_sint = 13
	// 8-bit-per-channel unsigned floating-point red channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range.
	data_format_r8_srgb = 14
	// 8-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_r8g8_unorm = 15
	// 8-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_r8g8_snorm = 16
	// 8-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range.
	data_format_r8g8_uscaled = 17
	// 8-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range.
	data_format_r8g8_sscaled = 18
	// 8-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0, 255]` range.
	data_format_r8g8_uint = 19
	// 8-bit-per-channel signed integer red/green channel data format. Values are in the `[-127, 127]` range.
	data_format_r8g8_sint = 20
	// 8-bit-per-channel unsigned floating-point red/green channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range.
	data_format_r8g8_srgb = 21
	// 8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_r8g8b8_unorm = 22
	// 8-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_r8g8b8_snorm = 23
	// 8-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range.
	data_format_r8g8b8_uscaled = 24
	// 8-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range.
	data_format_r8g8b8_sscaled = 25
	// 8-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0, 255]` range.
	data_format_r8g8b8_uint = 26
	// 8-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[-127, 127]` range.
	data_format_r8g8b8_sint = 27
	// 8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range.
	data_format_r8g8b8_srgb = 28
	// 8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_b8g8r8_unorm = 29
	// 8-bit-per-channel signed floating-point blue/green/red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_b8g8r8_snorm = 30
	// 8-bit-per-channel unsigned floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range.
	data_format_b8g8r8_uscaled = 31
	// 8-bit-per-channel signed floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range.
	data_format_b8g8r8_sscaled = 32
	// 8-bit-per-channel unsigned integer blue/green/red channel data format. Values are in the `[0, 255]` range.
	data_format_b8g8r8_uint = 33
	// 8-bit-per-channel signed integer blue/green/red channel data format. Values are in the `[-127, 127]` range.
	data_format_b8g8r8_sint = 34
	// 8-bit-per-channel unsigned floating-point blue/green/red data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range.
	data_format_b8g8r8_srgb = 35
	// 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_r8g8b8a8_unorm = 36
	// 8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_r8g8b8a8_snorm = 37
	// 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range.
	data_format_r8g8b8a8_uscaled = 38
	// 8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range.
	data_format_r8g8b8a8_sscaled = 39
	// 8-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0, 255]` range.
	data_format_r8g8b8a8_uint = 40
	// 8-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[-127, 127]` range.
	data_format_r8g8b8a8_sint = 41
	// 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range.
	data_format_r8g8b8a8_srgb = 42
	// 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_b8g8r8a8_unorm = 43
	// 8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_b8g8r8a8_snorm = 44
	// 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range.
	data_format_b8g8r8a8_uscaled = 45
	// 8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range.
	data_format_b8g8r8a8_sscaled = 46
	// 8-bit-per-channel unsigned integer blue/green/red/alpha channel data format. Values are in the `[0, 255]` range.
	data_format_b8g8r8a8_uint = 47
	// 8-bit-per-channel signed integer blue/green/red/alpha channel data format. Values are in the `[-127, 127]` range.
	data_format_b8g8r8a8_sint = 48
	// 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range.
	data_format_b8g8r8a8_srgb = 49
	// 8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the `[0.0, 1.0]` range.
	data_format_a8b8g8r8_unorm_pack32 = 50
	// 8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the `[-1.0, 1.0]` range.
	data_format_a8b8g8r8_snorm_pack32 = 51
	// 8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the `[0.0, 255.0]` range.
	data_format_a8b8g8r8_uscaled_pack32 = 52
	// 8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the `[-127.0, 127.0]` range.
	data_format_a8b8g8r8_sscaled_pack32 = 53
	// 8-bit-per-channel unsigned integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the `[0, 255]` range.
	data_format_a8b8g8r8_uint_pack32 = 54
	// 8-bit-per-channel signed integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the `[-127, 127]` range.
	data_format_a8b8g8r8_sint_pack32 = 55
	// 8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value and non-linear sRGB encoding, packed in 32 bits. Values are in the `[0.0, 1.0]` range.
	data_format_a8b8g8r8_srgb_pack32 = 56
	// Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[0.0, 1.0]` range.
	data_format_a2r10g10b10_unorm_pack32 = 57
	// Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[-1.0, 1.0]` range.
	data_format_a2r10g10b10_snorm_pack32 = 58
	// Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[0.0, 1023.0]` range for red/green/blue and `[0.0, 3.0]` for alpha.
	data_format_a2r10g10b10_uscaled_pack32 = 59
	// Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[-511.0, 511.0]` range for red/green/blue and `[-1.0, 1.0]` for alpha.
	data_format_a2r10g10b10_sscaled_pack32 = 60
	// Unsigned integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[0, 1023]` range for red/green/blue and `[0, 3]` for alpha.
	data_format_a2r10g10b10_uint_pack32 = 61
	// Signed integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[-511, 511]` range for red/green/blue and `[-1, 1]` for alpha.
	data_format_a2r10g10b10_sint_pack32 = 62
	// Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[0.0, 1.0]` range.
	data_format_a2b10g10r10_unorm_pack32 = 63
	// Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[-1.0, 1.0]` range.
	data_format_a2b10g10r10_snorm_pack32 = 64
	// Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[0.0, 1023.0]` range for blue/green/red and `[0.0, 3.0]` for alpha.
	data_format_a2b10g10r10_uscaled_pack32 = 65
	// Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[-511.0, 511.0]` range for blue/green/red and `[-1.0, 1.0]` for alpha.
	data_format_a2b10g10r10_sscaled_pack32 = 66
	// Unsigned integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[0, 1023]` range for blue/green/red and `[0, 3]` for alpha.
	data_format_a2b10g10r10_uint_pack32 = 67
	// Signed integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[-511, 511]` range for blue/green/red and `[-1, 1]` for alpha.
	data_format_a2b10g10r10_sint_pack32 = 68
	// 16-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_r16_unorm = 69
	// 16-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_r16_snorm = 70
	// 16-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range.
	data_format_r16_uscaled = 71
	// 16-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range.
	data_format_r16_sscaled = 72
	// 16-bit-per-channel unsigned integer red channel data format. Values are in the `[0.0, 65535]` range.
	data_format_r16_uint = 73
	// 16-bit-per-channel signed integer red channel data format. Values are in the `[-32767, 32767]` range.
	data_format_r16_sint = 74
	// 16-bit-per-channel signed floating-point red channel data format with the value stored as-is.
	data_format_r16_sfloat = 75
	// 16-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_r16g16_unorm = 76
	// 16-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_r16g16_snorm = 77
	// 16-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range.
	data_format_r16g16_uscaled = 78
	// 16-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range.
	data_format_r16g16_sscaled = 79
	// 16-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0.0, 65535]` range.
	data_format_r16g16_uint = 80
	// 16-bit-per-channel signed integer red/green channel data format. Values are in the `[-32767, 32767]` range.
	data_format_r16g16_sint = 81
	// 16-bit-per-channel signed floating-point red/green channel data format with the value stored as-is.
	data_format_r16g16_sfloat = 82
	// 16-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_r16g16b16_unorm = 83
	// 16-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_r16g16b16_snorm = 84
	// 16-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range.
	data_format_r16g16b16_uscaled = 85
	// 16-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range.
	data_format_r16g16b16_sscaled = 86
	// 16-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0.0, 65535]` range.
	data_format_r16g16b16_uint = 87
	// 16-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[-32767, 32767]` range.
	data_format_r16g16b16_sint = 88
	// 16-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is.
	data_format_r16g16b16_sfloat = 89
	// 16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_r16g16b16a16_unorm = 90
	// 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[-1.0, 1.0]` range.
	data_format_r16g16b16a16_snorm = 91
	// 16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range.
	data_format_r16g16b16a16_uscaled = 92
	// 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range.
	data_format_r16g16b16a16_sscaled = 93
	// 16-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0.0, 65535]` range.
	data_format_r16g16b16a16_uint = 94
	// 16-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[-32767, 32767]` range.
	data_format_r16g16b16a16_sint = 95
	// 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is.
	data_format_r16g16b16a16_sfloat = 96
	// 32-bit-per-channel unsigned integer red channel data format. Values are in the `[0, 2^32 - 1]` range.
	data_format_r32_uint = 97
	// 32-bit-per-channel signed integer red channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range.
	data_format_r32_sint = 98
	// 32-bit-per-channel signed floating-point red channel data format with the value stored as-is.
	data_format_r32_sfloat = 99
	// 32-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0, 2^32 - 1]` range.
	data_format_r32g32_uint = 100
	// 32-bit-per-channel signed integer red/green channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range.
	data_format_r32g32_sint = 101
	// 32-bit-per-channel signed floating-point red/green channel data format with the value stored as-is.
	data_format_r32g32_sfloat = 102
	// 32-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0, 2^32 - 1]` range.
	data_format_r32g32b32_uint = 103
	// 32-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range.
	data_format_r32g32b32_sint = 104
	// 32-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is.
	data_format_r32g32b32_sfloat = 105
	// 32-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0, 2^32 - 1]` range.
	data_format_r32g32b32a32_uint = 106
	// 32-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range.
	data_format_r32g32b32a32_sint = 107
	// 32-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is.
	data_format_r32g32b32a32_sfloat = 108
	// 64-bit-per-channel unsigned integer red channel data format. Values are in the `[0, 2^64 - 1]` range.
	data_format_r64_uint = 109
	// 64-bit-per-channel signed integer red channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range.
	data_format_r64_sint = 110
	// 64-bit-per-channel signed floating-point red channel data format with the value stored as-is.
	data_format_r64_sfloat = 111
	// 64-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0, 2^64 - 1]` range.
	data_format_r64g64_uint = 112
	// 64-bit-per-channel signed integer red/green channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range.
	data_format_r64g64_sint = 113
	// 64-bit-per-channel signed floating-point red/green channel data format with the value stored as-is.
	data_format_r64g64_sfloat = 114
	// 64-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0, 2^64 - 1]` range.
	data_format_r64g64b64_uint = 115
	// 64-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range.
	data_format_r64g64b64_sint = 116
	// 64-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is.
	data_format_r64g64b64_sfloat = 117
	// 64-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0, 2^64 - 1]` range.
	data_format_r64g64b64a64_uint = 118
	// 64-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range.
	data_format_r64g64b64a64_sint = 119
	// 64-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is.
	data_format_r64g64b64a64_sfloat = 120
	// Unsigned floating-point blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 10 bits of blue channel, 11 bits of green channel and 11 bits of red channel.
	data_format_b10g11r11_ufloat_pack32 = 121
	// Unsigned floating-point exposure/blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 5 bits of exposure, 9 bits of blue channel, 9 bits of green channel and 9 bits of red channel.
	data_format_e5b9g9r9_ufloat_pack32 = 122
	// 16-bit unsigned floating-point depth data format with normalized value. Values are in the `[0.0, 1.0]` range.
	data_format_d16_unorm = 123
	// 24-bit unsigned floating-point depth data format with normalized value, plus 8 unused bits, packed in 32 bits. Values for depth are in the `[0.0, 1.0]` range.
	data_format_x8_d24_unorm_pack32 = 124
	// 32-bit signed floating-point depth data format with the value stored as-is.
	data_format_d32_sfloat = 125
	// 8-bit unsigned integer stencil data format.
	data_format_s8_uint = 126
	// 16-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the `[0.0, 1.0]` range. Values for stencil are in the `[0, 255]` range.
	data_format_d16_unorm_s8_uint = 127
	// 24-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the `[0.0, 1.0]` range. Values for stencil are in the `[0, 255]` range.
	data_format_d24_unorm_s8_uint = 128
	// 32-bit signed floating-point depth data format with the value stored as-is, plus 8 bits of stencil in unsigned integer format. Values for stencil are in the `[0, 255]` range.
	data_format_d32_sfloat_s8_uint = 129
	// VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1).
	data_format_bc1_rgb_unorm_block = 130
	// VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1).
	data_format_bc1_rgb_srgb_block = 131
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1).
	data_format_bc1_rgba_unorm_block = 132
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1).
	data_format_bc1_rgba_srgb_block = 133
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3).
	data_format_bc2_unorm_block = 134
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3).
	data_format_bc2_srgb_block = 135
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5).
	data_format_bc3_unorm_block = 136
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5).
	data_format_bc3_srgb_block = 137
	// VRAM-compressed unsigned red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 8 bits of red channel. Using BC4 texture compression.
	data_format_bc4_unorm_block = 138
	// VRAM-compressed signed red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. The format's precision is 8 bits of red channel. Using BC4 texture compression.
	data_format_bc4_snorm_block = 139
	// VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC).
	data_format_bc5_unorm_block = 140
	// VRAM-compressed signed red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC).
	data_format_bc5_snorm_block = 141
	// VRAM-compressed unsigned red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR).
	data_format_bc6h_ufloat_block = 142
	// VRAM-compressed signed red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR).
	data_format_bc6h_sfloat_block = 143
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR.
	data_format_bc7_unorm_block = 144
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR.
	data_format_bc7_srgb_block = 145
	// VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression.
	data_format_etc2_r8g8b8_unorm_block = 146
	// VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression.
	data_format_etc2_r8g8b8_srgb_block = 147
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression.
	data_format_etc2_r8g8b8a1_unorm_block = 148
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression.
	data_format_etc2_r8g8b8a1_srgb_block = 149
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression.
	data_format_etc2_r8g8b8a8_unorm_block = 150
	// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression.
	data_format_etc2_r8g8b8a8_srgb_block = 151
	// 11-bit VRAM-compressed unsigned red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression.
	data_format_eac_r11_unorm_block = 152
	// 11-bit VRAM-compressed signed red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. Using ETC2 texture compression.
	data_format_eac_r11_snorm_block = 153
	// 11-bit VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression.
	data_format_eac_r11g11_unorm_block = 154
	// 11-bit VRAM-compressed signed red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. Using ETC2 texture compression.
	data_format_eac_r11g11_snorm_block = 155
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 4×4 blocks (highest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_4x4_unorm_block = 156
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 4×4 blocks (highest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_4x4_srgb_block = 157
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×4 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_5x4_unorm_block = 158
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×4 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_5x4_srgb_block = 159
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_5x5_unorm_block = 160
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_5x5_srgb_block = 161
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_6x5_unorm_block = 162
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_6x5_srgb_block = 163
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_6x6_unorm_block = 164
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_6x6_srgb_block = 165
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_8x5_unorm_block = 166
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_8x5_srgb_block = 167
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_8x6_unorm_block = 168
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_8x6_srgb_block = 169
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_8x8_unorm_block = 170
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_8x8_srgb_block = 171
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_10x5_unorm_block = 172
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_10x5_srgb_block = 173
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_10x6_unorm_block = 174
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_10x6_srgb_block = 175
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_10x8_unorm_block = 176
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_10x8_srgb_block = 177
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_10x10_unorm_block = 178
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_10x10_srgb_block = 179
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 12×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_12x10_unorm_block = 180
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_12x10_srgb_block = 181
	// VRAM-compressed unsigned floating-point data format with normalized value, packed in 12 blocks (lowest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_12x12_unorm_block = 182
	// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12 blocks (lowest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression.
	data_format_astc_12x12_srgb_block = 183
	// 8-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g8b8g8r8_422_unorm = 184
	// 8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_b8g8r8g8_422_unorm = 185
	// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).
	data_format_g8_b8_r8_3plane_420_unorm = 186
	// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).
	data_format_g8_b8r8_2plane_420_unorm = 187
	// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g8_b8_r8_3plane_422_unorm = 188
	// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g8_b8r8_2plane_422_unorm = 189
	// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes. Values are in the `[0.0, 1.0]` range.
	data_format_g8_b8_r8_3plane_444_unorm = 190
	// 10-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_r10x6_unorm_pack16 = 191
	// 10-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_r10x6g10x6_unorm_2pack16 = 192
	// 10-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_r10x6g10x6b10x6a10x6_unorm_4pack16 = 193
	// 10-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.
	data_format_g10x6b10x6g10x6r10x6_422_unorm_4pack16 = 194
	// 10-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.
	data_format_b10x6g10x6r10x6g10x6_422_unorm_4pack16 = 195
	// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).
	data_format_g10x6_b10x6_r10x6_3plane_420_unorm_3pack16 = 196
	// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).
	data_format_g10x6_b10x6r10x6_2plane_420_unorm_3pack16 = 197
	// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g10x6_b10x6_r10x6_3plane_422_unorm_3pack16 = 198
	// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g10x6_b10x6r10x6_2plane_422_unorm_3pack16 = 199
	// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range.
	data_format_g10x6_b10x6_r10x6_3plane_444_unorm_3pack16 = 200
	// 12-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_r12x4_unorm_pack16 = 201
	// 12-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_r12x4g12x4_unorm_2pack16 = 202
	// 12-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range.
	data_format_r12x4g12x4b12x4a12x4_unorm_4pack16 = 203
	// 12-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.
	data_format_g12x4b12x4g12x4r12x4_422_unorm_4pack16 = 204
	// 12-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.
	data_format_b12x4g12x4r12x4g12x4_422_unorm_4pack16 = 205
	// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).
	data_format_g12x4_b12x4_r12x4_3plane_420_unorm_3pack16 = 206
	// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).
	data_format_g12x4_b12x4r12x4_2plane_420_unorm_3pack16 = 207
	// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g12x4_b12x4_r12x4_3plane_422_unorm_3pack16 = 208
	// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g12x4_b12x4r12x4_2plane_422_unorm_3pack16 = 209
	// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range.
	data_format_g12x4_b12x4_r12x4_3plane_444_unorm_3pack16 = 210
	// 16-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g16b16g16r16_422_unorm = 211
	// 16-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_b16g16r16g16_422_unorm = 212
	// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).
	data_format_g16_b16_r16_3plane_420_unorm = 213
	// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).
	data_format_g16_b16r16_2plane_420_unorm = 214
	// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g16_b16_r16_3plane_422_unorm = 215
	// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).
	data_format_g16_b16r16_2plane_422_unorm = 216
	// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range.
	data_format_g16_b16_r16_3plane_444_unorm = 217
	data_format_astc_4x4_sfloat_block        = 218
	data_format_astc_5x4_sfloat_block        = 219
	data_format_astc_5x5_sfloat_block        = 220
	data_format_astc_6x5_sfloat_block        = 221
	data_format_astc_6x6_sfloat_block        = 222
	data_format_astc_8x5_sfloat_block        = 223
	data_format_astc_8x6_sfloat_block        = 224
	data_format_astc_8x8_sfloat_block        = 225
	data_format_astc_10x5_sfloat_block       = 226
	data_format_astc_10x6_sfloat_block       = 227
	data_format_astc_10x8_sfloat_block       = 228
	data_format_astc_10x10_sfloat_block      = 229
	data_format_astc_12x10_sfloat_block      = 230
	data_format_astc_12x12_sfloat_block      = 231
	// Represents the size of the [enum DataFormat] enum.
	data_format_max = 232
}

enum RenderingDeviceDeviceType #

enum RenderingDeviceDeviceType as i64 {
	// Rendering device type does not match any of the other enum values or is unknown.
	device_type_other = 0
	// Rendering device is an integrated GPU, which is typically [i](but not always)[/i] slower than dedicated GPUs ([constant DEVICE_TYPE_DISCRETE_GPU]). On Android and iOS, the rendering device type is always considered to be [constant DEVICE_TYPE_INTEGRATED_GPU].
	device_type_integrated_gpu = 1
	// Rendering device is a dedicated GPU, which is typically [i](but not always)[/i] faster than integrated GPUs ([constant DEVICE_TYPE_INTEGRATED_GPU]).
	device_type_discrete_gpu = 2
	// Rendering device is an emulated GPU in a virtual environment. This is typically much slower than the host GPU, which means the expected performance level on a dedicated GPU will be roughly equivalent to [constant DEVICE_TYPE_INTEGRATED_GPU]. Virtual machine GPU passthrough (such as VFIO) will not report the device type as [constant DEVICE_TYPE_VIRTUAL_GPU]. Instead, the host GPU's device type will be reported as if the GPU was not emulated.
	device_type_virtual_gpu = 3
	// Rendering device is provided by software emulation (such as Lavapipe or [url=https://github.com/google/swiftshader]SwiftShader[/url]). This is the slowest kind of rendering device available; it's typically much slower than [constant DEVICE_TYPE_INTEGRATED_GPU].
	device_type_cpu = 4
	// Represents the size of the [enum DeviceType] enum.
	device_type_max = 5
}

enum RenderingDeviceDrawFlags #

enum RenderingDeviceDrawFlags as i64 {
	// Do not clear or ignore any attachments.
	draw_default_all = 0
	// Clear the first color attachment.
	draw_clear_color_0 = 1
	// Clear the second color attachment.
	draw_clear_color_1 = 2
	// Clear the third color attachment.
	draw_clear_color_2 = 4
	// Clear the fourth color attachment.
	draw_clear_color_3 = 8
	// Clear the fifth color attachment.
	draw_clear_color_4 = 16
	// Clear the sixth color attachment.
	draw_clear_color_5 = 32
	// Clear the seventh color attachment.
	draw_clear_color_6 = 64
	// Clear the eighth color attachment.
	draw_clear_color_7 = 128
	// Mask for clearing all color attachments.
	draw_clear_color_mask = 255
	// Ignore the previous contents of the first color attachment.
	draw_ignore_color_0 = 256
	// Ignore the previous contents of the second color attachment.
	draw_ignore_color_1 = 512
	// Ignore the previous contents of the third color attachment.
	draw_ignore_color_2 = 1024
	// Ignore the previous contents of the fourth color attachment.
	draw_ignore_color_3 = 2048
	// Ignore the previous contents of the fifth color attachment.
	draw_ignore_color_4 = 4096
	// Ignore the previous contents of the sixth color attachment.
	draw_ignore_color_5 = 8192
	// Ignore the previous contents of the seventh color attachment.
	draw_ignore_color_6 = 16384
	// Ignore the previous contents of the eighth color attachment.
	draw_ignore_color_7 = 32768
	// Mask for ignoring all the previous contents of the color attachments.
	draw_ignore_color_mask = 65280
	// Clear the depth attachment.
	draw_clear_depth = 65536
	// Ignore the previous contents of the depth attachment.
	draw_ignore_depth = 131072
	// Clear the stencil attachment.
	draw_clear_stencil = 262144
	// Ignore the previous contents of the stencil attachment.
	draw_ignore_stencil = 524288
	// Clear all attachments.
	draw_clear_all = 327935
	// Ignore the previous contents of all attachments.
	draw_ignore_all = 720640
}

enum RenderingDeviceDriverResource #

enum RenderingDeviceDriverResource as i64 {
	// Specific device object based on a physical device.
	// - Vulkan: Vulkan device driver resource (`VkDevice`) (`rid` parameter is ignored).
	driver_resource_logical_device = 0
	// Physical device the specific logical device is based on.
	// - Vulkan: `VkDevice` (`rid` parameter is ignored).
	driver_resource_physical_device = 1
	// Top-most graphics API entry object.
	// - Vulkan: `VkInstance` (`rid` parameter is ignored).
	driver_resource_topmost_object = 2
	// The main graphics-compute command queue.
	// - Vulkan: `VkQueue` (`rid` parameter is ignored).
	driver_resource_command_queue = 3
	// The specific family the main queue belongs to.
	// - Vulkan: The queue family index, a `uint32_t` (`rid` parameter is ignored).
	driver_resource_queue_family = 4
	// - Vulkan: `VkImage`.
	driver_resource_texture = 5
	// The view of an owned or shared texture.
	// - Vulkan: `VkImageView`.
	driver_resource_texture_view = 6
	// The native id of the data format of the texture.
	// - Vulkan: `VkFormat`.
	driver_resource_texture_data_format = 7
	// - Vulkan: `VkSampler`.
	driver_resource_sampler = 8
	// - Vulkan: `VkDescriptorSet`.
	driver_resource_uniform_set = 9
	// Buffer of any kind of (storage, vertex, etc.).
	// - Vulkan: `VkBuffer`.
	driver_resource_buffer = 10
	// - Vulkan: `VkPipeline`.
	driver_resource_compute_pipeline = 11
	// - Vulkan: `VkPipeline`.
	driver_resource_render_pipeline = 12
}

enum RenderingDeviceFeatures #

enum RenderingDeviceFeatures as i64 {
	// Support for MetalFX spatial upscaling.
	supports_metalfx_spatial = 3
	// Support for MetalFX temporal upscaling.
	supports_metalfx_temporal = 4
	// Features support for buffer device address extension.
	supports_buffer_device_address = 6
}

enum RenderingDeviceFinalAction #

enum RenderingDeviceFinalAction as i64 {
	// Store the result of the draw list in the framebuffer. This is generally what you want to do.
	final_action_store = 0
	// Discard the contents of the framebuffer. This is the fastest option if you don't need to use the results of the draw list.
	final_action_discard = 1
	// Represents the size of the [enum FinalAction] enum.
	final_action_max = 2
}

enum RenderingDeviceIndexBufferFormat #

enum RenderingDeviceIndexBufferFormat as i64 {
	// Index buffer in 16-bit unsigned integer format. This limits the maximum index that can be specified to `65535`.
	index_buffer_format_uint16 = 0
	// Index buffer in 32-bit unsigned integer format. This limits the maximum index that can be specified to `4294967295`.
	index_buffer_format_uint32 = 1
}

enum RenderingDeviceInitialAction #

enum RenderingDeviceInitialAction as i64 {
	// Load the previous contents of the framebuffer.
	initial_action_load = 0
	// Clear the whole framebuffer or its specified region.
	initial_action_clear = 1
	// Ignore the previous contents of the framebuffer. This is the fastest option if you'll overwrite all of the pixels and don't need to read any of them.
	initial_action_discard = 2
	// Represents the size of the [enum InitialAction] enum.
	initial_action_max = 3
}

enum RenderingDeviceLimit #

enum RenderingDeviceLimit as i64 {
	// Maximum number of uniform sets that can be bound at a given time.
	limit_max_bound_uniform_sets = 0
	// Maximum number of color framebuffer attachments that can be used at a given time.
	limit_max_framebuffer_color_attachments = 1
	// Maximum number of textures that can be used per uniform set.
	limit_max_textures_per_uniform_set = 2
	// Maximum number of samplers that can be used per uniform set.
	limit_max_samplers_per_uniform_set = 3
	// Maximum number of [url=https://vkguide.dev/docs/chapter-4/storage_buffers/]storage buffers[/url] per uniform set.
	limit_max_storage_buffers_per_uniform_set = 4
	// Maximum number of storage images per uniform set.
	limit_max_storage_images_per_uniform_set = 5
	// Maximum number of uniform buffers per uniform set.
	limit_max_uniform_buffers_per_uniform_set = 6
	// Maximum index for an indexed draw command.
	limit_max_draw_indexed_index = 7
	// Maximum height of a framebuffer (in pixels).
	limit_max_framebuffer_height = 8
	// Maximum width of a framebuffer (in pixels).
	limit_max_framebuffer_width = 9
	// Maximum number of texture array layers.
	limit_max_texture_array_layers = 10
	// Maximum supported 1-dimensional texture size (in pixels on a single axis).
	limit_max_texture_size_1d = 11
	// Maximum supported 2-dimensional texture size (in pixels on a single axis).
	limit_max_texture_size_2d = 12
	// Maximum supported 3-dimensional texture size (in pixels on a single axis).
	limit_max_texture_size_3d = 13
	// Maximum supported cubemap texture size (in pixels on a single axis of a single face).
	limit_max_texture_size_cube = 14
	// Maximum number of textures per shader stage.
	limit_max_textures_per_shader_stage = 15
	// Maximum number of samplers per shader stage.
	limit_max_samplers_per_shader_stage = 16
	// Maximum number of [url=https://vkguide.dev/docs/chapter-4/storage_buffers/]storage buffers[/url] per shader stage.
	limit_max_storage_buffers_per_shader_stage = 17
	// Maximum number of storage images per shader stage.
	limit_max_storage_images_per_shader_stage = 18
	// Maximum number of uniform buffers per uniform set.
	limit_max_uniform_buffers_per_shader_stage = 19
	// Maximum size of a push constant. A lot of devices are limited to 128 bytes, so try to avoid exceeding 128 bytes in push constants to ensure compatibility even if your GPU is reporting a higher value.
	limit_max_push_constant_size = 20
	// Maximum size of a uniform buffer.
	limit_max_uniform_buffer_size = 21
	// Maximum vertex input attribute offset.
	limit_max_vertex_input_attribute_offset = 22
	// Maximum number of vertex input attributes.
	limit_max_vertex_input_attributes = 23
	// Maximum number of vertex input bindings.
	limit_max_vertex_input_bindings = 24
	// Maximum vertex input binding stride.
	limit_max_vertex_input_binding_stride = 25
	// Minimum uniform buffer offset alignment.
	limit_min_uniform_buffer_offset_alignment = 26
	// Maximum shared memory size for compute shaders.
	limit_max_compute_shared_memory_size = 27
	// Maximum number of workgroups for compute shaders on the X axis.
	limit_max_compute_workgroup_count_x = 28
	// Maximum number of workgroups for compute shaders on the Y axis.
	limit_max_compute_workgroup_count_y = 29
	// Maximum number of workgroups for compute shaders on the Z axis.
	limit_max_compute_workgroup_count_z = 30
	// Maximum number of workgroup invocations for compute shaders.
	limit_max_compute_workgroup_invocations = 31
	// Maximum workgroup size for compute shaders on the X axis.
	limit_max_compute_workgroup_size_x = 32
	// Maximum workgroup size for compute shaders on the Y axis.
	limit_max_compute_workgroup_size_y = 33
	// Maximum workgroup size for compute shaders on the Z axis.
	limit_max_compute_workgroup_size_z = 34
	// Maximum viewport width (in pixels).
	limit_max_viewport_dimensions_x = 35
	// Maximum viewport height (in pixels).
	limit_max_viewport_dimensions_y = 36
	// Returns the smallest value for [member ProjectSettings.rendering/scaling_3d/scale] when using the MetalFX temporal upscaler.
	// [b]Note:[/b] The returned value is multiplied by a factor of `1000000` to preserve 6 digits of precision. It must be divided by `1000000.0` to convert the value to a floating point number.
	limit_metalfx_temporal_scaler_min_scale = 46
	// Returns the largest value for [member ProjectSettings.rendering/scaling_3d/scale] when using the MetalFX temporal upscaler.
	// [b]Note:[/b] The returned value is multiplied by a factor of `1000000` to preserve 6 digits of precision. It must be divided by `1000000.0` to convert the value to a floating point number.
	limit_metalfx_temporal_scaler_max_scale = 47
}

enum RenderingDeviceLogicOperation #

enum RenderingDeviceLogicOperation as i64 {
	// Clear logic operation (result is always `0`). See also [constant LOGIC_OP_SET].
	logic_op_clear = 0
	// AND logic operation.
	logic_op_and = 1
	// AND logic operation with the [i]destination[/i] operand being inverted. See also [constant LOGIC_OP_AND_INVERTED].
	logic_op_and_reverse = 2
	// Copy logic operation (keeps the [i]source[/i] value as-is). See also [constant LOGIC_OP_COPY_INVERTED] and [constant LOGIC_OP_NO_OP].
	logic_op_copy = 3
	// AND logic operation with the [i]source[/i] operand being inverted. See also [constant LOGIC_OP_AND_REVERSE].
	logic_op_and_inverted = 4
	// No-op logic operation (keeps the [i]destination[/i] value as-is). See also [constant LOGIC_OP_COPY].
	logic_op_no_op = 5
	// Exclusive or (XOR) logic operation.
	logic_op_xor = 6
	// OR logic operation.
	logic_op_or = 7
	// Not-OR (NOR) logic operation.
	logic_op_nor = 8
	// Not-XOR (XNOR) logic operation.
	logic_op_equivalent = 9
	// Invert logic operation.
	logic_op_invert = 10
	// OR logic operation with the [i]destination[/i] operand being inverted. See also [constant LOGIC_OP_OR_REVERSE].
	logic_op_or_reverse = 11
	// NOT logic operation (inverts the value). See also [constant LOGIC_OP_COPY].
	logic_op_copy_inverted = 12
	// OR logic operation with the [i]source[/i] operand being inverted. See also [constant LOGIC_OP_OR_REVERSE].
	logic_op_or_inverted = 13
	// Not-AND (NAND) logic operation.
	logic_op_nand = 14
	// SET logic operation (result is always `1`). See also [constant LOGIC_OP_CLEAR].
	logic_op_set = 15
	// Represents the size of the [enum LogicOperation] enum.
	logic_op_max = 16
}

enum RenderingDeviceMemoryType #

enum RenderingDeviceMemoryType as i64 {
	// Memory taken by textures.
	memory_textures = 0
	// Memory taken by buffers.
	memory_buffers = 1
	// Total memory taken. This is greater than the sum of [constant MEMORY_TEXTURES] and [constant MEMORY_BUFFERS], as it also includes miscellaneous memory usage.
	memory_total = 2
}

enum RenderingDevicePipelineDynamicStateFlags #

enum RenderingDevicePipelineDynamicStateFlags as i64 {
	// Allows dynamically changing the width of rendering lines.
	dynamic_state_line_width = 1
	// Allows dynamically changing the depth bias.
	dynamic_state_depth_bias           = 2
	dynamic_state_blend_constants      = 4
	dynamic_state_depth_bounds         = 8
	dynamic_state_stencil_compare_mask = 16
	dynamic_state_stencil_write_mask   = 32
	dynamic_state_stencil_reference    = 64
}

enum RenderingDevicePipelineSpecializationConstantType #

enum RenderingDevicePipelineSpecializationConstantType as i64 {
	// Boolean specialization constant.
	pipeline_specialization_constant_type_bool = 0
	// Integer specialization constant.
	pipeline_specialization_constant_type_int = 1
	// Floating-point specialization constant.
	pipeline_specialization_constant_type_float = 2
}

enum RenderingDevicePolygonCullMode #

enum RenderingDevicePolygonCullMode as i64 {
	// Do not use polygon front face or backface culling.
	polygon_cull_disabled = 0
	// Use polygon frontface culling (faces pointing towards the camera are hidden).
	polygon_cull_front = 1
	// Use polygon backface culling (faces pointing away from the camera are hidden).
	polygon_cull_back = 2
}

enum RenderingDevicePolygonFrontFace #

enum RenderingDevicePolygonFrontFace as i64 {
	// Clockwise winding order to determine which face of a polygon is its front face.
	polygon_front_face_clockwise = 0
	// Counter-clockwise winding order to determine which face of a polygon is its front face.
	polygon_front_face_counter_clockwise = 1
}

enum RenderingDeviceRenderPrimitive #

enum RenderingDeviceRenderPrimitive as i64 {
	// Point rendering primitive (with constant size, regardless of distance from camera).
	render_primitive_points = 0
	// Line list rendering primitive. Lines are drawn separated from each other.
	render_primitive_lines = 1
	// [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing-line-lists-with-adjacency]Line list rendering primitive with adjacency.[/url]
	// [b]Note:[/b] Adjacency is only useful with geometry shaders, which Godot does not expose.
	render_primitive_lines_with_adjacency = 2
	// Line strip rendering primitive. Lines drawn are connected to the previous vertex.
	render_primitive_linestrips = 3
	// [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing-line-strips-with-adjacency]Line strip rendering primitive with adjacency.[/url]
	// [b]Note:[/b] Adjacency is only useful with geometry shaders, which Godot does not expose.
	render_primitive_linestrips_with_adjacency = 4
	// Triangle list rendering primitive. Triangles are drawn separated from each other.
	render_primitive_triangles = 5
	// [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing-triangle-lists-with-adjacency]Triangle list rendering primitive with adjacency.[/url]
	// [b]Note:[/b] Adjacency is only useful with geometry shaders, which Godot does not expose.
	render_primitive_triangles_with_adjacency = 6
	// Triangle strip rendering primitive. Triangles drawn are connected to the previous triangle.
	render_primitive_triangle_strips = 7
	// [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing-triangle-strips-with-adjacency]Triangle strip rendering primitive with adjacency.[/url]
	// [b]Note:[/b] Adjacency is only useful with geometry shaders, which Godot does not expose.
	render_primitive_triangle_strips_with_ajacency = 8
	// Triangle strip rendering primitive with [i]primitive restart[/i] enabled. Triangles drawn are connected to the previous triangle, but a primitive restart index can be specified before drawing to create a second triangle strip after the specified index.
	// [b]Note:[/b] Only compatible with indexed draws.
	render_primitive_triangle_strips_with_restart_index = 9
	// Tessellation patch rendering primitive. Only useful with tessellation shaders, which can be used to deform these patches.
	render_primitive_tesselation_patch = 10
	// Represents the size of the [enum RenderPrimitive] enum.
	render_primitive_max = 11
}

enum RenderingDeviceSamplerBorderColor #

enum RenderingDeviceSamplerBorderColor as i64 {
	// Return a floating-point transparent black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER].
	sampler_border_color_float_transparent_black = 0
	// Return a integer transparent black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER].
	sampler_border_color_int_transparent_black = 1
	// Return a floating-point opaque black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER].
	sampler_border_color_float_opaque_black = 2
	// Return a integer opaque black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER].
	sampler_border_color_int_opaque_black = 3
	// Return a floating-point opaque white color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER].
	sampler_border_color_float_opaque_white = 4
	// Return a integer opaque white color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER].
	sampler_border_color_int_opaque_white = 5
	// Represents the size of the [enum SamplerBorderColor] enum.
	sampler_border_color_max = 6
}

enum RenderingDeviceSamplerFilter #

enum RenderingDeviceSamplerFilter as i64 {
	// Nearest-neighbor sampler filtering. Sampling at higher resolutions than the source will result in a pixelated look.
	sampler_filter_nearest = 0
	// Bilinear sampler filtering. Sampling at higher resolutions than the source will result in a blurry look.
	sampler_filter_linear = 1
}

enum RenderingDeviceSamplerRepeatMode #

enum RenderingDeviceSamplerRepeatMode as i64 {
	// Sample with repeating enabled.
	sampler_repeat_mode_repeat = 0
	// Sample with mirrored repeating enabled. When sampling outside the `[0.0, 1.0]` range, return a mirrored version of the sampler. This mirrored version is mirrored again if sampling further away, with the pattern repeating indefinitely.
	sampler_repeat_mode_mirrored_repeat = 1
	// Sample with repeating disabled. When sampling outside the `[0.0, 1.0]` range, return the color of the last pixel on the edge.
	sampler_repeat_mode_clamp_to_edge = 2
	// Sample with repeating disabled. When sampling outside the `[0.0, 1.0]` range, return the specified [member RDSamplerState.border_color].
	sampler_repeat_mode_clamp_to_border = 3
	// Sample with mirrored repeating enabled, but only once. When sampling in the `[-1.0, 0.0]` range, return a mirrored version of the sampler. When sampling outside the `[-1.0, 1.0]` range, return the color of the last pixel on the edge.
	sampler_repeat_mode_mirror_clamp_to_edge = 4
	// Represents the size of the [enum SamplerRepeatMode] enum.
	sampler_repeat_mode_max = 5
}

enum RenderingDeviceShaderLanguage #

enum RenderingDeviceShaderLanguage as i64 {
	// Khronos' GLSL shading language (used natively by OpenGL and Vulkan). This is the language used for core Godot shaders.
	shader_language_glsl = 0
	// Microsoft's High-Level Shading Language (used natively by Direct3D, but can also be used in Vulkan).
	shader_language_hlsl = 1
}

enum RenderingDeviceShaderStage #

enum RenderingDeviceShaderStage as i64 {
	// Vertex shader stage. This can be used to manipulate vertices from a shader (but not create new vertices).
	shader_stage_vertex = 0
	// Fragment shader stage (called "pixel shader" in Direct3D). This can be used to manipulate pixels from a shader.
	shader_stage_fragment = 1
	// Tessellation control shader stage. This can be used to create additional geometry from a shader.
	shader_stage_tesselation_control = 2
	// Tessellation evaluation shader stage. This can be used to create additional geometry from a shader.
	shader_stage_tesselation_evaluation = 3
	// Compute shader stage. This can be used to run arbitrary computing tasks in a shader, performing them on the GPU instead of the CPU.
	shader_stage_compute = 4
	// Represents the size of the [enum ShaderStage] enum.
	shader_stage_max = 5
	// Tessellation evaluation shader stage bit (see also [constant SHADER_STAGE_TESSELATION_EVALUATION]).
	shader_stage_tesselation_evaluation_bit = 8
	// Compute shader stage bit (see also [constant SHADER_STAGE_COMPUTE]).
	shader_stage_compute_bit = 16
}

enum RenderingDeviceStencilOperation #

enum RenderingDeviceStencilOperation as i64 {
	// Keep the current stencil value.
	stencil_op_keep = 0
	// Set the stencil value to `0`.
	stencil_op_zero = 1
	// Replace the existing stencil value with the new one.
	stencil_op_replace = 2
	// Increment the existing stencil value and clamp to the maximum representable unsigned value if reached. Stencil bits are considered as an unsigned integer.
	stencil_op_increment_and_clamp = 3
	// Decrement the existing stencil value and clamp to the minimum value if reached. Stencil bits are considered as an unsigned integer.
	stencil_op_decrement_and_clamp = 4
	// Bitwise-invert the existing stencil value.
	stencil_op_invert = 5
	// Increment the stencil value and wrap around to `0` if reaching the maximum representable unsigned. Stencil bits are considered as an unsigned integer.
	stencil_op_increment_and_wrap = 6
	// Decrement the stencil value and wrap around to the maximum representable unsigned if reaching the minimum. Stencil bits are considered as an unsigned integer.
	stencil_op_decrement_and_wrap = 7
	// Represents the size of the [enum StencilOperation] enum.
	stencil_op_max = 8
}

enum RenderingDeviceStorageBufferUsage #

enum RenderingDeviceStorageBufferUsage as i64 {
	storage_buffer_usage_dispatch_indirect = 1
}

enum RenderingDeviceTextureSamples #

enum RenderingDeviceTextureSamples as i64 {
	// Perform 1 texture sample (this is the fastest but lowest-quality for antialiasing).
	texture_samples_1 = 0
	// Perform 2 texture samples.
	texture_samples_2 = 1
	// Perform 4 texture samples.
	texture_samples_4 = 2
	// Perform 8 texture samples. Not supported on mobile GPUs (including Apple Silicon).
	texture_samples_8 = 3
	// Perform 16 texture samples. Not supported on mobile GPUs and many desktop GPUs.
	texture_samples_16 = 4
	// Perform 32 texture samples. Not supported on most GPUs.
	texture_samples_32 = 5
	// Perform 64 texture samples (this is the slowest but highest-quality for antialiasing). Not supported on most GPUs.
	texture_samples_64 = 6
	// Represents the size of the [enum TextureSamples] enum.
	texture_samples_max = 7
}

enum RenderingDeviceTextureSliceType #

enum RenderingDeviceTextureSliceType as i64 {
	// 2-dimensional texture slice.
	texture_slice_2d = 0
	// Cubemap texture slice.
	texture_slice_cubemap = 1
	// 3-dimensional texture slice.
	texture_slice_3d = 2
}

enum RenderingDeviceTextureSwizzle #

enum RenderingDeviceTextureSwizzle as i64 {
	// Return the sampled value as-is.
	texture_swizzle_identity = 0
	// Always return `0.0` when sampling.
	texture_swizzle_zero = 1
	// Always return `1.0` when sampling.
	texture_swizzle_one = 2
	// Sample the red color channel.
	texture_swizzle_r = 3
	// Sample the green color channel.
	texture_swizzle_g = 4
	// Sample the blue color channel.
	texture_swizzle_b = 5
	// Sample the alpha channel.
	texture_swizzle_a = 6
	// Represents the size of the [enum TextureSwizzle] enum.
	texture_swizzle_max = 7
}

enum RenderingDeviceTextureType #

enum RenderingDeviceTextureType as i64 {
	// 1-dimensional texture.
	texture_type_1d = 0
	// 2-dimensional texture.
	texture_type_2d = 1
	// 3-dimensional texture.
	texture_type_3d = 2
	// [Cubemap] texture.
	texture_type_cube = 3
	// Array of 1-dimensional textures.
	texture_type_1d_array = 4
	// Array of 2-dimensional textures.
	texture_type_2d_array = 5
	// Array of [Cubemap] textures.
	texture_type_cube_array = 6
	// Represents the size of the [enum TextureType] enum.
	texture_type_max = 7
}

enum RenderingDeviceTextureUsageBits #

enum RenderingDeviceTextureUsageBits as i64 {
	// Texture can be sampled.
	texture_usage_sampling_bit = 1
	// Texture can be used as a color attachment in a framebuffer.
	texture_usage_color_attachment_bit = 2
	// Texture can be used as a depth/stencil attachment in a framebuffer.
	texture_usage_depth_stencil_attachment_bit = 4
	// Texture can be used as a [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-storageimage]storage image[/url].
	texture_usage_storage_bit = 8
	// Texture can be used as a [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-storageimage]storage image[/url] with support for atomic operations.
	texture_usage_storage_atomic_bit = 16
	// Texture can be read back on the CPU using [method texture_get_data] faster than without this bit, since it is always kept in the system memory.
	texture_usage_cpu_read_bit = 32
	// Texture can be updated using [method texture_update].
	texture_usage_can_update_bit = 64
	// Texture can be a source for [method texture_copy].
	texture_usage_can_copy_from_bit = 128
	// Texture can be a destination for [method texture_copy].
	texture_usage_can_copy_to_bit = 256
	// Texture can be used as a [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-inputattachment]input attachment[/url] in a framebuffer.
	texture_usage_input_attachment_bit = 512
}

enum RenderingDeviceUniformType #

enum RenderingDeviceUniformType as i64 {
	// Sampler uniform.
	uniform_type_sampler = 0
	// Sampler uniform with a texture.
	uniform_type_sampler_with_texture = 1
	// Texture uniform.
	uniform_type_texture = 2
	// Image uniform.
	uniform_type_image = 3
	// Texture buffer uniform.
	uniform_type_texture_buffer = 4
	// Sampler uniform with a texture buffer.
	uniform_type_sampler_with_texture_buffer = 5
	// Image buffer uniform.
	uniform_type_image_buffer = 6
	// Uniform buffer uniform.
	uniform_type_uniform_buffer = 7
	// [url=https://vkguide.dev/docs/chapter-4/storage_buffers/]Storage buffer[/url] uniform.
	uniform_type_storage_buffer = 8
	// Input attachment uniform.
	uniform_type_input_attachment = 9
	// Represents the size of the [enum UniformType] enum.
	uniform_type_max = 10
}

enum RenderingDeviceVertexFrequency #

enum RenderingDeviceVertexFrequency as i64 {
	// Vertex attribute addressing is a function of the vertex. This is used to specify the rate at which vertex attributes are pulled from buffers.
	vertex_frequency_vertex = 0
	// Vertex attribute addressing is a function of the instance index. This is used to specify the rate at which vertex attributes are pulled from buffers.
	vertex_frequency_instance = 1
}

enum RenderingServerArrayCustomFormat #

enum RenderingServerArrayCustomFormat as i64 {
	// Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, unsigned floating-point in the `[0.0, 1.0]` range.
	array_custom_rgba8_unorm = 0
	// Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, signed floating-point in the `[-1.0, 1.0]` range.
	array_custom_rgba8_snorm = 1
	// Custom data array contains 16-bit-per-channel red/green color data. Values are floating-point in half precision.
	array_custom_rg_half = 2
	// Custom data array contains 16-bit-per-channel red/green/blue/alpha color data. Values are floating-point in half precision.
	array_custom_rgba_half = 3
	// Custom data array contains 32-bit-per-channel red color data. Values are floating-point in single precision.
	array_custom_r_float = 4
	// Custom data array contains 32-bit-per-channel red/green color data. Values are floating-point in single precision.
	array_custom_rg_float = 5
	// Custom data array contains 32-bit-per-channel red/green/blue color data. Values are floating-point in single precision.
	array_custom_rgb_float = 6
	// Custom data array contains 32-bit-per-channel red/green/blue/alpha color data. Values are floating-point in single precision.
	array_custom_rgba_float = 7
	// Represents the size of the [enum ArrayCustomFormat] enum.
	array_custom_max = 8
}

enum RenderingServerArrayFormat #

enum RenderingServerArrayFormat as i64 {
	// Flag used to mark a vertex position array.
	array_format_vertex = 1
	// Flag used to mark a normal array.
	array_format_normal = 2
	// Flag used to mark a tangent array.
	array_format_tangent = 4
	// Flag used to mark a vertex color array.
	array_format_color = 8
	// Flag used to mark a UV coordinates array.
	array_format_tex_uv = 16
	// Flag used to mark a UV coordinates array for the second UV coordinates.
	array_format_tex_uv2 = 32
	// Flag used to mark an array of custom per-vertex data for the first set of custom data.
	array_format_custom0 = 64
	// Flag used to mark an array of custom per-vertex data for the second set of custom data.
	array_format_custom1 = 128
	// Flag used to mark an array of custom per-vertex data for the third set of custom data.
	array_format_custom2 = 256
	// Flag used to mark an array of custom per-vertex data for the fourth set of custom data.
	array_format_custom3 = 512
	// Flag used to mark a bone information array.
	array_format_bones = 1024
	// Flag used to mark a weights array.
	array_format_weights = 2048
	// Flag used to mark an index array.
	array_format_index = 4096
	// Mask of mesh channels permitted in blend shapes.
	array_format_blend_shape_mask = 7
	// Shift of first custom channel.
	array_format_custom_base = 13
	// Number of format bits per custom channel. See [enum ArrayCustomFormat].
	array_format_custom_bits = 3
	// Amount to shift [enum ArrayCustomFormat] for custom channel index 2.
	array_format_custom2_shift = 19
	// Amount to shift [enum ArrayCustomFormat] for custom channel index 3.
	array_format_custom3_shift = 22
	// Shift of first compress flag. Compress flags should be passed to [method ArrayMesh.add_surface_from_arrays] and [method SurfaceTool.commit].
	array_compress_flags_base = 25
	// Flag used to mark that the array contains 2D vertices.
	array_flag_use_2d_vertices = 33554432
	// Flag used to mark that the mesh data will use `GL_DYNAMIC_DRAW` on GLES. Unused on Vulkan.
	array_flag_use_dynamic_update = 67108864
	// Flag used to mark that the array uses 8 bone weights instead of 4.
	array_flag_use_8_bone_weights = 134217728
	// Flag used to mark that the mesh does not have a vertex array and instead will infer vertex positions in the shader using indices and other information.
	array_flag_uses_empty_vertex_array = 268435456
	// Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can.
	array_flag_compress_attributes = 536870912
	// Flag used to mark the start of the bits used to store the mesh version.
	array_flag_format_version_base = 35
	// Flag used to record the format used by prior mesh versions before the introduction of a version.
	array_flag_format_version_1 = 0
	// Flag used to record the second iteration of the mesh version flag. The primary difference between this and [constant ARRAY_FLAG_FORMAT_VERSION_1] is that this version supports [constant ARRAY_FLAG_COMPRESS_ATTRIBUTES] and in this version vertex positions are de-interleaved from normals and tangents.
	array_flag_format_version_2 = 34359738368
	// Flag used to isolate the bits used for mesh version after using [constant ARRAY_FLAG_FORMAT_VERSION_SHIFT] to shift them into place.
	array_flag_format_version_mask = 255
}

enum RenderingServerArrayType #

enum RenderingServerArrayType as i64 {
	// Array is a vertex position array.
	array_vertex = 0
	// Array is a normal array.
	array_normal = 1
	// Array is a tangent array.
	array_tangent = 2
	// Array is a vertex color array.
	array_color = 3
	// Array is a UV coordinates array.
	array_tex_uv = 4
	// Array is a UV coordinates array for the second set of UV coordinates.
	array_tex_uv2 = 5
	// Array is a custom data array for the first set of custom data.
	array_custom0 = 6
	// Array is a custom data array for the second set of custom data.
	array_custom1 = 7
	// Array is a custom data array for the third set of custom data.
	array_custom2 = 8
	// Array is a custom data array for the fourth set of custom data.
	array_custom3 = 9
	// Array contains bone information.
	array_bones = 10
	// Array is weight information.
	array_weights = 11
	// Array is an index array.
	array_index = 12
	// Represents the size of the [enum ArrayType] enum.
	array_max = 13
}

enum RenderingServerBakeChannels #

enum RenderingServerBakeChannels as i64 {
	// Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBA8] and contains albedo color in the `.rgb` channels and alpha in the `.a` channel.
	bake_channel_albedo_alpha = 0
	// Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBA8] and contains the per-pixel normal of the object in the `.rgb` channels and nothing in the `.a` channel. The per-pixel normal is encoded as `normal * 0.5 + 0.5`.
	bake_channel_normal = 1
	// Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBA8] and contains ambient occlusion (from material and decals only) in the `.r` channel, roughness in the `.g` channel, metallic in the `.b` channel and sub surface scattering amount in the `.a` channel.
	bake_channel_orm = 2
	// Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBAH] and contains emission color in the `.rgb` channels and nothing in the `.a` channel.
	bake_channel_emission = 3
}

enum RenderingServerBlendShapeMode #

enum RenderingServerBlendShapeMode as i64 {
	// Blend shapes are normalized.
	blend_shape_mode_normalized = 0
	// Blend shapes are relative to base weight.
	blend_shape_mode_relative = 1
}

enum RenderingServerCanvasGroupMode #

enum RenderingServerCanvasGroupMode as i64 {
	// Child draws over parent and is not clipped.
	canvas_group_mode_disabled = 0
	// Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn.
	canvas_group_mode_clip_only = 1
	// Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area.
	canvas_group_mode_clip_and_draw = 2
	canvas_group_mode_transparent   = 3
}

enum RenderingServerCanvasItemTextureFilter #

enum RenderingServerCanvasItemTextureFilter as i64 {
	// Uses the default filter mode for this [Viewport].
	canvas_item_texture_filter_default = 0
	// The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
	canvas_item_texture_filter_nearest = 1
	// The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
	canvas_item_texture_filter_linear = 2
	// The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look pixelated from up close, and smooth from a distance.
	// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
	canvas_item_texture_filter_nearest_with_mipmaps = 3
	// The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look smooth from up close, and smooth from a distance.
	// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
	canvas_item_texture_filter_linear_with_mipmaps = 4
	// The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	// [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate in this case.
	canvas_item_texture_filter_nearest_with_mipmaps_anisotropic = 5
	// The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	// [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate in this case.
	canvas_item_texture_filter_linear_with_mipmaps_anisotropic = 6
	// Max value for [enum CanvasItemTextureFilter] enum.
	canvas_item_texture_filter_max = 7
}

enum RenderingServerCanvasItemTextureRepeat #

enum RenderingServerCanvasItemTextureRepeat as i64 {
	// Uses the default repeat mode for this [Viewport].
	canvas_item_texture_repeat_default = 0
	// Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture.
	canvas_item_texture_repeat_disabled = 1
	// Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.
	canvas_item_texture_repeat_enabled = 2
	// Flip the texture when repeating so that the edge lines up instead of abruptly changing.
	canvas_item_texture_repeat_mirror = 3
	// Max value for [enum CanvasItemTextureRepeat] enum.
	canvas_item_texture_repeat_max = 4
}

enum RenderingServerCanvasLightBlendMode #

enum RenderingServerCanvasLightBlendMode as i64 {
	// Adds light color additive to the canvas.
	canvas_light_blend_mode_add = 0
	// Adds light color subtractive to the canvas.
	canvas_light_blend_mode_sub = 1
	// The light adds color depending on transparency.
	canvas_light_blend_mode_mix = 2
}

enum RenderingServerCanvasLightMode #

enum RenderingServerCanvasLightMode as i64 {
	// 2D point light (see [PointLight2D]).
	canvas_light_mode_point = 0
	// 2D directional (sun/moon) light (see [DirectionalLight2D]).
	canvas_light_mode_directional = 1
}

enum RenderingServerCanvasLightShadowFilter #

enum RenderingServerCanvasLightShadowFilter as i64 {
	// Do not apply a filter to canvas light shadows.
	canvas_light_filter_none = 0
	// Use PCF5 filtering to filter canvas light shadows.
	canvas_light_filter_pcf5 = 1
	// Use PCF13 filtering to filter canvas light shadows.
	canvas_light_filter_pcf13 = 2
	// Max value of the [enum CanvasLightShadowFilter] enum.
	canvas_light_filter_max = 3
}

enum RenderingServerCanvasOccluderPolygonCullMode #

enum RenderingServerCanvasOccluderPolygonCullMode as i64 {
	// Culling of the canvas occluder is disabled.
	canvas_occluder_polygon_cull_disabled = 0
	// Culling of the canvas occluder is clockwise.
	canvas_occluder_polygon_cull_clockwise = 1
	// Culling of the canvas occluder is counterclockwise.
	canvas_occluder_polygon_cull_counter_clockwise = 2
}

enum RenderingServerCanvasTextureChannel #

enum RenderingServerCanvasTextureChannel as i64 {
	// Diffuse canvas texture ([member CanvasTexture.diffuse_texture]).
	canvas_texture_channel_diffuse = 0
	// Normal map canvas texture ([member CanvasTexture.normal_texture]).
	canvas_texture_channel_normal = 1
	// Specular map canvas texture ([member CanvasTexture.specular_texture]).
	canvas_texture_channel_specular = 2
}

enum RenderingServerCompositorEffectCallbackType #

enum RenderingServerCompositorEffectCallbackType as i64 {
	// The callback is called before our opaque rendering pass, but after depth prepass (if applicable).
	compositor_effect_callback_type_pre_opaque = 0
	// The callback is called after our opaque rendering pass, but before our sky is rendered.
	compositor_effect_callback_type_post_opaque = 1
	// The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections).
	compositor_effect_callback_type_post_sky = 2
	// The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers.
	compositor_effect_callback_type_pre_transparent = 3
	// The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target.
	compositor_effect_callback_type_post_transparent = 4
	compositor_effect_callback_type_any              = -1
}

enum RenderingServerCompositorEffectFlags #

enum RenderingServerCompositorEffectFlags as i64 {
	// The rendering effect requires the color buffer to be resolved if MSAA is enabled.
	compositor_effect_flag_access_resolved_color = 1
	// The rendering effect requires the depth buffer to be resolved if MSAA is enabled.
	compositor_effect_flag_access_resolved_depth = 2
	// The rendering effect requires motion vectors to be produced.
	compositor_effect_flag_needs_motion_vectors = 4
	// The rendering effect requires normals and roughness g-buffer to be produced (Forward+ only).
	compositor_effect_flag_needs_roughness = 8
	// The rendering effect requires specular data to be separated out (Forward+ only).
	compositor_effect_flag_needs_separate_specular = 16
}

enum RenderingServerCubeMapLayer #

enum RenderingServerCubeMapLayer as i64 {
	// Left face of a [Cubemap].
	cubemap_layer_left = 0
	// Right face of a [Cubemap].
	cubemap_layer_right = 1
	// Bottom face of a [Cubemap].
	cubemap_layer_bottom = 2
	// Top face of a [Cubemap].
	cubemap_layer_top = 3
	// Front face of a [Cubemap].
	cubemap_layer_front = 4
	// Back face of a [Cubemap].
	cubemap_layer_back = 5
}

enum RenderingServerDOFBlurQuality #

enum RenderingServerDOFBlurQuality as i64 {
	// Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts.
	dof_blur_quality_very_low = 0
	// Low quality DOF blur.
	dof_blur_quality_low = 1
	// Medium quality DOF blur.
	dof_blur_quality_medium = 2
	// Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower.
	dof_blur_quality_high = 3
}

enum RenderingServerDOFBokehShape #

enum RenderingServerDOFBokehShape as i64 {
	// Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern.
	dof_bokeh_box = 0
	// Calculates DOF blur using a hexagon shaped filter.
	dof_bokeh_hexagon = 1
	// Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes).
	dof_bokeh_circle = 2
}

enum RenderingServerDecalFilter #

enum RenderingServerDecalFilter as i64 {
	// Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.
	decal_filter_nearest = 0
	// Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.
	decal_filter_linear = 1
	// Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
	decal_filter_nearest_mipmaps = 2
	// Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
	decal_filter_linear_mipmaps = 3
	// Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	decal_filter_nearest_mipmaps_anisotropic = 4
	// Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	decal_filter_linear_mipmaps_anisotropic = 5
}

enum RenderingServerDecalTexture #

enum RenderingServerDecalTexture as i64 {
	// Albedo texture slot in a decal ([member Decal.texture_albedo]).
	decal_texture_albedo = 0
	// Normal map texture slot in a decal ([member Decal.texture_normal]).
	decal_texture_normal = 1
	// Occlusion/Roughness/Metallic texture slot in a decal ([member Decal.texture_orm]).
	decal_texture_orm = 2
	// Emission texture slot in a decal ([member Decal.texture_emission]).
	decal_texture_emission = 3
	// Represents the size of the [enum DecalTexture] enum.
	decal_texture_max = 4
}

enum RenderingServerEnvironmentAmbientSource #

enum RenderingServerEnvironmentAmbientSource as i64 {
	// Gather ambient light from whichever source is specified as the background.
	env_ambient_source_bg = 0
	// Disable ambient light.
	env_ambient_source_disabled = 1
	// Specify a specific [Color] for ambient light.
	env_ambient_source_color = 2
	// Gather ambient light from the [Sky] regardless of what the background is.
	env_ambient_source_sky = 3
}

enum RenderingServerEnvironmentBG #

enum RenderingServerEnvironmentBG as i64 {
	// Use the clear color as background.
	env_bg_clear_color = 0
	// Use a specified color as the background.
	env_bg_color = 1
	// Use a sky resource for the background.
	env_bg_sky = 2
	// Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world.
	env_bg_canvas = 3
	// Do not clear the background, use whatever was rendered last frame as the background.
	env_bg_keep = 4
	// Displays a camera feed in the background.
	env_bg_camera_feed = 5
	// Represents the size of the [enum EnvironmentBG] enum.
	env_bg_max = 6
}

enum RenderingServerEnvironmentFogMode #

enum RenderingServerEnvironmentFogMode as i64 {
	// Use a physically-based fog model defined primarily by fog density.
	env_fog_mode_exponential = 0
	// Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control.
	env_fog_mode_depth = 1
}

enum RenderingServerEnvironmentGlowBlendMode #

enum RenderingServerEnvironmentGlowBlendMode as i64 {
	// Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
	env_glow_blend_mode_additive = 0
	// Screen glow blending mode. Increases brightness, used frequently with bloom.
	env_glow_blend_mode_screen = 1
	// Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom).
	env_glow_blend_mode_softlight = 2
	// Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.
	env_glow_blend_mode_replace = 3
	// Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
	env_glow_blend_mode_mix = 4
}

enum RenderingServerEnvironmentReflectionSource #

enum RenderingServerEnvironmentReflectionSource as i64 {
	// Use the background for reflections.
	env_reflection_source_bg = 0
	// Disable reflections.
	env_reflection_source_disabled = 1
	// Use the [Sky] for reflections regardless of what the background is.
	env_reflection_source_sky = 2
}

enum RenderingServerEnvironmentSDFGIFramesToConverge #

enum RenderingServerEnvironmentSDFGIFramesToConverge as i64 {
	// Converge SDFGI over 5 frames. This is the most responsive, but creates the most noisy result with a given ray count.
	env_sdfgi_converge_in_5_frames = 0
	// Configure SDFGI to fully converge over 10 frames.
	env_sdfgi_converge_in_10_frames = 1
	// Configure SDFGI to fully converge over 15 frames.
	env_sdfgi_converge_in_15_frames = 2
	// Configure SDFGI to fully converge over 20 frames.
	env_sdfgi_converge_in_20_frames = 3
	// Configure SDFGI to fully converge over 25 frames.
	env_sdfgi_converge_in_25_frames = 4
	// Configure SDFGI to fully converge over 30 frames. This is the least responsive, but creates the least noisy result with a given ray count.
	env_sdfgi_converge_in_30_frames = 5
	// Represents the size of the [enum EnvironmentSDFGIFramesToConverge] enum.
	env_sdfgi_converge_max = 6
}

enum RenderingServerEnvironmentSDFGIFramesToUpdateLight #

enum RenderingServerEnvironmentSDFGIFramesToUpdateLight as i64 {
	// Update indirect light from dynamic lights in SDFGI over 1 frame. This is the most responsive, but has the highest GPU requirements.
	env_sdfgi_update_light_in_1_frame = 0
	// Update indirect light from dynamic lights in SDFGI over 2 frames.
	env_sdfgi_update_light_in_2_frames = 1
	// Update indirect light from dynamic lights in SDFGI over 4 frames.
	env_sdfgi_update_light_in_4_frames = 2
	// Update indirect light from dynamic lights in SDFGI over 8 frames.
	env_sdfgi_update_light_in_8_frames = 3
	// Update indirect light from dynamic lights in SDFGI over 16 frames. This is the least responsive, but has the lowest GPU requirements.
	env_sdfgi_update_light_in_16_frames = 4
	// Represents the size of the [enum EnvironmentSDFGIFramesToUpdateLight] enum.
	env_sdfgi_update_light_max = 5
}

enum RenderingServerEnvironmentSDFGIRayCount #

enum RenderingServerEnvironmentSDFGIRayCount as i64 {
	// Throw 4 rays per frame when converging SDFGI. This has the lowest GPU requirements, but creates the most noisy result.
	env_sdfgi_ray_count_4 = 0
	// Throw 8 rays per frame when converging SDFGI.
	env_sdfgi_ray_count_8 = 1
	// Throw 16 rays per frame when converging SDFGI.
	env_sdfgi_ray_count_16 = 2
	// Throw 32 rays per frame when converging SDFGI.
	env_sdfgi_ray_count_32 = 3
	// Throw 64 rays per frame when converging SDFGI.
	env_sdfgi_ray_count_64 = 4
	// Throw 96 rays per frame when converging SDFGI. This has high GPU requirements.
	env_sdfgi_ray_count_96 = 5
	// Throw 128 rays per frame when converging SDFGI. This has very high GPU requirements, but creates the least noisy result.
	env_sdfgi_ray_count_128 = 6
	// Represents the size of the [enum EnvironmentSDFGIRayCount] enum.
	env_sdfgi_ray_count_max = 7
}

enum RenderingServerEnvironmentSDFGIYScale #

enum RenderingServerEnvironmentSDFGIYScale as i64 {
	// Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality.
	env_sdfgi_y_scale_50_percent = 0
	// Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales.
	env_sdfgi_y_scale_75_percent = 1
	// Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings.
	env_sdfgi_y_scale_100_percent = 2
}

enum RenderingServerEnvironmentSSAOQuality #

enum RenderingServerEnvironmentSSAOQuality as i64 {
	// Lowest quality of screen-space ambient occlusion.
	env_ssao_quality_very_low = 0
	// Low quality screen-space ambient occlusion.
	env_ssao_quality_low = 1
	// Medium quality screen-space ambient occlusion.
	env_ssao_quality_medium = 2
	// High quality screen-space ambient occlusion.
	env_ssao_quality_high = 3
	// Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
	env_ssao_quality_ultra = 4
}

enum RenderingServerEnvironmentSSILQuality #

enum RenderingServerEnvironmentSSILQuality as i64 {
	// Lowest quality of screen-space indirect lighting.
	env_ssil_quality_very_low = 0
	// Low quality screen-space indirect lighting.
	env_ssil_quality_low = 1
	// High quality screen-space indirect lighting.
	env_ssil_quality_medium = 2
	// High quality screen-space indirect lighting.
	env_ssil_quality_high = 3
	// Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality.
	env_ssil_quality_ultra = 4
}

enum RenderingServerEnvironmentSSRRoughnessQuality #

enum RenderingServerEnvironmentSSRRoughnessQuality as i64 {
	// Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option.
	env_ssr_roughness_quality_disabled = 0
	// Low quality of roughness filter for screen-space reflections.
	env_ssr_roughness_quality_low = 1
	// Medium quality of roughness filter for screen-space reflections.
	env_ssr_roughness_quality_medium = 2
	// High quality of roughness filter for screen-space reflections. This is the slowest option.
	env_ssr_roughness_quality_high = 3
}

enum RenderingServerEnvironmentToneMapper #

enum RenderingServerEnvironmentToneMapper as i64 {
	// Does not modify color data, resulting in a linear tonemapping curve which unnaturally clips bright values, causing bright lighting to look blown out. The simplest and fastest tonemapper.
	env_tone_mapper_linear = 0
	// A simple tonemapping curve that rolls off bright values to prevent clipping. This results in an image that can appear dull and low contrast. Slower than [constant ENV_TONE_MAPPER_LINEAR].
	// [b]Note:[/b] When [member Environment.tonemap_white] is left at the default value of `1.0`, [constant ENV_TONE_MAPPER_REINHARD] produces an identical image to [constant ENV_TONE_MAPPER_LINEAR].
	env_tone_mapper_reinhard = 1
	// Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than [constant ENV_TONE_MAPPER_REINHARD]. Slightly slower than [constant ENV_TONE_MAPPER_REINHARD].
	env_tone_mapper_filmic = 2
	// Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than [constant ENV_TONE_MAPPER_FILMIC].
	// [b]Note:[/b] This tonemapping operator is called "ACES Fitted" in Godot 3.x.
	env_tone_mapper_aces = 3
	// Uses a film-like tonemapping curve and desaturates bright values for a more realistic appearance. Better than other tonemappers at maintaining the hue of colors as they become brighter. The slowest tonemapping option.
	// [b]Note:[/b] [member Environment.tonemap_white] is fixed at a value of `16.29`, which makes [constant ENV_TONE_MAPPER_AGX] unsuitable for use with the Mobile rendering method.
	env_tone_mapper_agx = 4
}

enum RenderingServerFeatures #

enum RenderingServerFeatures as i64 {
	feature_shaders       = 0
	feature_multithreaded = 1
}

enum RenderingServerFogVolumeShape #

enum RenderingServerFogVolumeShape as i64 {
	// [FogVolume] will be shaped like an ellipsoid (stretched sphere).
	fog_volume_shape_ellipsoid = 0
	// [FogVolume] will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the size. The cone will be adjusted to fit within the size. Rotate the [FogVolume] node to reorient the cone. Non-uniform scaling via size is not supported (scale the [FogVolume] node instead).
	fog_volume_shape_cone = 1
	// [FogVolume] will be shaped like an upright cylinder (in local coordinates). Rotate the [FogVolume] node to reorient the cylinder. The cylinder will be adjusted to fit within the size. Non-uniform scaling via size is not supported (scale the [FogVolume] node instead).
	fog_volume_shape_cylinder = 2
	// [FogVolume] will be shaped like a box.
	fog_volume_shape_box = 3
	// [FogVolume] will have no shape, will cover the whole world and will not be culled.
	fog_volume_shape_world = 4
	// Represents the size of the [enum FogVolumeShape] enum.
	fog_volume_shape_max = 5
}

enum RenderingServerGlobalShaderParameterType #

enum RenderingServerGlobalShaderParameterType as i64 {
	// Boolean global shader parameter (`global uniform bool ...`).
	global_var_type_bool = 0
	// 2-dimensional boolean vector global shader parameter (`global uniform bvec2 ...`).
	global_var_type_bvec2 = 1
	// 3-dimensional boolean vector global shader parameter (`global uniform bvec3 ...`).
	global_var_type_bvec3 = 2
	// 4-dimensional boolean vector global shader parameter (`global uniform bvec4 ...`).
	global_var_type_bvec4 = 3
	// Integer global shader parameter (`global uniform int ...`).
	global_var_type_int = 4
	// 2-dimensional integer vector global shader parameter (`global uniform ivec2 ...`).
	global_var_type_ivec2 = 5
	// 3-dimensional integer vector global shader parameter (`global uniform ivec3 ...`).
	global_var_type_ivec3 = 6
	// 4-dimensional integer vector global shader parameter (`global uniform ivec4 ...`).
	global_var_type_ivec4 = 7
	// 2-dimensional integer rectangle global shader parameter (`global uniform ivec4 ...`). Equivalent to [constant GLOBAL_VAR_TYPE_IVEC4] in shader code, but exposed as a [Rect2i] in the editor UI.
	global_var_type_rect2i = 8
	// Unsigned integer global shader parameter (`global uniform uint ...`).
	global_var_type_uint = 9
	// 2-dimensional unsigned integer vector global shader parameter (`global uniform uvec2 ...`).
	global_var_type_uvec2 = 10
	// 3-dimensional unsigned integer vector global shader parameter (`global uniform uvec3 ...`).
	global_var_type_uvec3 = 11
	// 4-dimensional unsigned integer vector global shader parameter (`global uniform uvec4 ...`).
	global_var_type_uvec4 = 12
	// Single-precision floating-point global shader parameter (`global uniform float ...`).
	global_var_type_float = 13
	// 2-dimensional floating-point vector global shader parameter (`global uniform vec2 ...`).
	global_var_type_vec2 = 14
	// 3-dimensional floating-point vector global shader parameter (`global uniform vec3 ...`).
	global_var_type_vec3 = 15
	// 4-dimensional floating-point vector global shader parameter (`global uniform vec4 ...`).
	global_var_type_vec4 = 16
	// Color global shader parameter (`global uniform vec4 ...`). Equivalent to [constant GLOBAL_VAR_TYPE_VEC4] in shader code, but exposed as a [Color] in the editor UI.
	global_var_type_color = 17
	// 2-dimensional floating-point rectangle global shader parameter (`global uniform vec4 ...`). Equivalent to [constant GLOBAL_VAR_TYPE_VEC4] in shader code, but exposed as a [Rect2] in the editor UI.
	global_var_type_rect2 = 18
	// 2×2 matrix global shader parameter (`global uniform mat2 ...`). Exposed as a [PackedInt32Array] in the editor UI.
	global_var_type_mat2 = 19
	// 3×3 matrix global shader parameter (`global uniform mat3 ...`). Exposed as a [Basis] in the editor UI.
	global_var_type_mat3 = 20
	// 4×4 matrix global shader parameter (`global uniform mat4 ...`). Exposed as a [Projection] in the editor UI.
	global_var_type_mat4 = 21
	// 2-dimensional transform global shader parameter (`global uniform mat2x3 ...`). Exposed as a [Transform2D] in the editor UI.
	global_var_type_transform_2d = 22
	// 3-dimensional transform global shader parameter (`global uniform mat3x4 ...`). Exposed as a [Transform3D] in the editor UI.
	global_var_type_transform = 23
	// 2D sampler global shader parameter (`global uniform sampler2D ...`). Exposed as a [Texture2D] in the editor UI.
	global_var_type_sampler2d = 24
	// 2D sampler array global shader parameter (`global uniform sampler2DArray ...`). Exposed as a [Texture2DArray] in the editor UI.
	global_var_type_sampler2darray = 25
	// 3D sampler global shader parameter (`global uniform sampler3D ...`). Exposed as a [Texture3D] in the editor UI.
	global_var_type_sampler3d = 26
	// Cubemap sampler global shader parameter (`global uniform samplerCube ...`). Exposed as a [Cubemap] in the editor UI.
	global_var_type_samplercube = 27
	// External sampler global shader parameter (`global uniform samplerExternalOES ...`). Exposed as a [ExternalTexture] in the editor UI.
	global_var_type_samplerext = 28
	// Represents the size of the [enum GlobalShaderParameterType] enum.
	global_var_type_max = 29
}

enum RenderingServerInstanceFlags #

enum RenderingServerInstanceFlags as i64 {
	// Allows the instance to be used in baked lighting.
	instance_flag_use_baked_light = 0
	// Allows the instance to be used with dynamic global illumination.
	instance_flag_use_dynamic_gi = 1
	// When set, manually requests to draw geometry on next frame.
	instance_flag_draw_next_frame_if_visible = 2
	// Always draw, even if the instance would be culled by occlusion culling. Does not affect view frustum culling.
	instance_flag_ignore_occlusion_culling = 3
	// Represents the size of the [enum InstanceFlags] enum.
	instance_flag_max = 4
}

enum RenderingServerInstanceType #

enum RenderingServerInstanceType as i64 {
	// The instance does not have a type.
	instance_none = 0
	// The instance is a mesh.
	instance_mesh = 1
	// The instance is a multimesh.
	instance_multimesh = 2
	// The instance is a particle emitter.
	instance_particles = 3
	// The instance is a GPUParticles collision shape.
	instance_particles_collision = 4
	// The instance is a light.
	instance_light = 5
	// The instance is a reflection probe.
	instance_reflection_probe = 6
	// The instance is a decal.
	instance_decal = 7
	// The instance is a VoxelGI.
	instance_voxel_gi = 8
	// The instance is a lightmap.
	instance_lightmap = 9
	// The instance is an occlusion culling occluder.
	instance_occluder = 10
	// The instance is a visible on-screen notifier.
	instance_visiblity_notifier = 11
	// The instance is a fog volume.
	instance_fog_volume = 12
	// Represents the size of the [enum InstanceType] enum.
	instance_max = 13
	// A combination of the flags of geometry instances (mesh, multimesh, immediate and particles).
	instance_geometry_mask = 14
}

enum RenderingServerLightBakeMode #

enum RenderingServerLightBakeMode as i64 {
	// Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights.
	light_bake_disabled = 0
	// Light is taken into account in static baking ([VoxelGI], [LightmapGI], SDFGI ([member Environment.sdfgi_enabled])). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off.
	light_bake_static = 1
	// Light is taken into account in dynamic baking ([VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to [constant LIGHT_BAKE_STATIC]. This has a greater performance cost compared to [constant LIGHT_BAKE_STATIC]. When using SDFGI, the update speed of dynamic lights is affected by [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights].
	light_bake_dynamic = 2
}

enum RenderingServerLightDirectionalShadowMode #

enum RenderingServerLightDirectionalShadowMode as i64 {
	// Use orthogonal shadow projection for directional light.
	light_directional_shadow_orthogonal = 0
	// Use 2 splits for shadow projection when using directional light.
	light_directional_shadow_parallel_2_splits = 1
	// Use 4 splits for shadow projection when using directional light.
	light_directional_shadow_parallel_4_splits = 2
}

enum RenderingServerLightDirectionalSkyMode #

enum RenderingServerLightDirectionalSkyMode as i64 {
	// Use DirectionalLight3D in both sky rendering and scene lighting.
	light_directional_sky_mode_light_and_sky = 0
	// Only use DirectionalLight3D in scene lighting.
	light_directional_sky_mode_light_only = 1
	// Only use DirectionalLight3D in sky rendering.
	light_directional_sky_mode_sky_only = 2
}

enum RenderingServerLightOmniShadowMode #

enum RenderingServerLightOmniShadowMode as i64 {
	// Use a dual paraboloid shadow map for omni lights.
	light_omni_shadow_dual_paraboloid = 0
	// Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid.
	light_omni_shadow_cube = 1
}

enum RenderingServerLightParam #

enum RenderingServerLightParam as i64 {
	// The light's energy multiplier.
	light_param_energy = 0
	// The light's indirect energy multiplier (final indirect energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_INDIRECT_ENERGY]).
	light_param_indirect_energy = 1
	// The light's volumetric fog energy multiplier (final volumetric fog energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY]).
	light_param_volumetric_fog_energy = 2
	// The light's influence on specularity.
	light_param_specular = 3
	// The light's range.
	light_param_range = 4
	// The size of the light when using spot light or omni light. The angular size of the light when using directional light.
	light_param_size = 5
	// The light's attenuation.
	light_param_attenuation = 6
	// The spotlight's angle.
	light_param_spot_angle = 7
	// The spotlight's attenuation.
	light_param_spot_attenuation = 8
	// The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering).
	light_param_shadow_max_distance = 9
	// Proportion of shadow atlas occupied by the first split.
	light_param_shadow_split_1_offset = 10
	// Proportion of shadow atlas occupied by the second split.
	light_param_shadow_split_2_offset = 11
	// Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest.
	light_param_shadow_split_3_offset = 12
	// Proportion of shadow max distance where the shadow will start to fade out.
	light_param_shadow_fade_start = 13
	// Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts.
	light_param_shadow_normal_bias = 14
	// Bias for the shadow lookup to fix self-shadowing artifacts.
	light_param_shadow_bias = 15
	// Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to `0` turns off the pancaking effect.
	light_param_shadow_pancake_size = 16
	// The light's shadow opacity. Values lower than `1.0` make the light appear through shadows. This can be used to fake global illumination at a low performance cost.
	light_param_shadow_opacity = 17
	// Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible.
	light_param_shadow_blur        = 18
	light_param_transmittance_bias = 19
	// Constant representing the intensity of the light, measured in Lumens when dealing with a [SpotLight3D] or [OmniLight3D], or measured in Lux with a [DirectionalLight3D]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is `true`.
	light_param_intensity = 20
	// Represents the size of the [enum LightParam] enum.
	light_param_max = 21
}

enum RenderingServerLightProjectorFilter #

enum RenderingServerLightProjectorFilter as i64 {
	// Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.
	light_projector_filter_nearest = 0
	// Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.
	light_projector_filter_linear = 1
	// Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
	light_projector_filter_nearest_mipmaps = 2
	// Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
	light_projector_filter_linear_mipmaps = 3
	// Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	light_projector_filter_nearest_mipmaps_anisotropic = 4
	// Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	light_projector_filter_linear_mipmaps_anisotropic = 5
}

enum RenderingServerLightType #

enum RenderingServerLightType as i64 {
	// Directional (sun/moon) light (see [DirectionalLight3D]).
	light_directional = 0
	// Omni light (see [OmniLight3D]).
	light_omni = 1
	// Spot light (see [SpotLight3D]).
	light_spot = 2
}

enum RenderingServerMultimeshPhysicsInterpolationQuality #

enum RenderingServerMultimeshPhysicsInterpolationQuality as i64 {
	// MultiMesh physics interpolation favors speed over quality.
	multimesh_interp_quality_fast = 0
	// MultiMesh physics interpolation favors quality over speed.
	multimesh_interp_quality_high = 1
}

enum RenderingServerMultimeshTransformFormat #

enum RenderingServerMultimeshTransformFormat as i64 {
	// Use [Transform2D] to store MultiMesh transform.
	multimesh_transform_2d = 0
	// Use [Transform3D] to store MultiMesh transform.
	multimesh_transform_3d = 1
}

enum RenderingServerNinePatchAxisMode #

enum RenderingServerNinePatchAxisMode as i64 {
	// The nine patch gets stretched where needed.
	nine_patch_stretch = 0
	// The nine patch gets filled with tiles where needed.
	nine_patch_tile = 1
	// The nine patch gets filled with tiles where needed and stretches them a bit if needed.
	nine_patch_tile_fit = 2
}

enum RenderingServerParticlesCollisionHeightfieldResolution #

enum RenderingServerParticlesCollisionHeightfieldResolution as i64 {
	particles_collision_heightfield_resolution_256  = 0
	particles_collision_heightfield_resolution_512  = 1
	particles_collision_heightfield_resolution_1024 = 2
	particles_collision_heightfield_resolution_2048 = 3
	particles_collision_heightfield_resolution_4096 = 4
	particles_collision_heightfield_resolution_8192 = 5
	// Represents the size of the [enum ParticlesCollisionHeightfieldResolution] enum.
	particles_collision_heightfield_resolution_max = 6
}

enum RenderingServerParticlesCollisionType #

enum RenderingServerParticlesCollisionType as i64 {
	particles_collision_type_sphere_attract       = 0
	particles_collision_type_box_attract          = 1
	particles_collision_type_vector_field_attract = 2
	particles_collision_type_sphere_collide       = 3
	particles_collision_type_box_collide          = 4
	particles_collision_type_sdf_collide          = 5
	particles_collision_type_heightfield_collide  = 6
}

enum RenderingServerParticlesDrawOrder #

enum RenderingServerParticlesDrawOrder as i64 {
	// Draw particles in the order that they appear in the particles array.
	particles_draw_order_index = 0
	// Sort particles based on their lifetime. In other words, the particle with the highest lifetime is drawn at the front.
	particles_draw_order_lifetime = 1
	// Sort particles based on the inverse of their lifetime. In other words, the particle with the lowest lifetime is drawn at the front.
	particles_draw_order_reverse_lifetime = 2
	// Sort particles based on their distance to the camera.
	particles_draw_order_view_depth = 3
}

enum RenderingServerParticlesMode #

enum RenderingServerParticlesMode as i64 {
	// 2D particles.
	particles_mode_2d = 0
	// 3D particles.
	particles_mode_3d = 1
}

enum RenderingServerParticlesTransformAlign #

enum RenderingServerParticlesTransformAlign as i64 {
	particles_transform_align_disabled                  = 0
	particles_transform_align_z_billboard               = 1
	particles_transform_align_y_to_velocity             = 2
	particles_transform_align_z_billboard_y_to_velocity = 3
}

enum RenderingServerPipelineSource #

enum RenderingServerPipelineSource as i64 {
	// Pipeline compilation that was triggered by the 2D canvas renderer.
	pipeline_source_canvas = 0
	// Pipeline compilation that was triggered by loading a mesh.
	pipeline_source_mesh = 1
	// Pipeline compilation that was triggered by building the surface cache before rendering the scene.
	pipeline_source_surface = 2
	// Pipeline compilation that was triggered while drawing the scene.
	pipeline_source_draw = 3
	// Pipeline compilation that was triggered to optimize the current scene.
	pipeline_source_specialization = 4
	// Represents the size of the [enum PipelineSource] enum.
	pipeline_source_max = 5
}

enum RenderingServerPrimitiveType #

enum RenderingServerPrimitiveType as i64 {
	// Primitive to draw consists of points.
	primitive_points = 0
	// Primitive to draw consists of lines.
	primitive_lines = 1
	// Primitive to draw consists of a line strip from start to end.
	primitive_line_strip = 2
	// Primitive to draw consists of triangles.
	primitive_triangles = 3
	// Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle).
	primitive_triangle_strip = 4
	// Represents the size of the [enum PrimitiveType] enum.
	primitive_max = 5
}

enum RenderingServerReflectionProbeAmbientMode #

enum RenderingServerReflectionProbeAmbientMode as i64 {
	// Do not apply any ambient lighting inside the reflection probe's box defined by its size.
	reflection_probe_ambient_disabled = 0
	// Apply automatically-sourced environment lighting inside the reflection probe's box defined by its size.
	reflection_probe_ambient_environment = 1
	// Apply custom ambient lighting inside the reflection probe's box defined by its size. See [method reflection_probe_set_ambient_color] and [method reflection_probe_set_ambient_energy].
	reflection_probe_ambient_color = 2
}

enum RenderingServerReflectionProbeUpdateMode #

enum RenderingServerReflectionProbeUpdateMode as i64 {
	// Reflection probe will update reflections once and then stop.
	reflection_probe_update_once = 0
	// Reflection probe will update each frame. This mode is necessary to capture moving objects.
	reflection_probe_update_always = 1
}

enum RenderingServerRenderingInfo #

enum RenderingServerRenderingInfo as i64 {
	// Number of objects rendered in the current 3D scene. This varies depending on camera position and rotation.
	rendering_info_total_objects_in_frame = 0
	// Number of points, lines, or triangles rendered in the current 3D scene. This varies depending on camera position and rotation.
	rendering_info_total_primitives_in_frame = 1
	// Number of draw calls performed to render in the current 3D scene. This varies depending on camera position and rotation.
	rendering_info_total_draw_calls_in_frame = 2
	// Texture memory used (in bytes).
	rendering_info_texture_mem_used = 3
	// Buffer memory used (in bytes). This includes vertex data, uniform buffers, and many miscellaneous buffer types used internally.
	rendering_info_buffer_mem_used = 4
	// Video memory used (in bytes). When using the Forward+ or Mobile renderers, this is always greater than the sum of [constant RENDERING_INFO_TEXTURE_MEM_USED] and [constant RENDERING_INFO_BUFFER_MEM_USED], since there is miscellaneous data not accounted for by those two metrics. When using the Compatibility renderer, this is equal to the sum of [constant RENDERING_INFO_TEXTURE_MEM_USED] and [constant RENDERING_INFO_BUFFER_MEM_USED].
	rendering_info_video_mem_used = 5
	// Number of pipeline compilations that were triggered by the 2D canvas renderer.
	rendering_info_pipeline_compilations_canvas = 6
	// Number of pipeline compilations that were triggered by loading meshes. These compilations will show up as longer loading times the first time a user runs the game and the pipeline is required.
	rendering_info_pipeline_compilations_mesh = 7
	// Number of pipeline compilations that were triggered by building the surface cache before rendering the scene. These compilations will show up as a stutter when loading an scene the first time a user runs the game and the pipeline is required.
	rendering_info_pipeline_compilations_surface = 8
	// Number of pipeline compilations that were triggered while drawing the scene. These compilations will show up as stutters during gameplay the first time a user runs the game and the pipeline is required.
	rendering_info_pipeline_compilations_draw = 9
	// Number of pipeline compilations that were triggered to optimize the current scene. These compilations are done in the background and should not cause any stutters whatsoever.
	rendering_info_pipeline_compilations_specialization = 10
}

enum RenderingServerShaderMode #

enum RenderingServerShaderMode as i64 {
	// Shader is a 3D shader.
	shader_spatial = 0
	// Shader is a 2D shader.
	shader_canvas_item = 1
	// Shader is a particle shader (can be used in both 2D and 3D).
	shader_particles = 2
	// Shader is a 3D sky shader.
	shader_sky = 3
	// Shader is a 3D fog shader.
	shader_fog = 4
	// Represents the size of the [enum ShaderMode] enum.
	shader_max = 5
}

enum RenderingServerShadowCastingSetting #

enum RenderingServerShadowCastingSetting as i64 {
	// Disable shadows from this instance.
	shadow_casting_setting_off = 0
	// Cast shadows from this instance.
	shadow_casting_setting_on = 1
	// Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows.
	shadow_casting_setting_double_sided = 2
	// Only render the shadows from the object. The object itself will not be drawn.
	shadow_casting_setting_shadows_only = 3
}

enum RenderingServerShadowQuality #

enum RenderingServerShadowQuality as i64 {
	// Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the [member Light3D.shadow_blur] property is ignored if [member Light3D.light_size] and [member Light3D.light_angular_distance] is `0.0`.
	// [b]Note:[/b] The variable shadow blur performed by [member Light3D.light_size] and [member Light3D.light_angular_distance] is still effective when using hard shadow filtering. In this case, [member Light3D.shadow_blur] [i]is[/i] taken into account. However, the results will not be blurred, instead the blur amount is treated as a maximum radius for the penumbra.
	shadow_quality_hard = 0
	// Very low shadow filtering quality (faster). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 0.75× to avoid introducing too much noise. This division only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is `0.0`).
	shadow_quality_soft_very_low = 1
	// Low shadow filtering quality (fast).
	shadow_quality_soft_low = 2
	// Medium low shadow filtering quality (average).
	shadow_quality_soft_medium = 3
	// High low shadow filtering quality (slow). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 1.5× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is `0.0`).
	shadow_quality_soft_high = 4
	// Highest low shadow filtering quality (slowest). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 2× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is `0.0`).
	shadow_quality_soft_ultra = 5
	// Represents the size of the [enum ShadowQuality] enum.
	shadow_quality_max = 6
}

enum RenderingServerSkyMode #

enum RenderingServerSkyMode as i64 {
	// Automatically selects the appropriate process mode based on your sky shader. If your shader uses `TIME` or `POSITION`, this will use [constant SKY_MODE_REALTIME]. If your shader uses any of the `LIGHT_*` variables or any custom uniforms, this uses [constant SKY_MODE_INCREMENTAL]. Otherwise, this defaults to [constant SKY_MODE_QUALITY].
	sky_mode_automatic = 0
	// Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant SKY_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples].
	sky_mode_quality = 1
	// Uses the same high quality importance sampling to process the radiance map as [constant SKY_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/reflections/sky_reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly.
	sky_mode_incremental = 2
	// Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [member ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality].
	// [b]Note:[/b] The fast filtering algorithm is limited to 256×256 cubemaps, so [method sky_set_radiance_size] must be set to `256`. Otherwise, a warning is printed and the overridden radiance size is ignored.
	sky_mode_realtime = 3
}

enum RenderingServerSubSurfaceScatteringQuality #

enum RenderingServerSubSurfaceScatteringQuality as i64 {
	// Disables subsurface scattering entirely, even on materials that have [member BaseMaterial3D.subsurf_scatter_enabled] set to `true`. This has the lowest GPU requirements.
	sub_surface_scattering_quality_disabled = 0
	// Low subsurface scattering quality.
	sub_surface_scattering_quality_low = 1
	// Medium subsurface scattering quality.
	sub_surface_scattering_quality_medium = 2
	// High subsurface scattering quality. This has the highest GPU requirements.
	sub_surface_scattering_quality_high = 3
}

enum RenderingServerTextureLayeredType #

enum RenderingServerTextureLayeredType as i64 {
	// Array of 2-dimensional textures (see [Texture2DArray]).
	texture_layered_2d_array = 0
	// Cubemap texture (see [Cubemap]).
	texture_layered_cubemap = 1
	// Array of cubemap textures (see [CubemapArray]).
	texture_layered_cubemap_array = 2
}

enum RenderingServerTextureType #

enum RenderingServerTextureType as i64 {
	// 2D texture.
	texture_type_2d = 0
	// Layered texture.
	texture_type_layered = 1
	// 3D texture.
	texture_type_3d = 2
}

enum RenderingServerViewportAnisotropicFiltering #

enum RenderingServerViewportAnisotropicFiltering as i64 {
	// Anisotropic filtering is disabled.
	viewport_anisotropy_disabled = 0
	// Use 2× anisotropic filtering.
	viewport_anisotropy_2x = 1
	// Use 4× anisotropic filtering. This is the default value.
	viewport_anisotropy_4x = 2
	// Use 8× anisotropic filtering.
	viewport_anisotropy_8x = 3
	// Use 16× anisotropic filtering.
	viewport_anisotropy_16x = 4
	// Represents the size of the [enum ViewportAnisotropicFiltering] enum.
	viewport_anisotropy_max = 5
}

enum RenderingServerViewportClearMode #

enum RenderingServerViewportClearMode as i64 {
	// Always clear the viewport's render target before drawing.
	viewport_clear_always = 0
	// Never clear the viewport's render target.
	viewport_clear_never = 1
	// Clear the viewport's render target on the next frame, then switch to [constant VIEWPORT_CLEAR_NEVER].
	viewport_clear_only_next_frame = 2
}

enum RenderingServerViewportDebugDraw #

enum RenderingServerViewportDebugDraw as i64 {
	// Debug draw is disabled. Default setting.
	viewport_debug_draw_disabled = 0
	// Objects are displayed without light information.
	viewport_debug_draw_unshaded = 1
	// Objects are displayed with only light information.
	// [b]Note:[/b] When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.
	viewport_debug_draw_lighting = 2
	// Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others.
	// [b]Note:[/b] When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.
	viewport_debug_draw_overdraw = 3
	// Debug draw draws objects in wireframe.
	// [b]Note:[/b] [method set_debug_generate_wireframes] must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer.
	viewport_debug_draw_wireframe = 4
	// Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects.
	viewport_debug_draw_normal_buffer = 5
	// Objects are displayed with only the albedo value from [VoxelGI]s. Requires at least one visible [VoxelGI] node that has been baked to have a visible effect.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_voxel_gi_albedo = 6
	// Objects are displayed with only the lighting value from [VoxelGI]s. Requires at least one visible [VoxelGI] node that has been baked to have a visible effect.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_voxel_gi_lighting = 7
	// Objects are displayed with only the emission color from [VoxelGI]s. Requires at least one visible [VoxelGI] node that has been baked to have a visible effect.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_voxel_gi_emission = 8
	// Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
	viewport_debug_draw_shadow_atlas = 9
	// Draws the shadow atlas that stores shadows from [DirectionalLight3D]s in the upper left quadrant of the [Viewport].
	// The slice of the camera frustum related to the shadow map cascade is superimposed to visualize coverage. The color of each slice matches the colors used for [constant VIEWPORT_DEBUG_DRAW_PSSM_SPLITS]. When shadow cascades are blended the overlap is taken into account when drawing the frustum slices.
	// The last cascade shows all frustum slices to illustrate the coverage of all slices.
	viewport_debug_draw_directional_shadow_atlas = 10
	// Draws the estimated scene luminance. This is a 1×1 texture that is generated when autoexposure is enabled to control the scene's exposure.
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	viewport_debug_draw_scene_luminance = 11
	// Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment].
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_ssao = 12
	// Draws the screen space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssil_enabled] set in your [WorldEnvironment].
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_ssil = 13
	// Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order (from closest to furthest from the camera), they are colored red, green, blue, and yellow.
	// [b]Note:[/b] When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	viewport_debug_draw_pssm_splits = 14
	// Draws the decal atlas that stores decal textures from [Decal]s.
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	viewport_debug_draw_decal_atlas = 15
	// Draws SDFGI cascade data. This is the data structure that is used to bounce lighting against and create reflections.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_sdfgi = 16
	// Draws SDFGI probe data. This is the data structure that is used to give indirect lighting dynamic objects moving within the scene.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_sdfgi_probes = 17
	// Draws the global illumination buffer from [VoxelGI] or SDFGI. Requires [VoxelGI] (at least one visible baked VoxelGI node) or SDFGI ([member Environment.sdfgi_enabled]) to be enabled to have a visible effect.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_gi_buffer = 18
	// Disable mesh LOD. All meshes are drawn with full detail, which can be used to compare performance.
	viewport_debug_draw_disable_lod = 19
	// Draws the [OmniLight3D] cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_cluster_omni_lights = 20
	// Draws the [SpotLight3D] cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_cluster_spot_lights = 21
	// Draws the [Decal] cluster. Clustering determines where decals are positioned in screen-space, which allows the engine to only process these portions of the screen for decals.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_cluster_decals = 22
	// Draws the [ReflectionProbe] cluster. Clustering determines where reflection probes are positioned in screen-space, which allows the engine to only process these portions of the screen for reflection probes.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_cluster_reflection_probes = 23
	// Draws the occlusion culling buffer. This low-resolution occlusion culling buffer is rasterized on the CPU and is used to check whether instances are occluded by other objects.
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	viewport_debug_draw_occluders = 24
	// Draws the motion vectors buffer. This is used by temporal antialiasing to correct for motion that occurs during gameplay.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	viewport_debug_draw_motion_vectors = 25
	// Internal buffer is drawn instead of regular scene so you can see the per-pixel output that will be used by post-processing effects.
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	viewport_debug_draw_internal_buffer = 26
}

enum RenderingServerViewportEnvironmentMode #

enum RenderingServerViewportEnvironmentMode as i64 {
	// Disable rendering of 3D environment over 2D canvas.
	viewport_environment_disabled = 0
	// Enable rendering of 3D environment over 2D canvas.
	viewport_environment_enabled = 1
	// Inherit enable/disable value from parent. If the topmost parent is also set to [constant VIEWPORT_ENVIRONMENT_INHERIT], then this has the same behavior as [constant VIEWPORT_ENVIRONMENT_ENABLED].
	viewport_environment_inherit = 2
	// Represents the size of the [enum ViewportEnvironmentMode] enum.
	viewport_environment_max = 3
}

enum RenderingServerViewportMSAA #

enum RenderingServerViewportMSAA as i64 {
	// Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting.
	viewport_msaa_disabled = 0
	// Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance.
	viewport_msaa_2x = 1
	// Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance.
	viewport_msaa_4x = 2
	// Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high impact on performance. Likely unsupported on low-end and older hardware.
	viewport_msaa_8x = 3
	// Represents the size of the [enum ViewportMSAA] enum.
	viewport_msaa_max = 4
}

enum RenderingServerViewportOcclusionCullingBuildQuality #

enum RenderingServerViewportOcclusionCullingBuildQuality as i64 {
	// Low occlusion culling BVH build quality (as defined by Embree). Results in the lowest CPU usage, but least effective culling.
	viewport_occlusion_build_quality_low = 0
	// Medium occlusion culling BVH build quality (as defined by Embree).
	viewport_occlusion_build_quality_medium = 1
	// High occlusion culling BVH build quality (as defined by Embree). Results in the highest CPU usage, but most effective culling.
	viewport_occlusion_build_quality_high = 2
}

enum RenderingServerViewportRenderInfo #

enum RenderingServerViewportRenderInfo as i64 {
	// Number of objects drawn in a single frame.
	viewport_render_info_objects_in_frame = 0
	// Number of points, lines, or triangles drawn in a single frame.
	viewport_render_info_primitives_in_frame = 1
	// Number of draw calls during this frame.
	viewport_render_info_draw_calls_in_frame = 2
	// Represents the size of the [enum ViewportRenderInfo] enum.
	viewport_render_info_max = 3
}

enum RenderingServerViewportRenderInfoType #

enum RenderingServerViewportRenderInfoType as i64 {
	// Visible render pass (excluding shadows).
	viewport_render_info_type_visible = 0
	// Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits.
	viewport_render_info_type_shadow = 1
	// Canvas item rendering. This includes all 2D rendering.
	viewport_render_info_type_canvas = 2
	// Represents the size of the [enum ViewportRenderInfoType] enum.
	viewport_render_info_type_max = 3
}

enum RenderingServerViewportSDFOversize #

enum RenderingServerViewportSDFOversize as i64 {
	// Do not oversize the 2D signed distance field. Occluders may disappear when touching the viewport's edges, and [GPUParticles3D] collision may stop working earlier than intended. This has the lowest GPU requirements.
	viewport_sdf_oversize_100_percent = 0
	// 2D signed distance field covers 20% of the viewport's size outside the viewport on each side (top, right, bottom, left).
	viewport_sdf_oversize_120_percent = 1
	// 2D signed distance field covers 50% of the viewport's size outside the viewport on each side (top, right, bottom, left).
	viewport_sdf_oversize_150_percent = 2
	// 2D signed distance field covers 100% of the viewport's size outside the viewport on each side (top, right, bottom, left). This has the highest GPU requirements.
	viewport_sdf_oversize_200_percent = 3
	// Represents the size of the [enum ViewportSDFOversize] enum.
	viewport_sdf_oversize_max = 4
}

enum RenderingServerViewportSDFScale #

enum RenderingServerViewportSDFScale as i64 {
	// Full resolution 2D signed distance field scale. This has the highest GPU requirements.
	viewport_sdf_scale_100_percent = 0
	// Half resolution 2D signed distance field scale on each axis (25% of the viewport pixel count).
	viewport_sdf_scale_50_percent = 1
	// Quarter resolution 2D signed distance field scale on each axis (6.25% of the viewport pixel count). This has the lowest GPU requirements.
	viewport_sdf_scale_25_percent = 2
	// Represents the size of the [enum ViewportSDFScale] enum.
	viewport_sdf_scale_max = 3
}

enum RenderingServerViewportScaling3DMode #

enum RenderingServerViewportScaling3DMode as i64 {
	// Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than `1.0` will result in undersampling while values greater than `1.0` will result in supersampling. A value of `1.0` disables scaling.
	viewport_scaling_3d_mode_bilinear = 0
	// Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than `1.0` will result in the viewport being upscaled using FSR. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` disables scaling.
	viewport_scaling_3d_mode_fsr = 1
	// Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than `1.0` will result in the viewport being upscaled using FSR2. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` will use FSR2 at native resolution as a TAA solution.
	viewport_scaling_3d_mode_fsr2 = 2
	// Use MetalFX spatial upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than `1.0` will result in the viewport being upscaled using MetalFX. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` disables scaling.
	// [b]Note:[/b] Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
	viewport_scaling_3d_mode_metalfx_spatial = 3
	// Use MetalFX temporal upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than `1.0` will result in the viewport being upscaled using MetalFX. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` will use MetalFX at native resolution as a TAA solution.
	// [b]Note:[/b] Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
	viewport_scaling_3d_mode_metalfx_temporal = 4
	// Represents the size of the [enum ViewportScaling3DMode] enum.
	viewport_scaling_3d_mode_max = 5
}

enum RenderingServerViewportScreenSpaceAA #

enum RenderingServerViewportScreenSpaceAA as i64 {
	// Do not perform any antialiasing in the full screen post-process.
	viewport_screen_space_aa_disabled = 0
	// Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K.
	viewport_screen_space_aa_fxaa = 1
	// Use subpixel morphological antialiasing. SMAA may produce clearer results than FXAA, but at a slightly higher performance cost.
	viewport_screen_space_aa_smaa = 2
	// Represents the size of the [enum ViewportScreenSpaceAA] enum.
	viewport_screen_space_aa_max = 3
}

enum RenderingServerViewportUpdateMode #

enum RenderingServerViewportUpdateMode as i64 {
	// Do not update the viewport's render target.
	viewport_update_disabled = 0
	// Update the viewport's render target once, then switch to [constant VIEWPORT_UPDATE_DISABLED].
	viewport_update_once = 1
	// Update the viewport's render target only when it is visible. This is the default value.
	viewport_update_when_visible = 2
	// Update the viewport's render target only when its parent is visible.
	viewport_update_when_parent_visible = 3
	// Always update the viewport's render target.
	viewport_update_always = 4
}

enum RenderingServerViewportVRSMode #

enum RenderingServerViewportVRSMode as i64 {
	// Variable rate shading is disabled.
	viewport_vrs_disabled = 0
	// Variable rate shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.
	viewport_vrs_texture = 1
	// Variable rate shading texture is supplied by the primary [XRInterface]. Note that this may override the update mode.
	viewport_vrs_xr = 2
	// Represents the size of the [enum ViewportVRSMode] enum.
	viewport_vrs_max = 3
}

enum RenderingServerViewportVRSUpdateMode #

enum RenderingServerViewportVRSUpdateMode as i64 {
	// The input texture for variable rate shading will not be processed.
	viewport_vrs_update_disabled = 0
	// The input texture for variable rate shading will be processed once.
	viewport_vrs_update_once = 1
	// The input texture for variable rate shading will be processed each frame.
	viewport_vrs_update_always = 2
	// Represents the size of the [enum ViewportVRSUpdateMode] enum.
	viewport_vrs_update_max = 3
}

enum RenderingServerVisibilityRangeFadeMode #

enum RenderingServerVisibilityRangeFadeMode as i64 {
	// Disable visibility range fading for the given instance.
	visibility_range_fade_disabled = 0
	// Fade-out the given instance when it approaches its visibility range limits.
	visibility_range_fade_self = 1
	// Fade-in the given instance's dependencies when reaching its visibility range limits.
	visibility_range_fade_dependencies = 2
}

enum RenderingServerVoxelGIQuality #

enum RenderingServerVoxelGIQuality as i64 {
	// Low [VoxelGI] rendering quality using 4 cones.
	voxel_gi_quality_low = 0
	// High [VoxelGI] rendering quality using 6 cones.
	voxel_gi_quality_high = 1
}

enum ResourceDeepDuplicateMode #

enum ResourceDeepDuplicateMode as i64 {
	// No subresorces at all are duplicated. This is useful even in a deep duplication to have all the arrays and dictionaries duplicated but still pointing to the original resources.
	resource_deep_duplicate_none = 0
	// Only subresources without a path or with a scene-local path will be duplicated.
	resource_deep_duplicate_internal = 1
	// Every subresource found will be duplicated, even if it has a non-local path. In other words, even potentially big resources stored separately will be duplicated.
	resource_deep_duplicate_all = 2
}

enum ResourceFormatLoaderCacheMode #

enum ResourceFormatLoaderCacheMode as i64 {
	// Neither the main resource (the one requested to be loaded) nor any of its subresources are retrieved from cache nor stored into it. Dependencies (external resources) are loaded with [constant CACHE_MODE_REUSE].
	cache_mode_ignore = 0
	// The main resource (the one requested to be loaded), its subresources, and its dependencies (external resources) are retrieved from cache if present, instead of loaded. Those not cached are loaded and then stored into the cache. The same rules are propagated recursively down the tree of dependencies (external resources).
	cache_mode_reuse = 1
	// Like [constant CACHE_MODE_REUSE], but the cache is checked for the main resource (the one requested to be loaded) as well as for each of its subresources. Those already in the cache, as long as the loaded and cached types match, have their data refreshed from storage into the already existing instances. Otherwise, they are recreated as completely new objects.
	cache_mode_replace = 2
	// Like [constant CACHE_MODE_IGNORE], but propagated recursively down the tree of dependencies (external resources).
	cache_mode_ignore_deep = 3
	// Like [constant CACHE_MODE_REPLACE], but propagated recursively down the tree of dependencies (external resources).
	cache_mode_replace_deep = 4
}

enum ResourceImporterImportOrder #

enum ResourceImporterImportOrder as i64 {
	// The default import order.
	import_order_default = 0
	// The import order for scenes, which ensures scenes are imported [i]after[/i] all other core resources such as textures. Custom importers should generally have an import order lower than `100` to avoid issues when importing scenes that rely on custom resources.
	import_order_scene = 100
}

enum ResourceLoaderCacheMode #

enum ResourceLoaderCacheMode as i64 {
	// Neither the main resource (the one requested to be loaded) nor any of its subresources are retrieved from cache nor stored into it. Dependencies (external resources) are loaded with [constant CACHE_MODE_REUSE].
	cache_mode_ignore = 0
	// The main resource (the one requested to be loaded), its subresources, and its dependencies (external resources) are retrieved from cache if present, instead of loaded. Those not cached are loaded and then stored into the cache. The same rules are propagated recursively down the tree of dependencies (external resources).
	cache_mode_reuse = 1
	// Like [constant CACHE_MODE_REUSE], but the cache is checked for the main resource (the one requested to be loaded) as well as for each of its subresources. Those already in the cache, as long as the loaded and cached types match, have their data refreshed from storage into the already existing instances. Otherwise, they are recreated as completely new objects.
	cache_mode_replace = 2
	// Like [constant CACHE_MODE_IGNORE], but propagated recursively down the tree of dependencies (external resources).
	cache_mode_ignore_deep = 3
	// Like [constant CACHE_MODE_REPLACE], but propagated recursively down the tree of dependencies (external resources).
	cache_mode_replace_deep = 4
}

enum ResourceLoaderThreadLoadStatus #

enum ResourceLoaderThreadLoadStatus as i64 {
	// The resource is invalid, or has not been loaded with [method load_threaded_request].
	thread_load_invalid_resource = 0
	// The resource is still being loaded.
	thread_load_in_progress = 1
	// Some error occurred during loading and it failed.
	thread_load_failed = 2
	// The resource was loaded successfully and can be accessed via [method load_threaded_get].
	thread_load_loaded = 3
}

enum ResourceSaverSaverFlags #

enum ResourceSaverSaverFlags as i64 {
	// No resource saving option.
	flag_none = 0
	// Save the resource with a path relative to the scene which uses it.
	flag_relative_paths = 1
	// Bundles external resources.
	flag_bundle_resources = 2
	// Changes the [member Resource.resource_path] of the saved resource to match its new location.
	flag_change_path = 4
	// Do not save editor-specific metadata (identified by their `__editor` prefix).
	flag_omit_editor_properties = 8
	// Save as big endian (see [member FileAccess.big_endian]).
	flag_save_big_endian = 16
	// Compress the resource on save using [constant FileAccess.COMPRESSION_ZSTD]. Only available for binary resource types.
	flag_compress = 32
	// Take over the paths of the saved subresources (see [method Resource.take_over_path]).
	flag_replace_subresource_paths = 64
}

enum RetargetModifier3DTransformFlag #

enum RetargetModifier3DTransformFlag as i64 {
	// If set, allows to retarget the position.
	transform_flag_position = 1
	// If set, allows to retarget the rotation.
	transform_flag_rotation = 2
	// If set, allows to retarget the scale.
	transform_flag_scale = 4
	// If set, allows to retarget the position/rotation/scale.
	transform_flag_all = 7
}

enum RibbonTrailMeshShape #

enum RibbonTrailMeshShape as i64 {
	// Gives the mesh a single flat face.
	shape_flat = 0
	// Gives the mesh two perpendicular flat faces, making a cross shape.
	shape_cross = 1
}

enum RichTextLabelImageUpdateMask #

enum RichTextLabelImageUpdateMask as i64 {
	// If this bit is set, [method update_image] changes image texture.
	update_texture = 1
	// If this bit is set, [method update_image] changes image size.
	update_size = 2
	// If this bit is set, [method update_image] changes image color.
	update_color = 4
	// If this bit is set, [method update_image] changes image inline alignment.
	update_alignment = 8
	// If this bit is set, [method update_image] changes image texture region.
	update_region = 16
	// If this bit is set, [method update_image] changes image padding.
	update_pad = 32
	// If this bit is set, [method update_image] changes image tooltip.
	update_tooltip = 64
	// If this bit is set, [method update_image] changes image width from/to percents.
	update_width_in_percent = 128
}

enum RichTextLabelListType #

enum RichTextLabelListType as i64 {
	// Each list item has a number marker.
	list_numbers = 0
	// Each list item has a letter marker.
	list_letters = 1
	// Each list item has a roman number marker.
	list_roman = 2
	// Each list item has a filled circle marker.
	list_dots = 3
}

enum RichTextLabelMenuItems #

enum RichTextLabelMenuItems as i64 {
	// Copies the selected text.
	menu_copy = 0
	// Selects the whole [RichTextLabel] text.
	menu_select_all = 1
	// Represents the size of the [enum MenuItems] enum.
	menu_max = 2
}

enum RichTextLabelMetaUnderline #

enum RichTextLabelMetaUnderline as i64 {
	// Meta tag does not display an underline, even if [member meta_underlined] is `true`.
	meta_underline_never = 0
	// If [member meta_underlined] is `true`, meta tag always display an underline.
	meta_underline_always = 1
	// If [member meta_underlined] is `true`, meta tag display an underline when the mouse cursor is over it.
	meta_underline_on_hover = 2
}

enum RigidBody2DCCDMode #

enum RigidBody2DCCDMode as i64 {
	// Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
	ccd_mode_disabled = 0
	// Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise.
	ccd_mode_cast_ray = 1
	// Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise.
	ccd_mode_cast_shape = 2
}

enum RigidBody2DCenterOfMassMode #

enum RigidBody2DCenterOfMassMode as i64 {
	// In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass.
	center_of_mass_mode_auto = 0
	// In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position.
	center_of_mass_mode_custom = 1
}

enum RigidBody2DDampMode #

enum RigidBody2DDampMode as i64 {
	// In this mode, the body's damping value is added to any value set in areas or the default value.
	damp_mode_combine = 0
	// In this mode, the body's damping value replaces any value set in areas or the default value.
	damp_mode_replace = 1
}

enum RigidBody2DFreezeMode #

enum RigidBody2DFreezeMode as i64 {
	// Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path.
	freeze_mode_static = 0
	// Kinematic body freeze mode. Similar to [constant FREEZE_MODE_STATIC], but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated.
	freeze_mode_kinematic = 1
}

enum RigidBody3DCenterOfMassMode #

enum RigidBody3DCenterOfMassMode as i64 {
	// In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass.
	center_of_mass_mode_auto = 0
	// In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position.
	center_of_mass_mode_custom = 1
}

enum RigidBody3DDampMode #

enum RigidBody3DDampMode as i64 {
	// In this mode, the body's damping value is added to any value set in areas or the default value.
	damp_mode_combine = 0
	// In this mode, the body's damping value replaces any value set in areas or the default value.
	damp_mode_replace = 1
}

enum RigidBody3DFreezeMode #

enum RigidBody3DFreezeMode as i64 {
	// Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path.
	freeze_mode_static = 0
	// Kinematic body freeze mode. Similar to [constant FREEZE_MODE_STATIC], but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated.
	freeze_mode_kinematic = 1
}

enum SceneReplicationConfigReplicationMode #

enum SceneReplicationConfigReplicationMode as i64 {
	// Do not keep the given property synchronized.
	replication_mode_never = 0
	// Replicate the given property on process by constantly sending updates using unreliable transfer mode.
	replication_mode_always = 1
	// Replicate the given property on process by sending updates using reliable transfer mode when its value changes.
	replication_mode_on_change = 2
}

enum SceneStateGenEditState #

enum SceneStateGenEditState as i64 {
	// If passed to [method PackedScene.instantiate], blocks edits to the scene state.
	gen_edit_state_disabled = 0
	// If passed to [method PackedScene.instantiate], provides inherited scene resources to the local scene.
	// [b]Note:[/b] Only available in editor builds.
	gen_edit_state_instance = 1
	// If passed to [method PackedScene.instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
	// [b]Note:[/b] Only available in editor builds.
	gen_edit_state_main = 2
	// If passed to [method PackedScene.instantiate], it's similar to [constant GEN_EDIT_STATE_MAIN], but for the case where the scene is being instantiated to be the base of another one.
	// [b]Note:[/b] Only available in editor builds.
	gen_edit_state_main_inherited = 3
}

enum SceneTreeGroupCallFlags #

enum SceneTreeGroupCallFlags as i64 {
	// Call nodes within a group with no special behavior (default).
	group_call_default = 0
	// Call nodes within a group in reverse tree hierarchy order (all nested children are called before their respective parent nodes).
	group_call_reverse = 1
	// Call nodes within a group at the end of the current frame (can be either process or physics frame), similar to [method Object.call_deferred].
	group_call_deferred = 2
	// Call nodes within a group only once, even if the call is executed many times in the same frame. Must be combined with [constant GROUP_CALL_DEFERRED] to work.
	// [b]Note:[/b] Different arguments are not taken into account. Therefore, when the same call is executed with different arguments, only the first call will be performed.
	group_call_unique = 4
}

enum ScriptLanguageExtensionCodeCompletionKind #

enum ScriptLanguageExtensionCodeCompletionKind as i64 {
	code_completion_kind_class      = 0
	code_completion_kind_function   = 1
	code_completion_kind_signal     = 2
	code_completion_kind_variable   = 3
	code_completion_kind_member     = 4
	code_completion_kind_enum       = 5
	code_completion_kind_constant   = 6
	code_completion_kind_node_path  = 7
	code_completion_kind_file_path  = 8
	code_completion_kind_plain_text = 9
	code_completion_kind_max        = 10
}

enum ScriptLanguageExtensionCodeCompletionLocation #

enum ScriptLanguageExtensionCodeCompletionLocation as i64 {
	// The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes).
	location_local = 0
	// The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. `0` for the local class, `1` for the parent, `2` for the grandparent, etc.) to store the depth of an option in the class or a parent class.
	location_parent_mask = 256
	// The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons).
	location_other_user_code = 512
	// The option is from other engine code, not covered by the other enum constants - e.g. built-in classes.
	location_other = 1024
}

enum ScriptLanguageExtensionLookupResultType #

enum ScriptLanguageExtensionLookupResultType as i64 {
	lookup_result_script_location       = 0
	lookup_result_class                 = 1
	lookup_result_class_constant        = 2
	lookup_result_class_property        = 3
	lookup_result_class_method          = 4
	lookup_result_class_signal          = 5
	lookup_result_class_enum            = 6
	lookup_result_class_tbd_globalscope = 7
	lookup_result_class_annotation      = 8
	lookup_result_local_constant        = 9
	lookup_result_local_variable        = 10
	lookup_result_max                   = 11
}

enum ScriptLanguageScriptNameCasing #

enum ScriptLanguageScriptNameCasing as i64 {
	script_name_casing_auto        = 0
	script_name_casing_pascal_case = 1
	script_name_casing_snake_case  = 2
	script_name_casing_kebab_case  = 3
	script_name_casing_camel_case  = 4
}

enum ScrollContainerScrollMode #

enum ScrollContainerScrollMode as i64 {
	// Scrolling disabled, scrollbar will be invisible.
	scroll_mode_disabled = 0
	// Scrolling enabled, scrollbar will be visible only if necessary, i.e. container's content is bigger than the container.
	scroll_mode_auto = 1
	// Scrolling enabled, scrollbar will be always visible.
	scroll_mode_show_always = 2
	// Scrolling enabled, scrollbar will be hidden.
	scroll_mode_show_never = 3
	// Combines [constant SCROLL_MODE_AUTO] and [constant SCROLL_MODE_SHOW_ALWAYS]. The scrollbar is only visible if necessary, but the content size is adjusted as if it was always visible. It's useful for ensuring that content size stays the same regardless if the scrollbar is visible.
	scroll_mode_reserve = 4
}

enum ShaderMode #

enum ShaderMode as i64 {
	// Mode used to draw all 3D objects.
	mode_spatial = 0
	// Mode used to draw all 2D objects.
	mode_canvas_item = 1
	// Mode used to calculate particle information on a per-particle basis. Not used for drawing.
	mode_particles = 2
	// Mode used for drawing skies. Only works with shaders attached to [Sky] objects.
	mode_sky = 3
	// Mode used for setting the color and density of volumetric fog effect.
	mode_fog = 4
}

enum Side #

enum Side as i64 {
	// Left side, usually used for [Control] or [StyleBox]-derived classes.
	side_left = 0
	// Top side, usually used for [Control] or [StyleBox]-derived classes.
	side_top = 1
	// Right side, usually used for [Control] or [StyleBox]-derived classes.
	side_right = 2
	// Bottom side, usually used for [Control] or [StyleBox]-derived classes.
	side_bottom = 3
}

enum Skeleton3DModifierCallbackModeProcess #

enum Skeleton3DModifierCallbackModeProcess as i64 {
	// Set a flag to process modification during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]).
	modifier_callback_mode_process_physics = 0
	// Set a flag to process modification during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]).
	modifier_callback_mode_process_idle = 1
	// Do not process modification. Use [method advance] to process the modification manually.
	modifier_callback_mode_process_manual = 2
}

enum SkeletonModifier3DBoneAxis #

enum SkeletonModifier3DBoneAxis as i64 {
	// Enumerated value for the +X axis.
	bone_axis_plus_x = 0
	// Enumerated value for the -X axis.
	bone_axis_minus_x = 1
	// Enumerated value for the +Y axis.
	bone_axis_plus_y = 2
	// Enumerated value for the -Y axis.
	bone_axis_minus_y = 3
	// Enumerated value for the +Z axis.
	bone_axis_plus_z = 4
	// Enumerated value for the -Z axis.
	bone_axis_minus_z = 5
}

enum SkeletonProfileTailDirection #

enum SkeletonProfileTailDirection as i64 {
	// Direction to the average coordinates of bone children.
	tail_direction_average_children = 0
	// Direction to the coordinates of specified bone child.
	tail_direction_specific_child = 1
	// Direction is not calculated.
	tail_direction_end = 2
}

enum SkyProcessMode #

enum SkyProcessMode as i64 {
	// Automatically selects the appropriate process mode based on your sky shader. If your shader uses `TIME` or `POSITION`, this will use [constant PROCESS_MODE_REALTIME]. If your shader uses any of the `LIGHT_*` variables or any custom uniforms, this uses [constant PROCESS_MODE_INCREMENTAL]. Otherwise, this defaults to [constant PROCESS_MODE_QUALITY].
	process_mode_automatic = 0
	// Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples].
	process_mode_quality = 1
	// Uses the same high quality importance sampling to process the radiance map as [constant PROCESS_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/reflections/sky_reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly.
	process_mode_incremental = 2
	// Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [member ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality].
	// [b]Note:[/b] The fast filtering algorithm is limited to 256×256 cubemaps, so [member radiance_size] must be set to [constant RADIANCE_SIZE_256]. Otherwise, a warning is printed and the overridden radiance size is ignored.
	process_mode_realtime = 3
}

enum SkyRadianceSize #

enum SkyRadianceSize as i64 {
	// Radiance texture size is 32×32 pixels.
	radiance_size_32 = 0
	// Radiance texture size is 64×64 pixels.
	radiance_size_64 = 1
	// Radiance texture size is 128×128 pixels.
	radiance_size_128 = 2
	// Radiance texture size is 256×256 pixels.
	radiance_size_256 = 3
	// Radiance texture size is 512×512 pixels.
	radiance_size_512 = 4
	// Radiance texture size is 1024×1024 pixels.
	radiance_size_1024 = 5
	// Radiance texture size is 2048×2048 pixels.
	radiance_size_2048 = 6
	// Represents the size of the [enum RadianceSize] enum.
	radiance_size_max = 7
}

enum SliderJoint3DParam #

enum SliderJoint3DParam as i64 {
	// Constant for accessing [member linear_limit/upper_distance]. The maximum difference between the pivot points on their X axis before damping happens.
	param_linear_limit_upper = 0
	// Constant for accessing [member linear_limit/lower_distance]. The minimum difference between the pivot points on their X axis before damping happens.
	param_linear_limit_lower = 1
	// Constant for accessing [member linear_limit/softness]. A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement.
	param_linear_limit_softness = 2
	// Constant for accessing [member linear_limit/restitution]. The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost.
	param_linear_limit_restitution = 3
	// Constant for accessing [member linear_limit/damping]. The amount of damping once the slider limits are surpassed.
	param_linear_limit_damping = 4
	// Constant for accessing [member linear_motion/softness]. A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement.
	param_linear_motion_softness = 5
	// Constant for accessing [member linear_motion/restitution]. The amount of restitution inside the slider limits.
	param_linear_motion_restitution = 6
	// Constant for accessing [member linear_motion/damping]. The amount of damping inside the slider limits.
	param_linear_motion_damping = 7
	// Constant for accessing [member linear_ortho/softness]. A factor applied to the movement across axes orthogonal to the slider.
	param_linear_orthogonal_softness = 8
	// Constant for accessing [member linear_motion/restitution]. The amount of restitution when movement is across axes orthogonal to the slider.
	param_linear_orthogonal_restitution = 9
	// Constant for accessing [member linear_motion/damping]. The amount of damping when movement is across axes orthogonal to the slider.
	param_linear_orthogonal_damping = 10
	// Constant for accessing [member angular_limit/upper_angle]. The upper limit of rotation in the slider.
	param_angular_limit_upper = 11
	// Constant for accessing [member angular_limit/lower_angle]. The lower limit of rotation in the slider.
	param_angular_limit_lower = 12
	// Constant for accessing [member angular_limit/softness]. A factor applied to the all rotation once the limit is surpassed.
	param_angular_limit_softness = 13
	// Constant for accessing [member angular_limit/restitution]. The amount of restitution of the rotation when the limit is surpassed.
	param_angular_limit_restitution = 14
	// Constant for accessing [member angular_limit/damping]. The amount of damping of the rotation when the limit is surpassed.
	param_angular_limit_damping = 15
	// Constant for accessing [member angular_motion/softness]. A factor applied to the all rotation in the limits.
	param_angular_motion_softness = 16
	// Constant for accessing [member angular_motion/restitution]. The amount of restitution of the rotation in the limits.
	param_angular_motion_restitution = 17
	// Constant for accessing [member angular_motion/damping]. The amount of damping of the rotation in the limits.
	param_angular_motion_damping = 18
	// Constant for accessing [member angular_ortho/softness]. A factor applied to the all rotation across axes orthogonal to the slider.
	param_angular_orthogonal_softness = 19
	// Constant for accessing [member angular_ortho/restitution]. The amount of restitution of the rotation across axes orthogonal to the slider.
	param_angular_orthogonal_restitution = 20
	// Constant for accessing [member angular_ortho/damping]. The amount of damping of the rotation across axes orthogonal to the slider.
	param_angular_orthogonal_damping = 21
	// Represents the size of the [enum Param] enum.
	param_max = 22
}

enum SliderTickPosition #

enum SliderTickPosition as i64 {
	// Places the ticks at the bottom of the [HSlider], or right of the [VSlider].
	tick_position_bottom_right = 0
	// Places the ticks at the top of the [HSlider], or left of the [VSlider].
	tick_position_top_left = 1
	// Places the ticks at the both sides of the slider.
	tick_position_both = 2
	// Places the ticks at the center of the slider.
	tick_position_center = 3
}

enum SoftBody3DDisableMode #

enum SoftBody3DDisableMode as i64 {
	// When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [SoftBody3D].
	// Automatically re-added to the physics simulation when the [Node] is processed again.
	disable_mode_remove = 0
	// When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation.
	disable_mode_keep_active = 1
}

enum SplitContainerDraggerVisibility #

enum SplitContainerDraggerVisibility as i64 {
	// The split dragger icon is always visible when [theme_item autohide] is `false`, otherwise visible only when the cursor hovers it.
	// The size of the grabber icon determines the minimum [theme_item separation].
	// The dragger icon is automatically hidden if the length of the grabber icon is longer than the split bar.
	dragger_visible = 0
	// The split dragger icon is never visible regardless of the value of [theme_item autohide].
	// The size of the grabber icon determines the minimum [theme_item separation].
	dragger_hidden = 1
	// The split dragger icon is not visible, and the split bar is collapsed to zero thickness.
	dragger_hidden_collapsed = 2
}

enum SpringBoneSimulator3DBoneDirection #

enum SpringBoneSimulator3DBoneDirection as i64 {
	// Enumerated value for the +X axis.
	bone_direction_plus_x = 0
	// Enumerated value for the -X axis.
	bone_direction_minus_x = 1
	// Enumerated value for the +Y axis.
	bone_direction_plus_y = 2
	// Enumerated value for the -Y axis.
	bone_direction_minus_y = 3
	// Enumerated value for the +Z axis.
	bone_direction_plus_z = 4
	// Enumerated value for the -Z axis.
	bone_direction_minus_z = 5
	// Enumerated value for the axis from a parent bone to the child bone.
	bone_direction_from_parent = 6
}

enum SpringBoneSimulator3DCenterFrom #

enum SpringBoneSimulator3DCenterFrom as i64 {
	// The world origin is defined as center.
	center_from_world_origin = 0
	// The [Node3D] specified by [method set_center_node] is defined as center.
	// If [Node3D] is not found, the parent [Skeleton3D] is treated as center.
	center_from_node = 1
	// The bone pose origin of the parent [Skeleton3D] specified by [method set_center_bone] is defined as center.
	// If [Node3D] is not found, the parent [Skeleton3D] is treated as center.
	center_from_bone = 2
}

enum SpringBoneSimulator3DRotationAxis #

enum SpringBoneSimulator3DRotationAxis as i64 {
	// Enumerated value for the rotation of the X axis.
	rotation_axis_x = 0
	// Enumerated value for the rotation of the Y axis.
	rotation_axis_y = 1
	// Enumerated value for the rotation of the Z axis.
	rotation_axis_z = 2
	// Enumerated value for the unconstrained rotation.
	rotation_axis_all = 3
	// Enumerated value for an optional rotation axis. See also [method set_joint_rotation_axis_vector].
	rotation_axis_custom = 4
}

enum SpriteBase3DAlphaCutMode #

enum SpriteBase3DAlphaCutMode as i64 {
	// This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping.
	alpha_cut_disabled = 0
	// This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa]). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i].
	alpha_cut_discard = 1
	// This mode draws fully opaque pixels in the depth prepass. This is slower than [constant ALPHA_CUT_DISABLED] or [constant ALPHA_CUT_DISCARD], but it allows displaying translucent areas and smooth edges while using proper sorting.
	alpha_cut_opaque_prepass = 2
	// This mode draws cuts off all values below a spatially-deterministic threshold, the rest will remain opaque.
	alpha_cut_hash = 3
}

enum SpriteBase3DDrawFlags #

enum SpriteBase3DDrawFlags as i64 {
	// If set, the texture's transparency and the opacity are used to make those parts of the sprite invisible.
	flag_transparent = 0
	// If set, lights in the environment affect the sprite.
	flag_shaded = 1
	// If set, texture can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
	flag_double_sided = 2
	// Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
	flag_disable_depth_test = 3
	// Label is scaled by depth so that it always appears the same size on screen.
	flag_fixed_size = 4
	// Represents the size of the [enum DrawFlags] enum.
	flag_max = 5
}

enum StreamPeerTCPStatus #

enum StreamPeerTCPStatus as i64 {
	// The initial status of the [StreamPeerTCP]. This is also the status after disconnecting.
	status_none = 0
	// A status representing a [StreamPeerTCP] that is connecting to a host.
	status_connecting = 1
	// A status representing a [StreamPeerTCP] that is connected to a host.
	status_connected = 2
	// A status representing a [StreamPeerTCP] in error state.
	status_error = 3
}

enum StreamPeerTLSStatus #

enum StreamPeerTLSStatus as i64 {
	// A status representing a [StreamPeerTLS] that is disconnected.
	status_disconnected = 0
	// A status representing a [StreamPeerTLS] during handshaking.
	status_handshaking = 1
	// A status representing a [StreamPeerTLS] that is connected to a host.
	status_connected = 2
	// A status representing a [StreamPeerTLS] in error state.
	status_error = 3
	// An error status that shows a mismatch in the TLS certificate domain presented by the host and the domain requested for validation.
	status_error_hostname_mismatch = 4
}

enum StyleBoxTextureAxisStretchMode #

enum StyleBoxTextureAxisStretchMode as i64 {
	// Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly.
	axis_stretch_mode_stretch = 0
	// Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system.
	axis_stretch_mode_tile = 1
	// Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike [constant AXIS_STRETCH_MODE_TILE], the texture may be slightly stretched to make the nine-patch texture tile seamlessly.
	axis_stretch_mode_tile_fit = 2
}

enum SubViewportClearMode #

enum SubViewportClearMode as i64 {
	// Always clear the render target before drawing.
	clear_mode_always = 0
	// Never clear the render target.
	clear_mode_never = 1
	// Clear the render target on the next frame, then switch to [constant CLEAR_MODE_NEVER].
	clear_mode_once = 2
}

enum SubViewportUpdateMode #

enum SubViewportUpdateMode as i64 {
	// Do not update the render target.
	update_disabled = 0
	// Update the render target once, then switch to [constant UPDATE_DISABLED].
	update_once = 1
	// Update the render target only when it is visible. This is the default value.
	update_when_visible = 2
	// Update the render target only when its parent is visible.
	update_when_parent_visible = 3
	// Always update the render target.
	update_always = 4
}

enum SurfaceToolCustomFormat #

enum SurfaceToolCustomFormat as i64 {
	// Limits range of data passed to [method set_custom] to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM].
	custom_rgba8_unorm = 0
	// Limits range of data passed to [method set_custom] to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM].
	custom_rgba8_snorm = 1
	// Stores data passed to [method set_custom] as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF].
	custom_rg_half = 2
	// Stores data passed to [method set_custom] as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF].
	custom_rgba_half = 3
	// Stores data passed to [method set_custom] as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT].
	custom_r_float = 4
	// Stores data passed to [method set_custom] as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT].
	custom_rg_float = 5
	// Stores data passed to [method set_custom] as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT].
	custom_rgb_float = 6
	// Stores data passed to [method set_custom] as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT].
	custom_rgba_float = 7
	// Used to indicate a disabled custom channel.
	custom_max = 8
}

enum SurfaceToolSkinWeightCount #

enum SurfaceToolSkinWeightCount as i64 {
	// Each individual vertex can be influenced by only 4 bone weights.
	skin_4_weights = 0
	// Each individual vertex can be influenced by up to 8 bone weights.
	skin_8_weights = 1
}

enum TabBarAlignmentMode #

enum TabBarAlignmentMode as i64 {
	// Places tabs to the left.
	alignment_left = 0
	// Places tabs in the middle.
	alignment_center = 1
	// Places tabs to the right.
	alignment_right = 2
	// Represents the size of the [enum AlignmentMode] enum.
	alignment_max = 3
}

enum TabBarCloseButtonDisplayPolicy #

enum TabBarCloseButtonDisplayPolicy as i64 {
	// Never show the close buttons.
	close_button_show_never = 0
	// Only show the close button on the currently active tab.
	close_button_show_active_only = 1
	// Show the close button on all tabs.
	close_button_show_always = 2
	// Represents the size of the [enum CloseButtonDisplayPolicy] enum.
	close_button_max = 3
}

enum TabContainerTabPosition #

enum TabContainerTabPosition as i64 {
	// Places the tab bar at the top.
	position_top = 0
	// Places the tab bar at the bottom. The tab bar's [StyleBox] will be flipped vertically.
	position_bottom = 1
	// Represents the size of the [enum TabPosition] enum.
	position_max = 2
}

enum TextEditCaretType #

enum TextEditCaretType as i64 {
	// Vertical line caret.
	caret_type_line = 0
	// Block caret.
	caret_type_block = 1
}

enum TextEditEditAction #

enum TextEditEditAction as i64 {
	// No current action.
	action_none = 0
	// A typing action.
	action_typing = 1
	// A backwards delete action.
	action_backspace = 2
	// A forward delete action.
	action_delete = 3
}

enum TextEditGutterType #

enum TextEditGutterType as i64 {
	// When a gutter is set to string using [method set_gutter_type], it is used to contain text set via the [method set_line_gutter_text] method.
	gutter_type_string = 0
	// When a gutter is set to icon using [method set_gutter_type], it is used to contain an icon set via the [method set_line_gutter_icon] method.
	gutter_type_icon = 1
	// When a gutter is set to custom using [method set_gutter_type], it is used to contain custom visuals controlled by a callback method set via the [method set_gutter_custom_draw] method.
	gutter_type_custom = 2
}

enum TextEditLineWrappingMode #

enum TextEditLineWrappingMode as i64 {
	// Line wrapping is disabled.
	line_wrapping_none = 0
	// Line wrapping occurs at the control boundary, beyond what would normally be visible.
	line_wrapping_boundary = 1
}

enum TextEditMenuItems #

enum TextEditMenuItems as i64 {
	// Cuts (copies and clears) the selected text.
	menu_cut = 0
	// Copies the selected text.
	menu_copy = 1
	// Pastes the clipboard text over the selected text (or at the cursor's position).
	menu_paste = 2
	// Erases the whole [TextEdit] text.
	menu_clear = 3
	// Selects the whole [TextEdit] text.
	menu_select_all = 4
	// Undoes the previous action.
	menu_undo = 5
	// Redoes the previous action.
	menu_redo = 6
	// ID of "Text Writing Direction" submenu.
	menu_submenu_text_dir = 7
	// Sets text direction to inherited.
	menu_dir_inherited = 8
	// Sets text direction to automatic.
	menu_dir_auto = 9
	// Sets text direction to left-to-right.
	menu_dir_ltr = 10
	// Sets text direction to right-to-left.
	menu_dir_rtl = 11
	// Toggles control character display.
	menu_display_ucc = 12
	// ID of "Insert Control Character" submenu.
	menu_submenu_insert_ucc = 13
	// Inserts left-to-right mark (LRM) character.
	menu_insert_lrm = 14
	// Inserts right-to-left mark (RLM) character.
	menu_insert_rlm = 15
	// Inserts start of left-to-right embedding (LRE) character.
	menu_insert_lre = 16
	// Inserts start of right-to-left embedding (RLE) character.
	menu_insert_rle = 17
	// Inserts start of left-to-right override (LRO) character.
	menu_insert_lro = 18
	// Inserts start of right-to-left override (RLO) character.
	menu_insert_rlo = 19
	// Inserts pop direction formatting (PDF) character.
	menu_insert_pdf = 20
	// Inserts Arabic letter mark (ALM) character.
	menu_insert_alm = 21
	// Inserts left-to-right isolate (LRI) character.
	menu_insert_lri = 22
	// Inserts right-to-left isolate (RLI) character.
	menu_insert_rli = 23
	// Inserts first strong isolate (FSI) character.
	menu_insert_fsi = 24
	// Inserts pop direction isolate (PDI) character.
	menu_insert_pdi = 25
	// Inserts zero width joiner (ZWJ) character.
	menu_insert_zwj = 26
	// Inserts zero width non-joiner (ZWNJ) character.
	menu_insert_zwnj = 27
	// Inserts word joiner (WJ) character.
	menu_insert_wj = 28
	// Inserts soft hyphen (SHY) character.
	menu_insert_shy = 29
	// Opens system emoji and symbol picker.
	menu_emoji_and_symbol = 30
	// Represents the size of the [enum MenuItems] enum.
	menu_max = 31
}

enum TextEditSearchFlags #

enum TextEditSearchFlags as i64 {
	// Match case when searching.
	search_match_case = 1
	// Match whole words when searching.
	search_whole_words = 2
	// Search from end to beginning.
	search_backwards = 4
}

enum TextEditSelectionMode #

enum TextEditSelectionMode as i64 {
	// Not selecting.
	selection_mode_none = 0
	// Select as if `shift` is pressed.
	selection_mode_shift = 1
	// Select single characters as if the user single clicked.
	selection_mode_pointer = 2
	// Select whole words as if the user double clicked.
	selection_mode_word = 3
	// Select whole lines as if the user triple clicked.
	selection_mode_line = 4
}

enum TextServerAutowrapMode #

enum TextServerAutowrapMode as i64 {
	// Autowrap is disabled.
	autowrap_off = 0
	// Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
	autowrap_arbitrary = 1
	// Wraps the text inside the node's bounding rectangle by soft-breaking between words.
	autowrap_word = 2
	// Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
	autowrap_word_smart = 3
}

enum TextServerContourPointTag #

enum TextServerContourPointTag as i64 {
	// Contour point is on the curve.
	contour_curve_tag_on = 1
	// Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
	contour_curve_tag_off_conic = 0
	// Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
	contour_curve_tag_off_cubic = 2
}

enum TextServerDirection #

enum TextServerDirection as i64 {
	// Text direction is determined based on contents and current locale.
	direction_auto = 0
	// Text is written from left to right.
	direction_ltr = 1
	// Text is written from right to left.
	direction_rtl = 2
	// Text writing direction is the same as base string writing direction. Used for BiDi override only.
	direction_inherited = 3
}

enum TextServerFeature #

enum TextServerFeature as i64 {
	// TextServer supports simple text layouts.
	feature_simple_layout = 1
	// TextServer supports bidirectional text layouts.
	feature_bidi_layout = 2
	// TextServer supports vertical layouts.
	feature_vertical_layout = 4
	// TextServer supports complex text shaping.
	feature_shaping = 8
	// TextServer supports justification using kashidas.
	feature_kashida_justification = 16
	// TextServer supports complex line/word breaking rules (e.g. dictionary based).
	feature_break_iterators = 32
	// TextServer supports loading bitmap fonts.
	feature_font_bitmap = 64
	// TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts.
	feature_font_dynamic = 128
	// TextServer supports multichannel signed distance field dynamic font rendering.
	feature_font_msdf = 256
	// TextServer supports loading system fonts.
	feature_font_system = 512
	// TextServer supports variable fonts.
	feature_font_variable = 1024
	// TextServer supports locale dependent and context sensitive case conversion.
	feature_context_sensitive_case_conversion = 2048
	// TextServer require external data file for some features, see [method load_support_data].
	feature_use_support_data = 4096
	// TextServer supports UAX #31 identifier validation, see [method is_valid_identifier].
	feature_unicode_identifiers = 8192
	// TextServer supports [url=https://unicode.org/reports/tr36/]Unicode Technical Report #36[/url] and [url=https://unicode.org/reports/tr39/]Unicode Technical Standard #39[/url] based spoof detection features.
	feature_unicode_security = 16384
}

enum TextServerFixedSizeScaleMode #

enum TextServerFixedSizeScaleMode as i64 {
	// Bitmap font is not scaled.
	fixed_size_scale_disable = 0
	// Bitmap font is scaled to the closest integer multiple of the font's fixed size. This is the recommended option for pixel art fonts.
	fixed_size_scale_integer_only = 1
	// Bitmap font is scaled to an arbitrary (fractional) size. This is the recommended option for non-pixel art fonts.
	fixed_size_scale_enabled = 2
}

enum TextServerFontAntialiasing #

enum TextServerFontAntialiasing as i64 {
	// Font glyphs are rasterized as 1-bit bitmaps.
	font_antialiasing_none = 0
	// Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
	font_antialiasing_gray = 1
	// Font glyphs are rasterized for LCD screens.
	// LCD subpixel layout is determined by the value of the [member ProjectSettings.gui/theme/lcd_subpixel_layout] setting.
	// LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
	font_antialiasing_lcd = 2
}

enum TextServerFontLCDSubpixelLayout #

enum TextServerFontLCDSubpixelLayout as i64 {
	// Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
	font_lcd_subpixel_layout_none = 0
	// Horizontal RGB subpixel layout.
	font_lcd_subpixel_layout_hrgb = 1
	// Horizontal BGR subpixel layout.
	font_lcd_subpixel_layout_hbgr = 2
	// Vertical RGB subpixel layout.
	font_lcd_subpixel_layout_vrgb = 3
	// Vertical BGR subpixel layout.
	font_lcd_subpixel_layout_vbgr = 4
	// Represents the size of the [enum FontLCDSubpixelLayout] enum.
	font_lcd_subpixel_layout_max = 5
}

enum TextServerFontStyle #

enum TextServerFontStyle as i64 {
	// Font is bold.
	font_bold = 1
	// Font is italic or oblique.
	font_italic = 2
	// Font has fixed-width characters (also known as monospace).
	font_fixed_width = 4
}

enum TextServerGraphemeFlag #

enum TextServerGraphemeFlag as i64 {
	// Grapheme is supported by the font, and can be drawn.
	grapheme_is_valid = 1
	// Grapheme is part of right-to-left or bottom-to-top run.
	grapheme_is_rtl = 2
	// Grapheme is not part of source text, it was added by justification process.
	grapheme_is_virtual = 4
	// Grapheme is whitespace.
	grapheme_is_space = 8
	// Grapheme is mandatory break point (e.g. `"\n"`).
	grapheme_is_break_hard = 16
	// Grapheme is optional break point (e.g. space).
	grapheme_is_break_soft = 32
	// Grapheme is the tabulation character.
	grapheme_is_tab = 64
	// Grapheme is kashida.
	grapheme_is_elongation = 128
	// Grapheme is punctuation character.
	grapheme_is_punctuation = 256
	// Grapheme is underscore character.
	grapheme_is_underscore = 512
	// Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
	grapheme_is_connected = 1024
	// It is safe to insert a U+0640 before this grapheme for elongation.
	grapheme_is_safe_to_insert_tatweel = 2048
	// Grapheme is an object replacement character for the embedded object.
	grapheme_is_embedded_object = 4096
	// Grapheme is a soft hyphen.
	grapheme_is_soft_hyphen = 8192
}

enum TextServerHinting #

enum TextServerHinting as i64 {
	// Disables font hinting (smoother but less crisp).
	hinting_none = 0
	// Use the light font hinting mode.
	hinting_light = 1
	// Use the default font hinting mode (crisper but less smooth).
	// [b]Note:[/b] This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
	hinting_normal = 2
}

enum TextServerJustificationFlag #

enum TextServerJustificationFlag as i64 {
	// Do not justify text.
	justification_none = 0
	// Justify text by adding and removing kashidas.
	justification_kashida = 1
	// Justify text by changing width of the spaces between the words.
	justification_word_bound = 2
	// Remove trailing and leading spaces from the justified text.
	justification_trim_edge_spaces = 4
	// Only apply justification to the part of the text after the last tab.
	justification_after_last_tab = 8
	// Apply justification to the trimmed line with ellipsis.
	justification_constrain_ellipsis = 16
	// Do not apply justification to the last line of the paragraph.
	justification_skip_last_line = 32
	// Do not apply justification to the last line of the paragraph with visible characters (takes precedence over [constant JUSTIFICATION_SKIP_LAST_LINE]).
	justification_skip_last_line_with_visible_chars = 64
	// Always apply justification to the paragraphs with a single line ([constant JUSTIFICATION_SKIP_LAST_LINE] and [constant JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS] are ignored).
	justification_do_not_skip_single_line = 128
}

enum TextServerLineBreakFlag #

enum TextServerLineBreakFlag as i64 {
	// Do not break the line.
	break_none = 0
	// Break the line at the line mandatory break characters (e.g. `"\n"`).
	break_mandatory = 1
	// Break the line between the words.
	break_word_bound = 2
	// Break the line between any unconnected graphemes.
	break_grapheme_bound = 4
	// Should be used only in conjunction with [constant BREAK_WORD_BOUND], break the line between any unconnected graphemes, if it's impossible to break it between the words.
	break_adaptive = 8
	// Remove edge spaces from the broken line segments.
	break_trim_edge_spaces = 16
	// Subtract first line indentation width from all lines after the first one.
	break_trim_indent = 32
	// Remove spaces and line break characters from the start of broken line segments.
	// E.g, after line breaking, the second segment of the following text `test  \n  next`, is `next` if the flag is set, and `  next` if it is not.
	break_trim_start_edge_spaces = 64
	// Remove spaces and line break characters from the end of broken line segments.
	// E.g, after line breaking, the first segment of the following text `test  \n  next`, is `test` if the flag is set, and `test  \n` if it is not.
	break_trim_end_edge_spaces = 128
}

enum TextServerOrientation #

enum TextServerOrientation as i64 {
	// Text is written horizontally.
	orientation_horizontal = 0
	// Left to right text is written vertically from top to bottom.
	// Right to left text is written vertically from bottom to top.
	orientation_vertical = 1
}

enum TextServerOverrunBehavior #

enum TextServerOverrunBehavior as i64 {
	// No text trimming is performed.
	overrun_no_trimming = 0
	// Trims the text per character.
	overrun_trim_char = 1
	// Trims the text per word.
	overrun_trim_word = 2
	// Trims the text per character and adds an ellipsis to indicate that parts are hidden if trimmed text is 6 characters or longer.
	overrun_trim_ellipsis = 3
	// Trims the text per word and adds an ellipsis to indicate that parts are hidden if trimmed text is 6 characters or longer.
	overrun_trim_word_ellipsis = 4
	// Trims the text per character and adds an ellipsis to indicate that parts are hidden regardless of trimmed text length.
	overrun_trim_ellipsis_force = 5
	// Trims the text per word and adds an ellipsis to indicate that parts are hidden regardless of trimmed text length.
	overrun_trim_word_ellipsis_force = 6
}

enum TextServerSpacingType #

enum TextServerSpacingType as i64 {
	// Spacing for each glyph.
	spacing_glyph = 0
	// Spacing for the space character.
	spacing_space = 1
	// Spacing at the top of the line.
	spacing_top = 2
	// Spacing at the bottom of the line.
	spacing_bottom = 3
	// Represents the size of the [enum SpacingType] enum.
	spacing_max = 4
}

enum TextServerStructuredTextParser #

enum TextServerStructuredTextParser as i64 {
	// Use default Unicode BiDi algorithm.
	structured_text_default = 0
	// BiDi override for URI.
	structured_text_uri = 1
	// BiDi override for file path.
	structured_text_file = 2
	// BiDi override for email.
	structured_text_email = 3
	// BiDi override for lists. Structured text options: list separator [String].
	structured_text_list = 4
	// BiDi override for GDScript.
	structured_text_gdscript = 5
	// User defined structured text BiDi override function.
	structured_text_custom = 6
}

enum TextServerSubpixelPositioning #

enum TextServerSubpixelPositioning as i64 {
	// Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
	subpixel_positioning_disabled = 0
	// Glyph horizontal position is rounded based on font size.
	// - To one quarter of the pixel size if font size is smaller or equal to [constant SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE].
	// - To one half of the pixel size if font size is smaller or equal to [constant SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE].
	// - To the whole pixel size for larger fonts.
	subpixel_positioning_auto = 1
	// Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times.
	subpixel_positioning_one_half = 2
	// Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
	subpixel_positioning_one_quarter = 3
	// Maximum font size which will use "one half of the pixel" subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.
	subpixel_positioning_one_half_max_size = 20
	// Maximum font size which will use "one quarter of the pixel" subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.
	subpixel_positioning_one_quarter_max_size = 16
}

enum TextServerTextOverrunFlag #

enum TextServerTextOverrunFlag as i64 {
	// No trimming is performed.
	overrun_no_trim = 0
	// Trims the text when it exceeds the given width.
	overrun_trim = 1
	// Trims the text per word instead of per grapheme.
	overrun_trim_word_only = 2
	// Determines whether an ellipsis should be added at the end of the text.
	overrun_add_ellipsis = 4
	// Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
	overrun_enforce_ellipsis = 8
	// Accounts for the text being justified before attempting to trim it (see [enum JustificationFlag]).
	overrun_justification_aware = 16
}

enum TextServerVisibleCharactersBehavior #

enum TextServerVisibleCharactersBehavior as i64 {
	// Trims text before the shaping. e.g, increasing [member Label.visible_characters] or [member RichTextLabel.visible_characters] value is visually identical to typing the text.
	// [b]Note:[/b] In this mode, trimmed text is not processed at all. It is not accounted for in line breaking and size calculations.
	vc_chars_before_shaping = 0
	// Displays glyphs that are mapped to the first [member Label.visible_characters] or [member RichTextLabel.visible_characters] characters from the beginning of the text.
	vc_chars_after_shaping = 1
	// Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
	vc_glyphs_auto = 2
	// Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left.
	vc_glyphs_ltr = 3
	// Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the right.
	vc_glyphs_rtl = 4
}

enum TextureButtonStretchMode #

enum TextureButtonStretchMode as i64 {
	// Scale to fit the node's bounding rectangle.
	stretch_scale = 0
	// Tile inside the node's bounding rectangle.
	stretch_tile = 1
	// The texture keeps its original size and stays in the bounding rectangle's top-left corner.
	stretch_keep = 2
	// The texture keeps its original size and stays centered in the node's bounding rectangle.
	stretch_keep_centered = 3
	// Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.
	stretch_keep_aspect = 4
	// Scale the texture to fit the node's bounding rectangle, center it, and maintain its aspect ratio.
	stretch_keep_aspect_centered = 5
	// Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.
	stretch_keep_aspect_covered = 6
}

enum TextureLayeredLayeredType #

enum TextureLayeredLayeredType as i64 {
	// Texture is a generic [Texture2DArray].
	layered_type_2d_array = 0
	// Texture is a [Cubemap], with each side in its own layer (6 in total).
	layered_type_cubemap = 1
	// Texture is a [CubemapArray], with each cubemap being made of 6 layers.
	layered_type_cubemap_array = 2
}

enum TextureProgressBarFillMode #

enum TextureProgressBarFillMode as i64 {
	// The [member texture_progress] fills from left to right.
	fill_left_to_right = 0
	// The [member texture_progress] fills from right to left.
	fill_right_to_left = 1
	// The [member texture_progress] fills from top to bottom.
	fill_top_to_bottom = 2
	// The [member texture_progress] fills from bottom to top.
	fill_bottom_to_top = 3
	// Turns the node into a radial bar. The [member texture_progress] fills clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
	fill_clockwise = 4
	// Turns the node into a radial bar. The [member texture_progress] fills counterclockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
	fill_counter_clockwise = 5
	// The [member texture_progress] fills from the center, expanding both towards the left and the right.
	fill_bilinear_left_and_right = 6
	// The [member texture_progress] fills from the center, expanding both towards the top and the bottom.
	fill_bilinear_top_and_bottom = 7
	// Turns the node into a radial bar. The [member texture_progress] fills radially from the center, expanding both clockwise and counterclockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
	fill_clockwise_and_counter_clockwise = 8
}

enum TextureRectExpandMode #

enum TextureRectExpandMode as i64 {
	// The minimum size will be equal to texture size, i.e. [TextureRect] can't be smaller than the texture.
	expand_keep_size = 0
	// The size of the texture won't be considered for minimum size calculation, so the [TextureRect] can be shrunk down past the texture size.
	expand_ignore_size = 1
	// The height of the texture will be ignored. Minimum width will be equal to the current height. Useful for horizontal layouts, e.g. inside [HBoxContainer].
	expand_fit_width = 2
	// Same as [constant EXPAND_FIT_WIDTH], but keeps texture's aspect ratio.
	expand_fit_width_proportional = 3
	// The width of the texture will be ignored. Minimum height will be equal to the current width. Useful for vertical layouts, e.g. inside [VBoxContainer].
	expand_fit_height = 4
	// Same as [constant EXPAND_FIT_HEIGHT], but keeps texture's aspect ratio.
	expand_fit_height_proportional = 5
}

enum TextureRectStretchMode #

enum TextureRectStretchMode as i64 {
	// Scale to fit the node's bounding rectangle.
	stretch_scale = 0
	// Tile inside the node's bounding rectangle.
	stretch_tile = 1
	// The texture keeps its original size and stays in the bounding rectangle's top-left corner.
	stretch_keep = 2
	// The texture keeps its original size and stays centered in the node's bounding rectangle.
	stretch_keep_centered = 3
	// Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.
	stretch_keep_aspect = 4
	// Scale the texture to fit the node's bounding rectangle, center it and maintain its aspect ratio.
	stretch_keep_aspect_centered = 5
	// Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.
	stretch_keep_aspect_covered = 6
}

enum ThemeDataType #

enum ThemeDataType as i64 {
	// Theme's [Color] item type.
	data_type_color = 0
	// Theme's constant item type.
	data_type_constant = 1
	// Theme's [Font] item type.
	data_type_font = 2
	// Theme's font size item type.
	data_type_font_size = 3
	// Theme's icon [Texture2D] item type.
	data_type_icon = 4
	// Theme's [StyleBox] item type.
	data_type_stylebox = 5
	// Maximum value for the DataType enum.
	data_type_max = 6
}

enum ThreadPriority #

enum ThreadPriority as i64 {
	// A thread running with lower priority than normally.
	priority_low = 0
	// A thread with a standard priority.
	priority_normal = 1
	// A thread running with higher priority than normally.
	priority_high = 2
}

enum TileMapLayerDebugVisibilityMode #

enum TileMapLayerDebugVisibilityMode as i64 {
	// Hide the collisions or navigation debug shapes in the editor, and use the debug settings to determine their visibility in game (i.e. [member SceneTree.debug_collisions_hint] or [member SceneTree.debug_navigation_hint]).
	debug_visibility_mode_default = 0
	// Always hide the collisions or navigation debug shapes.
	debug_visibility_mode_force_hide = 2
	// Always show the collisions or navigation debug shapes.
	debug_visibility_mode_force_show = 1
}

enum TileMapVisibilityMode #

enum TileMapVisibilityMode as i64 {
	// Use the debug settings to determine visibility.
	visibility_mode_default = 0
	// Always hide.
	visibility_mode_force_hide = 2
	// Always show.
	visibility_mode_force_show = 1
}

enum TileSetAtlasSourceTileAnimationMode #

enum TileSetAtlasSourceTileAnimationMode as i64 {
	// Tile animations start at same time, looking identical.
	tile_animation_mode_default = 0
	// Tile animations start at random times, looking varied.
	tile_animation_mode_random_start_times = 1
	// Represents the size of the [enum TileAnimationMode] enum.
	tile_animation_mode_max = 2
}

enum TileSetCellNeighbor #

enum TileSetCellNeighbor as i64 {
	// Neighbor on the right side.
	cell_neighbor_right_side = 0
	// Neighbor in the right corner.
	cell_neighbor_right_corner = 1
	// Neighbor on the bottom right side.
	cell_neighbor_bottom_right_side = 2
	// Neighbor in the bottom right corner.
	cell_neighbor_bottom_right_corner = 3
	// Neighbor on the bottom side.
	cell_neighbor_bottom_side = 4
	// Neighbor in the bottom corner.
	cell_neighbor_bottom_corner = 5
	// Neighbor on the bottom left side.
	cell_neighbor_bottom_left_side = 6
	// Neighbor in the bottom left corner.
	cell_neighbor_bottom_left_corner = 7
	// Neighbor on the left side.
	cell_neighbor_left_side = 8
	// Neighbor in the left corner.
	cell_neighbor_left_corner = 9
	// Neighbor on the top left side.
	cell_neighbor_top_left_side = 10
	// Neighbor in the top left corner.
	cell_neighbor_top_left_corner = 11
	// Neighbor on the top side.
	cell_neighbor_top_side = 12
	// Neighbor in the top corner.
	cell_neighbor_top_corner = 13
	// Neighbor on the top right side.
	cell_neighbor_top_right_side = 14
	// Neighbor in the top right corner.
	cell_neighbor_top_right_corner = 15
}

enum TileSetTerrainMode #

enum TileSetTerrainMode as i64 {
	// Requires both corners and side to match with neighboring tiles' terrains.
	terrain_mode_match_corners_and_sides = 0
	// Requires corners to match with neighboring tiles' terrains.
	terrain_mode_match_corners = 1
	// Requires sides to match with neighboring tiles' terrains.
	terrain_mode_match_sides = 2
}

enum TileSetTileLayout #

enum TileSetTileLayout as i64 {
	// Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis.
	tile_layout_stacked = 0
	// Same as [constant TILE_LAYOUT_STACKED], but the first half-offset is negative instead of positive.
	tile_layout_stacked_offset = 1
	// Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right.
	tile_layout_stairs_right = 2
	// Tile coordinates layout where the vertical axis stay vertical, and the horizontal one goes down-right.
	tile_layout_stairs_down = 3
	// Tile coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right.
	tile_layout_diamond_right = 4
	// Tile coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left.
	tile_layout_diamond_down = 5
}

enum TileSetTileOffsetAxis #

enum TileSetTileOffsetAxis as i64 {
	// Horizontal half-offset.
	tile_offset_axis_horizontal = 0
	// Vertical half-offset.
	tile_offset_axis_vertical = 1
}

enum TileSetTileShape #

enum TileSetTileShape as i64 {
	// Rectangular tile shape.
	tile_shape_square = 0
	// Diamond tile shape (for isometric look).
	// [b]Note:[/b] Isometric [TileSet] works best if all sibling [TileMapLayer]s and their parent inheriting from [Node2D] have Y-sort enabled.
	tile_shape_isometric = 1
	// Rectangular tile shape with one row/column out of two offset by half a tile.
	tile_shape_half_offset_square = 2
	// Hexagonal tile shape.
	tile_shape_hexagon = 3
}

enum TimeMonth #

enum TimeMonth as i64 {
	// The month of January, represented numerically as `01`.
	month_january = 1
	// The month of February, represented numerically as `02`.
	month_february = 2
	// The month of March, represented numerically as `03`.
	month_march = 3
	// The month of April, represented numerically as `04`.
	month_april = 4
	// The month of May, represented numerically as `05`.
	month_may = 5
	// The month of June, represented numerically as `06`.
	month_june = 6
	// The month of July, represented numerically as `07`.
	month_july = 7
	// The month of August, represented numerically as `08`.
	month_august = 8
	// The month of September, represented numerically as `09`.
	month_september = 9
	// The month of October, represented numerically as `10`.
	month_october = 10
	// The month of November, represented numerically as `11`.
	month_november = 11
	// The month of December, represented numerically as `12`.
	month_december = 12
}

enum TimeWeekday #

enum TimeWeekday as i64 {
	// The day of the week Sunday, represented numerically as `0`.
	weekday_sunday = 0
	// The day of the week Monday, represented numerically as `1`.
	weekday_monday = 1
	// The day of the week Tuesday, represented numerically as `2`.
	weekday_tuesday = 2
	// The day of the week Wednesday, represented numerically as `3`.
	weekday_wednesday = 3
	// The day of the week Thursday, represented numerically as `4`.
	weekday_thursday = 4
	// The day of the week Friday, represented numerically as `5`.
	weekday_friday = 5
	// The day of the week Saturday, represented numerically as `6`.
	weekday_saturday = 6
}

enum TimerProcessCallback #

enum TimerProcessCallback as i64 {
	// Update the timer every physics process frame (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]).
	timer_process_physics = 0
	// Update the timer every process (rendered) frame (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]).
	timer_process_idle = 1
}

enum TouchScreenButtonVisibilityMode #

enum TouchScreenButtonVisibilityMode as i64 {
	// Always visible.
	visibility_always = 0
	// Visible on touch screens only.
	visibility_touchscreen_only = 1
}

enum TreeDropModeFlags #

enum TreeDropModeFlags as i64 {
	// Disables all drop sections, but still allows to detect the "on item" drop section by [method get_drop_section_at_position].
	// [b]Note:[/b] This is the default flag, it has no effect when combined with other flags.
	drop_mode_disabled = 0
	// Enables the "on item" drop section. This drop section covers the entire item.
	// When combined with [constant DROP_MODE_INBETWEEN], this drop section halves the height and stays centered vertically.
	drop_mode_on_item = 1
	// Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half.
	// When combined with [constant DROP_MODE_ON_ITEM], these drop sections halves the height and stays on top / bottom accordingly.
	drop_mode_inbetween = 2
}

enum TreeItemTreeCellMode #

enum TreeItemTreeCellMode as i64 {
	// Cell shows a string label, optionally with an icon. When editable, the text can be edited using a [LineEdit], or a [TextEdit] popup if [method set_edit_multiline] is used.
	cell_mode_string = 0
	// Cell shows a checkbox, optionally with text and an icon. The checkbox can be pressed, released, or indeterminate (via [method set_indeterminate]). The checkbox can't be clicked unless the cell is editable.
	cell_mode_check = 1
	// Cell shows a numeric range. When editable, it can be edited using a range slider. Use [method set_range] to set the value and [method set_range_config] to configure the range.
	// This cell can also be used in a text dropdown mode when you assign a text with [method set_text]. Separate options with a comma, e.g. `"Option1,Option2,Option3"`.
	cell_mode_range = 2
	// Cell shows an icon. It can't be edited nor display text. The icon is always centered within the cell.
	cell_mode_icon = 3
	// Cell shows as a clickable button. It will display an arrow similar to [OptionButton], but doesn't feature a dropdown (for that you can use [constant CELL_MODE_RANGE]). Clicking the button emits the [signal Tree.item_edited] signal. The button is flat by default, you can use [method set_custom_as_button] to display it with a [StyleBox].
	// This mode also supports custom drawing using [method set_custom_draw_callback].
	cell_mode_custom = 4
}

enum TreeSelectMode #

enum TreeSelectMode as i64 {
	// Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item.
	// The focus cursor is always hidden in this mode, but it is positioned at the current selection, making the currently selected item the currently focused item.
	select_single = 0
	// Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item.
	// The focus cursor is always hidden in this mode, but it is positioned at the first column of the current selection, making the currently selected item the currently focused item.
	select_row = 1
	// Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item.
	// The focus cursor is visible in this mode, the item or column under the cursor is not necessarily selected.
	select_multi = 2
}

enum TweenEaseType #

enum TweenEaseType as i64 {
	// The interpolation starts slowly and speeds up towards the end.
	ease_in = 0
	// The interpolation starts quickly and slows down towards the end.
	ease_out = 1
	// A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends.
	ease_in_out = 2
	// A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends.
	ease_out_in = 3
}

enum TweenPauseMode #

enum TweenPauseMode as i64 {
	// If the [Tween] has a bound node, it will process when that node can process (see [member Node.process_mode]). Otherwise it's the same as [constant TWEEN_PAUSE_STOP].
	tween_pause_bound = 0
	// If [SceneTree] is paused, the [Tween] will also pause.
	tween_pause_stop = 1
	// The [Tween] will process regardless of whether [SceneTree] is paused.
	tween_pause_process = 2
}

enum TweenProcessMode #

enum TweenProcessMode as i64 {
	// The [Tween] updates after each physics frame (see [method Node._physics_process]).
	tween_process_physics = 0
	// The [Tween] updates after each process frame (see [method Node._process]).
	tween_process_idle = 1
}

enum TweenTransitionType #

enum TweenTransitionType as i64 {
	// The animation is interpolated linearly.
	trans_linear = 0
	// The animation is interpolated using a sine function.
	trans_sine = 1
	// The animation is interpolated with a quintic (to the power of 5) function.
	trans_quint = 2
	// The animation is interpolated with a quartic (to the power of 4) function.
	trans_quart = 3
	// The animation is interpolated with a quadratic (to the power of 2) function.
	trans_quad = 4
	// The animation is interpolated with an exponential (to the power of x) function.
	trans_expo = 5
	// The animation is interpolated with elasticity, wiggling around the edges.
	trans_elastic = 6
	// The animation is interpolated with a cubic (to the power of 3) function.
	trans_cubic = 7
	// The animation is interpolated with a function using square roots.
	trans_circ = 8
	// The animation is interpolated by bouncing at the end.
	trans_bounce = 9
	// The animation is interpolated backing out at ends.
	trans_back = 10
	// The animation is interpolated like a spring towards the end.
	trans_spring = 11
}

enum UPNPDeviceIGDStatus #

enum UPNPDeviceIGDStatus as i64 {
	// OK.
	igd_status_ok = 0
	// HTTP error.
	igd_status_http_error = 1
	// Empty HTTP response.
	igd_status_http_empty = 2
	// Returned response contained no URLs.
	igd_status_no_urls = 3
	// Not a valid IGD.
	igd_status_no_igd = 4
	// Disconnected.
	igd_status_disconnected = 5
	// Unknown device.
	igd_status_unknown_device = 6
	// Invalid control.
	igd_status_invalid_control = 7
	// Memory allocation error.
	igd_status_malloc_error = 8
	// Unknown error.
	igd_status_unknown_error = 9
}

enum UPNPResult #

enum UPNPResult as i64 {
	// UPNP command or discovery was successful.
	upnp_result_success = 0
	// Not authorized to use the command on the [UPNPDevice]. May be returned when the user disabled UPNP on their router.
	upnp_result_not_authorized = 1
	// No port mapping was found for the given port, protocol combination on the given [UPNPDevice].
	upnp_result_port_mapping_not_found = 2
	// Inconsistent parameters.
	upnp_result_inconsistent_parameters = 3
	// No such entry in array. May be returned if a given port, protocol combination is not found on an [UPNPDevice].
	upnp_result_no_such_entry_in_array = 4
	// The action failed.
	upnp_result_action_failed = 5
	// The [UPNPDevice] does not allow wildcard values for the source IP address.
	upnp_result_src_ip_wildcard_not_permitted = 6
	// The [UPNPDevice] does not allow wildcard values for the external port.
	upnp_result_ext_port_wildcard_not_permitted = 7
	// The [UPNPDevice] does not allow wildcard values for the internal port.
	upnp_result_int_port_wildcard_not_permitted = 8
	// The remote host value must be a wildcard.
	upnp_result_remote_host_must_be_wildcard = 9
	// The external port value must be a wildcard.
	upnp_result_ext_port_must_be_wildcard = 10
	// No port maps are available. May also be returned if port mapping functionality is not available.
	upnp_result_no_port_maps_available = 11
	// Conflict with other mechanism. May be returned instead of [constant UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING] if a port mapping conflicts with an existing one.
	upnp_result_conflict_with_other_mechanism = 12
	// Conflict with an existing port mapping.
	upnp_result_conflict_with_other_mapping = 13
	// External and internal port values must be the same.
	upnp_result_same_port_values_required = 14
	// Only permanent leases are supported. Do not use the `duration` parameter when adding port mappings.
	upnp_result_only_permanent_lease_supported = 15
	// Invalid gateway.
	upnp_result_invalid_gateway = 16
	// Invalid port.
	upnp_result_invalid_port = 17
	// Invalid protocol.
	upnp_result_invalid_protocol = 18
	// Invalid duration.
	upnp_result_invalid_duration = 19
	// Invalid arguments.
	upnp_result_invalid_args = 20
	// Invalid response.
	upnp_result_invalid_response = 21
	// Invalid parameter.
	upnp_result_invalid_param = 22
	// HTTP error.
	upnp_result_http_error = 23
	// Socket error.
	upnp_result_socket_error = 24
	// Error allocating memory.
	upnp_result_mem_alloc_error = 25
	// No gateway available. You may need to call [method discover] first, or discovery didn't detect any valid IGDs (InternetGatewayDevices).
	upnp_result_no_gateway = 26
	// No devices available. You may need to call [method discover] first, or discovery didn't detect any valid [UPNPDevice]s.
	upnp_result_no_devices = 27
	// Unknown error.
	upnp_result_unknown_error = 28
}

enum UndoRedoMergeMode #

enum UndoRedoMergeMode as i64 {
	// Makes "do"/"undo" operations stay in separate actions.
	merge_disable = 0
	// Merges this action with the previous one if they have the same name. Keeps only the first action's "undo" operations and the last action's "do" operations. Useful for sequential changes to a single value.
	merge_ends = 1
	// Merges this action with the previous one if they have the same name.
	merge_all = 2
}

enum VariantOperator #

enum VariantOperator as i64 {
	// Equality operator (`==`).
	op_equal = 0
	// Inequality operator (`!=`).
	op_not_equal = 1
	// Less than operator (`<`).
	op_less = 2
	// Less than or equal operator (`<=`).
	op_less_equal = 3
	// Greater than operator (`>`).
	op_greater = 4
	// Greater than or equal operator (`>=`).
	op_greater_equal = 5
	// Addition operator (`+`).
	op_add = 6
	// Subtraction operator (`-`).
	op_subtract = 7
	// Multiplication operator (`*`).
	op_multiply = 8
	// Division operator (`/`).
	op_divide = 9
	// Unary negation operator (`-`).
	op_negate = 10
	// Unary plus operator (`+`).
	op_positive = 11
	// Remainder/modulo operator (`%`).
	op_module = 12
	// Power operator (`**`).
	op_power = 13
	// Left shift operator (`<<`).
	op_shift_left = 14
	// Right shift operator (`>>`).
	op_shift_right = 15
	// Bitwise AND operator (`&`).
	op_bit_and = 16
	// Bitwise OR operator (`|`).
	op_bit_or = 17
	// Bitwise XOR operator (`^`).
	op_bit_xor = 18
	// Bitwise NOT operator (`~`).
	op_bit_negate = 19
	// Logical AND operator (`and` or `&&`).
	op_and = 20
	// Logical OR operator (`or` or `||`).
	op_or = 21
	// Logical XOR operator (not implemented in GDScript).
	op_xor = 22
	// Logical NOT operator (`not` or `!`).
	op_not = 23
	// Logical IN operator (`in`).
	op_in = 24
	// Represents the size of the [enum Variant.Operator] enum.
	op_max = 25
}

enum VariantType #

enum VariantType as i64 {
	// Variable is `null`.
	type_nil = 0
	// Variable is of type [bool].
	type_bool = 1
	// Variable is of type [int].
	type_int = 2
	// Variable is of type [float].
	type_float = 3
	// Variable is of type [String].
	type_string = 4
	// Variable is of type [Vector2].
	type_vector2 = 5
	// Variable is of type [Vector2i].
	type_vector2i = 6
	// Variable is of type [Rect2].
	type_rect2 = 7
	// Variable is of type [Rect2i].
	type_rect2i = 8
	// Variable is of type [Vector3].
	type_vector3 = 9
	// Variable is of type [Vector3i].
	type_vector3i = 10
	// Variable is of type [Transform2D].
	type_transform2d = 11
	// Variable is of type [Vector4].
	type_vector4 = 12
	// Variable is of type [Vector4i].
	type_vector4i = 13
	// Variable is of type [Plane].
	type_plane = 14
	// Variable is of type [Quaternion].
	type_quaternion = 15
	// Variable is of type [AABB].
	type_aabb = 16
	// Variable is of type [Basis].
	type_basis = 17
	// Variable is of type [Transform3D].
	type_transform3d = 18
	// Variable is of type [Projection].
	type_projection = 19
	// Variable is of type [Color].
	type_color = 20
	// Variable is of type [StringName].
	type_string_name = 21
	// Variable is of type [NodePath].
	type_node_path = 22
	// Variable is of type [RID].
	type_rid = 23
	// Variable is of type [Object].
	type_object = 24
	// Variable is of type [Callable].
	type_callable = 25
	// Variable is of type [Signal].
	type_signal = 26
	// Variable is of type [Dictionary].
	type_dictionary = 27
	// Variable is of type [Array].
	type_array = 28
	// Variable is of type [PackedByteArray].
	type_packed_byte_array = 29
	// Variable is of type [PackedInt32Array].
	type_packed_int32_array = 30
	// Variable is of type [PackedInt64Array].
	type_packed_int64_array = 31
	// Variable is of type [PackedFloat32Array].
	type_packed_float32_array = 32
	// Variable is of type [PackedFloat64Array].
	type_packed_float64_array = 33
	// Variable is of type [PackedStringArray].
	type_packed_string_array = 34
	// Variable is of type [PackedVector2Array].
	type_packed_vector2_array = 35
	// Variable is of type [PackedVector3Array].
	type_packed_vector3_array = 36
	// Variable is of type [PackedColorArray].
	type_packed_color_array = 37
	// Variable is of type [PackedVector4Array].
	type_packed_vector4_array = 38
	// Represents the size of the [enum Variant.Type] enum.
	type_max = 39
}

enum Vector2Axis #

enum Vector2Axis as i64 {
	// Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_x = 0
	// Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_y = 1
}

enum Vector2iAxis #

enum Vector2iAxis as i64 {
	// Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_x = 0
	// Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_y = 1
}

enum Vector3Axis #

enum Vector3Axis as i64 {
	// Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_x = 0
	// Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_y = 1
	// Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_z = 2
}

enum Vector3iAxis #

enum Vector3iAxis as i64 {
	// Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_x = 0
	// Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_y = 1
	// Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_z = 2
}

enum Vector4Axis #

enum Vector4Axis as i64 {
	// Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_x = 0
	// Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_y = 1
	// Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_z = 2
	// Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_w = 3
}

enum Vector4iAxis #

enum Vector4iAxis as i64 {
	// Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_x = 0
	// Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_y = 1
	// Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_z = 2
	// Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index].
	axis_w = 3
}

enum VerticalAlignment #

enum VerticalAlignment as i64 {
	// Vertical top alignment, usually for text-derived classes.
	vertical_alignment_top = 0
	// Vertical center alignment, usually for text-derived classes.
	vertical_alignment_center = 1
	// Vertical bottom alignment, usually for text-derived classes.
	vertical_alignment_bottom = 2
	// Expand rows to fit height, usually for text-derived classes.
	vertical_alignment_fill = 3
}

enum ViewportAnisotropicFiltering #

enum ViewportAnisotropicFiltering as i64 {
	// Anisotropic filtering is disabled.
	anisotropy_disabled = 0
	// Use 2× anisotropic filtering.
	anisotropy_2x = 1
	// Use 4× anisotropic filtering. This is the default value.
	anisotropy_4x = 2
	// Use 8× anisotropic filtering.
	anisotropy_8x = 3
	// Use 16× anisotropic filtering.
	anisotropy_16x = 4
	// Represents the size of the [enum AnisotropicFiltering] enum.
	anisotropy_max = 5
}

enum ViewportDebugDraw #

enum ViewportDebugDraw as i64 {
	// Objects are displayed normally.
	debug_draw_disabled = 0
	// Objects are displayed without light information.
	debug_draw_unshaded = 1
	// Objects are displayed without textures and only with lighting information.
	// [b]Note:[/b] When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.
	debug_draw_lighting = 2
	// Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others.
	// [b]Note:[/b] When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.
	debug_draw_overdraw = 3
	// Objects are displayed as wireframe models.
	// [b]Note:[/b] [method RenderingServer.set_debug_generate_wireframes] must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer.
	debug_draw_wireframe = 4
	// Objects are displayed without lighting information and their textures replaced by normal mapping.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_normal_buffer = 5
	// Objects are displayed with only the albedo value from [VoxelGI]s. Requires at least one visible [VoxelGI] node that has been baked to have a visible effect.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_voxel_gi_albedo = 6
	// Objects are displayed with only the lighting value from [VoxelGI]s. Requires at least one visible [VoxelGI] node that has been baked to have a visible effect.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_voxel_gi_lighting = 7
	// Objects are displayed with only the emission color from [VoxelGI]s. Requires at least one visible [VoxelGI] node that has been baked to have a visible effect.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_voxel_gi_emission = 8
	// Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport].
	debug_draw_shadow_atlas = 9
	// Draws the shadow atlas that stores shadows from [DirectionalLight3D]s in the upper left quadrant of the [Viewport].
	debug_draw_directional_shadow_atlas = 10
	// Draws the scene luminance buffer (if available) in the upper left quadrant of the [Viewport].
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	debug_draw_scene_luminance = 11
	// Draws the screen-space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment].
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_ssao = 12
	// Draws the screen-space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssil_enabled] set in your [WorldEnvironment].
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_ssil = 13
	// Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order (from closest to furthest from the camera), they are colored red, green, blue, and yellow.
	// [b]Note:[/b] When using this debug draw mode, custom shaders are ignored since all materials in the scene temporarily use a debug material. This means the result from custom shader functions (such as vertex displacement) won't be visible anymore when using this debug draw mode.
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	debug_draw_pssm_splits = 14
	// Draws the decal atlas used by [Decal]s and light projector textures in the upper left quadrant of the [Viewport].
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	debug_draw_decal_atlas = 15
	// Draws the cascades used to render signed distance field global illumination (SDFGI).
	// Does nothing if the current environment's [member Environment.sdfgi_enabled] is `false`.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_sdfgi = 16
	// Draws the probes used for signed distance field global illumination (SDFGI).
	// Does nothing if the current environment's [member Environment.sdfgi_enabled] is `false`.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_sdfgi_probes = 17
	// Draws the buffer used for global illumination from [VoxelGI] or SDFGI. Requires [VoxelGI] (at least one visible baked VoxelGI node) or SDFGI ([member Environment.sdfgi_enabled]) to be enabled to have a visible effect.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_gi_buffer = 18
	// Draws all of the objects at their highest polycount regardless of their distance from the camera. No low level of detail (LOD) is applied.
	debug_draw_disable_lod = 19
	// Draws the cluster used by [OmniLight3D] nodes to optimize light rendering.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_cluster_omni_lights = 20
	// Draws the cluster used by [SpotLight3D] nodes to optimize light rendering.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_cluster_spot_lights = 21
	// Draws the cluster used by [Decal] nodes to optimize decal rendering.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_cluster_decals = 22
	// Draws the cluster used by [ReflectionProbe] nodes to optimize reflection probes.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_cluster_reflection_probes = 23
	// Draws the buffer used for occlusion culling.
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	debug_draw_occluders = 24
	// Draws vector lines over the viewport to indicate the movement of pixels between frames.
	// [b]Note:[/b] Only supported when using the Forward+ rendering method.
	debug_draw_motion_vectors = 25
	// Draws the internal resolution buffer of the scene in linear colorspace before tonemapping or post-processing is applied.
	// [b]Note:[/b] Only supported when using the Forward+ or Mobile rendering methods.
	debug_draw_internal_buffer = 26
}

enum ViewportDefaultCanvasItemTextureFilter #

enum ViewportDefaultCanvasItemTextureFilter as i64 {
	// The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
	default_canvas_item_texture_filter_nearest = 0
	// The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
	default_canvas_item_texture_filter_linear = 1
	// The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look smooth from up close, and smooth from a distance.
	// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
	default_canvas_item_texture_filter_linear_with_mipmaps = 2
	// The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look pixelated from up close, and smooth from a distance.
	// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
	default_canvas_item_texture_filter_nearest_with_mipmaps = 3
	// Represents the size of the [enum DefaultCanvasItemTextureFilter] enum.
	default_canvas_item_texture_filter_max = 4
}

enum ViewportDefaultCanvasItemTextureRepeat #

enum ViewportDefaultCanvasItemTextureRepeat as i64 {
	// Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture.
	default_canvas_item_texture_repeat_disabled = 0
	// Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.
	default_canvas_item_texture_repeat_enabled = 1
	// Flip the texture when repeating so that the edge lines up instead of abruptly changing.
	default_canvas_item_texture_repeat_mirror = 2
	// Represents the size of the [enum DefaultCanvasItemTextureRepeat] enum.
	default_canvas_item_texture_repeat_max = 3
}

enum ViewportMSAA #

enum ViewportMSAA as i64 {
	// Multisample antialiasing mode disabled. This is the default value, and is also the fastest setting.
	msaa_disabled = 0
	// Use 2× Multisample Antialiasing. This has a moderate performance cost. It helps reduce aliasing noticeably, but 4× MSAA still looks substantially better.
	msaa_2x = 1
	// Use 4× Multisample Antialiasing. This has a significant performance cost, and is generally a good compromise between performance and quality.
	msaa_4x = 2
	// Use 8× Multisample Antialiasing. This has a very high performance cost. The difference between 4× and 8× MSAA may not always be visible in real gameplay conditions. Likely unsupported on low-end and older hardware.
	msaa_8x = 3
	// Represents the size of the [enum MSAA] enum.
	msaa_max = 4
}

enum ViewportPositionalShadowAtlasQuadrantSubdiv #

enum ViewportPositionalShadowAtlasQuadrantSubdiv as i64 {
	// This quadrant will not be used.
	shadow_atlas_quadrant_subdiv_disabled = 0
	// This quadrant will only be used by one shadow map.
	shadow_atlas_quadrant_subdiv_1 = 1
	// This quadrant will be split in 4 and used by up to 4 shadow maps.
	shadow_atlas_quadrant_subdiv_4 = 2
	// This quadrant will be split 16 ways and used by up to 16 shadow maps.
	shadow_atlas_quadrant_subdiv_16 = 3
	// This quadrant will be split 64 ways and used by up to 64 shadow maps.
	shadow_atlas_quadrant_subdiv_64 = 4
	// This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member positional_shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
	shadow_atlas_quadrant_subdiv_256 = 5
	// This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member positional_shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
	shadow_atlas_quadrant_subdiv_1024 = 6
	// Represents the size of the [enum PositionalShadowAtlasQuadrantSubdiv] enum.
	shadow_atlas_quadrant_subdiv_max = 7
}

enum ViewportRenderInfo #

enum ViewportRenderInfo as i64 {
	// Amount of objects in frame.
	render_info_objects_in_frame = 0
	// Amount of vertices in frame.
	render_info_primitives_in_frame = 1
	// Amount of draw calls in frame.
	render_info_draw_calls_in_frame = 2
	// Represents the size of the [enum RenderInfo] enum.
	render_info_max = 3
}

enum ViewportRenderInfoType #

enum ViewportRenderInfoType as i64 {
	// Visible render pass (excluding shadows).
	render_info_type_visible = 0
	// Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits.
	render_info_type_shadow = 1
	// Canvas item rendering. This includes all 2D rendering.
	render_info_type_canvas = 2
	// Represents the size of the [enum RenderInfoType] enum.
	render_info_type_max = 3
}

enum ViewportSDFOversize #

enum ViewportSDFOversize as i64 {
	// The signed distance field only covers the viewport's own rectangle.
	sdf_oversize_100_percent = 0
	// The signed distance field is expanded to cover 20% of the viewport's size around the borders.
	sdf_oversize_120_percent = 1
	// The signed distance field is expanded to cover 50% of the viewport's size around the borders.
	sdf_oversize_150_percent = 2
	// The signed distance field is expanded to cover 100% (double) of the viewport's size around the borders.
	sdf_oversize_200_percent = 3
	// Represents the size of the [enum SDFOversize] enum.
	sdf_oversize_max = 4
}

enum ViewportSDFScale #

enum ViewportSDFScale as i64 {
	// The signed distance field is rendered at full resolution.
	sdf_scale_100_percent = 0
	// The signed distance field is rendered at half the resolution of this viewport.
	sdf_scale_50_percent = 1
	// The signed distance field is rendered at a quarter the resolution of this viewport.
	sdf_scale_25_percent = 2
	// Represents the size of the [enum SDFScale] enum.
	sdf_scale_max = 3
}

enum ViewportScaling3DMode #

enum ViewportScaling3DMode as i64 {
	// Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less than `1.0` will result in undersampling while values greater than `1.0` will result in supersampling. A value of `1.0` disables scaling.
	scaling_3d_mode_bilinear = 0
	// Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less than `1.0` will result in the viewport being upscaled using FSR. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` disables scaling.
	scaling_3d_mode_fsr = 1
	// Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than `1.0` will result in the viewport being upscaled using FSR2. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` will use FSR2 at native resolution as a TAA solution.
	scaling_3d_mode_fsr2 = 2
	// Use the [url=https://developer.apple.com/documentation/metalfx/mtlfxspatialscaler#overview]MetalFX spatial upscaler[/url] for the viewport's 3D buffer.
	// The amount of scaling can be set using [member scaling_3d_scale].
	// Values less than `1.0` will result in the viewport being upscaled using MetalFX. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` disables scaling.
	// More information: [url=https://developer.apple.com/documentation/metalfx]MetalFX[/url].
	// [b]Note:[/b] Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
	scaling_3d_mode_metalfx_spatial = 3
	// Use the [url=https://developer.apple.com/documentation/metalfx/mtlfxtemporalscaler#overview]MetalFX temporal upscaler[/url] for the viewport's 3D buffer.
	// The amount of scaling can be set using [member scaling_3d_scale]. To determine the minimum input scale, use the [method RenderingDevice.limit_get] method with [constant RenderingDevice.LIMIT_METALFX_TEMPORAL_SCALER_MIN_SCALE].
	// Values less than `1.0` will result in the viewport being upscaled using MetalFX. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` will use MetalFX at native resolution as a TAA solution.
	// More information: [url=https://developer.apple.com/documentation/metalfx]MetalFX[/url].
	// [b]Note:[/b] Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
	scaling_3d_mode_metalfx_temporal = 4
	// Represents the size of the [enum Scaling3DMode] enum.
	scaling_3d_mode_max = 5
}

enum ViewportScreenSpaceAA #

enum ViewportScreenSpaceAA as i64 {
	// Do not perform any antialiasing in the full screen post-process.
	screen_space_aa_disabled = 0
	// Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K.
	screen_space_aa_fxaa = 1
	// Use subpixel morphological antialiasing. SMAA may produce clearer results than FXAA, but at a slightly higher performance cost.
	screen_space_aa_smaa = 2
	// Represents the size of the [enum ScreenSpaceAA] enum.
	screen_space_aa_max = 3
}

enum ViewportVRSMode #

enum ViewportVRSMode as i64 {
	// Variable Rate Shading is disabled.
	vrs_disabled = 0
	// Variable Rate Shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.
	vrs_texture = 1
	// Variable Rate Shading's texture is supplied by the primary [XRInterface].
	vrs_xr = 2
	// Represents the size of the [enum VRSMode] enum.
	vrs_max = 3
}

enum ViewportVRSUpdateMode #

enum ViewportVRSUpdateMode as i64 {
	// The input texture for variable rate shading will not be processed.
	vrs_update_disabled = 0
	// The input texture for variable rate shading will be processed once.
	vrs_update_once = 1
	// The input texture for variable rate shading will be processed each frame.
	vrs_update_always = 2
	// Represents the size of the [enum VRSUpdateMode] enum.
	vrs_update_max = 3
}

enum VisibleOnScreenEnabler2DEnableMode #

enum VisibleOnScreenEnabler2DEnableMode as i64 {
	// Corresponds to [constant Node.PROCESS_MODE_INHERIT].
	enable_mode_inherit = 0
	// Corresponds to [constant Node.PROCESS_MODE_ALWAYS].
	enable_mode_always = 1
	// Corresponds to [constant Node.PROCESS_MODE_WHEN_PAUSED].
	enable_mode_when_paused = 2
}

enum VisibleOnScreenEnabler3DEnableMode #

enum VisibleOnScreenEnabler3DEnableMode as i64 {
	// Corresponds to [constant Node.PROCESS_MODE_INHERIT].
	enable_mode_inherit = 0
	// Corresponds to [constant Node.PROCESS_MODE_ALWAYS].
	enable_mode_always = 1
	// Corresponds to [constant Node.PROCESS_MODE_WHEN_PAUSED].
	enable_mode_when_paused = 2
}

enum VisualShaderNodeBillboardBillboardType #

enum VisualShaderNodeBillboardBillboardType as i64 {
	// Billboarding is disabled and the node does nothing.
	billboard_type_disabled = 0
	// A standard billboarding algorithm is enabled.
	billboard_type_enabled = 1
	// A billboarding algorithm to rotate around Y-axis is enabled.
	billboard_type_fixed_y = 2
	// A billboarding algorithm designed to use on particles is enabled.
	billboard_type_particles = 3
	// Represents the size of the [enum BillboardType] enum.
	billboard_type_max = 4
}

enum VisualShaderNodeClampOpType #

enum VisualShaderNodeClampOpType as i64 {
	// A floating-point scalar.
	op_type_float = 0
	// An integer scalar.
	op_type_int = 1
	// An unsigned integer scalar.
	op_type_uint = 2
	// A 2D vector type.
	op_type_vector_2d = 3
	// A 3D vector type.
	op_type_vector_3d = 4
	// A 4D vector type.
	op_type_vector_4d = 5
	// Represents the size of the [enum OpType] enum.
	op_type_max = 6
}

enum VisualShaderNodeColorFuncFunction #

enum VisualShaderNodeColorFuncFunction as i64 {
	// Converts the color to grayscale using the following formula:
	// ```gdscript
	// vec3 c = input;
	// float max1 = max(c.r, c.g);
	// float max2 = max(max1, c.b);
	// float max3 = max(max1, max2);
	// return vec3(max3, max3, max3);
	// ```
	func_grayscale = 0
	// Converts HSV vector to RGB equivalent.
	func_hsv2rgb = 1
	// Converts RGB vector to HSV equivalent.
	func_rgb2hsv = 2
	// Applies sepia tone effect using the following formula:
	// ```gdscript
	// vec3 c = input;
	// float r = (c.r * 0.393) + (c.g * 0.769) + (c.b * 0.189);
	// float g = (c.r * 0.349) + (c.g * 0.686) + (c.b * 0.168);
	// float b = (c.r * 0.272) + (c.g * 0.534) + (c.b * 0.131);
	// return vec3(r, g, b);
	// ```
	func_sepia = 3
	// Converts color from linear color space to sRGB color space using the following formula:
	// ```gdscript
	// vec3 c = clamp(c, vec3(0.0), vec3(1.0));
	// const vec3 a = vec3(0.055f);
	// return mix((vec3(1.0f) + a) * pow(c.rgb, vec3(1.0f / 2.4f)) - a, 12.92f * c.rgb, lessThan(c.rgb, vec3(0.0031308f)));
	// ```
	// The Compatibility renderer uses a simpler formula:
	// ```gdscript
	// vec3 c = input;
	// return max(vec3(1.055) * pow(c, vec3(0.416666667)) - vec3(0.055), vec3(0.0));
	// ```
	func_linear_to_srgb = 4
	// Converts color from sRGB color space to linear color space using the following formula:
	// ```gdscript
	// vec3 c = input;
	// return mix(pow((c.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), c.rgb * (1.0 / 12.92), lessThan(c.rgb, vec3(0.04045)));
	// ```
	// The Compatibility renderer uses a simpler formula:
	// ```gdscript
	// vec3 c = input;
	// return c * (c * (c * 0.305306011 + 0.682171111) + 0.012522878);
	// ```
	func_srgb_to_linear = 5
	// Represents the size of the [enum Function] enum.
	func_max = 6
}

enum VisualShaderNodeColorOpOperator #

enum VisualShaderNodeColorOpOperator as i64 {
	// Produce a screen effect with the following formula:
	// ```gdscript
	// result = vec3(1.0) - (vec3(1.0) - a) * (vec3(1.0) - b);
	// ```
	op_screen = 0
	// Produce a difference effect with the following formula:
	// ```gdscript
	// result = abs(a - b);
	// ```
	op_difference = 1
	// Produce a darken effect with the following formula:
	// ```gdscript
	// result = min(a, b);
	// ```
	op_darken = 2
	// Produce a lighten effect with the following formula:
	// ```gdscript
	// result = max(a, b);
	// ```
	op_lighten = 3
	// Produce an overlay effect with the following formula:
	// ```gdscript
	// for (int i = 0; i < 3; i++) {
	// float base = a[i];
	// float blend = b[i];
	// if (base < 0.5) {
	// result[i] = 2.0 * base * blend;
	// } else {
	// result[i] = 1.0 - 2.0 * (1.0 - blend) * (1.0 - base);
	// }
	// }
	// ```
	op_overlay = 4
	// Produce a dodge effect with the following formula:
	// ```gdscript
	// result = a / (vec3(1.0) - b);
	// ```
	op_dodge = 5
	// Produce a burn effect with the following formula:
	// ```gdscript
	// result = vec3(1.0) - (vec3(1.0) - a) / b;
	// ```
	op_burn = 6
	// Produce a soft light effect with the following formula:
	// ```gdscript
	// for (int i = 0; i < 3; i++) {
	// float base = a[i];
	// float blend = b[i];
	// if (base < 0.5) {
	// result[i] = base * (blend + 0.5);
	// } else {
	// result[i] = 1.0 - (1.0 - base) * (1.0 - (blend - 0.5));
	// }
	// }
	// ```
	op_soft_light = 7
	// Produce a hard light effect with the following formula:
	// ```gdscript
	// for (int i = 0; i < 3; i++) {
	// float base = a[i];
	// float blend = b[i];
	// if (base < 0.5) {
	// result[i] = base * (2.0 * blend);
	// } else {
	// result[i] = 1.0 - (1.0 - base) * (1.0 - 2.0 * (blend - 0.5));
	// }
	// }
	// ```
	op_hard_light = 8
	// Represents the size of the [enum Operator] enum.
	op_max = 9
}

enum VisualShaderNodeCompareComparisonType #

enum VisualShaderNodeCompareComparisonType as i64 {
	// A floating-point scalar.
	ctype_scalar = 0
	// An integer scalar.
	ctype_scalar_int = 1
	// An unsigned integer scalar.
	ctype_scalar_uint = 2
	// A 2D vector type.
	ctype_vector_2d = 3
	// A 3D vector type.
	ctype_vector_3d = 4
	// A 4D vector type.
	ctype_vector_4d = 5
	// A boolean type.
	ctype_boolean = 6
	// A transform (`mat4`) type.
	ctype_transform = 7
	// Represents the size of the [enum ComparisonType] enum.
	ctype_max = 8
}

enum VisualShaderNodeCompareCondition #

enum VisualShaderNodeCompareCondition as i64 {
	// The result will be `true` if all components in the vector satisfy the comparison condition.
	cond_all = 0
	// The result will be `true` if any component in the vector satisfies the comparison condition.
	cond_any = 1
	// Represents the size of the [enum Condition] enum.
	cond_max = 2
}

enum VisualShaderNodeCompareFunction #

enum VisualShaderNodeCompareFunction as i64 {
	// Comparison for equality (`a == b`).
	func_equal = 0
	// Comparison for inequality (`a != b`).
	func_not_equal = 1
	// Comparison for greater than (`a > b`). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
	func_greater_than = 2
	// Comparison for greater than or equal (`a >= b`). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
	func_greater_than_equal = 3
	// Comparison for less than (`a < b`). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
	func_less_than = 4
	// Comparison for less than or equal (`a <= b`). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
	func_less_than_equal = 5
	// Represents the size of the [enum Function] enum.
	func_max = 6
}

enum VisualShaderNodeCubemapSource #

enum VisualShaderNodeCubemapSource as i64 {
	// Use the [Cubemap] set via [member cube_map]. If this is set to [member source], the `samplerCube` port is ignored.
	source_texture = 0
	// Use the [Cubemap] sampler reference passed via the `samplerCube` port. If this is set to [member source], the [member cube_map] texture is ignored.
	source_port = 1
	// Represents the size of the [enum Source] enum.
	source_max = 2
}

enum VisualShaderNodeCubemapTextureType #

enum VisualShaderNodeCubemapTextureType as i64 {
	// No hints are added to the uniform declaration.
	type_data = 0
	// Adds `source_color` as hint to the uniform declaration for proper sRGB to linear conversion.
	type_color = 1
	// Adds `hint_normal` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
	type_normal_map = 2
	// Represents the size of the [enum TextureType] enum.
	type_max = 3
}

enum VisualShaderNodeDerivativeFuncFunction #

enum VisualShaderNodeDerivativeFuncFunction as i64 {
	// Sum of absolute derivative in `x` and `y`.
	func_sum = 0
	// Derivative in `x` using local differencing.
	func_x = 1
	// Derivative in `y` using local differencing.
	func_y = 2
	// Represents the size of the [enum Function] enum.
	func_max = 3
}

enum VisualShaderNodeDerivativeFuncOpType #

enum VisualShaderNodeDerivativeFuncOpType as i64 {
	// A floating-point scalar.
	op_type_scalar = 0
	// A 2D vector type.
	op_type_vector_2d = 1
	// A 3D vector type.
	op_type_vector_3d = 2
	// A 4D vector type.
	op_type_vector_4d = 3
	// Represents the size of the [enum OpType] enum.
	op_type_max = 4
}

enum VisualShaderNodeDerivativeFuncPrecision #

enum VisualShaderNodeDerivativeFuncPrecision as i64 {
	// No precision is specified, the GPU driver is allowed to use whatever level of precision it chooses. This is the default option and is equivalent to using `dFdx()` or `dFdy()` in text shaders.
	precision_none = 0
	// The derivative will be calculated using the current fragment's neighbors (which may not include the current fragment). This tends to be faster than using [constant PRECISION_FINE], but may not be suitable when more precision is needed. This is equivalent to using `dFdxCoarse()` or `dFdyCoarse()` in text shaders.
	precision_coarse = 1
	// The derivative will be calculated using the current fragment and its immediate neighbors. This tends to be slower than using [constant PRECISION_COARSE], but may be necessary when more precision is needed. This is equivalent to using `dFdxFine()` or `dFdyFine()` in text shaders.
	precision_fine = 2
	// Represents the size of the [enum Precision] enum.
	precision_max = 3
}

enum VisualShaderNodeFloatFuncFunction #

enum VisualShaderNodeFloatFuncFunction as i64 {
	// Returns the sine of the parameter. Translates to `sin(x)` in the Godot Shader Language.
	func_sin = 0
	// Returns the cosine of the parameter. Translates to `cos(x)` in the Godot Shader Language.
	func_cos = 1
	// Returns the tangent of the parameter. Translates to `tan(x)` in the Godot Shader Language.
	func_tan = 2
	// Returns the arc-sine of the parameter. Translates to `asin(x)` in the Godot Shader Language.
	func_asin = 3
	// Returns the arc-cosine of the parameter. Translates to `acos(x)` in the Godot Shader Language.
	func_acos = 4
	// Returns the arc-tangent of the parameter. Translates to `atan(x)` in the Godot Shader Language.
	func_atan = 5
	// Returns the hyperbolic sine of the parameter. Translates to `sinh(x)` in the Godot Shader Language.
	func_sinh = 6
	// Returns the hyperbolic cosine of the parameter. Translates to `cosh(x)` in the Godot Shader Language.
	func_cosh = 7
	// Returns the hyperbolic tangent of the parameter. Translates to `tanh(x)` in the Godot Shader Language.
	func_tanh = 8
	// Returns the natural logarithm of the parameter. Translates to `log(x)` in the Godot Shader Language.
	func_log = 9
	// Returns the natural exponentiation of the parameter. Translates to `exp(x)` in the Godot Shader Language.
	func_exp = 10
	// Returns the square root of the parameter. Translates to `sqrt(x)` in the Godot Shader Language.
	func_sqrt = 11
	// Returns the absolute value of the parameter. Translates to `abs(x)` in the Godot Shader Language.
	func_abs = 12
	// Extracts the sign of the parameter. Translates to `sign(x)` in the Godot Shader Language.
	func_sign = 13
	// Finds the nearest integer less than or equal to the parameter. Translates to `floor(x)` in the Godot Shader Language.
	func_floor = 14
	// Finds the nearest integer to the parameter. Translates to `round(x)` in the Godot Shader Language.
	func_round = 15
	// Finds the nearest integer that is greater than or equal to the parameter. Translates to `ceil(x)` in the Godot Shader Language.
	func_ceil = 16
	// Computes the fractional part of the argument. Translates to `fract(x)` in the Godot Shader Language.
	func_fract = 17
	// Clamps the value between `0.0` and `1.0` using `min(max(x, 0.0), 1.0)`.
	func_saturate = 18
	// Negates the `x` using `-(x)`.
	func_negate = 19
	// Returns the arc-hyperbolic-cosine of the parameter. Translates to `acosh(x)` in the Godot Shader Language.
	func_acosh = 20
	// Returns the arc-hyperbolic-sine of the parameter. Translates to `asinh(x)` in the Godot Shader Language.
	func_asinh = 21
	// Returns the arc-hyperbolic-tangent of the parameter. Translates to `atanh(x)` in the Godot Shader Language.
	func_atanh = 22
	// Convert a quantity in radians to degrees. Translates to `degrees(x)` in the Godot Shader Language.
	func_degrees = 23
	// Returns 2 raised by the power of the parameter. Translates to `exp2(x)` in the Godot Shader Language.
	func_exp2 = 24
	// Returns the inverse of the square root of the parameter. Translates to `inversesqrt(x)` in the Godot Shader Language.
	func_inverse_sqrt = 25
	// Returns the base 2 logarithm of the parameter. Translates to `log2(x)` in the Godot Shader Language.
	func_log2 = 26
	// Convert a quantity in degrees to radians. Translates to `radians(x)` in the Godot Shader Language.
	func_radians = 27
	// Finds reciprocal value of dividing 1 by `x` (i.e. `1 / x`).
	func_reciprocal = 28
	// Finds the nearest even integer to the parameter. Translates to `roundEven(x)` in the Godot Shader Language.
	func_roundeven = 29
	// Returns a value equal to the nearest integer to `x` whose absolute value is not larger than the absolute value of `x`. Translates to `trunc(x)` in the Godot Shader Language.
	func_trunc = 30
	// Subtracts scalar `x` from 1 (i.e. `1 - x`).
	func_oneminus = 31
	// Represents the size of the [enum Function] enum.
	func_max = 32
}

enum VisualShaderNodeFloatOpOperator #

enum VisualShaderNodeFloatOpOperator as i64 {
	// Sums two numbers using `a + b`.
	op_add = 0
	// Subtracts two numbers using `a - b`.
	op_sub = 1
	// Multiplies two numbers using `a * b`.
	op_mul = 2
	// Divides two numbers using `a / b`.
	op_div = 3
	// Calculates the remainder of two numbers. Translates to `mod(a, b)` in the Godot Shader Language.
	op_mod = 4
	// Raises the `a` to the power of `b`. Translates to `pow(a, b)` in the Godot Shader Language.
	op_pow = 5
	// Returns the greater of two numbers. Translates to `max(a, b)` in the Godot Shader Language.
	op_max = 6
	// Returns the lesser of two numbers. Translates to `min(a, b)` in the Godot Shader Language.
	op_min = 7
	// Returns the arc-tangent of the parameters. Translates to `atan(a, b)` in the Godot Shader Language.
	op_atan2 = 8
	// Generates a step function by comparing `b`(x) to `a`(edge). Returns 0.0 if `x` is smaller than `edge` and otherwise 1.0. Translates to `step(a, b)` in the Godot Shader Language.
	op_step = 9
	// Represents the size of the [enum Operator] enum.
	op_enum_size = 10
}

enum VisualShaderNodeFloatParameterHint #

enum VisualShaderNodeFloatParameterHint as i64 {
	// No hint used.
	hint_none = 0
	// A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to `hint_range(min, max)` in shader code.
	hint_range = 1
	// A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to `hint_range(min, max, step)` in shader code.
	hint_range_step = 2
	// Represents the size of the [enum Hint] enum.
	hint_max = 3
}

enum VisualShaderNodeIntFuncFunction #

enum VisualShaderNodeIntFuncFunction as i64 {
	// Returns the absolute value of the parameter. Translates to `abs(x)` in the Godot Shader Language.
	func_abs = 0
	// Negates the `x` using `-(x)`.
	func_negate = 1
	// Extracts the sign of the parameter. Translates to `sign(x)` in the Godot Shader Language.
	func_sign = 2
	// Returns the result of bitwise `NOT` operation on the integer. Translates to `~a` in the Godot Shader Language.
	func_bitwise_not = 3
	// Represents the size of the [enum Function] enum.
	func_max = 4
}

enum VisualShaderNodeIntOpOperator #

enum VisualShaderNodeIntOpOperator as i64 {
	// Sums two numbers using `a + b`.
	op_add = 0
	// Subtracts two numbers using `a - b`.
	op_sub = 1
	// Multiplies two numbers using `a * b`.
	op_mul = 2
	// Divides two numbers using `a / b`.
	op_div = 3
	// Calculates the remainder of two numbers using `a % b`.
	op_mod = 4
	// Returns the greater of two numbers. Translates to `max(a, b)` in the Godot Shader Language.
	op_max = 5
	// Returns the lesser of two numbers. Translates to `max(a, b)` in the Godot Shader Language.
	op_min = 6
	// Returns the result of bitwise `AND` operation on the integer. Translates to `a & b` in the Godot Shader Language.
	op_bitwise_and = 7
	// Returns the result of bitwise `OR` operation for two integers. Translates to `a | b` in the Godot Shader Language.
	op_bitwise_or = 8
	// Returns the result of bitwise `XOR` operation for two integers. Translates to `a ^ b` in the Godot Shader Language.
	op_bitwise_xor = 9
	// Returns the result of bitwise left shift operation on the integer. Translates to `a << b` in the Godot Shader Language.
	op_bitwise_left_shift = 10
	// Returns the result of bitwise right shift operation on the integer. Translates to `a >> b` in the Godot Shader Language.
	op_bitwise_right_shift = 11
	// Represents the size of the [enum Operator] enum.
	op_enum_size = 12
}

enum VisualShaderNodeIntParameterHint #

enum VisualShaderNodeIntParameterHint as i64 {
	// The parameter will not constrain its value.
	hint_none = 0
	// The parameter's value must be within the specified [member min]/[member max] range.
	hint_range = 1
	// The parameter's value must be within the specified range, with the given [member step] between values.
	hint_range_step = 2
	// The parameter uses an enum to associate preset values to names in the editor.
	hint_enum = 3
	// Represents the size of the [enum Hint] enum.
	hint_max = 4
}

enum VisualShaderNodeIsFunction #

enum VisualShaderNodeIsFunction as i64 {
	// Comparison with `INF` (Infinity).
	func_is_inf = 0
	// Comparison with `NaN` (Not a Number; indicates invalid numeric results, such as division by zero).
	func_is_nan = 1
	// Represents the size of the [enum Function] enum.
	func_max = 2
}

enum VisualShaderNodeMixOpType #

enum VisualShaderNodeMixOpType as i64 {
	// A floating-point scalar.
	op_type_scalar = 0
	// A 2D vector type.
	op_type_vector_2d = 1
	// The `a` and `b` ports use a 2D vector type. The `weight` port uses a scalar type.
	op_type_vector_2d_scalar = 2
	// A 3D vector type.
	op_type_vector_3d = 3
	// The `a` and `b` ports use a 3D vector type. The `weight` port uses a scalar type.
	op_type_vector_3d_scalar = 4
	// A 4D vector type.
	op_type_vector_4d = 5
	// The `a` and `b` ports use a 4D vector type. The `weight` port uses a scalar type.
	op_type_vector_4d_scalar = 6
	// Represents the size of the [enum OpType] enum.
	op_type_max = 7
}

enum VisualShaderNodeMultiplyAddOpType #

enum VisualShaderNodeMultiplyAddOpType as i64 {
	// A floating-point scalar type.
	op_type_scalar = 0
	// A 2D vector type.
	op_type_vector_2d = 1
	// A 3D vector type.
	op_type_vector_3d = 2
	// A 4D vector type.
	op_type_vector_4d = 3
	// Represents the size of the [enum OpType] enum.
	op_type_max = 4
}

enum VisualShaderNodeParameterQualifier #

enum VisualShaderNodeParameterQualifier as i64 {
	// The parameter will be tied to the [ShaderMaterial] using this shader.
	qual_none = 0
	// The parameter will use a global value, defined in Project Settings.
	qual_global = 1
	// The parameter will be tied to the node with attached [ShaderMaterial] using this shader.
	qual_instance = 2
	// Represents the size of the [enum Qualifier] enum.
	qual_max = 3
}

enum VisualShaderNodeParticleAcceleratorMode #

enum VisualShaderNodeParticleAcceleratorMode as i64 {
	// The particles will be accelerated based on their velocity.
	mode_linear = 0
	// The particles will be accelerated towards or away from the center.
	mode_radial = 1
	// The particles will be accelerated tangentially to the radius vector from center to their position.
	mode_tangential = 2
	// Represents the size of the [enum Mode] enum.
	mode_max = 3
}

enum VisualShaderNodeParticleEmitEmitFlags #

enum VisualShaderNodeParticleEmitEmitFlags as i64 {
	// If enabled, the particle starts with the position defined by this node.
	emit_flag_position = 1
	// If enabled, the particle starts with the rotation and scale defined by this node.
	emit_flag_rot_scale = 2
	// If enabled,the particle starts with the velocity defined by this node.
	emit_flag_velocity = 4
	// If enabled, the particle starts with the color defined by this node.
	emit_flag_color = 8
	// If enabled, the particle starts with the `CUSTOM` data defined by this node.
	emit_flag_custom = 16
}

enum VisualShaderNodeParticleRandomnessOpType #

enum VisualShaderNodeParticleRandomnessOpType as i64 {
	// A floating-point scalar.
	op_type_scalar = 0
	// A 2D vector type.
	op_type_vector_2d = 1
	// A 3D vector type.
	op_type_vector_3d = 2
	// A 4D vector type.
	op_type_vector_4d = 3
	// Represents the size of the [enum OpType] enum.
	op_type_max = 4
}

enum VisualShaderNodePortType #

enum VisualShaderNodePortType as i64 {
	// Floating-point scalar. Translated to [code skip-lint]float` type in shader code.
	port_type_scalar = 0
	// Integer scalar. Translated to [code skip-lint]int` type in shader code.
	port_type_scalar_int = 1
	// Unsigned integer scalar. Translated to [code skip-lint]uint` type in shader code.
	port_type_scalar_uint = 2
	// 2D vector of floating-point values. Translated to [code skip-lint]vec2` type in shader code.
	port_type_vector_2d = 3
	// 3D vector of floating-point values. Translated to [code skip-lint]vec3` type in shader code.
	port_type_vector_3d = 4
	// 4D vector of floating-point values. Translated to [code skip-lint]vec4` type in shader code.
	port_type_vector_4d = 5
	// Boolean type. Translated to [code skip-lint]bool` type in shader code.
	port_type_boolean = 6
	// Transform type. Translated to [code skip-lint]mat4` type in shader code.
	port_type_transform = 7
	// Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.
	port_type_sampler = 8
	// Represents the size of the [enum PortType] enum.
	port_type_max = 9
}

enum VisualShaderNodeRemapOpType #

enum VisualShaderNodeRemapOpType as i64 {
	// A floating-point scalar type.
	op_type_scalar = 0
	// A 2D vector type.
	op_type_vector_2d = 1
	// The `value` port uses a 2D vector type, while the `input min`, `input max`, `output min`, and `output max` ports use a floating-point scalar type.
	op_type_vector_2d_scalar = 2
	// A 3D vector type.
	op_type_vector_3d = 3
	// The `value` port uses a 3D vector type, while the `input min`, `input max`, `output min`, and `output max` ports use a floating-point scalar type.
	op_type_vector_3d_scalar = 4
	// A 4D vector type.
	op_type_vector_4d = 5
	// The `value` port uses a 4D vector type, while the `input min`, `input max`, `output min`, and `output max` ports use a floating-point scalar type.
	op_type_vector_4d_scalar = 6
	// Represents the size of the [enum OpType] enum.
	op_type_max = 7
}

enum VisualShaderNodeSample3DSource #

enum VisualShaderNodeSample3DSource as i64 {
	// Creates internal uniform and provides a way to assign it within node.
	source_texture = 0
	// Use the uniform texture from sampler port.
	source_port = 1
	// Represents the size of the [enum Source] enum.
	source_max = 2
}

enum VisualShaderNodeSmoothStepOpType #

enum VisualShaderNodeSmoothStepOpType as i64 {
	// A floating-point scalar type.
	op_type_scalar = 0
	// A 2D vector type.
	op_type_vector_2d = 1
	// The `x` port uses a 2D vector type. The first two ports use a floating-point scalar type.
	op_type_vector_2d_scalar = 2
	// A 3D vector type.
	op_type_vector_3d = 3
	// The `x` port uses a 3D vector type. The first two ports use a floating-point scalar type.
	op_type_vector_3d_scalar = 4
	// A 4D vector type.
	op_type_vector_4d = 5
	// The `a` and `b` ports use a 4D vector type. The `weight` port uses a scalar type.
	op_type_vector_4d_scalar = 6
	// Represents the size of the [enum OpType] enum.
	op_type_max = 7
}

enum VisualShaderNodeStepOpType #

enum VisualShaderNodeStepOpType as i64 {
	// A floating-point scalar type.
	op_type_scalar = 0
	// A 2D vector type.
	op_type_vector_2d = 1
	// The `x` port uses a 2D vector type, while the `edge` port uses a floating-point scalar type.
	op_type_vector_2d_scalar = 2
	// A 3D vector type.
	op_type_vector_3d = 3
	// The `x` port uses a 3D vector type, while the `edge` port uses a floating-point scalar type.
	op_type_vector_3d_scalar = 4
	// A 4D vector type.
	op_type_vector_4d = 5
	// The `a` and `b` ports use a 4D vector type. The `weight` port uses a scalar type.
	op_type_vector_4d_scalar = 6
	// Represents the size of the [enum OpType] enum.
	op_type_max = 7
}

enum VisualShaderNodeSwitchOpType #

enum VisualShaderNodeSwitchOpType as i64 {
	// A floating-point scalar.
	op_type_float = 0
	// An integer scalar.
	op_type_int = 1
	// An unsigned integer scalar.
	op_type_uint = 2
	// A 2D vector type.
	op_type_vector_2d = 3
	// A 3D vector type.
	op_type_vector_3d = 4
	// A 4D vector type.
	op_type_vector_4d = 5
	// A boolean type.
	op_type_boolean = 6
	// A transform type.
	op_type_transform = 7
	// Represents the size of the [enum OpType] enum.
	op_type_max = 8
}

enum VisualShaderNodeTextureParameterColorDefault #

enum VisualShaderNodeTextureParameterColorDefault as i64 {
	// Defaults to fully opaque white color.
	color_default_white = 0
	// Defaults to fully opaque black color.
	color_default_black = 1
	// Defaults to fully transparent black color.
	color_default_transparent = 2
	// Represents the size of the [enum ColorDefault] enum.
	color_default_max = 3
}

enum VisualShaderNodeTextureParameterTextureFilter #

enum VisualShaderNodeTextureParameterTextureFilter as i64 {
	// Sample the texture using the filter determined by the node this shader is attached to.
	filter_default = 0
	// The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
	filter_nearest = 1
	// The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
	filter_linear = 2
	// The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look pixelated from up close, and smooth from a distance.
	// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
	filter_nearest_mipmap = 3
	// The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look smooth from up close, and smooth from a distance.
	// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
	filter_linear_mipmap = 4
	// The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	// [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_NEAREST_MIPMAP] is usually more appropriate in this case.
	filter_nearest_mipmap_anisotropic = 5
	// The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
	// [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_LINEAR_MIPMAP] is usually more appropriate in this case.
	filter_linear_mipmap_anisotropic = 6
	// Represents the size of the [enum TextureFilter] enum.
	filter_max = 7
}

enum VisualShaderNodeTextureParameterTextureRepeat #

enum VisualShaderNodeTextureParameterTextureRepeat as i64 {
	// Sample the texture using the repeat mode determined by the node this shader is attached to.
	repeat_default = 0
	// Texture will repeat normally.
	repeat_enabled = 1
	// Texture will not repeat.
	repeat_disabled = 2
	// Represents the size of the [enum TextureRepeat] enum.
	repeat_max = 3
}

enum VisualShaderNodeTextureParameterTextureSource #

enum VisualShaderNodeTextureParameterTextureSource as i64 {
	// The texture source is not specified in the shader.
	source_none = 0
	// The texture source is the screen texture which captures all opaque objects drawn this frame.
	source_screen = 1
	// The texture source is the depth texture from the depth prepass.
	source_depth = 2
	// The texture source is the normal-roughness buffer from the depth prepass.
	source_normal_roughness = 3
	// Represents the size of the [enum TextureSource] enum.
	source_max = 4
}

enum VisualShaderNodeTextureParameterTextureType #

enum VisualShaderNodeTextureParameterTextureType as i64 {
	// No hints are added to the uniform declaration.
	type_data = 0
	// Adds `source_color` as hint to the uniform declaration for proper sRGB to linear conversion.
	type_color = 1
	// Adds `hint_normal` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
	type_normal_map = 2
	// Adds `hint_anisotropy` as hint to the uniform declaration to use for a flowmap.
	type_anisotropy = 3
	// Represents the size of the [enum TextureType] enum.
	type_max = 4
}

enum VisualShaderNodeTextureSource #

enum VisualShaderNodeTextureSource as i64 {
	// Use the texture given as an argument for this function.
	source_texture = 0
	// Use the current viewport's texture as the source.
	source_screen = 1
	// Use the texture from this shader's texture built-in (e.g. a texture of a [Sprite2D]).
	source_2d_texture = 2
	// Use the texture from this shader's normal map built-in.
	source_2d_normal = 3
	// Use the depth texture captured during the depth prepass. Only available when the depth prepass is used (i.e. in spatial shaders and in the forward_plus or gl_compatibility renderers).
	source_depth = 4
	// Use the texture provided in the input port for this function.
	source_port = 5
	// Use the normal buffer captured during the depth prepass. Only available when the normal-roughness buffer is available (i.e. in spatial shaders and in the forward_plus renderer).
	source_3d_normal = 6
	// Use the roughness buffer captured during the depth prepass. Only available when the normal-roughness buffer is available (i.e. in spatial shaders and in the forward_plus renderer).
	source_roughness = 7
	// Represents the size of the [enum Source] enum.
	source_max = 8
}

enum VisualShaderNodeTextureTextureType #

enum VisualShaderNodeTextureTextureType as i64 {
	// No hints are added to the uniform declaration.
	type_data = 0
	// Adds `source_color` as hint to the uniform declaration for proper sRGB to linear conversion.
	type_color = 1
	// Adds `hint_normal` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
	type_normal_map = 2
	// Represents the size of the [enum TextureType] enum.
	type_max = 3
}

enum VisualShaderNodeTransformFuncFunction #

enum VisualShaderNodeTransformFuncFunction as i64 {
	// Perform the inverse operation on the [Transform3D] matrix.
	func_inverse = 0
	// Perform the transpose operation on the [Transform3D] matrix.
	func_transpose = 1
	// Represents the size of the [enum Function] enum.
	func_max = 2
}

enum VisualShaderNodeTransformOpOperator #

enum VisualShaderNodeTransformOpOperator as i64 {
	// Multiplies transform `a` by the transform `b`.
	op_axb = 0
	// Multiplies transform `b` by the transform `a`.
	op_bxa = 1
	// Performs a component-wise multiplication of transform `a` by the transform `b`.
	op_axb_comp = 2
	// Performs a component-wise multiplication of transform `b` by the transform `a`.
	op_bxa_comp = 3
	// Adds two transforms.
	op_add = 4
	// Subtracts the transform `a` from the transform `b`.
	op_a_minus_b = 5
	// Subtracts the transform `b` from the transform `a`.
	op_b_minus_a = 6
	// Divides the transform `a` by the transform `b`.
	op_a_div_b = 7
	// Divides the transform `b` by the transform `a`.
	op_b_div_a = 8
	// Represents the size of the [enum Operator] enum.
	op_max = 9
}

enum VisualShaderNodeTransformVecMultOperator #

enum VisualShaderNodeTransformVecMultOperator as i64 {
	// Multiplies transform `a` by the vector `b`.
	op_axb = 0
	// Multiplies vector `b` by the transform `a`.
	op_bxa = 1
	// Multiplies transform `a` by the vector `b`, skipping the last row and column of the transform.
	op_3x3_axb = 2
	// Multiplies vector `b` by the transform `a`, skipping the last row and column of the transform.
	op_3x3_bxa = 3
	// Represents the size of the [enum Operator] enum.
	op_max = 4
}

enum VisualShaderNodeUIntFuncFunction #

enum VisualShaderNodeUIntFuncFunction as i64 {
	// Negates the `x` using `-(x)`.
	func_negate = 0
	// Returns the result of bitwise `NOT` operation on the integer. Translates to `~a` in the Godot Shader Language.
	func_bitwise_not = 1
	// Represents the size of the [enum Function] enum.
	func_max = 2
}

enum VisualShaderNodeUIntOpOperator #

enum VisualShaderNodeUIntOpOperator as i64 {
	// Sums two numbers using `a + b`.
	op_add = 0
	// Subtracts two numbers using `a - b`.
	op_sub = 1
	// Multiplies two numbers using `a * b`.
	op_mul = 2
	// Divides two numbers using `a / b`.
	op_div = 3
	// Calculates the remainder of two numbers using `a % b`.
	op_mod = 4
	// Returns the greater of two numbers. Translates to `max(a, b)` in the Godot Shader Language.
	op_max = 5
	// Returns the lesser of two numbers. Translates to `max(a, b)` in the Godot Shader Language.
	op_min = 6
	// Returns the result of bitwise `AND` operation on the integer. Translates to `a & b` in the Godot Shader Language.
	op_bitwise_and = 7
	// Returns the result of bitwise `OR` operation for two integers. Translates to `a | b` in the Godot Shader Language.
	op_bitwise_or = 8
	// Returns the result of bitwise `XOR` operation for two integers. Translates to `a ^ b` in the Godot Shader Language.
	op_bitwise_xor = 9
	// Returns the result of bitwise left shift operation on the integer. Translates to `a << b` in the Godot Shader Language.
	op_bitwise_left_shift = 10
	// Returns the result of bitwise right shift operation on the integer. Translates to `a >> b` in the Godot Shader Language.
	op_bitwise_right_shift = 11
	// Represents the size of the [enum Operator] enum.
	op_enum_size = 12
}

enum VisualShaderNodeUVFuncFunction #

enum VisualShaderNodeUVFuncFunction as i64 {
	// Translates `uv` by using `scale` and `offset` values using the following formula: `uv = uv + offset * scale`. `uv` port is connected to `UV` built-in by default.
	func_panning = 0
	// Scales `uv` by using `scale` and `pivot` values using the following formula: `uv = (uv - pivot) * scale + pivot`. `uv` port is connected to `UV` built-in by default.
	func_scaling = 1
	// Represents the size of the [enum Function] enum.
	func_max = 2
}

enum VisualShaderNodeVectorBaseOpType #

enum VisualShaderNodeVectorBaseOpType as i64 {
	// A 2D vector type.
	op_type_vector_2d = 0
	// A 3D vector type.
	op_type_vector_3d = 1
	// A 4D vector type.
	op_type_vector_4d = 2
	// Represents the size of the [enum OpType] enum.
	op_type_max = 3
}

enum VisualShaderNodeVectorFuncFunction #

enum VisualShaderNodeVectorFuncFunction as i64 {
	// Normalizes the vector so that it has a length of `1` but points in the same direction.
	func_normalize = 0
	// Clamps the value between `0.0` and `1.0`.
	func_saturate = 1
	// Returns the opposite value of the parameter.
	func_negate = 2
	// Returns `1/vector`.
	func_reciprocal = 3
	// Returns the absolute value of the parameter.
	func_abs = 4
	// Returns the arc-cosine of the parameter.
	func_acos = 5
	// Returns the inverse hyperbolic cosine of the parameter.
	func_acosh = 6
	// Returns the arc-sine of the parameter.
	func_asin = 7
	// Returns the inverse hyperbolic sine of the parameter.
	func_asinh = 8
	// Returns the arc-tangent of the parameter.
	func_atan = 9
	// Returns the inverse hyperbolic tangent of the parameter.
	func_atanh = 10
	// Finds the nearest integer that is greater than or equal to the parameter.
	func_ceil = 11
	// Returns the cosine of the parameter.
	func_cos = 12
	// Returns the hyperbolic cosine of the parameter.
	func_cosh = 13
	// Converts a quantity in radians to degrees.
	func_degrees = 14
	// Base-e Exponential.
	func_exp = 15
	// Base-2 Exponential.
	func_exp2 = 16
	// Finds the nearest integer less than or equal to the parameter.
	func_floor = 17
	// Computes the fractional part of the argument.
	func_fract = 18
	// Returns the inverse of the square root of the parameter.
	func_inverse_sqrt = 19
	// Natural logarithm.
	func_log = 20
	// Base-2 logarithm.
	func_log2 = 21
	// Converts a quantity in degrees to radians.
	func_radians = 22
	// Finds the nearest integer to the parameter.
	func_round = 23
	// Finds the nearest even integer to the parameter.
	func_roundeven = 24
	// Extracts the sign of the parameter, i.e. returns `-1` if the parameter is negative, `1` if it's positive and `0` otherwise.
	func_sign = 25
	// Returns the sine of the parameter.
	func_sin = 26
	// Returns the hyperbolic sine of the parameter.
	func_sinh = 27
	// Returns the square root of the parameter.
	func_sqrt = 28
	// Returns the tangent of the parameter.
	func_tan = 29
	// Returns the hyperbolic tangent of the parameter.
	func_tanh = 30
	// Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter.
	func_trunc = 31
	// Returns `1.0 - vector`.
	func_oneminus = 32
	// Represents the size of the [enum Function] enum.
	func_max = 33
}

enum VisualShaderNodeVectorOpOperator #

enum VisualShaderNodeVectorOpOperator as i64 {
	// Adds two vectors.
	op_add = 0
	// Subtracts a vector from a vector.
	op_sub = 1
	// Multiplies two vectors.
	op_mul = 2
	// Divides vector by vector.
	op_div = 3
	// Returns the remainder of the two vectors.
	op_mod = 4
	// Returns the value of the first parameter raised to the power of the second, for each component of the vectors.
	op_pow = 5
	// Returns the greater of two values, for each component of the vectors.
	op_max = 6
	// Returns the lesser of two values, for each component of the vectors.
	op_min = 7
	// Calculates the cross product of two vectors.
	op_cross = 8
	// Returns the arc-tangent of the parameters.
	op_atan2 = 9
	// Returns the vector that points in the direction of reflection. `a` is incident vector and `b` is the normal vector.
	op_reflect = 10
	// Vector step operator. Returns `0.0` if `a` is smaller than `b` and `1.0` otherwise.
	op_step = 11
	// Represents the size of the [enum Operator] enum.
	op_enum_size = 12
}

enum VisualShaderType #

enum VisualShaderType as i64 {
	// A vertex shader, operating on vertices.
	type_vertex = 0
	// A fragment shader, operating on fragments (pixels).
	type_fragment = 1
	// A shader for light calculations.
	type_light = 2
	// A function for the "start" stage of particle shader.
	type_start = 3
	// A function for the "process" stage of particle shader.
	type_process = 4
	// A function for the "collide" stage (particle collision handler) of particle shader.
	type_collide = 5
	// A function for the "start" stage of particle shader, with customized output.
	type_start_custom = 6
	// A function for the "process" stage of particle shader, with customized output.
	type_process_custom = 7
	// A shader for 3D environment's sky.
	type_sky = 8
	// A compute shader that runs for each froxel of the volumetric fog map.
	type_fog = 9
	// Represents the size of the [enum Type] enum.
	type_max = 10
}

enum VisualShaderVaryingMode #

enum VisualShaderVaryingMode as i64 {
	// Varying is passed from `Vertex` function to `Fragment` and `Light` functions.
	varying_mode_vertex_to_frag_light = 0
	// Varying is passed from `Fragment` function to `Light` function.
	varying_mode_frag_to_light = 1
	// Represents the size of the [enum VaryingMode] enum.
	varying_mode_max = 2
}

enum VisualShaderVaryingType #

enum VisualShaderVaryingType as i64 {
	// Varying is of type [float].
	varying_type_float = 0
	// Varying is of type [int].
	varying_type_int = 1
	// Varying is of type unsigned [int].
	varying_type_uint = 2
	// Varying is of type [Vector2].
	varying_type_vector_2d = 3
	// Varying is of type [Vector3].
	varying_type_vector_3d = 4
	// Varying is of type [Vector4].
	varying_type_vector_4d = 5
	// Varying is of type [bool].
	varying_type_boolean = 6
	// Varying is of type [Transform3D].
	varying_type_transform = 7
	// Represents the size of the [enum VaryingType] enum.
	varying_type_max = 8
}

enum VoxelGISubdiv #

enum VoxelGISubdiv as i64 {
	// Use 64 subdivisions. This is the lowest quality setting, but the fastest. Use it if you can, but especially use it on lower-end hardware.
	subdiv_64 = 0
	// Use 128 subdivisions. This is the default quality setting.
	subdiv_128 = 1
	// Use 256 subdivisions.
	subdiv_256 = 2
	// Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware, this could cause the GPU to stall.
	subdiv_512 = 3
	// Represents the size of the [enum Subdiv] enum.
	subdiv_max = 4
}

enum WebRTCDataChannelChannelState #

enum WebRTCDataChannelChannelState as i64 {
	// The channel was created, but it's still trying to connect.
	state_connecting = 0
	// The channel is currently open, and data can flow over it.
	state_open = 1
	// The channel is being closed, no new messages will be accepted, but those already in queue will be flushed.
	state_closing = 2
	// The channel was closed, or connection failed.
	state_closed = 3
}

enum WebRTCDataChannelWriteMode #

enum WebRTCDataChannelWriteMode as i64 {
	// Tells the channel to send data over this channel as text. An external peer (non-Godot) would receive this as a string.
	write_mode_text = 0
	// Tells the channel to send data over this channel as binary. An external peer (non-Godot) would receive this as array buffer or blob.
	write_mode_binary = 1
}

enum WebRTCPeerConnectionConnectionState #

enum WebRTCPeerConnectionConnectionState as i64 {
	// The connection is new, data channels and an offer can be created in this state.
	state_new = 0
	// The peer is connecting, ICE is in progress, none of the transports has failed.
	state_connecting = 1
	// The peer is connected, all ICE transports are connected.
	state_connected = 2
	// At least one ICE transport is disconnected.
	state_disconnected = 3
	// One or more of the ICE transports failed.
	state_failed = 4
	// The peer connection is closed (after calling [method close] for example).
	state_closed = 5
}

enum WebRTCPeerConnectionGatheringState #

enum WebRTCPeerConnectionGatheringState as i64 {
	// The peer connection was just created and hasn't done any networking yet.
	gathering_state_new = 0
	// The ICE agent is in the process of gathering candidates for the connection.
	gathering_state_gathering = 1
	// The ICE agent has finished gathering candidates. If something happens that requires collecting new candidates, such as a new interface being added or the addition of a new ICE server, the state will revert to gathering to gather those candidates.
	gathering_state_complete = 2
}

enum WebRTCPeerConnectionSignalingState #

enum WebRTCPeerConnectionSignalingState as i64 {
	// There is no ongoing exchange of offer and answer underway. This may mean that the [WebRTCPeerConnection] is new ([constant STATE_NEW]) or that negotiation is complete and a connection has been established ([constant STATE_CONNECTED]).
	signaling_state_stable = 0
	// The local peer has called [method set_local_description], passing in SDP representing an offer (usually created by calling [method create_offer]), and the offer has been applied successfully.
	signaling_state_have_local_offer = 1
	// The remote peer has created an offer and used the signaling server to deliver it to the local peer, which has set the offer as the remote description by calling [method set_remote_description].
	signaling_state_have_remote_offer = 2
	// The offer sent by the remote peer has been applied and an answer has been created and applied by calling [method set_local_description]. This provisional answer describes the supported media formats and so forth, but may not have a complete set of ICE candidates included. Further candidates will be delivered separately later.
	signaling_state_have_local_pranswer = 3
	// A provisional answer has been received and successfully applied in response to an offer previously sent and established by calling [method set_local_description].
	signaling_state_have_remote_pranswer = 4
	// The [WebRTCPeerConnection] has been closed.
	signaling_state_closed = 5
}

enum WebSocketPeerState #

enum WebSocketPeerState as i64 {
	// Socket has been created. The connection is not yet open.
	state_connecting = 0
	// The connection is open and ready to communicate.
	state_open = 1
	// The connection is in the process of closing. This means a close request has been sent to the remote peer but confirmation has not been received.
	state_closing = 2
	// The connection is closed or couldn't be opened.
	state_closed = 3
}

enum WebSocketPeerWriteMode #

enum WebSocketPeerWriteMode as i64 {
	// Specifies that WebSockets messages should be transferred as text payload (only valid UTF-8 is allowed).
	write_mode_text = 0
	// Specifies that WebSockets messages should be transferred as binary payload (any byte combination is allowed).
	write_mode_binary = 1
}

enum WebXRInterfaceTargetRayMode #

enum WebXRInterfaceTargetRayMode as i64 {
	// We don't know the target ray mode.
	target_ray_mode_unknown = 0
	// Target ray originates at the viewer's eyes and points in the direction they are looking.
	target_ray_mode_gaze = 1
	// Target ray from a handheld pointer, most likely a VR touch controller.
	target_ray_mode_tracked_pointer = 2
	// Target ray from touch screen, mouse or other tactile input device.
	target_ray_mode_screen = 3
}

enum WindowContentScaleAspect #

enum WindowContentScaleAspect as i64 {
	// The aspect will be ignored. Scaling will simply stretch the content to fit the target size.
	content_scale_aspect_ignore = 0
	// The content's aspect will be preserved. If the target size has different aspect from the base one, the image will be centered and black bars will appear on left and right sides.
	content_scale_aspect_keep = 1
	// The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides.
	content_scale_aspect_keep_width = 2
	// The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides.
	content_scale_aspect_keep_height = 3
	// The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the top-left corner and add an extra visible area in the stretched space.
	content_scale_aspect_expand = 4
}

enum WindowContentScaleMode #

enum WindowContentScaleMode as i64 {
	// The content will not be scaled to match the [Window]'s size.
	content_scale_mode_disabled = 0
	// The content will be rendered at the target size. This is more performance-expensive than [constant CONTENT_SCALE_MODE_VIEWPORT], but provides better results.
	content_scale_mode_canvas_items = 1
	// The content will be rendered at the base size and then scaled to the target size. More performant than [constant CONTENT_SCALE_MODE_CANVAS_ITEMS], but results in pixelated image.
	content_scale_mode_viewport = 2
}

enum WindowContentScaleStretch #

enum WindowContentScaleStretch as i64 {
	// The content will be stretched according to a fractional factor. This fills all the space available in the window, but allows "pixel wobble" to occur due to uneven pixel scaling.
	content_scale_stretch_fractional = 0
	// The content will be stretched only according to an integer factor, preserving sharp pixels. This may leave a black background visible on the window's edges depending on the window size.
	content_scale_stretch_integer = 1
}

enum WindowFlags #

enum WindowFlags as i64 {
	// The window can't be resized by dragging its resize grip. It's still possible to resize the window using [member size]. This flag is ignored for full screen windows. Set with [member unresizable].
	flag_resize_disabled = 0
	// The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Set with [member borderless].
	flag_borderless = 1
	// The window is floating on top of all other windows. This flag is ignored for full-screen windows. Set with [member always_on_top].
	flag_always_on_top = 2
	// The window background can be transparent. Set with [member transparent].
	// [b]Note:[/b] This flag has no effect if either [member ProjectSettings.display/window/per_pixel_transparency/allowed], or the window's [member Viewport.transparent_bg] is set to `false`.
	flag_transparent = 3
	// The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with [member unfocusable].
	flag_no_focus = 4
	// Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see [member transient]).
	// [b]Note:[/b] This flag has no effect in embedded windows (unless said window is a [Popup]).
	flag_popup = 5
	// Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Set with [member extend_to_title].
	// [b]Note:[/b] This flag is implemented only on macOS.
	// [b]Note:[/b] This flag has no effect in embedded windows.
	flag_extend_to_title = 6
	// All mouse events are passed to the underlying window of the same application.
	// [b]Note:[/b] This flag has no effect in embedded windows.
	flag_mouse_passthrough = 7
	// Window style is overridden, forcing sharp corners.
	// [b]Note:[/b] This flag has no effect in embedded windows.
	// [b]Note:[/b] This flag is implemented only on Windows (11).
	flag_sharp_corners = 8
	// Windows is excluded from screenshots taken by [method DisplayServer.screen_get_image], [method DisplayServer.screen_get_image_rect], and [method DisplayServer.screen_get_pixel].
	// [b]Note:[/b] This flag is implemented on macOS and Windows.
	// [b]Note:[/b] Setting this flag will prevent standard screenshot methods from capturing a window image, but does [b]NOT[/b] guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.
	flag_exclude_from_capture = 9
	// Signals the window manager that this window is supposed to be an implementation-defined "popup" (usually a floating, borderless, untileable and immovable child window).
	flag_popup_wm_hint = 10
	// Window minimize button is disabled.
	// [b]Note:[/b] This flag is implemented on macOS and Windows.
	flag_minimize_disabled = 11
	// Window maximize button is disabled.
	// [b]Note:[/b] This flag is implemented on macOS and Windows.
	flag_maximize_disabled = 12
	// Max value of the [enum Flags].
	flag_max = 13
}

enum WindowInitialPosition #

enum WindowInitialPosition as i64 {
	// Initial window position is determined by [member position].
	window_initial_position_absolute = 0
	// Initial window position is the center of the primary screen.
	window_initial_position_center_primary_screen = 1
	// Initial window position is the center of the main window screen.
	window_initial_position_center_main_window_screen = 2
	// Initial window position is the center of [member current_screen] screen.
	window_initial_position_center_other_screen = 3
	// Initial window position is the center of the screen containing the mouse pointer.
	window_initial_position_center_screen_with_mouse_focus = 4
	// Initial window position is the center of the screen containing the window with the keyboard focus.
	window_initial_position_center_screen_with_keyboard_focus = 5
}

enum WindowLayoutDirection #

enum WindowLayoutDirection as i64 {
	// Automatic layout direction, determined from the parent window layout direction.
	layout_direction_inherited = 0
	// Automatic layout direction, determined from the current locale.
	layout_direction_application_locale = 1
	// Left-to-right layout direction.
	layout_direction_ltr = 2
	// Right-to-left layout direction.
	layout_direction_rtl = 3
	// Automatic layout direction, determined from the system locale.
	layout_direction_system_locale = 4
	// Represents the size of the [enum LayoutDirection] enum.
	layout_direction_max = 5
}

enum WindowMode #

enum WindowMode as i64 {
	// Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen).
	mode_windowed = 0
	// Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is pressed.
	mode_minimized = 1
	// Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed.
	mode_maximized = 2
	// Full screen mode with full multi-window support.
	// Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed.
	// [b]On Android:[/b] This enables immersive mode.
	// [b]On macOS:[/b] A new desktop is used to display the running project.
	// [b]Note:[/b] Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
	mode_fullscreen = 3
	// A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition).
	// Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed.
	// [b]Note:[/b] This mode might not work with screen recording software.
	// [b]On Android:[/b] This enables immersive mode.
	// [b]On Windows:[/b] Depending on video driver, full screen transition might cause screens to go black for a moment.
	// [b]On macOS:[/b] A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen.
	// [b]On Linux (X11):[/b] Exclusive full screen mode bypasses compositor.
	// [b]On Linux (Wayland):[/b] Equivalent to [constant MODE_FULLSCREEN].
	// [b]Note:[/b] Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
	mode_exclusive_fullscreen = 4
}

enum XMLParserNodeType #

enum XMLParserNodeType as i64 {
	// There's no node (no file or buffer opened).
	node_none = 0
	// An element node type, also known as a tag, e.g. ``.</span>
	node_element <span class="token operator">=</span> <span class="token number">1</span>
	<span class="token comment">// An end of element node type, e.g. ``.
	node_element_end = 2
	// A text node type, i.e. text that is not inside an element. This includes whitespace.
	node_text = 3
	// A comment node type, e.g. ``.
	node_comment = 4
	// A node type for CDATA (Character Data) sections, e.g. ``.
	node_cdata = 5
	// An unknown node type.
	node_unknown = 6
}

enum XRBodyModifier3DBodyUpdate #

enum XRBodyModifier3DBodyUpdate as i64 {
	// The skeleton's upper body joints are updated.
	body_update_upper_body = 1
	// The skeleton's lower body joints are updated.
	body_update_lower_body = 2
	// The skeleton's hand joints are updated.
	body_update_hands = 4
}

enum XRBodyModifier3DBoneUpdate #

enum XRBodyModifier3DBoneUpdate as i64 {
	// The skeleton's bones are fully updated (both position and rotation) to match the tracked bones.
	bone_update_full = 0
	// The skeleton's bones are only rotated to align with the tracked bones, preserving bone length.
	bone_update_rotation_only = 1
	// Represents the size of the [enum BoneUpdate] enum.
	bone_update_max = 2
}

enum XRBodyTrackerBodyFlags #

enum XRBodyTrackerBodyFlags as i64 {
	// Upper body tracking supported.
	body_flag_upper_body_supported = 1
	// Lower body tracking supported.
	body_flag_lower_body_supported = 2
	// Hand tracking supported.
	body_flag_hands_supported = 4
}

enum XRBodyTrackerJoint #

enum XRBodyTrackerJoint as i64 {
	// Root joint.
	joint_root = 0
	// Hips joint.
	joint_hips = 1
	// Spine joint.
	joint_spine = 2
	// Chest joint.
	joint_chest = 3
	// Upper chest joint.
	joint_upper_chest = 4
	// Neck joint.
	joint_neck = 5
	// Head joint.
	joint_head = 6
	// Head tip joint.
	joint_head_tip = 7
	// Left shoulder joint.
	joint_left_shoulder = 8
	// Left upper arm joint.
	joint_left_upper_arm = 9
	// Left lower arm joint.
	joint_left_lower_arm = 10
	// Right shoulder joint.
	joint_right_shoulder = 11
	// Right upper arm joint.
	joint_right_upper_arm = 12
	// Right lower arm joint.
	joint_right_lower_arm = 13
	// Left upper leg joint.
	joint_left_upper_leg = 14
	// Left lower leg joint.
	joint_left_lower_leg = 15
	// Left foot joint.
	joint_left_foot = 16
	// Left toes joint.
	joint_left_toes = 17
	// Right upper leg joint.
	joint_right_upper_leg = 18
	// Right lower leg joint.
	joint_right_lower_leg = 19
	// Right foot joint.
	joint_right_foot = 20
	// Right toes joint.
	joint_right_toes = 21
	// Left hand joint.
	joint_left_hand = 22
	// Left palm joint.
	joint_left_palm = 23
	// Left wrist joint.
	joint_left_wrist = 24
	// Left thumb metacarpal joint.
	joint_left_thumb_metacarpal = 25
	// Left thumb phalanx proximal joint.
	joint_left_thumb_phalanx_proximal = 26
	// Left thumb phalanx distal joint.
	joint_left_thumb_phalanx_distal = 27
	// Left thumb tip joint.
	joint_left_thumb_tip = 28
	// Left index finger metacarpal joint.
	joint_left_index_finger_metacarpal = 29
	// Left index finger phalanx proximal joint.
	joint_left_index_finger_phalanx_proximal = 30
	// Left index finger phalanx intermediate joint.
	joint_left_index_finger_phalanx_intermediate = 31
	// Left index finger phalanx distal joint.
	joint_left_index_finger_phalanx_distal = 32
	// Left index finger tip joint.
	joint_left_index_finger_tip = 33
	// Left middle finger metacarpal joint.
	joint_left_middle_finger_metacarpal = 34
	// Left middle finger phalanx proximal joint.
	joint_left_middle_finger_phalanx_proximal = 35
	// Left middle finger phalanx intermediate joint.
	joint_left_middle_finger_phalanx_intermediate = 36
	// Left middle finger phalanx distal joint.
	joint_left_middle_finger_phalanx_distal = 37
	// Left middle finger tip joint.
	joint_left_middle_finger_tip = 38
	// Left ring finger metacarpal joint.
	joint_left_ring_finger_metacarpal = 39
	// Left ring finger phalanx proximal joint.
	joint_left_ring_finger_phalanx_proximal = 40
	// Left ring finger phalanx intermediate joint.
	joint_left_ring_finger_phalanx_intermediate = 41
	// Left ring finger phalanx distal joint.
	joint_left_ring_finger_phalanx_distal = 42
	// Left ring finger tip joint.
	joint_left_ring_finger_tip = 43
	// Left pinky finger metacarpal joint.
	joint_left_pinky_finger_metacarpal = 44
	// Left pinky finger phalanx proximal joint.
	joint_left_pinky_finger_phalanx_proximal = 45
	// Left pinky finger phalanx intermediate joint.
	joint_left_pinky_finger_phalanx_intermediate = 46
	// Left pinky finger phalanx distal joint.
	joint_left_pinky_finger_phalanx_distal = 47
	// Left pinky finger tip joint.
	joint_left_pinky_finger_tip = 48
	// Right hand joint.
	joint_right_hand = 49
	// Right palm joint.
	joint_right_palm = 50
	// Right wrist joint.
	joint_right_wrist = 51
	// Right thumb metacarpal joint.
	joint_right_thumb_metacarpal = 52
	// Right thumb phalanx proximal joint.
	joint_right_thumb_phalanx_proximal = 53
	// Right thumb phalanx distal joint.
	joint_right_thumb_phalanx_distal = 54
	// Right thumb tip joint.
	joint_right_thumb_tip = 55
	// Right index finger metacarpal joint.
	joint_right_index_finger_metacarpal = 56
	// Right index finger phalanx proximal joint.
	joint_right_index_finger_phalanx_proximal = 57
	// Right index finger phalanx intermediate joint.
	joint_right_index_finger_phalanx_intermediate = 58
	// Right index finger phalanx distal joint.
	joint_right_index_finger_phalanx_distal = 59
	// Right index finger tip joint.
	joint_right_index_finger_tip = 60
	// Right middle finger metacarpal joint.
	joint_right_middle_finger_metacarpal = 61
	// Right middle finger phalanx proximal joint.
	joint_right_middle_finger_phalanx_proximal = 62
	// Right middle finger phalanx intermediate joint.
	joint_right_middle_finger_phalanx_intermediate = 63
	// Right middle finger phalanx distal joint.
	joint_right_middle_finger_phalanx_distal = 64
	// Right middle finger tip joint.
	joint_right_middle_finger_tip = 65
	// Right ring finger metacarpal joint.
	joint_right_ring_finger_metacarpal = 66
	// Right ring finger phalanx proximal joint.
	joint_right_ring_finger_phalanx_proximal = 67
	// Right ring finger phalanx intermediate joint.
	joint_right_ring_finger_phalanx_intermediate = 68
	// Right ring finger phalanx distal joint.
	joint_right_ring_finger_phalanx_distal = 69
	// Right ring finger tip joint.
	joint_right_ring_finger_tip = 70
	// Right pinky finger metacarpal joint.
	joint_right_pinky_finger_metacarpal = 71
	// Right pinky finger phalanx proximal joint.
	joint_right_pinky_finger_phalanx_proximal = 72
	// Right pinky finger phalanx intermediate joint.
	joint_right_pinky_finger_phalanx_intermediate = 73
	// Right pinky finger phalanx distal joint.
	joint_right_pinky_finger_phalanx_distal = 74
	// Right pinky finger tip joint.
	joint_right_pinky_finger_tip = 75
	// Lower chest joint.
	joint_lower_chest = 76
	// Left scapula joint.
	joint_left_scapula = 77
	// Left wrist twist joint.
	joint_left_wrist_twist = 78
	// Right scapula joint.
	joint_right_scapula = 79
	// Right wrist twist joint.
	joint_right_wrist_twist = 80
	// Left ankle twist joint.
	joint_left_ankle_twist = 81
	// Left ankle joint.
	joint_left_ankle = 82
	// Left middle foot joint.
	joint_left_middle_foot = 83
	// Right ankle twist joint.
	joint_right_ankle_twist = 84
	// Right ankle joint.
	joint_right_ankle = 85
	// Right middle foot joint.
	joint_right_middle_foot = 86
	// Represents the size of the [enum Joint] enum.
	joint_max = 87
}

enum XRBodyTrackerJointFlags #

enum XRBodyTrackerJointFlags as i64 {
	// The joint's orientation data is valid.
	joint_flag_orientation_valid = 1
	// The joint's orientation is actively tracked. May not be set if tracking has been temporarily lost.
	joint_flag_orientation_tracked = 2
	// The joint's position data is valid.
	joint_flag_position_valid = 4
	// The joint's position is actively tracked. May not be set if tracking has been temporarily lost.
	joint_flag_position_tracked = 8
}

enum XRFaceTrackerBlendShapeEntry #

enum XRFaceTrackerBlendShapeEntry as i64 {
	// Right eye looks outwards.
	ft_eye_look_out_right = 0
	// Right eye looks inwards.
	ft_eye_look_in_right = 1
	// Right eye looks upwards.
	ft_eye_look_up_right = 2
	// Right eye looks downwards.
	ft_eye_look_down_right = 3
	// Left eye looks outwards.
	ft_eye_look_out_left = 4
	// Left eye looks inwards.
	ft_eye_look_in_left = 5
	// Left eye looks upwards.
	ft_eye_look_up_left = 6
	// Left eye looks downwards.
	ft_eye_look_down_left = 7
	// Closes the right eyelid.
	ft_eye_closed_right = 8
	// Closes the left eyelid.
	ft_eye_closed_left = 9
	// Squeezes the right eye socket muscles.
	ft_eye_squint_right = 10
	// Squeezes the left eye socket muscles.
	ft_eye_squint_left = 11
	// Right eyelid widens beyond relaxed.
	ft_eye_wide_right = 12
	// Left eyelid widens beyond relaxed.
	ft_eye_wide_left = 13
	// Dilates the right eye pupil.
	ft_eye_dilation_right = 14
	// Dilates the left eye pupil.
	ft_eye_dilation_left = 15
	// Constricts the right eye pupil.
	ft_eye_constrict_right = 16
	// Constricts the left eye pupil.
	ft_eye_constrict_left = 17
	// Right eyebrow pinches in.
	ft_brow_pinch_right = 18
	// Left eyebrow pinches in.
	ft_brow_pinch_left = 19
	// Outer right eyebrow pulls down.
	ft_brow_lowerer_right = 20
	// Outer left eyebrow pulls down.
	ft_brow_lowerer_left = 21
	// Inner right eyebrow pulls up.
	ft_brow_inner_up_right = 22
	// Inner left eyebrow pulls up.
	ft_brow_inner_up_left = 23
	// Outer right eyebrow pulls up.
	ft_brow_outer_up_right = 24
	// Outer left eyebrow pulls up.
	ft_brow_outer_up_left = 25
	// Right side face sneers.
	ft_nose_sneer_right = 26
	// Left side face sneers.
	ft_nose_sneer_left = 27
	// Right side nose canal dilates.
	ft_nasal_dilation_right = 28
	// Left side nose canal dilates.
	ft_nasal_dilation_left = 29
	// Right side nose canal constricts.
	ft_nasal_constrict_right = 30
	// Left side nose canal constricts.
	ft_nasal_constrict_left = 31
	// Raises the right side cheek.
	ft_cheek_squint_right = 32
	// Raises the left side cheek.
	ft_cheek_squint_left = 33
	// Puffs the right side cheek.
	ft_cheek_puff_right = 34
	// Puffs the left side cheek.
	ft_cheek_puff_left = 35
	// Sucks in the right side cheek.
	ft_cheek_suck_right = 36
	// Sucks in the left side cheek.
	ft_cheek_suck_left = 37
	// Opens jawbone.
	ft_jaw_open = 38
	// Closes the mouth.
	ft_mouth_closed = 39
	// Pushes jawbone right.
	ft_jaw_right = 40
	// Pushes jawbone left.
	ft_jaw_left = 41
	// Pushes jawbone forward.
	ft_jaw_forward = 42
	// Pushes jawbone backward.
	ft_jaw_backward = 43
	// Flexes jaw muscles.
	ft_jaw_clench = 44
	// Raises the jawbone.
	ft_jaw_mandible_raise = 45
	// Upper right lip part tucks in the mouth.
	ft_lip_suck_upper_right = 46
	// Upper left lip part tucks in the mouth.
	ft_lip_suck_upper_left = 47
	// Lower right lip part tucks in the mouth.
	ft_lip_suck_lower_right = 48
	// Lower left lip part tucks in the mouth.
	ft_lip_suck_lower_left = 49
	// Right lip corner folds into the mouth.
	ft_lip_suck_corner_right = 50
	// Left lip corner folds into the mouth.
	ft_lip_suck_corner_left = 51
	// Upper right lip part pushes into a funnel.
	ft_lip_funnel_upper_right = 52
	// Upper left lip part pushes into a funnel.
	ft_lip_funnel_upper_left = 53
	// Lower right lip part pushes into a funnel.
	ft_lip_funnel_lower_right = 54
	// Lower left lip part pushes into a funnel.
	ft_lip_funnel_lower_left = 55
	// Upper right lip part pushes outwards.
	ft_lip_pucker_upper_right = 56
	// Upper left lip part pushes outwards.
	ft_lip_pucker_upper_left = 57
	// Lower right lip part pushes outwards.
	ft_lip_pucker_lower_right = 58
	// Lower left lip part pushes outwards.
	ft_lip_pucker_lower_left = 59
	// Upper right part of the lip pulls up.
	ft_mouth_upper_up_right = 60
	// Upper left part of the lip pulls up.
	ft_mouth_upper_up_left = 61
	// Lower right part of the lip pulls up.
	ft_mouth_lower_down_right = 62
	// Lower left part of the lip pulls up.
	ft_mouth_lower_down_left = 63
	// Upper right lip part pushes in the cheek.
	ft_mouth_upper_deepen_right = 64
	// Upper left lip part pushes in the cheek.
	ft_mouth_upper_deepen_left = 65
	// Moves upper lip right.
	ft_mouth_upper_right = 66
	// Moves upper lip left.
	ft_mouth_upper_left = 67
	// Moves lower lip right.
	ft_mouth_lower_right = 68
	// Moves lower lip left.
	ft_mouth_lower_left = 69
	// Right lip corner pulls diagonally up and out.
	ft_mouth_corner_pull_right = 70
	// Left lip corner pulls diagonally up and out.
	ft_mouth_corner_pull_left = 71
	// Right corner lip slants up.
	ft_mouth_corner_slant_right = 72
	// Left corner lip slants up.
	ft_mouth_corner_slant_left = 73
	// Right corner lip pulls down.
	ft_mouth_frown_right = 74
	// Left corner lip pulls down.
	ft_mouth_frown_left = 75
	// Mouth corner lip pulls out and down.
	ft_mouth_stretch_right = 76
	// Mouth corner lip pulls out and down.
	ft_mouth_stretch_left = 77
	// Right lip corner is pushed backwards.
	ft_mouth_dimple_right = 78
	// Left lip corner is pushed backwards.
	ft_mouth_dimple_left = 79
	// Raises and slightly pushes out the upper mouth.
	ft_mouth_raiser_upper = 80
	// Raises and slightly pushes out the lower mouth.
	ft_mouth_raiser_lower = 81
	// Right side lips press and flatten together vertically.
	ft_mouth_press_right = 82
	// Left side lips press and flatten together vertically.
	ft_mouth_press_left = 83
	// Right side lips squeeze together horizontally.
	ft_mouth_tightener_right = 84
	// Left side lips squeeze together horizontally.
	ft_mouth_tightener_left = 85
	// Tongue visibly sticks out of the mouth.
	ft_tongue_out = 86
	// Tongue points upwards.
	ft_tongue_up = 87
	// Tongue points downwards.
	ft_tongue_down = 88
	// Tongue points right.
	ft_tongue_right = 89
	// Tongue points left.
	ft_tongue_left = 90
	// Sides of the tongue funnel, creating a roll.
	ft_tongue_roll = 91
	// Tongue arches up then down inside the mouth.
	ft_tongue_blend_down = 92
	// Tongue arches down then up inside the mouth.
	ft_tongue_curl_up = 93
	// Tongue squishes together and thickens.
	ft_tongue_squish = 94
	// Tongue flattens and thins out.
	ft_tongue_flat = 95
	// Tongue tip rotates clockwise, with the rest following gradually.
	ft_tongue_twist_right = 96
	// Tongue tip rotates counter-clockwise, with the rest following gradually.
	ft_tongue_twist_left = 97
	// Inner mouth throat closes.
	ft_soft_palate_close = 98
	// The Adam's apple visibly swallows.
	ft_throat_swallow = 99
	// Right side neck visibly flexes.
	ft_neck_flex_right = 100
	// Left side neck visibly flexes.
	ft_neck_flex_left = 101
	// Closes both eye lids.
	ft_eye_closed = 102
	// Widens both eye lids.
	ft_eye_wide = 103
	// Squints both eye lids.
	ft_eye_squint = 104
	// Dilates both pupils.
	ft_eye_dilation = 105
	// Constricts both pupils.
	ft_eye_constrict = 106
	// Pulls the right eyebrow down and in.
	ft_brow_down_right = 107
	// Pulls the left eyebrow down and in.
	ft_brow_down_left = 108
	// Pulls both eyebrows down and in.
	ft_brow_down = 109
	// Right brow appears worried.
	ft_brow_up_right = 110
	// Left brow appears worried.
	ft_brow_up_left = 111
	// Both brows appear worried.
	ft_brow_up = 112
	// Entire face sneers.
	ft_nose_sneer = 113
	// Both nose canals dilate.
	ft_nasal_dilation = 114
	// Both nose canals constrict.
	ft_nasal_constrict = 115
	// Puffs both cheeks.
	ft_cheek_puff = 116
	// Sucks in both cheeks.
	ft_cheek_suck = 117
	// Raises both cheeks.
	ft_cheek_squint = 118
	// Tucks in the upper lips.
	ft_lip_suck_upper = 119
	// Tucks in the lower lips.
	ft_lip_suck_lower = 120
	// Tucks in both lips.
	ft_lip_suck = 121
	// Funnels in the upper lips.
	ft_lip_funnel_upper = 122
	// Funnels in the lower lips.
	ft_lip_funnel_lower = 123
	// Funnels in both lips.
	ft_lip_funnel = 124
	// Upper lip part pushes outwards.
	ft_lip_pucker_upper = 125
	// Lower lip part pushes outwards.
	ft_lip_pucker_lower = 126
	// Lips push outwards.
	ft_lip_pucker = 127
	// Raises the upper lips.
	ft_mouth_upper_up = 128
	// Lowers the lower lips.
	ft_mouth_lower_down = 129
	// Mouth opens, revealing teeth.
	ft_mouth_open = 130
	// Moves mouth right.
	ft_mouth_right = 131
	// Moves mouth left.
	ft_mouth_left = 132
	// Right side of the mouth smiles.
	ft_mouth_smile_right = 133
	// Left side of the mouth smiles.
	ft_mouth_smile_left = 134
	// Mouth expresses a smile.
	ft_mouth_smile = 135
	// Right side of the mouth expresses sadness.
	ft_mouth_sad_right = 136
	// Left side of the mouth expresses sadness.
	ft_mouth_sad_left = 137
	// Mouth expresses sadness.
	ft_mouth_sad = 138
	// Mouth stretches.
	ft_mouth_stretch = 139
	// Lip corners dimple.
	ft_mouth_dimple = 140
	// Mouth tightens.
	ft_mouth_tightener = 141
	// Mouth presses together.
	ft_mouth_press = 142
	// Represents the size of the [enum BlendShapeEntry] enum.
	ft_max = 143
}

enum XRHandModifier3DBoneUpdate #

enum XRHandModifier3DBoneUpdate as i64 {
	// The skeleton's bones are fully updated (both position and rotation) to match the tracked bones.
	bone_update_full = 0
	// The skeleton's bones are only rotated to align with the tracked bones, preserving bone length.
	bone_update_rotation_only = 1
	// Represents the size of the [enum BoneUpdate] enum.
	bone_update_max = 2
}

enum XRHandTrackerHandJoint #

enum XRHandTrackerHandJoint as i64 {
	// Palm joint.
	hand_joint_palm = 0
	// Wrist joint.
	hand_joint_wrist = 1
	// Thumb metacarpal joint.
	hand_joint_thumb_metacarpal = 2
	// Thumb phalanx proximal joint.
	hand_joint_thumb_phalanx_proximal = 3
	// Thumb phalanx distal joint.
	hand_joint_thumb_phalanx_distal = 4
	// Thumb tip joint.
	hand_joint_thumb_tip = 5
	// Index finger metacarpal joint.
	hand_joint_index_finger_metacarpal = 6
	// Index finger phalanx proximal joint.
	hand_joint_index_finger_phalanx_proximal = 7
	// Index finger phalanx intermediate joint.
	hand_joint_index_finger_phalanx_intermediate = 8
	// Index finger phalanx distal joint.
	hand_joint_index_finger_phalanx_distal = 9
	// Index finger tip joint.
	hand_joint_index_finger_tip = 10
	// Middle finger metacarpal joint.
	hand_joint_middle_finger_metacarpal = 11
	// Middle finger phalanx proximal joint.
	hand_joint_middle_finger_phalanx_proximal = 12
	// Middle finger phalanx intermediate joint.
	hand_joint_middle_finger_phalanx_intermediate = 13
	// Middle finger phalanx distal joint.
	hand_joint_middle_finger_phalanx_distal = 14
	// Middle finger tip joint.
	hand_joint_middle_finger_tip = 15
	// Ring finger metacarpal joint.
	hand_joint_ring_finger_metacarpal = 16
	// Ring finger phalanx proximal joint.
	hand_joint_ring_finger_phalanx_proximal = 17
	// Ring finger phalanx intermediate joint.
	hand_joint_ring_finger_phalanx_intermediate = 18
	// Ring finger phalanx distal joint.
	hand_joint_ring_finger_phalanx_distal = 19
	// Ring finger tip joint.
	hand_joint_ring_finger_tip = 20
	// Pinky finger metacarpal joint.
	hand_joint_pinky_finger_metacarpal = 21
	// Pinky finger phalanx proximal joint.
	hand_joint_pinky_finger_phalanx_proximal = 22
	// Pinky finger phalanx intermediate joint.
	hand_joint_pinky_finger_phalanx_intermediate = 23
	// Pinky finger phalanx distal joint.
	hand_joint_pinky_finger_phalanx_distal = 24
	// Pinky finger tip joint.
	hand_joint_pinky_finger_tip = 25
	// Represents the size of the [enum HandJoint] enum.
	hand_joint_max = 26
}

enum XRHandTrackerHandJointFlags #

enum XRHandTrackerHandJointFlags as i64 {
	// The hand joint's orientation data is valid.
	hand_joint_flag_orientation_valid = 1
	// The hand joint's orientation is actively tracked. May not be set if tracking has been temporarily lost.
	hand_joint_flag_orientation_tracked = 2
	// The hand joint's position data is valid.
	hand_joint_flag_position_valid = 4
	// The hand joint's position is actively tracked. May not be set if tracking has been temporarily lost.
	hand_joint_flag_position_tracked = 8
	// The hand joint's linear velocity data is valid.
	hand_joint_flag_linear_velocity_valid = 16
	// The hand joint's angular velocity data is valid.
	hand_joint_flag_angular_velocity_valid = 32
}

enum XRHandTrackerHandTrackingSource #

enum XRHandTrackerHandTrackingSource as i64 {
	// The source of hand tracking data is unknown.
	hand_tracking_source_unknown = 0
	// The source of hand tracking data is unobstructed, meaning that an accurate method of hand tracking is used. These include optical hand tracking, data gloves, etc.
	hand_tracking_source_unobstructed = 1
	// The source of hand tracking data is a controller, meaning that joint positions are inferred from controller inputs.
	hand_tracking_source_controller = 2
	// No hand tracking data is tracked, this either means the hand is obscured, the controller is turned off, or tracking is not supported for the current input type.
	hand_tracking_source_not_tracked = 3
	// Represents the size of the [enum HandTrackingSource] enum.
	hand_tracking_source_max = 4
}

enum XRInterfaceCapabilities #

enum XRInterfaceCapabilities as i64 {
	// No XR capabilities.
	xr_none = 0
	// This interface can work with normal rendering output (non-HMD based AR).
	xr_mono = 1
	// This interface supports stereoscopic rendering.
	xr_stereo = 2
	// This interface supports quad rendering (not yet supported by Godot).
	xr_quad = 4
	// This interface supports VR.
	xr_vr = 8
	// This interface supports AR (video background and real world tracking).
	xr_ar = 16
	// This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_target_size]). Using a separate viewport node frees up the main viewport for other purposes.
	xr_external = 32
}

enum XRInterfaceEnvironmentBlendMode #

enum XRInterfaceEnvironmentBlendMode as i64 {
	// Opaque blend mode. This is typically used for VR devices.
	xr_env_blend_mode_opaque = 0
	// Additive blend mode. This is typically used for AR devices or VR devices with passthrough.
	xr_env_blend_mode_additive = 1
	// Alpha blend mode. This is typically used for AR or VR devices with passthrough capabilities. The alpha channel controls how much of the passthrough is visible. Alpha of 0.0 means the passthrough is visible and this pixel works in ADDITIVE mode. Alpha of 1.0 means that the passthrough is not visible and this pixel works in OPAQUE mode.
	xr_env_blend_mode_alpha_blend = 2
}

enum XRInterfacePlayAreaMode #

enum XRInterfacePlayAreaMode as i64 {
	// Play area mode not set or not available.
	xr_play_area_unknown = 0
	// Play area only supports orientation tracking, no positional tracking, area will center around player.
	xr_play_area_3dof = 1
	// Player is in seated position, limited positional tracking, fixed guardian around player.
	xr_play_area_sitting = 2
	// Player is free to move around, full positional tracking.
	xr_play_area_roomscale = 3
	// Same as [constant XR_PLAY_AREA_ROOMSCALE] but origin point is fixed to the center of the physical space. In this mode, system-level recentering may be disabled, requiring the use of [method XRServer.center_on_hmd].
	xr_play_area_stage = 4
	// Custom play area set by a GDExtension.
	xr_play_area_custom = 2147483647
}

enum XRInterfaceTrackingStatus #

enum XRInterfaceTrackingStatus as i64 {
	// Tracking is behaving as expected.
	xr_normal_tracking = 0
	// Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up).
	xr_excessive_motion = 1
	// Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc.
	xr_insufficient_features = 2
	// We don't know the status of the tracking or this interface does not provide feedback.
	xr_unknown_tracking = 3
	// Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.).
	xr_not_tracking = 4
}

enum XRInterfaceVRSTextureFormat #

enum XRInterfaceVRSTextureFormat as i64 {
	// The texture format is the same as returned by [method XRVRS.make_vrs_texture].
	xr_vrs_texture_format_unified = 0
	// The texture format is the same as expected by the Vulkan `VK_KHR_fragment_shading_rate` extension.
	xr_vrs_texture_format_fragment_shading_rate = 1
	// The texture format is the same as expected by the Vulkan `VK_EXT_fragment_density_map` extension.
	xr_vrs_texture_format_fragment_density_map = 2
}

enum XRPoseTrackingConfidence #

enum XRPoseTrackingConfidence as i64 {
	// No tracking information is available for this pose.
	xr_tracking_confidence_none = 0
	// Tracking information may be inaccurate or estimated. For example, with inside out tracking this would indicate a controller may be (partially) obscured.
	xr_tracking_confidence_low = 1
	// Tracking information is considered accurate and up to date.
	xr_tracking_confidence_high = 2
}

enum XRPositionalTrackerTrackerHand #

enum XRPositionalTrackerTrackerHand as i64 {
	// The hand this tracker is held in is unknown or not applicable.
	tracker_hand_unknown = 0
	// This tracker is the left hand controller.
	tracker_hand_left = 1
	// This tracker is the right hand controller.
	tracker_hand_right = 2
	// Represents the size of the [enum TrackerHand] enum.
	tracker_hand_max = 3
}

enum XRServerRotationMode #

enum XRServerRotationMode as i64 {
	// Fully reset the orientation of the HMD. Regardless of what direction the user is looking to in the real world. The user will look dead ahead in the virtual world.
	reset_full_rotation = 0
	// Resets the orientation but keeps the tilt of the device. So if we're looking down, we keep looking down but heading will be reset.
	reset_but_keep_tilt = 1
	// Does not reset the orientation of the HMD, only the position of the player gets centered.
	dont_reset_rotation = 2
}

enum XRServerTrackerType #

enum XRServerTrackerType as i64 {
	// The tracker tracks the location of the players head. This is usually a location centered between the players eyes. Note that for handheld AR devices this can be the current location of the device.
	tracker_head = 1
	// The tracker tracks the location of a controller.
	tracker_controller = 2
	// The tracker tracks the location of a base station.
	tracker_basestation = 4
	// The tracker tracks the location and size of an AR anchor.
	tracker_anchor = 8
	// The tracker tracks the location and joints of a hand.
	tracker_hand = 16
	// The tracker tracks the location and joints of a body.
	tracker_body = 32
	// The tracker tracks the expressions of a face.
	tracker_face = 64
	// Used internally to filter trackers of any known type.
	tracker_any_known = 127
	// Used internally if we haven't set the tracker type yet.
	tracker_unknown = 128
	// Used internally to select all trackers.
	tracker_any = 255
}

enum ZIPPackerCompressionLevel #

enum ZIPPackerCompressionLevel as i64 {
	// Start a file with the default Deflate compression level (`6`). This is a good compromise between speed and file size.
	compression_default = -1
	// Start a file with no compression. This is also known as the "Store" compression mode and is the fastest method of packing files inside a ZIP archive. Consider using this mode for files that are already compressed (such as JPEG, PNG, MP3, or Ogg Vorbis files).
	compression_none = 0
	// Start a file with the fastest Deflate compression level (`1`). This is fast to compress, but results in larger file sizes than [constant COMPRESSION_DEFAULT]. Decompression speed is generally unaffected by the chosen compression level.
	compression_fast = 1
	// Start a file with the best Deflate compression level (`9`). This is slow to compress, but results in smaller file sizes than [constant COMPRESSION_DEFAULT]. Decompression speed is generally unaffected by the chosen compression level.
	compression_best = 9
}

enum ZIPPackerZipAppend #

enum ZIPPackerZipAppend as i64 {
	// Create a new zip archive at the given path.
	append_create = 0
	// Append a new zip archive to the end of the already existing file at the given path.
	append_createafter = 1
	// Add new files to the existing zip archive at the given path.
	append_addinzip = 2
}

struct AABB #

@[packed]
struct AABB {
pub mut:
	// The origin point. This is usually the corner on the bottom-left and forward of the bounding box.
	position Vector3 // offset 0
	// The bounding box's width, height, and depth starting from [member position]. Setting this value also affects the [member end] point.
	// [b]Note:[/b] It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the [member position] is the bottom-left-forward corner, and the [member end] is the top-right-back corner. To get an equivalent bounding box with non-negative size, use [method abs].
	size Vector3 // offset 12
}

A 3D axis-aligned bounding box.

The [AABB] built-in [Variant] type represents an axis-aligned bounding box in a 3D space. It is defined by its [member position] and [member size], which are [Vector3]. It is frequently used for fast overlap tests (see [method intersects]). Although [AABB] itself is axis-aligned, it can be combined with [Transform3D] to represent a rotated or skewed bounding box. It uses floating-point coordinates. The 2D counterpart to [AABB] is [Rect2]. There is no version of [AABB] that uses integer coordinates. [b]Note:[/b] Negative values for [member size] are not supported. With negative size, most [AABB] methods do not work correctly. Use [method abs] to get an equivalent [AABB] with a non-negative size. [b]Note:[/b] In a boolean context, a [AABB] evaluates to false if both [member position] and [member size] are zero (equal to [constant Vector3.ZERO]). Otherwise, it always evaluates to true.

fn (AABB) abs #

fn (s &AABB) abs() AABB

Returns an [AABB] equivalent to this bounding box, with its width, height, and depth modified to be non-negative values. [codeblocks] [gdscript] var box = AABB(Vector3(5, 0, 5), Vector3(-20, -10, -5)) var absolute = box.abs() print(absolute.position) # Prints (-15.0, -10.0, 0.0) print(absolute.size) # Prints (20.0, 10.0, 5.0) [/gdscript] [csharp] var box = new Aabb(new Vector3(5, 0, 5), new Vector3(-20, -10, -5)); var absolute = box.Abs(); GD.Print(absolute.Position); // Prints (-15, -10, 0) GD.Print(absolute.Size); // Prints (20, 10, 5) [/csharp] [/codeblocks] [b]Note:[/b] It's recommended to use this method when [member size] is negative, as most other methods in Godot assume that the [member size]'s components are greater than 0.

fn (AABB) get_center #

fn (s &AABB) get_center() Vector3

Returns the center point of the bounding box. This is the same as position + (size / 2.0).

fn (AABB) get_volume #

fn (s &AABB) get_volume() f64

Returns the bounding box's volume. This is equivalent to size.x * size.y * size.z. See also [method has_volume].

fn (AABB) has_volume #

fn (s &AABB) has_volume() bool

Returns true if this bounding box's width, height, and depth are all positive. See also [method get_volume].

fn (AABB) has_surface #

fn (s &AABB) has_surface() bool

Returns true if this bounding box has a surface or a length, that is, at least one component of [member size] is greater than 0. Otherwise, returns false.

fn (AABB) has_point #

fn (s &AABB) has_point(point Vector3) bool

Returns true if the bounding box contains the given [param point]. By convention, points exactly on the right, top, and front sides are [b]not[/b] included. [b]Note:[/b] This method is not reliable for [AABB] with a [i]negative[/i] [member size]. Use [method abs] first to get a valid bounding box.

fn (AABB) is_equal_approx #

fn (s &AABB) is_equal_approx(aabb AABB) bool

Returns true if this bounding box and [param aabb] are approximately equal, by calling [method Vector3.is_equal_approx] on the [member position] and the [member size].

fn (AABB) is_finite #

fn (s &AABB) is_finite() bool

Returns true if this bounding box's values are finite, by calling [method Vector3.is_finite] on the [member position] and the [member size].

fn (AABB) intersects #

fn (s &AABB) intersects(with AABB) bool

Returns true if this bounding box overlaps with the box [param with]. The edges of both boxes are [i]always[/i] excluded.

fn (AABB) encloses #

fn (s &AABB) encloses(with AABB) bool

Returns true if this bounding box [i]completely[/i] encloses the [param with] box. The edges of both boxes are included. [codeblocks] [gdscript] var a = AABB(Vector3(0, 0, 0), Vector3(4, 4, 4)) var b = AABB(Vector3(1, 1, 1), Vector3(3, 3, 3)) var c = AABB(Vector3(2, 2, 2), Vector3(8, 8, 8))

print(a.encloses(a)) # Prints true print(a.encloses(b)) # Prints true print(a.encloses(c)) # Prints false [/gdscript] [csharp] var a = new Aabb(new Vector3(0, 0, 0), new Vector3(4, 4, 4)); var b = new Aabb(new Vector3(1, 1, 1), new Vector3(3, 3, 3)); var c = new Aabb(new Vector3(2, 2, 2), new Vector3(8, 8, 8));

GD.Print(a.Encloses(a)); // Prints True GD.Print(a.Encloses(b)); // Prints True GD.Print(a.Encloses(c)); // Prints False [/csharp] [/codeblocks]

fn (AABB) intersects_plane #

fn (s &AABB) intersects_plane(plane Plane) bool

Returns true if this bounding box is on both sides of the given [param plane].

fn (AABB) intersection #

fn (s &AABB) intersection(with AABB) AABB

Returns the intersection between this bounding box and [param with]. If the boxes do not intersect, returns an empty [AABB]. If the boxes intersect at the edge, returns a flat [AABB] with no volume (see [method has_surface] and [method has_volume]). [codeblocks] [gdscript] var box1 = AABB(Vector3(0, 0, 0), Vector3(5, 2, 8)) var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4))

var intersection = box1.intersection(box2) print(intersection.position) # Prints (2.0, 0.0, 2.0) print(intersection.size) # Prints (3.0, 2.0, 4.0) [/gdscript] [csharp] var box1 = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 8)); var box2 = new Aabb(new Vector3(2, 0, 2), new Vector3(8, 4, 4));

var intersection = box1.Intersection(box2); GD.Print(intersection.Position); // Prints (2, 0, 2) GD.Print(intersection.Size); // Prints (3, 2, 4) [/csharp] [/codeblocks] [b]Note:[/b] If you only need to know whether two bounding boxes are intersecting, use [method intersects], instead.

fn (AABB) merge #

fn (s &AABB) merge(with AABB) AABB

Returns an [AABB] that encloses both this bounding box and [param with] around the edges. See also [method encloses].

fn (AABB) expand #

fn (s &AABB) expand(to_point Vector3) AABB

Returns a copy of this bounding box expanded to align the edges with the given [param to_point], if necessary. [codeblocks] [gdscript] var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5))

box = box.expand(Vector3(10, 0, 0)) print(box.position) # Prints (0.0, 0.0, 0.0) print(box.size) # Prints (10.0, 2.0, 5.0)

box = box.expand(Vector3(-5, 0, 5)) print(box.position) # Prints (-5.0, 0.0, 0.0) print(box.size) # Prints (15.0, 2.0, 5.0) [/gdscript] [csharp] var box = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 5));

box = box.Expand(new Vector3(10, 0, 0)); GD.Print(box.Position); // Prints (0, 0, 0) GD.Print(box.Size); // Prints (10, 2, 5)

box = box.Expand(new Vector3(-5, 0, 5)); GD.Print(box.Position); // Prints (-5, 0, 0) GD.Print(box.Size); // Prints (15, 2, 5) [/csharp] [/codeblocks]

fn (AABB) grow #

fn (s &AABB) grow(by f64) AABB

Returns a copy of this bounding box extended on all sides by the given amount [param by]. A negative amount shrinks the box instead. [codeblocks] [gdscript] var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4) print(a.position) # Prints (0.0, 0.0, 0.0) print(a.size) # Prints (16.0, 16.0, 16.0)

var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2) print(b.position) # Prints (-2.0, -2.0, -2.0) print(b.size) # Prints (12.0, 8.0, 6.0) [/gdscript] [csharp] var a = new Aabb(new Vector3(4, 4, 4), new Vector3(8, 8, 8)).Grow(4); GD.Print(a.Position); // Prints (0, 0, 0) GD.Print(a.Size); // Prints (16, 16, 16)

var b = new Aabb(new Vector3(0, 0, 0), new Vector3(8, 4, 2)).Grow(2); GD.Print(b.Position); // Prints (-2, -2, -2) GD.Print(b.Size); // Prints (12, 8, 6) [/csharp] [/codeblocks]

fn (AABB) get_support #

fn (s &AABB) get_support(direction Vector3) Vector3

Returns the vertex's position of this bounding box that's the farthest in the given direction. This point is commonly known as the support point in collision detection algorithms.

fn (AABB) get_longest_axis #

fn (s &AABB) get_longest_axis() Vector3

Returns the longest normalized axis of this bounding box's [member size], as a [Vector3] ([constant Vector3.RIGHT], [constant Vector3.UP], or [constant Vector3.BACK]). [codeblocks] [gdscript] var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))

print(box.get_longest_axis()) # Prints (0.0, 0.0, 1.0) print(box.get_longest_axis_index()) # Prints 2 print(box.get_longest_axis_size()) # Prints 8.0 [/gdscript] [csharp] var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));

GD.Print(box.GetLongestAxis()); // Prints (0, 0, 1) GD.Print(box.GetLongestAxisIndex()); // Prints Z GD.Print(box.GetLongestAxisSize()); // Prints 8 [/csharp] [/codeblocks] See also [method get_longest_axis_index] and [method get_longest_axis_size].

fn (AABB) get_longest_axis_index #

fn (s &AABB) get_longest_axis_index() i64

Returns the index to the longest axis of this bounding box's [member size] (see [constant Vector3.AXIS_X], [constant Vector3.AXIS_Y], and [constant Vector3.AXIS_Z]). For an example, see [method get_longest_axis].

fn (AABB) get_longest_axis_size #

fn (s &AABB) get_longest_axis_size() f64

Returns the longest dimension of this bounding box's [member size]. For an example, see [method get_longest_axis].

fn (AABB) get_shortest_axis #

fn (s &AABB) get_shortest_axis() Vector3

Returns the shortest normalized axis of this bounding box's [member size], as a [Vector3] ([constant Vector3.RIGHT], [constant Vector3.UP], or [constant Vector3.BACK]). [codeblocks] [gdscript] var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8))

print(box.get_shortest_axis()) # Prints (1.0, 0.0, 0.0) print(box.get_shortest_axis_index()) # Prints 0 print(box.get_shortest_axis_size()) # Prints 2.0 [/gdscript] [csharp] var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8));

GD.Print(box.GetShortestAxis()); // Prints (1, 0, 0) GD.Print(box.GetShortestAxisIndex()); // Prints X GD.Print(box.GetShortestAxisSize()); // Prints 2 [/csharp] [/codeblocks] See also [method get_shortest_axis_index] and [method get_shortest_axis_size].

fn (AABB) get_shortest_axis_index #

fn (s &AABB) get_shortest_axis_index() i64

Returns the index to the shortest axis of this bounding box's [member size] (see [constant Vector3.AXIS_X], [constant Vector3.AXIS_Y], and [constant Vector3.AXIS_Z]). For an example, see [method get_shortest_axis].

fn (AABB) get_shortest_axis_size #

fn (s &AABB) get_shortest_axis_size() f64

Returns the shortest dimension of this bounding box's [member size]. For an example, see [method get_shortest_axis].

fn (AABB) get_endpoint #

fn (s &AABB) get_endpoint(idx i64) Vector3

Returns the position of one of the 8 vertices that compose this bounding box. With a [param idx] of 0 this is the same as [member position], and a [param idx] of 7 is the same as [member end].

fn (AABB) intersects_segment #

fn (s &AABB) intersects_segment(from Vector3, to Vector3) Variant

Returns the first point where this bounding box and the given segment intersect, as a [Vector3]. If no intersection occurs, returns null. The segment begins at [param from] and ends at [param to].

fn (AABB) intersects_ray #

fn (s &AABB) intersects_ray(from Vector3, dir Vector3) Variant

Returns the first point where this bounding box and the given ray intersect, as a [Vector3]. If no intersection occurs, returns null. The ray begin at [param from], faces [param dir] and extends towards infinity.

fn (AABB) to_variant #

fn (s &AABB) to_variant() Variant

fn (AABB) from_variant #

fn (mut s AABB) from_variant(variant &Variant)

fn (AABB) == #

fn (a AABB) == (b AABB) bool

Returns true if both [member position] and [member size] of the bounding boxes are exactly equal, respectively. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (AABB) eq_aabb #

fn (a AABB) eq_aabb(b AABB) bool

Returns true if both [member position] and [member size] of the bounding boxes are exactly equal, respectively. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (AABB) ne_aabb #

fn (a AABB) ne_aabb(b AABB) bool

Returns true if the [member position] or [member size] of both bounding boxes are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (AABB) mul_transform3d #

fn (a AABB) mul_transform3d(b Transform3D) AABB

Inversely transforms (multiplies) the [AABB] by the given [Transform3D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). aabb * transform is equivalent to transform.inverse() * aabb. See [method Transform3D.inverse]. For transforming by inverse of an affine transformation (e.g. with scaling) transform.affine_inverse() * aabb can be used instead. See [method Transform3D.affine_inverse].

fn (AABB) in_dictionary #

fn (a AABB) in_dictionary(b Dictionary) bool

fn (AABB) in_array #

fn (a AABB) in_array(b Array) bool

struct AESContext #

struct AESContext {
	RefCounted
}

Provides access to AES encryption/decryption of raw data.

fn (AESContext) to_variant #

fn (s &AESContext) to_variant() Variant

fn (AESContext) from_variant #

fn (mut s AESContext) from_variant(variant &Variant)

fn (AESContext) start #

fn (s &AESContext) start(mode AESContextMode, key PackedByteArray, cfg AESContext_start_Cfg) GDError

Start the AES context in the given [param mode]. A [param key] of either 16 or 32 bytes must always be provided, while an [param iv] (initialization vector) of exactly 16 bytes, is only needed when [param mode] is either [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT].

fn (AESContext) update #

fn (s &AESContext) update(src PackedByteArray) PackedByteArray

Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [param src]. See [method start] for mode of operation. [b]Note:[/b] The size of [param src] must be a multiple of 16. Apply some padding if needed.

fn (AESContext) get_iv_state #

fn (s &AESContext) get_iv_state() PackedByteArray

Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this function. [b]Note:[/b] This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT].

fn (AESContext) finish #

fn (s &AESContext) finish()

Close this AES context so it can be started again. See [method start].

struct AESContext_start_Cfg #

@[params]
struct AESContext_start_Cfg {
pub:
	iv PackedByteArray = PackedByteArray{}
}

Optional parameters for AESContext#start

struct AStar2D #

struct AStar2D {
	RefCounted
}

An implementation of A* for finding the shortest path between two vertices on a connected graph in 2D space.

fn (AStar2D) to_variant #

fn (s &AStar2D) to_variant() Variant

fn (AStar2D) from_variant #

fn (mut s AStar2D) from_variant(variant &Variant)

fn (AStar2D) gd_estimate_cost #

fn (s &AStar2D) gd_estimate_cost(from_id i64, end_id i64) f64

Called when estimating the cost between a point and the path's ending point. Note that this function is hidden in the default [AStar2D] class.

fn (AStar2D) gd_compute_cost #

fn (s &AStar2D) gd_compute_cost(from_id i64, to_id i64) f64

Called when computing the cost between two connected points. Note that this function is hidden in the default [AStar2D] class.

fn (AStar2D) get_available_point_id #

fn (s &AStar2D) get_available_point_id() i64

Returns the next available point ID with no point associated to it.

fn (AStar2D) add_point #

fn (s &AStar2D) add_point(id i64, position Vector2, cfg AStar2D_add_point_Cfg)

Adds a new point at the given position with the given identifier. The [param id] must be 0 or larger, and the [param weight_scale] must be 0.0 or greater. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [param weight_scale]s to form a path. [codeblocks] [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1 [/gdscript] [csharp] var astar = new AStar2D(); astar.AddPoint(1, new Vector2(1, 0), 4); // Adds the point (1, 0) with weight_scale 4 and id 1 [/csharp] [/codeblocks] If there already exists a point for the given [param id], its position and weight scale are updated to the given values.

fn (AStar2D) get_point_position #

fn (s &AStar2D) get_point_position(id i64) Vector2

Returns the position of the point associated with the given [param id].

fn (AStar2D) set_point_position #

fn (s &AStar2D) set_point_position(id i64, position Vector2)

Sets the [param position] for the point with the given [param id].

fn (AStar2D) get_point_weight_scale #

fn (s &AStar2D) get_point_weight_scale(id i64) f64

Returns the weight scale of the point associated with the given [param id].

fn (AStar2D) set_point_weight_scale #

fn (s &AStar2D) set_point_weight_scale(id i64, weight_scale f64)

Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.

fn (AStar2D) remove_point #

fn (s &AStar2D) remove_point(id i64)

Removes the point associated with the given [param id] from the points pool.

fn (AStar2D) has_point #

fn (s &AStar2D) has_point(id i64) bool

Returns whether a point associated with the given [param id] exists.

fn (AStar2D) get_point_connections #

fn (s &AStar2D) get_point_connections(id i64) PackedInt64Array

Returns an array with the IDs of the points that form the connection with the given point. [codeblocks] [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(0, 0)) astar.add_point(2, Vector2(0, 1)) astar.add_point(3, Vector2(1, 1)) astar.add_point(4, Vector2(2, 0))

astar.connect_points(1, 2, true) astar.connect_points(1, 3, true)

var neighbors = astar.get_point_connections(1) # Returns [2, 3] [/gdscript] [csharp] var astar = new AStar2D(); astar.AddPoint(1, new Vector2(0, 0)); astar.AddPoint(2, new Vector2(0, 1)); astar.AddPoint(3, new Vector2(1, 1)); astar.AddPoint(4, new Vector2(2, 0));

astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true);

long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] [/csharp] [/codeblocks]

fn (AStar2D) get_point_ids #

fn (s &AStar2D) get_point_ids() PackedInt64Array

Returns an array of all point IDs.

fn (AStar2D) set_point_disabled #

fn (s &AStar2D) set_point_disabled(id i64, cfg AStar2D_set_point_disabled_Cfg)

Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.

fn (AStar2D) is_point_disabled #

fn (s &AStar2D) is_point_disabled(id i64) bool

Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.

fn (AStar2D) connect_points #

fn (s &AStar2D) connect_points(id i64, to_id i64, cfg AStar2D_connect_points_Cfg)

Creates a segment between the given points. If [param bidirectional] is false, only movement from [param id] to [param to_id] is allowed, not the reverse direction. [codeblocks] [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(1, 1)) astar.add_point(2, Vector2(0, 5)) astar.connect_points(1, 2, false) [/gdscript] [csharp] var astar = new AStar2D(); astar.AddPoint(1, new Vector2(1, 1)); astar.AddPoint(2, new Vector2(0, 5)); astar.ConnectPoints(1, 2, false); [/csharp] [/codeblocks]

fn (AStar2D) disconnect_points #

fn (s &AStar2D) disconnect_points(id i64, to_id i64, cfg AStar2D_disconnect_points_Cfg)

Deletes the segment between the given points. If [param bidirectional] is false, only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains.

fn (AStar2D) are_points_connected #

fn (s &AStar2D) are_points_connected(id i64, to_id i64, cfg AStar2D_are_points_connected_Cfg) bool

Returns whether there is a connection/segment between the given points. If [param bidirectional] is false, returns whether movement from [param id] to [param to_id] is possible through this segment.

fn (AStar2D) get_point_count #

fn (s &AStar2D) get_point_count() i64

Returns the number of points currently in the points pool.

fn (AStar2D) get_point_capacity #

fn (s &AStar2D) get_point_capacity() i64

Returns the capacity of the structure backing the points, useful in conjunction with [method reserve_space].

fn (AStar2D) reserve_space #

fn (s &AStar2D) reserve_space(num_nodes i64)

Reserves space internally for [param num_nodes] points. Useful if you're adding a known large number of points at once, such as points on a grid.

fn (AStar2D) clear #

fn (s &AStar2D) clear()

Clears all the points and segments.

fn (AStar2D) get_closest_point #

fn (s &AStar2D) get_closest_point(to_position Vector2, cfg AStar2D_get_closest_point_Cfg) i64

Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns -1 if there are no points in the points pool. [b]Note:[/b] If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result.

fn (AStar2D) get_closest_position_in_segment #

fn (s &AStar2D) get_closest_position_in_segment(to_position Vector2) Vector2

Returns the closest position to [param to_position] that resides inside a segment between two connected points. [codeblocks] [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(0, 0)) astar.add_point(2, Vector2(0, 5)) astar.connect_points(1, 2) var res = astar.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3) [/gdscript] [csharp] var astar = new AStar2D(); astar.AddPoint(1, new Vector2(0, 0)); astar.AddPoint(2, new Vector2(0, 5)); astar.ConnectPoints(1, 2); Vector2 res = astar.GetClosestPositionInSegment(new Vector2(3, 3)); // Returns (0, 3) [/csharp] [/codeblocks] The result is in the segment that goes from y = 0 to y = 5. It's the closest position in the segment to the given point.

fn (AStar2D) get_point_path #

fn (s &AStar2D) get_point_path(from_id i64, to_id i64, cfg AStar2D_get_point_path_Cfg) PackedVector2Array

Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. If there is no valid path to the target, and [param allow_partial_path] is true, returns a path to the point closest to the target that can be reached. [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty array and will print an error message. Additionally, when [param allow_partial_path] is true and [param to_id] is disabled the search may take an unusually long time to finish.

fn (AStar2D) get_id_path #

fn (s &AStar2D) get_id_path(from_id i64, to_id i64, cfg AStar2D_get_id_path_Cfg) PackedInt64Array

Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. If there is no valid path to the target, and [param allow_partial_path] is true, returns a path to the point closest to the target that can be reached. [b]Note:[/b] When [param allow_partial_path] is true and [param to_id] is disabled the search may take an unusually long time to finish. [codeblocks] [gdscript] var astar = AStar2D.new() astar.add_point(1, Vector2(0, 0)) astar.add_point(2, Vector2(0, 1), 1) # Default weight is 1 astar.add_point(3, Vector2(1, 1)) astar.add_point(4, Vector2(2, 0))

astar.connect_points(1, 2, false) astar.connect_points(2, 3, false) astar.connect_points(4, 3, false) astar.connect_points(1, 4, false)

var res = astar.get_id_path(1, 3) # Returns [1, 2, 3] [/gdscript] [csharp] var astar = new AStar2D(); astar.AddPoint(1, new Vector2(0, 0)); astar.AddPoint(2, new Vector2(0, 1), 1); // Default weight is 1 astar.AddPoint(3, new Vector2(1, 1)); astar.AddPoint(4, new Vector2(2, 0));

astar.ConnectPoints(1, 2, false); astar.ConnectPoints(2, 3, false); astar.ConnectPoints(4, 3, false); astar.ConnectPoints(1, 4, false); long[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] [/csharp] [/codeblocks] If you change the 2nd point's weight to 3, then the result will be [1, 4, 3] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.

struct AStar2D_add_point_Cfg #

@[params]
struct AStar2D_add_point_Cfg {
pub:
	weight_scale f64 = 1.0
}

Optional parameters for AStar2D#add_point

struct AStar2D_are_points_connected_Cfg #

@[params]
struct AStar2D_are_points_connected_Cfg {
pub:
	bidirectional bool
}

Optional parameters for AStar2D#are_points_connected

struct AStar2D_connect_points_Cfg #

@[params]
struct AStar2D_connect_points_Cfg {
pub:
	bidirectional bool
}

Optional parameters for AStar2D#connect_points

struct AStar2D_disconnect_points_Cfg #

@[params]
struct AStar2D_disconnect_points_Cfg {
pub:
	bidirectional bool
}

Optional parameters for AStar2D#disconnect_points

struct AStar2D_get_closest_point_Cfg #

@[params]
struct AStar2D_get_closest_point_Cfg {
pub:
	include_disabled bool
}

Optional parameters for AStar2D#get_closest_point

struct AStar2D_get_id_path_Cfg #

@[params]
struct AStar2D_get_id_path_Cfg {
pub:
	allow_partial_path bool
}

Optional parameters for AStar2D#get_id_path

struct AStar2D_get_point_path_Cfg #

@[params]
struct AStar2D_get_point_path_Cfg {
pub:
	allow_partial_path bool
}

Optional parameters for AStar2D#get_point_path

struct AStar2D_set_point_disabled_Cfg #

@[params]
struct AStar2D_set_point_disabled_Cfg {
pub:
	disabled bool
}

Optional parameters for AStar2D#set_point_disabled

struct AStar3D #

struct AStar3D {
	RefCounted
}

An implementation of A* for finding the shortest path between two vertices on a connected graph in 3D space.

fn (AStar3D) to_variant #

fn (s &AStar3D) to_variant() Variant

fn (AStar3D) from_variant #

fn (mut s AStar3D) from_variant(variant &Variant)

fn (AStar3D) gd_estimate_cost #

fn (s &AStar3D) gd_estimate_cost(from_id i64, end_id i64) f64

Called when estimating the cost between a point and the path's ending point. Note that this function is hidden in the default [AStar3D] class.

fn (AStar3D) gd_compute_cost #

fn (s &AStar3D) gd_compute_cost(from_id i64, to_id i64) f64

Called when computing the cost between two connected points. Note that this function is hidden in the default [AStar3D] class.

fn (AStar3D) get_available_point_id #

fn (s &AStar3D) get_available_point_id() i64

Returns the next available point ID with no point associated to it.

fn (AStar3D) add_point #

fn (s &AStar3D) add_point(id i64, position Vector3, cfg AStar3D_add_point_Cfg)

Adds a new point at the given position with the given identifier. The [param id] must be 0 or larger, and the [param weight_scale] must be 0.0 or greater. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [param weight_scale]s to form a path. [codeblocks] [gdscript] var astar = AStar3D.new() astar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1 [/gdscript] [csharp] var astar = new AStar3D(); astar.AddPoint(1, new Vector3(1, 0, 0), 4); // Adds the point (1, 0, 0) with weight_scale 4 and id 1 [/csharp] [/codeblocks] If there already exists a point for the given [param id], its position and weight scale are updated to the given values.

fn (AStar3D) get_point_position #

fn (s &AStar3D) get_point_position(id i64) Vector3

Returns the position of the point associated with the given [param id].

fn (AStar3D) set_point_position #

fn (s &AStar3D) set_point_position(id i64, position Vector3)

Sets the [param position] for the point with the given [param id].

fn (AStar3D) get_point_weight_scale #

fn (s &AStar3D) get_point_weight_scale(id i64) f64

Returns the weight scale of the point associated with the given [param id].

fn (AStar3D) set_point_weight_scale #

fn (s &AStar3D) set_point_weight_scale(id i64, weight_scale f64)

Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.

fn (AStar3D) remove_point #

fn (s &AStar3D) remove_point(id i64)

Removes the point associated with the given [param id] from the points pool.

fn (AStar3D) has_point #

fn (s &AStar3D) has_point(id i64) bool

Returns whether a point associated with the given [param id] exists.

fn (AStar3D) get_point_connections #

fn (s &AStar3D) get_point_connections(id i64) PackedInt64Array

Returns an array with the IDs of the points that form the connection with the given point. [codeblocks] [gdscript] var astar = AStar3D.new() astar.add_point(1, Vector3(0, 0, 0)) astar.add_point(2, Vector3(0, 1, 0)) astar.add_point(3, Vector3(1, 1, 0)) astar.add_point(4, Vector3(2, 0, 0))

astar.connect_points(1, 2, true) astar.connect_points(1, 3, true)

var neighbors = astar.get_point_connections(1) # Returns [2, 3] [/gdscript] [csharp] var astar = new AStar3D(); astar.AddPoint(1, new Vector3(0, 0, 0)); astar.AddPoint(2, new Vector3(0, 1, 0)); astar.AddPoint(3, new Vector3(1, 1, 0)); astar.AddPoint(4, new Vector3(2, 0, 0)); astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true);

long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] [/csharp] [/codeblocks]

fn (AStar3D) get_point_ids #

fn (s &AStar3D) get_point_ids() PackedInt64Array

Returns an array of all point IDs.

fn (AStar3D) set_point_disabled #

fn (s &AStar3D) set_point_disabled(id i64, cfg AStar3D_set_point_disabled_Cfg)

Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.

fn (AStar3D) is_point_disabled #

fn (s &AStar3D) is_point_disabled(id i64) bool

Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.

fn (AStar3D) connect_points #

fn (s &AStar3D) connect_points(id i64, to_id i64, cfg AStar3D_connect_points_Cfg)

Creates a segment between the given points. If [param bidirectional] is false, only movement from [param id] to [param to_id] is allowed, not the reverse direction. [codeblocks] [gdscript] var astar = AStar3D.new() astar.add_point(1, Vector3(1, 1, 0)) astar.add_point(2, Vector3(0, 5, 0)) astar.connect_points(1, 2, false) [/gdscript] [csharp] var astar = new AStar3D(); astar.AddPoint(1, new Vector3(1, 1, 0)); astar.AddPoint(2, new Vector3(0, 5, 0)); astar.ConnectPoints(1, 2, false); [/csharp] [/codeblocks]

fn (AStar3D) disconnect_points #

fn (s &AStar3D) disconnect_points(id i64, to_id i64, cfg AStar3D_disconnect_points_Cfg)

Deletes the segment between the given points. If [param bidirectional] is false, only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains.

fn (AStar3D) are_points_connected #

fn (s &AStar3D) are_points_connected(id i64, to_id i64, cfg AStar3D_are_points_connected_Cfg) bool

Returns whether the two given points are directly connected by a segment. If [param bidirectional] is false, returns whether movement from [param id] to [param to_id] is possible through this segment.

fn (AStar3D) get_point_count #

fn (s &AStar3D) get_point_count() i64

Returns the number of points currently in the points pool.

fn (AStar3D) get_point_capacity #

fn (s &AStar3D) get_point_capacity() i64

Returns the capacity of the structure backing the points, useful in conjunction with [method reserve_space].

fn (AStar3D) reserve_space #

fn (s &AStar3D) reserve_space(num_nodes i64)

Reserves space internally for [param num_nodes] points. Useful if you're adding a known large number of points at once, such as points on a grid.

fn (AStar3D) clear #

fn (s &AStar3D) clear()

Clears all the points and segments.

fn (AStar3D) get_closest_point #

fn (s &AStar3D) get_closest_point(to_position Vector3, cfg AStar3D_get_closest_point_Cfg) i64

Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns -1 if there are no points in the points pool. [b]Note:[/b] If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result.

fn (AStar3D) get_closest_position_in_segment #

fn (s &AStar3D) get_closest_position_in_segment(to_position Vector3) Vector3

Returns the closest position to [param to_position] that resides inside a segment between two connected points. [codeblocks] [gdscript] var astar = AStar3D.new() astar.add_point(1, Vector3(0, 0, 0)) astar.add_point(2, Vector3(0, 5, 0)) astar.connect_points(1, 2) var res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0) [/gdscript] [csharp] var astar = new AStar3D(); astar.AddPoint(1, new Vector3(0, 0, 0)); astar.AddPoint(2, new Vector3(0, 5, 0)); astar.ConnectPoints(1, 2); Vector3 res = astar.GetClosestPositionInSegment(new Vector3(3, 3, 0)); // Returns (0, 3, 0) [/csharp] [/codeblocks] The result is in the segment that goes from y = 0 to y = 5. It's the closest position in the segment to the given point.

fn (AStar3D) get_point_path #

fn (s &AStar3D) get_point_path(from_id i64, to_id i64, cfg AStar3D_get_point_path_Cfg) PackedVector3Array

Returns an array with the points that are in the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. If there is no valid path to the target, and [param allow_partial_path] is true, returns a path to the point closest to the target that can be reached. [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty array and will print an error message. Additionally, when [param allow_partial_path] is true and [param to_id] is disabled the search may take an unusually long time to finish.

fn (AStar3D) get_id_path #

fn (s &AStar3D) get_id_path(from_id i64, to_id i64, cfg AStar3D_get_id_path_Cfg) PackedInt64Array

Returns an array with the IDs of the points that form the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. If there is no valid path to the target, and [param allow_partial_path] is true, returns a path to the point closest to the target that can be reached. [b]Note:[/b] When [param allow_partial_path] is true and [param to_id] is disabled the search may take an unusually long time to finish. [codeblocks] [gdscript] var astar = AStar3D.new() astar.add_point(1, Vector3(0, 0, 0)) astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1 astar.add_point(3, Vector3(1, 1, 0)) astar.add_point(4, Vector3(2, 0, 0))

astar.connect_points(1, 2, false) astar.connect_points(2, 3, false) astar.connect_points(4, 3, false) astar.connect_points(1, 4, false)

var res = astar.get_id_path(1, 3) # Returns [1, 2, 3] [/gdscript] [csharp] var astar = new AStar3D(); astar.AddPoint(1, new Vector3(0, 0, 0)); astar.AddPoint(2, new Vector3(0, 1, 0), 1); // Default weight is 1 astar.AddPoint(3, new Vector3(1, 1, 0)); astar.AddPoint(4, new Vector3(2, 0, 0)); astar.ConnectPoints(1, 2, false); astar.ConnectPoints(2, 3, false); astar.ConnectPoints(4, 3, false); astar.ConnectPoints(1, 4, false); long[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] [/csharp] [/codeblocks] If you change the 2nd point's weight to 3, then the result will be [1, 4, 3] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.

struct AStar3D_add_point_Cfg #

@[params]
struct AStar3D_add_point_Cfg {
pub:
	weight_scale f64 = 1.0
}

Optional parameters for AStar3D#add_point

struct AStar3D_are_points_connected_Cfg #

@[params]
struct AStar3D_are_points_connected_Cfg {
pub:
	bidirectional bool
}

Optional parameters for AStar3D#are_points_connected

struct AStar3D_connect_points_Cfg #

@[params]
struct AStar3D_connect_points_Cfg {
pub:
	bidirectional bool
}

Optional parameters for AStar3D#connect_points

struct AStar3D_disconnect_points_Cfg #

@[params]
struct AStar3D_disconnect_points_Cfg {
pub:
	bidirectional bool
}

Optional parameters for AStar3D#disconnect_points

struct AStar3D_get_closest_point_Cfg #

@[params]
struct AStar3D_get_closest_point_Cfg {
pub:
	include_disabled bool
}

Optional parameters for AStar3D#get_closest_point

struct AStar3D_get_id_path_Cfg #

@[params]
struct AStar3D_get_id_path_Cfg {
pub:
	allow_partial_path bool
}

Optional parameters for AStar3D#get_id_path

struct AStar3D_get_point_path_Cfg #

@[params]
struct AStar3D_get_point_path_Cfg {
pub:
	allow_partial_path bool
}

Optional parameters for AStar3D#get_point_path

struct AStar3D_set_point_disabled_Cfg #

@[params]
struct AStar3D_set_point_disabled_Cfg {
pub:
	disabled bool
}

Optional parameters for AStar3D#set_point_disabled

struct AStarGrid2D #

struct AStarGrid2D {
	RefCounted
}

An implementation of A* for finding the shortest path between two points on a partial 2D grid.

fn (AStarGrid2D) to_variant #

fn (s &AStarGrid2D) to_variant() Variant

fn (AStarGrid2D) from_variant #

fn (mut s AStarGrid2D) from_variant(variant &Variant)

fn (AStarGrid2D) gd_estimate_cost #

fn (s &AStarGrid2D) gd_estimate_cost(from_id Vector2i, end_id Vector2i) f64

Called when estimating the cost between a point and the path's ending point. Note that this function is hidden in the default [AStarGrid2D] class.

fn (AStarGrid2D) gd_compute_cost #

fn (s &AStarGrid2D) gd_compute_cost(from_id Vector2i, to_id Vector2i) f64

Called when computing the cost between two connected points. Note that this function is hidden in the default [AStarGrid2D] class.

fn (AStarGrid2D) set_region #

fn (s &AStarGrid2D) set_region(region Rect2i)

fn (AStarGrid2D) get_region #

fn (s &AStarGrid2D) get_region() Rect2i

fn (AStarGrid2D) set_size #

fn (s &AStarGrid2D) set_size(size Vector2i)

fn (AStarGrid2D) get_size #

fn (s &AStarGrid2D) get_size() Vector2i

fn (AStarGrid2D) set_offset #

fn (s &AStarGrid2D) set_offset(offset Vector2)

fn (AStarGrid2D) get_offset #

fn (s &AStarGrid2D) get_offset() Vector2

fn (AStarGrid2D) set_cell_size #

fn (s &AStarGrid2D) set_cell_size(cell_size Vector2)

fn (AStarGrid2D) get_cell_size #

fn (s &AStarGrid2D) get_cell_size() Vector2

fn (AStarGrid2D) set_cell_shape #

fn (s &AStarGrid2D) set_cell_shape(cell_shape AStarGrid2DCellShape)

fn (AStarGrid2D) get_cell_shape #

fn (s &AStarGrid2D) get_cell_shape() AStarGrid2DCellShape

fn (AStarGrid2D) is_in_bounds #

fn (s &AStarGrid2D) is_in_bounds(x i64, y i64) bool

Returns true if the [param x] and [param y] is a valid grid coordinate (id), i.e. if it is inside [member region]. Equivalent to region.has_point(Vector2i(x, y)).

fn (AStarGrid2D) is_in_boundsv #

fn (s &AStarGrid2D) is_in_boundsv(id Vector2i) bool

Returns true if the [param id] vector is a valid grid coordinate, i.e. if it is inside [member region]. Equivalent to region.has_point(id).

fn (AStarGrid2D) is_dirty #

fn (s &AStarGrid2D) is_dirty() bool

Indicates that the grid parameters were changed and [method update] needs to be called.

fn (AStarGrid2D) update #

fn (s &AStarGrid2D) update()

Updates the internal state of the grid according to the parameters to prepare it to search the path. Needs to be called if parameters like [member region], [member cell_size] or [member offset] are changed. [method is_dirty] will return true if this is the case and this needs to be called. [b]Note:[/b] All point data (solidity and weight scale) will be cleared.

fn (AStarGrid2D) set_jumping_enabled #

fn (s &AStarGrid2D) set_jumping_enabled(enabled bool)

fn (AStarGrid2D) is_jumping_enabled #

fn (s &AStarGrid2D) is_jumping_enabled() bool

fn (AStarGrid2D) set_diagonal_mode #

fn (s &AStarGrid2D) set_diagonal_mode(mode AStarGrid2DDiagonalMode)

fn (AStarGrid2D) get_diagonal_mode #

fn (s &AStarGrid2D) get_diagonal_mode() AStarGrid2DDiagonalMode

fn (AStarGrid2D) set_default_compute_heuristic #

fn (s &AStarGrid2D) set_default_compute_heuristic(heuristic AStarGrid2DHeuristic)

fn (AStarGrid2D) get_default_compute_heuristic #

fn (s &AStarGrid2D) get_default_compute_heuristic() AStarGrid2DHeuristic

fn (AStarGrid2D) set_default_estimate_heuristic #

fn (s &AStarGrid2D) set_default_estimate_heuristic(heuristic AStarGrid2DHeuristic)

fn (AStarGrid2D) get_default_estimate_heuristic #

fn (s &AStarGrid2D) get_default_estimate_heuristic() AStarGrid2DHeuristic

fn (AStarGrid2D) set_point_solid #

fn (s &AStarGrid2D) set_point_solid(id Vector2i, cfg AStarGrid2D_set_point_solid_Cfg)

Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled. [b]Note:[/b] Calling [method update] is not needed after the call of this function.

fn (AStarGrid2D) is_point_solid #

fn (s &AStarGrid2D) is_point_solid(id Vector2i) bool

Returns true if a point is disabled for pathfinding. By default, all points are enabled.

fn (AStarGrid2D) set_point_weight_scale #

fn (s &AStarGrid2D) set_point_weight_scale(id Vector2i, weight_scale f64)

Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. [b]Note:[/b] Calling [method update] is not needed after the call of this function.

fn (AStarGrid2D) get_point_weight_scale #

fn (s &AStarGrid2D) get_point_weight_scale(id Vector2i) f64

Returns the weight scale of the point associated with the given [param id].

fn (AStarGrid2D) fill_solid_region #

fn (s &AStarGrid2D) fill_solid_region(region Rect2i, cfg AStarGrid2D_fill_solid_region_Cfg)

Fills the given [param region] on the grid with the specified value for the solid flag. [b]Note:[/b] Calling [method update] is not needed after the call of this function.

fn (AStarGrid2D) fill_weight_scale_region #

fn (s &AStarGrid2D) fill_weight_scale_region(region Rect2i, weight_scale f64)

Fills the given [param region] on the grid with the specified value for the weight scale. [b]Note:[/b] Calling [method update] is not needed after the call of this function.

fn (AStarGrid2D) clear #

fn (s &AStarGrid2D) clear()

Clears the grid and sets the [member region] to Rect2i(0, 0, 0, 0).

fn (AStarGrid2D) get_point_position #

fn (s &AStarGrid2D) get_point_position(id Vector2i) Vector2

Returns the position of the point associated with the given [param id].

fn (AStarGrid2D) get_point_data_in_region #

fn (s &AStarGrid2D) get_point_data_in_region(region Rect2i) Array

Returns an array of dictionaries with point data (id: [Vector2i], position: [Vector2], solid: [bool], weight_scale: [float]) within a [param region].

fn (AStarGrid2D) get_point_path #

fn (s &AStarGrid2D) get_point_path(from_id Vector2i, to_id Vector2i, cfg AStarGrid2D_get_point_path_Cfg) PackedVector2Array

Returns an array with the points that are in the path found by [AStarGrid2D] between the given points. The array is ordered from the starting point to the ending point of the path. If there is no valid path to the target, and [param allow_partial_path] is true, returns a path to the point closest to the target that can be reached. [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty array and will print an error message. Additionally, when [param allow_partial_path] is true and [param to_id] is solid the search may take an unusually long time to finish.

fn (AStarGrid2D) get_id_path #

fn (s &AStarGrid2D) get_id_path(from_id Vector2i, to_id Vector2i, cfg AStarGrid2D_get_id_path_Cfg) Array

Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. If there is no valid path to the target, and [param allow_partial_path] is true, returns a path to the point closest to the target that can be reached. [b]Note:[/b] When [param allow_partial_path] is true and [param to_id] is solid the search may take an unusually long time to finish.

struct AStarGrid2D_fill_solid_region_Cfg #

@[params]
struct AStarGrid2D_fill_solid_region_Cfg {
pub:
	solid bool
}

Optional parameters for AStarGrid2D#fill_solid_region

struct AStarGrid2D_get_id_path_Cfg #

@[params]
struct AStarGrid2D_get_id_path_Cfg {
pub:
	allow_partial_path bool
}

Optional parameters for AStarGrid2D#get_id_path

struct AStarGrid2D_get_point_path_Cfg #

@[params]
struct AStarGrid2D_get_point_path_Cfg {
pub:
	allow_partial_path bool
}

Optional parameters for AStarGrid2D#get_point_path

struct AStarGrid2D_set_point_solid_Cfg #

@[params]
struct AStarGrid2D_set_point_solid_Cfg {
pub:
	solid bool
}

Optional parameters for AStarGrid2D#set_point_solid

struct AcceptDialog #

struct AcceptDialog {
	Window
}

A base dialog used for user notification.

fn (AcceptDialog) to_variant #

fn (s &AcceptDialog) to_variant() Variant

fn (AcceptDialog) from_variant #

fn (mut s AcceptDialog) from_variant(variant &Variant)

fn (AcceptDialog) get_ok_button #

fn (s &AcceptDialog) get_ok_button() Button

Returns the OK [Button] instance. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (AcceptDialog) get_label #

fn (s &AcceptDialog) get_label() Label

Returns the label used for built-in text. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (AcceptDialog) set_hide_on_ok #

fn (s &AcceptDialog) set_hide_on_ok(enabled bool)

fn (AcceptDialog) get_hide_on_ok #

fn (s &AcceptDialog) get_hide_on_ok() bool

fn (AcceptDialog) set_close_on_escape #

fn (s &AcceptDialog) set_close_on_escape(enabled bool)

fn (AcceptDialog) get_close_on_escape #

fn (s &AcceptDialog) get_close_on_escape() bool

fn (AcceptDialog) add_button #

fn (s &AcceptDialog) add_button(text string, cfg AcceptDialog_add_button_Cfg) Button

Adds a button with label [param text] and a custom [param action] to the dialog and returns the created button. [param action] will be passed to the [signal custom_action] signal when pressed. If true, [param right] will place the button to the right of any sibling buttons. You can use [method remove_button] method to remove a button created with this method from the dialog.

fn (AcceptDialog) add_cancel_button #

fn (s &AcceptDialog) add_cancel_button(name string) Button

Adds a button with label [param name] and a cancel action to the dialog and returns the created button. You can use [method remove_button] method to remove a button created with this method from the dialog.

fn (AcceptDialog) remove_button #

fn (s &AcceptDialog) remove_button(button Button)

Removes the [param button] from the dialog. Does NOT free the [param button]. The [param button] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [param button] will no longer emit this dialog's [signal custom_action] or [signal canceled] signals.

fn (AcceptDialog) register_text_enter #

fn (s &AcceptDialog) register_text_enter(line_edit LineEdit)

Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.

fn (AcceptDialog) set_text #

fn (s &AcceptDialog) set_text(text string)

fn (AcceptDialog) get_text #

fn (s &AcceptDialog) get_text() string

fn (AcceptDialog) set_autowrap #

fn (s &AcceptDialog) set_autowrap(autowrap bool)

fn (AcceptDialog) has_autowrap #

fn (s &AcceptDialog) has_autowrap() bool

fn (AcceptDialog) set_ok_button_text #

fn (s &AcceptDialog) set_ok_button_text(text string)

fn (AcceptDialog) get_ok_button_text #

fn (s &AcceptDialog) get_ok_button_text() string

struct AcceptDialog_add_button_Cfg #

@[params]
struct AcceptDialog_add_button_Cfg {
pub:
	right  bool
	action string
}

Optional parameters for AcceptDialog#add_button

struct AimModifier3D #

struct AimModifier3D {
	BoneConstraint3D
}

The [AimModifier3D] rotates a bone to look at a reference bone.

fn (AimModifier3D) to_variant #

fn (s &AimModifier3D) to_variant() Variant

fn (AimModifier3D) from_variant #

fn (mut s AimModifier3D) from_variant(variant &Variant)

fn (AimModifier3D) set_forward_axis #

fn (s &AimModifier3D) set_forward_axis(index i64, axis SkeletonModifier3DBoneAxis)

Sets the forward axis of the bone.

fn (AimModifier3D) get_forward_axis #

fn (s &AimModifier3D) get_forward_axis(index i64) SkeletonModifier3DBoneAxis

Returns the forward axis of the bone.

fn (AimModifier3D) set_use_euler #

fn (s &AimModifier3D) set_use_euler(index i64, enabled bool)

If sets [param enabled] to true, it provides rotation with using euler. If sets [param enabled] to false, it provides rotation with using rotation by arc generated from the forward axis vector and the vector toward the reference.

fn (AimModifier3D) is_using_euler #

fn (s &AimModifier3D) is_using_euler(index i64) bool

Returns true if it provides rotation with using euler.

fn (AimModifier3D) set_primary_rotation_axis #

fn (s &AimModifier3D) set_primary_rotation_axis(index i64, axis Vector3Axis)

Sets the axis of the first rotation. It is enabled only if [method is_using_euler] is true.

fn (AimModifier3D) get_primary_rotation_axis #

fn (s &AimModifier3D) get_primary_rotation_axis(index i64) Vector3Axis

Returns the axis of the first rotation. It is enabled only if [method is_using_euler] is true.

fn (AimModifier3D) set_use_secondary_rotation #

fn (s &AimModifier3D) set_use_secondary_rotation(index i64, enabled bool)

If sets [param enabled] to true, it provides rotation by two axes. It is enabled only if [method is_using_euler] is true.

fn (AimModifier3D) is_using_secondary_rotation #

fn (s &AimModifier3D) is_using_secondary_rotation(index i64) bool

Returns true if it provides rotation by two axes. It is enabled only if [method is_using_euler] is true.

struct AnimatableBody2D #

struct AnimatableBody2D {
	StaticBody2D
}

A 2D physics body that can't be moved by external forces. When moved manually, it affects other bodies in its path.

fn (AnimatableBody2D) to_variant #

fn (s &AnimatableBody2D) to_variant() Variant

fn (AnimatableBody2D) from_variant #

fn (mut s AnimatableBody2D) from_variant(variant &Variant)

fn (AnimatableBody2D) set_sync_to_physics #

fn (s &AnimatableBody2D) set_sync_to_physics(enable bool)

fn (AnimatableBody2D) is_sync_to_physics_enabled #

fn (s &AnimatableBody2D) is_sync_to_physics_enabled() bool

struct AnimatableBody3D #

struct AnimatableBody3D {
	StaticBody3D
}

A 3D physics body that can't be moved by external forces. When moved manually, it affects other bodies in its path.

fn (AnimatableBody3D) to_variant #

fn (s &AnimatableBody3D) to_variant() Variant

fn (AnimatableBody3D) from_variant #

fn (mut s AnimatableBody3D) from_variant(variant &Variant)

fn (AnimatableBody3D) set_sync_to_physics #

fn (s &AnimatableBody3D) set_sync_to_physics(enable bool)

fn (AnimatableBody3D) is_sync_to_physics_enabled #

fn (s &AnimatableBody3D) is_sync_to_physics_enabled() bool

struct AnimatedSprite2D #

struct AnimatedSprite2D {
	Node2D
}

Sprite node that contains multiple textures as frames to play for animation.

fn (AnimatedSprite2D) to_variant #

fn (s &AnimatedSprite2D) to_variant() Variant

fn (AnimatedSprite2D) from_variant #

fn (mut s AnimatedSprite2D) from_variant(variant &Variant)

fn (AnimatedSprite2D) set_sprite_frames #

fn (s &AnimatedSprite2D) set_sprite_frames(sprite_frames SpriteFrames)

fn (AnimatedSprite2D) get_sprite_frames #

fn (s &AnimatedSprite2D) get_sprite_frames() SpriteFrames

fn (AnimatedSprite2D) set_animation #

fn (s &AnimatedSprite2D) set_animation(name string)

fn (AnimatedSprite2D) get_animation #

fn (s &AnimatedSprite2D) get_animation() string

fn (AnimatedSprite2D) set_autoplay #

fn (s &AnimatedSprite2D) set_autoplay(name string)

fn (AnimatedSprite2D) get_autoplay #

fn (s &AnimatedSprite2D) get_autoplay() string

fn (AnimatedSprite2D) is_playing #

fn (s &AnimatedSprite2D) is_playing() bool

Returns true if an animation is currently playing (even if [member speed_scale] and/or custom_speed are 0).

fn (AnimatedSprite2D) play #

fn (s &AnimatedSprite2D) play(cfg AnimatedSprite2D_play_Cfg)

Plays the animation with key [param name]. If [param custom_speed] is negative and [param from_end] is true, the animation will play backwards (which is equivalent to calling [method play_backwards]). If this method is called with that same animation [param name], or with no [param name] parameter, the assigned animation will resume playing if it was paused.

fn (AnimatedSprite2D) play_backwards #

fn (s &AnimatedSprite2D) play_backwards(cfg AnimatedSprite2D_play_backwards_Cfg)

Plays the animation with key [param name] in reverse. This method is a shorthand for [method play] with custom_speed = -1.0 and from_end = true, so see its description for more information.

fn (AnimatedSprite2D) pause #

fn (s &AnimatedSprite2D) pause()

Pauses the currently playing animation. The [member frame] and [member frame_progress] will be kept and calling [method play] or [method play_backwards] without arguments will resume the animation from the current playback position. See also [method stop].

fn (AnimatedSprite2D) stop #

fn (s &AnimatedSprite2D) stop()

Stops the currently playing animation. The animation position is reset to 0 and the custom_speed is reset to 1.0. See also [method pause].

fn (AnimatedSprite2D) set_centered #

fn (s &AnimatedSprite2D) set_centered(centered bool)

fn (AnimatedSprite2D) is_centered #

fn (s &AnimatedSprite2D) is_centered() bool

fn (AnimatedSprite2D) set_offset #

fn (s &AnimatedSprite2D) set_offset(offset Vector2)

fn (AnimatedSprite2D) get_offset #

fn (s &AnimatedSprite2D) get_offset() Vector2

fn (AnimatedSprite2D) set_flip_h #

fn (s &AnimatedSprite2D) set_flip_h(flip_h bool)

fn (AnimatedSprite2D) is_flipped_h #

fn (s &AnimatedSprite2D) is_flipped_h() bool

fn (AnimatedSprite2D) set_flip_v #

fn (s &AnimatedSprite2D) set_flip_v(flip_v bool)

fn (AnimatedSprite2D) is_flipped_v #

fn (s &AnimatedSprite2D) is_flipped_v() bool

fn (AnimatedSprite2D) set_frame #

fn (s &AnimatedSprite2D) set_frame(frame i64)

fn (AnimatedSprite2D) get_frame #

fn (s &AnimatedSprite2D) get_frame() i64

fn (AnimatedSprite2D) set_frame_progress #

fn (s &AnimatedSprite2D) set_frame_progress(progress f64)

fn (AnimatedSprite2D) get_frame_progress #

fn (s &AnimatedSprite2D) get_frame_progress() f64

fn (AnimatedSprite2D) set_frame_and_progress #

fn (s &AnimatedSprite2D) set_frame_and_progress(frame i64, progress f64)

Sets [member frame] and [member frame_progress] to the given values. Unlike setting [member frame], this method does not reset the [member frame_progress] to 0.0 implicitly. [b]Example:[/b] Change the animation while keeping the same [member frame] and [member frame_progress]: [codeblocks] [gdscript] var current_frame = animated_sprite.get_frame() var current_progress = animated_sprite.get_frame_progress() animated_sprite.play("walk_another_skin") animated_sprite.set_frame_and_progress(current_frame, current_progress) [/gdscript] [/codeblocks]

fn (AnimatedSprite2D) set_speed_scale #

fn (s &AnimatedSprite2D) set_speed_scale(speed_scale f64)

fn (AnimatedSprite2D) get_speed_scale #

fn (s &AnimatedSprite2D) get_speed_scale() f64

fn (AnimatedSprite2D) get_playing_speed #

fn (s &AnimatedSprite2D) get_playing_speed() f64

Returns the actual playing speed of current animation or 0 if not playing. This speed is the [member speed_scale] property multiplied by custom_speed argument specified when calling the [method play] method. Returns a negative value if the current animation is playing backwards.

struct AnimatedSprite2D_play_Cfg #

@[params]
struct AnimatedSprite2D_play_Cfg {
pub:
	name         string
	custom_speed f64 = 1.0
	from_end     bool
}

Optional parameters for AnimatedSprite2D#play

struct AnimatedSprite2D_play_backwards_Cfg #

@[params]
struct AnimatedSprite2D_play_backwards_Cfg {
pub:
	name string
}

Optional parameters for AnimatedSprite2D#play_backwards

struct AnimatedSprite3D #

struct AnimatedSprite3D {
	SpriteBase3D
}

2D sprite node in 3D world, that can use multiple 2D textures for animation.

fn (AnimatedSprite3D) to_variant #

fn (s &AnimatedSprite3D) to_variant() Variant

fn (AnimatedSprite3D) from_variant #

fn (mut s AnimatedSprite3D) from_variant(variant &Variant)

fn (AnimatedSprite3D) set_sprite_frames #

fn (s &AnimatedSprite3D) set_sprite_frames(sprite_frames SpriteFrames)

fn (AnimatedSprite3D) get_sprite_frames #

fn (s &AnimatedSprite3D) get_sprite_frames() SpriteFrames

fn (AnimatedSprite3D) set_animation #

fn (s &AnimatedSprite3D) set_animation(name string)

fn (AnimatedSprite3D) get_animation #

fn (s &AnimatedSprite3D) get_animation() string

fn (AnimatedSprite3D) set_autoplay #

fn (s &AnimatedSprite3D) set_autoplay(name string)

fn (AnimatedSprite3D) get_autoplay #

fn (s &AnimatedSprite3D) get_autoplay() string

fn (AnimatedSprite3D) is_playing #

fn (s &AnimatedSprite3D) is_playing() bool

Returns true if an animation is currently playing (even if [member speed_scale] and/or custom_speed are 0).

fn (AnimatedSprite3D) play #

fn (s &AnimatedSprite3D) play(cfg AnimatedSprite3D_play_Cfg)

Plays the animation with key [param name]. If [param custom_speed] is negative and [param from_end] is true, the animation will play backwards (which is equivalent to calling [method play_backwards]). If this method is called with that same animation [param name], or with no [param name] parameter, the assigned animation will resume playing if it was paused.

fn (AnimatedSprite3D) play_backwards #

fn (s &AnimatedSprite3D) play_backwards(cfg AnimatedSprite3D_play_backwards_Cfg)

Plays the animation with key [param name] in reverse. This method is a shorthand for [method play] with custom_speed = -1.0 and from_end = true, so see its description for more information.

fn (AnimatedSprite3D) pause #

fn (s &AnimatedSprite3D) pause()

Pauses the currently playing animation. The [member frame] and [member frame_progress] will be kept and calling [method play] or [method play_backwards] without arguments will resume the animation from the current playback position. See also [method stop].

fn (AnimatedSprite3D) stop #

fn (s &AnimatedSprite3D) stop()

Stops the currently playing animation. The animation position is reset to 0 and the custom_speed is reset to 1.0. See also [method pause].

fn (AnimatedSprite3D) set_frame #

fn (s &AnimatedSprite3D) set_frame(frame i64)

fn (AnimatedSprite3D) get_frame #

fn (s &AnimatedSprite3D) get_frame() i64

fn (AnimatedSprite3D) set_frame_progress #

fn (s &AnimatedSprite3D) set_frame_progress(progress f64)

fn (AnimatedSprite3D) get_frame_progress #

fn (s &AnimatedSprite3D) get_frame_progress() f64

fn (AnimatedSprite3D) set_frame_and_progress #

fn (s &AnimatedSprite3D) set_frame_and_progress(frame i64, progress f64)

Sets [member frame] and [member frame_progress] to the given values. Unlike setting [member frame], this method does not reset the [member frame_progress] to 0.0 implicitly. [b]Example:[/b] Change the animation while keeping the same [member frame] and [member frame_progress]: [codeblocks] [gdscript] var current_frame = animated_sprite.get_frame() var current_progress = animated_sprite.get_frame_progress() animated_sprite.play("walk_another_skin") animated_sprite.set_frame_and_progress(current_frame, current_progress) [/gdscript] [/codeblocks]

fn (AnimatedSprite3D) set_speed_scale #

fn (s &AnimatedSprite3D) set_speed_scale(speed_scale f64)

fn (AnimatedSprite3D) get_speed_scale #

fn (s &AnimatedSprite3D) get_speed_scale() f64

fn (AnimatedSprite3D) get_playing_speed #

fn (s &AnimatedSprite3D) get_playing_speed() f64

Returns the actual playing speed of current animation or 0 if not playing. This speed is the [member speed_scale] property multiplied by custom_speed argument specified when calling the [method play] method. Returns a negative value if the current animation is playing backwards.

struct AnimatedSprite3D_play_Cfg #

@[params]
struct AnimatedSprite3D_play_Cfg {
pub:
	name         string
	custom_speed f64 = 1.0
	from_end     bool
}

Optional parameters for AnimatedSprite3D#play

struct AnimatedSprite3D_play_backwards_Cfg #

@[params]
struct AnimatedSprite3D_play_backwards_Cfg {
pub:
	name string
}

Optional parameters for AnimatedSprite3D#play_backwards

struct AnimatedTexture #

struct AnimatedTexture {
	Texture2D
}

Proxy texture for simple frame-based animations.

fn (AnimatedTexture) to_variant #

fn (s &AnimatedTexture) to_variant() Variant

fn (AnimatedTexture) from_variant #

fn (mut s AnimatedTexture) from_variant(variant &Variant)

fn (AnimatedTexture) set_frames #

fn (s &AnimatedTexture) set_frames(frames i64)

fn (AnimatedTexture) get_frames #

fn (s &AnimatedTexture) get_frames() i64

fn (AnimatedTexture) set_current_frame #

fn (s &AnimatedTexture) set_current_frame(frame i64)

fn (AnimatedTexture) get_current_frame #

fn (s &AnimatedTexture) get_current_frame() i64

fn (AnimatedTexture) set_pause #

fn (s &AnimatedTexture) set_pause(pause bool)

fn (AnimatedTexture) get_pause #

fn (s &AnimatedTexture) get_pause() bool

fn (AnimatedTexture) set_one_shot #

fn (s &AnimatedTexture) set_one_shot(one_shot bool)

fn (AnimatedTexture) get_one_shot #

fn (s &AnimatedTexture) get_one_shot() bool

fn (AnimatedTexture) set_speed_scale #

fn (s &AnimatedTexture) set_speed_scale(scale f64)

fn (AnimatedTexture) get_speed_scale #

fn (s &AnimatedTexture) get_speed_scale() f64

fn (AnimatedTexture) set_frame_texture #

fn (s &AnimatedTexture) set_frame_texture(frame i64, texture Texture2D)

Assigns a [Texture2D] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1. You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.

fn (AnimatedTexture) get_frame_texture #

fn (s &AnimatedTexture) get_frame_texture(frame i64) Texture2D

Returns the given frame's [Texture2D].

fn (AnimatedTexture) set_frame_duration #

fn (s &AnimatedTexture) set_frame_duration(frame i64, duration f64)

Sets the duration of any given [param frame]. The final duration is affected by the [member speed_scale]. If set to 0, the frame is skipped during playback.

fn (AnimatedTexture) get_frame_duration #

fn (s &AnimatedTexture) get_frame_duration(frame i64) f64

Returns the given [param frame]'s duration, in seconds.

struct Animation #

struct Animation {
	Resource
}

Holds data that can be used to animate anything in the engine.

fn (Animation) to_variant #

fn (s &Animation) to_variant() Variant

fn (Animation) from_variant #

fn (mut s Animation) from_variant(variant &Variant)

fn (Animation) add_track #

fn (s &Animation) add_track(gd_type AnimationTrackType, cfg Animation_add_track_Cfg) i64

Adds a track to the Animation.

fn (Animation) remove_track #

fn (s &Animation) remove_track(track_idx i64)

Removes a track by specifying the track index.

fn (Animation) get_track_count #

fn (s &Animation) get_track_count() i64

Returns the amount of tracks in the animation.

fn (Animation) track_get_type #

fn (s &Animation) track_get_type(track_idx i64) AnimationTrackType

Gets the type of a track.

fn (Animation) track_get_path #

fn (s &Animation) track_get_path(track_idx i64) NodePath

Gets the path of a track. For more information on the path format, see [method track_set_path].

fn (Animation) track_set_path #

fn (s &Animation) track_set_path(track_idx i64, path NodePath)

Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the [member AnimationMixer.root_node] that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". For example, "character/skeleton:ankle" or "character/mesh:transform/local".

fn (Animation) find_track #

fn (s &Animation) find_track(path NodePath, gd_type AnimationTrackType) i64

Returns the index of the specified track. If the track is not found, return -1.

fn (Animation) track_move_up #

fn (s &Animation) track_move_up(track_idx i64)

Moves a track up.

fn (Animation) track_move_down #

fn (s &Animation) track_move_down(track_idx i64)

Moves a track down.

fn (Animation) track_move_to #

fn (s &Animation) track_move_to(track_idx i64, to_idx i64)

Changes the index position of track [param track_idx] to the one defined in [param to_idx].

fn (Animation) track_swap #

fn (s &Animation) track_swap(track_idx i64, with_idx i64)

Swaps the track [param track_idx]'s index position with the track [param with_idx].

fn (Animation) track_set_imported #

fn (s &Animation) track_set_imported(track_idx i64, imported bool)

Sets the given track as imported or not.

fn (Animation) track_is_imported #

fn (s &Animation) track_is_imported(track_idx i64) bool

Returns true if the given track is imported. Else, return false.

fn (Animation) track_set_enabled #

fn (s &Animation) track_set_enabled(track_idx i64, enabled bool)

Enables/disables the given track. Tracks are enabled by default.

fn (Animation) track_is_enabled #

fn (s &Animation) track_is_enabled(track_idx i64) bool

Returns true if the track at index [param track_idx] is enabled.

fn (Animation) position_track_insert_key #

fn (s &Animation) position_track_insert_key(track_idx i64, time f64, position Vector3) i64

Inserts a key in a given 3D position track. Returns the key index.

fn (Animation) rotation_track_insert_key #

fn (s &Animation) rotation_track_insert_key(track_idx i64, time f64, rotation Quaternion) i64

Inserts a key in a given 3D rotation track. Returns the key index.

fn (Animation) scale_track_insert_key #

fn (s &Animation) scale_track_insert_key(track_idx i64, time f64, scale Vector3) i64

Inserts a key in a given 3D scale track. Returns the key index.

fn (Animation) blend_shape_track_insert_key #

fn (s &Animation) blend_shape_track_insert_key(track_idx i64, time f64, amount f64) i64

Inserts a key in a given blend shape track. Returns the key index.

fn (Animation) position_track_interpolate #

fn (s &Animation) position_track_interpolate(track_idx i64, time_sec f64, cfg Animation_position_track_interpolate_Cfg) Vector3

Returns the interpolated position value at the given time (in seconds). The [param track_idx] must be the index of a 3D position track.

fn (Animation) rotation_track_interpolate #

fn (s &Animation) rotation_track_interpolate(track_idx i64, time_sec f64, cfg Animation_rotation_track_interpolate_Cfg) Quaternion

Returns the interpolated rotation value at the given time (in seconds). The [param track_idx] must be the index of a 3D rotation track.

fn (Animation) scale_track_interpolate #

fn (s &Animation) scale_track_interpolate(track_idx i64, time_sec f64, cfg Animation_scale_track_interpolate_Cfg) Vector3

Returns the interpolated scale value at the given time (in seconds). The [param track_idx] must be the index of a 3D scale track.

fn (Animation) blend_shape_track_interpolate #

fn (s &Animation) blend_shape_track_interpolate(track_idx i64, time_sec f64, cfg Animation_blend_shape_track_interpolate_Cfg) f64

Returns the interpolated blend shape value at the given time (in seconds). The [param track_idx] must be the index of a blend shape track.

fn (Animation) track_insert_key #

fn (s &Animation) track_insert_key(track_idx i64, time f64, key_ ToVariant, cfg Animation_track_insert_key_Cfg) i64

Inserts a generic key in a given track. Returns the key index.

fn (Animation) track_remove_key #

fn (s &Animation) track_remove_key(track_idx i64, key_idx i64)

Removes a key by index in a given track.

fn (Animation) track_remove_key_at_time #

fn (s &Animation) track_remove_key_at_time(track_idx i64, time f64)

Removes a key at [param time] in a given track.

fn (Animation) track_set_key_value #

fn (s &Animation) track_set_key_value(track_idx i64, key i64, value_ ToVariant)

Sets the value of an existing key.

fn (Animation) track_set_key_transition #

fn (s &Animation) track_set_key_transition(track_idx i64, key_idx i64, transition f64)

Sets the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).

fn (Animation) track_set_key_time #

fn (s &Animation) track_set_key_time(track_idx i64, key_idx i64, time f64)

Sets the time of an existing key.

fn (Animation) track_get_key_transition #

fn (s &Animation) track_get_key_transition(track_idx i64, key_idx i64) f64

Returns the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).

fn (Animation) track_get_key_count #

fn (s &Animation) track_get_key_count(track_idx i64) i64

Returns the number of keys in a given track.

fn (Animation) track_get_key_value #

fn (s &Animation) track_get_key_value(track_idx i64, key_idx i64) Variant

Returns the value of a given key in a given track.

fn (Animation) track_get_key_time #

fn (s &Animation) track_get_key_time(track_idx i64, key_idx i64) f64

Returns the time at which the key is located.

fn (Animation) track_find_key #

fn (s &Animation) track_find_key(track_idx i64, time f64, cfg Animation_track_find_key_Cfg) i64

Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given. If [param limit] is true, it does not return keys outside the animation range. If [param backward] is true, the direction is reversed in methods that rely on one directional processing. For example, in case [param find_mode] is [constant FIND_MODE_NEAREST], if there is no key in the current position just after seeked, the first key found is retrieved by searching before the position, but if [param backward] is true, the first key found is retrieved after the position.

fn (Animation) track_set_interpolation_type #

fn (s &Animation) track_set_interpolation_type(track_idx i64, interpolation AnimationInterpolationType)

Sets the interpolation type of a given track.

fn (Animation) track_get_interpolation_type #

fn (s &Animation) track_get_interpolation_type(track_idx i64) AnimationInterpolationType

Returns the interpolation type of a given track.

fn (Animation) track_set_interpolation_loop_wrap #

fn (s &Animation) track_set_interpolation_loop_wrap(track_idx i64, interpolation bool)

If true, the track at [param track_idx] wraps the interpolation loop.

fn (Animation) track_get_interpolation_loop_wrap #

fn (s &Animation) track_get_interpolation_loop_wrap(track_idx i64) bool

Returns true if the track at [param track_idx] wraps the interpolation loop. New tracks wrap the interpolation loop by default.

fn (Animation) track_is_compressed #

fn (s &Animation) track_is_compressed(track_idx i64) bool

Returns true if the track is compressed, false otherwise. See also [method compress].

fn (Animation) value_track_set_update_mode #

fn (s &Animation) value_track_set_update_mode(track_idx i64, mode AnimationUpdateMode)

Sets the update mode of a value track.

fn (Animation) value_track_get_update_mode #

fn (s &Animation) value_track_get_update_mode(track_idx i64) AnimationUpdateMode

Returns the update mode of a value track.

fn (Animation) value_track_interpolate #

fn (s &Animation) value_track_interpolate(track_idx i64, time_sec f64, cfg Animation_value_track_interpolate_Cfg) Variant

Returns the interpolated value at the given time (in seconds). The [param track_idx] must be the index of a value track. A [param backward] mainly affects the direction of key retrieval of the track with [constant UPDATE_DISCRETE] converted by [constant AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS] to match the result with [method track_find_key].

fn (Animation) method_track_get_name #

fn (s &Animation) method_track_get_name(track_idx i64, key_idx i64) string

Returns the method name of a method track.

fn (Animation) method_track_get_params #

fn (s &Animation) method_track_get_params(track_idx i64, key_idx i64) Array

Returns the arguments values to be called on a method track for a given key in a given track.

fn (Animation) bezier_track_insert_key #

fn (s &Animation) bezier_track_insert_key(track_idx i64, time f64, value f64, cfg Animation_bezier_track_insert_key_Cfg) i64

Inserts a Bezier Track key at the given [param time] in seconds. The [param track_idx] must be the index of a Bezier Track. [param in_handle] is the left-side weight of the added Bezier curve point, [param out_handle] is the right-side one, while [param value] is the actual value at this point.

fn (Animation) bezier_track_set_key_value #

fn (s &Animation) bezier_track_set_key_value(track_idx i64, key_idx i64, value f64)

Sets the value of the key identified by [param key_idx] to the given value. The [param track_idx] must be the index of a Bezier Track.

fn (Animation) bezier_track_set_key_in_handle #

fn (s &Animation) bezier_track_set_key_in_handle(track_idx i64, key_idx i64, in_handle Vector2, cfg Animation_bezier_track_set_key_in_handle_Cfg)

Sets the in handle of the key identified by [param key_idx] to value [param in_handle]. The [param track_idx] must be the index of a Bezier Track.

fn (Animation) bezier_track_set_key_out_handle #

fn (s &Animation) bezier_track_set_key_out_handle(track_idx i64, key_idx i64, out_handle Vector2, cfg Animation_bezier_track_set_key_out_handle_Cfg)

Sets the out handle of the key identified by [param key_idx] to value [param out_handle]. The [param track_idx] must be the index of a Bezier Track.

fn (Animation) bezier_track_get_key_value #

fn (s &Animation) bezier_track_get_key_value(track_idx i64, key_idx i64) f64

Returns the value of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track.

fn (Animation) bezier_track_get_key_in_handle #

fn (s &Animation) bezier_track_get_key_in_handle(track_idx i64, key_idx i64) Vector2

Returns the in handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track.

fn (Animation) bezier_track_get_key_out_handle #

fn (s &Animation) bezier_track_get_key_out_handle(track_idx i64, key_idx i64) Vector2

Returns the out handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track.

fn (Animation) bezier_track_interpolate #

fn (s &Animation) bezier_track_interpolate(track_idx i64, time f64) f64

Returns the interpolated value at the given [param time] (in seconds). The [param track_idx] must be the index of a Bezier Track.

fn (Animation) audio_track_insert_key #

fn (s &Animation) audio_track_insert_key(track_idx i64, time f64, stream Resource, cfg Animation_audio_track_insert_key_Cfg) i64

Inserts an Audio Track key at the given [param time] in seconds. The [param track_idx] must be the index of an Audio Track. [param stream] is the [AudioStream] resource to play. [param start_offset] is the number of seconds cut off at the beginning of the audio stream, while [param end_offset] is at the ending.

fn (Animation) audio_track_set_key_stream #

fn (s &Animation) audio_track_set_key_stream(track_idx i64, key_idx i64, stream Resource)

Sets the stream of the key identified by [param key_idx] to value [param stream]. The [param track_idx] must be the index of an Audio Track.

fn (Animation) audio_track_set_key_start_offset #

fn (s &Animation) audio_track_set_key_start_offset(track_idx i64, key_idx i64, offset f64)

Sets the start offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track.

fn (Animation) audio_track_set_key_end_offset #

fn (s &Animation) audio_track_set_key_end_offset(track_idx i64, key_idx i64, offset f64)

Sets the end offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track.

fn (Animation) audio_track_get_key_stream #

fn (s &Animation) audio_track_get_key_stream(track_idx i64, key_idx i64) Resource

Returns the audio stream of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track.

fn (Animation) audio_track_get_key_start_offset #

fn (s &Animation) audio_track_get_key_start_offset(track_idx i64, key_idx i64) f64

Returns the start offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track. Start offset is the number of seconds cut off at the beginning of the audio stream.

fn (Animation) audio_track_get_key_end_offset #

fn (s &Animation) audio_track_get_key_end_offset(track_idx i64, key_idx i64) f64

Returns the end offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track. End offset is the number of seconds cut off at the ending of the audio stream.

fn (Animation) audio_track_set_use_blend #

fn (s &Animation) audio_track_set_use_blend(track_idx i64, enable bool)

Sets whether the track will be blended with other animations. If true, the audio playback volume changes depending on the blend value.

fn (Animation) audio_track_is_use_blend #

fn (s &Animation) audio_track_is_use_blend(track_idx i64) bool

Returns true if the track at [param track_idx] will be blended with other animations.

fn (Animation) animation_track_insert_key #

fn (s &Animation) animation_track_insert_key(track_idx i64, time f64, animation string) i64

Inserts a key with value [param animation] at the given [param time] (in seconds). The [param track_idx] must be the index of an Animation Track.

fn (Animation) animation_track_set_key_animation #

fn (s &Animation) animation_track_set_key_animation(track_idx i64, key_idx i64, animation string)

Sets the key identified by [param key_idx] to value [param animation]. The [param track_idx] must be the index of an Animation Track.

fn (Animation) animation_track_get_key_animation #

fn (s &Animation) animation_track_get_key_animation(track_idx i64, key_idx i64) string

Returns the animation name at the key identified by [param key_idx]. The [param track_idx] must be the index of an Animation Track.

fn (Animation) add_marker #

fn (s &Animation) add_marker(name string, time f64)

Adds a marker to this Animation.

fn (Animation) remove_marker #

fn (s &Animation) remove_marker(name string)

Removes the marker with the given name from this Animation.

fn (Animation) has_marker #

fn (s &Animation) has_marker(name string) bool

Returns true if this Animation contains a marker with the given name.

fn (Animation) get_marker_at_time #

fn (s &Animation) get_marker_at_time(time f64) string

Returns the name of the marker located at the given time.

fn (Animation) get_next_marker #

fn (s &Animation) get_next_marker(time f64) string

Returns the closest marker that comes after the given time. If no such marker exists, an empty string is returned.

fn (Animation) get_prev_marker #

fn (s &Animation) get_prev_marker(time f64) string

Returns the closest marker that comes before the given time. If no such marker exists, an empty string is returned.

fn (Animation) get_marker_time #

fn (s &Animation) get_marker_time(name string) f64

Returns the given marker's time.

fn (Animation) get_marker_names #

fn (s &Animation) get_marker_names() PackedStringArray

Returns every marker in this Animation, sorted ascending by time.

fn (Animation) get_marker_color #

fn (s &Animation) get_marker_color(name string) Color

Returns the given marker's color.

fn (Animation) set_marker_color #

fn (s &Animation) set_marker_color(name string, color Color)

Sets the given marker's color.

fn (Animation) set_length #

fn (s &Animation) set_length(time_sec f64)

fn (Animation) get_length #

fn (s &Animation) get_length() f64

fn (Animation) set_loop_mode #

fn (s &Animation) set_loop_mode(loop_mode AnimationLoopMode)

fn (Animation) get_loop_mode #

fn (s &Animation) get_loop_mode() AnimationLoopMode

fn (Animation) set_step #

fn (s &Animation) set_step(size_sec f64)

fn (Animation) get_step #

fn (s &Animation) get_step() f64

fn (Animation) clear #

fn (s &Animation) clear()

Clear the animation (clear all tracks and reset all).

fn (Animation) copy_track #

fn (s &Animation) copy_track(track_idx i64, to_animation Animation)

Adds a new track to [param to_animation] that is a copy of the given track from this animation.

fn (Animation) optimize #

fn (s &Animation) optimize(cfg Animation_optimize_Cfg)

Optimize the animation and all its tracks in-place. This will preserve only as many keys as are necessary to keep the animation within the specified bounds.

fn (Animation) compress #

fn (s &Animation) compress(cfg Animation_compress_Cfg)

Compress the animation and all its tracks in-place. This will make [method track_is_compressed] return true once called on this [Animation]. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. [b]Note:[/b] Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them.

fn (Animation) is_capture_included #

fn (s &Animation) is_capture_included() bool

struct AnimationLibrary #

struct AnimationLibrary {
	Resource
}

Container for [Animation] resources.

fn (AnimationLibrary) to_variant #

fn (s &AnimationLibrary) to_variant() Variant

fn (AnimationLibrary) from_variant #

fn (mut s AnimationLibrary) from_variant(variant &Variant)

fn (AnimationLibrary) add_animation #

fn (s &AnimationLibrary) add_animation(name string, animation Animation) GDError

Adds the [param animation] to the library, accessible by the key [param name].

fn (AnimationLibrary) remove_animation #

fn (s &AnimationLibrary) remove_animation(name string)

Removes the [Animation] with the key [param name].

fn (AnimationLibrary) rename_animation #

fn (s &AnimationLibrary) rename_animation(name string, newname string)

Changes the key of the [Animation] associated with the key [param name] to [param newname].

fn (AnimationLibrary) has_animation #

fn (s &AnimationLibrary) has_animation(name string) bool

Returns true if the library stores an [Animation] with [param name] as the key.

fn (AnimationLibrary) get_animation #

fn (s &AnimationLibrary) get_animation(name string) Animation

Returns the [Animation] with the key [param name]. If the animation does not exist, null is returned and an error is logged.

fn (AnimationLibrary) get_animation_list #

fn (s &AnimationLibrary) get_animation_list() Array

Returns the keys for the [Animation]s stored in the library.

fn (AnimationLibrary) get_animation_list_size #

fn (s &AnimationLibrary) get_animation_list_size() i64

Returns the key count for the [Animation]s stored in the library.

struct AnimationMixer #

struct AnimationMixer {
	Node
}

Base class for [AnimationPlayer] and [AnimationTree].

fn (AnimationMixer) to_variant #

fn (s &AnimationMixer) to_variant() Variant

fn (AnimationMixer) from_variant #

fn (mut s AnimationMixer) from_variant(variant &Variant)

fn (AnimationMixer) gd_post_process_key_value #

fn (s &AnimationMixer) gd_post_process_key_value(animation Animation, track i64, value_ ToVariant, object_id i64, object_sub_idx i64) Variant

A virtual function for processing after getting a key during playback.

fn (AnimationMixer) add_animation_library #

fn (s &AnimationMixer) add_animation_library(name string, library AnimationLibrary) GDError

Adds [param library] to the animation player, under the key [param name]. AnimationMixer has a global library by default with an empty string as key. For adding an animation to the global library: [codeblocks] [gdscript] var global_library = mixer.get_animation_library("") global_library.add_animation("animation_name", animation_resource) [/gdscript] [/codeblocks]

fn (AnimationMixer) remove_animation_library #

fn (s &AnimationMixer) remove_animation_library(name string)

Removes the [AnimationLibrary] associated with the key [param name].

fn (AnimationMixer) rename_animation_library #

fn (s &AnimationMixer) rename_animation_library(name string, newname string)

Moves the [AnimationLibrary] associated with the key [param name] to the key [param newname].

fn (AnimationMixer) has_animation_library #

fn (s &AnimationMixer) has_animation_library(name string) bool

Returns true if the [AnimationMixer] stores an [AnimationLibrary] with key [param name].

fn (AnimationMixer) get_animation_library #

fn (s &AnimationMixer) get_animation_library(name string) AnimationLibrary

Returns the first [AnimationLibrary] with key [param name] or null if not found. To get the [AnimationMixer]'s global animation library, use get_animation_library("").

fn (AnimationMixer) get_animation_library_list #

fn (s &AnimationMixer) get_animation_library_list() Array

Returns the list of stored library keys.

fn (AnimationMixer) has_animation #

fn (s &AnimationMixer) has_animation(name string) bool

Returns true if the [AnimationMixer] stores an [Animation] with key [param name].

fn (AnimationMixer) get_animation #

fn (s &AnimationMixer) get_animation(name string) Animation

Returns the [Animation] with the key [param name]. If the animation does not exist, null is returned and an error is logged.

fn (AnimationMixer) get_animation_list #

fn (s &AnimationMixer) get_animation_list() PackedStringArray

Returns the list of stored animation keys.

fn (AnimationMixer) set_active #

fn (s &AnimationMixer) set_active(active bool)

fn (AnimationMixer) is_active #

fn (s &AnimationMixer) is_active() bool

fn (AnimationMixer) set_deterministic #

fn (s &AnimationMixer) set_deterministic(deterministic bool)

fn (AnimationMixer) is_deterministic #

fn (s &AnimationMixer) is_deterministic() bool

fn (AnimationMixer) set_root_node #

fn (s &AnimationMixer) set_root_node(path NodePath)

fn (AnimationMixer) get_root_node #

fn (s &AnimationMixer) get_root_node() NodePath

fn (AnimationMixer) set_callback_mode_process #

fn (s &AnimationMixer) set_callback_mode_process(mode AnimationMixerAnimationCallbackModeProcess)

fn (AnimationMixer) get_callback_mode_process #

fn (s &AnimationMixer) get_callback_mode_process() AnimationMixerAnimationCallbackModeProcess

fn (AnimationMixer) set_callback_mode_method #

fn (s &AnimationMixer) set_callback_mode_method(mode AnimationMixerAnimationCallbackModeMethod)

fn (AnimationMixer) get_callback_mode_method #

fn (s &AnimationMixer) get_callback_mode_method() AnimationMixerAnimationCallbackModeMethod

fn (AnimationMixer) set_callback_mode_discrete #

fn (s &AnimationMixer) set_callback_mode_discrete(mode AnimationMixerAnimationCallbackModeDiscrete)

fn (AnimationMixer) get_callback_mode_discrete #

fn (s &AnimationMixer) get_callback_mode_discrete() AnimationMixerAnimationCallbackModeDiscrete

fn (AnimationMixer) set_audio_max_polyphony #

fn (s &AnimationMixer) set_audio_max_polyphony(max_polyphony i64)

fn (AnimationMixer) get_audio_max_polyphony #

fn (s &AnimationMixer) get_audio_max_polyphony() i64

fn (AnimationMixer) set_root_motion_track #

fn (s &AnimationMixer) set_root_motion_track(path NodePath)

fn (AnimationMixer) get_root_motion_track #

fn (s &AnimationMixer) get_root_motion_track() NodePath

fn (AnimationMixer) set_root_motion_local #

fn (s &AnimationMixer) set_root_motion_local(enabled bool)

fn (AnimationMixer) is_root_motion_local #

fn (s &AnimationMixer) is_root_motion_local() bool

fn (AnimationMixer) get_root_motion_position #

fn (s &AnimationMixer) get_root_motion_position() Vector3

Retrieve the motion delta of position with the [member root_motion_track] as a [Vector3] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_POSITION_3D], returns Vector3(0, 0, 0). See also [member root_motion_track] and [RootMotionView]. The most basic example is applying position to [CharacterBody3D]: [codeblocks] [gdscript] var current_rotation

func _process(delta): if Input.is_action_just_pressed("animate"): current_rotation = get_quaternion() state_machine.travel("Animate") var velocity = current_rotation * animation_tree.get_root_motion_position() / delta set_velocity(velocity) move_and_slide() [/gdscript] [/codeblocks] By using this in combination with [method get_root_motion_rotation_accumulator], you can apply the root motion position more correctly to account for the rotation of the node. [codeblocks] [gdscript] func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) var velocity = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta set_velocity(velocity) move_and_slide() [/gdscript] [/codeblocks] If [member root_motion_local] is true, returns the pre-multiplied translation value with the inverted rotation. In this case, the code can be written as follows: [codeblocks] [gdscript] func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) var velocity = get_quaternion() * animation_tree.get_root_motion_position() / delta set_velocity(velocity) move_and_slide() [/gdscript] [/codeblocks]

fn (AnimationMixer) get_root_motion_rotation #

fn (s &AnimationMixer) get_root_motion_rotation() Quaternion

Retrieve the motion delta of rotation with the [member root_motion_track] as a [Quaternion] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_ROTATION_3D], returns Quaternion(0, 0, 0, 1). See also [member root_motion_track] and [RootMotionView]. The most basic example is applying rotation to [CharacterBody3D]: [codeblocks] [gdscript] func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) [/gdscript] [/codeblocks]

fn (AnimationMixer) get_root_motion_scale #

fn (s &AnimationMixer) get_root_motion_scale() Vector3

Retrieve the motion delta of scale with the [member root_motion_track] as a [Vector3] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_SCALE_3D], returns Vector3(0, 0, 0). See also [member root_motion_track] and [RootMotionView]. The most basic example is applying scale to [CharacterBody3D]: [codeblocks] [gdscript] var current_scale = Vector3(1, 1, 1) var scale_accum = Vector3(1, 1, 1)

func _process(delta): if Input.is_action_just_pressed("animate"): current_scale = get_scale() scale_accum = Vector3(1, 1, 1) state_machine.travel("Animate") scale_accum += animation_tree.get_root_motion_scale() set_scale(current_scale * scale_accum) [/gdscript] [/codeblocks]

fn (AnimationMixer) get_root_motion_position_accumulator #

fn (s &AnimationMixer) get_root_motion_position_accumulator() Vector3

Retrieve the blended value of the position tracks with the [member root_motion_track] as a [Vector3] that can be used elsewhere. This is useful in cases where you want to respect the initial key values of the animation. For example, if an animation with only one key Vector3(0, 0, 0) is played in the previous frame and then an animation with only one key Vector3(1, 0, 1) is played in the next frame, the difference can be calculated as follows: [codeblocks] [gdscript] var prev_root_motion_position_accumulator

func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") var current_root_motion_position_accumulator = animation_tree.get_root_motion_position_accumulator() var difference = current_root_motion_position_accumulator - prev_root_motion_position_accumulator prev_root_motion_position_accumulator = current_root_motion_position_accumulator transform.origin += difference [/gdscript] [/codeblocks] However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases.

fn (AnimationMixer) get_root_motion_rotation_accumulator #

fn (s &AnimationMixer) get_root_motion_rotation_accumulator() Quaternion

Retrieve the blended value of the rotation tracks with the [member root_motion_track] as a [Quaternion] that can be used elsewhere. This is necessary to apply the root motion position correctly, taking rotation into account. See also [method get_root_motion_position]. Also, this is useful in cases where you want to respect the initial key values of the animation. For example, if an animation with only one key Quaternion(0, 0, 0, 1) is played in the previous frame and then an animation with only one key Quaternion(0, 0.707, 0, 0.707) is played in the next frame, the difference can be calculated as follows: [codeblocks] [gdscript] var prev_root_motion_rotation_accumulator

func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") var current_root_motion_rotation_accumulator = animation_tree.get_root_motion_rotation_accumulator() var difference = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator transform.basis *= Basis(difference) [/gdscript] [/codeblocks] However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases.

fn (AnimationMixer) get_root_motion_scale_accumulator #

fn (s &AnimationMixer) get_root_motion_scale_accumulator() Vector3

Retrieve the blended value of the scale tracks with the [member root_motion_track] as a [Vector3] that can be used elsewhere. For example, if an animation with only one key Vector3(1, 1, 1) is played in the previous frame and then an animation with only one key Vector3(2, 2, 2) is played in the next frame, the difference can be calculated as follows: [codeblocks] [gdscript] var prev_root_motion_scale_accumulator

func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") var current_root_motion_scale_accumulator = animation_tree.get_root_motion_scale_accumulator() var difference = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator transform.basis = transform.basis.scaled(difference) [/gdscript] [/codeblocks] However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases.

fn (AnimationMixer) clear_caches #

fn (s &AnimationMixer) clear_caches()

[AnimationMixer] caches animated nodes. It may not notice if a node disappears; [method clear_caches] forces it to update the cache again.

fn (AnimationMixer) advance #

fn (s &AnimationMixer) advance(delta f64)

Manually advance the animations by the specified time (in seconds).

fn (AnimationMixer) capture #

fn (s &AnimationMixer) capture(name string, duration f64, cfg AnimationMixer_capture_Cfg)

If the animation track specified by [param name] has an option [constant Animation.UPDATE_CAPTURE], stores current values of the objects indicated by the track path as a cache. If there is already a captured cache, the old cache is discarded. After this it will interpolate with current animation blending result during the playback process for the time specified by [param duration], working like a crossfade. You can specify [param trans_type] as the curve for the interpolation. For better results, it may be appropriate to specify [constant Tween.TRANS_LINEAR] for cases where the first key of the track begins with a non-zero value or where the key value does not change, and [constant Tween.TRANS_QUAD] for cases where the key value changes linearly.

fn (AnimationMixer) set_reset_on_save_enabled #

fn (s &AnimationMixer) set_reset_on_save_enabled(enabled bool)

fn (AnimationMixer) is_reset_on_save_enabled #

fn (s &AnimationMixer) is_reset_on_save_enabled() bool

fn (AnimationMixer) find_animation #

fn (s &AnimationMixer) find_animation(animation Animation) string

Returns the key of [param animation] or an empty [StringName] if not found.

fn (AnimationMixer) find_animation_library #

fn (s &AnimationMixer) find_animation_library(animation Animation) string

Returns the key for the [AnimationLibrary] that contains [param animation] or an empty [StringName] if not found.

struct AnimationMixer_capture_Cfg #

@[params]
struct AnimationMixer_capture_Cfg {
pub:
	trans_type TweenTransitionType = unsafe { TweenTransitionType(0) }
	ease_type  TweenEaseType       = unsafe { TweenEaseType(0) }
}

Optional parameters for AnimationMixer#capture

struct AnimationNode #

struct AnimationNode {
	Resource
}

Base class for [AnimationTree] nodes. Not related to scene nodes.

fn (AnimationNode) to_variant #

fn (s &AnimationNode) to_variant() Variant

fn (AnimationNode) from_variant #

fn (mut s AnimationNode) from_variant(variant &Variant)

fn (AnimationNode) gd_get_child_nodes #

fn (s &AnimationNode) gd_get_child_nodes() Dictionary

When inheriting from [AnimationRootNode], implement this virtual method to return all child animation nodes in order as a name: node dictionary.

fn (AnimationNode) gd_get_parameter_list #

fn (s &AnimationNode) gd_get_parameter_list() Array

When inheriting from [AnimationRootNode], implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].

fn (AnimationNode) gd_get_child_by_name #

fn (s &AnimationNode) gd_get_child_by_name(name string) AnimationNode

When inheriting from [AnimationRootNode], implement this virtual method to return a child animation node by its [param name].

fn (AnimationNode) gd_get_parameter_default_value #

fn (s &AnimationNode) gd_get_parameter_default_value(parameter string) Variant

When inheriting from [AnimationRootNode], implement this virtual method to return the default value of a [param parameter]. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees.

fn (AnimationNode) gd_is_parameter_read_only #

fn (s &AnimationNode) gd_is_parameter_read_only(parameter string) bool

When inheriting from [AnimationRootNode], implement this virtual method to return whether the [param parameter] is read-only. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees.

fn (AnimationNode) gd_process #

fn (s &AnimationNode) gd_process(time f64, seek bool, is_external_seeking bool, test_only bool) f64

When inheriting from [AnimationRootNode], implement this virtual method to run some code when this animation node is processed. The [param time] parameter is a relative delta, unless [param seek] is true, in which case it is absolute. Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory. This function should return the delta.

fn (AnimationNode) gd_get_caption #

fn (s &AnimationNode) gd_get_caption() string

When inheriting from [AnimationRootNode], implement this virtual method to override the text caption for this animation node.

fn (AnimationNode) gd_has_filter #

fn (s &AnimationNode) gd_has_filter() bool

When inheriting from [AnimationRootNode], implement this virtual method to return whether the blend tree editor should display filter editing on this animation node.

fn (AnimationNode) add_input #

fn (s &AnimationNode) add_input(name string) bool

Adds an input to the animation node. This is only useful for animation nodes created for use in an [AnimationNodeBlendTree]. If the addition fails, returns false.

fn (AnimationNode) remove_input #

fn (s &AnimationNode) remove_input(index i64)

Removes an input, call this only when inactive.

fn (AnimationNode) set_input_name #

fn (s &AnimationNode) set_input_name(input i64, name string) bool

Sets the name of the input at the given [param input] index. If the setting fails, returns false.

fn (AnimationNode) get_input_name #

fn (s &AnimationNode) get_input_name(input i64) string

Gets the name of an input by index.

fn (AnimationNode) get_input_count #

fn (s &AnimationNode) get_input_count() i64

Amount of inputs in this animation node, only useful for animation nodes that go into [AnimationNodeBlendTree].

fn (AnimationNode) find_input #

fn (s &AnimationNode) find_input(name string) i64

Returns the input index which corresponds to [param name]. If not found, returns -1.

fn (AnimationNode) set_filter_path #

fn (s &AnimationNode) set_filter_path(path NodePath, enable bool)

Adds or removes a path for the filter.

fn (AnimationNode) is_path_filtered #

fn (s &AnimationNode) is_path_filtered(path NodePath) bool

Returns true if the given path is filtered.

fn (AnimationNode) set_filter_enabled #

fn (s &AnimationNode) set_filter_enabled(enable bool)

fn (AnimationNode) is_filter_enabled #

fn (s &AnimationNode) is_filter_enabled() bool

fn (AnimationNode) get_processing_animation_tree_instance_id #

fn (s &AnimationNode) get_processing_animation_tree_instance_id() i64

Returns the object id of the [AnimationTree] that owns this node. [b]Note:[/b] This method should only be called from within the [method AnimationNodeExtension._process_animation_node] method, and will return an invalid id otherwise.

fn (AnimationNode) is_process_testing #

fn (s &AnimationNode) is_process_testing() bool

Returns true if this animation node is being processed in test-only mode.

fn (AnimationNode) blend_animation #

fn (s &AnimationNode) blend_animation(animation string, time f64, delta f64, seeked bool, is_external_seeking bool, blend f64, cfg AnimationNode_blend_animation_Cfg)

Blends an animation by [param blend] amount (name must be valid in the linked [AnimationPlayer]). A [param time] and [param delta] may be passed, as well as whether [param seeked] happened. A [param looped_flag] is used by internal processing immediately after the loop.

fn (AnimationNode) blend_node #

fn (s &AnimationNode) blend_node(name string, node AnimationNode, time f64, seek bool, is_external_seeking bool, blend f64, cfg AnimationNode_blend_node_Cfg) f64

Blend another animation node (in case this animation node contains child animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, otherwise editors will not display your animation node for addition.

fn (AnimationNode) blend_input #

fn (s &AnimationNode) blend_input(input_index i64, time f64, seek bool, is_external_seeking bool, blend f64, cfg AnimationNode_blend_input_Cfg) f64

Blends an input. This is only useful for animation nodes created for an [AnimationNodeBlendTree]. The [param time] parameter is a relative delta, unless [param seek] is true, in which case it is absolute. A filter mode may be optionally passed.

fn (AnimationNode) set_parameter #

fn (s &AnimationNode) set_parameter(name string, value_ ToVariant)

Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes.

fn (AnimationNode) get_parameter #

fn (s &AnimationNode) get_parameter(name string) Variant

Gets the value of a parameter. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees.

struct AnimationNodeAdd2 #

struct AnimationNodeAdd2 {
	AnimationNodeSync
}

Blends two animations additively inside of an [AnimationNodeBlendTree].

fn (AnimationNodeAdd2) to_variant #

fn (s &AnimationNodeAdd2) to_variant() Variant

fn (AnimationNodeAdd2) from_variant #

fn (mut s AnimationNodeAdd2) from_variant(variant &Variant)

struct AnimationNodeAdd3 #

struct AnimationNodeAdd3 {
	AnimationNodeSync
}

Blends two of three animations additively inside of an [AnimationNodeBlendTree].

fn (AnimationNodeAdd3) to_variant #

fn (s &AnimationNodeAdd3) to_variant() Variant

fn (AnimationNodeAdd3) from_variant #

fn (mut s AnimationNodeAdd3) from_variant(variant &Variant)

struct AnimationNodeAnimation #

struct AnimationNodeAnimation {
	AnimationRootNode
}

An input animation for an [AnimationNodeBlendTree].

fn (AnimationNodeAnimation) to_variant #

fn (s &AnimationNodeAnimation) to_variant() Variant

fn (AnimationNodeAnimation) from_variant #

fn (mut s AnimationNodeAnimation) from_variant(variant &Variant)

fn (AnimationNodeAnimation) set_animation #

fn (s &AnimationNodeAnimation) set_animation(name string)

fn (AnimationNodeAnimation) get_animation #

fn (s &AnimationNodeAnimation) get_animation() string

fn (AnimationNodeAnimation) set_play_mode #

fn (s &AnimationNodeAnimation) set_play_mode(mode AnimationNodeAnimationPlayMode)

fn (AnimationNodeAnimation) get_play_mode #

fn (s &AnimationNodeAnimation) get_play_mode() AnimationNodeAnimationPlayMode

fn (AnimationNodeAnimation) set_advance_on_start #

fn (s &AnimationNodeAnimation) set_advance_on_start(advance_on_start bool)

fn (AnimationNodeAnimation) is_advance_on_start #

fn (s &AnimationNodeAnimation) is_advance_on_start() bool

fn (AnimationNodeAnimation) set_use_custom_timeline #

fn (s &AnimationNodeAnimation) set_use_custom_timeline(use_custom_timeline bool)

fn (AnimationNodeAnimation) is_using_custom_timeline #

fn (s &AnimationNodeAnimation) is_using_custom_timeline() bool

fn (AnimationNodeAnimation) set_timeline_length #

fn (s &AnimationNodeAnimation) set_timeline_length(timeline_length f64)

fn (AnimationNodeAnimation) get_timeline_length #

fn (s &AnimationNodeAnimation) get_timeline_length() f64

fn (AnimationNodeAnimation) set_stretch_time_scale #

fn (s &AnimationNodeAnimation) set_stretch_time_scale(stretch_time_scale bool)

fn (AnimationNodeAnimation) is_stretching_time_scale #

fn (s &AnimationNodeAnimation) is_stretching_time_scale() bool

fn (AnimationNodeAnimation) set_start_offset #

fn (s &AnimationNodeAnimation) set_start_offset(start_offset f64)

fn (AnimationNodeAnimation) get_start_offset #

fn (s &AnimationNodeAnimation) get_start_offset() f64

fn (AnimationNodeAnimation) set_loop_mode #

fn (s &AnimationNodeAnimation) set_loop_mode(loop_mode AnimationLoopMode)

fn (AnimationNodeAnimation) get_loop_mode #

fn (s &AnimationNodeAnimation) get_loop_mode() AnimationLoopMode

struct AnimationNodeBlend2 #

struct AnimationNodeBlend2 {
	AnimationNodeSync
}

Blends two animations linearly inside of an [AnimationNodeBlendTree].

fn (AnimationNodeBlend2) to_variant #

fn (s &AnimationNodeBlend2) to_variant() Variant

fn (AnimationNodeBlend2) from_variant #

fn (mut s AnimationNodeBlend2) from_variant(variant &Variant)

struct AnimationNodeBlend3 #

struct AnimationNodeBlend3 {
	AnimationNodeSync
}

Blends two of three animations linearly inside of an [AnimationNodeBlendTree].

fn (AnimationNodeBlend3) to_variant #

fn (s &AnimationNodeBlend3) to_variant() Variant

fn (AnimationNodeBlend3) from_variant #

fn (mut s AnimationNodeBlend3) from_variant(variant &Variant)

struct AnimationNodeBlendSpace1D #

struct AnimationNodeBlendSpace1D {
	AnimationRootNode
}

A set of [AnimationRootNode]s placed on a virtual axis, crossfading between the two adjacent ones. Used by [AnimationTree].

fn (AnimationNodeBlendSpace1D) to_variant #

fn (s &AnimationNodeBlendSpace1D) to_variant() Variant

fn (AnimationNodeBlendSpace1D) from_variant #

fn (mut s AnimationNodeBlendSpace1D) from_variant(variant &Variant)

fn (AnimationNodeBlendSpace1D) add_blend_point #

fn (s &AnimationNodeBlendSpace1D) add_blend_point(node AnimationRootNode, pos f64, cfg AnimationNodeBlendSpace1D_add_blend_point_Cfg)

Adds a new point that represents a [param node] on the virtual axis at a given position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array.

fn (AnimationNodeBlendSpace1D) set_blend_point_position #

fn (s &AnimationNodeBlendSpace1D) set_blend_point_position(point i64, pos f64)

Updates the position of the point at index [param point] on the blend axis.

fn (AnimationNodeBlendSpace1D) get_blend_point_position #

fn (s &AnimationNodeBlendSpace1D) get_blend_point_position(point i64) f64

Returns the position of the point at index [param point].

fn (AnimationNodeBlendSpace1D) set_blend_point_node #

fn (s &AnimationNodeBlendSpace1D) set_blend_point_node(point i64, node AnimationRootNode)

Changes the [AnimationNode] referenced by the point at index [param point].

fn (AnimationNodeBlendSpace1D) get_blend_point_node #

fn (s &AnimationNodeBlendSpace1D) get_blend_point_node(point i64) AnimationRootNode

Returns the [AnimationNode] referenced by the point at index [param point].

fn (AnimationNodeBlendSpace1D) remove_blend_point #

fn (s &AnimationNodeBlendSpace1D) remove_blend_point(point i64)

Removes the point at index [param point] from the blend axis.

fn (AnimationNodeBlendSpace1D) get_blend_point_count #

fn (s &AnimationNodeBlendSpace1D) get_blend_point_count() i64

Returns the number of points on the blend axis.

fn (AnimationNodeBlendSpace1D) set_min_space #

fn (s &AnimationNodeBlendSpace1D) set_min_space(min_space f64)

fn (AnimationNodeBlendSpace1D) get_min_space #

fn (s &AnimationNodeBlendSpace1D) get_min_space() f64

fn (AnimationNodeBlendSpace1D) set_max_space #

fn (s &AnimationNodeBlendSpace1D) set_max_space(max_space f64)

fn (AnimationNodeBlendSpace1D) get_max_space #

fn (s &AnimationNodeBlendSpace1D) get_max_space() f64

fn (AnimationNodeBlendSpace1D) set_snap #

fn (s &AnimationNodeBlendSpace1D) set_snap(snap f64)

fn (AnimationNodeBlendSpace1D) get_snap #

fn (s &AnimationNodeBlendSpace1D) get_snap() f64

fn (AnimationNodeBlendSpace1D) set_value_label #

fn (s &AnimationNodeBlendSpace1D) set_value_label(text string)

fn (AnimationNodeBlendSpace1D) get_value_label #

fn (s &AnimationNodeBlendSpace1D) get_value_label() string

fn (AnimationNodeBlendSpace1D) set_blend_mode #

fn (s &AnimationNodeBlendSpace1D) set_blend_mode(mode AnimationNodeBlendSpace1DBlendMode)

fn (AnimationNodeBlendSpace1D) get_blend_mode #

fn (s &AnimationNodeBlendSpace1D) get_blend_mode() AnimationNodeBlendSpace1DBlendMode

fn (AnimationNodeBlendSpace1D) set_use_sync #

fn (s &AnimationNodeBlendSpace1D) set_use_sync(enable bool)

fn (AnimationNodeBlendSpace1D) is_using_sync #

fn (s &AnimationNodeBlendSpace1D) is_using_sync() bool

struct AnimationNodeBlendSpace1D_add_blend_point_Cfg #

@[params]
struct AnimationNodeBlendSpace1D_add_blend_point_Cfg {
pub:
	at_index i64 = -1
}

Optional parameters for AnimationNodeBlendSpace1D#add_blend_point

struct AnimationNodeBlendSpace2D #

struct AnimationNodeBlendSpace2D {
	AnimationRootNode
}

A set of [AnimationRootNode]s placed on 2D coordinates, crossfading between the three adjacent ones. Used by [AnimationTree].

fn (AnimationNodeBlendSpace2D) to_variant #

fn (s &AnimationNodeBlendSpace2D) to_variant() Variant

fn (AnimationNodeBlendSpace2D) from_variant #

fn (mut s AnimationNodeBlendSpace2D) from_variant(variant &Variant)

fn (AnimationNodeBlendSpace2D) add_blend_point #

fn (s &AnimationNodeBlendSpace2D) add_blend_point(node AnimationRootNode, pos Vector2, cfg AnimationNodeBlendSpace2D_add_blend_point_Cfg)

Adds a new point that represents a [param node] at the position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array.

fn (AnimationNodeBlendSpace2D) set_blend_point_position #

fn (s &AnimationNodeBlendSpace2D) set_blend_point_position(point i64, pos Vector2)

Updates the position of the point at index [param point] in the blend space.

fn (AnimationNodeBlendSpace2D) get_blend_point_position #

fn (s &AnimationNodeBlendSpace2D) get_blend_point_position(point i64) Vector2

Returns the position of the point at index [param point].

fn (AnimationNodeBlendSpace2D) set_blend_point_node #

fn (s &AnimationNodeBlendSpace2D) set_blend_point_node(point i64, node AnimationRootNode)

Changes the [AnimationNode] referenced by the point at index [param point].

fn (AnimationNodeBlendSpace2D) get_blend_point_node #

fn (s &AnimationNodeBlendSpace2D) get_blend_point_node(point i64) AnimationRootNode

Returns the [AnimationRootNode] referenced by the point at index [param point].

fn (AnimationNodeBlendSpace2D) remove_blend_point #

fn (s &AnimationNodeBlendSpace2D) remove_blend_point(point i64)

Removes the point at index [param point] from the blend space.

fn (AnimationNodeBlendSpace2D) get_blend_point_count #

fn (s &AnimationNodeBlendSpace2D) get_blend_point_count() i64

Returns the number of points in the blend space.

fn (AnimationNodeBlendSpace2D) add_triangle #

fn (s &AnimationNodeBlendSpace2D) add_triangle(x i64, y i64, z i64, cfg AnimationNodeBlendSpace2D_add_triangle_Cfg)

Creates a new triangle using three points [param x], [param y], and [param z]. Triangles can overlap. You can insert the triangle at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array.

fn (AnimationNodeBlendSpace2D) get_triangle_point #

fn (s &AnimationNodeBlendSpace2D) get_triangle_point(triangle i64, point i64) i64

Returns the position of the point at index [param point] in the triangle of index [param triangle].

fn (AnimationNodeBlendSpace2D) remove_triangle #

fn (s &AnimationNodeBlendSpace2D) remove_triangle(triangle i64)

Removes the triangle at index [param triangle] from the blend space.

fn (AnimationNodeBlendSpace2D) get_triangle_count #

fn (s &AnimationNodeBlendSpace2D) get_triangle_count() i64

Returns the number of triangles in the blend space.

fn (AnimationNodeBlendSpace2D) set_min_space #

fn (s &AnimationNodeBlendSpace2D) set_min_space(min_space Vector2)

fn (AnimationNodeBlendSpace2D) get_min_space #

fn (s &AnimationNodeBlendSpace2D) get_min_space() Vector2

fn (AnimationNodeBlendSpace2D) set_max_space #

fn (s &AnimationNodeBlendSpace2D) set_max_space(max_space Vector2)

fn (AnimationNodeBlendSpace2D) get_max_space #

fn (s &AnimationNodeBlendSpace2D) get_max_space() Vector2

fn (AnimationNodeBlendSpace2D) set_snap #

fn (s &AnimationNodeBlendSpace2D) set_snap(snap Vector2)

fn (AnimationNodeBlendSpace2D) get_snap #

fn (s &AnimationNodeBlendSpace2D) get_snap() Vector2

fn (AnimationNodeBlendSpace2D) set_x_label #

fn (s &AnimationNodeBlendSpace2D) set_x_label(text string)

fn (AnimationNodeBlendSpace2D) get_x_label #

fn (s &AnimationNodeBlendSpace2D) get_x_label() string

fn (AnimationNodeBlendSpace2D) set_y_label #

fn (s &AnimationNodeBlendSpace2D) set_y_label(text string)

fn (AnimationNodeBlendSpace2D) get_y_label #

fn (s &AnimationNodeBlendSpace2D) get_y_label() string

fn (AnimationNodeBlendSpace2D) set_auto_triangles #

fn (s &AnimationNodeBlendSpace2D) set_auto_triangles(enable bool)

fn (AnimationNodeBlendSpace2D) get_auto_triangles #

fn (s &AnimationNodeBlendSpace2D) get_auto_triangles() bool

fn (AnimationNodeBlendSpace2D) set_blend_mode #

fn (s &AnimationNodeBlendSpace2D) set_blend_mode(mode AnimationNodeBlendSpace2DBlendMode)

fn (AnimationNodeBlendSpace2D) get_blend_mode #

fn (s &AnimationNodeBlendSpace2D) get_blend_mode() AnimationNodeBlendSpace2DBlendMode

fn (AnimationNodeBlendSpace2D) set_use_sync #

fn (s &AnimationNodeBlendSpace2D) set_use_sync(enable bool)

fn (AnimationNodeBlendSpace2D) is_using_sync #

fn (s &AnimationNodeBlendSpace2D) is_using_sync() bool

struct AnimationNodeBlendSpace2D_add_blend_point_Cfg #

@[params]
struct AnimationNodeBlendSpace2D_add_blend_point_Cfg {
pub:
	at_index i64 = -1
}

Optional parameters for AnimationNodeBlendSpace2D#add_blend_point

struct AnimationNodeBlendSpace2D_add_triangle_Cfg #

@[params]
struct AnimationNodeBlendSpace2D_add_triangle_Cfg {
pub:
	at_index i64 = -1
}

Optional parameters for AnimationNodeBlendSpace2D#add_triangle

struct AnimationNodeBlendTree #

struct AnimationNodeBlendTree {
	AnimationRootNode
}

A sub-tree of many type [AnimationNode]s used for complex animations. Used by [AnimationTree].

fn (AnimationNodeBlendTree) to_variant #

fn (s &AnimationNodeBlendTree) to_variant() Variant

fn (AnimationNodeBlendTree) from_variant #

fn (mut s AnimationNodeBlendTree) from_variant(variant &Variant)

fn (AnimationNodeBlendTree) add_node #

fn (s &AnimationNodeBlendTree) add_node(name string, node AnimationNode, cfg AnimationNodeBlendTree_add_node_Cfg)

Adds an [AnimationNode] at the given [param position]. The [param name] is used to identify the created sub animation node later.

fn (AnimationNodeBlendTree) get_node #

fn (s &AnimationNodeBlendTree) get_node(name string) AnimationNode

Returns the sub animation node with the specified [param name].

fn (AnimationNodeBlendTree) remove_node #

fn (s &AnimationNodeBlendTree) remove_node(name string)

Removes a sub animation node.

fn (AnimationNodeBlendTree) rename_node #

fn (s &AnimationNodeBlendTree) rename_node(name string, new_name string)

Changes the name of a sub animation node.

fn (AnimationNodeBlendTree) has_node #

fn (s &AnimationNodeBlendTree) has_node(name string) bool

Returns true if a sub animation node with specified [param name] exists.

fn (AnimationNodeBlendTree) connect_node #

fn (s &AnimationNodeBlendTree) connect_node(input_node string, input_index i64, output_node string)

Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [param input_index].

fn (AnimationNodeBlendTree) disconnect_node #

fn (s &AnimationNodeBlendTree) disconnect_node(input_node string, input_index i64)

Disconnects the animation node connected to the specified input.

fn (AnimationNodeBlendTree) get_node_list #

fn (s &AnimationNodeBlendTree) get_node_list() Array

Returns a list containing the names of all sub animation nodes in this blend tree.

fn (AnimationNodeBlendTree) set_node_position #

fn (s &AnimationNodeBlendTree) set_node_position(name string, position Vector2)

Modifies the position of a sub animation node.

fn (AnimationNodeBlendTree) get_node_position #

fn (s &AnimationNodeBlendTree) get_node_position(name string) Vector2

Returns the position of the sub animation node with the specified [param name].

fn (AnimationNodeBlendTree) set_graph_offset #

fn (s &AnimationNodeBlendTree) set_graph_offset(offset Vector2)

fn (AnimationNodeBlendTree) get_graph_offset #

fn (s &AnimationNodeBlendTree) get_graph_offset() Vector2

struct AnimationNodeBlendTree_add_node_Cfg #

@[params]
struct AnimationNodeBlendTree_add_node_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for AnimationNodeBlendTree#add_node

struct AnimationNodeExtension #

struct AnimationNodeExtension {
	AnimationNode
}

Base class for extending [AnimationRootNode]s from GDScript, C#, or C++.

fn (AnimationNodeExtension) to_variant #

fn (s &AnimationNodeExtension) to_variant() Variant

fn (AnimationNodeExtension) from_variant #

fn (mut s AnimationNodeExtension) from_variant(variant &Variant)

fn (AnimationNodeExtension) gd_process_animation_node #

fn (s &AnimationNodeExtension) gd_process_animation_node(playback_info PackedFloat64Array, test_only bool) PackedFloat32Array

A version of the [method AnimationNode._process] method that is meant to be overridden by custom nodes. It returns a [PackedFloat32Array] with the processed animation data. The [PackedFloat64Array] parameter contains the playback information, containing the following values encoded as floating point numbers (in order): playback time and delta, start and end times, whether a seek was requested (encoded as a float greater than 0), whether the seek request was externally requested (encoded as a float greater than 0), the current [enum Animation.LoopedFlag] (encoded as a float), and the current blend weight. The function must return a [PackedFloat32Array] of the node's time info, containing the following values (in order): animation length, time position, delta, [enum Animation.LoopMode] (encoded as a float), whether the animation is about to end (encoded as a float greater than 0) and whether the animation is infinite (encoded as a float greater than 0). All values must be included in the returned array.

struct AnimationNodeOneShot #

struct AnimationNodeOneShot {
	AnimationNodeSync
}

Plays an animation once in an [AnimationNodeBlendTree].

fn (AnimationNodeOneShot) to_variant #

fn (s &AnimationNodeOneShot) to_variant() Variant

fn (AnimationNodeOneShot) from_variant #

fn (mut s AnimationNodeOneShot) from_variant(variant &Variant)

fn (AnimationNodeOneShot) set_fadein_time #

fn (s &AnimationNodeOneShot) set_fadein_time(time f64)

fn (AnimationNodeOneShot) get_fadein_time #

fn (s &AnimationNodeOneShot) get_fadein_time() f64

fn (AnimationNodeOneShot) set_fadein_curve #

fn (s &AnimationNodeOneShot) set_fadein_curve(curve Curve)

fn (AnimationNodeOneShot) get_fadein_curve #

fn (s &AnimationNodeOneShot) get_fadein_curve() Curve

fn (AnimationNodeOneShot) set_fadeout_time #

fn (s &AnimationNodeOneShot) set_fadeout_time(time f64)

fn (AnimationNodeOneShot) get_fadeout_time #

fn (s &AnimationNodeOneShot) get_fadeout_time() f64

fn (AnimationNodeOneShot) set_fadeout_curve #

fn (s &AnimationNodeOneShot) set_fadeout_curve(curve Curve)

fn (AnimationNodeOneShot) get_fadeout_curve #

fn (s &AnimationNodeOneShot) get_fadeout_curve() Curve

fn (AnimationNodeOneShot) set_break_loop_at_end #

fn (s &AnimationNodeOneShot) set_break_loop_at_end(enable bool)

fn (AnimationNodeOneShot) is_loop_broken_at_end #

fn (s &AnimationNodeOneShot) is_loop_broken_at_end() bool

fn (AnimationNodeOneShot) set_autorestart #

fn (s &AnimationNodeOneShot) set_autorestart(active bool)

fn (AnimationNodeOneShot) has_autorestart #

fn (s &AnimationNodeOneShot) has_autorestart() bool

fn (AnimationNodeOneShot) set_autorestart_delay #

fn (s &AnimationNodeOneShot) set_autorestart_delay(time f64)

fn (AnimationNodeOneShot) get_autorestart_delay #

fn (s &AnimationNodeOneShot) get_autorestart_delay() f64

fn (AnimationNodeOneShot) set_autorestart_random_delay #

fn (s &AnimationNodeOneShot) set_autorestart_random_delay(time f64)

fn (AnimationNodeOneShot) get_autorestart_random_delay #

fn (s &AnimationNodeOneShot) get_autorestart_random_delay() f64

fn (AnimationNodeOneShot) set_mix_mode #

fn (s &AnimationNodeOneShot) set_mix_mode(mode AnimationNodeOneShotMixMode)

fn (AnimationNodeOneShot) get_mix_mode #

fn (s &AnimationNodeOneShot) get_mix_mode() AnimationNodeOneShotMixMode

struct AnimationNodeOutput #

struct AnimationNodeOutput {
	AnimationNode
}

The animation output node of an [AnimationNodeBlendTree].

fn (AnimationNodeOutput) to_variant #

fn (s &AnimationNodeOutput) to_variant() Variant

fn (AnimationNodeOutput) from_variant #

fn (mut s AnimationNodeOutput) from_variant(variant &Variant)

struct AnimationNodeStateMachine #

struct AnimationNodeStateMachine {
	AnimationRootNode
}

A state machine with multiple [AnimationRootNode]s, used by [AnimationTree].

fn (AnimationNodeStateMachine) to_variant #

fn (s &AnimationNodeStateMachine) to_variant() Variant

fn (AnimationNodeStateMachine) from_variant #

fn (mut s AnimationNodeStateMachine) from_variant(variant &Variant)

fn (AnimationNodeStateMachine) add_node #

fn (s &AnimationNodeStateMachine) add_node(name string, node AnimationNode, cfg AnimationNodeStateMachine_add_node_Cfg)

Adds a new animation node to the graph. The [param position] is used for display in the editor.

fn (AnimationNodeStateMachine) replace_node #

fn (s &AnimationNodeStateMachine) replace_node(name string, node AnimationNode)

Replaces the given animation node with a new animation node.

fn (AnimationNodeStateMachine) get_node #

fn (s &AnimationNodeStateMachine) get_node(name string) AnimationNode

Returns the animation node with the given name.

fn (AnimationNodeStateMachine) remove_node #

fn (s &AnimationNodeStateMachine) remove_node(name string)

Deletes the given animation node from the graph.

fn (AnimationNodeStateMachine) rename_node #

fn (s &AnimationNodeStateMachine) rename_node(name string, new_name string)

Renames the given animation node.

fn (AnimationNodeStateMachine) has_node #

fn (s &AnimationNodeStateMachine) has_node(name string) bool

Returns true if the graph contains the given animation node.

fn (AnimationNodeStateMachine) get_node_name #

fn (s &AnimationNodeStateMachine) get_node_name(node AnimationNode) string

Returns the given animation node's name.

fn (AnimationNodeStateMachine) get_node_list #

fn (s &AnimationNodeStateMachine) get_node_list() Array

Returns a list containing the names of all animation nodes in this state machine.

fn (AnimationNodeStateMachine) set_node_position #

fn (s &AnimationNodeStateMachine) set_node_position(name string, position Vector2)

Sets the animation node's coordinates. Used for display in the editor.

fn (AnimationNodeStateMachine) get_node_position #

fn (s &AnimationNodeStateMachine) get_node_position(name string) Vector2

Returns the given animation node's coordinates. Used for display in the editor.

fn (AnimationNodeStateMachine) has_transition #

fn (s &AnimationNodeStateMachine) has_transition(from string, to string) bool

Returns true if there is a transition between the given animation nodes.

fn (AnimationNodeStateMachine) add_transition #

fn (s &AnimationNodeStateMachine) add_transition(from string, to string, transition AnimationNodeStateMachineTransition)

Adds a transition between the given animation nodes.

fn (AnimationNodeStateMachine) get_transition #

fn (s &AnimationNodeStateMachine) get_transition(idx i64) AnimationNodeStateMachineTransition

Returns the given transition.

fn (AnimationNodeStateMachine) get_transition_from #

fn (s &AnimationNodeStateMachine) get_transition_from(idx i64) string

Returns the given transition's start node.

fn (AnimationNodeStateMachine) get_transition_to #

fn (s &AnimationNodeStateMachine) get_transition_to(idx i64) string

Returns the given transition's end node.

fn (AnimationNodeStateMachine) get_transition_count #

fn (s &AnimationNodeStateMachine) get_transition_count() i64

Returns the number of connections in the graph.

fn (AnimationNodeStateMachine) remove_transition_by_index #

fn (s &AnimationNodeStateMachine) remove_transition_by_index(idx i64)

Deletes the given transition by index.

fn (AnimationNodeStateMachine) remove_transition #

fn (s &AnimationNodeStateMachine) remove_transition(from string, to string)

Deletes the transition between the two specified animation nodes.

fn (AnimationNodeStateMachine) set_graph_offset #

fn (s &AnimationNodeStateMachine) set_graph_offset(offset Vector2)

Sets the draw offset of the graph. Used for display in the editor.

fn (AnimationNodeStateMachine) get_graph_offset #

fn (s &AnimationNodeStateMachine) get_graph_offset() Vector2

Returns the draw offset of the graph. Used for display in the editor.

fn (AnimationNodeStateMachine) set_state_machine_type #

fn (s &AnimationNodeStateMachine) set_state_machine_type(state_machine_type AnimationNodeStateMachineStateMachineType)

fn (AnimationNodeStateMachine) get_state_machine_type #

fn (s &AnimationNodeStateMachine) get_state_machine_type() AnimationNodeStateMachineStateMachineType

fn (AnimationNodeStateMachine) set_allow_transition_to_self #

fn (s &AnimationNodeStateMachine) set_allow_transition_to_self(enable bool)

fn (AnimationNodeStateMachine) is_allow_transition_to_self #

fn (s &AnimationNodeStateMachine) is_allow_transition_to_self() bool

fn (AnimationNodeStateMachine) set_reset_ends #

fn (s &AnimationNodeStateMachine) set_reset_ends(enable bool)

fn (AnimationNodeStateMachine) are_ends_reset #

fn (s &AnimationNodeStateMachine) are_ends_reset() bool

struct AnimationNodeStateMachinePlayback #

struct AnimationNodeStateMachinePlayback {
	Resource
}

Provides playback control for an [AnimationNodeStateMachine].

fn (AnimationNodeStateMachinePlayback) to_variant #

fn (s &AnimationNodeStateMachinePlayback) to_variant() Variant

fn (AnimationNodeStateMachinePlayback) from_variant #

fn (mut s AnimationNodeStateMachinePlayback) from_variant(variant &Variant)

fn (AnimationNodeStateMachinePlayback) travel #

fn (s &AnimationNodeStateMachinePlayback) travel(to_node string, cfg AnimationNodeStateMachinePlayback_travel_Cfg)

Transitions from the current state to another one, following the shortest path. If the path does not connect from the current state, the animation will play after the state teleports. If [param reset_on_teleport] is true, the animation is played from the beginning when the travel cause a teleportation.

fn (AnimationNodeStateMachinePlayback) start #

fn (s &AnimationNodeStateMachinePlayback) start(node string, cfg AnimationNodeStateMachinePlayback_start_Cfg)

Starts playing the given animation. If [param reset] is true, the animation is played from the beginning.

fn (AnimationNodeStateMachinePlayback) next #

fn (s &AnimationNodeStateMachinePlayback) next()

If there is a next path by travel or auto advance, immediately transitions from the current state to the next state.

fn (AnimationNodeStateMachinePlayback) stop #

fn (s &AnimationNodeStateMachinePlayback) stop()

Stops the currently playing animation.

fn (AnimationNodeStateMachinePlayback) is_playing #

fn (s &AnimationNodeStateMachinePlayback) is_playing() bool

Returns true if an animation is playing.

fn (AnimationNodeStateMachinePlayback) get_current_node #

fn (s &AnimationNodeStateMachinePlayback) get_current_node() string

Returns the currently playing animation state. [b]Note:[/b] When using a cross-fade, the current state changes to the next state immediately after the cross-fade begins.

fn (AnimationNodeStateMachinePlayback) get_current_play_position #

fn (s &AnimationNodeStateMachinePlayback) get_current_play_position() f64

Returns the playback position within the current animation state.

fn (AnimationNodeStateMachinePlayback) get_current_length #

fn (s &AnimationNodeStateMachinePlayback) get_current_length() f64

Returns the current state length. [b]Note:[/b] It is possible that any [AnimationRootNode] can be nodes as well as animations. This means that there can be multiple animations within a single state. Which animation length has priority depends on the nodes connected inside it. Also, if a transition does not reset, the remaining length at that point will be returned.

fn (AnimationNodeStateMachinePlayback) get_fading_from_node #

fn (s &AnimationNodeStateMachinePlayback) get_fading_from_node() string

Returns the starting state of currently fading animation.

fn (AnimationNodeStateMachinePlayback) get_travel_path #

fn (s &AnimationNodeStateMachinePlayback) get_travel_path() Array

Returns the current travel path as computed internally by the A* algorithm.

struct AnimationNodeStateMachinePlayback_start_Cfg #

@[params]
struct AnimationNodeStateMachinePlayback_start_Cfg {
pub:
	reset bool
}

Optional parameters for AnimationNodeStateMachinePlayback#start

struct AnimationNodeStateMachinePlayback_travel_Cfg #

@[params]
struct AnimationNodeStateMachinePlayback_travel_Cfg {
pub:
	reset_on_teleport bool
}

Optional parameters for AnimationNodeStateMachinePlayback#travel

struct AnimationNodeStateMachineTransition #

struct AnimationNodeStateMachineTransition {
	Resource
}

A transition within an [AnimationNodeStateMachine] connecting two [AnimationRootNode]s.

fn (AnimationNodeStateMachineTransition) to_variant #

fn (s &AnimationNodeStateMachineTransition) to_variant() Variant

fn (AnimationNodeStateMachineTransition) from_variant #

fn (mut s AnimationNodeStateMachineTransition) from_variant(variant &Variant)

fn (AnimationNodeStateMachineTransition) set_switch_mode #

fn (s &AnimationNodeStateMachineTransition) set_switch_mode(mode AnimationNodeStateMachineTransitionSwitchMode)

fn (AnimationNodeStateMachineTransition) get_switch_mode #

fn (s &AnimationNodeStateMachineTransition) get_switch_mode() AnimationNodeStateMachineTransitionSwitchMode

fn (AnimationNodeStateMachineTransition) set_advance_mode #

fn (s &AnimationNodeStateMachineTransition) set_advance_mode(mode AnimationNodeStateMachineTransitionAdvanceMode)

fn (AnimationNodeStateMachineTransition) get_advance_mode #

fn (s &AnimationNodeStateMachineTransition) get_advance_mode() AnimationNodeStateMachineTransitionAdvanceMode

fn (AnimationNodeStateMachineTransition) set_advance_condition #

fn (s &AnimationNodeStateMachineTransition) set_advance_condition(name string)

fn (AnimationNodeStateMachineTransition) get_advance_condition #

fn (s &AnimationNodeStateMachineTransition) get_advance_condition() string

fn (AnimationNodeStateMachineTransition) set_xfade_time #

fn (s &AnimationNodeStateMachineTransition) set_xfade_time(secs f64)

fn (AnimationNodeStateMachineTransition) get_xfade_time #

fn (s &AnimationNodeStateMachineTransition) get_xfade_time() f64

fn (AnimationNodeStateMachineTransition) set_xfade_curve #

fn (s &AnimationNodeStateMachineTransition) set_xfade_curve(curve Curve)

fn (AnimationNodeStateMachineTransition) get_xfade_curve #

fn (s &AnimationNodeStateMachineTransition) get_xfade_curve() Curve

fn (AnimationNodeStateMachineTransition) set_break_loop_at_end #

fn (s &AnimationNodeStateMachineTransition) set_break_loop_at_end(enable bool)

fn (AnimationNodeStateMachineTransition) is_loop_broken_at_end #

fn (s &AnimationNodeStateMachineTransition) is_loop_broken_at_end() bool

fn (AnimationNodeStateMachineTransition) set_reset #

fn (s &AnimationNodeStateMachineTransition) set_reset(reset bool)

fn (AnimationNodeStateMachineTransition) is_reset #

fn (s &AnimationNodeStateMachineTransition) is_reset() bool

fn (AnimationNodeStateMachineTransition) set_priority #

fn (s &AnimationNodeStateMachineTransition) set_priority(priority i64)

fn (AnimationNodeStateMachineTransition) get_priority #

fn (s &AnimationNodeStateMachineTransition) get_priority() i64

fn (AnimationNodeStateMachineTransition) set_advance_expression #

fn (s &AnimationNodeStateMachineTransition) set_advance_expression(text string)

fn (AnimationNodeStateMachineTransition) get_advance_expression #

fn (s &AnimationNodeStateMachineTransition) get_advance_expression() string

struct AnimationNodeStateMachine_add_node_Cfg #

@[params]
struct AnimationNodeStateMachine_add_node_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for AnimationNodeStateMachine#add_node

struct AnimationNodeSub2 #

struct AnimationNodeSub2 {
	AnimationNodeSync
}

Blends two animations subtractively inside of an [AnimationNodeBlendTree].

fn (AnimationNodeSub2) to_variant #

fn (s &AnimationNodeSub2) to_variant() Variant

fn (AnimationNodeSub2) from_variant #

fn (mut s AnimationNodeSub2) from_variant(variant &Variant)

struct AnimationNodeSync #

struct AnimationNodeSync {
	AnimationNode
}

Base class for [AnimationNode]s with multiple input ports that must be synchronized.

fn (AnimationNodeSync) to_variant #

fn (s &AnimationNodeSync) to_variant() Variant

fn (AnimationNodeSync) from_variant #

fn (mut s AnimationNodeSync) from_variant(variant &Variant)

fn (AnimationNodeSync) set_use_sync #

fn (s &AnimationNodeSync) set_use_sync(enable bool)

fn (AnimationNodeSync) is_using_sync #

fn (s &AnimationNodeSync) is_using_sync() bool

struct AnimationNodeTimeScale #

struct AnimationNodeTimeScale {
	AnimationNode
}

A time-scaling animation node used in [AnimationTree].

fn (AnimationNodeTimeScale) to_variant #

fn (s &AnimationNodeTimeScale) to_variant() Variant

fn (AnimationNodeTimeScale) from_variant #

fn (mut s AnimationNodeTimeScale) from_variant(variant &Variant)

struct AnimationNodeTimeSeek #

struct AnimationNodeTimeSeek {
	AnimationNode
}

A time-seeking animation node used in [AnimationTree].

fn (AnimationNodeTimeSeek) to_variant #

fn (s &AnimationNodeTimeSeek) to_variant() Variant

fn (AnimationNodeTimeSeek) from_variant #

fn (mut s AnimationNodeTimeSeek) from_variant(variant &Variant)

fn (AnimationNodeTimeSeek) set_explicit_elapse #

fn (s &AnimationNodeTimeSeek) set_explicit_elapse(enable bool)

fn (AnimationNodeTimeSeek) is_explicit_elapse #

fn (s &AnimationNodeTimeSeek) is_explicit_elapse() bool

struct AnimationNodeTransition #

struct AnimationNodeTransition {
	AnimationNodeSync
}

A transition within an [AnimationTree] connecting two [AnimationNode]s.

fn (AnimationNodeTransition) to_variant #

fn (s &AnimationNodeTransition) to_variant() Variant

fn (AnimationNodeTransition) from_variant #

fn (mut s AnimationNodeTransition) from_variant(variant &Variant)

fn (AnimationNodeTransition) set_input_count #

fn (s &AnimationNodeTransition) set_input_count(input_count i64)

fn (AnimationNodeTransition) set_input_as_auto_advance #

fn (s &AnimationNodeTransition) set_input_as_auto_advance(input i64, enable bool)

Enables or disables auto-advance for the given [param input] index. If enabled, state changes to the next input after playing the animation once. If enabled for the last input state, it loops to the first.

fn (AnimationNodeTransition) is_input_set_as_auto_advance #

fn (s &AnimationNodeTransition) is_input_set_as_auto_advance(input i64) bool

Returns true if auto-advance is enabled for the given [param input] index.

fn (AnimationNodeTransition) set_input_break_loop_at_end #

fn (s &AnimationNodeTransition) set_input_break_loop_at_end(input i64, enable bool)

If true, breaks the loop at the end of the loop cycle for transition, even if the animation is looping.

fn (AnimationNodeTransition) is_input_loop_broken_at_end #

fn (s &AnimationNodeTransition) is_input_loop_broken_at_end(input i64) bool

Returns whether the animation breaks the loop at the end of the loop cycle for transition.

fn (AnimationNodeTransition) set_input_reset #

fn (s &AnimationNodeTransition) set_input_reset(input i64, enable bool)

If true, the destination animation is restarted when the animation transitions.

fn (AnimationNodeTransition) is_input_reset #

fn (s &AnimationNodeTransition) is_input_reset(input i64) bool

Returns whether the animation restarts when the animation transitions from the other animation.

fn (AnimationNodeTransition) set_xfade_time #

fn (s &AnimationNodeTransition) set_xfade_time(time f64)

fn (AnimationNodeTransition) get_xfade_time #

fn (s &AnimationNodeTransition) get_xfade_time() f64

fn (AnimationNodeTransition) set_xfade_curve #

fn (s &AnimationNodeTransition) set_xfade_curve(curve Curve)

fn (AnimationNodeTransition) get_xfade_curve #

fn (s &AnimationNodeTransition) get_xfade_curve() Curve

fn (AnimationNodeTransition) set_allow_transition_to_self #

fn (s &AnimationNodeTransition) set_allow_transition_to_self(enable bool)

fn (AnimationNodeTransition) is_allow_transition_to_self #

fn (s &AnimationNodeTransition) is_allow_transition_to_self() bool

struct AnimationNode_blend_animation_Cfg #

@[params]
struct AnimationNode_blend_animation_Cfg {
pub:
	looped_flag AnimationLoopedFlag = unsafe { AnimationLoopedFlag(0) }
}

Optional parameters for AnimationNode#blend_animation

struct AnimationNode_blend_input_Cfg #

@[params]
struct AnimationNode_blend_input_Cfg {
pub:
	filter    AnimationNodeFilterAction = unsafe { AnimationNodeFilterAction(0) }
	sync      bool
	test_only bool
}

Optional parameters for AnimationNode#blend_input

struct AnimationNode_blend_node_Cfg #

@[params]
struct AnimationNode_blend_node_Cfg {
pub:
	filter    AnimationNodeFilterAction = unsafe { AnimationNodeFilterAction(0) }
	sync      bool
	test_only bool
}

Optional parameters for AnimationNode#blend_node

struct AnimationPlayer #

struct AnimationPlayer {
	AnimationMixer
}

A node used for animation playback.

fn (AnimationPlayer) to_variant #

fn (s &AnimationPlayer) to_variant() Variant

fn (AnimationPlayer) from_variant #

fn (mut s AnimationPlayer) from_variant(variant &Variant)

fn (AnimationPlayer) animation_set_next #

fn (s &AnimationPlayer) animation_set_next(animation_from string, animation_to string)

Triggers the [param animation_to] animation when the [param animation_from] animation completes.

fn (AnimationPlayer) animation_get_next #

fn (s &AnimationPlayer) animation_get_next(animation_from string) string

Returns the key of the animation which is queued to play after the [param animation_from] animation.

fn (AnimationPlayer) set_blend_time #

fn (s &AnimationPlayer) set_blend_time(animation_from string, animation_to string, sec f64)

Specifies a blend time (in seconds) between two animations, referenced by their keys.

fn (AnimationPlayer) get_blend_time #

fn (s &AnimationPlayer) get_blend_time(animation_from string, animation_to string) f64

Returns the blend time (in seconds) between two animations, referenced by their keys.

fn (AnimationPlayer) set_default_blend_time #

fn (s &AnimationPlayer) set_default_blend_time(sec f64)

fn (AnimationPlayer) get_default_blend_time #

fn (s &AnimationPlayer) get_default_blend_time() f64

fn (AnimationPlayer) set_auto_capture #

fn (s &AnimationPlayer) set_auto_capture(auto_capture bool)

fn (AnimationPlayer) is_auto_capture #

fn (s &AnimationPlayer) is_auto_capture() bool

fn (AnimationPlayer) set_auto_capture_duration #

fn (s &AnimationPlayer) set_auto_capture_duration(auto_capture_duration f64)

fn (AnimationPlayer) get_auto_capture_duration #

fn (s &AnimationPlayer) get_auto_capture_duration() f64

fn (AnimationPlayer) set_auto_capture_transition_type #

fn (s &AnimationPlayer) set_auto_capture_transition_type(auto_capture_transition_type TweenTransitionType)

fn (AnimationPlayer) get_auto_capture_transition_type #

fn (s &AnimationPlayer) get_auto_capture_transition_type() TweenTransitionType

fn (AnimationPlayer) set_auto_capture_ease_type #

fn (s &AnimationPlayer) set_auto_capture_ease_type(auto_capture_ease_type TweenEaseType)

fn (AnimationPlayer) get_auto_capture_ease_type #

fn (s &AnimationPlayer) get_auto_capture_ease_type() TweenEaseType

fn (AnimationPlayer) play #

fn (s &AnimationPlayer) play(cfg AnimationPlayer_play_Cfg)

Plays the animation with key [param name]. Custom blend times and speed can be set. The [param from_end] option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If [param custom_speed] is negative and [param from_end] is true, the animation will play backwards (which is equivalent to calling [method play_backwards]). The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [param name], or with no [param name] parameter, the assigned animation will resume playing if it was paused. [b]Note:[/b] The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call advance(0).

fn (AnimationPlayer) play_section_with_markers #

fn (s &AnimationPlayer) play_section_with_markers(cfg AnimationPlayer_play_section_with_markers_Cfg)

Plays the animation with key [param name] and the section starting from [param start_marker] and ending on [param end_marker]. If the start marker is empty, the section starts from the beginning of the animation. If the end marker is empty, the section ends on the end of the animation. See also [method play].

fn (AnimationPlayer) play_section #

fn (s &AnimationPlayer) play_section(cfg AnimationPlayer_play_section_Cfg)

Plays the animation with key [param name] and the section starting from [param start_time] and ending on [param end_time]. See also [method play]. Setting [param start_time] to a value outside the range of the animation means the start of the animation will be used instead, and setting [param end_time] to a value outside the range of the animation means the end of the animation will be used instead. [param start_time] cannot be equal to [param end_time].

fn (AnimationPlayer) play_backwards #

fn (s &AnimationPlayer) play_backwards(cfg AnimationPlayer_play_backwards_Cfg)

Plays the animation with key [param name] in reverse. This method is a shorthand for [method play] with custom_speed = -1.0 and from_end = true, so see its description for more information.

fn (AnimationPlayer) play_section_with_markers_backwards #

fn (s &AnimationPlayer) play_section_with_markers_backwards(cfg AnimationPlayer_play_section_with_markers_backwards_Cfg)

Plays the animation with key [param name] and the section starting from [param start_marker] and ending on [param end_marker] in reverse. This method is a shorthand for [method play_section_with_markers] with custom_speed = -1.0 and from_end = true, see its description for more information.

fn (AnimationPlayer) play_section_backwards #

fn (s &AnimationPlayer) play_section_backwards(cfg AnimationPlayer_play_section_backwards_Cfg)

Plays the animation with key [param name] and the section starting from [param start_time] and ending on [param end_time] in reverse. This method is a shorthand for [method play_section] with custom_speed = -1.0 and from_end = true, see its description for more information.

fn (AnimationPlayer) play_with_capture #

fn (s &AnimationPlayer) play_with_capture(cfg AnimationPlayer_play_with_capture_Cfg)

See also [method AnimationMixer.capture]. You can use this method to use more detailed options for capture than those performed by [member playback_auto_capture]. When [member playback_auto_capture] is false, this method is almost the same as the following:

capture(name, duration, trans_type, ease_type)
play(name, custom_blend, custom_speed, from_end)

If [param name] is blank, it specifies [member assigned_animation]. If [param duration] is a negative value, the duration is set to the interval between the current position and the first key, when [param from_end] is true, uses the interval between the current position and the last key instead. [b]Note:[/b] The [param duration] takes [member speed_scale] into account, but [param custom_speed] does not, because the capture cache is interpolated with the blend result and the result may contain multiple animations.

fn (AnimationPlayer) pause #

fn (s &AnimationPlayer) pause()

Pauses the currently playing animation. The [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation. See also [method stop].

fn (AnimationPlayer) stop #

fn (s &AnimationPlayer) stop(cfg AnimationPlayer_stop_Cfg)

Stops the currently playing animation. The animation position is reset to 0 and the custom_speed is reset to 1.0. See also [method pause]. If [param keep_state] is true, the animation state is not updated visually. [b]Note:[/b] The method / audio / animation playback tracks will not be processed by this method.

fn (AnimationPlayer) is_playing #

fn (s &AnimationPlayer) is_playing() bool

Returns true if an animation is currently playing (even if [member speed_scale] and/or custom_speed are 0).

fn (AnimationPlayer) set_current_animation #

fn (s &AnimationPlayer) set_current_animation(animation string)

fn (AnimationPlayer) get_current_animation #

fn (s &AnimationPlayer) get_current_animation() string

fn (AnimationPlayer) set_assigned_animation #

fn (s &AnimationPlayer) set_assigned_animation(animation string)

fn (AnimationPlayer) get_assigned_animation #

fn (s &AnimationPlayer) get_assigned_animation() string

fn (AnimationPlayer) queue #

fn (s &AnimationPlayer) queue(name string)

Queues an animation for playback once the current animation and all previously queued animations are done. [b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow.

fn (AnimationPlayer) get_queue #

fn (s &AnimationPlayer) get_queue() PackedStringArray

Returns a list of the animation keys that are currently queued to play.

fn (AnimationPlayer) clear_queue #

fn (s &AnimationPlayer) clear_queue()

Clears all queued, unplayed animations.

fn (AnimationPlayer) set_speed_scale #

fn (s &AnimationPlayer) set_speed_scale(speed f64)

fn (AnimationPlayer) get_speed_scale #

fn (s &AnimationPlayer) get_speed_scale() f64

fn (AnimationPlayer) get_playing_speed #

fn (s &AnimationPlayer) get_playing_speed() f64

Returns the actual playing speed of current animation or 0 if not playing. This speed is the [member speed_scale] property multiplied by custom_speed argument specified when calling the [method play] method. Returns a negative value if the current animation is playing backwards.

fn (AnimationPlayer) set_autoplay #

fn (s &AnimationPlayer) set_autoplay(name string)

fn (AnimationPlayer) get_autoplay #

fn (s &AnimationPlayer) get_autoplay() string

fn (AnimationPlayer) set_movie_quit_on_finish_enabled #

fn (s &AnimationPlayer) set_movie_quit_on_finish_enabled(enabled bool)

fn (AnimationPlayer) is_movie_quit_on_finish_enabled #

fn (s &AnimationPlayer) is_movie_quit_on_finish_enabled() bool

fn (AnimationPlayer) get_current_animation_position #

fn (s &AnimationPlayer) get_current_animation_position() f64

fn (AnimationPlayer) get_current_animation_length #

fn (s &AnimationPlayer) get_current_animation_length() f64

fn (AnimationPlayer) set_section_with_markers #

fn (s &AnimationPlayer) set_section_with_markers(cfg AnimationPlayer_set_section_with_markers_Cfg)

Changes the start and end markers of the section being played. The current playback position will be clamped within the new section. See also [method play_section_with_markers]. If the argument is empty, the section uses the beginning or end of the animation. If both are empty, it means that the section is not set.

fn (AnimationPlayer) set_section #

fn (s &AnimationPlayer) set_section(cfg AnimationPlayer_set_section_Cfg)

Changes the start and end times of the section being played. The current playback position will be clamped within the new section. See also [method play_section].

fn (AnimationPlayer) reset_section #

fn (s &AnimationPlayer) reset_section()

Resets the current section. Does nothing if a section has not been set.

fn (AnimationPlayer) get_section_start_time #

fn (s &AnimationPlayer) get_section_start_time() f64

Returns the start time of the section currently being played.

fn (AnimationPlayer) get_section_end_time #

fn (s &AnimationPlayer) get_section_end_time() f64

Returns the end time of the section currently being played.

fn (AnimationPlayer) has_section #

fn (s &AnimationPlayer) has_section() bool

Returns true if an animation is currently playing with a section.

fn (AnimationPlayer) seek #

fn (s &AnimationPlayer) seek(seconds f64, cfg AnimationPlayer_seek_Cfg)

Seeks the animation to the [param seconds] point in time (in seconds). If [param update] is true, the animation updates too, otherwise it updates at process time. Events between the current frame and [param seconds] are skipped. If [param update_only] is true, the method / audio / animation playback tracks will not be processed. [b]Note:[/b] Seeking to the end of the animation doesn't emit [signal AnimationMixer.animation_finished]. If you want to skip animation and emit the signal, use [method AnimationMixer.advance].

fn (AnimationPlayer) set_process_callback #

fn (s &AnimationPlayer) set_process_callback(mode AnimationPlayerAnimationProcessCallback)

Sets the process notification in which to update animations.

fn (AnimationPlayer) get_process_callback #

fn (s &AnimationPlayer) get_process_callback() AnimationPlayerAnimationProcessCallback

Returns the process notification in which to update animations.

fn (AnimationPlayer) set_method_call_mode #

fn (s &AnimationPlayer) set_method_call_mode(mode AnimationPlayerAnimationMethodCallMode)

Sets the call mode used for "Call Method" tracks.

fn (AnimationPlayer) get_method_call_mode #

fn (s &AnimationPlayer) get_method_call_mode() AnimationPlayerAnimationMethodCallMode

Returns the call mode used for "Call Method" tracks.

fn (AnimationPlayer) set_root #

fn (s &AnimationPlayer) set_root(path NodePath)

Sets the node which node path references will travel from.

fn (AnimationPlayer) get_root #

fn (s &AnimationPlayer) get_root() NodePath

Returns the node which node path references will travel from.

struct AnimationPlayer_play_Cfg #

@[params]
struct AnimationPlayer_play_Cfg {
pub:
	name         string
	custom_blend f64 = -1
	custom_speed f64 = 1.0
	from_end     bool
}

Optional parameters for AnimationPlayer#play

struct AnimationPlayer_play_backwards_Cfg #

@[params]
struct AnimationPlayer_play_backwards_Cfg {
pub:
	name         string
	custom_blend f64 = -1
}

Optional parameters for AnimationPlayer#play_backwards

struct AnimationPlayer_play_section_Cfg #

@[params]
struct AnimationPlayer_play_section_Cfg {
pub:
	name         string
	start_time   f64 = -1
	end_time     f64 = -1
	custom_blend f64 = -1
	custom_speed f64 = 1.0
	from_end     bool
}

Optional parameters for AnimationPlayer#play_section

struct AnimationPlayer_play_section_backwards_Cfg #

@[params]
struct AnimationPlayer_play_section_backwards_Cfg {
pub:
	name         string
	start_time   f64 = -1
	end_time     f64 = -1
	custom_blend f64 = -1
}

Optional parameters for AnimationPlayer#play_section_backwards

struct AnimationPlayer_play_section_with_markers_Cfg #

@[params]
struct AnimationPlayer_play_section_with_markers_Cfg {
pub:
	name         string
	start_marker string
	end_marker   string
	custom_blend f64 = -1
	custom_speed f64 = 1.0
	from_end     bool
}

Optional parameters for AnimationPlayer#play_section_with_markers

struct AnimationPlayer_play_section_with_markers_backwards_Cfg #

@[params]
struct AnimationPlayer_play_section_with_markers_backwards_Cfg {
pub:
	name         string
	start_marker string
	end_marker   string
	custom_blend f64 = -1
}

Optional parameters for AnimationPlayer#play_section_with_markers_backwards

struct AnimationPlayer_play_with_capture_Cfg #

@[params]
struct AnimationPlayer_play_with_capture_Cfg {
pub:
	name         string
	duration     f64 = -1.0
	custom_blend f64 = -1
	custom_speed f64 = 1.0
	from_end     bool
	trans_type   TweenTransitionType = unsafe { TweenTransitionType(0) }
	ease_type    TweenEaseType       = unsafe { TweenEaseType(0) }
}

Optional parameters for AnimationPlayer#play_with_capture

struct AnimationPlayer_seek_Cfg #

@[params]
struct AnimationPlayer_seek_Cfg {
pub:
	update      bool
	update_only bool
}

Optional parameters for AnimationPlayer#seek

struct AnimationPlayer_set_section_Cfg #

@[params]
struct AnimationPlayer_set_section_Cfg {
pub:
	start_time f64 = -1
	end_time   f64 = -1
}

Optional parameters for AnimationPlayer#set_section

struct AnimationPlayer_set_section_with_markers_Cfg #

@[params]
struct AnimationPlayer_set_section_with_markers_Cfg {
pub:
	start_marker string
	end_marker   string
}

Optional parameters for AnimationPlayer#set_section_with_markers

struct AnimationPlayer_stop_Cfg #

@[params]
struct AnimationPlayer_stop_Cfg {
pub:
	keep_state bool
}

Optional parameters for AnimationPlayer#stop

struct AnimationRootNode #

struct AnimationRootNode {
	AnimationNode
}

Base class for [AnimationNode]s that hold one or multiple composite animations. Usually used for [member AnimationTree.tree_root].

fn (AnimationRootNode) to_variant #

fn (s &AnimationRootNode) to_variant() Variant

fn (AnimationRootNode) from_variant #

fn (mut s AnimationRootNode) from_variant(variant &Variant)

struct AnimationTree #

struct AnimationTree {
	AnimationMixer
}

A node used for advanced animation transitions in an [AnimationPlayer].

fn (AnimationTree) to_variant #

fn (s &AnimationTree) to_variant() Variant

fn (AnimationTree) from_variant #

fn (mut s AnimationTree) from_variant(variant &Variant)

fn (AnimationTree) set_tree_root #

fn (s &AnimationTree) set_tree_root(animation_node AnimationRootNode)

fn (AnimationTree) get_tree_root #

fn (s &AnimationTree) get_tree_root() AnimationRootNode

fn (AnimationTree) set_advance_expression_base_node #

fn (s &AnimationTree) set_advance_expression_base_node(path NodePath)

fn (AnimationTree) get_advance_expression_base_node #

fn (s &AnimationTree) get_advance_expression_base_node() NodePath

fn (AnimationTree) set_animation_player #

fn (s &AnimationTree) set_animation_player(path NodePath)

fn (AnimationTree) get_animation_player #

fn (s &AnimationTree) get_animation_player() NodePath

fn (AnimationTree) set_process_callback #

fn (s &AnimationTree) set_process_callback(mode AnimationTreeAnimationProcessCallback)

Sets the process notification in which to update animations.

fn (AnimationTree) get_process_callback #

fn (s &AnimationTree) get_process_callback() AnimationTreeAnimationProcessCallback

Returns the process notification in which to update animations.

struct Animation_add_track_Cfg #

@[params]
struct Animation_add_track_Cfg {
pub:
	at_position i64 = -1
}

Optional parameters for Animation#add_track

struct Animation_audio_track_insert_key_Cfg #

@[params]
struct Animation_audio_track_insert_key_Cfg {
pub:
	start_offset f64
	end_offset   f64
}

Optional parameters for Animation#audio_track_insert_key

struct Animation_bezier_track_insert_key_Cfg #

@[params]
struct Animation_bezier_track_insert_key_Cfg {
pub:
	in_handle  Vector2 = Vector2{0, 0}
	out_handle Vector2 = Vector2{0, 0}
}

Optional parameters for Animation#bezier_track_insert_key

struct Animation_bezier_track_set_key_in_handle_Cfg #

@[params]
struct Animation_bezier_track_set_key_in_handle_Cfg {
pub:
	balanced_value_time_ratio f64 = 1.0
}

Optional parameters for Animation#bezier_track_set_key_in_handle

struct Animation_bezier_track_set_key_out_handle_Cfg #

@[params]
struct Animation_bezier_track_set_key_out_handle_Cfg {
pub:
	balanced_value_time_ratio f64 = 1.0
}

Optional parameters for Animation#bezier_track_set_key_out_handle

struct Animation_blend_shape_track_interpolate_Cfg #

@[params]
struct Animation_blend_shape_track_interpolate_Cfg {
pub:
	backward bool
}

Optional parameters for Animation#blend_shape_track_interpolate

struct Animation_compress_Cfg #

@[params]
struct Animation_compress_Cfg {
pub:
	page_size       i64 = 8192
	fps             i64 = 120
	split_tolerance f64 = 4.0
}

Optional parameters for Animation#compress

struct Animation_optimize_Cfg #

@[params]
struct Animation_optimize_Cfg {
pub:
	allowed_velocity_err f64 = 0.01
	allowed_angular_err  f64 = 0.01
	precision            i64 = 3
}

Optional parameters for Animation#optimize

struct Animation_position_track_interpolate_Cfg #

@[params]
struct Animation_position_track_interpolate_Cfg {
pub:
	backward bool
}

Optional parameters for Animation#position_track_interpolate

struct Animation_rotation_track_interpolate_Cfg #

@[params]
struct Animation_rotation_track_interpolate_Cfg {
pub:
	backward bool
}

Optional parameters for Animation#rotation_track_interpolate

struct Animation_scale_track_interpolate_Cfg #

@[params]
struct Animation_scale_track_interpolate_Cfg {
pub:
	backward bool
}

Optional parameters for Animation#scale_track_interpolate

struct Animation_track_find_key_Cfg #

@[params]
struct Animation_track_find_key_Cfg {
pub:
	find_mode AnimationFindMode = unsafe { AnimationFindMode(0) }
	limit     bool
	backward  bool
}

Optional parameters for Animation#track_find_key

struct Animation_track_insert_key_Cfg #

@[params]
struct Animation_track_insert_key_Cfg {
pub:
	transition f64 = 1
}

Optional parameters for Animation#track_insert_key

struct Animation_value_track_interpolate_Cfg #

@[params]
struct Animation_value_track_interpolate_Cfg {
pub:
	backward bool
}

Optional parameters for Animation#value_track_interpolate

struct Area2D #

struct Area2D {
	CollisionObject2D
}

A region of 2D space that detects other [CollisionObject2D]s entering or exiting it.

fn (Area2D) to_variant #

fn (s &Area2D) to_variant() Variant

fn (Area2D) from_variant #

fn (mut s Area2D) from_variant(variant &Variant)

fn (Area2D) set_gravity_space_override_mode #

fn (s &Area2D) set_gravity_space_override_mode(space_override_mode Area2DSpaceOverride)

fn (Area2D) get_gravity_space_override_mode #

fn (s &Area2D) get_gravity_space_override_mode() Area2DSpaceOverride

fn (Area2D) set_gravity_is_point #

fn (s &Area2D) set_gravity_is_point(enable bool)

fn (Area2D) is_gravity_a_point #

fn (s &Area2D) is_gravity_a_point() bool

fn (Area2D) set_gravity_point_unit_distance #

fn (s &Area2D) set_gravity_point_unit_distance(distance_scale f64)

fn (Area2D) get_gravity_point_unit_distance #

fn (s &Area2D) get_gravity_point_unit_distance() f64

fn (Area2D) set_gravity_point_center #

fn (s &Area2D) set_gravity_point_center(center Vector2)

fn (Area2D) get_gravity_point_center #

fn (s &Area2D) get_gravity_point_center() Vector2

fn (Area2D) set_gravity_direction #

fn (s &Area2D) set_gravity_direction(direction Vector2)

fn (Area2D) get_gravity_direction #

fn (s &Area2D) get_gravity_direction() Vector2

fn (Area2D) set_gravity #

fn (s &Area2D) set_gravity(gravity f64)

fn (Area2D) get_gravity #

fn (s &Area2D) get_gravity() f64

fn (Area2D) set_linear_damp_space_override_mode #

fn (s &Area2D) set_linear_damp_space_override_mode(space_override_mode Area2DSpaceOverride)

fn (Area2D) get_linear_damp_space_override_mode #

fn (s &Area2D) get_linear_damp_space_override_mode() Area2DSpaceOverride

fn (Area2D) set_angular_damp_space_override_mode #

fn (s &Area2D) set_angular_damp_space_override_mode(space_override_mode Area2DSpaceOverride)

fn (Area2D) get_angular_damp_space_override_mode #

fn (s &Area2D) get_angular_damp_space_override_mode() Area2DSpaceOverride

fn (Area2D) set_linear_damp #

fn (s &Area2D) set_linear_damp(linear_damp f64)

fn (Area2D) get_linear_damp #

fn (s &Area2D) get_linear_damp() f64

fn (Area2D) set_angular_damp #

fn (s &Area2D) set_angular_damp(angular_damp f64)

fn (Area2D) get_angular_damp #

fn (s &Area2D) get_angular_damp() f64

fn (Area2D) set_priority #

fn (s &Area2D) set_priority(priority i64)

fn (Area2D) get_priority #

fn (s &Area2D) get_priority() i64

fn (Area2D) set_monitoring #

fn (s &Area2D) set_monitoring(enable bool)

fn (Area2D) is_monitoring #

fn (s &Area2D) is_monitoring() bool

fn (Area2D) set_monitorable #

fn (s &Area2D) set_monitorable(enable bool)

fn (Area2D) is_monitorable #

fn (s &Area2D) is_monitorable() bool

fn (Area2D) get_overlapping_bodies #

fn (s &Area2D) get_overlapping_bodies() Array

Returns a list of intersecting [PhysicsBody2D]s and [TileMap]s. The overlapping body's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.

fn (Area2D) get_overlapping_areas #

fn (s &Area2D) get_overlapping_areas() Array

Returns a list of intersecting [Area2D]s. The overlapping area's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.

fn (Area2D) has_overlapping_bodies #

fn (s &Area2D) has_overlapping_bodies() bool

Returns true if intersecting any [PhysicsBody2D]s or [TileMap]s, otherwise returns false. The overlapping body's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected. For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.

fn (Area2D) has_overlapping_areas #

fn (s &Area2D) has_overlapping_areas() bool

Returns true if intersecting any [Area2D]s, otherwise returns false. The overlapping area's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected. For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.

fn (Area2D) overlaps_body #

fn (s &Area2D) overlaps_body(body Node) bool

Returns true if the given physics body intersects or overlaps this [Area2D], false otherwise. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. The [param body] argument can either be a [PhysicsBody2D] or a [TileMap] instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body.

fn (Area2D) overlaps_area #

fn (s &Area2D) overlaps_area(area Node) bool

Returns true if the given [Area2D] intersects or overlaps this [Area2D], false otherwise. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead.

fn (Area2D) set_audio_bus_name #

fn (s &Area2D) set_audio_bus_name(name string)

fn (Area2D) get_audio_bus_name #

fn (s &Area2D) get_audio_bus_name() string

fn (Area2D) set_audio_bus_override #

fn (s &Area2D) set_audio_bus_override(enable bool)

fn (Area2D) is_overriding_audio_bus #

fn (s &Area2D) is_overriding_audio_bus() bool

struct Area3D #

struct Area3D {
	CollisionObject3D
}

A region of 3D space that detects other [CollisionObject3D]s entering or exiting it.

fn (Area3D) to_variant #

fn (s &Area3D) to_variant() Variant

fn (Area3D) from_variant #

fn (mut s Area3D) from_variant(variant &Variant)

fn (Area3D) set_gravity_space_override_mode #

fn (s &Area3D) set_gravity_space_override_mode(space_override_mode Area3DSpaceOverride)

fn (Area3D) get_gravity_space_override_mode #

fn (s &Area3D) get_gravity_space_override_mode() Area3DSpaceOverride

fn (Area3D) set_gravity_is_point #

fn (s &Area3D) set_gravity_is_point(enable bool)

fn (Area3D) is_gravity_a_point #

fn (s &Area3D) is_gravity_a_point() bool

fn (Area3D) set_gravity_point_unit_distance #

fn (s &Area3D) set_gravity_point_unit_distance(distance_scale f64)

fn (Area3D) get_gravity_point_unit_distance #

fn (s &Area3D) get_gravity_point_unit_distance() f64

fn (Area3D) set_gravity_point_center #

fn (s &Area3D) set_gravity_point_center(center Vector3)

fn (Area3D) get_gravity_point_center #

fn (s &Area3D) get_gravity_point_center() Vector3

fn (Area3D) set_gravity_direction #

fn (s &Area3D) set_gravity_direction(direction Vector3)

fn (Area3D) get_gravity_direction #

fn (s &Area3D) get_gravity_direction() Vector3

fn (Area3D) set_gravity #

fn (s &Area3D) set_gravity(gravity f64)

fn (Area3D) get_gravity #

fn (s &Area3D) get_gravity() f64

fn (Area3D) set_linear_damp_space_override_mode #

fn (s &Area3D) set_linear_damp_space_override_mode(space_override_mode Area3DSpaceOverride)

fn (Area3D) get_linear_damp_space_override_mode #

fn (s &Area3D) get_linear_damp_space_override_mode() Area3DSpaceOverride

fn (Area3D) set_angular_damp_space_override_mode #

fn (s &Area3D) set_angular_damp_space_override_mode(space_override_mode Area3DSpaceOverride)

fn (Area3D) get_angular_damp_space_override_mode #

fn (s &Area3D) get_angular_damp_space_override_mode() Area3DSpaceOverride

fn (Area3D) set_angular_damp #

fn (s &Area3D) set_angular_damp(angular_damp f64)

fn (Area3D) get_angular_damp #

fn (s &Area3D) get_angular_damp() f64

fn (Area3D) set_linear_damp #

fn (s &Area3D) set_linear_damp(linear_damp f64)

fn (Area3D) get_linear_damp #

fn (s &Area3D) get_linear_damp() f64

fn (Area3D) set_priority #

fn (s &Area3D) set_priority(priority i64)

fn (Area3D) get_priority #

fn (s &Area3D) get_priority() i64

fn (Area3D) set_wind_force_magnitude #

fn (s &Area3D) set_wind_force_magnitude(wind_force_magnitude f64)

fn (Area3D) get_wind_force_magnitude #

fn (s &Area3D) get_wind_force_magnitude() f64

fn (Area3D) set_wind_attenuation_factor #

fn (s &Area3D) set_wind_attenuation_factor(wind_attenuation_factor f64)

fn (Area3D) get_wind_attenuation_factor #

fn (s &Area3D) get_wind_attenuation_factor() f64

fn (Area3D) set_wind_source_path #

fn (s &Area3D) set_wind_source_path(wind_source_path NodePath)

fn (Area3D) get_wind_source_path #

fn (s &Area3D) get_wind_source_path() NodePath

fn (Area3D) set_monitorable #

fn (s &Area3D) set_monitorable(enable bool)

fn (Area3D) is_monitorable #

fn (s &Area3D) is_monitorable() bool

fn (Area3D) set_monitoring #

fn (s &Area3D) set_monitoring(enable bool)

fn (Area3D) is_monitoring #

fn (s &Area3D) is_monitoring() bool

fn (Area3D) get_overlapping_bodies #

fn (s &Area3D) get_overlapping_bodies() Array

Returns a list of intersecting [PhysicsBody3D]s and [GridMap]s. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.

fn (Area3D) get_overlapping_areas #

fn (s &Area3D) get_overlapping_areas() Array

Returns a list of intersecting [Area3D]s. The overlapping area's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.

fn (Area3D) has_overlapping_bodies #

fn (s &Area3D) has_overlapping_bodies() bool

Returns true if intersecting any [PhysicsBody3D]s or [GridMap]s, otherwise returns false. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected. For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.

fn (Area3D) has_overlapping_areas #

fn (s &Area3D) has_overlapping_areas() bool

Returns true if intersecting any [Area3D]s, otherwise returns false. The overlapping area's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected. For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.

fn (Area3D) overlaps_body #

fn (s &Area3D) overlaps_body(body Node) bool

Returns true if the given physics body intersects or overlaps this [Area3D], false otherwise. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. The [param body] argument can either be a [PhysicsBody3D] or a [GridMap] instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body.

fn (Area3D) overlaps_area #

fn (s &Area3D) overlaps_area(area Node) bool

Returns true if the given [Area3D] intersects or overlaps this [Area3D], false otherwise. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.

fn (Area3D) set_audio_bus_override #

fn (s &Area3D) set_audio_bus_override(enable bool)

fn (Area3D) is_overriding_audio_bus #

fn (s &Area3D) is_overriding_audio_bus() bool

fn (Area3D) set_audio_bus_name #

fn (s &Area3D) set_audio_bus_name(name string)

fn (Area3D) get_audio_bus_name #

fn (s &Area3D) get_audio_bus_name() string

fn (Area3D) set_use_reverb_bus #

fn (s &Area3D) set_use_reverb_bus(enable bool)

fn (Area3D) is_using_reverb_bus #

fn (s &Area3D) is_using_reverb_bus() bool

fn (Area3D) set_reverb_bus_name #

fn (s &Area3D) set_reverb_bus_name(name string)

fn (Area3D) get_reverb_bus_name #

fn (s &Area3D) get_reverb_bus_name() string

fn (Area3D) set_reverb_amount #

fn (s &Area3D) set_reverb_amount(amount f64)

fn (Area3D) get_reverb_amount #

fn (s &Area3D) get_reverb_amount() f64

fn (Area3D) set_reverb_uniformity #

fn (s &Area3D) set_reverb_uniformity(amount f64)

fn (Area3D) get_reverb_uniformity #

fn (s &Area3D) get_reverb_uniformity() f64

struct Array #

@[packed]
struct Array {
	data_ [8]u8
}

A built-in data structure that holds a sequence of elements.

An array data structure that can contain a sequence of elements of any [Variant] type. Elements are accessed by a numerical index starting at 0. Negative indices are used to count from the back (-1 is the last element, -2 is the second to last, etc.). [codeblocks] [gdscript] var array = ["First", 2, 3, "Last"] print(array[0]) # Prints "First" print(array[2]) # Prints 3 print(array[-1]) # Prints "Last"

array[1] = "Second" print(array[1]) # Prints "Second" print(array[-3]) # Prints "Second" [/gdscript] [csharp] Godot.Collections.Array array = ["First", 2, 3, "Last"]; GD.Print(array[0]); // Prints "First" GD.Print(array[2]); // Prints 3 GD.Print(array[^1]); // Prints "Last"

array[1] = "Second"; GD.Print(array[1]); // Prints "Second" GD.Print(array[^3]); // Prints "Second" [/csharp] [/codeblocks] [b]Note:[/b] Arrays are always passed by [b]reference[/b]. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. [b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] supported and will result in unpredictable behavior. [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedInt64Array] versus Array[int]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.

fn (Array) deinit #

fn (s &Array) deinit()

fn (Array) size #

fn (s &Array) size() i64

Returns the number of elements in the array. Empty arrays ([]) always return 0. See also [method is_empty].

fn (Array) is_empty #

fn (s &Array) is_empty() bool

Returns true if the array is empty ([]). See also [method size].

fn (Array) clear #

fn (s &Array) clear()

Removes all elements from the array. This is equivalent to using [method resize] with a size of 0.

fn (Array) hash #

fn (s &Array) hash() i64

Returns a hashed 32-bit integer value representing the array and its contents. [b]Note:[/b] Arrays with equal hash values are [i]not[/i] guaranteed to be the same, as a result of hash collisions. On the countrary, arrays with different hash values are guaranteed to be different.

fn (Array) assign #

fn (s &Array) assign(array Array)

Assigns elements of another [param array] into the array. Resizes the array to match [param array]. Performs type conversions if the array is typed.

fn (Array) get #

fn (s &Array) get(index i64) Variant

Returns the element at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns null. This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (Array) set #

fn (s &Array) set(index i64, value_ ToVariant)

Sets the value of the element at the given [param index] to the given [param value]. This will not change the size of the array, it only changes the value at an index already in the array. This is the same as using the [] operator (array[index] = value).

fn (Array) push_back #

fn (s &Array) push_back(value_ ToVariant)

Appends an element at the end of the array. See also [method push_front].

fn (Array) push_front #

fn (s &Array) push_front(value_ ToVariant)

Adds an element at the beginning of the array. See also [method push_back]. [b]Note:[/b] This method shifts every other element's index forward, which may have a noticeable performance cost, especially on larger arrays.

fn (Array) append #

fn (s &Array) append(value_ ToVariant)

Appends [param value] at the end of the array (alias of [method push_back]).

fn (Array) append_array #

fn (s &Array) append_array(array Array)

Appends another [param array] at the end of this array.

var numbers = [1, 2, 3]
var extra = [4, 5, 6]
numbers.append_array(extra)
print(numbers) ##

fn (Array) resize #

fn (s &Array) resize(size i64) i64

Sets the array's number of elements to [param size]. If [param size] is smaller than the array's current size, the elements at the end are removed. If [param size] is greater, new default elements (usually null) are added, depending on the array's type. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_LOCKED] if the array is read-only, [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize. [b]Note:[/b] Calling this method once and assigning the new values is faster than calling [method append] for every new element.

fn (Array) insert #

fn (s &Array) insert(position i64, value_ ToVariant) i64

Inserts a new element ([param value]) at a given index ([param position]) in the array. [param position] should be between 0 and the array's [method size]. If negative, [param position] is considered relative to the end of the array. Returns [constant OK] on success, or one of the other [enum Error] constants if this method fails. [b]Note:[/b] Every element's index after [param position] needs to be shifted forward, which may have a noticeable performance cost, especially on larger arrays.

fn (Array) remove_at #

fn (s &Array) remove_at(position i64)

Removes the element from the array at the given index ([param position]). If the index is out of bounds, this method fails. If the index is negative, [param position] is considered relative to the end of the array. If you need to return the removed element, use [method pop_at]. To remove an element by value, use [method erase] instead. [b]Note:[/b] This method shifts every element's index after [param position] back, which may have a noticeable performance cost, especially on larger arrays. [b]Note:[/b] The [param position] cannot be negative. To remove an element relative to the end of the array, use arr.remove_at(arr.size() - (i + 1)). To remove the last element from the array, use arr.resize(arr.size() - 1).

fn (Array) fill #

fn (s &Array) fill(value_ ToVariant)

Assigns the given [param value] to all elements in the array. This method can often be combined with [method resize] to create an array with a given size and initialized elements: [codeblocks] [gdscript] var array = [] array.resize(5) array.fill(2) print(array) # Prints [2, 2, 2, 2, 2] [/gdscript] [csharp] Godot.Collections.Array array = []; array.Resize(5); array.Fill(2); GD.Print(array); // Prints [2, 2, 2, 2, 2] [/csharp] [/codeblocks] [b]Note:[/b] If [param value] is a [Variant] passed by reference ([Object]-derived, [Array], [Dictionary], etc.), the array will be filled with references to the same [param value], which are not duplicates.

fn (Array) erase #

fn (s &Array) erase(value_ ToVariant)

Finds and removes the first occurrence of [param value] from the array. If [param value] does not exist in the array, nothing happens. To remove an element by index, use [method remove_at] instead. [b]Note:[/b] This method shifts every element's index after the removed [param value] back, which may have a noticeable performance cost, especially on larger arrays. [b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] supported and will result in unpredictable behavior.

fn (Array) front #

fn (s &Array) front() Variant

Returns the first element of the array. If the array is empty, fails and returns null. See also [method back]. [b]Note:[/b] Unlike with the [] operator (array[0]), an error is generated without stopping project execution.

fn (Array) back #

fn (s &Array) back() Variant

Returns the last element of the array. If the array is empty, fails and returns null. See also [method front]. [b]Note:[/b] Unlike with the [] operator (array[-1]), an error is generated without stopping project execution.

fn (Array) pick_random #

fn (s &Array) pick_random() Variant

Returns a random element from the array. Generates an error and returns null if the array is empty. [codeblocks] [gdscript]# May print 1, 2, 3.25, or "Hi".print([1, 2, 3.25, "Hi"].pick_random()) [/gdscript] [csharp] Godot.Collections.Array array = [1, 2, 3.25f, "Hi"]; GD.Print(array.PickRandom()); // May print 1, 2, 3.25, or "Hi". [/csharp] [/codeblocks] [b]Note:[/b] Like many similar functions in the engine (such as [method @GlobalScope.randi] or [method shuffle]), this method uses a common, global random seed. To get a predictable outcome from this method, see [method @GlobalScope.seed].

fn (Array) find #

fn (s &Array) find(what_ ToVariant, cfg Array_find_Cfg) i64

Returns the index of the [b]first[/b] occurrence of [param what] in this array, or -1 if there are none. The search's start can be specified with [param from], continuing to the end of the array. [b]Note:[/b] If you just want to know whether the array contains [param what], use [method has] (Contains in C#). In GDScript, you may also use the in operator. [b]Note:[/b] For performance reasons, the search is affected by [param what]'s [enum Variant.Type]. For example, 7 ([int]) and 7.0 ([float]) are not considered equal for this method.

fn (Array) find_custom #

fn (s &Array) find_custom(method Callable, cfg Array_find_custom_Cfg) i64

Returns the index of the [b]first[/b] element in the array that causes [param method] to return true, or -1 if there are none. The search's start can be specified with [param from], continuing to the end of the array. [param method] is a callable that takes an element of the array, and returns a [bool]. [b]Note:[/b] If you just want to know whether the array contains [i]anything[/i] that satisfies [param method], use [method any]. [codeblocks] [gdscript] func is_even(number): return number % 2 == 0

func _ready(): print([1, 3, 4, 7].find_custom(is_even.bind())) # Prints 2 [/gdscript] [/codeblocks]

fn (Array) rfind #

fn (s &Array) rfind(what_ ToVariant, cfg Array_rfind_Cfg) i64

Returns the index of the [b]last[/b] occurrence of [param what] in this array, or -1 if there are none. The search's start can be specified with [param from], continuing to the beginning of the array. This method is the reverse of [method find].

fn (Array) rfind_custom #

fn (s &Array) rfind_custom(method Callable, cfg Array_rfind_custom_Cfg) i64

Returns the index of the [b]last[/b] element of the array that causes [param method] to return true, or -1 if there are none. The search's start can be specified with [param from], continuing to the beginning of the array. This method is the reverse of [method find_custom].

fn (Array) count #

fn (s &Array) count(value_ ToVariant) i64

Returns the number of times an element is in the array. To count how many elements in an array satisfy a condition, see [method reduce].

fn (Array) has #

fn (s &Array) has(value_ ToVariant) bool

Returns true if the array contains the given [param value]. [codeblocks] [gdscript] print(["inside", 7].has("inside")) # Prints true print(["inside", 7].has("outside")) # Prints false print(["inside", 7].has(7)) # Prints true print(["inside", 7].has("7")) # Prints false [/gdscript] [csharp] Godot.Collections.Array arr = ["inside", 7]; // By C# convention, this method is renamed to Contains. GD.Print(arr.Contains("inside")); // Prints True GD.Print(arr.Contains("outside")); // Prints False GD.Print(arr.Contains(7)); // Prints True GD.Print(arr.Contains("7")); // Prints False [/csharp] [/codeblocks] In GDScript, this is equivalent to the in operator:

if 4 in [2, 4, 6, 8]:
print('4 is here!') ##

[b]Note:[/b] For performance reasons, the search is affected by the [param value]'s [enum Variant.Type]. For example, 7 ([int]) and 7.0 ([float]) are not considered equal for this method.

fn (Array) pop_back #

fn (s &Array) pop_back() Variant

Removes and returns the last element of the array. Returns null if the array is empty, without generating an error. See also [method pop_front].

fn (Array) pop_front #

fn (s &Array) pop_front() Variant

Removes and returns the first element of the array. Returns null if the array is empty, without generating an error. See also [method pop_back]. [b]Note:[/b] This method shifts every other element's index back, which may have a noticeable performance cost, especially on larger arrays.

fn (Array) pop_at #

fn (s &Array) pop_at(position i64) Variant

Removes and returns the element of the array at index [param position]. If negative, [param position] is considered relative to the end of the array. Returns null if the array is empty. If [param position] is out of bounds, an error message is also generated. [b]Note:[/b] This method shifts every element's index after [param position] back, which may have a noticeable performance cost, especially on larger arrays.

fn (Array) sort #

fn (s &Array) sort()

Sorts the array in ascending order. The final order is dependent on the "less than" (<) comparison between elements. [codeblocks] [gdscript] var numbers = [10, 5, 2.5, 8] numbers.sort() print(numbers) # Prints [2.5, 5, 8, 10] [/gdscript] [csharp] Godot.Collections.Array numbers = [10, 5, 2.5, 8]; numbers.Sort(); GD.Print(numbers); // Prints [2.5, 5, 8, 10] [/csharp] [/codeblocks] [b]Note:[/b] The sorting algorithm used is not [url=https://en.wikipedia.org/wiki/Sorting_algorithm#Stability]stable[/url]. This means that equivalent elements (such as 2 and 2.0) may have their order changed when calling [method sort].

fn (Array) sort_custom #

fn (s &Array) sort_custom(func Callable)

Sorts the array using a custom [Callable]. [param func] is called as many times as necessary, receiving two array elements as arguments. The function should return true if the first element should be moved [i]before[/i] the second one, otherwise it should return false.

func sort_ascending(a, b):
if a[1] < b[1]:
return true
return false

func _ready():
var my_items = [['Tomato', 5], ['Apple', 9], ['Rice', 4]]
my_items.sort_custom(sort_ascending)
print(my_items) ##
##my_items.sort_custom(func(a, b): return a[1] > b[1])
print(my_items) ##

It may also be necessary to use this method to sort strings by natural order, with [method String.naturalnocasecmp_to], as in the following example:

var files = ['newfile1', 'newfile2', 'newfile10', 'newfile11']
files.sort_custom(func(a, b): return a.naturalnocasecmp_to(b) < 0)
print(files) ##

[b]Note:[/b] In C#, this method is not supported. [b]Note:[/b] The sorting algorithm used is not [url=https://en.wikipedia.org/wiki/Sorting_algorithm#Stability]stable[/url]. This means that values considered equal may have their order changed when calling this method. [b]Note:[/b] You should not randomize the return value of [param func], as the heapsort algorithm expects a consistent result. Randomizing the return value will result in unexpected behavior.

fn (Array) shuffle #

fn (s &Array) shuffle()

Shuffles all elements of the array in a random order. [b]Note:[/b] Like many similar functions in the engine (such as [method @GlobalScope.randi] or [method pick_random]), this method uses a common, global random seed. To get a predictable outcome from this method, see [method @GlobalScope.seed].

fn (Array) bsearch #

fn (s &Array) bsearch(value_ ToVariant, cfg Array_bsearch_Cfg) i64

Returns the index of [param value] in the sorted array. If it cannot be found, returns where [param value] should be inserted to keep the array sorted. The algorithm used is [url=https://en.wikipedia.org/wiki/Binary_search_algorithm]binary search[/url]. If [param before] is true (as by default), the returned index comes before all existing elements equal to [param value] in the array.

var numbers = [2, 4, 8, 10]
var idx = numbers.bsearch(7)

numbers.insert(idx, 7)
print(numbers) ##
var fruits = ['Apple', 'Lemon', 'Lemon', 'Orange']
print(fruits.bsearch('Lemon', true))  ##print(fruits.bsearch('Lemon', false)) ##

[b]Note:[/b] Calling [method bsearch] on an [i]unsorted[/i] array will result in unexpected behavior. Use [method sort] before calling this method.

fn (Array) bsearch_custom #

fn (s &Array) bsearch_custom(value_ ToVariant, func Callable, cfg Array_bsearch_custom_Cfg) i64

Returns the index of [param value] in the sorted array. If it cannot be found, returns where [param value] should be inserted to keep the array sorted (using [param func] for the comparisons). The algorithm used is [url=https://en.wikipedia.org/wiki/Binary_search_algorithm]binary search[/url]. Similar to [method sort_custom], [param func] is called as many times as necessary, receiving one array element and [param value] as arguments. The function should return true if the array element should be [i]behind[/i] [param value], otherwise it should return false. If [param before] is true (as by default), the returned index comes before all existing elements equal to [param value] in the array.

func sort_by_amount(a, b):
if a[1] < b[1]:
return true
return false

func _ready():
var my_items = [['Tomato', 2], ['Kiwi', 5], ['Rice', 9]]

var apple = ['Apple', 5]
##my_items.insert(my_items.bsearch_custom(apple, sort_by_amount, true), apple)

var banana = ['Banana', 5]
##my_items.insert(my_items.bsearch_custom(banana, sort_by_amount, false), banana)

##print(my_items)

[b]Note:[/b] Calling [method bsearch_custom] on an [i]unsorted[/i] array will result in unexpected behavior. Use [method sort_custom] with [param func] before calling this method.

fn (Array) reverse #

fn (s &Array) reverse()

Reverses the order of all elements in the array.

fn (Array) duplicate #

fn (s &Array) duplicate(cfg Array_duplicate_Cfg) Array

Returns a new copy of the array. By default, a [b]shallow[/b] copy is returned: all nested [Array], [Dictionary], and [Resource] elements are shared with the original array. Modifying any of those in one array will also affect them in the other. If [param deep] is true, a [b]deep[/b] copy is returned: all nested arrays and dictionaries are also duplicated (recursively). Any [Resource] is still shared with the original array, though.

fn (Array) duplicate_deep #

fn (s &Array) duplicate_deep(cfg Array_duplicate_deep_Cfg) Array

Duplicates this array, deeply, like [method duplicate](true), with extra control over how subresources are handled. [param deep_subresources_mode] must be one of the values from [enum Resource.ResourceDeepDuplicateMode]. By default, only internal resources will be duplicated (recursively).

fn (Array) slice #

fn (s &Array) slice(begin i64, cfg Array_slice_Cfg) Array

Returns a new [Array] containing this array's elements, from index [param begin] (inclusive) to [param end] (exclusive), every [param step] elements. If either [param begin] or [param end] are negative, their value is relative to the end of the array. If [param step] is negative, this method iterates through the array in reverse, returning a slice ordered backwards. For this to work, [param begin] must be greater than [param end]. If [param deep] is true, all nested [Array] and [Dictionary] elements in the slice are duplicated from the original, recursively. See also [method duplicate].

var letters = ['A', 'B', 'C', 'D', 'E', 'F']

print(letters.slice(0, 2))  ##print(letters.slice(2, -2)) ##print(letters.slice(-2, 6)) ##
print(letters.slice(0, 6, 2))  ##print(letters.slice(4, 1, -1)) ##

fn (Array) filter #

fn (s &Array) filter(method Callable) Array

Calls the given [Callable] on each element in the array and returns a new, filtered [Array]. The [param method] receives one of the array elements as an argument, and should return true to add the element to the filtered array, or false to exclude it.

func is_even(number):
return number % 2 == 0

func _ready():
print([1, 4, 5, 8].filter(is_even)) ##
##print([1, 4, 5, 8].filter(func(number): return number % 2 == 0))

See also [method any], [method all], [method map] and [method reduce].

fn (Array) gd_map #

fn (s &Array) gd_map(method Callable) Array

Calls the given [Callable] for each element in the array and returns a new array filled with values returned by the [param method]. The [param method] should take one [Variant] parameter (the current array element) and can return any [Variant].

func double(number):
return number * 2

func _ready():
print([1, 2, 3].map(double)) ##
##print([1, 2, 3].map(func(element): return element * 2))

See also [method filter], [method reduce], [method any] and [method all].

fn (Array) reduce #

fn (s &Array) reduce(method Callable, cfg Array_reduce_Cfg) Variant

Calls the given [Callable] for each element in array, accumulates the result in [param accum], then returns it. The [param method] takes two arguments: the current value of [param accum] and the current array element. If [param accum] is null (as by default), the iteration will start from the second element, with the first one used as initial value of [param accum].

func sum(accum, number):
return accum + number

func _ready():
print([1, 2, 3].reduce(sum, 0))  ##print([1, 2, 3].reduce(sum, 10)) ##
##print([1, 2, 3].reduce(func(accum, number): return accum + number, 10))

If [method max] is not desirable, this method may also be used to implement a custom comparator:

func _ready():
var arr = [Vector2i(5, 0), Vector2i(3, 4), Vector2i(1, 2)]

var longest_vec = arr.reduce(func(max, vec): return vec if is_length_greater(vec, max) else max)
print(longest_vec) ##
func is_length_greater(a, b):
return a.length() > b.length()

This method can also be used to count how many elements in an array satisfy a certain condition, similar to [method count]:

func is_even(number):
return number % 2 == 0

func _ready():
var arr = [1, 2, 3, 4, 5]
##var even_count = arr.reduce(func(count, next): return count + 1 if is_even(next) else count, 0)
print(even_count) ##

See also [method map], [method filter], [method any], and [method all].

fn (Array) any #

fn (s &Array) any(method Callable) bool

Calls the given [Callable] on each element in the array and returns true if the [Callable] returns true for [i]one or more[/i] elements in the array. If the [Callable] returns false for all elements in the array, this method returns false. The [param method] should take one [Variant] parameter (the current array element) and return a [bool].

func greater_than_5(number):
return number > 5

func _ready():
print([6, 10, 6].any(greater_than_5)) ##print([4, 10, 4].any(greater_than_5)) ##print([4, 4, 4].any(greater_than_5))  ##print([].any(greater_than_5))         ##
##print([6, 10, 6].any(func(number): return number > 5)) ##

See also [method all], [method filter], [method map] and [method reduce]. [b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays). [b]Note:[/b] For an empty array, this method always returns false.

fn (Array) all #

fn (s &Array) all(method Callable) bool

Calls the given [Callable] on each element in the array and returns true if the [Callable] returns true for [i]all[/i] elements in the array. If the [Callable] returns false for one array element or more, this method returns false. The [param method] should take one [Variant] parameter (the current array element) and return a [bool]. [codeblocks] [gdscript] func greater_than_5(number): return number > 5

func _ready(): print([6, 10, 6].all(greater_than_5)) # Prints true (3/3 elements evaluate to true). print([4, 10, 4].all(greater_than_5)) # Prints false (1/3 elements evaluate to true). print([4, 4, 4].all(greater_than_5)) # Prints false (0/3 elements evaluate to true). print([].all(greater_than_5)) # Prints true (0/0 elements evaluate to true).

Same as the first line above, but using a lambda function.

print([6, 10, 6].all(func(element): return element > 5)) # Prints true [/gdscript] [csharp] private static bool GreaterThan5(int number) { return number > 5; }

public override void _Ready() { // Prints True (3/3 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(GreaterThan5)); // Prints False (1/3 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { 4, 10, 4 }.All(GreaterThan5)); // Prints False (0/3 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { 4, 4, 4 }.All(GreaterThan5)); // Prints True (0/0 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { }.All(GreaterThan5));

// Same as the first line above, but using a lambda function. GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => element > 5)); // Prints True } [/csharp] [/codeblocks] See also [method any], [method filter], [method map] and [method reduce]. [b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays). [b]Note:[/b] For an empty array, this method [url=https://en.wikipedia.org/wiki/Vacuous_truth]always[/url] returns true.

fn (Array) max #

fn (s &Array) max() Variant

Returns the maximum value contained in the array, if all elements can be compared. Otherwise, returns null. See also [method min]. To find the maximum value using a custom comparator, you can use [method reduce].

fn (Array) min #

fn (s &Array) min() Variant

Returns the minimum value contained in the array, if all elements can be compared. Otherwise, returns null. See also [method max].

fn (Array) is_typed #

fn (s &Array) is_typed() bool

Returns true if the array is typed. Typed arrays can only contain elements of a specific type, as defined by the typed array constructor. The methods of a typed array are still expected to return a generic [Variant]. In GDScript, it is possible to define a typed array with static typing:

var numbers: Array[float] = [0.2, 4.2, -2.0]
print(numbers.is_typed()) ##

fn (Array) is_same_typed #

fn (s &Array) is_same_typed(array Array) bool

Returns true if this array is typed the same as the given [param array]. See also [method is_typed].

fn (Array) get_typed_builtin #

fn (s &Array) get_typed_builtin() i64

Returns the built-in [Variant] type of the typed array as a [enum Variant.Type] constant. If the array is not typed, returns [constant TYPE_NIL]. See also [method is_typed].

fn (Array) get_typed_class_name #

fn (s &Array) get_typed_class_name() StringName

Returns the [b]built-in[/b] class name of the typed array, if the built-in [Variant] type [constant TYPE_OBJECT]. Otherwise, returns an empty [StringName]. See also [method is_typed] and [method Object.get_class].

fn (Array) get_typed_script #

fn (s &Array) get_typed_script() Variant

Returns the [Script] instance associated with this typed array, or null if it does not exist. See also [method is_typed].

fn (Array) make_read_only #

fn (s &Array) make_read_only()

Makes the array read-only. The array's elements cannot be overridden with different values, and their order cannot change. Does not apply to nested elements, such as dictionaries. In GDScript, arrays are automatically read-only if declared with the const keyword.

fn (Array) is_read_only #

fn (s &Array) is_read_only() bool

Returns true if the array is read-only. See [method make_read_only]. In GDScript, arrays are automatically read-only if declared with the const keyword.

fn (Array) to_variant #

fn (s &Array) to_variant() Variant

fn (Array) from_variant #

fn (mut s Array) from_variant(variant &Variant)

fn (Array) index #

fn (v &Array) index(i i64) Variant

fn (Array) in_dictionary #

fn (a Array) in_dictionary(b Dictionary) bool

fn (Array) == #

fn (a Array) == (b Array) bool

Compares the left operand [Array] against the [param right] [Array]. Returns true if the sizes and contents of the arrays are equal, false otherwise.

fn (Array) eq_array #

fn (a Array) eq_array(b Array) bool

Compares the left operand [Array] against the [param right] [Array]. Returns true if the sizes and contents of the arrays are equal, false otherwise.

fn (Array) ne_array #

fn (a Array) ne_array(b Array) bool

Returns true if the array's size or its elements are different than [param right]'s.

fn (Array) < #

fn (a Array) < (b Array) bool

Compares the elements of both arrays in order, starting from index 0 and ending on the last index in common between both arrays. For each pair of elements, returns true if this array's element is less than [param right]'s, false if this element is greater. Otherwise, continues to the next pair. If all searched elements are equal, returns true if this array's size is less than [param right]'s, otherwise returns false.

fn (Array) lt_array #

fn (a Array) lt_array(b Array) bool

Compares the elements of both arrays in order, starting from index 0 and ending on the last index in common between both arrays. For each pair of elements, returns true if this array's element is less than [param right]'s, false if this element is greater. Otherwise, continues to the next pair. If all searched elements are equal, returns true if this array's size is less than [param right]'s, otherwise returns false.

fn (Array) le_array #

fn (a Array) le_array(b Array) bool

Compares the elements of both arrays in order, starting from index 0 and ending on the last index in common between both arrays. For each pair of elements, returns true if this array's element is less than [param right]'s, false if this element is greater. Otherwise, continues to the next pair. If all searched elements are equal, returns true if this array's size is less or equal to [param right]'s, otherwise returns false.

fn (Array) gt_array #

fn (a Array) gt_array(b Array) bool

Compares the elements of both arrays in order, starting from index 0 and ending on the last index in common between both arrays. For each pair of elements, returns true if this array's element is greater than [param right]'s, false if this element is less. Otherwise, continues to the next pair. If all searched elements are equal, returns true if this array's size is greater than [param right]'s, otherwise returns false.

fn (Array) ge_array #

fn (a Array) ge_array(b Array) bool

Compares the elements of both arrays in order, starting from index 0 and ending on the last index in common between both arrays. For each pair of elements, returns true if this array's element is greater than [param right]'s, false if this element is less. Otherwise, continues to the next pair. If all searched elements are equal, returns true if this array's size is greater or equal to [param right]'s, otherwise returns false.

fn (Array) + #

fn (a Array) + (b Array) Array

Appends the [param right] array to the left operand, creating a new [Array]. This is also known as an array concatenation. [codeblocks] [gdscript] var array1 = ["One", 2] var array2 = [3, "Four"] print(array1 + array2) # Prints ["One", 2, 3, "Four"] [/gdscript] [csharp] // Note that concatenation is not possible with C#'s native Array type. Godot.Collections.Array array1 = ["One", 2]; Godot.Collections.Array array2 = [3, "Four"]; GD.Print(array1 + array2); // Prints ["One", 2, 3, "Four"] [/csharp] [/codeblocks] [b]Note:[/b] For existing arrays, [method append_array] is much more efficient than concatenation and assignment with the += operator.

fn (Array) add_array #

fn (a Array) add_array(b Array) Array

Appends the [param right] array to the left operand, creating a new [Array]. This is also known as an array concatenation. [codeblocks] [gdscript] var array1 = ["One", 2] var array2 = [3, "Four"] print(array1 + array2) # Prints ["One", 2, 3, "Four"] [/gdscript] [csharp] // Note that concatenation is not possible with C#'s native Array type. Godot.Collections.Array array1 = ["One", 2]; Godot.Collections.Array array2 = [3, "Four"]; GD.Print(array1 + array2); // Prints ["One", 2, 3, "Four"] [/csharp] [/codeblocks] [b]Note:[/b] For existing arrays, [method append_array] is much more efficient than concatenation and assignment with the += operator.

fn (Array) in #

fn (a Array) in(b Array) bool

fn (Array) in_array #

fn (a Array) in_array(b Array) bool

struct ArrayMesh #

struct ArrayMesh {
	Mesh
}

[Mesh] type that provides utility for constructing a surface from arrays.

fn (ArrayMesh) to_variant #

fn (s &ArrayMesh) to_variant() Variant

fn (ArrayMesh) from_variant #

fn (mut s ArrayMesh) from_variant(variant &Variant)

fn (ArrayMesh) add_blend_shape #

fn (s &ArrayMesh) add_blend_shape(name string)

Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added.

fn (ArrayMesh) get_blend_shape_count #

fn (s &ArrayMesh) get_blend_shape_count() i64

Returns the number of blend shapes that the [ArrayMesh] holds.

fn (ArrayMesh) get_blend_shape_name #

fn (s &ArrayMesh) get_blend_shape_name(index i64) string

Returns the name of the blend shape at this index.

fn (ArrayMesh) set_blend_shape_name #

fn (s &ArrayMesh) set_blend_shape_name(index i64, name string)

Sets the name of the blend shape at this index.

fn (ArrayMesh) clear_blend_shapes #

fn (s &ArrayMesh) clear_blend_shapes()

Removes all blend shapes from this [ArrayMesh].

fn (ArrayMesh) set_blend_shape_mode #

fn (s &ArrayMesh) set_blend_shape_mode(mode MeshBlendShapeMode)

fn (ArrayMesh) get_blend_shape_mode #

fn (s &ArrayMesh) get_blend_shape_mode() MeshBlendShapeMode

fn (ArrayMesh) add_surface_from_arrays #

fn (s &ArrayMesh) add_surface_from_arrays(primitive MeshPrimitiveType, arrays Array, cfg ArrayMesh_add_surface_from_arrays_Cfg)

Creates a new surface. [method Mesh.get_surface_count] will become the surf_idx for this new surface. Surfaces are created to be rendered using a [param primitive], which may be any of the values defined in [enum Mesh.PrimitiveType]. The [param arrays] argument is an array of arrays. Each of the [constant Mesh.ARRAY_MAX] elements contains an array with some of the mesh data for this surface as described by the corresponding member of [enum Mesh.ArrayType] or null if it is not used by the surface. For example, arrays[0] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this surface into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. The [param blend_shapes] argument is an array of vertex data for each blend shape. Each element is an array of the same structure as [param arrays], but [constant Mesh.ARRAY_VERTEX], [constant Mesh.ARRAY_NORMAL], and [constant Mesh.ARRAY_TANGENT] are set if and only if they are set in [param arrays] and all other entries are null. The [param lods] argument is a dictionary with [float] keys and [PackedInt32Array] values. Each entry in the dictionary represents an LOD level of the surface, where the value is the [constant Mesh.ARRAY_INDEX] array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. The [param flags] argument is the bitwise OR of, as required: One value of [enum Mesh.ArrayCustomFormat] left shifted by ARRAY_FORMAT_CUSTOMn_SHIFT for each custom channel in use, [constant Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE], [constant Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS], or [constant Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY]. [b]Note:[/b] When using indices, it is recommended to only use points, lines, or triangles.

fn (ArrayMesh) clear_surfaces #

fn (s &ArrayMesh) clear_surfaces()

Removes all surfaces from this [ArrayMesh].

fn (ArrayMesh) surface_remove #

fn (s &ArrayMesh) surface_remove(surf_idx i64)

Removes the surface at the given index from the Mesh, shifting surfaces with higher index down by one.

fn (ArrayMesh) surface_update_vertex_region #

fn (s &ArrayMesh) surface_update_vertex_region(surf_idx i64, offset i64, data PackedByteArray)

fn (ArrayMesh) surface_update_attribute_region #

fn (s &ArrayMesh) surface_update_attribute_region(surf_idx i64, offset i64, data PackedByteArray)

fn (ArrayMesh) surface_update_skin_region #

fn (s &ArrayMesh) surface_update_skin_region(surf_idx i64, offset i64, data PackedByteArray)

fn (ArrayMesh) surface_get_array_len #

fn (s &ArrayMesh) surface_get_array_len(surf_idx i64) i64

Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]).

fn (ArrayMesh) surface_get_array_index_len #

fn (s &ArrayMesh) surface_get_array_index_len(surf_idx i64) i64

Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays]).

fn (ArrayMesh) surface_get_format #

fn (s &ArrayMesh) surface_get_format(surf_idx i64) MeshArrayFormat

Returns the format mask of the requested surface (see [method add_surface_from_arrays]).

fn (ArrayMesh) surface_get_primitive_type #

fn (s &ArrayMesh) surface_get_primitive_type(surf_idx i64) MeshPrimitiveType

Returns the primitive type of the requested surface (see [method add_surface_from_arrays]).

fn (ArrayMesh) surface_find_by_name #

fn (s &ArrayMesh) surface_find_by_name(name string) i64

Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned.

fn (ArrayMesh) surface_set_name #

fn (s &ArrayMesh) surface_set_name(surf_idx i64, name string)

Sets a name for a given surface.

fn (ArrayMesh) surface_get_name #

fn (s &ArrayMesh) surface_get_name(surf_idx i64) string

Gets the name assigned to this surface.

fn (ArrayMesh) regen_normal_maps #

fn (s &ArrayMesh) regen_normal_maps()

Regenerates tangents for each of the [ArrayMesh]'s surfaces.

fn (ArrayMesh) lightmap_unwrap #

fn (s &ArrayMesh) lightmap_unwrap(transform Transform3D, texel_size f64) GDError

Performs a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping.

fn (ArrayMesh) set_custom_aabb #

fn (s &ArrayMesh) set_custom_aabb(aabb AABB)

fn (ArrayMesh) get_custom_aabb #

fn (s &ArrayMesh) get_custom_aabb() AABB

fn (ArrayMesh) set_shadow_mesh #

fn (s &ArrayMesh) set_shadow_mesh(mesh ArrayMesh)

fn (ArrayMesh) get_shadow_mesh #

fn (s &ArrayMesh) get_shadow_mesh() ArrayMesh

struct ArrayMesh_add_surface_from_arrays_Cfg #

@[params]
struct ArrayMesh_add_surface_from_arrays_Cfg {
pub:
	blend_shapes Array
	lods         Dictionary
	flags        MeshArrayFormat
}

Optional parameters for ArrayMesh#add_surface_from_arrays

struct ArrayOccluder3D #

struct ArrayOccluder3D {
	Occluder3D
}

3D polygon shape for use with occlusion culling in [OccluderInstance3D].

fn (ArrayOccluder3D) to_variant #

fn (s &ArrayOccluder3D) to_variant() Variant

fn (ArrayOccluder3D) from_variant #

fn (mut s ArrayOccluder3D) from_variant(variant &Variant)

fn (ArrayOccluder3D) set_arrays #

fn (s &ArrayOccluder3D) set_arrays(vertices PackedVector3Array, indices PackedInt32Array)

Sets [member indices] and [member vertices], while updating the final occluder only once after both values are set.

fn (ArrayOccluder3D) set_vertices #

fn (s &ArrayOccluder3D) set_vertices(vertices PackedVector3Array)

fn (ArrayOccluder3D) set_indices #

fn (s &ArrayOccluder3D) set_indices(indices PackedInt32Array)

struct Array_bsearch_Cfg #

@[params]
struct Array_bsearch_Cfg {
pub:
	before bool
}

struct Array_bsearch_custom_Cfg #

@[params]
struct Array_bsearch_custom_Cfg {
pub:
	before bool
}

struct Array_duplicate_Cfg #

@[params]
struct Array_duplicate_Cfg {
pub:
	deep bool
}

struct Array_duplicate_deep_Cfg #

@[params]
struct Array_duplicate_deep_Cfg {
pub:
	deep_subresources_mode i64 = 1
}

struct Array_find_Cfg #

@[params]
struct Array_find_Cfg {
pub:
	from i64
}

struct Array_find_custom_Cfg #

@[params]
struct Array_find_custom_Cfg {
pub:
	from i64
}

struct Array_reduce_Cfg #

@[params]
struct Array_reduce_Cfg {
pub:
	accum ToVariant
}

struct Array_rfind_Cfg #

@[params]
struct Array_rfind_Cfg {
pub:
	from i64 = -1
}

struct Array_rfind_custom_Cfg #

@[params]
struct Array_rfind_custom_Cfg {
pub:
	from i64 = -1
}

struct Array_slice_Cfg #

@[params]
struct Array_slice_Cfg {
pub:
	end  i64 = 2147483647
	step i64 = 1
	deep bool
}

struct AspectRatioContainer #

struct AspectRatioContainer {
	Container
}

A container that preserves the proportions of its child controls.

fn (AspectRatioContainer) to_variant #

fn (s &AspectRatioContainer) to_variant() Variant

fn (AspectRatioContainer) from_variant #

fn (mut s AspectRatioContainer) from_variant(variant &Variant)

fn (AspectRatioContainer) set_ratio #

fn (s &AspectRatioContainer) set_ratio(ratio f64)

fn (AspectRatioContainer) get_ratio #

fn (s &AspectRatioContainer) get_ratio() f64

fn (AspectRatioContainer) set_stretch_mode #

fn (s &AspectRatioContainer) set_stretch_mode(stretch_mode AspectRatioContainerStretchMode)

fn (AspectRatioContainer) get_stretch_mode #

fn (s &AspectRatioContainer) get_stretch_mode() AspectRatioContainerStretchMode

fn (AspectRatioContainer) set_alignment_horizontal #

fn (s &AspectRatioContainer) set_alignment_horizontal(alignment_horizontal AspectRatioContainerAlignmentMode)

fn (AspectRatioContainer) get_alignment_horizontal #

fn (s &AspectRatioContainer) get_alignment_horizontal() AspectRatioContainerAlignmentMode

fn (AspectRatioContainer) set_alignment_vertical #

fn (s &AspectRatioContainer) set_alignment_vertical(alignment_vertical AspectRatioContainerAlignmentMode)

fn (AspectRatioContainer) get_alignment_vertical #

fn (s &AspectRatioContainer) get_alignment_vertical() AspectRatioContainerAlignmentMode

struct AtlasTexture #

struct AtlasTexture {
	Texture2D
}

A texture that crops out part of another Texture2D.

fn (AtlasTexture) to_variant #

fn (s &AtlasTexture) to_variant() Variant

fn (AtlasTexture) from_variant #

fn (mut s AtlasTexture) from_variant(variant &Variant)

fn (AtlasTexture) set_atlas #

fn (s &AtlasTexture) set_atlas(atlas Texture2D)

fn (AtlasTexture) get_atlas #

fn (s &AtlasTexture) get_atlas() Texture2D

fn (AtlasTexture) set_region #

fn (s &AtlasTexture) set_region(region Rect2)

fn (AtlasTexture) get_region #

fn (s &AtlasTexture) get_region() Rect2

fn (AtlasTexture) set_margin #

fn (s &AtlasTexture) set_margin(margin Rect2)

fn (AtlasTexture) get_margin #

fn (s &AtlasTexture) get_margin() Rect2

fn (AtlasTexture) set_filter_clip #

fn (s &AtlasTexture) set_filter_clip(enable bool)

fn (AtlasTexture) has_filter_clip #

fn (s &AtlasTexture) has_filter_clip() bool

struct AudioBusLayout #

struct AudioBusLayout {
	Resource
}

Stores information about the audio buses.

fn (AudioBusLayout) to_variant #

fn (s &AudioBusLayout) to_variant() Variant

fn (AudioBusLayout) from_variant #

fn (mut s AudioBusLayout) from_variant(variant &Variant)

struct AudioEffect #

struct AudioEffect {
	Resource
}

Base class for audio effect resources.

fn (AudioEffect) to_variant #

fn (s &AudioEffect) to_variant() Variant

fn (AudioEffect) from_variant #

fn (mut s AudioEffect) from_variant(variant &Variant)

fn (AudioEffect) gd_instantiate #

fn (s &AudioEffect) gd_instantiate() AudioEffectInstance

Override this method to customize the [AudioEffectInstance] created when this effect is applied on a bus in the editor's Audio panel, or through [method AudioServer.add_bus_effect].

extends AudioEffect

@export var strength = 4.0

func _instantiate():
var effect = CustomAudioEffectInstance.new()
effect.base = self

return effect

[b]Note:[/b] It is recommended to keep a reference to the original [AudioEffect] in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly.

struct AudioEffectAmplify #

struct AudioEffectAmplify {
	AudioEffect
}

Adds an amplifying audio effect to an audio bus.

fn (AudioEffectAmplify) to_variant #

fn (s &AudioEffectAmplify) to_variant() Variant

fn (AudioEffectAmplify) from_variant #

fn (mut s AudioEffectAmplify) from_variant(variant &Variant)

fn (AudioEffectAmplify) set_volume_db #

fn (s &AudioEffectAmplify) set_volume_db(volume f64)

fn (AudioEffectAmplify) get_volume_db #

fn (s &AudioEffectAmplify) get_volume_db() f64

fn (AudioEffectAmplify) set_volume_linear #

fn (s &AudioEffectAmplify) set_volume_linear(volume f64)

fn (AudioEffectAmplify) get_volume_linear #

fn (s &AudioEffectAmplify) get_volume_linear() f64

struct AudioEffectBandLimitFilter #

struct AudioEffectBandLimitFilter {
	AudioEffectFilter
}

Adds a band limit filter to the audio bus.

fn (AudioEffectBandLimitFilter) to_variant #

fn (s &AudioEffectBandLimitFilter) to_variant() Variant

fn (AudioEffectBandLimitFilter) from_variant #

fn (mut s AudioEffectBandLimitFilter) from_variant(variant &Variant)

struct AudioEffectBandPassFilter #

struct AudioEffectBandPassFilter {
	AudioEffectFilter
}

Adds a band pass filter to the audio bus.

fn (AudioEffectBandPassFilter) to_variant #

fn (s &AudioEffectBandPassFilter) to_variant() Variant

fn (AudioEffectBandPassFilter) from_variant #

fn (mut s AudioEffectBandPassFilter) from_variant(variant &Variant)

struct AudioEffectCapture #

struct AudioEffectCapture {
	AudioEffect
}

Captures audio from an audio bus in real-time.

fn (AudioEffectCapture) to_variant #

fn (s &AudioEffectCapture) to_variant() Variant

fn (AudioEffectCapture) from_variant #

fn (mut s AudioEffectCapture) from_variant(variant &Variant)

fn (AudioEffectCapture) can_get_buffer #

fn (s &AudioEffectCapture) can_get_buffer(frames i64) bool

Returns true if at least [param frames] audio frames are available to read in the internal ring buffer.

fn (AudioEffectCapture) get_buffer #

fn (s &AudioEffectCapture) get_buffer(frames i64) PackedVector2Array

Gets the next [param frames] audio samples from the internal ring buffer. Returns a [PackedVector2Array] containing exactly [param frames] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available. The samples are signed floating-point PCM between -1 and 1. You will have to scale them if you want to use them as 8 or 16-bit integer samples. (v = 0x7fff * samples[0].x)

fn (AudioEffectCapture) clear_buffer #

fn (s &AudioEffectCapture) clear_buffer()

Clears the internal ring buffer. [b]Note:[/b] Calling this during a capture can cause the loss of samples which causes popping in the playback.

fn (AudioEffectCapture) set_buffer_length #

fn (s &AudioEffectCapture) set_buffer_length(buffer_length_seconds f64)

fn (AudioEffectCapture) get_buffer_length #

fn (s &AudioEffectCapture) get_buffer_length() f64

fn (AudioEffectCapture) get_frames_available #

fn (s &AudioEffectCapture) get_frames_available() i64

Returns the number of frames available to read using [method get_buffer].

fn (AudioEffectCapture) get_discarded_frames #

fn (s &AudioEffectCapture) get_discarded_frames() i64

Returns the number of audio frames discarded from the audio bus due to full buffer.

fn (AudioEffectCapture) get_buffer_length_frames #

fn (s &AudioEffectCapture) get_buffer_length_frames() i64

Returns the total size of the internal ring buffer in frames.

fn (AudioEffectCapture) get_pushed_frames #

fn (s &AudioEffectCapture) get_pushed_frames() i64

Returns the number of audio frames inserted from the audio bus.

struct AudioEffectChorus #

struct AudioEffectChorus {
	AudioEffect
}

Adds a chorus audio effect.

fn (AudioEffectChorus) to_variant #

fn (s &AudioEffectChorus) to_variant() Variant

fn (AudioEffectChorus) from_variant #

fn (mut s AudioEffectChorus) from_variant(variant &Variant)

fn (AudioEffectChorus) set_voice_count #

fn (s &AudioEffectChorus) set_voice_count(voices i64)

fn (AudioEffectChorus) get_voice_count #

fn (s &AudioEffectChorus) get_voice_count() i64

fn (AudioEffectChorus) set_voice_delay_ms #

fn (s &AudioEffectChorus) set_voice_delay_ms(voice_idx i64, delay_ms f64)

fn (AudioEffectChorus) get_voice_delay_ms #

fn (s &AudioEffectChorus) get_voice_delay_ms(voice_idx i64) f64

fn (AudioEffectChorus) set_voice_rate_hz #

fn (s &AudioEffectChorus) set_voice_rate_hz(voice_idx i64, rate_hz f64)

fn (AudioEffectChorus) get_voice_rate_hz #

fn (s &AudioEffectChorus) get_voice_rate_hz(voice_idx i64) f64

fn (AudioEffectChorus) set_voice_depth_ms #

fn (s &AudioEffectChorus) set_voice_depth_ms(voice_idx i64, depth_ms f64)

fn (AudioEffectChorus) get_voice_depth_ms #

fn (s &AudioEffectChorus) get_voice_depth_ms(voice_idx i64) f64

fn (AudioEffectChorus) set_voice_level_db #

fn (s &AudioEffectChorus) set_voice_level_db(voice_idx i64, level_db f64)

fn (AudioEffectChorus) get_voice_level_db #

fn (s &AudioEffectChorus) get_voice_level_db(voice_idx i64) f64

fn (AudioEffectChorus) set_voice_cutoff_hz #

fn (s &AudioEffectChorus) set_voice_cutoff_hz(voice_idx i64, cutoff_hz f64)

fn (AudioEffectChorus) get_voice_cutoff_hz #

fn (s &AudioEffectChorus) get_voice_cutoff_hz(voice_idx i64) f64

fn (AudioEffectChorus) set_voice_pan #

fn (s &AudioEffectChorus) set_voice_pan(voice_idx i64, pan f64)

fn (AudioEffectChorus) get_voice_pan #

fn (s &AudioEffectChorus) get_voice_pan(voice_idx i64) f64

fn (AudioEffectChorus) set_wet #

fn (s &AudioEffectChorus) set_wet(amount f64)

fn (AudioEffectChorus) get_wet #

fn (s &AudioEffectChorus) get_wet() f64

fn (AudioEffectChorus) set_dry #

fn (s &AudioEffectChorus) set_dry(amount f64)

fn (AudioEffectChorus) get_dry #

fn (s &AudioEffectChorus) get_dry() f64

struct AudioEffectCompressor #

struct AudioEffectCompressor {
	AudioEffect
}

Adds a compressor audio effect to an audio bus. Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume.

fn (AudioEffectCompressor) to_variant #

fn (s &AudioEffectCompressor) to_variant() Variant

fn (AudioEffectCompressor) from_variant #

fn (mut s AudioEffectCompressor) from_variant(variant &Variant)

fn (AudioEffectCompressor) set_threshold #

fn (s &AudioEffectCompressor) set_threshold(threshold f64)

fn (AudioEffectCompressor) get_threshold #

fn (s &AudioEffectCompressor) get_threshold() f64

fn (AudioEffectCompressor) set_ratio #

fn (s &AudioEffectCompressor) set_ratio(ratio f64)

fn (AudioEffectCompressor) get_ratio #

fn (s &AudioEffectCompressor) get_ratio() f64

fn (AudioEffectCompressor) set_gain #

fn (s &AudioEffectCompressor) set_gain(gain f64)

fn (AudioEffectCompressor) get_gain #

fn (s &AudioEffectCompressor) get_gain() f64

fn (AudioEffectCompressor) set_attack_us #

fn (s &AudioEffectCompressor) set_attack_us(attack_us f64)

fn (AudioEffectCompressor) get_attack_us #

fn (s &AudioEffectCompressor) get_attack_us() f64

fn (AudioEffectCompressor) set_release_ms #

fn (s &AudioEffectCompressor) set_release_ms(release_ms f64)

fn (AudioEffectCompressor) get_release_ms #

fn (s &AudioEffectCompressor) get_release_ms() f64

fn (AudioEffectCompressor) set_mix #

fn (s &AudioEffectCompressor) set_mix(mix f64)

fn (AudioEffectCompressor) get_mix #

fn (s &AudioEffectCompressor) get_mix() f64

fn (AudioEffectCompressor) set_sidechain #

fn (s &AudioEffectCompressor) set_sidechain(sidechain string)

fn (AudioEffectCompressor) get_sidechain #

fn (s &AudioEffectCompressor) get_sidechain() string

struct AudioEffectDelay #

struct AudioEffectDelay {
	AudioEffect
}

Adds a delay audio effect to an audio bus. Plays input signal back after a period of time. Two tap delay and feedback options.

fn (AudioEffectDelay) to_variant #

fn (s &AudioEffectDelay) to_variant() Variant

fn (AudioEffectDelay) from_variant #

fn (mut s AudioEffectDelay) from_variant(variant &Variant)

fn (AudioEffectDelay) set_dry #

fn (s &AudioEffectDelay) set_dry(amount f64)

fn (AudioEffectDelay) get_dry #

fn (s &AudioEffectDelay) get_dry() f64

fn (AudioEffectDelay) set_tap1_active #

fn (s &AudioEffectDelay) set_tap1_active(amount bool)

fn (AudioEffectDelay) is_tap1_active #

fn (s &AudioEffectDelay) is_tap1_active() bool

fn (AudioEffectDelay) set_tap1_delay_ms #

fn (s &AudioEffectDelay) set_tap1_delay_ms(amount f64)

fn (AudioEffectDelay) get_tap1_delay_ms #

fn (s &AudioEffectDelay) get_tap1_delay_ms() f64

fn (AudioEffectDelay) set_tap1_level_db #

fn (s &AudioEffectDelay) set_tap1_level_db(amount f64)

fn (AudioEffectDelay) get_tap1_level_db #

fn (s &AudioEffectDelay) get_tap1_level_db() f64

fn (AudioEffectDelay) set_tap1_pan #

fn (s &AudioEffectDelay) set_tap1_pan(amount f64)

fn (AudioEffectDelay) get_tap1_pan #

fn (s &AudioEffectDelay) get_tap1_pan() f64

fn (AudioEffectDelay) set_tap2_active #

fn (s &AudioEffectDelay) set_tap2_active(amount bool)

fn (AudioEffectDelay) is_tap2_active #

fn (s &AudioEffectDelay) is_tap2_active() bool

fn (AudioEffectDelay) set_tap2_delay_ms #

fn (s &AudioEffectDelay) set_tap2_delay_ms(amount f64)

fn (AudioEffectDelay) get_tap2_delay_ms #

fn (s &AudioEffectDelay) get_tap2_delay_ms() f64

fn (AudioEffectDelay) set_tap2_level_db #

fn (s &AudioEffectDelay) set_tap2_level_db(amount f64)

fn (AudioEffectDelay) get_tap2_level_db #

fn (s &AudioEffectDelay) get_tap2_level_db() f64

fn (AudioEffectDelay) set_tap2_pan #

fn (s &AudioEffectDelay) set_tap2_pan(amount f64)

fn (AudioEffectDelay) get_tap2_pan #

fn (s &AudioEffectDelay) get_tap2_pan() f64

fn (AudioEffectDelay) set_feedback_active #

fn (s &AudioEffectDelay) set_feedback_active(amount bool)

fn (AudioEffectDelay) is_feedback_active #

fn (s &AudioEffectDelay) is_feedback_active() bool

fn (AudioEffectDelay) set_feedback_delay_ms #

fn (s &AudioEffectDelay) set_feedback_delay_ms(amount f64)

fn (AudioEffectDelay) get_feedback_delay_ms #

fn (s &AudioEffectDelay) get_feedback_delay_ms() f64

fn (AudioEffectDelay) set_feedback_level_db #

fn (s &AudioEffectDelay) set_feedback_level_db(amount f64)

fn (AudioEffectDelay) get_feedback_level_db #

fn (s &AudioEffectDelay) get_feedback_level_db() f64

fn (AudioEffectDelay) set_feedback_lowpass #

fn (s &AudioEffectDelay) set_feedback_lowpass(amount f64)

fn (AudioEffectDelay) get_feedback_lowpass #

fn (s &AudioEffectDelay) get_feedback_lowpass() f64

struct AudioEffectDistortion #

struct AudioEffectDistortion {
	AudioEffect
}

Adds a distortion audio effect to an Audio bus. Modifies the sound to make it distorted.

fn (AudioEffectDistortion) to_variant #

fn (s &AudioEffectDistortion) to_variant() Variant

fn (AudioEffectDistortion) from_variant #

fn (mut s AudioEffectDistortion) from_variant(variant &Variant)

fn (AudioEffectDistortion) set_mode #

fn (s &AudioEffectDistortion) set_mode(mode AudioEffectDistortionMode)

fn (AudioEffectDistortion) get_mode #

fn (s &AudioEffectDistortion) get_mode() AudioEffectDistortionMode

fn (AudioEffectDistortion) set_pre_gain #

fn (s &AudioEffectDistortion) set_pre_gain(pre_gain f64)

fn (AudioEffectDistortion) get_pre_gain #

fn (s &AudioEffectDistortion) get_pre_gain() f64

fn (AudioEffectDistortion) set_keep_hf_hz #

fn (s &AudioEffectDistortion) set_keep_hf_hz(keep_hf_hz f64)

fn (AudioEffectDistortion) get_keep_hf_hz #

fn (s &AudioEffectDistortion) get_keep_hf_hz() f64

fn (AudioEffectDistortion) set_drive #

fn (s &AudioEffectDistortion) set_drive(drive f64)

fn (AudioEffectDistortion) get_drive #

fn (s &AudioEffectDistortion) get_drive() f64

fn (AudioEffectDistortion) set_post_gain #

fn (s &AudioEffectDistortion) set_post_gain(post_gain f64)

fn (AudioEffectDistortion) get_post_gain #

fn (s &AudioEffectDistortion) get_post_gain() f64

struct AudioEffectEQ #

struct AudioEffectEQ {
	AudioEffect
}

Base class for audio equalizers. Gives you control over frequencies. Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs.

fn (AudioEffectEQ) to_variant #

fn (s &AudioEffectEQ) to_variant() Variant

fn (AudioEffectEQ) from_variant #

fn (mut s AudioEffectEQ) from_variant(variant &Variant)

fn (AudioEffectEQ) set_band_gain_db #

fn (s &AudioEffectEQ) set_band_gain_db(band_idx i64, volume_db f64)

Sets band's gain at the specified index, in dB.

fn (AudioEffectEQ) get_band_gain_db #

fn (s &AudioEffectEQ) get_band_gain_db(band_idx i64) f64

Returns the band's gain at the specified index, in dB.

fn (AudioEffectEQ) get_band_count #

fn (s &AudioEffectEQ) get_band_count() i64

Returns the number of bands of the equalizer.

struct AudioEffectEQ10 #

struct AudioEffectEQ10 {
	AudioEffectEQ
}

Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz. Each frequency can be modulated between -60/+24 dB.

fn (AudioEffectEQ10) to_variant #

fn (s &AudioEffectEQ10) to_variant() Variant

fn (AudioEffectEQ10) from_variant #

fn (mut s AudioEffectEQ10) from_variant(variant &Variant)

struct AudioEffectEQ21 #

struct AudioEffectEQ21 {
	AudioEffectEQ
}

Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz. Each frequency can be modulated between -60/+24 dB.

fn (AudioEffectEQ21) to_variant #

fn (s &AudioEffectEQ21) to_variant() Variant

fn (AudioEffectEQ21) from_variant #

fn (mut s AudioEffectEQ21) from_variant(variant &Variant)

struct AudioEffectEQ6 #

struct AudioEffectEQ6 {
	AudioEffectEQ
}

Adds a 6-band equalizer audio effect to an audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz. Each frequency can be modulated between -60/+24 dB.

fn (AudioEffectEQ6) to_variant #

fn (s &AudioEffectEQ6) to_variant() Variant

fn (AudioEffectEQ6) from_variant #

fn (mut s AudioEffectEQ6) from_variant(variant &Variant)

struct AudioEffectFilter #

struct AudioEffectFilter {
	AudioEffect
}

Adds a filter to the audio bus.

fn (AudioEffectFilter) to_variant #

fn (s &AudioEffectFilter) to_variant() Variant

fn (AudioEffectFilter) from_variant #

fn (mut s AudioEffectFilter) from_variant(variant &Variant)

fn (AudioEffectFilter) set_cutoff #

fn (s &AudioEffectFilter) set_cutoff(freq f64)

fn (AudioEffectFilter) get_cutoff #

fn (s &AudioEffectFilter) get_cutoff() f64

fn (AudioEffectFilter) set_resonance #

fn (s &AudioEffectFilter) set_resonance(amount f64)

fn (AudioEffectFilter) get_resonance #

fn (s &AudioEffectFilter) get_resonance() f64

fn (AudioEffectFilter) set_gain #

fn (s &AudioEffectFilter) set_gain(amount f64)

fn (AudioEffectFilter) get_gain #

fn (s &AudioEffectFilter) get_gain() f64

fn (AudioEffectFilter) set_db #

fn (s &AudioEffectFilter) set_db(amount AudioEffectFilterFilterDB)

fn (AudioEffectFilter) get_db #

fn (s &AudioEffectFilter) get_db() AudioEffectFilterFilterDB

struct AudioEffectHardLimiter #

struct AudioEffectHardLimiter {
	AudioEffect
}

Adds a hard limiter audio effect to an Audio bus.

fn (AudioEffectHardLimiter) to_variant #

fn (s &AudioEffectHardLimiter) to_variant() Variant

fn (AudioEffectHardLimiter) from_variant #

fn (mut s AudioEffectHardLimiter) from_variant(variant &Variant)

fn (AudioEffectHardLimiter) set_ceiling_db #

fn (s &AudioEffectHardLimiter) set_ceiling_db(ceiling f64)

fn (AudioEffectHardLimiter) get_ceiling_db #

fn (s &AudioEffectHardLimiter) get_ceiling_db() f64

fn (AudioEffectHardLimiter) set_pre_gain_db #

fn (s &AudioEffectHardLimiter) set_pre_gain_db(p_pre_gain f64)

fn (AudioEffectHardLimiter) get_pre_gain_db #

fn (s &AudioEffectHardLimiter) get_pre_gain_db() f64

fn (AudioEffectHardLimiter) set_release #

fn (s &AudioEffectHardLimiter) set_release(p_release f64)

fn (AudioEffectHardLimiter) get_release #

fn (s &AudioEffectHardLimiter) get_release() f64

struct AudioEffectHighPassFilter #

struct AudioEffectHighPassFilter {
	AudioEffectFilter
}

Adds a high-pass filter to the audio bus.

fn (AudioEffectHighPassFilter) to_variant #

fn (s &AudioEffectHighPassFilter) to_variant() Variant

fn (AudioEffectHighPassFilter) from_variant #

fn (mut s AudioEffectHighPassFilter) from_variant(variant &Variant)

struct AudioEffectHighShelfFilter #

struct AudioEffectHighShelfFilter {
	AudioEffectFilter
}

Adds a high-shelf filter to the audio bus.

fn (AudioEffectHighShelfFilter) to_variant #

fn (s &AudioEffectHighShelfFilter) to_variant() Variant

fn (AudioEffectHighShelfFilter) from_variant #

fn (mut s AudioEffectHighShelfFilter) from_variant(variant &Variant)

struct AudioEffectInstance #

struct AudioEffectInstance {
	RefCounted
}

Manipulates the audio it receives for a given effect.

fn (AudioEffectInstance) to_variant #

fn (s &AudioEffectInstance) to_variant() Variant

fn (AudioEffectInstance) from_variant #

fn (mut s AudioEffectInstance) from_variant(variant &Variant)

fn (AudioEffectInstance) gd_process #

fn (s &AudioEffectInstance) gd_process(src_buffer voidptr, dst_buffer &AudioFrame, frame_count i64)

Called by the [AudioServer] to process this effect. When [method _process_silence] is not overridden or it returns false, this method is called only when the bus is active. [b]Note:[/b] It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it.

fn (AudioEffectInstance) gd_process_silence #

fn (s &AudioEffectInstance) gd_process_silence() bool

Override this method to customize the processing behavior of this effect instance. Should return true to force the [AudioServer] to always call [method _process], even if the bus has been muted or cannot otherwise be heard.

struct AudioEffectLimiter #

struct AudioEffectLimiter {
	AudioEffect
}

Adds a soft-clip limiter audio effect to an Audio bus.

fn (AudioEffectLimiter) to_variant #

fn (s &AudioEffectLimiter) to_variant() Variant

fn (AudioEffectLimiter) from_variant #

fn (mut s AudioEffectLimiter) from_variant(variant &Variant)

fn (AudioEffectLimiter) set_ceiling_db #

fn (s &AudioEffectLimiter) set_ceiling_db(ceiling f64)

fn (AudioEffectLimiter) get_ceiling_db #

fn (s &AudioEffectLimiter) get_ceiling_db() f64

fn (AudioEffectLimiter) set_threshold_db #

fn (s &AudioEffectLimiter) set_threshold_db(threshold f64)

fn (AudioEffectLimiter) get_threshold_db #

fn (s &AudioEffectLimiter) get_threshold_db() f64

fn (AudioEffectLimiter) set_soft_clip_db #

fn (s &AudioEffectLimiter) set_soft_clip_db(soft_clip f64)

fn (AudioEffectLimiter) get_soft_clip_db #

fn (s &AudioEffectLimiter) get_soft_clip_db() f64

fn (AudioEffectLimiter) set_soft_clip_ratio #

fn (s &AudioEffectLimiter) set_soft_clip_ratio(soft_clip f64)

fn (AudioEffectLimiter) get_soft_clip_ratio #

fn (s &AudioEffectLimiter) get_soft_clip_ratio() f64

struct AudioEffectLowPassFilter #

struct AudioEffectLowPassFilter {
	AudioEffectFilter
}

Adds a low-pass filter to the audio bus.

fn (AudioEffectLowPassFilter) to_variant #

fn (s &AudioEffectLowPassFilter) to_variant() Variant

fn (AudioEffectLowPassFilter) from_variant #

fn (mut s AudioEffectLowPassFilter) from_variant(variant &Variant)

struct AudioEffectLowShelfFilter #

struct AudioEffectLowShelfFilter {
	AudioEffectFilter
}

Adds a low-shelf filter to the audio bus.

fn (AudioEffectLowShelfFilter) to_variant #

fn (s &AudioEffectLowShelfFilter) to_variant() Variant

fn (AudioEffectLowShelfFilter) from_variant #

fn (mut s AudioEffectLowShelfFilter) from_variant(variant &Variant)

struct AudioEffectNotchFilter #

struct AudioEffectNotchFilter {
	AudioEffectFilter
}

Adds a notch filter to the Audio bus.

fn (AudioEffectNotchFilter) to_variant #

fn (s &AudioEffectNotchFilter) to_variant() Variant

fn (AudioEffectNotchFilter) from_variant #

fn (mut s AudioEffectNotchFilter) from_variant(variant &Variant)

struct AudioEffectPanner #

struct AudioEffectPanner {
	AudioEffect
}

Adds a panner audio effect to an audio bus. Pans sound left or right.

fn (AudioEffectPanner) to_variant #

fn (s &AudioEffectPanner) to_variant() Variant

fn (AudioEffectPanner) from_variant #

fn (mut s AudioEffectPanner) from_variant(variant &Variant)

fn (AudioEffectPanner) set_pan #

fn (s &AudioEffectPanner) set_pan(cpanume f64)

fn (AudioEffectPanner) get_pan #

fn (s &AudioEffectPanner) get_pan() f64

struct AudioEffectPhaser #

struct AudioEffectPhaser {
	AudioEffect
}

Adds a phaser audio effect to an audio bus. Combines the original signal with a copy that is slightly out of phase with the original.

fn (AudioEffectPhaser) to_variant #

fn (s &AudioEffectPhaser) to_variant() Variant

fn (AudioEffectPhaser) from_variant #

fn (mut s AudioEffectPhaser) from_variant(variant &Variant)

fn (AudioEffectPhaser) set_range_min_hz #

fn (s &AudioEffectPhaser) set_range_min_hz(hz f64)

fn (AudioEffectPhaser) get_range_min_hz #

fn (s &AudioEffectPhaser) get_range_min_hz() f64

fn (AudioEffectPhaser) set_range_max_hz #

fn (s &AudioEffectPhaser) set_range_max_hz(hz f64)

fn (AudioEffectPhaser) get_range_max_hz #

fn (s &AudioEffectPhaser) get_range_max_hz() f64

fn (AudioEffectPhaser) set_rate_hz #

fn (s &AudioEffectPhaser) set_rate_hz(hz f64)

fn (AudioEffectPhaser) get_rate_hz #

fn (s &AudioEffectPhaser) get_rate_hz() f64

fn (AudioEffectPhaser) set_feedback #

fn (s &AudioEffectPhaser) set_feedback(fbk f64)

fn (AudioEffectPhaser) get_feedback #

fn (s &AudioEffectPhaser) get_feedback() f64

fn (AudioEffectPhaser) set_depth #

fn (s &AudioEffectPhaser) set_depth(depth f64)

fn (AudioEffectPhaser) get_depth #

fn (s &AudioEffectPhaser) get_depth() f64

struct AudioEffectPitchShift #

struct AudioEffectPitchShift {
	AudioEffect
}

Adds a pitch-shifting audio effect to an audio bus. Raises or lowers the pitch of original sound.

fn (AudioEffectPitchShift) to_variant #

fn (s &AudioEffectPitchShift) to_variant() Variant

fn (AudioEffectPitchShift) from_variant #

fn (mut s AudioEffectPitchShift) from_variant(variant &Variant)

fn (AudioEffectPitchShift) set_pitch_scale #

fn (s &AudioEffectPitchShift) set_pitch_scale(rate f64)

fn (AudioEffectPitchShift) get_pitch_scale #

fn (s &AudioEffectPitchShift) get_pitch_scale() f64

fn (AudioEffectPitchShift) set_oversampling #

fn (s &AudioEffectPitchShift) set_oversampling(amount i64)

fn (AudioEffectPitchShift) get_oversampling #

fn (s &AudioEffectPitchShift) get_oversampling() i64

fn (AudioEffectPitchShift) set_fft_size #

fn (s &AudioEffectPitchShift) set_fft_size(size AudioEffectPitchShiftFFTSize)

fn (AudioEffectPitchShift) get_fft_size #

fn (s &AudioEffectPitchShift) get_fft_size() AudioEffectPitchShiftFFTSize

struct AudioEffectRecord #

struct AudioEffectRecord {
	AudioEffect
}

Audio effect used for recording the sound from an audio bus.

fn (AudioEffectRecord) to_variant #

fn (s &AudioEffectRecord) to_variant() Variant

fn (AudioEffectRecord) from_variant #

fn (mut s AudioEffectRecord) from_variant(variant &Variant)

fn (AudioEffectRecord) set_recording_active #

fn (s &AudioEffectRecord) set_recording_active(record bool)

If true, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.

fn (AudioEffectRecord) is_recording_active #

fn (s &AudioEffectRecord) is_recording_active() bool

Returns whether the recording is active or not.

fn (AudioEffectRecord) set_format #

fn (s &AudioEffectRecord) set_format(format AudioStreamWAVFormat)

fn (AudioEffectRecord) get_format #

fn (s &AudioEffectRecord) get_format() AudioStreamWAVFormat

fn (AudioEffectRecord) get_recording #

fn (s &AudioEffectRecord) get_recording() AudioStreamWAV

Returns the recorded sample.

struct AudioEffectReverb #

struct AudioEffectReverb {
	AudioEffect
}

Adds a reverberation audio effect to an Audio bus.

fn (AudioEffectReverb) to_variant #

fn (s &AudioEffectReverb) to_variant() Variant

fn (AudioEffectReverb) from_variant #

fn (mut s AudioEffectReverb) from_variant(variant &Variant)

fn (AudioEffectReverb) set_predelay_msec #

fn (s &AudioEffectReverb) set_predelay_msec(msec f64)

fn (AudioEffectReverb) get_predelay_msec #

fn (s &AudioEffectReverb) get_predelay_msec() f64

fn (AudioEffectReverb) set_predelay_feedback #

fn (s &AudioEffectReverb) set_predelay_feedback(feedback f64)

fn (AudioEffectReverb) get_predelay_feedback #

fn (s &AudioEffectReverb) get_predelay_feedback() f64

fn (AudioEffectReverb) set_room_size #

fn (s &AudioEffectReverb) set_room_size(size f64)

fn (AudioEffectReverb) get_room_size #

fn (s &AudioEffectReverb) get_room_size() f64

fn (AudioEffectReverb) set_damping #

fn (s &AudioEffectReverb) set_damping(amount f64)

fn (AudioEffectReverb) get_damping #

fn (s &AudioEffectReverb) get_damping() f64

fn (AudioEffectReverb) set_spread #

fn (s &AudioEffectReverb) set_spread(amount f64)

fn (AudioEffectReverb) get_spread #

fn (s &AudioEffectReverb) get_spread() f64

fn (AudioEffectReverb) set_dry #

fn (s &AudioEffectReverb) set_dry(amount f64)

fn (AudioEffectReverb) get_dry #

fn (s &AudioEffectReverb) get_dry() f64

fn (AudioEffectReverb) set_wet #

fn (s &AudioEffectReverb) set_wet(amount f64)

fn (AudioEffectReverb) get_wet #

fn (s &AudioEffectReverb) get_wet() f64

fn (AudioEffectReverb) set_hpf #

fn (s &AudioEffectReverb) set_hpf(amount f64)

fn (AudioEffectReverb) get_hpf #

fn (s &AudioEffectReverb) get_hpf() f64

struct AudioEffectSpectrumAnalyzer #

struct AudioEffectSpectrumAnalyzer {
	AudioEffect
}

Audio effect that can be used for real-time audio visualizations.

fn (AudioEffectSpectrumAnalyzer) to_variant #

fn (s &AudioEffectSpectrumAnalyzer) to_variant() Variant

fn (AudioEffectSpectrumAnalyzer) from_variant #

fn (mut s AudioEffectSpectrumAnalyzer) from_variant(variant &Variant)

fn (AudioEffectSpectrumAnalyzer) set_buffer_length #

fn (s &AudioEffectSpectrumAnalyzer) set_buffer_length(seconds f64)

fn (AudioEffectSpectrumAnalyzer) get_buffer_length #

fn (s &AudioEffectSpectrumAnalyzer) get_buffer_length() f64

fn (AudioEffectSpectrumAnalyzer) set_tap_back_pos #

fn (s &AudioEffectSpectrumAnalyzer) set_tap_back_pos(seconds f64)

fn (AudioEffectSpectrumAnalyzer) get_tap_back_pos #

fn (s &AudioEffectSpectrumAnalyzer) get_tap_back_pos() f64

fn (AudioEffectSpectrumAnalyzer) set_fft_size #

fn (s &AudioEffectSpectrumAnalyzer) set_fft_size(size AudioEffectSpectrumAnalyzerFFTSize)

fn (AudioEffectSpectrumAnalyzer) get_fft_size #

fn (s &AudioEffectSpectrumAnalyzer) get_fft_size() AudioEffectSpectrumAnalyzerFFTSize

struct AudioEffectSpectrumAnalyzerInstance #

struct AudioEffectSpectrumAnalyzerInstance {
	AudioEffectInstance
}

Queryable instance of an [AudioEffectSpectrumAnalyzer].

fn (AudioEffectSpectrumAnalyzerInstance) to_variant #

fn (s &AudioEffectSpectrumAnalyzerInstance) to_variant() Variant

fn (AudioEffectSpectrumAnalyzerInstance) from_variant #

fn (mut s AudioEffectSpectrumAnalyzerInstance) from_variant(variant &Variant)

fn (AudioEffectSpectrumAnalyzerInstance) get_magnitude_for_frequency_range #

fn (s &AudioEffectSpectrumAnalyzerInstance) get_magnitude_for_frequency_range(from_hz f64, to_hz f64, cfg AudioEffectSpectrumAnalyzerInstance_get_magnitude_for_frequency_range_Cfg) Vector2

Returns the magnitude of the frequencies from [param from_hz] to [param to_hz] in linear energy as a Vector2. The x component of the return value represents the left stereo channel, and y represents the right channel. [param mode] determines how the frequency range will be processed.

struct AudioEffectSpectrumAnalyzerInstance_get_magnitude_for_frequency_range_Cfg #

@[params]
struct AudioEffectSpectrumAnalyzerInstance_get_magnitude_for_frequency_range_Cfg {
pub:
	mode AudioEffectSpectrumAnalyzerInstanceMagnitudeMode = unsafe { AudioEffectSpectrumAnalyzerInstanceMagnitudeMode(1) }
}

Optional parameters for AudioEffectSpectrumAnalyzerInstance#get_magnitude_for_frequency_range

struct AudioEffectStereoEnhance #

struct AudioEffectStereoEnhance {
	AudioEffect
}

An audio effect that can be used to adjust the intensity of stereo panning.

fn (AudioEffectStereoEnhance) to_variant #

fn (s &AudioEffectStereoEnhance) to_variant() Variant

fn (AudioEffectStereoEnhance) from_variant #

fn (mut s AudioEffectStereoEnhance) from_variant(variant &Variant)

fn (AudioEffectStereoEnhance) set_pan_pullout #

fn (s &AudioEffectStereoEnhance) set_pan_pullout(amount f64)

fn (AudioEffectStereoEnhance) get_pan_pullout #

fn (s &AudioEffectStereoEnhance) get_pan_pullout() f64

fn (AudioEffectStereoEnhance) set_time_pullout #

fn (s &AudioEffectStereoEnhance) set_time_pullout(amount f64)

fn (AudioEffectStereoEnhance) get_time_pullout #

fn (s &AudioEffectStereoEnhance) get_time_pullout() f64

fn (AudioEffectStereoEnhance) set_surround #

fn (s &AudioEffectStereoEnhance) set_surround(amount f64)

fn (AudioEffectStereoEnhance) get_surround #

fn (s &AudioEffectStereoEnhance) get_surround() f64

struct AudioFrame #

struct AudioFrame {
pub mut:
	left  f64
	right f64
}

struct AudioListener2D #

struct AudioListener2D {
	Node2D
}

Overrides the location sounds are heard from.

fn (AudioListener2D) to_variant #

fn (s &AudioListener2D) to_variant() Variant

fn (AudioListener2D) from_variant #

fn (mut s AudioListener2D) from_variant(variant &Variant)

fn (AudioListener2D) make_current #

fn (s &AudioListener2D) make_current()

Makes the [AudioListener2D] active, setting it as the hearing point for the sounds. If there is already another active [AudioListener2D], it will be disabled. This method will have no effect if the [AudioListener2D] is not added to [SceneTree].

fn (AudioListener2D) clear_current #

fn (s &AudioListener2D) clear_current()

Disables the [AudioListener2D]. If it's not set as current, this method will have no effect.

fn (AudioListener2D) is_current #

fn (s &AudioListener2D) is_current() bool

Returns true if this [AudioListener2D] is currently active.

struct AudioListener3D #

struct AudioListener3D {
	Node3D
}

Overrides the location sounds are heard from.

fn (AudioListener3D) to_variant #

fn (s &AudioListener3D) to_variant() Variant

fn (AudioListener3D) from_variant #

fn (mut s AudioListener3D) from_variant(variant &Variant)

fn (AudioListener3D) make_current #

fn (s &AudioListener3D) make_current()

Enables the listener. This will override the current camera's listener.

fn (AudioListener3D) clear_current #

fn (s &AudioListener3D) clear_current()

Disables the listener to use the current camera's listener instead.

fn (AudioListener3D) is_current #

fn (s &AudioListener3D) is_current() bool

Returns true if the listener was made current using [method make_current], false otherwise. [b]Note:[/b] There may be more than one AudioListener3D marked as "current" in the scene tree, but only the one that was made current last will be used.

fn (AudioListener3D) get_listener_transform #

fn (s &AudioListener3D) get_listener_transform() Transform3D

Returns the listener's global orthonormalized [Transform3D].

struct AudioSample #

struct AudioSample {
	RefCounted
}

Base class for audio samples.

fn (AudioSample) to_variant #

fn (s &AudioSample) to_variant() Variant

fn (AudioSample) from_variant #

fn (mut s AudioSample) from_variant(variant &Variant)

struct AudioSamplePlayback #

struct AudioSamplePlayback {
	RefCounted
}

Meta class for playing back audio samples.

fn (AudioSamplePlayback) to_variant #

fn (s &AudioSamplePlayback) to_variant() Variant

fn (AudioSamplePlayback) from_variant #

fn (mut s AudioSamplePlayback) from_variant(variant &Variant)

struct AudioServer #

struct AudioServer {
	Object
}

Server interface for low-level audio access.

fn (AudioServer) to_variant #

fn (s &AudioServer) to_variant() Variant

fn (AudioServer) from_variant #

fn (mut s AudioServer) from_variant(variant &Variant)

fn (AudioServer) set_bus_count #

fn (s &AudioServer) set_bus_count(amount i64)

fn (AudioServer) get_bus_count #

fn (s &AudioServer) get_bus_count() i64

fn (AudioServer) remove_bus #

fn (s &AudioServer) remove_bus(index i64)

Removes the bus at index [param index].

fn (AudioServer) add_bus #

fn (s &AudioServer) add_bus(cfg AudioServer_add_bus_Cfg)

Adds a bus at [param at_position].

fn (AudioServer) move_bus #

fn (s &AudioServer) move_bus(index i64, to_index i64)

Moves the bus from index [param index] to index [param to_index].

fn (AudioServer) set_bus_name #

fn (s &AudioServer) set_bus_name(bus_idx i64, name string)

Sets the name of the bus at index [param bus_idx] to [param name].

fn (AudioServer) get_bus_name #

fn (s &AudioServer) get_bus_name(bus_idx i64) string

Returns the name of the bus with the index [param bus_idx].

fn (AudioServer) get_bus_index #

fn (s &AudioServer) get_bus_index(bus_name string) i64

Returns the index of the bus with the name [param bus_name]. Returns -1 if no bus with the specified name exist.

fn (AudioServer) get_bus_channels #

fn (s &AudioServer) get_bus_channels(bus_idx i64) i64

Returns the number of channels of the bus at index [param bus_idx].

fn (AudioServer) set_bus_volume_db #

fn (s &AudioServer) set_bus_volume_db(bus_idx i64, volume_db f64)

Sets the volume in decibels of the bus at index [param bus_idx] to [param volume_db].

fn (AudioServer) get_bus_volume_db #

fn (s &AudioServer) get_bus_volume_db(bus_idx i64) f64

Returns the volume of the bus at index [param bus_idx] in dB.

fn (AudioServer) set_bus_volume_linear #

fn (s &AudioServer) set_bus_volume_linear(bus_idx i64, volume_linear f64)

Sets the volume as a linear value of the bus at index [param bus_idx] to [param volume_linear]. [b]Note:[/b] Using this method is equivalent to calling [method set_bus_volume_db] with the result of [method @GlobalScope.linear_to_db] on a value.

fn (AudioServer) get_bus_volume_linear #

fn (s &AudioServer) get_bus_volume_linear(bus_idx i64) f64

Returns the volume of the bus at index [param bus_idx] as a linear value. [b]Note:[/b] The returned value is equivalent to the result of [method @GlobalScope.db_to_linear] on the result of [method get_bus_volume_db].

fn (AudioServer) set_bus_send #

fn (s &AudioServer) set_bus_send(bus_idx i64, send string)

Connects the output of the bus at [param bus_idx] to the bus named [param send].

fn (AudioServer) get_bus_send #

fn (s &AudioServer) get_bus_send(bus_idx i64) string

Returns the name of the bus that the bus at index [param bus_idx] sends to.

fn (AudioServer) set_bus_solo #

fn (s &AudioServer) set_bus_solo(bus_idx i64, enable bool)

If true, the bus at index [param bus_idx] is in solo mode.

fn (AudioServer) is_bus_solo #

fn (s &AudioServer) is_bus_solo(bus_idx i64) bool

If true, the bus at index [param bus_idx] is in solo mode.

fn (AudioServer) set_bus_mute #

fn (s &AudioServer) set_bus_mute(bus_idx i64, enable bool)

If true, the bus at index [param bus_idx] is muted.

fn (AudioServer) is_bus_mute #

fn (s &AudioServer) is_bus_mute(bus_idx i64) bool

If true, the bus at index [param bus_idx] is muted.

fn (AudioServer) set_bus_bypass_effects #

fn (s &AudioServer) set_bus_bypass_effects(bus_idx i64, enable bool)

If true, the bus at index [param bus_idx] is bypassing effects.

fn (AudioServer) is_bus_bypassing_effects #

fn (s &AudioServer) is_bus_bypassing_effects(bus_idx i64) bool

If true, the bus at index [param bus_idx] is bypassing effects.

fn (AudioServer) add_bus_effect #

fn (s &AudioServer) add_bus_effect(bus_idx i64, effect AudioEffect, cfg AudioServer_add_bus_effect_Cfg)

Adds an [AudioEffect] effect to the bus [param bus_idx] at [param at_position].

fn (AudioServer) remove_bus_effect #

fn (s &AudioServer) remove_bus_effect(bus_idx i64, effect_idx i64)

Removes the effect at index [param effect_idx] from the bus at index [param bus_idx].

fn (AudioServer) get_bus_effect_count #

fn (s &AudioServer) get_bus_effect_count(bus_idx i64) i64

Returns the number of effects on the bus at [param bus_idx].

fn (AudioServer) get_bus_effect #

fn (s &AudioServer) get_bus_effect(bus_idx i64, effect_idx i64) AudioEffect

Returns the [AudioEffect] at position [param effect_idx] in bus [param bus_idx].

fn (AudioServer) get_bus_effect_instance #

fn (s &AudioServer) get_bus_effect_instance(bus_idx i64, effect_idx i64, cfg AudioServer_get_bus_effect_instance_Cfg) AudioEffectInstance

Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel).

fn (AudioServer) swap_bus_effects #

fn (s &AudioServer) swap_bus_effects(bus_idx i64, effect_idx i64, by_effect_idx i64)

Swaps the position of two effects in bus [param bus_idx].

fn (AudioServer) set_bus_effect_enabled #

fn (s &AudioServer) set_bus_effect_enabled(bus_idx i64, effect_idx i64, enabled bool)

If true, the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled.

fn (AudioServer) is_bus_effect_enabled #

fn (s &AudioServer) is_bus_effect_enabled(bus_idx i64, effect_idx i64) bool

If true, the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled.

fn (AudioServer) get_bus_peak_volume_left_db #

fn (s &AudioServer) get_bus_peak_volume_left_db(bus_idx i64, channel i64) f64

Returns the peak volume of the left speaker at bus index [param bus_idx] and channel index [param channel].

fn (AudioServer) get_bus_peak_volume_right_db #

fn (s &AudioServer) get_bus_peak_volume_right_db(bus_idx i64, channel i64) f64

Returns the peak volume of the right speaker at bus index [param bus_idx] and channel index [param channel].

fn (AudioServer) set_playback_speed_scale #

fn (s &AudioServer) set_playback_speed_scale(scale f64)

fn (AudioServer) get_playback_speed_scale #

fn (s &AudioServer) get_playback_speed_scale() f64

fn (AudioServer) gd_lock #

fn (s &AudioServer) gd_lock()

Locks the audio driver's main loop. [b]Note:[/b] Remember to unlock it afterwards.

fn (AudioServer) unlock #

fn (s &AudioServer) unlock()

Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)

fn (AudioServer) get_speaker_mode #

fn (s &AudioServer) get_speaker_mode() AudioServerSpeakerMode

Returns the speaker configuration.

fn (AudioServer) get_mix_rate #

fn (s &AudioServer) get_mix_rate() f64

Returns the sample rate at the output of the [AudioServer].

fn (AudioServer) get_input_mix_rate #

fn (s &AudioServer) get_input_mix_rate() f64

Returns the sample rate at the input of the [AudioServer].

fn (AudioServer) get_driver_name #

fn (s &AudioServer) get_driver_name() string

Returns the name of the current audio driver. The default usually depends on the operating system, but may be overridden via the --audio-driver [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. --headless also automatically sets the audio driver to Dummy. See also [member ProjectSettings.audio/driver/driver].

fn (AudioServer) get_output_device_list #

fn (s &AudioServer) get_output_device_list() PackedStringArray

Returns the names of all audio output devices detected on the system.

fn (AudioServer) get_output_device #

fn (s &AudioServer) get_output_device() string

fn (AudioServer) set_output_device #

fn (s &AudioServer) set_output_device(name string)

fn (AudioServer) get_time_to_next_mix #

fn (s &AudioServer) get_time_to_next_mix() f64

Returns the relative time until the next mix occurs.

fn (AudioServer) get_time_since_last_mix #

fn (s &AudioServer) get_time_since_last_mix() f64

Returns the relative time since the last mix occurred.

fn (AudioServer) get_output_latency #

fn (s &AudioServer) get_output_latency() f64

Returns the audio driver's effective output latency. This is based on [member ProjectSettings.audio/driver/output_latency], but the exact returned value will differ depending on the operating system and audio driver. [b]Note:[/b] This can be expensive; it is not recommended to call [method get_output_latency] every frame.

fn (AudioServer) get_input_device_list #

fn (s &AudioServer) get_input_device_list() PackedStringArray

Returns the names of all audio input devices detected on the system. [b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be true for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.

fn (AudioServer) get_input_device #

fn (s &AudioServer) get_input_device() string

fn (AudioServer) set_input_device #

fn (s &AudioServer) set_input_device(name string)

fn (AudioServer) set_bus_layout #

fn (s &AudioServer) set_bus_layout(bus_layout AudioBusLayout)

Overwrites the currently used [AudioBusLayout].

fn (AudioServer) generate_bus_layout #

fn (s &AudioServer) generate_bus_layout() AudioBusLayout

Generates an [AudioBusLayout] using the available buses and effects.

fn (AudioServer) set_enable_tagging_used_audio_streams #

fn (s &AudioServer) set_enable_tagging_used_audio_streams(enable bool)

If set to true, all instances of [AudioStreamPlayback] will call [method AudioStreamPlayback._tag_used_streams] every mix step. [b]Note:[/b] This is enabled by default in the editor, as it is used by editor plugins for the audio stream previews.

fn (AudioServer) is_stream_registered_as_sample #

fn (s &AudioServer) is_stream_registered_as_sample(stream AudioStream) bool

If true, the stream is registered as a sample. The engine will not have to register it before playing the sample. If false, the stream will have to be registered before playing it. To prevent lag spikes, register the stream as sample with [method register_stream_as_sample].

fn (AudioServer) register_stream_as_sample #

fn (s &AudioServer) register_stream_as_sample(stream AudioStream)

Forces the registration of a stream as a sample. [b]Note:[/b] Lag spikes may occur when calling this method, especially on single-threaded builds. It is suggested to call this method while loading assets, where the lag spike could be masked, instead of registering the sample right before it needs to be played.

struct AudioServer_add_bus_Cfg #

@[params]
struct AudioServer_add_bus_Cfg {
pub:
	at_position i64 = -1
}

Optional parameters for AudioServer#add_bus

struct AudioServer_add_bus_effect_Cfg #

@[params]
struct AudioServer_add_bus_effect_Cfg {
pub:
	at_position i64 = -1
}

Optional parameters for AudioServer#add_bus_effect

struct AudioServer_get_bus_effect_instance_Cfg #

@[params]
struct AudioServer_get_bus_effect_instance_Cfg {
pub:
	channel i64
}

Optional parameters for AudioServer#get_bus_effect_instance

struct AudioStream #

struct AudioStream {
	Resource
}

Base class for audio streams.

fn (AudioStream) to_variant #

fn (s &AudioStream) to_variant() Variant

fn (AudioStream) from_variant #

fn (mut s AudioStream) from_variant(variant &Variant)

fn (AudioStream) gd_instantiate_playback #

fn (s &AudioStream) gd_instantiate_playback() AudioStreamPlayback

Override this method to customize the returned value of [method instantiate_playback]. Should return a new [AudioStreamPlayback] created when the stream is played (such as by an [AudioStreamPlayer]).

fn (AudioStream) gd_get_stream_name #

fn (s &AudioStream) gd_get_stream_name() string

Override this method to customize the name assigned to this audio stream. Unused by the engine.

fn (AudioStream) gd_get_length #

fn (s &AudioStream) gd_get_length() f64

Override this method to customize the returned value of [method get_length]. Should return the length of this audio stream, in seconds.

fn (AudioStream) gd_is_monophonic #

fn (s &AudioStream) gd_is_monophonic() bool

Override this method to customize the returned value of [method is_monophonic]. Should return true if this audio stream only supports one channel.

fn (AudioStream) gd_get_bpm #

fn (s &AudioStream) gd_get_bpm() f64

Overridable method. Should return the tempo of this audio stream, in beats per minute (BPM). Used by the engine to determine the position of every beat. Ideally, the returned value should be based off the stream's sample rate ([member AudioStreamWAV.mix_rate], for example).

fn (AudioStream) gd_get_beat_count #

fn (s &AudioStream) gd_get_beat_count() i64

Overridable method. Should return the total number of beats of this audio stream. Used by the engine to determine the position of every beat. Ideally, the returned value should be based off the stream's sample rate ([member AudioStreamWAV.mix_rate], for example).

fn (AudioStream) gd_get_tags #

fn (s &AudioStream) gd_get_tags() Dictionary

Override this method to customize the tags for this audio stream. Should return a [Dictionary] of strings with the tag as the key and its content as the value. Commonly used tags include title, artist, album, tracknumber, and date.

fn (AudioStream) gd_get_parameter_list #

fn (s &AudioStream) gd_get_parameter_list() Array

Return the controllable parameters of this stream. This array contains dictionaries with a property info description format (see [method Object.get_property_list]). Additionally, the default value for this parameter must be added tho each dictionary in "default_value" field.

fn (AudioStream) gd_has_loop #

fn (s &AudioStream) gd_has_loop() bool

Override this method to return true if this stream has a loop.

fn (AudioStream) gd_get_bar_beats #

fn (s &AudioStream) gd_get_bar_beats() i64

Override this method to return the bar beats of this stream.

fn (AudioStream) get_length #

fn (s &AudioStream) get_length() f64

Returns the length of the audio stream in seconds. If this stream is an [AudioStreamRandomizer], returns the length of the last played stream. If this stream has an indefinite length (such as for [AudioStreamGenerator] and [AudioStreamMicrophone]), returns 0.0.

fn (AudioStream) is_monophonic #

fn (s &AudioStream) is_monophonic() bool

Returns true if this audio stream only supports one channel ([i]monophony[/i]), or false if the audio stream supports two or more channels ([i]polyphony[/i]).

fn (AudioStream) instantiate_playback #

fn (s &AudioStream) instantiate_playback() AudioStreamPlayback

Returns a newly created [AudioStreamPlayback] intended to play this audio stream. Useful for when you want to extend [method _instantiate_playback] but call [method instantiate_playback] from an internally held AudioStream subresource. An example of this can be found in the source code for AudioStreamRandomPitch::instantiate_playback.

fn (AudioStream) can_be_sampled #

fn (s &AudioStream) can_be_sampled() bool

Returns if the current [AudioStream] can be used as a sample. Only static streams can be sampled.

fn (AudioStream) generate_sample #

fn (s &AudioStream) generate_sample() AudioSample

Generates an [AudioSample] based on the current stream.

fn (AudioStream) is_meta_stream #

fn (s &AudioStream) is_meta_stream() bool

Returns true if the stream is a collection of other streams, false otherwise.

struct AudioStreamGenerator #

struct AudioStreamGenerator {
	AudioStream
}

An audio stream with utilities for procedural sound generation.

fn (AudioStreamGenerator) to_variant #

fn (s &AudioStreamGenerator) to_variant() Variant

fn (AudioStreamGenerator) from_variant #

fn (mut s AudioStreamGenerator) from_variant(variant &Variant)

fn (AudioStreamGenerator) set_mix_rate #

fn (s &AudioStreamGenerator) set_mix_rate(hz f64)

fn (AudioStreamGenerator) get_mix_rate #

fn (s &AudioStreamGenerator) get_mix_rate() f64

fn (AudioStreamGenerator) set_mix_rate_mode #

fn (s &AudioStreamGenerator) set_mix_rate_mode(mode AudioStreamGeneratorMixRate)

fn (AudioStreamGenerator) get_mix_rate_mode #

fn (s &AudioStreamGenerator) get_mix_rate_mode() AudioStreamGeneratorMixRate

fn (AudioStreamGenerator) set_buffer_length #

fn (s &AudioStreamGenerator) set_buffer_length(seconds f64)

fn (AudioStreamGenerator) get_buffer_length #

fn (s &AudioStreamGenerator) get_buffer_length() f64

struct AudioStreamGeneratorPlayback #

struct AudioStreamGeneratorPlayback {
	AudioStreamPlaybackResampled
}

Plays back audio generated using [AudioStreamGenerator].

fn (AudioStreamGeneratorPlayback) to_variant #

fn (s &AudioStreamGeneratorPlayback) to_variant() Variant

fn (AudioStreamGeneratorPlayback) from_variant #

fn (mut s AudioStreamGeneratorPlayback) from_variant(variant &Variant)

fn (AudioStreamGeneratorPlayback) push_frame #

fn (s &AudioStreamGeneratorPlayback) push_frame(frame Vector2) bool

Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDExtension, but [method push_frame] may be [i]more[/i] efficient in GDScript.

fn (AudioStreamGeneratorPlayback) can_push_buffer #

fn (s &AudioStreamGeneratorPlayback) can_push_buffer(amount i64) bool

Returns true if a buffer of the size [param amount] can be pushed to the audio sample data buffer without overflowing it, false otherwise.

fn (AudioStreamGeneratorPlayback) push_buffer #

fn (s &AudioStreamGeneratorPlayback) push_buffer(frames PackedVector2Array) bool

Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDExtension, but [method push_buffer] may be [i]less[/i] efficient in GDScript.

fn (AudioStreamGeneratorPlayback) get_frames_available #

fn (s &AudioStreamGeneratorPlayback) get_frames_available() i64

Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is 0, the buffer is full.

fn (AudioStreamGeneratorPlayback) get_skips #

fn (s &AudioStreamGeneratorPlayback) get_skips() i64

Returns the number of times the playback skipped due to a buffer underrun in the audio sample data. This value is reset at the start of the playback.

fn (AudioStreamGeneratorPlayback) clear_buffer #

fn (s &AudioStreamGeneratorPlayback) clear_buffer()

Clears the audio sample data buffer.

struct AudioStreamInteractive #

struct AudioStreamInteractive {
	AudioStream
}

Audio stream that can playback music interactively, combining clips and a transition table.

fn (AudioStreamInteractive) to_variant #

fn (s &AudioStreamInteractive) to_variant() Variant

fn (AudioStreamInteractive) from_variant #

fn (mut s AudioStreamInteractive) from_variant(variant &Variant)

fn (AudioStreamInteractive) set_clip_count #

fn (s &AudioStreamInteractive) set_clip_count(clip_count i64)

fn (AudioStreamInteractive) get_clip_count #

fn (s &AudioStreamInteractive) get_clip_count() i64

fn (AudioStreamInteractive) set_initial_clip #

fn (s &AudioStreamInteractive) set_initial_clip(clip_index i64)

fn (AudioStreamInteractive) get_initial_clip #

fn (s &AudioStreamInteractive) get_initial_clip() i64

fn (AudioStreamInteractive) set_clip_name #

fn (s &AudioStreamInteractive) set_clip_name(clip_index i64, name string)

Set the name of the current clip (for easier identification).

fn (AudioStreamInteractive) get_clip_name #

fn (s &AudioStreamInteractive) get_clip_name(clip_index i64) string

Return the name of a clip.

fn (AudioStreamInteractive) set_clip_stream #

fn (s &AudioStreamInteractive) set_clip_stream(clip_index i64, stream AudioStream)

Set the [AudioStream] associated with the current clip.

fn (AudioStreamInteractive) get_clip_stream #

fn (s &AudioStreamInteractive) get_clip_stream(clip_index i64) AudioStream

Return the [AudioStream] associated with a clip.

fn (AudioStreamInteractive) set_clip_auto_advance #

fn (s &AudioStreamInteractive) set_clip_auto_advance(clip_index i64, mode AudioStreamInteractiveAutoAdvanceMode)

Set whether a clip will auto-advance by changing the auto-advance mode.

fn (AudioStreamInteractive) get_clip_auto_advance #

fn (s &AudioStreamInteractive) get_clip_auto_advance(clip_index i64) AudioStreamInteractiveAutoAdvanceMode

Return whether a clip has auto-advance enabled. See [method set_clip_auto_advance].

fn (AudioStreamInteractive) set_clip_auto_advance_next_clip #

fn (s &AudioStreamInteractive) set_clip_auto_advance_next_clip(clip_index i64, auto_advance_next_clip i64)

Set the index of the next clip towards which this clip will auto advance to when finished. If the clip being played loops, then auto-advance will be ignored.

fn (AudioStreamInteractive) get_clip_auto_advance_next_clip #

fn (s &AudioStreamInteractive) get_clip_auto_advance_next_clip(clip_index i64) i64

Return the clip towards which the clip referenced by [param clip_index] will auto-advance to.

fn (AudioStreamInteractive) add_transition #

fn (s &AudioStreamInteractive) add_transition(from_clip i64, to_clip i64, from_time AudioStreamInteractiveTransitionFromTime, to_time AudioStreamInteractiveTransitionToTime, fade_mode AudioStreamInteractiveFadeMode, fade_beats f64, cfg AudioStreamInteractive_add_transition_Cfg)

Add a transition between two clips. Provide the indices of the source and destination clips, or use the [constant CLIP_ANY] constant to indicate that transition happens to/from any clip to this one.* [param from_time] indicates the moment in the current clip the transition will begin after triggered.

  • [param to_time] indicates the time in the next clip that the playback will start from.
  • [param fade_mode] indicates how the fade will happen between clips. If unsure, just use [constant FADE_AUTOMATIC] which uses the most common type of fade for each situation.
  • [param fade_beats] indicates how many beats the fade will take. Using decimals is allowed.
  • [param use_filler_clip] indicates that there will be a filler clip used between the source and destination clips.
  • [param filler_clip] the index of the filler clip.
  • If [param hold_previous] is used, then this clip will be remembered. This can be used together with [constant AUTO_ADVANCE_RETURN_TO_HOLD] to return to this clip after another is done playing.

fn (AudioStreamInteractive) has_transition #

fn (s &AudioStreamInteractive) has_transition(from_clip i64, to_clip i64) bool

Returns true if a given transition exists (was added via [method add_transition]).

fn (AudioStreamInteractive) erase_transition #

fn (s &AudioStreamInteractive) erase_transition(from_clip i64, to_clip i64)

Erase a transition by providing [param from_clip] and [param to_clip] clip indices. [constant CLIP_ANY] can be used for either argument or both.

fn (AudioStreamInteractive) get_transition_list #

fn (s &AudioStreamInteractive) get_transition_list() PackedInt32Array

Return the list of transitions (from, to interleaved).

fn (AudioStreamInteractive) get_transition_from_time #

fn (s &AudioStreamInteractive) get_transition_from_time(from_clip i64, to_clip i64) AudioStreamInteractiveTransitionFromTime

Return the source time position for a transition (see [method add_transition]).

fn (AudioStreamInteractive) get_transition_to_time #

fn (s &AudioStreamInteractive) get_transition_to_time(from_clip i64, to_clip i64) AudioStreamInteractiveTransitionToTime

Return the destination time position for a transition (see [method add_transition]).

fn (AudioStreamInteractive) get_transition_fade_mode #

fn (s &AudioStreamInteractive) get_transition_fade_mode(from_clip i64, to_clip i64) AudioStreamInteractiveFadeMode

Return the mode for a transition (see [method add_transition]).

fn (AudioStreamInteractive) get_transition_fade_beats #

fn (s &AudioStreamInteractive) get_transition_fade_beats(from_clip i64, to_clip i64) f64

Return the time (in beats) for a transition (see [method add_transition]).

fn (AudioStreamInteractive) is_transition_using_filler_clip #

fn (s &AudioStreamInteractive) is_transition_using_filler_clip(from_clip i64, to_clip i64) bool

Return whether a transition uses the [i]filler clip[/i] functionality (see [method add_transition]).

fn (AudioStreamInteractive) get_transition_filler_clip #

fn (s &AudioStreamInteractive) get_transition_filler_clip(from_clip i64, to_clip i64) i64

Return the filler clip for a transition (see [method add_transition]).

fn (AudioStreamInteractive) is_transition_holding_previous #

fn (s &AudioStreamInteractive) is_transition_holding_previous(from_clip i64, to_clip i64) bool

Return whether a transition uses the [i]hold previous[/i] functionality (see [method add_transition]).

struct AudioStreamInteractive_add_transition_Cfg #

@[params]
struct AudioStreamInteractive_add_transition_Cfg {
pub:
	use_filler_clip bool
	filler_clip     i64 = -1
	hold_previous   bool
}

Optional parameters for AudioStreamInteractive#add_transition

struct AudioStreamMP3 #

struct AudioStreamMP3 {
	AudioStream
}

MP3 audio stream driver.

fn (AudioStreamMP3) to_variant #

fn (s &AudioStreamMP3) to_variant() Variant

fn (AudioStreamMP3) from_variant #

fn (mut s AudioStreamMP3) from_variant(variant &Variant)

fn (AudioStreamMP3) set_data #

fn (s &AudioStreamMP3) set_data(data PackedByteArray)

fn (AudioStreamMP3) get_data #

fn (s &AudioStreamMP3) get_data() PackedByteArray

fn (AudioStreamMP3) set_loop #

fn (s &AudioStreamMP3) set_loop(enable bool)

fn (AudioStreamMP3) has_loop #

fn (s &AudioStreamMP3) has_loop() bool

fn (AudioStreamMP3) set_loop_offset #

fn (s &AudioStreamMP3) set_loop_offset(seconds f64)

fn (AudioStreamMP3) get_loop_offset #

fn (s &AudioStreamMP3) get_loop_offset() f64

fn (AudioStreamMP3) set_bpm #

fn (s &AudioStreamMP3) set_bpm(bpm f64)

fn (AudioStreamMP3) get_bpm #

fn (s &AudioStreamMP3) get_bpm() f64

fn (AudioStreamMP3) set_beat_count #

fn (s &AudioStreamMP3) set_beat_count(count i64)

fn (AudioStreamMP3) get_beat_count #

fn (s &AudioStreamMP3) get_beat_count() i64

fn (AudioStreamMP3) set_bar_beats #

fn (s &AudioStreamMP3) set_bar_beats(count i64)

fn (AudioStreamMP3) get_bar_beats #

fn (s &AudioStreamMP3) get_bar_beats() i64

struct AudioStreamMicrophone #

struct AudioStreamMicrophone {
	AudioStream
}

Plays real-time audio input data.

fn (AudioStreamMicrophone) to_variant #

fn (s &AudioStreamMicrophone) to_variant() Variant

fn (AudioStreamMicrophone) from_variant #

fn (mut s AudioStreamMicrophone) from_variant(variant &Variant)

struct AudioStreamOggVorbis #

struct AudioStreamOggVorbis {
	AudioStream
}

A class representing an Ogg Vorbis audio stream.

fn (AudioStreamOggVorbis) to_variant #

fn (s &AudioStreamOggVorbis) to_variant() Variant

fn (AudioStreamOggVorbis) from_variant #

fn (mut s AudioStreamOggVorbis) from_variant(variant &Variant)

fn (AudioStreamOggVorbis) set_packet_sequence #

fn (s &AudioStreamOggVorbis) set_packet_sequence(packet_sequence OggPacketSequence)

fn (AudioStreamOggVorbis) get_packet_sequence #

fn (s &AudioStreamOggVorbis) get_packet_sequence() OggPacketSequence

fn (AudioStreamOggVorbis) set_loop #

fn (s &AudioStreamOggVorbis) set_loop(enable bool)

fn (AudioStreamOggVorbis) has_loop #

fn (s &AudioStreamOggVorbis) has_loop() bool

fn (AudioStreamOggVorbis) set_loop_offset #

fn (s &AudioStreamOggVorbis) set_loop_offset(seconds f64)

fn (AudioStreamOggVorbis) get_loop_offset #

fn (s &AudioStreamOggVorbis) get_loop_offset() f64

fn (AudioStreamOggVorbis) set_bpm #

fn (s &AudioStreamOggVorbis) set_bpm(bpm f64)

fn (AudioStreamOggVorbis) get_bpm #

fn (s &AudioStreamOggVorbis) get_bpm() f64

fn (AudioStreamOggVorbis) set_beat_count #

fn (s &AudioStreamOggVorbis) set_beat_count(count i64)

fn (AudioStreamOggVorbis) get_beat_count #

fn (s &AudioStreamOggVorbis) get_beat_count() i64

fn (AudioStreamOggVorbis) set_bar_beats #

fn (s &AudioStreamOggVorbis) set_bar_beats(count i64)

fn (AudioStreamOggVorbis) get_bar_beats #

fn (s &AudioStreamOggVorbis) get_bar_beats() i64

fn (AudioStreamOggVorbis) set_tags #

fn (s &AudioStreamOggVorbis) set_tags(tags Dictionary)

fn (AudioStreamOggVorbis) get_tags #

fn (s &AudioStreamOggVorbis) get_tags() Dictionary

struct AudioStreamPlayback #

struct AudioStreamPlayback {
	RefCounted
}

Meta class for playing back audio.

fn (AudioStreamPlayback) to_variant #

fn (s &AudioStreamPlayback) to_variant() Variant

fn (AudioStreamPlayback) from_variant #

fn (mut s AudioStreamPlayback) from_variant(variant &Variant)

fn (AudioStreamPlayback) gd_start #

fn (s &AudioStreamPlayback) gd_start(from_pos f64)

Override this method to customize what happens when the playback starts at the given position, such as by calling [method AudioStreamPlayer.play].

fn (AudioStreamPlayback) gd_stop #

fn (s &AudioStreamPlayback) gd_stop()

Override this method to customize what happens when the playback is stopped, such as by calling [method AudioStreamPlayer.stop].

fn (AudioStreamPlayback) gd_is_playing #

fn (s &AudioStreamPlayback) gd_is_playing() bool

Overridable method. Should return true if this playback is active and playing its audio stream.

fn (AudioStreamPlayback) gd_get_loop_count #

fn (s &AudioStreamPlayback) gd_get_loop_count() i64

Overridable method. Should return how many times this audio stream has looped. Most built-in playbacks always return 0.

fn (AudioStreamPlayback) gd_get_playback_position #

fn (s &AudioStreamPlayback) gd_get_playback_position() f64

Overridable method. Should return the current progress along the audio stream, in seconds.

fn (AudioStreamPlayback) gd_seek #

fn (s &AudioStreamPlayback) gd_seek(position f64)

Override this method to customize what happens when seeking this audio stream at the given [param position], such as by calling [method AudioStreamPlayer.seek].

fn (AudioStreamPlayback) gd_mix #

fn (s &AudioStreamPlayback) gd_mix(buffer &AudioFrame, rate_scale f64, frames i64) i64

Override this method to customize how the audio stream is mixed. This method is called even if the playback is not active. [b]Note:[/b] It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it.

fn (AudioStreamPlayback) gd_tag_used_streams #

fn (s &AudioStreamPlayback) gd_tag_used_streams()

Overridable method. Called whenever the audio stream is mixed if the playback is active and [method AudioServer.set_enable_tagging_used_audio_streams] has been set to true. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview.

fn (AudioStreamPlayback) gd_set_parameter #

fn (s &AudioStreamPlayback) gd_set_parameter(name string, value_ ToVariant)

Set the current value of a playback parameter by name (see [method AudioStream._get_parameter_list]).

fn (AudioStreamPlayback) gd_get_parameter #

fn (s &AudioStreamPlayback) gd_get_parameter(name string) Variant

Return the current value of a playback parameter by name (see [method AudioStream._get_parameter_list]).

fn (AudioStreamPlayback) set_sample_playback #

fn (s &AudioStreamPlayback) set_sample_playback(playback_sample AudioSamplePlayback)

Associates [AudioSamplePlayback] to this [AudioStreamPlayback] for playing back the audio sample of this stream.

fn (AudioStreamPlayback) get_sample_playback #

fn (s &AudioStreamPlayback) get_sample_playback() AudioSamplePlayback

Returns the [AudioSamplePlayback] associated with this [AudioStreamPlayback] for playing back the audio sample of this stream.

fn (AudioStreamPlayback) mix_audio #

fn (s &AudioStreamPlayback) mix_audio(rate_scale f64, frames i64) PackedVector2Array

Mixes up to [param frames] of audio from the stream from the current position, at a rate of [param rate_scale], advancing the stream. Returns a [PackedVector2Array] where each element holds the left and right channel volume levels of each frame. [b]Note:[/b] Can return fewer frames than requested, make sure to use the size of the return value.

fn (AudioStreamPlayback) start #

fn (s &AudioStreamPlayback) start(cfg AudioStreamPlayback_start_Cfg)

Starts the stream from the given [param from_pos], in seconds.

fn (AudioStreamPlayback) seek #

fn (s &AudioStreamPlayback) seek(cfg AudioStreamPlayback_seek_Cfg)

Seeks the stream at the given [param time], in seconds.

fn (AudioStreamPlayback) stop #

fn (s &AudioStreamPlayback) stop()

Stops the stream.

fn (AudioStreamPlayback) get_loop_count #

fn (s &AudioStreamPlayback) get_loop_count() i64

Returns the number of times the stream has looped.

fn (AudioStreamPlayback) get_playback_position #

fn (s &AudioStreamPlayback) get_playback_position() f64

Returns the current position in the stream, in seconds.

fn (AudioStreamPlayback) is_playing #

fn (s &AudioStreamPlayback) is_playing() bool

Returns true if the stream is playing.

struct AudioStreamPlaybackInteractive #

struct AudioStreamPlaybackInteractive {
	AudioStreamPlayback
}

Playback component of [AudioStreamInteractive].

fn (AudioStreamPlaybackInteractive) to_variant #

fn (s &AudioStreamPlaybackInteractive) to_variant() Variant

fn (AudioStreamPlaybackInteractive) from_variant #

fn (mut s AudioStreamPlaybackInteractive) from_variant(variant &Variant)

fn (AudioStreamPlaybackInteractive) switch_to_clip_by_name #

fn (s &AudioStreamPlaybackInteractive) switch_to_clip_by_name(clip_name string)

Switch to a clip (by name).

fn (AudioStreamPlaybackInteractive) switch_to_clip #

fn (s &AudioStreamPlaybackInteractive) switch_to_clip(clip_index i64)

Switch to a clip (by index).

fn (AudioStreamPlaybackInteractive) get_current_clip_index #

fn (s &AudioStreamPlaybackInteractive) get_current_clip_index() i64

Return the index of the currently playing clip. You can use this to get the name of the currently playing clip with [method AudioStreamInteractive.get_clip_name]. [b]Example:[/b] Get the currently playing clip name from inside an [AudioStreamPlayer] node. [codeblocks] [gdscript] var playing_clip_name = stream.get_clip_name(get_stream_playback().get_current_clip_index()) [/gdscript] [/codeblocks]

struct AudioStreamPlaybackOggVorbis #

struct AudioStreamPlaybackOggVorbis {
	AudioStreamPlaybackResampled
}

fn (AudioStreamPlaybackOggVorbis) to_variant #

fn (s &AudioStreamPlaybackOggVorbis) to_variant() Variant

fn (AudioStreamPlaybackOggVorbis) from_variant #

fn (mut s AudioStreamPlaybackOggVorbis) from_variant(variant &Variant)

struct AudioStreamPlaybackPlaylist #

struct AudioStreamPlaybackPlaylist {
	AudioStreamPlayback
}

Playback class used for [AudioStreamPlaylist].

fn (AudioStreamPlaybackPlaylist) to_variant #

fn (s &AudioStreamPlaybackPlaylist) to_variant() Variant

fn (AudioStreamPlaybackPlaylist) from_variant #

fn (mut s AudioStreamPlaybackPlaylist) from_variant(variant &Variant)

struct AudioStreamPlaybackPolyphonic #

struct AudioStreamPlaybackPolyphonic {
	AudioStreamPlayback
}

Playback instance for [AudioStreamPolyphonic].

fn (AudioStreamPlaybackPolyphonic) to_variant #

fn (s &AudioStreamPlaybackPolyphonic) to_variant() Variant

fn (AudioStreamPlaybackPolyphonic) from_variant #

fn (mut s AudioStreamPlaybackPolyphonic) from_variant(variant &Variant)

fn (AudioStreamPlaybackPolyphonic) play_stream #

fn (s &AudioStreamPlaybackPolyphonic) play_stream(stream AudioStream, cfg AudioStreamPlaybackPolyphonic_play_stream_Cfg) i64

Play an [AudioStream] at a given offset, volume, pitch scale, playback type, and bus. Playback starts immediately. The return value is a unique integer ID that is associated to this playback stream and which can be used to control it. This ID becomes invalid when the stream ends (if it does not loop), when the [AudioStreamPlaybackPolyphonic] is stopped, or when [method stop_stream] is called. This function returns [constant INVALID_ID] if the amount of streams currently playing equals [member AudioStreamPolyphonic.polyphony]. If you need a higher amount of maximum polyphony, raise this value.

fn (AudioStreamPlaybackPolyphonic) set_stream_volume #

fn (s &AudioStreamPlaybackPolyphonic) set_stream_volume(stream i64, volume_db f64)

Change the stream volume (in db). The [param stream] argument is an integer ID returned by [method play_stream].

fn (AudioStreamPlaybackPolyphonic) set_stream_pitch_scale #

fn (s &AudioStreamPlaybackPolyphonic) set_stream_pitch_scale(stream i64, pitch_scale f64)

Change the stream pitch scale. The [param stream] argument is an integer ID returned by [method play_stream].

fn (AudioStreamPlaybackPolyphonic) is_stream_playing #

fn (s &AudioStreamPlaybackPolyphonic) is_stream_playing(stream i64) bool

Returns true if the stream associated with the given integer ID is still playing. Check [method play_stream] for information on when this ID becomes invalid.

fn (AudioStreamPlaybackPolyphonic) stop_stream #

fn (s &AudioStreamPlaybackPolyphonic) stop_stream(stream i64)

Stop a stream. The [param stream] argument is an integer ID returned by [method play_stream], which becomes invalid after calling this function.

struct AudioStreamPlaybackPolyphonic_play_stream_Cfg #

@[params]
struct AudioStreamPlaybackPolyphonic_play_stream_Cfg {
pub:
	from_offset   f64
	volume_db     f64
	pitch_scale   f64                     = 1.0
	playback_type AudioServerPlaybackType = unsafe { AudioServerPlaybackType(0) }
	bus           string                  = 'Master'
}

Optional parameters for AudioStreamPlaybackPolyphonic#play_stream

struct AudioStreamPlaybackResampled #

struct AudioStreamPlaybackResampled {
	AudioStreamPlayback
}

fn (AudioStreamPlaybackResampled) to_variant #

fn (s &AudioStreamPlaybackResampled) to_variant() Variant

fn (AudioStreamPlaybackResampled) from_variant #

fn (mut s AudioStreamPlaybackResampled) from_variant(variant &Variant)

fn (AudioStreamPlaybackResampled) gd_mix_resampled #

fn (s &AudioStreamPlaybackResampled) gd_mix_resampled(dst_buffer &AudioFrame, frame_count i64) i64

fn (AudioStreamPlaybackResampled) gd_get_stream_sampling_rate #

fn (s &AudioStreamPlaybackResampled) gd_get_stream_sampling_rate() f64

fn (AudioStreamPlaybackResampled) begin_resample #

fn (s &AudioStreamPlaybackResampled) begin_resample()

struct AudioStreamPlaybackSynchronized #

struct AudioStreamPlaybackSynchronized {
	AudioStreamPlayback
}

fn (AudioStreamPlaybackSynchronized) to_variant #

fn (s &AudioStreamPlaybackSynchronized) to_variant() Variant

fn (AudioStreamPlaybackSynchronized) from_variant #

fn (mut s AudioStreamPlaybackSynchronized) from_variant(variant &Variant)

struct AudioStreamPlayback_seek_Cfg #

@[params]
struct AudioStreamPlayback_seek_Cfg {
pub:
	time f64 = 0.0
}

Optional parameters for AudioStreamPlayback#seek

struct AudioStreamPlayback_start_Cfg #

@[params]
struct AudioStreamPlayback_start_Cfg {
pub:
	from_pos f64 = 0.0
}

Optional parameters for AudioStreamPlayback#start

struct AudioStreamPlayer #

struct AudioStreamPlayer {
	Node
}

A node for audio playback.

fn (AudioStreamPlayer) to_variant #

fn (s &AudioStreamPlayer) to_variant() Variant

fn (AudioStreamPlayer) from_variant #

fn (mut s AudioStreamPlayer) from_variant(variant &Variant)

fn (AudioStreamPlayer) set_stream #

fn (s &AudioStreamPlayer) set_stream(stream AudioStream)

fn (AudioStreamPlayer) get_stream #

fn (s &AudioStreamPlayer) get_stream() AudioStream

fn (AudioStreamPlayer) set_volume_db #

fn (s &AudioStreamPlayer) set_volume_db(volume_db f64)

fn (AudioStreamPlayer) get_volume_db #

fn (s &AudioStreamPlayer) get_volume_db() f64

fn (AudioStreamPlayer) set_volume_linear #

fn (s &AudioStreamPlayer) set_volume_linear(volume_linear f64)

fn (AudioStreamPlayer) get_volume_linear #

fn (s &AudioStreamPlayer) get_volume_linear() f64

fn (AudioStreamPlayer) set_pitch_scale #

fn (s &AudioStreamPlayer) set_pitch_scale(pitch_scale f64)

fn (AudioStreamPlayer) get_pitch_scale #

fn (s &AudioStreamPlayer) get_pitch_scale() f64

fn (AudioStreamPlayer) play #

fn (s &AudioStreamPlayer) play(cfg AudioStreamPlayer_play_Cfg)

Plays a sound from the beginning, or the given [param from_position] in seconds.

fn (AudioStreamPlayer) seek #

fn (s &AudioStreamPlayer) seek(to_position f64)

Restarts all sounds to be played from the given [param to_position], in seconds. Does nothing if no sounds are playing.

fn (AudioStreamPlayer) stop #

fn (s &AudioStreamPlayer) stop()

Stops all sounds from this node.

fn (AudioStreamPlayer) is_playing #

fn (s &AudioStreamPlayer) is_playing() bool

fn (AudioStreamPlayer) get_playback_position #

fn (s &AudioStreamPlayer) get_playback_position() f64

Returns the position in the [AudioStream] of the latest sound, in seconds. Returns 0.0 if no sounds are playing. [b]Note:[/b] The position is not always accurate, as the [AudioServer] does not mix audio every processed frame. To get more accurate results, add [method AudioServer.get_time_since_last_mix] to the returned position. [b]Note:[/b] This method always returns 0.0 if the [member stream] is an [AudioStreamInteractive], since it can have multiple clips playing at once.

fn (AudioStreamPlayer) set_bus #

fn (s &AudioStreamPlayer) set_bus(bus string)

fn (AudioStreamPlayer) get_bus #

fn (s &AudioStreamPlayer) get_bus() string

fn (AudioStreamPlayer) set_autoplay #

fn (s &AudioStreamPlayer) set_autoplay(enable bool)

fn (AudioStreamPlayer) is_autoplay_enabled #

fn (s &AudioStreamPlayer) is_autoplay_enabled() bool

fn (AudioStreamPlayer) set_mix_target #

fn (s &AudioStreamPlayer) set_mix_target(mix_target AudioStreamPlayerMixTarget)

fn (AudioStreamPlayer) get_mix_target #

fn (s &AudioStreamPlayer) get_mix_target() AudioStreamPlayerMixTarget

fn (AudioStreamPlayer) set_playing #

fn (s &AudioStreamPlayer) set_playing(enable bool)

fn (AudioStreamPlayer) set_stream_paused #

fn (s &AudioStreamPlayer) set_stream_paused(pause bool)

fn (AudioStreamPlayer) get_stream_paused #

fn (s &AudioStreamPlayer) get_stream_paused() bool

fn (AudioStreamPlayer) set_max_polyphony #

fn (s &AudioStreamPlayer) set_max_polyphony(max_polyphony i64)

fn (AudioStreamPlayer) get_max_polyphony #

fn (s &AudioStreamPlayer) get_max_polyphony() i64

fn (AudioStreamPlayer) has_stream_playback #

fn (s &AudioStreamPlayer) has_stream_playback() bool

Returns true if any sound is active, even if [member stream_paused] is set to true. See also [member playing] and [method get_stream_playback].

fn (AudioStreamPlayer) get_stream_playback #

fn (s &AudioStreamPlayer) get_stream_playback() AudioStreamPlayback

Returns the latest [AudioStreamPlayback] of this node, usually the most recently created by [method play]. If no sounds are playing, this method fails and returns an empty playback.

fn (AudioStreamPlayer) set_playback_type #

fn (s &AudioStreamPlayer) set_playback_type(playback_type AudioServerPlaybackType)

fn (AudioStreamPlayer) get_playback_type #

fn (s &AudioStreamPlayer) get_playback_type() AudioServerPlaybackType

struct AudioStreamPlayer2D #

struct AudioStreamPlayer2D {
	Node2D
}

Plays positional sound in 2D space.

fn (AudioStreamPlayer2D) to_variant #

fn (s &AudioStreamPlayer2D) to_variant() Variant

fn (AudioStreamPlayer2D) from_variant #

fn (mut s AudioStreamPlayer2D) from_variant(variant &Variant)

fn (AudioStreamPlayer2D) set_stream #

fn (s &AudioStreamPlayer2D) set_stream(stream AudioStream)

fn (AudioStreamPlayer2D) get_stream #

fn (s &AudioStreamPlayer2D) get_stream() AudioStream

fn (AudioStreamPlayer2D) set_volume_db #

fn (s &AudioStreamPlayer2D) set_volume_db(volume_db f64)

fn (AudioStreamPlayer2D) get_volume_db #

fn (s &AudioStreamPlayer2D) get_volume_db() f64

fn (AudioStreamPlayer2D) set_volume_linear #

fn (s &AudioStreamPlayer2D) set_volume_linear(volume_linear f64)

fn (AudioStreamPlayer2D) get_volume_linear #

fn (s &AudioStreamPlayer2D) get_volume_linear() f64

fn (AudioStreamPlayer2D) set_pitch_scale #

fn (s &AudioStreamPlayer2D) set_pitch_scale(pitch_scale f64)

fn (AudioStreamPlayer2D) get_pitch_scale #

fn (s &AudioStreamPlayer2D) get_pitch_scale() f64

fn (AudioStreamPlayer2D) play #

fn (s &AudioStreamPlayer2D) play(cfg AudioStreamPlayer2D_play_Cfg)

Queues the audio to play on the next physics frame, from the given position [param from_position], in seconds.

fn (AudioStreamPlayer2D) seek #

fn (s &AudioStreamPlayer2D) seek(to_position f64)

Sets the position from which audio will be played, in seconds.

fn (AudioStreamPlayer2D) stop #

fn (s &AudioStreamPlayer2D) stop()

Stops the audio.

fn (AudioStreamPlayer2D) is_playing #

fn (s &AudioStreamPlayer2D) is_playing() bool

fn (AudioStreamPlayer2D) get_playback_position #

fn (s &AudioStreamPlayer2D) get_playback_position() f64

Returns the position in the [AudioStream].

fn (AudioStreamPlayer2D) set_bus #

fn (s &AudioStreamPlayer2D) set_bus(bus string)

fn (AudioStreamPlayer2D) get_bus #

fn (s &AudioStreamPlayer2D) get_bus() string

fn (AudioStreamPlayer2D) set_autoplay #

fn (s &AudioStreamPlayer2D) set_autoplay(enable bool)

fn (AudioStreamPlayer2D) is_autoplay_enabled #

fn (s &AudioStreamPlayer2D) is_autoplay_enabled() bool

fn (AudioStreamPlayer2D) set_playing #

fn (s &AudioStreamPlayer2D) set_playing(enable bool)

fn (AudioStreamPlayer2D) set_max_distance #

fn (s &AudioStreamPlayer2D) set_max_distance(pixels f64)

fn (AudioStreamPlayer2D) get_max_distance #

fn (s &AudioStreamPlayer2D) get_max_distance() f64

fn (AudioStreamPlayer2D) set_attenuation #

fn (s &AudioStreamPlayer2D) set_attenuation(curve f64)

fn (AudioStreamPlayer2D) get_attenuation #

fn (s &AudioStreamPlayer2D) get_attenuation() f64

fn (AudioStreamPlayer2D) set_area_mask #

fn (s &AudioStreamPlayer2D) set_area_mask(mask i64)

fn (AudioStreamPlayer2D) get_area_mask #

fn (s &AudioStreamPlayer2D) get_area_mask() i64

fn (AudioStreamPlayer2D) set_stream_paused #

fn (s &AudioStreamPlayer2D) set_stream_paused(pause bool)

fn (AudioStreamPlayer2D) get_stream_paused #

fn (s &AudioStreamPlayer2D) get_stream_paused() bool

fn (AudioStreamPlayer2D) set_max_polyphony #

fn (s &AudioStreamPlayer2D) set_max_polyphony(max_polyphony i64)

fn (AudioStreamPlayer2D) get_max_polyphony #

fn (s &AudioStreamPlayer2D) get_max_polyphony() i64

fn (AudioStreamPlayer2D) set_panning_strength #

fn (s &AudioStreamPlayer2D) set_panning_strength(panning_strength f64)

fn (AudioStreamPlayer2D) get_panning_strength #

fn (s &AudioStreamPlayer2D) get_panning_strength() f64

fn (AudioStreamPlayer2D) has_stream_playback #

fn (s &AudioStreamPlayer2D) has_stream_playback() bool

Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] object or not.

fn (AudioStreamPlayer2D) get_stream_playback #

fn (s &AudioStreamPlayer2D) get_stream_playback() AudioStreamPlayback

Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D].

fn (AudioStreamPlayer2D) set_playback_type #

fn (s &AudioStreamPlayer2D) set_playback_type(playback_type AudioServerPlaybackType)

fn (AudioStreamPlayer2D) get_playback_type #

fn (s &AudioStreamPlayer2D) get_playback_type() AudioServerPlaybackType

struct AudioStreamPlayer2D_play_Cfg #

@[params]
struct AudioStreamPlayer2D_play_Cfg {
pub:
	from_position f64 = 0.0
}

Optional parameters for AudioStreamPlayer2D#play

struct AudioStreamPlayer3D #

struct AudioStreamPlayer3D {
	Node3D
}

Plays positional sound in 3D space.

fn (AudioStreamPlayer3D) to_variant #

fn (s &AudioStreamPlayer3D) to_variant() Variant

fn (AudioStreamPlayer3D) from_variant #

fn (mut s AudioStreamPlayer3D) from_variant(variant &Variant)

fn (AudioStreamPlayer3D) set_stream #

fn (s &AudioStreamPlayer3D) set_stream(stream AudioStream)

fn (AudioStreamPlayer3D) get_stream #

fn (s &AudioStreamPlayer3D) get_stream() AudioStream

fn (AudioStreamPlayer3D) set_volume_db #

fn (s &AudioStreamPlayer3D) set_volume_db(volume_db f64)

fn (AudioStreamPlayer3D) get_volume_db #

fn (s &AudioStreamPlayer3D) get_volume_db() f64

fn (AudioStreamPlayer3D) set_volume_linear #

fn (s &AudioStreamPlayer3D) set_volume_linear(volume_linear f64)

fn (AudioStreamPlayer3D) get_volume_linear #

fn (s &AudioStreamPlayer3D) get_volume_linear() f64

fn (AudioStreamPlayer3D) set_unit_size #

fn (s &AudioStreamPlayer3D) set_unit_size(unit_size f64)

fn (AudioStreamPlayer3D) get_unit_size #

fn (s &AudioStreamPlayer3D) get_unit_size() f64

fn (AudioStreamPlayer3D) set_max_db #

fn (s &AudioStreamPlayer3D) set_max_db(max_db f64)

fn (AudioStreamPlayer3D) get_max_db #

fn (s &AudioStreamPlayer3D) get_max_db() f64

fn (AudioStreamPlayer3D) set_pitch_scale #

fn (s &AudioStreamPlayer3D) set_pitch_scale(pitch_scale f64)

fn (AudioStreamPlayer3D) get_pitch_scale #

fn (s &AudioStreamPlayer3D) get_pitch_scale() f64

fn (AudioStreamPlayer3D) play #

fn (s &AudioStreamPlayer3D) play(cfg AudioStreamPlayer3D_play_Cfg)

Queues the audio to play on the next physics frame, from the given position [param from_position], in seconds.

fn (AudioStreamPlayer3D) seek #

fn (s &AudioStreamPlayer3D) seek(to_position f64)

Sets the position from which audio will be played, in seconds.

fn (AudioStreamPlayer3D) stop #

fn (s &AudioStreamPlayer3D) stop()

Stops the audio.

fn (AudioStreamPlayer3D) is_playing #

fn (s &AudioStreamPlayer3D) is_playing() bool

fn (AudioStreamPlayer3D) get_playback_position #

fn (s &AudioStreamPlayer3D) get_playback_position() f64

Returns the position in the [AudioStream].

fn (AudioStreamPlayer3D) set_bus #

fn (s &AudioStreamPlayer3D) set_bus(bus string)

fn (AudioStreamPlayer3D) get_bus #

fn (s &AudioStreamPlayer3D) get_bus() string

fn (AudioStreamPlayer3D) set_autoplay #

fn (s &AudioStreamPlayer3D) set_autoplay(enable bool)

fn (AudioStreamPlayer3D) is_autoplay_enabled #

fn (s &AudioStreamPlayer3D) is_autoplay_enabled() bool

fn (AudioStreamPlayer3D) set_playing #

fn (s &AudioStreamPlayer3D) set_playing(enable bool)

fn (AudioStreamPlayer3D) set_max_distance #

fn (s &AudioStreamPlayer3D) set_max_distance(meters f64)

fn (AudioStreamPlayer3D) get_max_distance #

fn (s &AudioStreamPlayer3D) get_max_distance() f64

fn (AudioStreamPlayer3D) set_area_mask #

fn (s &AudioStreamPlayer3D) set_area_mask(mask i64)

fn (AudioStreamPlayer3D) get_area_mask #

fn (s &AudioStreamPlayer3D) get_area_mask() i64

fn (AudioStreamPlayer3D) set_emission_angle #

fn (s &AudioStreamPlayer3D) set_emission_angle(degrees f64)

fn (AudioStreamPlayer3D) get_emission_angle #

fn (s &AudioStreamPlayer3D) get_emission_angle() f64

fn (AudioStreamPlayer3D) set_emission_angle_enabled #

fn (s &AudioStreamPlayer3D) set_emission_angle_enabled(enabled bool)

fn (AudioStreamPlayer3D) is_emission_angle_enabled #

fn (s &AudioStreamPlayer3D) is_emission_angle_enabled() bool

fn (AudioStreamPlayer3D) set_emission_angle_filter_attenuation_db #

fn (s &AudioStreamPlayer3D) set_emission_angle_filter_attenuation_db(db f64)

fn (AudioStreamPlayer3D) get_emission_angle_filter_attenuation_db #

fn (s &AudioStreamPlayer3D) get_emission_angle_filter_attenuation_db() f64

fn (AudioStreamPlayer3D) set_attenuation_filter_cutoff_hz #

fn (s &AudioStreamPlayer3D) set_attenuation_filter_cutoff_hz(degrees f64)

fn (AudioStreamPlayer3D) get_attenuation_filter_cutoff_hz #

fn (s &AudioStreamPlayer3D) get_attenuation_filter_cutoff_hz() f64

fn (AudioStreamPlayer3D) set_attenuation_filter_db #

fn (s &AudioStreamPlayer3D) set_attenuation_filter_db(db f64)

fn (AudioStreamPlayer3D) get_attenuation_filter_db #

fn (s &AudioStreamPlayer3D) get_attenuation_filter_db() f64

fn (AudioStreamPlayer3D) set_attenuation_model #

fn (s &AudioStreamPlayer3D) set_attenuation_model(model AudioStreamPlayer3DAttenuationModel)

fn (AudioStreamPlayer3D) get_attenuation_model #

fn (s &AudioStreamPlayer3D) get_attenuation_model() AudioStreamPlayer3DAttenuationModel

fn (AudioStreamPlayer3D) set_doppler_tracking #

fn (s &AudioStreamPlayer3D) set_doppler_tracking(mode AudioStreamPlayer3DDopplerTracking)

fn (AudioStreamPlayer3D) get_doppler_tracking #

fn (s &AudioStreamPlayer3D) get_doppler_tracking() AudioStreamPlayer3DDopplerTracking

fn (AudioStreamPlayer3D) set_stream_paused #

fn (s &AudioStreamPlayer3D) set_stream_paused(pause bool)

fn (AudioStreamPlayer3D) get_stream_paused #

fn (s &AudioStreamPlayer3D) get_stream_paused() bool

fn (AudioStreamPlayer3D) set_max_polyphony #

fn (s &AudioStreamPlayer3D) set_max_polyphony(max_polyphony i64)

fn (AudioStreamPlayer3D) get_max_polyphony #

fn (s &AudioStreamPlayer3D) get_max_polyphony() i64

fn (AudioStreamPlayer3D) set_panning_strength #

fn (s &AudioStreamPlayer3D) set_panning_strength(panning_strength f64)

fn (AudioStreamPlayer3D) get_panning_strength #

fn (s &AudioStreamPlayer3D) get_panning_strength() f64

fn (AudioStreamPlayer3D) has_stream_playback #

fn (s &AudioStreamPlayer3D) has_stream_playback() bool

Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] object or not.

fn (AudioStreamPlayer3D) get_stream_playback #

fn (s &AudioStreamPlayer3D) get_stream_playback() AudioStreamPlayback

Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D].

fn (AudioStreamPlayer3D) set_playback_type #

fn (s &AudioStreamPlayer3D) set_playback_type(playback_type AudioServerPlaybackType)

fn (AudioStreamPlayer3D) get_playback_type #

fn (s &AudioStreamPlayer3D) get_playback_type() AudioServerPlaybackType

struct AudioStreamPlayer3D_play_Cfg #

@[params]
struct AudioStreamPlayer3D_play_Cfg {
pub:
	from_position f64 = 0.0
}

Optional parameters for AudioStreamPlayer3D#play

struct AudioStreamPlayer_play_Cfg #

@[params]
struct AudioStreamPlayer_play_Cfg {
pub:
	from_position f64 = 0.0
}

Optional parameters for AudioStreamPlayer#play

struct AudioStreamPlaylist #

struct AudioStreamPlaylist {
	AudioStream
}

[AudioStream] that includes sub-streams and plays them back like a playlist.

fn (AudioStreamPlaylist) to_variant #

fn (s &AudioStreamPlaylist) to_variant() Variant

fn (AudioStreamPlaylist) from_variant #

fn (mut s AudioStreamPlaylist) from_variant(variant &Variant)

fn (AudioStreamPlaylist) set_stream_count #

fn (s &AudioStreamPlaylist) set_stream_count(stream_count i64)

fn (AudioStreamPlaylist) get_stream_count #

fn (s &AudioStreamPlaylist) get_stream_count() i64

fn (AudioStreamPlaylist) get_bpm #

fn (s &AudioStreamPlaylist) get_bpm() f64

Returns the BPM of the playlist, which can vary depending on the clip being played.

fn (AudioStreamPlaylist) set_list_stream #

fn (s &AudioStreamPlaylist) set_list_stream(stream_index i64, audio_stream AudioStream)

Sets the stream at playback position index.

fn (AudioStreamPlaylist) get_list_stream #

fn (s &AudioStreamPlaylist) get_list_stream(stream_index i64) AudioStream

Returns the stream at playback position index.

fn (AudioStreamPlaylist) set_shuffle #

fn (s &AudioStreamPlaylist) set_shuffle(shuffle bool)

fn (AudioStreamPlaylist) get_shuffle #

fn (s &AudioStreamPlaylist) get_shuffle() bool

fn (AudioStreamPlaylist) set_fade_time #

fn (s &AudioStreamPlaylist) set_fade_time(dec f64)

fn (AudioStreamPlaylist) get_fade_time #

fn (s &AudioStreamPlaylist) get_fade_time() f64

fn (AudioStreamPlaylist) set_loop #

fn (s &AudioStreamPlaylist) set_loop(loop bool)

fn (AudioStreamPlaylist) has_loop #

fn (s &AudioStreamPlaylist) has_loop() bool

struct AudioStreamPolyphonic #

struct AudioStreamPolyphonic {
	AudioStream
}

AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player.

fn (AudioStreamPolyphonic) to_variant #

fn (s &AudioStreamPolyphonic) to_variant() Variant

fn (AudioStreamPolyphonic) from_variant #

fn (mut s AudioStreamPolyphonic) from_variant(variant &Variant)

fn (AudioStreamPolyphonic) set_polyphony #

fn (s &AudioStreamPolyphonic) set_polyphony(voices i64)

fn (AudioStreamPolyphonic) get_polyphony #

fn (s &AudioStreamPolyphonic) get_polyphony() i64

struct AudioStreamRandomizer #

struct AudioStreamRandomizer {
	AudioStream
}

Wraps a pool of audio streams with pitch and volume shifting.

fn (AudioStreamRandomizer) to_variant #

fn (s &AudioStreamRandomizer) to_variant() Variant

fn (AudioStreamRandomizer) from_variant #

fn (mut s AudioStreamRandomizer) from_variant(variant &Variant)

fn (AudioStreamRandomizer) add_stream #

fn (s &AudioStreamRandomizer) add_stream(index i64, stream AudioStream, cfg AudioStreamRandomizer_add_stream_Cfg)

Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool.

fn (AudioStreamRandomizer) move_stream #

fn (s &AudioStreamRandomizer) move_stream(index_from i64, index_to i64)

Move a stream from one index to another.

fn (AudioStreamRandomizer) remove_stream #

fn (s &AudioStreamRandomizer) remove_stream(index i64)

Remove the stream at the specified index.

fn (AudioStreamRandomizer) set_stream #

fn (s &AudioStreamRandomizer) set_stream(index i64, stream AudioStream)

Set the AudioStream at the specified index.

fn (AudioStreamRandomizer) get_stream #

fn (s &AudioStreamRandomizer) get_stream(index i64) AudioStream

Returns the stream at the specified index.

fn (AudioStreamRandomizer) set_stream_probability_weight #

fn (s &AudioStreamRandomizer) set_stream_probability_weight(index i64, weight f64)

Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes.

fn (AudioStreamRandomizer) get_stream_probability_weight #

fn (s &AudioStreamRandomizer) get_stream_probability_weight(index i64) f64

Returns the probability weight associated with the stream at the given index.

fn (AudioStreamRandomizer) set_streams_count #

fn (s &AudioStreamRandomizer) set_streams_count(count i64)

fn (AudioStreamRandomizer) get_streams_count #

fn (s &AudioStreamRandomizer) get_streams_count() i64

fn (AudioStreamRandomizer) set_random_pitch #

fn (s &AudioStreamRandomizer) set_random_pitch(scale f64)

fn (AudioStreamRandomizer) get_random_pitch #

fn (s &AudioStreamRandomizer) get_random_pitch() f64

fn (AudioStreamRandomizer) set_random_volume_offset_db #

fn (s &AudioStreamRandomizer) set_random_volume_offset_db(db_offset f64)

fn (AudioStreamRandomizer) get_random_volume_offset_db #

fn (s &AudioStreamRandomizer) get_random_volume_offset_db() f64

fn (AudioStreamRandomizer) set_playback_mode #

fn (s &AudioStreamRandomizer) set_playback_mode(mode AudioStreamRandomizerPlaybackMode)

fn (AudioStreamRandomizer) get_playback_mode #

fn (s &AudioStreamRandomizer) get_playback_mode() AudioStreamRandomizerPlaybackMode

struct AudioStreamRandomizer_add_stream_Cfg #

@[params]
struct AudioStreamRandomizer_add_stream_Cfg {
pub:
	weight f64 = 1.0
}

Optional parameters for AudioStreamRandomizer#add_stream

struct AudioStreamSynchronized #

struct AudioStreamSynchronized {
	AudioStream
}

Stream that can be fitted with sub-streams, which will be played in-sync.

fn (AudioStreamSynchronized) to_variant #

fn (s &AudioStreamSynchronized) to_variant() Variant

fn (AudioStreamSynchronized) from_variant #

fn (mut s AudioStreamSynchronized) from_variant(variant &Variant)

fn (AudioStreamSynchronized) set_stream_count #

fn (s &AudioStreamSynchronized) set_stream_count(stream_count i64)

fn (AudioStreamSynchronized) get_stream_count #

fn (s &AudioStreamSynchronized) get_stream_count() i64

fn (AudioStreamSynchronized) set_sync_stream #

fn (s &AudioStreamSynchronized) set_sync_stream(stream_index i64, audio_stream AudioStream)

Set one of the synchronized streams, by index.

fn (AudioStreamSynchronized) get_sync_stream #

fn (s &AudioStreamSynchronized) get_sync_stream(stream_index i64) AudioStream

Get one of the synchronized streams, by index.

fn (AudioStreamSynchronized) set_sync_stream_volume #

fn (s &AudioStreamSynchronized) set_sync_stream_volume(stream_index i64, volume_db f64)

Set the volume of one of the synchronized streams, by index.

fn (AudioStreamSynchronized) get_sync_stream_volume #

fn (s &AudioStreamSynchronized) get_sync_stream_volume(stream_index i64) f64

Get the volume of one of the synchronized streams, by index.

struct AudioStreamWAV #

struct AudioStreamWAV {
	AudioStream
}

Stores audio data loaded from WAV files.

fn (AudioStreamWAV) to_variant #

fn (s &AudioStreamWAV) to_variant() Variant

fn (AudioStreamWAV) from_variant #

fn (mut s AudioStreamWAV) from_variant(variant &Variant)

fn (AudioStreamWAV) set_data #

fn (s &AudioStreamWAV) set_data(data PackedByteArray)

fn (AudioStreamWAV) get_data #

fn (s &AudioStreamWAV) get_data() PackedByteArray

fn (AudioStreamWAV) set_format #

fn (s &AudioStreamWAV) set_format(format AudioStreamWAVFormat)

fn (AudioStreamWAV) get_format #

fn (s &AudioStreamWAV) get_format() AudioStreamWAVFormat

fn (AudioStreamWAV) set_loop_mode #

fn (s &AudioStreamWAV) set_loop_mode(loop_mode AudioStreamWAVLoopMode)

fn (AudioStreamWAV) get_loop_mode #

fn (s &AudioStreamWAV) get_loop_mode() AudioStreamWAVLoopMode

fn (AudioStreamWAV) set_loop_begin #

fn (s &AudioStreamWAV) set_loop_begin(loop_begin i64)

fn (AudioStreamWAV) get_loop_begin #

fn (s &AudioStreamWAV) get_loop_begin() i64

fn (AudioStreamWAV) set_loop_end #

fn (s &AudioStreamWAV) set_loop_end(loop_end i64)

fn (AudioStreamWAV) get_loop_end #

fn (s &AudioStreamWAV) get_loop_end() i64

fn (AudioStreamWAV) set_mix_rate #

fn (s &AudioStreamWAV) set_mix_rate(mix_rate i64)

fn (AudioStreamWAV) get_mix_rate #

fn (s &AudioStreamWAV) get_mix_rate() i64

fn (AudioStreamWAV) set_stereo #

fn (s &AudioStreamWAV) set_stereo(stereo bool)

fn (AudioStreamWAV) is_stereo #

fn (s &AudioStreamWAV) is_stereo() bool

fn (AudioStreamWAV) set_tags #

fn (s &AudioStreamWAV) set_tags(tags Dictionary)

fn (AudioStreamWAV) get_tags #

fn (s &AudioStreamWAV) get_tags() Dictionary

fn (AudioStreamWAV) save_to_wav #

fn (s &AudioStreamWAV) save_to_wav(path string) GDError

Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM or Quite OK Audio formats can't be saved. [b]Note:[/b] A .wav extension is automatically appended to [param path] if it is missing.

struct AudioStreamWAV_load_from_buffer_Cfg #

@[params]
struct AudioStreamWAV_load_from_buffer_Cfg {
pub:
	options Dictionary
}

Optional parameters for AudioStreamWAV#load_from_buffer

struct AudioStreamWAV_load_from_file_Cfg #

@[params]
struct AudioStreamWAV_load_from_file_Cfg {
pub:
	options Dictionary
}

Optional parameters for AudioStreamWAV#load_from_file

struct BackBufferCopy #

struct BackBufferCopy {
	Node2D
}

A node that copies a region of the screen to a buffer for access in shader code.

fn (BackBufferCopy) to_variant #

fn (s &BackBufferCopy) to_variant() Variant

fn (BackBufferCopy) from_variant #

fn (mut s BackBufferCopy) from_variant(variant &Variant)

fn (BackBufferCopy) set_rect #

fn (s &BackBufferCopy) set_rect(rect Rect2)

fn (BackBufferCopy) get_rect #

fn (s &BackBufferCopy) get_rect() Rect2

fn (BackBufferCopy) set_copy_mode #

fn (s &BackBufferCopy) set_copy_mode(copy_mode BackBufferCopyCopyMode)

fn (BackBufferCopy) get_copy_mode #

fn (s &BackBufferCopy) get_copy_mode() BackBufferCopyCopyMode

struct BaseButton #

struct BaseButton {
	Control
}

Abstract base class for GUI buttons.

fn (BaseButton) to_variant #

fn (s &BaseButton) to_variant() Variant

fn (BaseButton) from_variant #

fn (mut s BaseButton) from_variant(variant &Variant)

fn (BaseButton) gd_pressed #

fn (s &BaseButton) gd_pressed()

Called when the button is pressed. If you need to know the button's pressed state (and [member toggle_mode] is active), use [method _toggled] instead.

fn (BaseButton) gd_toggled #

fn (s &BaseButton) gd_toggled(toggled_on bool)

Called when the button is toggled (only if [member toggle_mode] is active).

fn (BaseButton) set_pressed #

fn (s &BaseButton) set_pressed(pressed bool)

fn (BaseButton) is_pressed #

fn (s &BaseButton) is_pressed() bool

fn (BaseButton) set_pressed_no_signal #

fn (s &BaseButton) set_pressed_no_signal(pressed bool)

Changes the [member button_pressed] state of the button, without emitting [signal toggled]. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if [member toggle_mode] is true. [b]Note:[/b] This method doesn't unpress other buttons in [member button_group].

fn (BaseButton) is_hovered #

fn (s &BaseButton) is_hovered() bool

Returns true if the mouse has entered the button and has not left it yet.

fn (BaseButton) set_toggle_mode #

fn (s &BaseButton) set_toggle_mode(enabled bool)

fn (BaseButton) is_toggle_mode #

fn (s &BaseButton) is_toggle_mode() bool

fn (BaseButton) set_shortcut_in_tooltip #

fn (s &BaseButton) set_shortcut_in_tooltip(enabled bool)

fn (BaseButton) is_shortcut_in_tooltip_enabled #

fn (s &BaseButton) is_shortcut_in_tooltip_enabled() bool

fn (BaseButton) set_disabled #

fn (s &BaseButton) set_disabled(disabled bool)

fn (BaseButton) is_disabled #

fn (s &BaseButton) is_disabled() bool

fn (BaseButton) set_action_mode #

fn (s &BaseButton) set_action_mode(mode BaseButtonActionMode)

fn (BaseButton) get_action_mode #

fn (s &BaseButton) get_action_mode() BaseButtonActionMode

fn (BaseButton) set_button_mask #

fn (s &BaseButton) set_button_mask(mask MouseButtonMask)

fn (BaseButton) get_button_mask #

fn (s &BaseButton) get_button_mask() MouseButtonMask

fn (BaseButton) get_draw_mode #

fn (s &BaseButton) get_draw_mode() BaseButtonDrawMode

Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [enum DrawMode] enum.

fn (BaseButton) set_keep_pressed_outside #

fn (s &BaseButton) set_keep_pressed_outside(enabled bool)

fn (BaseButton) is_keep_pressed_outside #

fn (s &BaseButton) is_keep_pressed_outside() bool

fn (BaseButton) set_shortcut_feedback #

fn (s &BaseButton) set_shortcut_feedback(enabled bool)

fn (BaseButton) is_shortcut_feedback #

fn (s &BaseButton) is_shortcut_feedback() bool

fn (BaseButton) set_shortcut #

fn (s &BaseButton) set_shortcut(shortcut Shortcut)

fn (BaseButton) get_shortcut #

fn (s &BaseButton) get_shortcut() Shortcut

fn (BaseButton) set_button_group #

fn (s &BaseButton) set_button_group(button_group ButtonGroup)

fn (BaseButton) get_button_group #

fn (s &BaseButton) get_button_group() ButtonGroup

struct BaseMaterial3D #

struct BaseMaterial3D {
	Material
}

Abstract base class for defining the 3D rendering properties of meshes.

fn (BaseMaterial3D) to_variant #

fn (s &BaseMaterial3D) to_variant() Variant

fn (BaseMaterial3D) from_variant #

fn (mut s BaseMaterial3D) from_variant(variant &Variant)

fn (BaseMaterial3D) set_albedo #

fn (s &BaseMaterial3D) set_albedo(albedo Color)

fn (BaseMaterial3D) get_albedo #

fn (s &BaseMaterial3D) get_albedo() Color

fn (BaseMaterial3D) set_transparency #

fn (s &BaseMaterial3D) set_transparency(transparency BaseMaterial3DTransparency)

fn (BaseMaterial3D) get_transparency #

fn (s &BaseMaterial3D) get_transparency() BaseMaterial3DTransparency

fn (BaseMaterial3D) set_alpha_antialiasing #

fn (s &BaseMaterial3D) set_alpha_antialiasing(alpha_aa BaseMaterial3DAlphaAntiAliasing)

fn (BaseMaterial3D) get_alpha_antialiasing #

fn (s &BaseMaterial3D) get_alpha_antialiasing() BaseMaterial3DAlphaAntiAliasing

fn (BaseMaterial3D) set_alpha_antialiasing_edge #

fn (s &BaseMaterial3D) set_alpha_antialiasing_edge(edge f64)

fn (BaseMaterial3D) get_alpha_antialiasing_edge #

fn (s &BaseMaterial3D) get_alpha_antialiasing_edge() f64

fn (BaseMaterial3D) set_shading_mode #

fn (s &BaseMaterial3D) set_shading_mode(shading_mode BaseMaterial3DShadingMode)

fn (BaseMaterial3D) get_shading_mode #

fn (s &BaseMaterial3D) get_shading_mode() BaseMaterial3DShadingMode

fn (BaseMaterial3D) set_specular #

fn (s &BaseMaterial3D) set_specular(specular f64)

fn (BaseMaterial3D) get_specular #

fn (s &BaseMaterial3D) get_specular() f64

fn (BaseMaterial3D) set_metallic #

fn (s &BaseMaterial3D) set_metallic(metallic f64)

fn (BaseMaterial3D) get_metallic #

fn (s &BaseMaterial3D) get_metallic() f64

fn (BaseMaterial3D) set_roughness #

fn (s &BaseMaterial3D) set_roughness(roughness f64)

fn (BaseMaterial3D) get_roughness #

fn (s &BaseMaterial3D) get_roughness() f64

fn (BaseMaterial3D) set_emission #

fn (s &BaseMaterial3D) set_emission(emission Color)

fn (BaseMaterial3D) get_emission #

fn (s &BaseMaterial3D) get_emission() Color

fn (BaseMaterial3D) set_emission_energy_multiplier #

fn (s &BaseMaterial3D) set_emission_energy_multiplier(emission_energy_multiplier f64)

fn (BaseMaterial3D) get_emission_energy_multiplier #

fn (s &BaseMaterial3D) get_emission_energy_multiplier() f64

fn (BaseMaterial3D) set_emission_intensity #

fn (s &BaseMaterial3D) set_emission_intensity(emission_energy_multiplier f64)

fn (BaseMaterial3D) get_emission_intensity #

fn (s &BaseMaterial3D) get_emission_intensity() f64

fn (BaseMaterial3D) set_normal_scale #

fn (s &BaseMaterial3D) set_normal_scale(normal_scale f64)

fn (BaseMaterial3D) get_normal_scale #

fn (s &BaseMaterial3D) get_normal_scale() f64

fn (BaseMaterial3D) set_rim #

fn (s &BaseMaterial3D) set_rim(rim f64)

fn (BaseMaterial3D) get_rim #

fn (s &BaseMaterial3D) get_rim() f64

fn (BaseMaterial3D) set_rim_tint #

fn (s &BaseMaterial3D) set_rim_tint(rim_tint f64)

fn (BaseMaterial3D) get_rim_tint #

fn (s &BaseMaterial3D) get_rim_tint() f64

fn (BaseMaterial3D) set_clearcoat #

fn (s &BaseMaterial3D) set_clearcoat(clearcoat f64)

fn (BaseMaterial3D) get_clearcoat #

fn (s &BaseMaterial3D) get_clearcoat() f64

fn (BaseMaterial3D) set_clearcoat_roughness #

fn (s &BaseMaterial3D) set_clearcoat_roughness(clearcoat_roughness f64)

fn (BaseMaterial3D) get_clearcoat_roughness #

fn (s &BaseMaterial3D) get_clearcoat_roughness() f64

fn (BaseMaterial3D) set_anisotropy #

fn (s &BaseMaterial3D) set_anisotropy(anisotropy f64)

fn (BaseMaterial3D) get_anisotropy #

fn (s &BaseMaterial3D) get_anisotropy() f64

fn (BaseMaterial3D) set_heightmap_scale #

fn (s &BaseMaterial3D) set_heightmap_scale(heightmap_scale f64)

fn (BaseMaterial3D) get_heightmap_scale #

fn (s &BaseMaterial3D) get_heightmap_scale() f64

fn (BaseMaterial3D) set_subsurface_scattering_strength #

fn (s &BaseMaterial3D) set_subsurface_scattering_strength(strength f64)

fn (BaseMaterial3D) get_subsurface_scattering_strength #

fn (s &BaseMaterial3D) get_subsurface_scattering_strength() f64

fn (BaseMaterial3D) set_transmittance_color #

fn (s &BaseMaterial3D) set_transmittance_color(color Color)

fn (BaseMaterial3D) get_transmittance_color #

fn (s &BaseMaterial3D) get_transmittance_color() Color

fn (BaseMaterial3D) set_transmittance_depth #

fn (s &BaseMaterial3D) set_transmittance_depth(depth f64)

fn (BaseMaterial3D) get_transmittance_depth #

fn (s &BaseMaterial3D) get_transmittance_depth() f64

fn (BaseMaterial3D) set_transmittance_boost #

fn (s &BaseMaterial3D) set_transmittance_boost(boost f64)

fn (BaseMaterial3D) get_transmittance_boost #

fn (s &BaseMaterial3D) get_transmittance_boost() f64

fn (BaseMaterial3D) set_backlight #

fn (s &BaseMaterial3D) set_backlight(backlight Color)

fn (BaseMaterial3D) get_backlight #

fn (s &BaseMaterial3D) get_backlight() Color

fn (BaseMaterial3D) set_refraction #

fn (s &BaseMaterial3D) set_refraction(refraction f64)

fn (BaseMaterial3D) get_refraction #

fn (s &BaseMaterial3D) get_refraction() f64

fn (BaseMaterial3D) set_point_size #

fn (s &BaseMaterial3D) set_point_size(point_size f64)

fn (BaseMaterial3D) get_point_size #

fn (s &BaseMaterial3D) get_point_size() f64

fn (BaseMaterial3D) set_detail_uv #

fn (s &BaseMaterial3D) set_detail_uv(detail_uv BaseMaterial3DDetailUV)

fn (BaseMaterial3D) get_detail_uv #

fn (s &BaseMaterial3D) get_detail_uv() BaseMaterial3DDetailUV

fn (BaseMaterial3D) set_blend_mode #

fn (s &BaseMaterial3D) set_blend_mode(blend_mode BaseMaterial3DBlendMode)

fn (BaseMaterial3D) get_blend_mode #

fn (s &BaseMaterial3D) get_blend_mode() BaseMaterial3DBlendMode

fn (BaseMaterial3D) set_depth_draw_mode #

fn (s &BaseMaterial3D) set_depth_draw_mode(depth_draw_mode BaseMaterial3DDepthDrawMode)

fn (BaseMaterial3D) get_depth_draw_mode #

fn (s &BaseMaterial3D) get_depth_draw_mode() BaseMaterial3DDepthDrawMode

fn (BaseMaterial3D) set_depth_test #

fn (s &BaseMaterial3D) set_depth_test(depth_test BaseMaterial3DDepthTest)

fn (BaseMaterial3D) get_depth_test #

fn (s &BaseMaterial3D) get_depth_test() BaseMaterial3DDepthTest

fn (BaseMaterial3D) set_cull_mode #

fn (s &BaseMaterial3D) set_cull_mode(cull_mode BaseMaterial3DCullMode)

fn (BaseMaterial3D) get_cull_mode #

fn (s &BaseMaterial3D) get_cull_mode() BaseMaterial3DCullMode

fn (BaseMaterial3D) set_diffuse_mode #

fn (s &BaseMaterial3D) set_diffuse_mode(diffuse_mode BaseMaterial3DDiffuseMode)

fn (BaseMaterial3D) get_diffuse_mode #

fn (s &BaseMaterial3D) get_diffuse_mode() BaseMaterial3DDiffuseMode

fn (BaseMaterial3D) set_specular_mode #

fn (s &BaseMaterial3D) set_specular_mode(specular_mode BaseMaterial3DSpecularMode)

fn (BaseMaterial3D) get_specular_mode #

fn (s &BaseMaterial3D) get_specular_mode() BaseMaterial3DSpecularMode

fn (BaseMaterial3D) set_flag #

fn (s &BaseMaterial3D) set_flag(flag BaseMaterial3DFlags, enable bool)

If true, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to true.

fn (BaseMaterial3D) get_flag #

fn (s &BaseMaterial3D) get_flag(flag BaseMaterial3DFlags) bool

Returns true if the specified flag is enabled.

fn (BaseMaterial3D) set_texture_filter #

fn (s &BaseMaterial3D) set_texture_filter(mode BaseMaterial3DTextureFilter)

fn (BaseMaterial3D) get_texture_filter #

fn (s &BaseMaterial3D) get_texture_filter() BaseMaterial3DTextureFilter

fn (BaseMaterial3D) set_feature #

fn (s &BaseMaterial3D) set_feature(feature BaseMaterial3DFeature, enable bool)

If true, enables the specified [enum Feature]. Many features that are available in [BaseMaterial3D]s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to true.

fn (BaseMaterial3D) get_feature #

fn (s &BaseMaterial3D) get_feature(feature BaseMaterial3DFeature) bool

Returns true, if the specified [enum Feature] is enabled.

fn (BaseMaterial3D) set_texture #

fn (s &BaseMaterial3D) set_texture(param BaseMaterial3DTextureParam, texture Texture2D)

Sets the texture for the slot specified by [param param].

fn (BaseMaterial3D) get_texture #

fn (s &BaseMaterial3D) get_texture(param BaseMaterial3DTextureParam) Texture2D

Returns the [Texture2D] associated with the specified [enum TextureParam].

fn (BaseMaterial3D) set_detail_blend_mode #

fn (s &BaseMaterial3D) set_detail_blend_mode(detail_blend_mode BaseMaterial3DBlendMode)

fn (BaseMaterial3D) get_detail_blend_mode #

fn (s &BaseMaterial3D) get_detail_blend_mode() BaseMaterial3DBlendMode

fn (BaseMaterial3D) set_uv1_scale #

fn (s &BaseMaterial3D) set_uv1_scale(scale Vector3)

fn (BaseMaterial3D) get_uv1_scale #

fn (s &BaseMaterial3D) get_uv1_scale() Vector3

fn (BaseMaterial3D) set_uv1_offset #

fn (s &BaseMaterial3D) set_uv1_offset(offset Vector3)

fn (BaseMaterial3D) get_uv1_offset #

fn (s &BaseMaterial3D) get_uv1_offset() Vector3

fn (BaseMaterial3D) set_uv1_triplanar_blend_sharpness #

fn (s &BaseMaterial3D) set_uv1_triplanar_blend_sharpness(sharpness f64)

fn (BaseMaterial3D) get_uv1_triplanar_blend_sharpness #

fn (s &BaseMaterial3D) get_uv1_triplanar_blend_sharpness() f64

fn (BaseMaterial3D) set_uv2_scale #

fn (s &BaseMaterial3D) set_uv2_scale(scale Vector3)

fn (BaseMaterial3D) get_uv2_scale #

fn (s &BaseMaterial3D) get_uv2_scale() Vector3

fn (BaseMaterial3D) set_uv2_offset #

fn (s &BaseMaterial3D) set_uv2_offset(offset Vector3)

fn (BaseMaterial3D) get_uv2_offset #

fn (s &BaseMaterial3D) get_uv2_offset() Vector3

fn (BaseMaterial3D) set_uv2_triplanar_blend_sharpness #

fn (s &BaseMaterial3D) set_uv2_triplanar_blend_sharpness(sharpness f64)

fn (BaseMaterial3D) get_uv2_triplanar_blend_sharpness #

fn (s &BaseMaterial3D) get_uv2_triplanar_blend_sharpness() f64

fn (BaseMaterial3D) set_billboard_mode #

fn (s &BaseMaterial3D) set_billboard_mode(mode BaseMaterial3DBillboardMode)

fn (BaseMaterial3D) get_billboard_mode #

fn (s &BaseMaterial3D) get_billboard_mode() BaseMaterial3DBillboardMode

fn (BaseMaterial3D) set_particles_anim_h_frames #

fn (s &BaseMaterial3D) set_particles_anim_h_frames(frames i64)

fn (BaseMaterial3D) get_particles_anim_h_frames #

fn (s &BaseMaterial3D) get_particles_anim_h_frames() i64

fn (BaseMaterial3D) set_particles_anim_v_frames #

fn (s &BaseMaterial3D) set_particles_anim_v_frames(frames i64)

fn (BaseMaterial3D) get_particles_anim_v_frames #

fn (s &BaseMaterial3D) get_particles_anim_v_frames() i64

fn (BaseMaterial3D) set_particles_anim_loop #

fn (s &BaseMaterial3D) set_particles_anim_loop(loop bool)

fn (BaseMaterial3D) get_particles_anim_loop #

fn (s &BaseMaterial3D) get_particles_anim_loop() bool

fn (BaseMaterial3D) set_heightmap_deep_parallax #

fn (s &BaseMaterial3D) set_heightmap_deep_parallax(enable bool)

fn (BaseMaterial3D) is_heightmap_deep_parallax_enabled #

fn (s &BaseMaterial3D) is_heightmap_deep_parallax_enabled() bool

fn (BaseMaterial3D) set_heightmap_deep_parallax_min_layers #

fn (s &BaseMaterial3D) set_heightmap_deep_parallax_min_layers(layer i64)

fn (BaseMaterial3D) get_heightmap_deep_parallax_min_layers #

fn (s &BaseMaterial3D) get_heightmap_deep_parallax_min_layers() i64

fn (BaseMaterial3D) set_heightmap_deep_parallax_max_layers #

fn (s &BaseMaterial3D) set_heightmap_deep_parallax_max_layers(layer i64)

fn (BaseMaterial3D) get_heightmap_deep_parallax_max_layers #

fn (s &BaseMaterial3D) get_heightmap_deep_parallax_max_layers() i64

fn (BaseMaterial3D) set_heightmap_deep_parallax_flip_tangent #

fn (s &BaseMaterial3D) set_heightmap_deep_parallax_flip_tangent(flip bool)

fn (BaseMaterial3D) get_heightmap_deep_parallax_flip_tangent #

fn (s &BaseMaterial3D) get_heightmap_deep_parallax_flip_tangent() bool

fn (BaseMaterial3D) set_heightmap_deep_parallax_flip_binormal #

fn (s &BaseMaterial3D) set_heightmap_deep_parallax_flip_binormal(flip bool)

fn (BaseMaterial3D) get_heightmap_deep_parallax_flip_binormal #

fn (s &BaseMaterial3D) get_heightmap_deep_parallax_flip_binormal() bool

fn (BaseMaterial3D) set_grow #

fn (s &BaseMaterial3D) set_grow(amount f64)

fn (BaseMaterial3D) get_grow #

fn (s &BaseMaterial3D) get_grow() f64

fn (BaseMaterial3D) set_emission_operator #

fn (s &BaseMaterial3D) set_emission_operator(operator BaseMaterial3DEmissionOperator)

fn (BaseMaterial3D) get_emission_operator #

fn (s &BaseMaterial3D) get_emission_operator() BaseMaterial3DEmissionOperator

fn (BaseMaterial3D) set_ao_light_affect #

fn (s &BaseMaterial3D) set_ao_light_affect(amount f64)

fn (BaseMaterial3D) get_ao_light_affect #

fn (s &BaseMaterial3D) get_ao_light_affect() f64

fn (BaseMaterial3D) set_alpha_scissor_threshold #

fn (s &BaseMaterial3D) set_alpha_scissor_threshold(threshold f64)

fn (BaseMaterial3D) get_alpha_scissor_threshold #

fn (s &BaseMaterial3D) get_alpha_scissor_threshold() f64

fn (BaseMaterial3D) set_alpha_hash_scale #

fn (s &BaseMaterial3D) set_alpha_hash_scale(threshold f64)

fn (BaseMaterial3D) get_alpha_hash_scale #

fn (s &BaseMaterial3D) get_alpha_hash_scale() f64

fn (BaseMaterial3D) set_grow_enabled #

fn (s &BaseMaterial3D) set_grow_enabled(enable bool)

fn (BaseMaterial3D) is_grow_enabled #

fn (s &BaseMaterial3D) is_grow_enabled() bool

fn (BaseMaterial3D) set_metallic_texture_channel #

fn (s &BaseMaterial3D) set_metallic_texture_channel(channel BaseMaterial3DTextureChannel)

fn (BaseMaterial3D) get_metallic_texture_channel #

fn (s &BaseMaterial3D) get_metallic_texture_channel() BaseMaterial3DTextureChannel

fn (BaseMaterial3D) set_roughness_texture_channel #

fn (s &BaseMaterial3D) set_roughness_texture_channel(channel BaseMaterial3DTextureChannel)

fn (BaseMaterial3D) get_roughness_texture_channel #

fn (s &BaseMaterial3D) get_roughness_texture_channel() BaseMaterial3DTextureChannel

fn (BaseMaterial3D) set_ao_texture_channel #

fn (s &BaseMaterial3D) set_ao_texture_channel(channel BaseMaterial3DTextureChannel)

fn (BaseMaterial3D) get_ao_texture_channel #

fn (s &BaseMaterial3D) get_ao_texture_channel() BaseMaterial3DTextureChannel

fn (BaseMaterial3D) set_refraction_texture_channel #

fn (s &BaseMaterial3D) set_refraction_texture_channel(channel BaseMaterial3DTextureChannel)

fn (BaseMaterial3D) get_refraction_texture_channel #

fn (s &BaseMaterial3D) get_refraction_texture_channel() BaseMaterial3DTextureChannel

fn (BaseMaterial3D) set_proximity_fade_enabled #

fn (s &BaseMaterial3D) set_proximity_fade_enabled(enabled bool)

fn (BaseMaterial3D) is_proximity_fade_enabled #

fn (s &BaseMaterial3D) is_proximity_fade_enabled() bool

fn (BaseMaterial3D) set_proximity_fade_distance #

fn (s &BaseMaterial3D) set_proximity_fade_distance(distance f64)

fn (BaseMaterial3D) get_proximity_fade_distance #

fn (s &BaseMaterial3D) get_proximity_fade_distance() f64

fn (BaseMaterial3D) set_msdf_pixel_range #

fn (s &BaseMaterial3D) set_msdf_pixel_range(range f64)

fn (BaseMaterial3D) get_msdf_pixel_range #

fn (s &BaseMaterial3D) get_msdf_pixel_range() f64

fn (BaseMaterial3D) set_msdf_outline_size #

fn (s &BaseMaterial3D) set_msdf_outline_size(size f64)

fn (BaseMaterial3D) get_msdf_outline_size #

fn (s &BaseMaterial3D) get_msdf_outline_size() f64

fn (BaseMaterial3D) set_distance_fade #

fn (s &BaseMaterial3D) set_distance_fade(mode BaseMaterial3DDistanceFadeMode)

fn (BaseMaterial3D) get_distance_fade #

fn (s &BaseMaterial3D) get_distance_fade() BaseMaterial3DDistanceFadeMode

fn (BaseMaterial3D) set_distance_fade_max_distance #

fn (s &BaseMaterial3D) set_distance_fade_max_distance(distance f64)

fn (BaseMaterial3D) get_distance_fade_max_distance #

fn (s &BaseMaterial3D) get_distance_fade_max_distance() f64

fn (BaseMaterial3D) set_distance_fade_min_distance #

fn (s &BaseMaterial3D) set_distance_fade_min_distance(distance f64)

fn (BaseMaterial3D) get_distance_fade_min_distance #

fn (s &BaseMaterial3D) get_distance_fade_min_distance() f64

fn (BaseMaterial3D) set_z_clip_scale #

fn (s &BaseMaterial3D) set_z_clip_scale(scale f64)

fn (BaseMaterial3D) get_z_clip_scale #

fn (s &BaseMaterial3D) get_z_clip_scale() f64

fn (BaseMaterial3D) set_fov_override #

fn (s &BaseMaterial3D) set_fov_override(scale f64)

fn (BaseMaterial3D) get_fov_override #

fn (s &BaseMaterial3D) get_fov_override() f64

fn (BaseMaterial3D) set_stencil_mode #

fn (s &BaseMaterial3D) set_stencil_mode(stencil_mode BaseMaterial3DStencilMode)

fn (BaseMaterial3D) get_stencil_mode #

fn (s &BaseMaterial3D) get_stencil_mode() BaseMaterial3DStencilMode

fn (BaseMaterial3D) set_stencil_flags #

fn (s &BaseMaterial3D) set_stencil_flags(stencil_flags i64)

fn (BaseMaterial3D) get_stencil_flags #

fn (s &BaseMaterial3D) get_stencil_flags() i64

fn (BaseMaterial3D) set_stencil_compare #

fn (s &BaseMaterial3D) set_stencil_compare(stencil_compare BaseMaterial3DStencilCompare)

fn (BaseMaterial3D) get_stencil_compare #

fn (s &BaseMaterial3D) get_stencil_compare() BaseMaterial3DStencilCompare

fn (BaseMaterial3D) set_stencil_reference #

fn (s &BaseMaterial3D) set_stencil_reference(stencil_reference i64)

fn (BaseMaterial3D) get_stencil_reference #

fn (s &BaseMaterial3D) get_stencil_reference() i64

fn (BaseMaterial3D) set_stencil_effect_color #

fn (s &BaseMaterial3D) set_stencil_effect_color(stencil_color Color)

fn (BaseMaterial3D) get_stencil_effect_color #

fn (s &BaseMaterial3D) get_stencil_effect_color() Color

fn (BaseMaterial3D) set_stencil_effect_outline_thickness #

fn (s &BaseMaterial3D) set_stencil_effect_outline_thickness(stencil_outline_thickness f64)

fn (BaseMaterial3D) get_stencil_effect_outline_thickness #

fn (s &BaseMaterial3D) get_stencil_effect_outline_thickness() f64

struct Basis #

@[packed]
struct Basis {
pub mut:
	// The basis's X axis, and the column `0` of the matrix.
	// On the identity basis, this vector points right ([constant Vector3.RIGHT]).
	x Vector3 // offset 0
	// The basis's Y axis, and the column `1` of the matrix.
	// On the identity basis, this vector points up ([constant Vector3.UP]).
	y Vector3 // offset 12
	// The basis's Z axis, and the column `2` of the matrix.
	// On the identity basis, this vector points back ([constant Vector3.BACK]).
	z Vector3 // offset 24
}

A 3×3 matrix for representing 3D rotation and scale.

The [Basis] built-in [Variant] type is a 3×3 [url=https://en.wikipedia.org/wiki/Matrix_(mathematics)]matrix[/url] used to represent 3D rotation, scale, and shear. It is frequently used within a [Transform3D]. A [Basis] is composed by 3 axis vectors, each representing a column of the matrix: [member x], [member y], and [member z]. The length of each axis ([method Vector3.length]) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted. A [Basis] is:- [b]Orthogonal[/b] if its axes are perpendicular to each other.

  • [b]Normalized[/b] if the length of every axis is 1.0.
  • [b]Uniform[/b] if all axes share the same length (see [method get_scale]).
  • [b]Orthonormal[/b] if it is both orthogonal and normalized, which allows it to only represent rotations (see [method orthonormalized]).
  • [b]Conformal[/b] if it is both orthogonal and uniform, which ensures it is not distorted.For a general introduction, see the [url=$DOCS_URL/tutorials/math/matrices_and_transforms.html]Matrices and transforms[/url] tutorial. [b]Note:[/b] Godot uses a [url=https://en.wikipedia.org/wiki/Right-hand_rule]right-handed coordinate system[/url], which is a common standard. For directions, the convention for built-in types like [Camera3D] is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the [url=$DOCS_URL/tutorials/assets_pipeline/importing_3d_scenes/model_export_considerations.html#d-asset-direction-conventions]3D asset direction conventions[/url] tutorial. [b]Note:[/b] The basis matrices are exposed as [url=https://www.mindcontrol.org/~hplus/graphics/matrix-layout.html]column-major[/url] order, which is the same as OpenGL. However, they are stored internally in row-major order, which is the same as DirectX.

fn (Basis) inverse #

fn (s &Basis) inverse() Basis

Returns the [url=https://en.wikipedia.org/wiki/Invertible_matrix]inverse of this basis's matrix[/url].

fn (Basis) transposed #

fn (s &Basis) transposed() Basis

Returns the transposed version of this basis. This turns the basis matrix's columns into rows, and its rows into columns. [codeblocks] [gdscript] var my_basis = Basis( Vector3(1, 2, 3), Vector3(4, 5, 6), Vector3(7, 8, 9) ) my_basis = my_basis.transposed()

print(my_basis.x) # Prints (1.0, 4.0, 7.0) print(my_basis.y) # Prints (2.0, 5.0, 8.0) print(my_basis.z) # Prints (3.0, 6.0, 9.0) [/gdscript] [csharp] var myBasis = new Basis( new Vector3(1.0f, 2.0f, 3.0f), new Vector3(4.0f, 5.0f, 6.0f), new Vector3(7.0f, 8.0f, 9.0f) ); myBasis = myBasis.Transposed();

GD.Print(myBasis.X); // Prints (1, 4, 7) GD.Print(myBasis.Y); // Prints (2, 5, 8) GD.Print(myBasis.Z); // Prints (3, 6, 9) [/csharp] [/codeblocks]

fn (Basis) orthonormalized #

fn (s &Basis) orthonormalized() Basis

Returns the orthonormalized version of this basis. An orthonormal basis is both [i]orthogonal[/i] (the axes are perpendicular to each other) and [i]normalized[/i] (the axes have a length of 1.0), which also means it can only represent a rotation. It is often useful to call this method to avoid rounding errors on a rotating basis: [codeblocks] [gdscript]# Rotate this Node3D every frame.func _process(delta): basis = basis.rotated(Vector3.UP, TAU * delta) basis = basis.rotated(Vector3.RIGHT, TAU * delta) basis = basis.orthonormalized() [/gdscript] [csharp] // Rotate this Node3D every frame. public override void _Process(double delta) { Basis = Basis.Rotated(Vector3.Up, Mathf.Tau * (float)delta) .Rotated(Vector3.Right, Mathf.Tau * (float)delta) .Orthonormalized(); } [/csharp] [/codeblocks]

fn (Basis) determinant #

fn (s &Basis) determinant() f64

Returns the [url=https://en.wikipedia.org/wiki/Determinant]determinant[/url] of this basis's matrix. For advanced math, this number can be used to determine a few attributes:- If the determinant is exactly 0.0, the basis is not invertible (see [method inverse]).

  • If the determinant is a negative number, the basis represents a negative scale.[b]Note:[/b] If the basis's scale is the same for every axis, its determinant is always that scale by the power of 2.

fn (Basis) rotated #

fn (s &Basis) rotated(axis Vector3, angle f64) Basis

Returns a copy of this basis rotated around the given [param axis] by the given [param angle] (in radians). The [param axis] must be a normalized vector (see [method Vector3.normalized]). If [param angle] is positive, the basis is rotated counter-clockwise around the axis. [codeblocks] [gdscript] var my_basis = Basis.IDENTITY var angle = TAU / 2

my_basis = my_basis.rotated(Vector3.UP, angle) # Rotate around the up axis (yaw). my_basis = my_basis.rotated(Vector3.RIGHT, angle) # Rotate around the right axis (pitch). my_basis = my_basis.rotated(Vector3.BACK, angle) # Rotate around the back axis (roll). [/gdscript] [csharp] var myBasis = Basis.Identity; var angle = Mathf.Tau / 2.0f;

myBasis = myBasis.Rotated(Vector3.Up, angle); // Rotate around the up axis (yaw). myBasis = myBasis.Rotated(Vector3.Right, angle); // Rotate around the right axis (pitch). myBasis = myBasis.Rotated(Vector3.Back, angle); // Rotate around the back axis (roll). [/csharp] [/codeblocks]

fn (Basis) scaled #

fn (s &Basis) scaled(scale Vector3) Basis

Returns this basis with each axis's components scaled by the given [param scale]'s components. The basis matrix's rows are multiplied by [param scale]'s components. This operation is a global scale (relative to the parent). [codeblocks] [gdscript] var my_basis = Basis( Vector3(1, 1, 1), Vector3(2, 2, 2), Vector3(3, 3, 3) ) my_basis = my_basis.scaled(Vector3(0, 2, -2))

print(my_basis.x) # Prints (0.0, 2.0, -2.0) print(my_basis.y) # Prints (0.0, 4.0, -4.0) print(my_basis.z) # Prints (0.0, 6.0, -6.0) [/gdscript] [csharp] var myBasis = new Basis( new Vector3(1.0f, 1.0f, 1.0f), new Vector3(2.0f, 2.0f, 2.0f), new Vector3(3.0f, 3.0f, 3.0f) ); myBasis = myBasis.Scaled(new Vector3(0.0f, 2.0f, -2.0f));

GD.Print(myBasis.X); // Prints (0, 2, -2) GD.Print(myBasis.Y); // Prints (0, 4, -4) GD.Print(myBasis.Z); // Prints (0, 6, -6) [/csharp] [/codeblocks]

fn (Basis) scaled_local #

fn (s &Basis) scaled_local(scale Vector3) Basis

Returns this basis with each axis scaled by the corresponding component in the given [param scale]. The basis matrix's columns are multiplied by [param scale]'s components. This operation is a local scale (relative to self). [codeblocks] [gdscript] var my_basis = Basis( Vector3(1, 1, 1), Vector3(2, 2, 2), Vector3(3, 3, 3) ) my_basis = my_basis.scaled_local(Vector3(0, 2, -2))

print(my_basis.x) # Prints (0.0, 0.0, 0.0) print(my_basis.y) # Prints (4.0, 4.0, 4.0) print(my_basis.z) # Prints (-6.0, -6.0, -6.0) [/gdscript] [csharp] var myBasis = new Basis( new Vector3(1.0f, 1.0f, 1.0f), new Vector3(2.0f, 2.0f, 2.0f), new Vector3(3.0f, 3.0f, 3.0f) ); myBasis = myBasis.ScaledLocal(new Vector3(0.0f, 2.0f, -2.0f));

GD.Print(myBasis.X); // Prints (0, 0, 0) GD.Print(myBasis.Y); // Prints (4, 4, 4) GD.Print(myBasis.Z); // Prints (-6, -6, -6) [/csharp] [/codeblocks]

fn (Basis) get_scale #

fn (s &Basis) get_scale() Vector3

Returns the length of each axis of this basis, as a [Vector3]. If the basis is not sheared, this value is the scaling factor. It is not affected by rotation. [codeblocks] [gdscript] var my_basis = Basis( Vector3(2, 0, 0), Vector3(0, 4, 0), Vector3(0, 0, 8) )# Rotating the Basis in any way preserves its scale.my_basis = my_basis.rotated(Vector3.UP, TAU / 2) my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4)

print(my_basis.get_scale()) # Prints (2.0, 4.0, 8.0) [/gdscript] [csharp] var myBasis = new Basis( Vector3(2.0f, 0.0f, 0.0f), Vector3(0.0f, 4.0f, 0.0f), Vector3(0.0f, 0.0f, 8.0f) ); // Rotating the Basis in any way preserves its scale. myBasis = myBasis.Rotated(Vector3.Up, Mathf.Tau / 2.0f); myBasis = myBasis.Rotated(Vector3.Right, Mathf.Tau / 4.0f);

GD.Print(myBasis.Scale); // Prints (2, 4, 8) [/csharp] [/codeblocks] [b]Note:[/b] If the value returned by [method determinant] is negative, the scale is also negative.

fn (Basis) get_euler #

fn (s &Basis) get_euler(cfg Basis_get_euler_Cfg) Vector3

Returns this basis's rotation as a [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians. For the returned value:- The [member Vector3.x] contains the angle around the [member x] axis (pitch);

  • The [member Vector3.y] contains the angle around the [member y] axis (yaw);
  • The [member Vector3.z] contains the angle around the [member z] axis (roll).The order of each consecutive rotation can be changed with [param order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method [method from_euler], this order is reversed. [b]Note:[/b] For this method to return correctly, the basis needs to be [i]orthonormal[/i] (see [method orthonormalized]). [b]Note:[/b] Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion]. [b]Note:[/b] In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the [member Node3D.rotation] property.

fn (Basis) tdotx #

fn (s &Basis) tdotx(with Vector3) f64

Returns the transposed dot product between [param with] and the [member x] axis (see [method transposed]). This is equivalent to basis.x.dot(vector).

fn (Basis) tdoty #

fn (s &Basis) tdoty(with Vector3) f64

Returns the transposed dot product between [param with] and the [member y] axis (see [method transposed]). This is equivalent to basis.y.dot(vector).

fn (Basis) tdotz #

fn (s &Basis) tdotz(with Vector3) f64

Returns the transposed dot product between [param with] and the [member z] axis (see [method transposed]). This is equivalent to basis.z.dot(vector).

fn (Basis) slerp #

fn (s &Basis) slerp(to Basis, weight f64) Basis

Performs a spherical-linear interpolation with the [param to] basis, given a [param weight]. Both this basis and [param to] should represent a rotation. [b]Example:[/b] Smoothly rotate a [Node3D] to the target basis over time, with a [Tween]:

var start_basis = Basis.IDENTITY
var target_basis = Basis.IDENTITY.rotated(Vector3.UP, TAU / 2)

func _ready():
create_tween().tween_method(interpolate, 0.0, 1.0, 5.0).set_trans(Tween.TRANS_EXPO)

func interpolate(weight):
basis = start_basis.slerp(target_basis, weight)

fn (Basis) is_conformal #

fn (s &Basis) is_conformal() bool

Returns true if this basis is conformal. A conformal basis is both [i]orthogonal[/i] (the axes are perpendicular to each other) and [i]uniform[/i] (the axes share the same length). This method can be especially useful during physics calculations.

fn (Basis) is_equal_approx #

fn (s &Basis) is_equal_approx(b Basis) bool

Returns true if this basis and [param b] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on all vector components.

fn (Basis) is_finite #

fn (s &Basis) is_finite() bool

Returns true if this basis is finite, by calling [method @GlobalScope.is_finite] on all vector components.

fn (Basis) get_rotation_quaternion #

fn (s &Basis) get_rotation_quaternion() Quaternion

Returns this basis's rotation as a [Quaternion]. [b]Note:[/b] Quaternions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the [method get_euler] method, which returns Euler angles.

fn (Basis) to_variant #

fn (s &Basis) to_variant() Variant

fn (Basis) from_variant #

fn (mut s Basis) from_variant(variant &Variant)

fn (Basis) index #

fn (v &Basis) index(i i64) Vector3

fn (Basis) mul_i64 #

fn (a Basis) mul_i64(b i64) Basis

Multiplies all components of the [Basis] by the given [int]. This affects the basis's scale uniformly, resizing all 3 axes by the [param right] value.

fn (Basis) div_i64 #

fn (a Basis) div_i64(b i64) Basis

Divides all components of the [Basis] by the given [int]. This affects the basis's scale uniformly, resizing all 3 axes by the [param right] value.

fn (Basis) mul_f64 #

fn (a Basis) mul_f64(b f64) Basis

Multiplies all components of the [Basis] by the given [float]. This affects the basis's scale uniformly, resizing all 3 axes by the [param right] value.

fn (Basis) div_f64 #

fn (a Basis) div_f64(b f64) Basis

Divides all components of the [Basis] by the given [float]. This affects the basis's scale uniformly, resizing all 3 axes by the [param right] value.

fn (Basis) mul_vector3 #

fn (a Basis) mul_vector3(b Vector3) Vector3

Transforms (multiplies) the [param right] vector by this basis, returning a [Vector3]. [codeblocks] [gdscript]# Basis that swaps the X/Z axes and doubles the scale.var my_basis = Basis(Vector3(0, 2, 0), Vector3(2, 0, 0), Vector3(0, 0, 2)) print(my_basis * Vector3(1, 2, 3)) # Prints (4.0, 2.0, 6.0) [/gdscript] [csharp] // Basis that swaps the X/Z axes and doubles the scale. var myBasis = new Basis(new Vector3(0, 2, 0), new Vector3(2, 0, 0), new Vector3(0, 0, 2)); GD.Print(myBasis * new Vector3(1, 2, 3)); // Prints (4, 2, 6) [/csharp] [/codeblocks]

fn (Basis) == #

fn (a Basis) == (b Basis) bool

Returns true if the components of both [Basis] matrices are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Basis) eq_basis #

fn (a Basis) eq_basis(b Basis) bool

Returns true if the components of both [Basis] matrices are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Basis) ne_basis #

fn (a Basis) ne_basis(b Basis) bool

Returns true if the components of both [Basis] matrices are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Basis) * #

fn (a Basis) * (b Basis) Basis

Transforms (multiplies) the [param right] basis by this basis. This is the operation performed between parent and child [Node3D]s.

fn (Basis) mul_basis #

fn (a Basis) mul_basis(b Basis) Basis

Transforms (multiplies) the [param right] basis by this basis. This is the operation performed between parent and child [Node3D]s.

fn (Basis) in_dictionary #

fn (a Basis) in_dictionary(b Dictionary) bool

fn (Basis) in_array #

fn (a Basis) in_array(b Array) bool

struct Basis_from_euler_Cfg #

@[params]
struct Basis_from_euler_Cfg {
pub:
	order i64 = 2
}

struct Basis_get_euler_Cfg #

@[params]
struct Basis_get_euler_Cfg {
pub:
	order i64 = 2
}

struct Basis_looking_at_Cfg #

@[params]
struct Basis_looking_at_Cfg {
pub:
	up              Vector3 = Vector3{0, 1, 0}
	use_model_front bool
}

struct BitMap #

struct BitMap {
	Resource
}

Boolean matrix.

fn (BitMap) to_variant #

fn (s &BitMap) to_variant() Variant

fn (BitMap) from_variant #

fn (mut s BitMap) from_variant(variant &Variant)

fn (BitMap) create #

fn (s &BitMap) create(size Vector2i)

Creates a bitmap with the specified size, filled with false.

fn (BitMap) create_from_image_alpha #

fn (s &BitMap) create_from_image_alpha(image Image, cfg BitMap_create_from_image_alpha_Cfg)

Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is equal to [param threshold] or less, and true in other case.

fn (BitMap) set_bitv #

fn (s &BitMap) set_bitv(position Vector2i, bit bool)

Sets the bitmap's element at the specified position, to the specified value.

fn (BitMap) set_bit #

fn (s &BitMap) set_bit(x i64, y i64, bit bool)

Sets the bitmap's element at the specified position, to the specified value.

fn (BitMap) get_bitv #

fn (s &BitMap) get_bitv(position Vector2i) bool

Returns bitmap's value at the specified position.

fn (BitMap) get_bit #

fn (s &BitMap) get_bit(x i64, y i64) bool

Returns bitmap's value at the specified position.

fn (BitMap) set_bit_rect #

fn (s &BitMap) set_bit_rect(rect Rect2i, bit bool)

Sets a rectangular portion of the bitmap to the specified value.

fn (BitMap) get_true_bit_count #

fn (s &BitMap) get_true_bit_count() i64

Returns the number of bitmap elements that are set to true.

fn (BitMap) get_size #

fn (s &BitMap) get_size() Vector2i

Returns bitmap's dimensions.

fn (BitMap) resize #

fn (s &BitMap) resize(new_size Vector2i)

Resizes the image to [param new_size].

fn (BitMap) grow_mask #

fn (s &BitMap) grow_mask(pixels i64, rect Rect2i)

Applies morphological dilation or erosion to the bitmap. If [param pixels] is positive, dilation is applied to the bitmap. If [param pixels] is negative, erosion is applied to the bitmap. [param rect] defines the area where the morphological operation is applied. Pixels located outside the [param rect] are unaffected by [method grow_mask].

fn (BitMap) convert_to_image #

fn (s &BitMap) convert_to_image() Image

Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [constant Image.FORMAT_L8]. true bits of the bitmap are being converted into white pixels, and false bits into black.

fn (BitMap) opaque_to_polygons #

fn (s &BitMap) opaque_to_polygons(rect Rect2i, cfg BitMap_opaque_to_polygons_Cfg) Array

Creates an [Array] of polygons covering a rectangular portion of the bitmap. It uses a marching squares algorithm, followed by Ramer-Douglas-Peucker (RDP) reduction of the number of vertices. Each polygon is described as a [PackedVector2Array] of its vertices. To get polygons covering the whole bitmap, pass:

Rect2(Vector2(), get_size())

[param epsilon] is passed to RDP to control how accurately the polygons cover the bitmap: a lower [param epsilon] corresponds to more points in the polygons.

struct BitMap_create_from_image_alpha_Cfg #

@[params]
struct BitMap_create_from_image_alpha_Cfg {
pub:
	threshold f64 = 0.1
}

Optional parameters for BitMap#create_from_image_alpha

struct BitMap_opaque_to_polygons_Cfg #

@[params]
struct BitMap_opaque_to_polygons_Cfg {
pub:
	epsilon f64 = 2.0
}

Optional parameters for BitMap#opaque_to_polygons

struct Bone2D #

struct Bone2D {
	Node2D
}

A joint used with [Skeleton2D] to control and animate other nodes.

fn (Bone2D) to_variant #

fn (s &Bone2D) to_variant() Variant

fn (Bone2D) from_variant #

fn (mut s Bone2D) from_variant(variant &Variant)

fn (Bone2D) set_rest #

fn (s &Bone2D) set_rest(rest Transform2D)

fn (Bone2D) get_rest #

fn (s &Bone2D) get_rest() Transform2D

fn (Bone2D) apply_rest #

fn (s &Bone2D) apply_rest()

Resets the bone to the rest pose. This is equivalent to setting [member Node2D.transform] to [member rest].

fn (Bone2D) get_skeleton_rest #

fn (s &Bone2D) get_skeleton_rest() Transform2D

Returns the node's [member rest] [Transform2D] if it doesn't have a parent, or its rest pose relative to its parent.

fn (Bone2D) get_index_in_skeleton #

fn (s &Bone2D) get_index_in_skeleton() i64

Returns the node's index as part of the entire skeleton. See [Skeleton2D].

fn (Bone2D) set_autocalculate_length_and_angle #

fn (s &Bone2D) set_autocalculate_length_and_angle(auto_calculate bool)

When set to true, the [Bone2D] node will attempt to automatically calculate the bone angle and length using the first child [Bone2D] node, if one exists. If none exist, the [Bone2D] cannot automatically calculate these values and will print a warning.

fn (Bone2D) get_autocalculate_length_and_angle #

fn (s &Bone2D) get_autocalculate_length_and_angle() bool

Returns whether this [Bone2D] is going to autocalculate its length and bone angle using its first [Bone2D] child node, if one exists. If there are no [Bone2D] children, then it cannot autocalculate these values and will print a warning.

fn (Bone2D) set_length #

fn (s &Bone2D) set_length(length f64)

Sets the length of the bone in the [Bone2D].

fn (Bone2D) get_length #

fn (s &Bone2D) get_length() f64

Returns the length of the bone in the [Bone2D] node.

fn (Bone2D) set_bone_angle #

fn (s &Bone2D) set_bone_angle(angle f64)

Sets the bone angle for the [Bone2D]. This is typically set to the rotation from the [Bone2D] to a child [Bone2D] node. [b]Note:[/b] This is different from the [Bone2D]'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the [Bone2D]'s [member Node2D.transform].

fn (Bone2D) get_bone_angle #

fn (s &Bone2D) get_bone_angle() f64

Returns the angle of the bone in the [Bone2D]. [b]Note:[/b] This is different from the [Bone2D]'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the [Bone2D]'s [member Node2D.transform].

struct BoneAttachment3D #

struct BoneAttachment3D {
	Node3D
}

А node that dynamically copies or overrides the 3D transform of a bone in its parent [Skeleton3D].

fn (BoneAttachment3D) to_variant #

fn (s &BoneAttachment3D) to_variant() Variant

fn (BoneAttachment3D) from_variant #

fn (mut s BoneAttachment3D) from_variant(variant &Variant)

fn (BoneAttachment3D) get_skeleton #

fn (s &BoneAttachment3D) get_skeleton() Skeleton3D

Returns the parent or external [Skeleton3D] node if it exists, otherwise returns null.

fn (BoneAttachment3D) set_bone_name #

fn (s &BoneAttachment3D) set_bone_name(bone_name string)

fn (BoneAttachment3D) get_bone_name #

fn (s &BoneAttachment3D) get_bone_name() string

fn (BoneAttachment3D) set_bone_idx #

fn (s &BoneAttachment3D) set_bone_idx(bone_idx i64)

fn (BoneAttachment3D) get_bone_idx #

fn (s &BoneAttachment3D) get_bone_idx() i64

fn (BoneAttachment3D) on_skeleton_update #

fn (s &BoneAttachment3D) on_skeleton_update()

A function that is called automatically when the [Skeleton3D] is updated. This function is where the [BoneAttachment3D] node updates its position so it is correctly bound when it is [i]not[/i] set to override the bone pose.

fn (BoneAttachment3D) set_override_pose #

fn (s &BoneAttachment3D) set_override_pose(override_pose bool)

fn (BoneAttachment3D) get_override_pose #

fn (s &BoneAttachment3D) get_override_pose() bool

fn (BoneAttachment3D) set_use_external_skeleton #

fn (s &BoneAttachment3D) set_use_external_skeleton(use_external_skeleton bool)

fn (BoneAttachment3D) get_use_external_skeleton #

fn (s &BoneAttachment3D) get_use_external_skeleton() bool

fn (BoneAttachment3D) set_external_skeleton #

fn (s &BoneAttachment3D) set_external_skeleton(external_skeleton NodePath)

fn (BoneAttachment3D) get_external_skeleton #

fn (s &BoneAttachment3D) get_external_skeleton() NodePath

struct BoneConstraint3D #

struct BoneConstraint3D {
	SkeletonModifier3D
}

A node that may modify Skeleton3D's bone with associating the two bones.

fn (BoneConstraint3D) to_variant #

fn (s &BoneConstraint3D) to_variant() Variant

fn (BoneConstraint3D) from_variant #

fn (mut s BoneConstraint3D) from_variant(variant &Variant)

fn (BoneConstraint3D) set_amount #

fn (s &BoneConstraint3D) set_amount(index i64, amount f64)

Sets the apply amount of the setting at [param index] to [param amount].

fn (BoneConstraint3D) get_amount #

fn (s &BoneConstraint3D) get_amount(index i64) f64

Returns the apply amount of the setting at [param index].

fn (BoneConstraint3D) set_apply_bone_name #

fn (s &BoneConstraint3D) set_apply_bone_name(index i64, bone_name string)

Sets the apply bone of the setting at [param index] to [param bone_name]. This bone will be modified.

fn (BoneConstraint3D) get_apply_bone_name #

fn (s &BoneConstraint3D) get_apply_bone_name(index i64) string

Returns the apply bone name of the setting at [param index]. This bone will be modified.

fn (BoneConstraint3D) set_apply_bone #

fn (s &BoneConstraint3D) set_apply_bone(index i64, bone i64)

Sets the apply bone of the setting at [param index] to [param bone]. This bone will be modified.

fn (BoneConstraint3D) get_apply_bone #

fn (s &BoneConstraint3D) get_apply_bone(index i64) i64

Returns the apply bone of the setting at [param index]. This bone will be modified.

fn (BoneConstraint3D) set_reference_bone_name #

fn (s &BoneConstraint3D) set_reference_bone_name(index i64, bone_name string)

Sets the reference bone of the setting at [param index] to [param bone_name]. This bone will be only referenced and not modified by this modifier.

fn (BoneConstraint3D) get_reference_bone_name #

fn (s &BoneConstraint3D) get_reference_bone_name(index i64) string

Returns the reference bone name of the setting at [param index]. This bone will be only referenced and not modified by this modifier.

fn (BoneConstraint3D) set_reference_bone #

fn (s &BoneConstraint3D) set_reference_bone(index i64, bone i64)

Sets the reference bone of the setting at [param index] to [param bone]. This bone will be only referenced and not modified by this modifier.

fn (BoneConstraint3D) get_reference_bone #

fn (s &BoneConstraint3D) get_reference_bone(index i64) i64

Returns the reference bone of the setting at [param index]. This bone will be only referenced and not modified by this modifier.

fn (BoneConstraint3D) set_setting_count #

fn (s &BoneConstraint3D) set_setting_count(count i64)

Sets the number of settings in the modifier.

fn (BoneConstraint3D) get_setting_count #

fn (s &BoneConstraint3D) get_setting_count() i64

Returns the number of settings in the modifier.

fn (BoneConstraint3D) clear_setting #

fn (s &BoneConstraint3D) clear_setting()

Clear all settings.

struct BoneMap #

struct BoneMap {
	Resource
}

Describes a mapping of bone names for retargeting [Skeleton3D] into common names defined by a [SkeletonProfile].

fn (BoneMap) to_variant #

fn (s &BoneMap) to_variant() Variant

fn (BoneMap) from_variant #

fn (mut s BoneMap) from_variant(variant &Variant)

fn (BoneMap) get_profile #

fn (s &BoneMap) get_profile() SkeletonProfile

fn (BoneMap) set_profile #

fn (s &BoneMap) set_profile(profile SkeletonProfile)

fn (BoneMap) get_skeleton_bone_name #

fn (s &BoneMap) get_skeleton_bone_name(profile_bone_name string) string

Returns a skeleton bone name is mapped to [param profile_bone_name]. In the retargeting process, the returned bone name is the bone name of the source skeleton.

fn (BoneMap) set_skeleton_bone_name #

fn (s &BoneMap) set_skeleton_bone_name(profile_bone_name string, skeleton_bone_name string)

Maps a skeleton bone name to [param profile_bone_name]. In the retargeting process, the setting bone name is the bone name of the source skeleton.

fn (BoneMap) find_profile_bone_name #

fn (s &BoneMap) find_profile_bone_name(skeleton_bone_name string) string

Returns a profile bone name having [param skeleton_bone_name]. If not found, an empty [StringName] will be returned. In the retargeting process, the returned bone name is the bone name of the target skeleton.

struct BoxContainer #

struct BoxContainer {
	Container
}

A container that arranges its child controls horizontally or vertically.

fn (BoxContainer) to_variant #

fn (s &BoxContainer) to_variant() Variant

fn (BoxContainer) from_variant #

fn (mut s BoxContainer) from_variant(variant &Variant)

fn (BoxContainer) add_spacer #

fn (s &BoxContainer) add_spacer(begin bool) Control

Adds a [Control] node to the box as a spacer. If [param begin] is true, it will insert the [Control] node in front of all other children.

fn (BoxContainer) set_alignment #

fn (s &BoxContainer) set_alignment(alignment BoxContainerAlignmentMode)

fn (BoxContainer) get_alignment #

fn (s &BoxContainer) get_alignment() BoxContainerAlignmentMode

fn (BoxContainer) set_vertical #

fn (s &BoxContainer) set_vertical(vertical bool)

fn (BoxContainer) is_vertical #

fn (s &BoxContainer) is_vertical() bool

struct BoxMesh #

struct BoxMesh {
	PrimitiveMesh
}

Generate an axis-aligned box [PrimitiveMesh].

fn (BoxMesh) to_variant #

fn (s &BoxMesh) to_variant() Variant

fn (BoxMesh) from_variant #

fn (mut s BoxMesh) from_variant(variant &Variant)

fn (BoxMesh) set_size #

fn (s &BoxMesh) set_size(size Vector3)

fn (BoxMesh) get_size #

fn (s &BoxMesh) get_size() Vector3

fn (BoxMesh) set_subdivide_width #

fn (s &BoxMesh) set_subdivide_width(subdivide i64)

fn (BoxMesh) get_subdivide_width #

fn (s &BoxMesh) get_subdivide_width() i64

fn (BoxMesh) set_subdivide_height #

fn (s &BoxMesh) set_subdivide_height(divisions i64)

fn (BoxMesh) get_subdivide_height #

fn (s &BoxMesh) get_subdivide_height() i64

fn (BoxMesh) set_subdivide_depth #

fn (s &BoxMesh) set_subdivide_depth(divisions i64)

fn (BoxMesh) get_subdivide_depth #

fn (s &BoxMesh) get_subdivide_depth() i64

struct BoxOccluder3D #

struct BoxOccluder3D {
	Occluder3D
}

Cuboid shape for use with occlusion culling in [OccluderInstance3D].

fn (BoxOccluder3D) to_variant #

fn (s &BoxOccluder3D) to_variant() Variant

fn (BoxOccluder3D) from_variant #

fn (mut s BoxOccluder3D) from_variant(variant &Variant)

fn (BoxOccluder3D) set_size #

fn (s &BoxOccluder3D) set_size(size Vector3)

fn (BoxOccluder3D) get_size #

fn (s &BoxOccluder3D) get_size() Vector3

struct BoxShape3D #

struct BoxShape3D {
	Shape3D
}

A 3D box shape used for physics collision.

fn (BoxShape3D) to_variant #

fn (s &BoxShape3D) to_variant() Variant

fn (BoxShape3D) from_variant #

fn (mut s BoxShape3D) from_variant(variant &Variant)

fn (BoxShape3D) set_size #

fn (s &BoxShape3D) set_size(size Vector3)

fn (BoxShape3D) get_size #

fn (s &BoxShape3D) get_size() Vector3

struct Button #

struct Button {
	BaseButton
}

A themed button that can contain text and an icon.

fn (Button) to_variant #

fn (s &Button) to_variant() Variant

fn (Button) from_variant #

fn (mut s Button) from_variant(variant &Variant)

fn (Button) set_text #

fn (s &Button) set_text(text string)

fn (Button) get_text #

fn (s &Button) get_text() string

fn (Button) set_text_overrun_behavior #

fn (s &Button) set_text_overrun_behavior(overrun_behavior TextServerOverrunBehavior)

fn (Button) get_text_overrun_behavior #

fn (s &Button) get_text_overrun_behavior() TextServerOverrunBehavior

fn (Button) set_autowrap_mode #

fn (s &Button) set_autowrap_mode(autowrap_mode TextServerAutowrapMode)

fn (Button) get_autowrap_mode #

fn (s &Button) get_autowrap_mode() TextServerAutowrapMode

fn (Button) set_autowrap_trim_flags #

fn (s &Button) set_autowrap_trim_flags(autowrap_trim_flags TextServerLineBreakFlag)

fn (Button) get_autowrap_trim_flags #

fn (s &Button) get_autowrap_trim_flags() TextServerLineBreakFlag

fn (Button) set_text_direction #

fn (s &Button) set_text_direction(direction ControlTextDirection)

fn (Button) get_text_direction #

fn (s &Button) get_text_direction() ControlTextDirection

fn (Button) set_language #

fn (s &Button) set_language(language string)

fn (Button) get_language #

fn (s &Button) get_language() string

fn (Button) set_button_icon #

fn (s &Button) set_button_icon(texture Texture2D)

fn (Button) get_button_icon #

fn (s &Button) get_button_icon() Texture2D

fn (Button) set_flat #

fn (s &Button) set_flat(enabled bool)

fn (Button) is_flat #

fn (s &Button) is_flat() bool

fn (Button) set_clip_text #

fn (s &Button) set_clip_text(enabled bool)

fn (Button) get_clip_text #

fn (s &Button) get_clip_text() bool

fn (Button) set_text_alignment #

fn (s &Button) set_text_alignment(alignment HorizontalAlignment)

fn (Button) get_text_alignment #

fn (s &Button) get_text_alignment() HorizontalAlignment

fn (Button) set_icon_alignment #

fn (s &Button) set_icon_alignment(icon_alignment HorizontalAlignment)

fn (Button) get_icon_alignment #

fn (s &Button) get_icon_alignment() HorizontalAlignment

fn (Button) set_vertical_icon_alignment #

fn (s &Button) set_vertical_icon_alignment(vertical_icon_alignment VerticalAlignment)

fn (Button) get_vertical_icon_alignment #

fn (s &Button) get_vertical_icon_alignment() VerticalAlignment

fn (Button) set_expand_icon #

fn (s &Button) set_expand_icon(enabled bool)

fn (Button) is_expand_icon #

fn (s &Button) is_expand_icon() bool

struct ButtonGroup #

struct ButtonGroup {
	Resource
}

A group of buttons that doesn't allow more than one button to be pressed at a time.

fn (ButtonGroup) to_variant #

fn (s &ButtonGroup) to_variant() Variant

fn (ButtonGroup) from_variant #

fn (mut s ButtonGroup) from_variant(variant &Variant)

fn (ButtonGroup) get_pressed_button #

fn (s &ButtonGroup) get_pressed_button() BaseButton

Returns the current pressed button.

fn (ButtonGroup) get_buttons #

fn (s &ButtonGroup) get_buttons() Array

Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.button_group]).

fn (ButtonGroup) set_allow_unpress #

fn (s &ButtonGroup) set_allow_unpress(enabled bool)

fn (ButtonGroup) is_allow_unpress #

fn (s &ButtonGroup) is_allow_unpress() bool

struct CPUParticles2D #

struct CPUParticles2D {
	Node2D
}

A CPU-based 2D particle emitter.

fn (CPUParticles2D) to_variant #

fn (s &CPUParticles2D) to_variant() Variant

fn (CPUParticles2D) from_variant #

fn (mut s CPUParticles2D) from_variant(variant &Variant)

fn (CPUParticles2D) set_emitting #

fn (s &CPUParticles2D) set_emitting(emitting bool)

fn (CPUParticles2D) set_amount #

fn (s &CPUParticles2D) set_amount(amount i64)

fn (CPUParticles2D) set_lifetime #

fn (s &CPUParticles2D) set_lifetime(secs f64)

fn (CPUParticles2D) set_one_shot #

fn (s &CPUParticles2D) set_one_shot(enable bool)

fn (CPUParticles2D) set_pre_process_time #

fn (s &CPUParticles2D) set_pre_process_time(secs f64)

fn (CPUParticles2D) set_explosiveness_ratio #

fn (s &CPUParticles2D) set_explosiveness_ratio(ratio f64)

fn (CPUParticles2D) set_randomness_ratio #

fn (s &CPUParticles2D) set_randomness_ratio(ratio f64)

fn (CPUParticles2D) set_lifetime_randomness #

fn (s &CPUParticles2D) set_lifetime_randomness(random f64)

fn (CPUParticles2D) set_use_local_coordinates #

fn (s &CPUParticles2D) set_use_local_coordinates(enable bool)

fn (CPUParticles2D) set_fixed_fps #

fn (s &CPUParticles2D) set_fixed_fps(fps i64)

fn (CPUParticles2D) set_fractional_delta #

fn (s &CPUParticles2D) set_fractional_delta(enable bool)

fn (CPUParticles2D) set_speed_scale #

fn (s &CPUParticles2D) set_speed_scale(scale f64)

fn (CPUParticles2D) request_particles_process #

fn (s &CPUParticles2D) request_particles_process(process_time f64)

Requests the particles to process for extra process time during a single frame. Useful for particle playback, if used in combination with [member use_fixed_seed] or by calling [method restart] with parameter keep_seed set to true.

fn (CPUParticles2D) is_emitting #

fn (s &CPUParticles2D) is_emitting() bool

fn (CPUParticles2D) get_amount #

fn (s &CPUParticles2D) get_amount() i64

fn (CPUParticles2D) get_lifetime #

fn (s &CPUParticles2D) get_lifetime() f64

fn (CPUParticles2D) get_one_shot #

fn (s &CPUParticles2D) get_one_shot() bool

fn (CPUParticles2D) get_pre_process_time #

fn (s &CPUParticles2D) get_pre_process_time() f64

fn (CPUParticles2D) get_explosiveness_ratio #

fn (s &CPUParticles2D) get_explosiveness_ratio() f64

fn (CPUParticles2D) get_randomness_ratio #

fn (s &CPUParticles2D) get_randomness_ratio() f64

fn (CPUParticles2D) get_lifetime_randomness #

fn (s &CPUParticles2D) get_lifetime_randomness() f64

fn (CPUParticles2D) get_use_local_coordinates #

fn (s &CPUParticles2D) get_use_local_coordinates() bool

fn (CPUParticles2D) get_fixed_fps #

fn (s &CPUParticles2D) get_fixed_fps() i64

fn (CPUParticles2D) get_fractional_delta #

fn (s &CPUParticles2D) get_fractional_delta() bool

fn (CPUParticles2D) get_speed_scale #

fn (s &CPUParticles2D) get_speed_scale() f64

fn (CPUParticles2D) set_use_fixed_seed #

fn (s &CPUParticles2D) set_use_fixed_seed(use_fixed_seed bool)

fn (CPUParticles2D) get_use_fixed_seed #

fn (s &CPUParticles2D) get_use_fixed_seed() bool

fn (CPUParticles2D) set_seed #

fn (s &CPUParticles2D) set_seed(seed i64)

fn (CPUParticles2D) get_seed #

fn (s &CPUParticles2D) get_seed() i64

fn (CPUParticles2D) set_draw_order #

fn (s &CPUParticles2D) set_draw_order(order CPUParticles2DDrawOrder)

fn (CPUParticles2D) get_draw_order #

fn (s &CPUParticles2D) get_draw_order() CPUParticles2DDrawOrder

fn (CPUParticles2D) set_texture #

fn (s &CPUParticles2D) set_texture(texture Texture2D)

fn (CPUParticles2D) get_texture #

fn (s &CPUParticles2D) get_texture() Texture2D

fn (CPUParticles2D) restart #

fn (s &CPUParticles2D) restart(cfg CPUParticles2D_restart_Cfg)

Restarts the particle emitter. If [param keep_seed] is true, the current random seed will be preserved. Useful for seeking and playback.

fn (CPUParticles2D) set_direction #

fn (s &CPUParticles2D) set_direction(direction Vector2)

fn (CPUParticles2D) get_direction #

fn (s &CPUParticles2D) get_direction() Vector2

fn (CPUParticles2D) set_spread #

fn (s &CPUParticles2D) set_spread(spread f64)

fn (CPUParticles2D) get_spread #

fn (s &CPUParticles2D) get_spread() f64

fn (CPUParticles2D) set_param_min #

fn (s &CPUParticles2D) set_param_min(param CPUParticles2DParameter, value f64)

Sets the minimum value for the given parameter.

fn (CPUParticles2D) get_param_min #

fn (s &CPUParticles2D) get_param_min(param CPUParticles2DParameter) f64

Returns the minimum value range for the given parameter.

fn (CPUParticles2D) set_param_max #

fn (s &CPUParticles2D) set_param_max(param CPUParticles2DParameter, value f64)

Sets the maximum value for the given parameter.

fn (CPUParticles2D) get_param_max #

fn (s &CPUParticles2D) get_param_max(param CPUParticles2DParameter) f64

Returns the maximum value range for the given parameter.

fn (CPUParticles2D) set_param_curve #

fn (s &CPUParticles2D) set_param_curve(param CPUParticles2DParameter, curve Curve)

Sets the [Curve] of the parameter specified by [enum Parameter]. Should be a unit [Curve].

fn (CPUParticles2D) get_param_curve #

fn (s &CPUParticles2D) get_param_curve(param CPUParticles2DParameter) Curve

Returns the [Curve] of the parameter specified by [enum Parameter].

fn (CPUParticles2D) set_color #

fn (s &CPUParticles2D) set_color(color Color)

fn (CPUParticles2D) get_color #

fn (s &CPUParticles2D) get_color() Color

fn (CPUParticles2D) set_color_ramp #

fn (s &CPUParticles2D) set_color_ramp(ramp Gradient)

fn (CPUParticles2D) get_color_ramp #

fn (s &CPUParticles2D) get_color_ramp() Gradient

fn (CPUParticles2D) set_color_initial_ramp #

fn (s &CPUParticles2D) set_color_initial_ramp(ramp Gradient)

fn (CPUParticles2D) get_color_initial_ramp #

fn (s &CPUParticles2D) get_color_initial_ramp() Gradient

fn (CPUParticles2D) set_particle_flag #

fn (s &CPUParticles2D) set_particle_flag(particle_flag CPUParticles2DParticleFlags, enable bool)

Enables or disables the given particle flag.

fn (CPUParticles2D) get_particle_flag #

fn (s &CPUParticles2D) get_particle_flag(particle_flag CPUParticles2DParticleFlags) bool

Returns the enabled state of the given particle flag.

fn (CPUParticles2D) set_emission_shape #

fn (s &CPUParticles2D) set_emission_shape(shape CPUParticles2DEmissionShape)

fn (CPUParticles2D) get_emission_shape #

fn (s &CPUParticles2D) get_emission_shape() CPUParticles2DEmissionShape

fn (CPUParticles2D) set_emission_sphere_radius #

fn (s &CPUParticles2D) set_emission_sphere_radius(radius f64)

fn (CPUParticles2D) get_emission_sphere_radius #

fn (s &CPUParticles2D) get_emission_sphere_radius() f64

fn (CPUParticles2D) set_emission_rect_extents #

fn (s &CPUParticles2D) set_emission_rect_extents(extents Vector2)

fn (CPUParticles2D) get_emission_rect_extents #

fn (s &CPUParticles2D) get_emission_rect_extents() Vector2

fn (CPUParticles2D) set_emission_points #

fn (s &CPUParticles2D) set_emission_points(array PackedVector2Array)

fn (CPUParticles2D) get_emission_points #

fn (s &CPUParticles2D) get_emission_points() PackedVector2Array

fn (CPUParticles2D) set_emission_normals #

fn (s &CPUParticles2D) set_emission_normals(array PackedVector2Array)

fn (CPUParticles2D) get_emission_normals #

fn (s &CPUParticles2D) get_emission_normals() PackedVector2Array

fn (CPUParticles2D) set_emission_colors #

fn (s &CPUParticles2D) set_emission_colors(array PackedColorArray)

fn (CPUParticles2D) get_emission_colors #

fn (s &CPUParticles2D) get_emission_colors() PackedColorArray

fn (CPUParticles2D) get_gravity #

fn (s &CPUParticles2D) get_gravity() Vector2

fn (CPUParticles2D) set_gravity #

fn (s &CPUParticles2D) set_gravity(accel_vec Vector2)

fn (CPUParticles2D) get_split_scale #

fn (s &CPUParticles2D) get_split_scale() bool

fn (CPUParticles2D) set_split_scale #

fn (s &CPUParticles2D) set_split_scale(split_scale bool)

fn (CPUParticles2D) get_scale_curve_x #

fn (s &CPUParticles2D) get_scale_curve_x() Curve

fn (CPUParticles2D) set_scale_curve_x #

fn (s &CPUParticles2D) set_scale_curve_x(scale_curve Curve)

fn (CPUParticles2D) get_scale_curve_y #

fn (s &CPUParticles2D) get_scale_curve_y() Curve

fn (CPUParticles2D) set_scale_curve_y #

fn (s &CPUParticles2D) set_scale_curve_y(scale_curve Curve)

fn (CPUParticles2D) convert_from_particles #

fn (s &CPUParticles2D) convert_from_particles(particles Node)

Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticleProcessMaterial].

struct CPUParticles2D_restart_Cfg #

@[params]
struct CPUParticles2D_restart_Cfg {
pub:
	keep_seed bool
}

Optional parameters for CPUParticles2D#restart

struct CPUParticles3D #

struct CPUParticles3D {
	GeometryInstance3D
}

A CPU-based 3D particle emitter.

fn (CPUParticles3D) to_variant #

fn (s &CPUParticles3D) to_variant() Variant

fn (CPUParticles3D) from_variant #

fn (mut s CPUParticles3D) from_variant(variant &Variant)

fn (CPUParticles3D) set_emitting #

fn (s &CPUParticles3D) set_emitting(emitting bool)

fn (CPUParticles3D) set_amount #

fn (s &CPUParticles3D) set_amount(amount i64)

fn (CPUParticles3D) set_lifetime #

fn (s &CPUParticles3D) set_lifetime(secs f64)

fn (CPUParticles3D) set_one_shot #

fn (s &CPUParticles3D) set_one_shot(enable bool)

fn (CPUParticles3D) set_pre_process_time #

fn (s &CPUParticles3D) set_pre_process_time(secs f64)

fn (CPUParticles3D) set_explosiveness_ratio #

fn (s &CPUParticles3D) set_explosiveness_ratio(ratio f64)

fn (CPUParticles3D) set_randomness_ratio #

fn (s &CPUParticles3D) set_randomness_ratio(ratio f64)

fn (CPUParticles3D) set_visibility_aabb #

fn (s &CPUParticles3D) set_visibility_aabb(aabb AABB)

fn (CPUParticles3D) set_lifetime_randomness #

fn (s &CPUParticles3D) set_lifetime_randomness(random f64)

fn (CPUParticles3D) set_use_local_coordinates #

fn (s &CPUParticles3D) set_use_local_coordinates(enable bool)

fn (CPUParticles3D) set_fixed_fps #

fn (s &CPUParticles3D) set_fixed_fps(fps i64)

fn (CPUParticles3D) set_fractional_delta #

fn (s &CPUParticles3D) set_fractional_delta(enable bool)

fn (CPUParticles3D) set_speed_scale #

fn (s &CPUParticles3D) set_speed_scale(scale f64)

fn (CPUParticles3D) is_emitting #

fn (s &CPUParticles3D) is_emitting() bool

fn (CPUParticles3D) get_amount #

fn (s &CPUParticles3D) get_amount() i64

fn (CPUParticles3D) get_lifetime #

fn (s &CPUParticles3D) get_lifetime() f64

fn (CPUParticles3D) get_one_shot #

fn (s &CPUParticles3D) get_one_shot() bool

fn (CPUParticles3D) get_pre_process_time #

fn (s &CPUParticles3D) get_pre_process_time() f64

fn (CPUParticles3D) get_explosiveness_ratio #

fn (s &CPUParticles3D) get_explosiveness_ratio() f64

fn (CPUParticles3D) get_randomness_ratio #

fn (s &CPUParticles3D) get_randomness_ratio() f64

fn (CPUParticles3D) get_visibility_aabb #

fn (s &CPUParticles3D) get_visibility_aabb() AABB

fn (CPUParticles3D) get_lifetime_randomness #

fn (s &CPUParticles3D) get_lifetime_randomness() f64

fn (CPUParticles3D) get_use_local_coordinates #

fn (s &CPUParticles3D) get_use_local_coordinates() bool

fn (CPUParticles3D) get_fixed_fps #

fn (s &CPUParticles3D) get_fixed_fps() i64

fn (CPUParticles3D) get_fractional_delta #

fn (s &CPUParticles3D) get_fractional_delta() bool

fn (CPUParticles3D) get_speed_scale #

fn (s &CPUParticles3D) get_speed_scale() f64

fn (CPUParticles3D) set_draw_order #

fn (s &CPUParticles3D) set_draw_order(order CPUParticles3DDrawOrder)

fn (CPUParticles3D) get_draw_order #

fn (s &CPUParticles3D) get_draw_order() CPUParticles3DDrawOrder

fn (CPUParticles3D) set_mesh #

fn (s &CPUParticles3D) set_mesh(mesh Mesh)

fn (CPUParticles3D) get_mesh #

fn (s &CPUParticles3D) get_mesh() Mesh

fn (CPUParticles3D) set_use_fixed_seed #

fn (s &CPUParticles3D) set_use_fixed_seed(use_fixed_seed bool)

fn (CPUParticles3D) get_use_fixed_seed #

fn (s &CPUParticles3D) get_use_fixed_seed() bool

fn (CPUParticles3D) set_seed #

fn (s &CPUParticles3D) set_seed(seed i64)

fn (CPUParticles3D) get_seed #

fn (s &CPUParticles3D) get_seed() i64

fn (CPUParticles3D) restart #

fn (s &CPUParticles3D) restart(cfg CPUParticles3D_restart_Cfg)

Restarts the particle emitter. If [param keep_seed] is true, the current random seed will be preserved. Useful for seeking and playback.

fn (CPUParticles3D) request_particles_process #

fn (s &CPUParticles3D) request_particles_process(process_time f64)

Requests the particles to process for extra process time during a single frame. Useful for particle playback, if used in combination with [member use_fixed_seed] or by calling [method restart] with parameter keep_seed set to true.

fn (CPUParticles3D) capture_aabb #

fn (s &CPUParticles3D) capture_aabb() AABB

Returns the axis-aligned bounding box that contains all the particles that are active in the current frame.

fn (CPUParticles3D) set_direction #

fn (s &CPUParticles3D) set_direction(direction Vector3)

fn (CPUParticles3D) get_direction #

fn (s &CPUParticles3D) get_direction() Vector3

fn (CPUParticles3D) set_spread #

fn (s &CPUParticles3D) set_spread(degrees f64)

fn (CPUParticles3D) get_spread #

fn (s &CPUParticles3D) get_spread() f64

fn (CPUParticles3D) set_flatness #

fn (s &CPUParticles3D) set_flatness(amount f64)

fn (CPUParticles3D) get_flatness #

fn (s &CPUParticles3D) get_flatness() f64

fn (CPUParticles3D) set_param_min #

fn (s &CPUParticles3D) set_param_min(param CPUParticles3DParameter, value f64)

Sets the minimum value for the given parameter.

fn (CPUParticles3D) get_param_min #

fn (s &CPUParticles3D) get_param_min(param CPUParticles3DParameter) f64

Returns the minimum value range for the given parameter.

fn (CPUParticles3D) set_param_max #

fn (s &CPUParticles3D) set_param_max(param CPUParticles3DParameter, value f64)

Sets the maximum value for the given parameter.

fn (CPUParticles3D) get_param_max #

fn (s &CPUParticles3D) get_param_max(param CPUParticles3DParameter) f64

Returns the maximum value range for the given parameter.

fn (CPUParticles3D) set_param_curve #

fn (s &CPUParticles3D) set_param_curve(param CPUParticles3DParameter, curve Curve)

Sets the [Curve] of the parameter specified by [enum Parameter]. Should be a unit [Curve].

fn (CPUParticles3D) get_param_curve #

fn (s &CPUParticles3D) get_param_curve(param CPUParticles3DParameter) Curve

Returns the [Curve] of the parameter specified by [enum Parameter].

fn (CPUParticles3D) set_color #

fn (s &CPUParticles3D) set_color(color Color)

fn (CPUParticles3D) get_color #

fn (s &CPUParticles3D) get_color() Color

fn (CPUParticles3D) set_color_ramp #

fn (s &CPUParticles3D) set_color_ramp(ramp Gradient)

fn (CPUParticles3D) get_color_ramp #

fn (s &CPUParticles3D) get_color_ramp() Gradient

fn (CPUParticles3D) set_color_initial_ramp #

fn (s &CPUParticles3D) set_color_initial_ramp(ramp Gradient)

fn (CPUParticles3D) get_color_initial_ramp #

fn (s &CPUParticles3D) get_color_initial_ramp() Gradient

fn (CPUParticles3D) set_particle_flag #

fn (s &CPUParticles3D) set_particle_flag(particle_flag CPUParticles3DParticleFlags, enable bool)

Enables or disables the given particle flag.

fn (CPUParticles3D) get_particle_flag #

fn (s &CPUParticles3D) get_particle_flag(particle_flag CPUParticles3DParticleFlags) bool

Returns the enabled state of the given particle flag.

fn (CPUParticles3D) set_emission_shape #

fn (s &CPUParticles3D) set_emission_shape(shape CPUParticles3DEmissionShape)

fn (CPUParticles3D) get_emission_shape #

fn (s &CPUParticles3D) get_emission_shape() CPUParticles3DEmissionShape

fn (CPUParticles3D) set_emission_sphere_radius #

fn (s &CPUParticles3D) set_emission_sphere_radius(radius f64)

fn (CPUParticles3D) get_emission_sphere_radius #

fn (s &CPUParticles3D) get_emission_sphere_radius() f64

fn (CPUParticles3D) set_emission_box_extents #

fn (s &CPUParticles3D) set_emission_box_extents(extents Vector3)

fn (CPUParticles3D) get_emission_box_extents #

fn (s &CPUParticles3D) get_emission_box_extents() Vector3

fn (CPUParticles3D) set_emission_points #

fn (s &CPUParticles3D) set_emission_points(array PackedVector3Array)

fn (CPUParticles3D) get_emission_points #

fn (s &CPUParticles3D) get_emission_points() PackedVector3Array

fn (CPUParticles3D) set_emission_normals #

fn (s &CPUParticles3D) set_emission_normals(array PackedVector3Array)

fn (CPUParticles3D) get_emission_normals #

fn (s &CPUParticles3D) get_emission_normals() PackedVector3Array

fn (CPUParticles3D) set_emission_colors #

fn (s &CPUParticles3D) set_emission_colors(array PackedColorArray)

fn (CPUParticles3D) get_emission_colors #

fn (s &CPUParticles3D) get_emission_colors() PackedColorArray

fn (CPUParticles3D) set_emission_ring_axis #

fn (s &CPUParticles3D) set_emission_ring_axis(axis Vector3)

fn (CPUParticles3D) get_emission_ring_axis #

fn (s &CPUParticles3D) get_emission_ring_axis() Vector3

fn (CPUParticles3D) set_emission_ring_height #

fn (s &CPUParticles3D) set_emission_ring_height(height f64)

fn (CPUParticles3D) get_emission_ring_height #

fn (s &CPUParticles3D) get_emission_ring_height() f64

fn (CPUParticles3D) set_emission_ring_radius #

fn (s &CPUParticles3D) set_emission_ring_radius(radius f64)

fn (CPUParticles3D) get_emission_ring_radius #

fn (s &CPUParticles3D) get_emission_ring_radius() f64

fn (CPUParticles3D) set_emission_ring_inner_radius #

fn (s &CPUParticles3D) set_emission_ring_inner_radius(inner_radius f64)

fn (CPUParticles3D) get_emission_ring_inner_radius #

fn (s &CPUParticles3D) get_emission_ring_inner_radius() f64

fn (CPUParticles3D) set_emission_ring_cone_angle #

fn (s &CPUParticles3D) set_emission_ring_cone_angle(cone_angle f64)

fn (CPUParticles3D) get_emission_ring_cone_angle #

fn (s &CPUParticles3D) get_emission_ring_cone_angle() f64

fn (CPUParticles3D) get_gravity #

fn (s &CPUParticles3D) get_gravity() Vector3

fn (CPUParticles3D) set_gravity #

fn (s &CPUParticles3D) set_gravity(accel_vec Vector3)

fn (CPUParticles3D) get_split_scale #

fn (s &CPUParticles3D) get_split_scale() bool

fn (CPUParticles3D) set_split_scale #

fn (s &CPUParticles3D) set_split_scale(split_scale bool)

fn (CPUParticles3D) get_scale_curve_x #

fn (s &CPUParticles3D) get_scale_curve_x() Curve

fn (CPUParticles3D) set_scale_curve_x #

fn (s &CPUParticles3D) set_scale_curve_x(scale_curve Curve)

fn (CPUParticles3D) get_scale_curve_y #

fn (s &CPUParticles3D) get_scale_curve_y() Curve

fn (CPUParticles3D) set_scale_curve_y #

fn (s &CPUParticles3D) set_scale_curve_y(scale_curve Curve)

fn (CPUParticles3D) get_scale_curve_z #

fn (s &CPUParticles3D) get_scale_curve_z() Curve

fn (CPUParticles3D) set_scale_curve_z #

fn (s &CPUParticles3D) set_scale_curve_z(scale_curve Curve)

fn (CPUParticles3D) convert_from_particles #

fn (s &CPUParticles3D) convert_from_particles(particles Node)

Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticleProcessMaterial].

struct CPUParticles3D_restart_Cfg #

@[params]
struct CPUParticles3D_restart_Cfg {
pub:
	keep_seed bool
}

Optional parameters for CPUParticles3D#restart

struct CSGBox3D #

struct CSGBox3D {
	CSGPrimitive3D
}

A CSG Box shape.

fn (CSGBox3D) to_variant #

fn (s &CSGBox3D) to_variant() Variant

fn (CSGBox3D) from_variant #

fn (mut s CSGBox3D) from_variant(variant &Variant)

fn (CSGBox3D) set_size #

fn (s &CSGBox3D) set_size(size Vector3)

fn (CSGBox3D) get_size #

fn (s &CSGBox3D) get_size() Vector3

fn (CSGBox3D) set_material #

fn (s &CSGBox3D) set_material(material Material)

fn (CSGBox3D) get_material #

fn (s &CSGBox3D) get_material() Material

struct CSGCombiner3D #

struct CSGCombiner3D {
	CSGShape3D
}

A CSG node that allows you to combine other CSG modifiers.

fn (CSGCombiner3D) to_variant #

fn (s &CSGCombiner3D) to_variant() Variant

fn (CSGCombiner3D) from_variant #

fn (mut s CSGCombiner3D) from_variant(variant &Variant)

struct CSGCylinder3D #

struct CSGCylinder3D {
	CSGPrimitive3D
}

A CSG Cylinder shape.

fn (CSGCylinder3D) to_variant #

fn (s &CSGCylinder3D) to_variant() Variant

fn (CSGCylinder3D) from_variant #

fn (mut s CSGCylinder3D) from_variant(variant &Variant)

fn (CSGCylinder3D) set_radius #

fn (s &CSGCylinder3D) set_radius(radius f64)

fn (CSGCylinder3D) get_radius #

fn (s &CSGCylinder3D) get_radius() f64

fn (CSGCylinder3D) set_height #

fn (s &CSGCylinder3D) set_height(height f64)

fn (CSGCylinder3D) get_height #

fn (s &CSGCylinder3D) get_height() f64

fn (CSGCylinder3D) set_sides #

fn (s &CSGCylinder3D) set_sides(sides i64)

fn (CSGCylinder3D) get_sides #

fn (s &CSGCylinder3D) get_sides() i64

fn (CSGCylinder3D) set_cone #

fn (s &CSGCylinder3D) set_cone(cone bool)

fn (CSGCylinder3D) is_cone #

fn (s &CSGCylinder3D) is_cone() bool

fn (CSGCylinder3D) set_material #

fn (s &CSGCylinder3D) set_material(material Material)

fn (CSGCylinder3D) get_material #

fn (s &CSGCylinder3D) get_material() Material

fn (CSGCylinder3D) set_smooth_faces #

fn (s &CSGCylinder3D) set_smooth_faces(smooth_faces bool)

fn (CSGCylinder3D) get_smooth_faces #

fn (s &CSGCylinder3D) get_smooth_faces() bool

struct CSGMesh3D #

struct CSGMesh3D {
	CSGPrimitive3D
}

A CSG Mesh shape that uses a mesh resource.

fn (CSGMesh3D) to_variant #

fn (s &CSGMesh3D) to_variant() Variant

fn (CSGMesh3D) from_variant #

fn (mut s CSGMesh3D) from_variant(variant &Variant)

fn (CSGMesh3D) set_mesh #

fn (s &CSGMesh3D) set_mesh(mesh Mesh)

fn (CSGMesh3D) get_mesh #

fn (s &CSGMesh3D) get_mesh() Mesh

fn (CSGMesh3D) set_material #

fn (s &CSGMesh3D) set_material(material Material)

fn (CSGMesh3D) get_material #

fn (s &CSGMesh3D) get_material() Material

struct CSGPolygon3D #

struct CSGPolygon3D {
	CSGPrimitive3D
}

Extrudes a 2D polygon shape to create a 3D mesh.

fn (CSGPolygon3D) to_variant #

fn (s &CSGPolygon3D) to_variant() Variant

fn (CSGPolygon3D) from_variant #

fn (mut s CSGPolygon3D) from_variant(variant &Variant)

fn (CSGPolygon3D) set_polygon #

fn (s &CSGPolygon3D) set_polygon(polygon PackedVector2Array)

fn (CSGPolygon3D) get_polygon #

fn (s &CSGPolygon3D) get_polygon() PackedVector2Array

fn (CSGPolygon3D) set_mode #

fn (s &CSGPolygon3D) set_mode(mode CSGPolygon3DMode)

fn (CSGPolygon3D) get_mode #

fn (s &CSGPolygon3D) get_mode() CSGPolygon3DMode

fn (CSGPolygon3D) set_depth #

fn (s &CSGPolygon3D) set_depth(depth f64)

fn (CSGPolygon3D) get_depth #

fn (s &CSGPolygon3D) get_depth() f64

fn (CSGPolygon3D) set_spin_degrees #

fn (s &CSGPolygon3D) set_spin_degrees(degrees f64)

fn (CSGPolygon3D) get_spin_degrees #

fn (s &CSGPolygon3D) get_spin_degrees() f64

fn (CSGPolygon3D) set_spin_sides #

fn (s &CSGPolygon3D) set_spin_sides(spin_sides i64)

fn (CSGPolygon3D) get_spin_sides #

fn (s &CSGPolygon3D) get_spin_sides() i64

fn (CSGPolygon3D) set_path_node #

fn (s &CSGPolygon3D) set_path_node(path NodePath)

fn (CSGPolygon3D) get_path_node #

fn (s &CSGPolygon3D) get_path_node() NodePath

fn (CSGPolygon3D) set_path_interval_type #

fn (s &CSGPolygon3D) set_path_interval_type(interval_type CSGPolygon3DPathIntervalType)

fn (CSGPolygon3D) get_path_interval_type #

fn (s &CSGPolygon3D) get_path_interval_type() CSGPolygon3DPathIntervalType

fn (CSGPolygon3D) set_path_interval #

fn (s &CSGPolygon3D) set_path_interval(interval f64)

fn (CSGPolygon3D) get_path_interval #

fn (s &CSGPolygon3D) get_path_interval() f64

fn (CSGPolygon3D) set_path_simplify_angle #

fn (s &CSGPolygon3D) set_path_simplify_angle(degrees f64)

fn (CSGPolygon3D) get_path_simplify_angle #

fn (s &CSGPolygon3D) get_path_simplify_angle() f64

fn (CSGPolygon3D) set_path_rotation #

fn (s &CSGPolygon3D) set_path_rotation(path_rotation CSGPolygon3DPathRotation)

fn (CSGPolygon3D) get_path_rotation #

fn (s &CSGPolygon3D) get_path_rotation() CSGPolygon3DPathRotation

fn (CSGPolygon3D) set_path_rotation_accurate #

fn (s &CSGPolygon3D) set_path_rotation_accurate(enable bool)

fn (CSGPolygon3D) get_path_rotation_accurate #

fn (s &CSGPolygon3D) get_path_rotation_accurate() bool

fn (CSGPolygon3D) set_path_local #

fn (s &CSGPolygon3D) set_path_local(enable bool)

fn (CSGPolygon3D) is_path_local #

fn (s &CSGPolygon3D) is_path_local() bool

fn (CSGPolygon3D) set_path_continuous_u #

fn (s &CSGPolygon3D) set_path_continuous_u(enable bool)

fn (CSGPolygon3D) is_path_continuous_u #

fn (s &CSGPolygon3D) is_path_continuous_u() bool

fn (CSGPolygon3D) set_path_u_distance #

fn (s &CSGPolygon3D) set_path_u_distance(distance f64)

fn (CSGPolygon3D) get_path_u_distance #

fn (s &CSGPolygon3D) get_path_u_distance() f64

fn (CSGPolygon3D) set_path_joined #

fn (s &CSGPolygon3D) set_path_joined(enable bool)

fn (CSGPolygon3D) is_path_joined #

fn (s &CSGPolygon3D) is_path_joined() bool

fn (CSGPolygon3D) set_material #

fn (s &CSGPolygon3D) set_material(material Material)

fn (CSGPolygon3D) get_material #

fn (s &CSGPolygon3D) get_material() Material

fn (CSGPolygon3D) set_smooth_faces #

fn (s &CSGPolygon3D) set_smooth_faces(smooth_faces bool)

fn (CSGPolygon3D) get_smooth_faces #

fn (s &CSGPolygon3D) get_smooth_faces() bool

struct CSGPrimitive3D #

struct CSGPrimitive3D {
	CSGShape3D
}

Base class for CSG primitives.

fn (CSGPrimitive3D) to_variant #

fn (s &CSGPrimitive3D) to_variant() Variant

fn (CSGPrimitive3D) from_variant #

fn (mut s CSGPrimitive3D) from_variant(variant &Variant)

fn (CSGPrimitive3D) set_flip_faces #

fn (s &CSGPrimitive3D) set_flip_faces(flip_faces bool)

fn (CSGPrimitive3D) get_flip_faces #

fn (s &CSGPrimitive3D) get_flip_faces() bool

struct CSGShape3D #

struct CSGShape3D {
	GeometryInstance3D
}

The CSG base class.

fn (CSGShape3D) to_variant #

fn (s &CSGShape3D) to_variant() Variant

fn (CSGShape3D) from_variant #

fn (mut s CSGShape3D) from_variant(variant &Variant)

fn (CSGShape3D) is_root_shape #

fn (s &CSGShape3D) is_root_shape() bool

Returns true if this is a root shape and is thus the object that is rendered.

fn (CSGShape3D) set_operation #

fn (s &CSGShape3D) set_operation(operation CSGShape3DOperation)

fn (CSGShape3D) get_operation #

fn (s &CSGShape3D) get_operation() CSGShape3DOperation

fn (CSGShape3D) set_snap #

fn (s &CSGShape3D) set_snap(snap f64)

fn (CSGShape3D) get_snap #

fn (s &CSGShape3D) get_snap() f64

fn (CSGShape3D) set_use_collision #

fn (s &CSGShape3D) set_use_collision(operation bool)

fn (CSGShape3D) is_using_collision #

fn (s &CSGShape3D) is_using_collision() bool

fn (CSGShape3D) set_collision_layer #

fn (s &CSGShape3D) set_collision_layer(layer i64)

fn (CSGShape3D) get_collision_layer #

fn (s &CSGShape3D) get_collision_layer() i64

fn (CSGShape3D) set_collision_mask #

fn (s &CSGShape3D) set_collision_mask(mask i64)

fn (CSGShape3D) get_collision_mask #

fn (s &CSGShape3D) get_collision_mask() i64

fn (CSGShape3D) set_collision_mask_value #

fn (s &CSGShape3D) set_collision_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.

fn (CSGShape3D) get_collision_mask_value #

fn (s &CSGShape3D) get_collision_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (CSGShape3D) set_collision_layer_value #

fn (s &CSGShape3D) set_collision_layer_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.

fn (CSGShape3D) get_collision_layer_value #

fn (s &CSGShape3D) get_collision_layer_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.

fn (CSGShape3D) set_collision_priority #

fn (s &CSGShape3D) set_collision_priority(priority f64)

fn (CSGShape3D) get_collision_priority #

fn (s &CSGShape3D) get_collision_priority() f64

fn (CSGShape3D) bake_collision_shape #

fn (s &CSGShape3D) bake_collision_shape() ConcavePolygonShape3D

Returns a baked physics [ConcavePolygonShape3D] of this node's CSG operation result. Returns an empty shape if the node is not a CSG root node or has no valid geometry. [b]Performance:[/b] If the CSG operation results in a very detailed geometry with many faces physics performance will be very slow. Concave shapes should in general only be used for static level geometry and not with dynamic objects that are moving. [b]Note:[/b] CSG mesh data updates are deferred, which means they are updated with a delay of one rendered frame. To avoid getting an empty shape or outdated mesh data, make sure to call await get_tree().process_frame before using [method bake_collision_shape] in [method Node._ready] or after changing properties on the [CSGShape3D].

fn (CSGShape3D) set_calculate_tangents #

fn (s &CSGShape3D) set_calculate_tangents(enabled bool)

fn (CSGShape3D) is_calculating_tangents #

fn (s &CSGShape3D) is_calculating_tangents() bool

fn (CSGShape3D) get_meshes #

fn (s &CSGShape3D) get_meshes() Array

Returns an [Array] with two elements, the first is the [Transform3D] of this node and the second is the root [Mesh] of this node. Only works when this node is the root shape. [b]Note:[/b] CSG mesh data updates are deferred, which means they are updated with a delay of one rendered frame. To avoid getting an empty shape or outdated mesh data, make sure to call await get_tree().process_frame before using [method get_meshes] in [method Node._ready] or after changing properties on the [CSGShape3D].

fn (CSGShape3D) bake_static_mesh #

fn (s &CSGShape3D) bake_static_mesh() ArrayMesh

Returns a baked static [ArrayMesh] of this node's CSG operation result. Materials from involved CSG nodes are added as extra mesh surfaces. Returns an empty mesh if the node is not a CSG root node or has no valid geometry. [b]Note:[/b] CSG mesh data updates are deferred, which means they are updated with a delay of one rendered frame. To avoid getting an empty mesh or outdated mesh data, make sure to call await get_tree().process_frame before using [method bake_static_mesh] in [method Node._ready] or after changing properties on the [CSGShape3D].

struct CSGSphere3D #

struct CSGSphere3D {
	CSGPrimitive3D
}

A CSG Sphere shape.

fn (CSGSphere3D) to_variant #

fn (s &CSGSphere3D) to_variant() Variant

fn (CSGSphere3D) from_variant #

fn (mut s CSGSphere3D) from_variant(variant &Variant)

fn (CSGSphere3D) set_radius #

fn (s &CSGSphere3D) set_radius(radius f64)

fn (CSGSphere3D) get_radius #

fn (s &CSGSphere3D) get_radius() f64

fn (CSGSphere3D) set_radial_segments #

fn (s &CSGSphere3D) set_radial_segments(radial_segments i64)

fn (CSGSphere3D) get_radial_segments #

fn (s &CSGSphere3D) get_radial_segments() i64

fn (CSGSphere3D) set_rings #

fn (s &CSGSphere3D) set_rings(rings i64)

fn (CSGSphere3D) get_rings #

fn (s &CSGSphere3D) get_rings() i64

fn (CSGSphere3D) set_smooth_faces #

fn (s &CSGSphere3D) set_smooth_faces(smooth_faces bool)

fn (CSGSphere3D) get_smooth_faces #

fn (s &CSGSphere3D) get_smooth_faces() bool

fn (CSGSphere3D) set_material #

fn (s &CSGSphere3D) set_material(material Material)

fn (CSGSphere3D) get_material #

fn (s &CSGSphere3D) get_material() Material

struct CSGTorus3D #

struct CSGTorus3D {
	CSGPrimitive3D
}

A CSG Torus shape.

fn (CSGTorus3D) to_variant #

fn (s &CSGTorus3D) to_variant() Variant

fn (CSGTorus3D) from_variant #

fn (mut s CSGTorus3D) from_variant(variant &Variant)

fn (CSGTorus3D) set_inner_radius #

fn (s &CSGTorus3D) set_inner_radius(radius f64)

fn (CSGTorus3D) get_inner_radius #

fn (s &CSGTorus3D) get_inner_radius() f64

fn (CSGTorus3D) set_outer_radius #

fn (s &CSGTorus3D) set_outer_radius(radius f64)

fn (CSGTorus3D) get_outer_radius #

fn (s &CSGTorus3D) get_outer_radius() f64

fn (CSGTorus3D) set_sides #

fn (s &CSGTorus3D) set_sides(sides i64)

fn (CSGTorus3D) get_sides #

fn (s &CSGTorus3D) get_sides() i64

fn (CSGTorus3D) set_ring_sides #

fn (s &CSGTorus3D) set_ring_sides(sides i64)

fn (CSGTorus3D) get_ring_sides #

fn (s &CSGTorus3D) get_ring_sides() i64

fn (CSGTorus3D) set_material #

fn (s &CSGTorus3D) set_material(material Material)

fn (CSGTorus3D) get_material #

fn (s &CSGTorus3D) get_material() Material

fn (CSGTorus3D) set_smooth_faces #

fn (s &CSGTorus3D) set_smooth_faces(smooth_faces bool)

fn (CSGTorus3D) get_smooth_faces #

fn (s &CSGTorus3D) get_smooth_faces() bool

struct Callable #

@[packed]
struct Callable {
	data_ [16]u8
}

A built-in type representing a method or a standalone function.

[Callable] is a built-in [Variant] type that represents a function. It can either be a method within an [Object] instance, or a custom callable used for different purposes (see [method is_custom]). Like all [Variant] types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks. [codeblocks] [gdscript] func print_args(arg1, arg2, arg3 = ""): prints(arg1, arg2, arg3)

func test(): var callable = Callable(self, "print_args") callable.call("hello", "world") # Prints "hello world ". callable.call(Vector2.UP, 42, callable) # Prints "(0.0, -1.0) 42 Node(node.gd)::print_args" callable.call("invalid") # Invalid call, should have at least 2 arguments. [/gdscript] [csharp] // Default parameter values are not supported. public void PrintArgs(Variant arg1, Variant arg2, Variant arg3 = default) { GD.PrintS(arg1, arg2, arg3); }

public void Test() { // Invalid calls fail silently. Callable callable = new Callable(this, MethodName.PrintArgs); callable.Call("hello", "world"); // Default parameter values are not supported, should have 3 arguments. callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.cs)::PrintArgs" callable.Call("invalid"); // Invalid call, should have 3 arguments. } [/csharp] [/codeblocks] In GDScript, it's possible to create lambda functions within a method. Lambda functions are custom callables that are not associated with an [Object] instance. Optionally, lambda functions can also be named. The name will be displayed in the debugger, or when calling [method get_method].

func _init():
var my_lambda = func (message):
print(message)

##my_lambda.call('Hello everyone!')

##button_pressed.connect(func(): print('Attack!'))

In GDScript, you can access methods and global functions as [Callable]s:

tween.tween_callback(node.queue_free)  ##tween.tween_callback(array.clear)  ##tween.tween_callback(print.bind('Test'))  ##

[b]Note:[/b] [Dictionary] does not support the above due to ambiguity with keys.

var dictionary = { 'hello': 'world' }

##tween.tween_callback(dictionary.clear)

##tween.tween_callback(Callable.create(dictionary, 'clear'))

fn (Callable) deinit #

fn (s &Callable) deinit()

fn (Callable) callv #

fn (s &Callable) callv(arguments Array) Variant

Calls the method represented by this [Callable]. Unlike [method call], this method expects all arguments to be contained inside the [param arguments] [Array].

fn (Callable) is_null #

fn (s &Callable) is_null() bool

Returns true if this [Callable] has no target to call the method on. Equivalent to callable == Callable(). [b]Note:[/b] This is [i]not[/i] the same as not is_valid() and using not is_null() will [i]not[/i] guarantee that this callable can be called. Use [method is_valid] instead.

fn (Callable) is_custom #

fn (s &Callable) is_custom() bool

Returns true if this [Callable] is a custom callable. Custom callables are used:- for binding/unbinding arguments (see [method bind] and [method unbind]);

  • for representing methods of built-in [Variant] types (see [method create]);
  • for representing global, lambda, and RPC functions in GDScript;
  • for other purposes in the core, GDExtension, and C#.

fn (Callable) is_standard #

fn (s &Callable) is_standard() bool

Returns true if this [Callable] is a standard callable. This method is the opposite of [method is_custom]. Returns false if this callable is a lambda function.

fn (Callable) is_valid #

fn (s &Callable) is_valid() bool

Returns true if the callable's object exists and has a valid method name assigned, or is a custom callable.

fn (Callable) get_object #

fn (s &Callable) get_object() Object

Returns the object on which this [Callable] is called.

fn (Callable) get_object_id #

fn (s &Callable) get_object_id() i64

Returns the ID of this [Callable]'s object (see [method Object.get_instance_id]).

fn (Callable) get_method #

fn (s &Callable) get_method() StringName

Returns the name of the method represented by this [Callable]. If the callable is a GDScript lambda function, returns the function's name or "<anonymous lambda>".

fn (Callable) get_argument_count #

fn (s &Callable) get_argument_count() i64

Returns the total number of arguments this [Callable] should take, including optional arguments. This means that any arguments bound with [method bind] are [i]subtracted[/i] from the result, and any arguments unbound with [method unbind] are [i]added[/i] to the result.

fn (Callable) get_bound_arguments_count #

fn (s &Callable) get_bound_arguments_count() i64

Returns the total amount of arguments bound via successive [method bind] or [method unbind] calls. This is the same as the size of the array returned by [method get_bound_arguments]. See [method get_bound_arguments] for details. [b]Note:[/b] The [method get_bound_arguments_count] and [method get_unbound_arguments_count] methods can both return positive values.

fn (Callable) get_bound_arguments #

fn (s &Callable) get_bound_arguments() Array

Returns the array of arguments bound via successive [method bind] or [method unbind] calls. These arguments will be added [i]after[/i] the arguments passed to the call, from which [method get_unbound_arguments_count] arguments on the right have been previously excluded.

func get_effective_arguments(callable, call_args):
assert(call_args.size() - callable.get_unbound_arguments_count() >= 0)
var result = call_args.slice(0, call_args.size() - callable.get_unbound_arguments_count())
result.append_array(callable.get_bound_arguments())
return result

fn (Callable) get_unbound_arguments_count #

fn (s &Callable) get_unbound_arguments_count() i64

Returns the total amount of arguments unbound via successive [method bind] or [method unbind] calls. See [method get_bound_arguments] for details. [b]Note:[/b] The [method get_bound_arguments_count] and [method get_unbound_arguments_count] methods can both return positive values.

fn (Callable) hash #

fn (s &Callable) hash() i64

Returns the 32-bit hash value of this [Callable]'s object. [b]Note:[/b] [Callable]s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does [i]not[/i] imply the callables are equal, because different callables can have identical hash values due to hash collisions. The engine uses a 32-bit hash algorithm for [method hash].

fn (Callable) bindv #

fn (s &Callable) bindv(arguments Array) Callable

Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind]. [b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.

fn (Callable) unbind #

fn (s &Callable) unbind(argcount i64) Callable

Returns a copy of this [Callable] with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to [param argcount]. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also [method bind]. [b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.

func _ready():
foo.unbind(1).call(1, 2) ##foo.bind(3, 4).unbind(1).call(1, 2) ##

fn (Callable) call #

fn (s &Callable) call(varargs ...ToVariant) Variant

Calls the method represented by this [Callable]. Arguments can be passed and should match the method's signature.

fn (Callable) call_deferred #

fn (s &Callable) call_deferred(varargs ...ToVariant)

Calls the method represented by this [Callable] in deferred mode, i.e. at the end of the current frame. Arguments can be passed and should match the method's signature. [codeblocks] [gdscript] func _ready(): grab_focus.call_deferred() [/gdscript] [csharp] public override void _Ready() { Callable.From(GrabFocus).CallDeferred(); } [/csharp] [/codeblocks] [b]Note:[/b] Deferred calls are processed at idle time. Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly. See also [method Object.call_deferred].

fn (Callable) rpc #

fn (s &Callable) rpc(varargs ...ToVariant)

Perform an RPC (Remote Procedure Call) on all connected peers. This is used for multiplayer and is normally not available, unless the function being called has been marked as [i]RPC[/i] (using [annotation @GDScript.@rpc] or [method Node.rpc_config]). Calling this method on unsupported functions will result in an error. See [method Node.rpc].

fn (Callable) rpc_id #

fn (s &Callable) rpc_id(peer_id i64, varargs ...ToVariant)

Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i] (using [annotation @GDScript.@rpc] or [method Node.rpc_config]). Calling this method on unsupported functions will result in an error. See [method Node.rpc_id].

fn (Callable) bind #

fn (s &Callable) bind(varargs ...ToVariant) Callable

Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind]. [b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.

fn (Callable) to_variant #

fn (s &Callable) to_variant() Variant

fn (Callable) from_variant #

fn (mut s Callable) from_variant(variant &Variant)

fn (Callable) == #

fn (a Callable) == (b Callable) bool

Returns true if both [Callable]s invoke the same custom target.

fn (Callable) eq_callable #

fn (a Callable) eq_callable(b Callable) bool

Returns true if both [Callable]s invoke the same custom target.

fn (Callable) ne_callable #

fn (a Callable) ne_callable(b Callable) bool

Returns true if both [Callable]s invoke different targets.

fn (Callable) in_dictionary #

fn (a Callable) in_dictionary(b Dictionary) bool

fn (Callable) in_array #

fn (a Callable) in_array(b Array) bool

struct CallbackTweener #

struct CallbackTweener {
	Tweener
}

Calls the specified method after optional delay.

fn (CallbackTweener) to_variant #

fn (s &CallbackTweener) to_variant() Variant

fn (CallbackTweener) from_variant #

fn (mut s CallbackTweener) from_variant(variant &Variant)

fn (CallbackTweener) set_delay #

fn (s &CallbackTweener) set_delay(delay f64) CallbackTweener

Makes the callback call delayed by given time in seconds. [b]Example:[/b] Call [method Node.queue_free] after 2 seconds:

var tween = get_tree().create_tween()
tween.tween_callback(queue_free).set_delay(2)

struct Camera2D #

struct Camera2D {
	Node2D
}

Camera node for 2D scenes.

fn (Camera2D) to_variant #

fn (s &Camera2D) to_variant() Variant

fn (Camera2D) from_variant #

fn (mut s Camera2D) from_variant(variant &Variant)

fn (Camera2D) set_offset #

fn (s &Camera2D) set_offset(offset Vector2)

fn (Camera2D) get_offset #

fn (s &Camera2D) get_offset() Vector2

fn (Camera2D) set_anchor_mode #

fn (s &Camera2D) set_anchor_mode(anchor_mode Camera2DAnchorMode)

fn (Camera2D) get_anchor_mode #

fn (s &Camera2D) get_anchor_mode() Camera2DAnchorMode

fn (Camera2D) set_ignore_rotation #

fn (s &Camera2D) set_ignore_rotation(ignore bool)

fn (Camera2D) is_ignoring_rotation #

fn (s &Camera2D) is_ignoring_rotation() bool

fn (Camera2D) set_process_callback #

fn (s &Camera2D) set_process_callback(mode Camera2DProcessCallback)

fn (Camera2D) get_process_callback #

fn (s &Camera2D) get_process_callback() Camera2DProcessCallback

fn (Camera2D) set_enabled #

fn (s &Camera2D) set_enabled(enabled bool)

fn (Camera2D) is_enabled #

fn (s &Camera2D) is_enabled() bool

fn (Camera2D) make_current #

fn (s &Camera2D) make_current()

Forces this [Camera2D] to become the current active one. [member enabled] must be true.

fn (Camera2D) is_current #

fn (s &Camera2D) is_current() bool

Returns true if this [Camera2D] is the active camera (see [method Viewport.get_camera_2d]).

fn (Camera2D) set_limit_enabled #

fn (s &Camera2D) set_limit_enabled(limit_enabled bool)

fn (Camera2D) is_limit_enabled #

fn (s &Camera2D) is_limit_enabled() bool

fn (Camera2D) set_limit #

fn (s &Camera2D) set_limit(margin Side, limit i64)

Sets the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].

fn (Camera2D) get_limit #

fn (s &Camera2D) get_limit(margin Side) i64

Returns the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].

fn (Camera2D) set_limit_smoothing_enabled #

fn (s &Camera2D) set_limit_smoothing_enabled(limit_smoothing_enabled bool)

fn (Camera2D) is_limit_smoothing_enabled #

fn (s &Camera2D) is_limit_smoothing_enabled() bool

fn (Camera2D) set_drag_vertical_enabled #

fn (s &Camera2D) set_drag_vertical_enabled(enabled bool)

fn (Camera2D) is_drag_vertical_enabled #

fn (s &Camera2D) is_drag_vertical_enabled() bool

fn (Camera2D) set_drag_horizontal_enabled #

fn (s &Camera2D) set_drag_horizontal_enabled(enabled bool)

fn (Camera2D) is_drag_horizontal_enabled #

fn (s &Camera2D) is_drag_horizontal_enabled() bool

fn (Camera2D) set_drag_vertical_offset #

fn (s &Camera2D) set_drag_vertical_offset(offset f64)

fn (Camera2D) get_drag_vertical_offset #

fn (s &Camera2D) get_drag_vertical_offset() f64

fn (Camera2D) set_drag_horizontal_offset #

fn (s &Camera2D) set_drag_horizontal_offset(offset f64)

fn (Camera2D) get_drag_horizontal_offset #

fn (s &Camera2D) get_drag_horizontal_offset() f64

fn (Camera2D) set_drag_margin #

fn (s &Camera2D) set_drag_margin(margin Side, drag_margin f64)

Sets the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin].

fn (Camera2D) get_drag_margin #

fn (s &Camera2D) get_drag_margin(margin Side) f64

Returns the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin].

fn (Camera2D) get_target_position #

fn (s &Camera2D) get_target_position() Vector2

Returns this camera's target position, in global coordinates. [b]Note:[/b] The returned value is not the same as [member Node2D.global_position], as it is affected by the drag properties. It is also not the same as the current position if [member position_smoothing_enabled] is true (see [method get_screen_center_position]).

fn (Camera2D) get_screen_center_position #

fn (s &Camera2D) get_screen_center_position() Vector2

Returns the center of the screen from this camera's point of view, in global coordinates. [b]Note:[/b] The exact targeted position of the camera may be different. See [method get_target_position].

fn (Camera2D) get_screen_rotation #

fn (s &Camera2D) get_screen_rotation() f64

Returns the current screen rotation from this camera's point of view. [b]Note:[/b] The screen rotation can be different from [member Node2D.global_rotation] if the camera is rotating smoothly due to [member rotation_smoothing_enabled].

fn (Camera2D) set_zoom #

fn (s &Camera2D) set_zoom(zoom Vector2)

fn (Camera2D) get_zoom #

fn (s &Camera2D) get_zoom() Vector2

fn (Camera2D) set_custom_viewport #

fn (s &Camera2D) set_custom_viewport(viewport Node)

fn (Camera2D) get_custom_viewport #

fn (s &Camera2D) get_custom_viewport() Node

fn (Camera2D) set_position_smoothing_speed #

fn (s &Camera2D) set_position_smoothing_speed(position_smoothing_speed f64)

fn (Camera2D) get_position_smoothing_speed #

fn (s &Camera2D) get_position_smoothing_speed() f64

fn (Camera2D) set_position_smoothing_enabled #

fn (s &Camera2D) set_position_smoothing_enabled(position_smoothing_speed bool)

fn (Camera2D) is_position_smoothing_enabled #

fn (s &Camera2D) is_position_smoothing_enabled() bool

fn (Camera2D) set_rotation_smoothing_enabled #

fn (s &Camera2D) set_rotation_smoothing_enabled(enabled bool)

fn (Camera2D) is_rotation_smoothing_enabled #

fn (s &Camera2D) is_rotation_smoothing_enabled() bool

fn (Camera2D) set_rotation_smoothing_speed #

fn (s &Camera2D) set_rotation_smoothing_speed(speed f64)

fn (Camera2D) get_rotation_smoothing_speed #

fn (s &Camera2D) get_rotation_smoothing_speed() f64

fn (Camera2D) force_update_scroll #

fn (s &Camera2D) force_update_scroll()

Forces the camera to update scroll immediately.

fn (Camera2D) reset_smoothing #

fn (s &Camera2D) reset_smoothing()

Sets the camera's position immediately to its current smoothing destination. This method has no effect if [member position_smoothing_enabled] is false.

fn (Camera2D) align #

fn (s &Camera2D) align()

Aligns the camera to the tracked node.

fn (Camera2D) set_screen_drawing_enabled #

fn (s &Camera2D) set_screen_drawing_enabled(screen_drawing_enabled bool)

fn (Camera2D) is_screen_drawing_enabled #

fn (s &Camera2D) is_screen_drawing_enabled() bool

fn (Camera2D) set_limit_drawing_enabled #

fn (s &Camera2D) set_limit_drawing_enabled(limit_drawing_enabled bool)

fn (Camera2D) is_limit_drawing_enabled #

fn (s &Camera2D) is_limit_drawing_enabled() bool

fn (Camera2D) set_margin_drawing_enabled #

fn (s &Camera2D) set_margin_drawing_enabled(margin_drawing_enabled bool)

fn (Camera2D) is_margin_drawing_enabled #

fn (s &Camera2D) is_margin_drawing_enabled() bool

struct Camera3D #

struct Camera3D {
	Node3D
}

Camera node, displays from a point of view.

fn (Camera3D) to_variant #

fn (s &Camera3D) to_variant() Variant

fn (Camera3D) from_variant #

fn (mut s Camera3D) from_variant(variant &Variant)

fn (Camera3D) project_ray_normal #

fn (s &Camera3D) project_ray_normal(screen_point Vector2) Vector3

Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.

fn (Camera3D) project_local_ray_normal #

fn (s &Camera3D) project_local_ray_normal(screen_point Vector2) Vector3

Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc.

fn (Camera3D) project_ray_origin #

fn (s &Camera3D) project_ray_origin(screen_point Vector2) Vector3

Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.

fn (Camera3D) unproject_position #

fn (s &Camera3D) unproject_position(world_point Vector3) Vector2

Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in world space. [b]Note:[/b] When using this to position GUI elements over a 3D viewport, use [method is_position_behind] to prevent them from appearing if the 3D point is behind the camera:

####control.visible = not get_viewport().get_camera_3d().is_position_behind(global_transform.origin)
control.position = get_viewport().get_camera_3d().unproject_position(global_transform.origin)

fn (Camera3D) is_position_behind #

fn (s &Camera3D) is_position_behind(world_point Vector3) bool

Returns true if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods. [b]Note:[/b] A position which returns false may still be outside the camera's field of view.

fn (Camera3D) project_position #

fn (s &Camera3D) project_position(screen_point Vector2, z_depth f64) Vector3

Returns the 3D point in world space that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [param z_depth] distance into the scene away from the camera.

fn (Camera3D) set_perspective #

fn (s &Camera3D) set_perspective(fov f64, z_near f64, z_far f64)

Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [param fov] (field of view) angle in degrees, and the [param z_near] and [param z_far] clip planes in world space units.

fn (Camera3D) set_orthogonal #

fn (s &Camera3D) set_orthogonal(size f64, z_near f64, z_far f64)

Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [param size], and the [param z_near] and [param z_far] clip planes in world space units. As a hint, 3D games that look 2D often use this projection, with [param size] specified in pixels.

fn (Camera3D) set_frustum #

fn (s &Camera3D) set_frustum(size f64, offset Vector2, z_near f64, z_far f64)

Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [param size], an [param offset], and the [param z_near] and [param z_far] clip planes in world space units. See also [member frustum_offset].

fn (Camera3D) make_current #

fn (s &Camera3D) make_current()

Makes this camera the current camera for the [Viewport] (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added.

fn (Camera3D) clear_current #

fn (s &Camera3D) clear_current(cfg Camera3D_clear_current_Cfg)

If this is the current camera, remove it from being current. If [param enable_next] is true, request to make the next camera current, if any.

fn (Camera3D) set_current #

fn (s &Camera3D) set_current(enabled bool)

fn (Camera3D) is_current #

fn (s &Camera3D) is_current() bool

fn (Camera3D) get_camera_transform #

fn (s &Camera3D) get_camera_transform() Transform3D

Returns the transform of the camera plus the vertical ([member v_offset]) and horizontal ([member h_offset]) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as [XRCamera3D].

fn (Camera3D) get_camera_projection #

fn (s &Camera3D) get_camera_projection() Projection

Returns the projection matrix that this camera uses to render to its associated viewport. The camera must be part of the scene tree to function.

fn (Camera3D) get_fov #

fn (s &Camera3D) get_fov() f64

fn (Camera3D) get_frustum_offset #

fn (s &Camera3D) get_frustum_offset() Vector2

fn (Camera3D) get_size #

fn (s &Camera3D) get_size() f64

fn (Camera3D) get_far #

fn (s &Camera3D) get_far() f64

fn (Camera3D) get_near #

fn (s &Camera3D) get_near() f64

fn (Camera3D) set_fov #

fn (s &Camera3D) set_fov(fov f64)

fn (Camera3D) set_frustum_offset #

fn (s &Camera3D) set_frustum_offset(offset Vector2)

fn (Camera3D) set_size #

fn (s &Camera3D) set_size(size f64)

fn (Camera3D) set_far #

fn (s &Camera3D) set_far(far f64)

fn (Camera3D) set_near #

fn (s &Camera3D) set_near(near f64)

fn (Camera3D) get_projection #

fn (s &Camera3D) get_projection() Camera3DProjectionType

fn (Camera3D) set_projection #

fn (s &Camera3D) set_projection(mode Camera3DProjectionType)

fn (Camera3D) set_h_offset #

fn (s &Camera3D) set_h_offset(offset f64)

fn (Camera3D) get_h_offset #

fn (s &Camera3D) get_h_offset() f64

fn (Camera3D) set_v_offset #

fn (s &Camera3D) set_v_offset(offset f64)

fn (Camera3D) get_v_offset #

fn (s &Camera3D) get_v_offset() f64

fn (Camera3D) set_cull_mask #

fn (s &Camera3D) set_cull_mask(mask i64)

fn (Camera3D) get_cull_mask #

fn (s &Camera3D) get_cull_mask() i64

fn (Camera3D) set_environment #

fn (s &Camera3D) set_environment(env Environment)

fn (Camera3D) get_environment #

fn (s &Camera3D) get_environment() Environment

fn (Camera3D) set_attributes #

fn (s &Camera3D) set_attributes(env CameraAttributes)

fn (Camera3D) get_attributes #

fn (s &Camera3D) get_attributes() CameraAttributes

fn (Camera3D) set_compositor #

fn (s &Camera3D) set_compositor(compositor Compositor)

fn (Camera3D) get_compositor #

fn (s &Camera3D) get_compositor() Compositor

fn (Camera3D) set_keep_aspect_mode #

fn (s &Camera3D) set_keep_aspect_mode(mode Camera3DKeepAspect)

fn (Camera3D) get_keep_aspect_mode #

fn (s &Camera3D) get_keep_aspect_mode() Camera3DKeepAspect

fn (Camera3D) set_doppler_tracking #

fn (s &Camera3D) set_doppler_tracking(mode Camera3DDopplerTracking)

fn (Camera3D) get_doppler_tracking #

fn (s &Camera3D) get_doppler_tracking() Camera3DDopplerTracking

fn (Camera3D) get_frustum #

fn (s &Camera3D) get_frustum() Array

Returns the camera's frustum planes in world space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset].

fn (Camera3D) is_position_in_frustum #

fn (s &Camera3D) is_position_in_frustum(world_point Vector3) bool

Returns true if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.

fn (Camera3D) get_camera_rid #

fn (s &Camera3D) get_camera_rid() RID

Returns the camera's RID from the [RenderingServer].

fn (Camera3D) get_pyramid_shape_rid #

fn (s &Camera3D) get_pyramid_shape_rid() RID

Returns the RID of a pyramid shape encompassing the camera's view frustum, ignoring the camera's near plane. The tip of the pyramid represents the position of the camera.

fn (Camera3D) set_cull_mask_value #

fn (s &Camera3D) set_cull_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member cull_mask], given a [param layer_number] between 1 and 20.

fn (Camera3D) get_cull_mask_value #

fn (s &Camera3D) get_cull_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [param layer_number] between 1 and 20.

struct Camera3D_clear_current_Cfg #

@[params]
struct Camera3D_clear_current_Cfg {
pub:
	enable_next bool
}

Optional parameters for Camera3D#clear_current

struct CameraAttributes #

struct CameraAttributes {
	Resource
}

Parent class for camera settings.

fn (CameraAttributes) to_variant #

fn (s &CameraAttributes) to_variant() Variant

fn (CameraAttributes) from_variant #

fn (mut s CameraAttributes) from_variant(variant &Variant)

fn (CameraAttributes) set_exposure_multiplier #

fn (s &CameraAttributes) set_exposure_multiplier(multiplier f64)

fn (CameraAttributes) get_exposure_multiplier #

fn (s &CameraAttributes) get_exposure_multiplier() f64

fn (CameraAttributes) set_exposure_sensitivity #

fn (s &CameraAttributes) set_exposure_sensitivity(sensitivity f64)

fn (CameraAttributes) get_exposure_sensitivity #

fn (s &CameraAttributes) get_exposure_sensitivity() f64

fn (CameraAttributes) set_auto_exposure_enabled #

fn (s &CameraAttributes) set_auto_exposure_enabled(enabled bool)

fn (CameraAttributes) is_auto_exposure_enabled #

fn (s &CameraAttributes) is_auto_exposure_enabled() bool

fn (CameraAttributes) set_auto_exposure_speed #

fn (s &CameraAttributes) set_auto_exposure_speed(exposure_speed f64)

fn (CameraAttributes) get_auto_exposure_speed #

fn (s &CameraAttributes) get_auto_exposure_speed() f64

fn (CameraAttributes) set_auto_exposure_scale #

fn (s &CameraAttributes) set_auto_exposure_scale(exposure_grey f64)

fn (CameraAttributes) get_auto_exposure_scale #

fn (s &CameraAttributes) get_auto_exposure_scale() f64

struct CameraAttributesPhysical #

struct CameraAttributesPhysical {
	CameraAttributes
}

Physically-based camera settings.

fn (CameraAttributesPhysical) to_variant #

fn (s &CameraAttributesPhysical) to_variant() Variant

fn (CameraAttributesPhysical) from_variant #

fn (mut s CameraAttributesPhysical) from_variant(variant &Variant)

fn (CameraAttributesPhysical) set_aperture #

fn (s &CameraAttributesPhysical) set_aperture(aperture f64)

fn (CameraAttributesPhysical) get_aperture #

fn (s &CameraAttributesPhysical) get_aperture() f64

fn (CameraAttributesPhysical) set_shutter_speed #

fn (s &CameraAttributesPhysical) set_shutter_speed(shutter_speed f64)

fn (CameraAttributesPhysical) get_shutter_speed #

fn (s &CameraAttributesPhysical) get_shutter_speed() f64

fn (CameraAttributesPhysical) set_focal_length #

fn (s &CameraAttributesPhysical) set_focal_length(focal_length f64)

fn (CameraAttributesPhysical) get_focal_length #

fn (s &CameraAttributesPhysical) get_focal_length() f64

fn (CameraAttributesPhysical) set_focus_distance #

fn (s &CameraAttributesPhysical) set_focus_distance(focus_distance f64)

fn (CameraAttributesPhysical) get_focus_distance #

fn (s &CameraAttributesPhysical) get_focus_distance() f64

fn (CameraAttributesPhysical) set_near #

fn (s &CameraAttributesPhysical) set_near(near f64)

fn (CameraAttributesPhysical) get_near #

fn (s &CameraAttributesPhysical) get_near() f64

fn (CameraAttributesPhysical) set_far #

fn (s &CameraAttributesPhysical) set_far(far f64)

fn (CameraAttributesPhysical) get_far #

fn (s &CameraAttributesPhysical) get_far() f64

fn (CameraAttributesPhysical) get_fov #

fn (s &CameraAttributesPhysical) get_fov() f64

Returns the vertical field of view that corresponds to the [member frustum_focal_length]. This value is calculated internally whenever [member frustum_focal_length] is changed.

fn (CameraAttributesPhysical) set_auto_exposure_max_exposure_value #

fn (s &CameraAttributesPhysical) set_auto_exposure_max_exposure_value(exposure_value_max f64)

fn (CameraAttributesPhysical) get_auto_exposure_max_exposure_value #

fn (s &CameraAttributesPhysical) get_auto_exposure_max_exposure_value() f64

fn (CameraAttributesPhysical) set_auto_exposure_min_exposure_value #

fn (s &CameraAttributesPhysical) set_auto_exposure_min_exposure_value(exposure_value_min f64)

fn (CameraAttributesPhysical) get_auto_exposure_min_exposure_value #

fn (s &CameraAttributesPhysical) get_auto_exposure_min_exposure_value() f64

struct CameraAttributesPractical #

struct CameraAttributesPractical {
	CameraAttributes
}

Camera settings in an easy to use format.

fn (CameraAttributesPractical) to_variant #

fn (s &CameraAttributesPractical) to_variant() Variant

fn (CameraAttributesPractical) from_variant #

fn (mut s CameraAttributesPractical) from_variant(variant &Variant)

fn (CameraAttributesPractical) set_dof_blur_far_enabled #

fn (s &CameraAttributesPractical) set_dof_blur_far_enabled(enabled bool)

fn (CameraAttributesPractical) is_dof_blur_far_enabled #

fn (s &CameraAttributesPractical) is_dof_blur_far_enabled() bool

fn (CameraAttributesPractical) set_dof_blur_far_distance #

fn (s &CameraAttributesPractical) set_dof_blur_far_distance(distance f64)

fn (CameraAttributesPractical) get_dof_blur_far_distance #

fn (s &CameraAttributesPractical) get_dof_blur_far_distance() f64

fn (CameraAttributesPractical) set_dof_blur_far_transition #

fn (s &CameraAttributesPractical) set_dof_blur_far_transition(distance f64)

fn (CameraAttributesPractical) get_dof_blur_far_transition #

fn (s &CameraAttributesPractical) get_dof_blur_far_transition() f64

fn (CameraAttributesPractical) set_dof_blur_near_enabled #

fn (s &CameraAttributesPractical) set_dof_blur_near_enabled(enabled bool)

fn (CameraAttributesPractical) is_dof_blur_near_enabled #

fn (s &CameraAttributesPractical) is_dof_blur_near_enabled() bool

fn (CameraAttributesPractical) set_dof_blur_near_distance #

fn (s &CameraAttributesPractical) set_dof_blur_near_distance(distance f64)

fn (CameraAttributesPractical) get_dof_blur_near_distance #

fn (s &CameraAttributesPractical) get_dof_blur_near_distance() f64

fn (CameraAttributesPractical) set_dof_blur_near_transition #

fn (s &CameraAttributesPractical) set_dof_blur_near_transition(distance f64)

fn (CameraAttributesPractical) get_dof_blur_near_transition #

fn (s &CameraAttributesPractical) get_dof_blur_near_transition() f64

fn (CameraAttributesPractical) set_dof_blur_amount #

fn (s &CameraAttributesPractical) set_dof_blur_amount(amount f64)

fn (CameraAttributesPractical) get_dof_blur_amount #

fn (s &CameraAttributesPractical) get_dof_blur_amount() f64

fn (CameraAttributesPractical) set_auto_exposure_max_sensitivity #

fn (s &CameraAttributesPractical) set_auto_exposure_max_sensitivity(max_sensitivity f64)

fn (CameraAttributesPractical) get_auto_exposure_max_sensitivity #

fn (s &CameraAttributesPractical) get_auto_exposure_max_sensitivity() f64

fn (CameraAttributesPractical) set_auto_exposure_min_sensitivity #

fn (s &CameraAttributesPractical) set_auto_exposure_min_sensitivity(min_sensitivity f64)

fn (CameraAttributesPractical) get_auto_exposure_min_sensitivity #

fn (s &CameraAttributesPractical) get_auto_exposure_min_sensitivity() f64

struct CameraFeed #

struct CameraFeed {
	RefCounted
}

A camera feed gives you access to a single physical camera attached to your device.

fn (CameraFeed) to_variant #

fn (s &CameraFeed) to_variant() Variant

fn (CameraFeed) from_variant #

fn (mut s CameraFeed) from_variant(variant &Variant)

fn (CameraFeed) gd_activate_feed #

fn (s &CameraFeed) gd_activate_feed() bool

Called when the camera feed is activated.

fn (CameraFeed) gd_deactivate_feed #

fn (s &CameraFeed) gd_deactivate_feed()

Called when the camera feed is deactivated.

fn (CameraFeed) get_id #

fn (s &CameraFeed) get_id() i64

Returns the unique ID for this feed.

fn (CameraFeed) is_active #

fn (s &CameraFeed) is_active() bool

fn (CameraFeed) set_active #

fn (s &CameraFeed) set_active(active bool)

fn (CameraFeed) get_name #

fn (s &CameraFeed) get_name() string

Returns the camera's name.

fn (CameraFeed) set_name #

fn (s &CameraFeed) set_name(name string)

Sets the camera's name.

fn (CameraFeed) get_position #

fn (s &CameraFeed) get_position() CameraFeedFeedPosition

Returns the position of camera on the device.

fn (CameraFeed) set_position #

fn (s &CameraFeed) set_position(position CameraFeedFeedPosition)

Sets the position of this camera.

fn (CameraFeed) get_transform #

fn (s &CameraFeed) get_transform() Transform2D

fn (CameraFeed) set_transform #

fn (s &CameraFeed) set_transform(transform Transform2D)

fn (CameraFeed) set_rgb_image #

fn (s &CameraFeed) set_rgb_image(rgb_image Image)

Sets RGB image for this feed.

fn (CameraFeed) set_ycbcr_image #

fn (s &CameraFeed) set_ycbcr_image(ycbcr_image Image)

Sets YCbCr image for this feed.

fn (CameraFeed) set_external #

fn (s &CameraFeed) set_external(width i64, height i64)

Sets the feed as external feed provided by another library.

fn (CameraFeed) get_texture_tex_id #

fn (s &CameraFeed) get_texture_tex_id(feed_image_type CameraServerFeedImage) i64

Returns the texture backend ID (usable by some external libraries that need a handle to a texture to write data).

fn (CameraFeed) get_datatype #

fn (s &CameraFeed) get_datatype() CameraFeedFeedDataType

Returns feed image data type.

fn (CameraFeed) get_formats #

fn (s &CameraFeed) get_formats() Array

fn (CameraFeed) set_format #

fn (s &CameraFeed) set_format(index i64, parameters Dictionary) bool

Sets the feed format parameters for the given [param index] in the [member formats] array. Returns true on success. By default, the YUYV encoded stream is transformed to [constant FEED_RGB]. The YUYV encoded stream output format can be changed by setting [param parameters]'s output entry to one of the following:- "separate" will result in [constant FEED_YCBCR_SEP];

  • "grayscale" will result in desaturated [constant FEED_RGB];
  • "copy" will result in [constant FEED_YCBCR].

struct CameraServer #

struct CameraServer {
	Object
}

Server keeping track of different cameras accessible in Godot.

fn (CameraServer) to_variant #

fn (s &CameraServer) to_variant() Variant

fn (CameraServer) from_variant #

fn (mut s CameraServer) from_variant(variant &Variant)

fn (CameraServer) set_monitoring_feeds #

fn (s &CameraServer) set_monitoring_feeds(is_monitoring_feeds bool)

fn (CameraServer) is_monitoring_feeds #

fn (s &CameraServer) is_monitoring_feeds() bool

fn (CameraServer) get_feed #

fn (s &CameraServer) get_feed(index i64) CameraFeed

Returns the [CameraFeed] corresponding to the camera with the given [param index].

fn (CameraServer) get_feed_count #

fn (s &CameraServer) get_feed_count() i64

Returns the number of [CameraFeed]s registered.

fn (CameraServer) feeds #

fn (s &CameraServer) feeds() Array

Returns an array of [CameraFeed]s.

fn (CameraServer) add_feed #

fn (s &CameraServer) add_feed(feed CameraFeed)

Adds the camera [param feed] to the camera server.

fn (CameraServer) remove_feed #

fn (s &CameraServer) remove_feed(feed CameraFeed)

Removes the specified camera [param feed].

struct CameraTexture #

struct CameraTexture {
	Texture2D
}

Texture provided by a [CameraFeed].

fn (CameraTexture) to_variant #

fn (s &CameraTexture) to_variant() Variant

fn (CameraTexture) from_variant #

fn (mut s CameraTexture) from_variant(variant &Variant)

fn (CameraTexture) set_camera_feed_id #

fn (s &CameraTexture) set_camera_feed_id(feed_id i64)

fn (CameraTexture) get_camera_feed_id #

fn (s &CameraTexture) get_camera_feed_id() i64

fn (CameraTexture) set_which_feed #

fn (s &CameraTexture) set_which_feed(which_feed CameraServerFeedImage)

fn (CameraTexture) get_which_feed #

fn (s &CameraTexture) get_which_feed() CameraServerFeedImage

fn (CameraTexture) set_camera_active #

fn (s &CameraTexture) set_camera_active(active bool)

fn (CameraTexture) get_camera_active #

fn (s &CameraTexture) get_camera_active() bool

struct CanvasGroup #

struct CanvasGroup {
	Node2D
}

Merges several 2D nodes into a single draw operation.

fn (CanvasGroup) to_variant #

fn (s &CanvasGroup) to_variant() Variant

fn (CanvasGroup) from_variant #

fn (mut s CanvasGroup) from_variant(variant &Variant)

fn (CanvasGroup) set_fit_margin #

fn (s &CanvasGroup) set_fit_margin(fit_margin f64)

fn (CanvasGroup) get_fit_margin #

fn (s &CanvasGroup) get_fit_margin() f64

fn (CanvasGroup) set_clear_margin #

fn (s &CanvasGroup) set_clear_margin(clear_margin f64)

fn (CanvasGroup) get_clear_margin #

fn (s &CanvasGroup) get_clear_margin() f64

fn (CanvasGroup) set_use_mipmaps #

fn (s &CanvasGroup) set_use_mipmaps(use_mipmaps bool)

fn (CanvasGroup) is_using_mipmaps #

fn (s &CanvasGroup) is_using_mipmaps() bool

struct CanvasItem #

struct CanvasItem {
	Node
}

Abstract base class for everything in 2D space.

fn (CanvasItem) to_variant #

fn (s &CanvasItem) to_variant() Variant

fn (CanvasItem) from_variant #

fn (mut s CanvasItem) from_variant(variant &Variant)

fn (CanvasItem) gd_draw #

fn (s &CanvasItem) gd_draw()

Called when [CanvasItem] has been requested to redraw (after [method queue_redraw] is called, either manually or by the engine). Corresponds to the [constant NOTIFICATION_DRAW] notification in [method Object._notification].

fn (CanvasItem) get_canvas_item #

fn (s &CanvasItem) get_canvas_item() RID

Returns the internal canvas item [RID] used by the [RenderingServer] for this node.

fn (CanvasItem) set_visible #

fn (s &CanvasItem) set_visible(visible bool)

fn (CanvasItem) is_visible #

fn (s &CanvasItem) is_visible() bool

fn (CanvasItem) is_visible_in_tree #

fn (s &CanvasItem) is_visible_in_tree() bool

Returns true if the node is present in the [SceneTree], its [member visible] property is true and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see [method _draw]). Visibility is checked only in parent nodes that inherit from [CanvasItem], [CanvasLayer], and [Window]. If the parent is of any other type (such as [Node], [AnimationPlayer], or [Node3D]), it is assumed to be visible. [b]Note:[/b] This method does not take [member visibility_layer] into account, so even if this method returns true, the node might end up not being rendered.

fn (CanvasItem) show #

fn (s &CanvasItem) show()

Show the [CanvasItem] if it's currently hidden. This is equivalent to setting [member visible] to true. [b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple popup*() functions instead.

fn (CanvasItem) hide #

fn (s &CanvasItem) hide()

Hide the [CanvasItem] if it's currently visible. This is equivalent to setting [member visible] to false.

fn (CanvasItem) queue_redraw #

fn (s &CanvasItem) queue_redraw()

Queues the [CanvasItem] to redraw. During idle time, if [CanvasItem] is visible, [constant NOTIFICATION_DRAW] is sent and [method _draw] is called. This only occurs [b]once[/b] per frame, even if this method has been called multiple times.

fn (CanvasItem) move_to_front #

fn (s &CanvasItem) move_to_front()

Moves this node below its siblings, usually causing the node to draw on top of its siblings. Does nothing if this node does not have a parent. See also [method Node.move_child].

fn (CanvasItem) set_as_top_level #

fn (s &CanvasItem) set_as_top_level(enable bool)

fn (CanvasItem) is_set_as_top_level #

fn (s &CanvasItem) is_set_as_top_level() bool

fn (CanvasItem) set_light_mask #

fn (s &CanvasItem) set_light_mask(light_mask i64)

fn (CanvasItem) get_light_mask #

fn (s &CanvasItem) get_light_mask() i64

fn (CanvasItem) set_modulate #

fn (s &CanvasItem) set_modulate(modulate Color)

fn (CanvasItem) get_modulate #

fn (s &CanvasItem) get_modulate() Color

fn (CanvasItem) set_self_modulate #

fn (s &CanvasItem) set_self_modulate(self_modulate Color)

fn (CanvasItem) get_self_modulate #

fn (s &CanvasItem) get_self_modulate() Color

fn (CanvasItem) set_z_index #

fn (s &CanvasItem) set_z_index(z_index i64)

fn (CanvasItem) get_z_index #

fn (s &CanvasItem) get_z_index() i64

fn (CanvasItem) set_z_as_relative #

fn (s &CanvasItem) set_z_as_relative(enable bool)

fn (CanvasItem) is_z_relative #

fn (s &CanvasItem) is_z_relative() bool

fn (CanvasItem) set_y_sort_enabled #

fn (s &CanvasItem) set_y_sort_enabled(enabled bool)

fn (CanvasItem) is_y_sort_enabled #

fn (s &CanvasItem) is_y_sort_enabled() bool

fn (CanvasItem) set_draw_behind_parent #

fn (s &CanvasItem) set_draw_behind_parent(enable bool)

fn (CanvasItem) is_draw_behind_parent_enabled #

fn (s &CanvasItem) is_draw_behind_parent_enabled() bool

fn (CanvasItem) draw_line #

fn (s &CanvasItem) draw_line(from Vector2, to Vector2, color Color, cfg CanvasItem_draw_line_Cfg)

Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also [method draw_dashed_line], [method draw_multiline], and [method draw_polyline]. If [param width] is negative, then a two-point primitive will be drawn instead of a four-point one. This means that when the CanvasItem is scaled, the line will remain thin. If this behavior is not desired, then pass a positive [param width] like 1.0.

fn (CanvasItem) draw_dashed_line #

fn (s &CanvasItem) draw_dashed_line(from Vector2, to Vector2, color Color, cfg CanvasItem_draw_dashed_line_Cfg)

Draws a dashed line from a 2D point to another, with a given color and width. See also [method draw_line], [method draw_multiline], and [method draw_polyline]. If [param width] is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive [param width] like 1.0. [param dash] is the length of each dash in pixels, with the gap between each dash being the same length. If [param aligned] is true, the length of the first and last dashes may be shortened or lengthened to allow the line to begin and end at the precise points defined by [param from] and [param to]. Both ends are always symmetrical when [param aligned] is true. If [param aligned] is false, all dashes will have the same length, but the line may appear incomplete at the end due to the dash length not dividing evenly into the line length. Only full dashes are drawn when [param aligned] is false. If [param antialiased] is true, half transparent "feathers" will be attached to the boundary, making outlines smooth. [b]Note:[/b] [param antialiased] is only effective if [param width] is greater than 0.0.

fn (CanvasItem) draw_polyline #

fn (s &CanvasItem) draw_polyline(points PackedVector2Array, color Color, cfg CanvasItem_draw_polyline_Cfg)

Draws interconnected line segments with a uniform [param color] and [param width] and optional antialiasing (supported only for positive [param width]). When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline] instead. See also [method draw_polygon]. If [param width] is negative, it will be ignored and the polyline will be drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive [param width] like 1.0.

fn (CanvasItem) draw_polyline_colors #

fn (s &CanvasItem) draw_polyline_colors(points PackedVector2Array, colors PackedColorArray, cfg CanvasItem_draw_polyline_colors_Cfg)

Draws interconnected line segments with a uniform [param width], point-by-point coloring, and optional antialiasing (supported only for positive [param width]). Colors assigned to line points match by index between [param points] and [param colors], i.e. each line segment is filled with a gradient between the colors of the endpoints. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline_colors] instead. See also [method draw_polygon]. If [param width] is negative, it will be ignored and the polyline will be drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive [param width] like 1.0.

fn (CanvasItem) draw_arc #

fn (s &CanvasItem) draw_arc(center Vector2, radius f64, start_angle f64, end_angle f64, point_count i64, color Color, cfg CanvasItem_draw_arc_Cfg)

Draws an unfilled arc between the given angles with a uniform [param color] and [param width] and optional antialiasing (supported only for positive [param width]). The larger the value of [param point_count], the smoother the curve. See also [method draw_circle]. If [param width] is negative, it will be ignored and the arc will be drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive [param width] like 1.0. The arc is drawn from [param start_angle] towards the value of [param end_angle] so in clockwise direction if start_angle < end_angle and counter-clockwise otherwise. Passing the same angles but in reversed order will produce the same arc. If absolute difference of [param start_angle] and [param end_angle] is greater than [constant @GDScript.TAU] radians, then a full circle arc is drawn (i.e. arc will not overlap itself).

fn (CanvasItem) draw_multiline #

fn (s &CanvasItem) draw_multiline(points PackedVector2Array, color Color, cfg CanvasItem_draw_multiline_Cfg)

Draws multiple disconnected lines with a uniform [param width] and [param color]. Each line is defined by two consecutive points from [param points] array, i.e. i-th segment consists of points[2 * i], points[2 * i + 1] endpoints. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead. If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like 1.0. [b]Note:[/b] [param antialiased] is only effective if [param width] is greater than 0.0.

fn (CanvasItem) draw_multiline_colors #

fn (s &CanvasItem) draw_multiline_colors(points PackedVector2Array, colors PackedColorArray, cfg CanvasItem_draw_multiline_colors_Cfg)

Draws multiple disconnected lines with a uniform [param width] and segment-by-segment coloring. Each segment is defined by two consecutive points from [param points] array and a corresponding color from [param colors] array, i.e. i-th segment consists of points[2 * i], points[2 * i + 1] endpoints and has colors[i] color. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead. If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like 1.0. [b]Note:[/b] [param antialiased] is only effective if [param width] is greater than 0.0.

fn (CanvasItem) draw_rect #

fn (s &CanvasItem) draw_rect(rect Rect2, color Color, cfg CanvasItem_draw_rect_Cfg)

Draws a rectangle. If [param filled] is true, the rectangle will be filled with the [param color] specified. If [param filled] is false, the rectangle will be drawn as a stroke with the [param color] and [param width] specified. See also [method draw_texture_rect]. If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like 1.0. If [param antialiased] is true, half transparent "feathers" will be attached to the boundary, making outlines smooth. [b]Note:[/b] [param width] is only effective if [param filled] is false. [b]Note:[/b] Unfilled rectangles drawn with a negative [param width] may not display perfectly. For example, corners may be missing or brighter due to overlapping lines (for a translucent [param color]).

fn (CanvasItem) draw_circle #

fn (s &CanvasItem) draw_circle(position Vector2, radius f64, color Color, cfg CanvasItem_draw_circle_Cfg)

Draws a circle. See also [method draw_arc], [method draw_polyline], and [method draw_polygon]. If [param filled] is true, the circle will be filled with the [param color] specified. If [param filled] is false, the circle will be drawn as a stroke with the [param color] and [param width] specified. If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like 1.0. If [param antialiased] is true, half transparent "feathers" will be attached to the boundary, making outlines smooth. [b]Note:[/b] [param width] is only effective if [param filled] is false.

fn (CanvasItem) draw_texture #

fn (s &CanvasItem) draw_texture(texture Texture2D, position Vector2, cfg CanvasItem_draw_texture_Cfg)

Draws a texture at a given position.

fn (CanvasItem) draw_texture_rect #

fn (s &CanvasItem) draw_texture_rect(texture Texture2D, rect Rect2, tile bool, cfg CanvasItem_draw_texture_rect_Cfg)

Draws a textured rectangle at a given position, optionally modulated by a color. If [param transpose] is true, the texture will have its X and Y coordinates swapped. See also [method draw_rect] and [method draw_texture_rect_region].

fn (CanvasItem) draw_texture_rect_region #

fn (s &CanvasItem) draw_texture_rect_region(texture Texture2D, rect Rect2, src_rect Rect2, cfg CanvasItem_draw_texture_rect_region_Cfg)

Draws a textured rectangle from a texture's region (specified by [param src_rect]) at a given position, optionally modulated by a color. If [param transpose] is true, the texture will have its X and Y coordinates swapped. See also [method draw_texture_rect].

fn (CanvasItem) draw_msdf_texture_rect_region #

fn (s &CanvasItem) draw_msdf_texture_rect_region(texture Texture2D, rect Rect2, src_rect Rect2, cfg CanvasItem_draw_msdf_texture_rect_region_Cfg)

Draws a textured rectangle region of the multichannel signed distance field texture at a given position, optionally modulated by a color. See [member FontFile.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering. If [param outline] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [param outline] radius. Value of the [param pixel_range] should the same that was used during distance field texture generation.

fn (CanvasItem) draw_lcd_texture_rect_region #

fn (s &CanvasItem) draw_lcd_texture_rect_region(texture Texture2D, rect Rect2, src_rect Rect2, cfg CanvasItem_draw_lcd_texture_rect_region_Cfg)

Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color. Texture is drawn using the following blend operation, blend mode of the [CanvasItemMaterial] is ignored:

dst.r = texture.r * modulate.r * modulate.a + dst.r * (1.0 - texture.r * modulate.a);
dst.g = texture.g * modulate.g * modulate.a + dst.g * (1.0 - texture.g * modulate.a);
dst.b = texture.b * modulate.b * modulate.a + dst.b * (1.0 - texture.b * modulate.a);
dst.a = modulate.a + dst.a * (1.0 - modulate.a);

fn (CanvasItem) draw_style_box #

fn (s &CanvasItem) draw_style_box(style_box StyleBox, rect Rect2)

Draws a styled rectangle.

fn (CanvasItem) draw_primitive #

fn (s &CanvasItem) draw_primitive(points PackedVector2Array, colors PackedColorArray, uvs PackedVector2Array, cfg CanvasItem_draw_primitive_Cfg)

Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also [method draw_line], [method draw_polyline], [method draw_polygon], and [method draw_rect].

fn (CanvasItem) draw_polygon #

fn (s &CanvasItem) draw_polygon(points PackedVector2Array, colors PackedColorArray, cfg CanvasItem_draw_polygon_Cfg)

Draws a solid polygon of any number of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors]. If you need more flexibility (such as being able to use bones), use [method RenderingServer.canvas_item_add_triangle_array] instead. [b]Note:[/b] If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with [method Geometry2D.triangulate_polygon] and using [method draw_mesh], [method draw_multimesh], or [method RenderingServer.canvas_item_add_triangle_array].

fn (CanvasItem) draw_colored_polygon #

fn (s &CanvasItem) draw_colored_polygon(points PackedVector2Array, color Color, cfg CanvasItem_draw_colored_polygon_Cfg)

Draws a colored polygon of any number of points, convex or concave. Unlike [method draw_polygon], a single color must be specified for the whole polygon. [b]Note:[/b] If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with [method Geometry2D.triangulate_polygon] and using [method draw_mesh], [method draw_multimesh], or [method RenderingServer.canvas_item_add_triangle_array].

fn (CanvasItem) draw_string #

fn (s &CanvasItem) draw_string(font Font, pos Vector2, text string, cfg CanvasItem_draw_string_Cfg)

Draws [param text] using the specified [param font] at the [param pos] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. [b]Example:[/b] Draw "Hello world", using the project's default font: [codeblocks] [gdscript]# If using this method in a script that redraws constantly, move the

default_font declaration to a member variable assigned in _ready()

so the Control is only created once.

var default_font = ThemeDB.fallback_font var default_font_size = ThemeDB.fallback_font_size draw_string(default_font, Vector2(64, 64), "Hello world", HORIZONTAL_ALIGNMENT_LEFT, -1, default_font_size) [/gdscript] [csharp] // If using this method in a script that redraws constantly, move the // default_font declaration to a member variable assigned in _Ready() // so the Control is only created once. Font defaultFont = ThemeDB.FallbackFont; int defaultFontSize = ThemeDB.FallbackFontSize; DrawString(defaultFont, new Vector2(64, 64), "Hello world", HORIZONTAL_ALIGNMENT_LEFT, -1, defaultFontSize); [/csharp] [/codeblocks] See also [method Font.draw_string].

fn (CanvasItem) draw_multiline_string #

fn (s &CanvasItem) draw_multiline_string(font Font, pos Vector2, text string, cfg CanvasItem_draw_multiline_string_Cfg)

Breaks [param text] into lines and draws it using the specified [param font] at the [param pos] (top-left corner). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (CanvasItem) draw_string_outline #

fn (s &CanvasItem) draw_string_outline(font Font, pos Vector2, text string, cfg CanvasItem_draw_string_outline_Cfg)

Draws [param text] outline using the specified [param font] at the [param pos] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (CanvasItem) draw_multiline_string_outline #

fn (s &CanvasItem) draw_multiline_string_outline(font Font, pos Vector2, text string, cfg CanvasItem_draw_multiline_string_outline_Cfg)

Breaks [param text] to the lines and draws text outline using the specified [param font] at the [param pos] (top-left corner). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (CanvasItem) draw_char #

fn (s &CanvasItem) draw_char(font Font, pos Vector2, gd_char string, cfg CanvasItem_draw_char_Cfg)

Draws a string first character using a custom font. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (CanvasItem) draw_char_outline #

fn (s &CanvasItem) draw_char_outline(font Font, pos Vector2, gd_char string, cfg CanvasItem_draw_char_outline_Cfg)

Draws a string first character outline using a custom font. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (CanvasItem) draw_mesh #

fn (s &CanvasItem) draw_mesh(mesh Mesh, texture Texture2D, cfg CanvasItem_draw_mesh_Cfg)

Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation.

fn (CanvasItem) draw_multimesh #

fn (s &CanvasItem) draw_multimesh(multimesh MultiMesh, texture Texture2D)

Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation.

fn (CanvasItem) draw_set_transform #

fn (s &CanvasItem) draw_set_transform(position Vector2, cfg CanvasItem_draw_set_transform_Cfg)

Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this. [b]Note:[/b] [member FontFile.oversampling] does [i]not[/i] take [param scale] into account. This means that scaling up/down will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated. To ensure text remains crisp regardless of scale, you can enable MSDF font rendering by enabling [member ProjectSettings.gui/theme/default_font_multichannel_signed_distance_field] (applies to the default project font only), or enabling [b]Multichannel Signed Distance Field[/b] in the import options of a DynamicFont for custom fonts. On system fonts, [member SystemFont.multichannel_signed_distance_field] can be enabled in the inspector.

fn (CanvasItem) draw_set_transform_matrix #

fn (s &CanvasItem) draw_set_transform_matrix(xform Transform2D)

Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this.

fn (CanvasItem) draw_animation_slice #

fn (s &CanvasItem) draw_animation_slice(animation_length f64, slice_begin f64, slice_end f64, cfg CanvasItem_draw_animation_slice_Cfg)

Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly.

fn (CanvasItem) draw_end_animation #

fn (s &CanvasItem) draw_end_animation()

After submitting all animations slices via [method draw_animation_slice], this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required.

fn (CanvasItem) get_transform #

fn (s &CanvasItem) get_transform() Transform2D

Returns the transform matrix of this [CanvasItem].

fn (CanvasItem) get_global_transform #

fn (s &CanvasItem) get_global_transform() Transform2D

Returns the global transform matrix of this item, i.e. the combined transform up to the topmost [CanvasItem] node. The topmost item is a [CanvasItem] that either has no parent, has non-[CanvasItem] parent or it has [member top_level] enabled.

fn (CanvasItem) get_global_transform_with_canvas #

fn (s &CanvasItem) get_global_transform_with_canvas() Transform2D

Returns the transform from the local coordinate system of this [CanvasItem] to the [Viewport]s coordinate system.

fn (CanvasItem) get_viewport_transform #

fn (s &CanvasItem) get_viewport_transform() Transform2D

Returns the transform of this node, converted from its registered canvas's coordinate system to its viewport embedder's coordinate system. See also [method Viewport.get_final_transform] and [method Node.get_viewport].

fn (CanvasItem) get_viewport_rect #

fn (s &CanvasItem) get_viewport_rect() Rect2

Returns this node's viewport boundaries as a [Rect2]. See also [method Node.get_viewport].

fn (CanvasItem) get_canvas_transform #

fn (s &CanvasItem) get_canvas_transform() Transform2D

Returns the transform of this node, converted from its registered canvas's coordinate system to its viewport's coordinate system. See also [method Node.get_viewport].

fn (CanvasItem) get_screen_transform #

fn (s &CanvasItem) get_screen_transform() Transform2D

Returns the transform of this [CanvasItem] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. Equals to [method get_global_transform] if the window is embedded (see [member Viewport.gui_embed_subwindows]).

fn (CanvasItem) get_local_mouse_position #

fn (s &CanvasItem) get_local_mouse_position() Vector2

Returns the mouse's position in this [CanvasItem] using the local coordinate system of this [CanvasItem].

fn (CanvasItem) get_global_mouse_position #

fn (s &CanvasItem) get_global_mouse_position() Vector2

Returns mouse cursor's global position relative to the [CanvasLayer] that contains this node. [b]Note:[/b] For screen-space coordinates (e.g. when using a non-embedded [Popup]), you can use [method DisplayServer.mouse_get_position].

fn (CanvasItem) get_canvas #

fn (s &CanvasItem) get_canvas() RID

Returns the [RID] of the [World2D] canvas where this node is registered to, used by the [RenderingServer].

fn (CanvasItem) get_canvas_layer_node #

fn (s &CanvasItem) get_canvas_layer_node() CanvasLayer

Returns the [CanvasLayer] that contains this node, or null if the node is not in any [CanvasLayer].

fn (CanvasItem) get_world_2d #

fn (s &CanvasItem) get_world_2d() World2D

Returns the [World2D] this node is registered to. Usually, this is the same as this node's viewport (see [method Node.get_viewport] and [method Viewport.find_world_2d]).

fn (CanvasItem) set_material #

fn (s &CanvasItem) set_material(material Material)

fn (CanvasItem) get_material #

fn (s &CanvasItem) get_material() Material

fn (CanvasItem) set_instance_shader_parameter #

fn (s &CanvasItem) set_instance_shader_parameter(name string, value_ ToVariant)

Set the value of a shader uniform for this instance only ([url=$DOCS_URL/tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms]per-instance uniform[/url]). See also [method ShaderMaterial.set_shader_parameter] to assign a uniform on all instances using the same [ShaderMaterial]. [b]Note:[/b] For a shader uniform to be assignable on a per-instance basis, it [i]must[/i] be defined with instance uniform ... rather than uniform ... in the shader code. [b]Note:[/b] [param name] is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector).

fn (CanvasItem) get_instance_shader_parameter #

fn (s &CanvasItem) get_instance_shader_parameter(name string) Variant

Get the value of a shader parameter as set on this instance.

fn (CanvasItem) set_use_parent_material #

fn (s &CanvasItem) set_use_parent_material(enable bool)

fn (CanvasItem) get_use_parent_material #

fn (s &CanvasItem) get_use_parent_material() bool

fn (CanvasItem) set_notify_local_transform #

fn (s &CanvasItem) set_notify_local_transform(enable bool)

If true, the node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever its local transform changes. [b]Note:[/b] Many canvas items such as [Bone2D] or [CollisionShape2D] automatically enable this in order to function correctly.

fn (CanvasItem) is_local_transform_notification_enabled #

fn (s &CanvasItem) is_local_transform_notification_enabled() bool

Returns true if the node receives [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever its local transform changes. This is enabled with [method set_notify_local_transform].

fn (CanvasItem) set_notify_transform #

fn (s &CanvasItem) set_notify_transform(enable bool)

If true, the node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] whenever global transform changes. [b]Note:[/b] Many canvas items such as [Camera2D] or [Light2D] automatically enable this in order to function correctly.

fn (CanvasItem) is_transform_notification_enabled #

fn (s &CanvasItem) is_transform_notification_enabled() bool

Returns true if the node receives [constant NOTIFICATION_TRANSFORM_CHANGED] whenever its global transform changes. This is enabled with [method set_notify_transform].

fn (CanvasItem) force_update_transform #

fn (s &CanvasItem) force_update_transform()

Forces the node's transform to update. Fails if the node is not inside the tree. See also [method get_transform]. [b]Note:[/b] For performance reasons, transform changes are usually accumulated and applied [i]once[/i] at the end of the frame. The update propagates through [CanvasItem] children, as well. Therefore, use this method only when you need an up-to-date transform (such as during physics operations).

fn (CanvasItem) make_canvas_position_local #

fn (s &CanvasItem) make_canvas_position_local(viewport_point Vector2) Vector2

Transforms [param viewport_point] from the viewport's coordinates to this node's local coordinates. For the opposite operation, use [method get_global_transform_with_canvas].

var viewport_point = get_global_transform_with_canvas() * local_point

fn (CanvasItem) make_input_local #

fn (s &CanvasItem) make_input_local(event InputEvent) InputEvent

Returns a copy of the given [param event] with its coordinates converted from global space to this [CanvasItem]'s local space. If not possible, returns the same [InputEvent] unchanged.

fn (CanvasItem) set_visibility_layer #

fn (s &CanvasItem) set_visibility_layer(layer i64)

fn (CanvasItem) get_visibility_layer #

fn (s &CanvasItem) get_visibility_layer() i64

fn (CanvasItem) set_visibility_layer_bit #

fn (s &CanvasItem) set_visibility_layer_bit(layer i64, enabled bool)

Set/clear individual bits on the rendering visibility layer. This simplifies editing this [CanvasItem]'s visibility layer.

fn (CanvasItem) get_visibility_layer_bit #

fn (s &CanvasItem) get_visibility_layer_bit(layer i64) bool

Returns true if the layer at the given index is set in [member visibility_layer].

fn (CanvasItem) set_texture_filter #

fn (s &CanvasItem) set_texture_filter(mode CanvasItemTextureFilter)

fn (CanvasItem) get_texture_filter #

fn (s &CanvasItem) get_texture_filter() CanvasItemTextureFilter

fn (CanvasItem) set_texture_repeat #

fn (s &CanvasItem) set_texture_repeat(mode CanvasItemTextureRepeat)

fn (CanvasItem) get_texture_repeat #

fn (s &CanvasItem) get_texture_repeat() CanvasItemTextureRepeat

fn (CanvasItem) set_clip_children_mode #

fn (s &CanvasItem) set_clip_children_mode(mode CanvasItemClipChildrenMode)

fn (CanvasItem) get_clip_children_mode #

fn (s &CanvasItem) get_clip_children_mode() CanvasItemClipChildrenMode

struct CanvasItemMaterial #

struct CanvasItemMaterial {
	Material
}

A material for [CanvasItem]s.

fn (CanvasItemMaterial) to_variant #

fn (s &CanvasItemMaterial) to_variant() Variant

fn (CanvasItemMaterial) from_variant #

fn (mut s CanvasItemMaterial) from_variant(variant &Variant)

fn (CanvasItemMaterial) set_blend_mode #

fn (s &CanvasItemMaterial) set_blend_mode(blend_mode CanvasItemMaterialBlendMode)

fn (CanvasItemMaterial) get_blend_mode #

fn (s &CanvasItemMaterial) get_blend_mode() CanvasItemMaterialBlendMode

fn (CanvasItemMaterial) set_light_mode #

fn (s &CanvasItemMaterial) set_light_mode(light_mode CanvasItemMaterialLightMode)

fn (CanvasItemMaterial) get_light_mode #

fn (s &CanvasItemMaterial) get_light_mode() CanvasItemMaterialLightMode

fn (CanvasItemMaterial) set_particles_animation #

fn (s &CanvasItemMaterial) set_particles_animation(particles_anim bool)

fn (CanvasItemMaterial) get_particles_animation #

fn (s &CanvasItemMaterial) get_particles_animation() bool

fn (CanvasItemMaterial) set_particles_anim_h_frames #

fn (s &CanvasItemMaterial) set_particles_anim_h_frames(frames i64)

fn (CanvasItemMaterial) get_particles_anim_h_frames #

fn (s &CanvasItemMaterial) get_particles_anim_h_frames() i64

fn (CanvasItemMaterial) set_particles_anim_v_frames #

fn (s &CanvasItemMaterial) set_particles_anim_v_frames(frames i64)

fn (CanvasItemMaterial) get_particles_anim_v_frames #

fn (s &CanvasItemMaterial) get_particles_anim_v_frames() i64

fn (CanvasItemMaterial) set_particles_anim_loop #

fn (s &CanvasItemMaterial) set_particles_anim_loop(loop bool)

fn (CanvasItemMaterial) get_particles_anim_loop #

fn (s &CanvasItemMaterial) get_particles_anim_loop() bool

struct CanvasItem_draw_animation_slice_Cfg #

@[params]
struct CanvasItem_draw_animation_slice_Cfg {
pub:
	offset f64 = 0.0
}

Optional parameters for CanvasItem#draw_animation_slice

struct CanvasItem_draw_arc_Cfg #

@[params]
struct CanvasItem_draw_arc_Cfg {
pub:
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for CanvasItem#draw_arc

struct CanvasItem_draw_char_Cfg #

@[params]
struct CanvasItem_draw_char_Cfg {
pub:
	font_size    i64   = 16
	modulate     Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for CanvasItem#draw_char

struct CanvasItem_draw_char_outline_Cfg #

@[params]
struct CanvasItem_draw_char_outline_Cfg {
pub:
	font_size    i64   = 16
	size         i64   = -1
	modulate     Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for CanvasItem#draw_char_outline

struct CanvasItem_draw_circle_Cfg #

@[params]
struct CanvasItem_draw_circle_Cfg {
pub:
	filled      bool
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for CanvasItem#draw_circle

struct CanvasItem_draw_colored_polygon_Cfg #

@[params]
struct CanvasItem_draw_colored_polygon_Cfg {
pub:
	uvs     PackedVector2Array = PackedVector2Array{}
	texture Texture2D
}

Optional parameters for CanvasItem#draw_colored_polygon

struct CanvasItem_draw_dashed_line_Cfg #

@[params]
struct CanvasItem_draw_dashed_line_Cfg {
pub:
	width       f64 = -1.0
	dash        f64 = 2.0
	aligned     bool
	antialiased bool
}

Optional parameters for CanvasItem#draw_dashed_line

struct CanvasItem_draw_lcd_texture_rect_region_Cfg #

@[params]
struct CanvasItem_draw_lcd_texture_rect_region_Cfg {
pub:
	modulate Color = Color{1, 1, 1, 1}
}

Optional parameters for CanvasItem#draw_lcd_texture_rect_region

struct CanvasItem_draw_line_Cfg #

@[params]
struct CanvasItem_draw_line_Cfg {
pub:
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for CanvasItem#draw_line

struct CanvasItem_draw_mesh_Cfg #

@[params]
struct CanvasItem_draw_mesh_Cfg {
pub:
	transform Transform2D = Transform2D{Vector2{1, 0}, Vector2{0, 1}, Vector2{0, 0}}
	modulate  Color       = Color{1, 1, 1, 1}
}

Optional parameters for CanvasItem#draw_mesh

struct CanvasItem_draw_msdf_texture_rect_region_Cfg #

@[params]
struct CanvasItem_draw_msdf_texture_rect_region_Cfg {
pub:
	modulate    Color = Color{1, 1, 1, 1}
	outline     f64   = 0.0
	pixel_range f64   = 4.0
	scale       f64   = 1.0
}

Optional parameters for CanvasItem#draw_msdf_texture_rect_region

struct CanvasItem_draw_multiline_Cfg #

@[params]
struct CanvasItem_draw_multiline_Cfg {
pub:
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for CanvasItem#draw_multiline

struct CanvasItem_draw_multiline_colors_Cfg #

@[params]
struct CanvasItem_draw_multiline_colors_Cfg {
pub:
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for CanvasItem#draw_multiline_colors

struct CanvasItem_draw_multiline_string_Cfg #

@[params]
struct CanvasItem_draw_multiline_string_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	max_lines           i64                 = -1
	modulate            Color               = Color{1, 1, 1, 1}
	brk_flags           TextServerLineBreakFlag
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
	oversampling        f64                   = 0.0
}

Optional parameters for CanvasItem#draw_multiline_string

struct CanvasItem_draw_multiline_string_outline_Cfg #

@[params]
struct CanvasItem_draw_multiline_string_outline_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	max_lines           i64                 = -1
	size                i64                 = 1
	modulate            Color               = Color{1, 1, 1, 1}
	brk_flags           TextServerLineBreakFlag
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
	oversampling        f64                   = 0.0
}

Optional parameters for CanvasItem#draw_multiline_string_outline

struct CanvasItem_draw_polygon_Cfg #

@[params]
struct CanvasItem_draw_polygon_Cfg {
pub:
	uvs     PackedVector2Array = PackedVector2Array{}
	texture Texture2D
}

Optional parameters for CanvasItem#draw_polygon

struct CanvasItem_draw_polyline_Cfg #

@[params]
struct CanvasItem_draw_polyline_Cfg {
pub:
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for CanvasItem#draw_polyline

struct CanvasItem_draw_polyline_colors_Cfg #

@[params]
struct CanvasItem_draw_polyline_colors_Cfg {
pub:
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for CanvasItem#draw_polyline_colors

struct CanvasItem_draw_primitive_Cfg #

@[params]
struct CanvasItem_draw_primitive_Cfg {
pub:
	texture Texture2D
}

Optional parameters for CanvasItem#draw_primitive

struct CanvasItem_draw_rect_Cfg #

@[params]
struct CanvasItem_draw_rect_Cfg {
pub:
	filled      bool
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for CanvasItem#draw_rect

struct CanvasItem_draw_set_transform_Cfg #

@[params]
struct CanvasItem_draw_set_transform_Cfg {
pub:
	rotation f64     = 0.0
	scale    Vector2 = Vector2{1, 1}
}

Optional parameters for CanvasItem#draw_set_transform

struct CanvasItem_draw_string_Cfg #

@[params]
struct CanvasItem_draw_string_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	modulate            Color               = Color{1, 1, 1, 1}
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
	oversampling        f64                   = 0.0
}

Optional parameters for CanvasItem#draw_string

struct CanvasItem_draw_string_outline_Cfg #

@[params]
struct CanvasItem_draw_string_outline_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	size                i64                 = 1
	modulate            Color               = Color{1, 1, 1, 1}
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
	oversampling        f64                   = 0.0
}

Optional parameters for CanvasItem#draw_string_outline

struct CanvasItem_draw_texture_Cfg #

@[params]
struct CanvasItem_draw_texture_Cfg {
pub:
	modulate Color = Color{1, 1, 1, 1}
}

Optional parameters for CanvasItem#draw_texture

struct CanvasItem_draw_texture_rect_Cfg #

@[params]
struct CanvasItem_draw_texture_rect_Cfg {
pub:
	modulate  Color = Color{1, 1, 1, 1}
	transpose bool
}

Optional parameters for CanvasItem#draw_texture_rect

struct CanvasItem_draw_texture_rect_region_Cfg #

@[params]
struct CanvasItem_draw_texture_rect_region_Cfg {
pub:
	modulate  Color = Color{1, 1, 1, 1}
	transpose bool
	clip_uv   bool
}

Optional parameters for CanvasItem#draw_texture_rect_region

struct CanvasLayer #

struct CanvasLayer {
	Node
}

A node used for independent rendering of objects within a 2D scene.

fn (CanvasLayer) to_variant #

fn (s &CanvasLayer) to_variant() Variant

fn (CanvasLayer) from_variant #

fn (mut s CanvasLayer) from_variant(variant &Variant)

fn (CanvasLayer) set_layer #

fn (s &CanvasLayer) set_layer(layer i64)

fn (CanvasLayer) get_layer #

fn (s &CanvasLayer) get_layer() i64

fn (CanvasLayer) set_visible #

fn (s &CanvasLayer) set_visible(visible bool)

fn (CanvasLayer) is_visible #

fn (s &CanvasLayer) is_visible() bool

fn (CanvasLayer) show #

fn (s &CanvasLayer) show()

Shows any [CanvasItem] under this [CanvasLayer]. This is equivalent to setting [member visible] to true.

fn (CanvasLayer) hide #

fn (s &CanvasLayer) hide()

Hides any [CanvasItem] under this [CanvasLayer]. This is equivalent to setting [member visible] to false.

fn (CanvasLayer) set_transform #

fn (s &CanvasLayer) set_transform(transform Transform2D)

fn (CanvasLayer) get_transform #

fn (s &CanvasLayer) get_transform() Transform2D

fn (CanvasLayer) get_final_transform #

fn (s &CanvasLayer) get_final_transform() Transform2D

Returns the transform from the [CanvasLayer]s coordinate system to the [Viewport]s coordinate system.

fn (CanvasLayer) set_offset #

fn (s &CanvasLayer) set_offset(offset Vector2)

fn (CanvasLayer) get_offset #

fn (s &CanvasLayer) get_offset() Vector2

fn (CanvasLayer) set_rotation #

fn (s &CanvasLayer) set_rotation(radians f64)

fn (CanvasLayer) get_rotation #

fn (s &CanvasLayer) get_rotation() f64

fn (CanvasLayer) set_scale #

fn (s &CanvasLayer) set_scale(scale Vector2)

fn (CanvasLayer) get_scale #

fn (s &CanvasLayer) get_scale() Vector2

fn (CanvasLayer) set_follow_viewport #

fn (s &CanvasLayer) set_follow_viewport(enable bool)

fn (CanvasLayer) is_following_viewport #

fn (s &CanvasLayer) is_following_viewport() bool

fn (CanvasLayer) set_follow_viewport_scale #

fn (s &CanvasLayer) set_follow_viewport_scale(scale f64)

fn (CanvasLayer) get_follow_viewport_scale #

fn (s &CanvasLayer) get_follow_viewport_scale() f64

fn (CanvasLayer) set_custom_viewport #

fn (s &CanvasLayer) set_custom_viewport(viewport Node)

fn (CanvasLayer) get_custom_viewport #

fn (s &CanvasLayer) get_custom_viewport() Node

fn (CanvasLayer) get_canvas #

fn (s &CanvasLayer) get_canvas() RID

Returns the RID of the canvas used by this layer.

struct CanvasModulate #

struct CanvasModulate {
	Node2D
}

A node that applies a color tint to a canvas.

fn (CanvasModulate) to_variant #

fn (s &CanvasModulate) to_variant() Variant

fn (CanvasModulate) from_variant #

fn (mut s CanvasModulate) from_variant(variant &Variant)

fn (CanvasModulate) set_color #

fn (s &CanvasModulate) set_color(color Color)

fn (CanvasModulate) get_color #

fn (s &CanvasModulate) get_color() Color

struct CanvasTexture #

struct CanvasTexture {
	Texture2D
}

Texture with optional normal and specular maps for use in 2D rendering.

fn (CanvasTexture) to_variant #

fn (s &CanvasTexture) to_variant() Variant

fn (CanvasTexture) from_variant #

fn (mut s CanvasTexture) from_variant(variant &Variant)

fn (CanvasTexture) set_diffuse_texture #

fn (s &CanvasTexture) set_diffuse_texture(texture Texture2D)

fn (CanvasTexture) get_diffuse_texture #

fn (s &CanvasTexture) get_diffuse_texture() Texture2D

fn (CanvasTexture) set_normal_texture #

fn (s &CanvasTexture) set_normal_texture(texture Texture2D)

fn (CanvasTexture) get_normal_texture #

fn (s &CanvasTexture) get_normal_texture() Texture2D

fn (CanvasTexture) set_specular_texture #

fn (s &CanvasTexture) set_specular_texture(texture Texture2D)

fn (CanvasTexture) get_specular_texture #

fn (s &CanvasTexture) get_specular_texture() Texture2D

fn (CanvasTexture) set_specular_color #

fn (s &CanvasTexture) set_specular_color(color Color)

fn (CanvasTexture) get_specular_color #

fn (s &CanvasTexture) get_specular_color() Color

fn (CanvasTexture) set_specular_shininess #

fn (s &CanvasTexture) set_specular_shininess(shininess f64)

fn (CanvasTexture) get_specular_shininess #

fn (s &CanvasTexture) get_specular_shininess() f64

fn (CanvasTexture) set_texture_filter #

fn (s &CanvasTexture) set_texture_filter(filter CanvasItemTextureFilter)

fn (CanvasTexture) get_texture_filter #

fn (s &CanvasTexture) get_texture_filter() CanvasItemTextureFilter

fn (CanvasTexture) set_texture_repeat #

fn (s &CanvasTexture) set_texture_repeat(repeat CanvasItemTextureRepeat)

fn (CanvasTexture) get_texture_repeat #

fn (s &CanvasTexture) get_texture_repeat() CanvasItemTextureRepeat

struct CapsuleMesh #

struct CapsuleMesh {
	PrimitiveMesh
}

Class representing a capsule-shaped [PrimitiveMesh].

fn (CapsuleMesh) to_variant #

fn (s &CapsuleMesh) to_variant() Variant

fn (CapsuleMesh) from_variant #

fn (mut s CapsuleMesh) from_variant(variant &Variant)

fn (CapsuleMesh) set_radius #

fn (s &CapsuleMesh) set_radius(radius f64)

fn (CapsuleMesh) get_radius #

fn (s &CapsuleMesh) get_radius() f64

fn (CapsuleMesh) set_height #

fn (s &CapsuleMesh) set_height(height f64)

fn (CapsuleMesh) get_height #

fn (s &CapsuleMesh) get_height() f64

fn (CapsuleMesh) set_radial_segments #

fn (s &CapsuleMesh) set_radial_segments(segments i64)

fn (CapsuleMesh) get_radial_segments #

fn (s &CapsuleMesh) get_radial_segments() i64

fn (CapsuleMesh) set_rings #

fn (s &CapsuleMesh) set_rings(rings i64)

fn (CapsuleMesh) get_rings #

fn (s &CapsuleMesh) get_rings() i64

struct CapsuleShape2D #

struct CapsuleShape2D {
	Shape2D
}

A 2D capsule shape used for physics collision.

fn (CapsuleShape2D) to_variant #

fn (s &CapsuleShape2D) to_variant() Variant

fn (CapsuleShape2D) from_variant #

fn (mut s CapsuleShape2D) from_variant(variant &Variant)

fn (CapsuleShape2D) set_radius #

fn (s &CapsuleShape2D) set_radius(radius f64)

fn (CapsuleShape2D) get_radius #

fn (s &CapsuleShape2D) get_radius() f64

fn (CapsuleShape2D) set_height #

fn (s &CapsuleShape2D) set_height(height f64)

fn (CapsuleShape2D) get_height #

fn (s &CapsuleShape2D) get_height() f64

fn (CapsuleShape2D) set_mid_height #

fn (s &CapsuleShape2D) set_mid_height(mid_height f64)

fn (CapsuleShape2D) get_mid_height #

fn (s &CapsuleShape2D) get_mid_height() f64

struct CapsuleShape3D #

struct CapsuleShape3D {
	Shape3D
}

A 3D capsule shape used for physics collision.

fn (CapsuleShape3D) to_variant #

fn (s &CapsuleShape3D) to_variant() Variant

fn (CapsuleShape3D) from_variant #

fn (mut s CapsuleShape3D) from_variant(variant &Variant)

fn (CapsuleShape3D) set_radius #

fn (s &CapsuleShape3D) set_radius(radius f64)

fn (CapsuleShape3D) get_radius #

fn (s &CapsuleShape3D) get_radius() f64

fn (CapsuleShape3D) set_height #

fn (s &CapsuleShape3D) set_height(height f64)

fn (CapsuleShape3D) get_height #

fn (s &CapsuleShape3D) get_height() f64

fn (CapsuleShape3D) set_mid_height #

fn (s &CapsuleShape3D) set_mid_height(mid_height f64)

fn (CapsuleShape3D) get_mid_height #

fn (s &CapsuleShape3D) get_mid_height() f64

struct CaretInfo #

struct CaretInfo {
pub mut:
	leading_caret      Rect2
	trailing_caret     Rect2
	leading_direction  TextServerDirection
	trailing_direction TextServerDirection
}

struct CenterContainer #

struct CenterContainer {
	Container
}

A container that keeps child controls in its center.

fn (CenterContainer) to_variant #

fn (s &CenterContainer) to_variant() Variant

fn (CenterContainer) from_variant #

fn (mut s CenterContainer) from_variant(variant &Variant)

fn (CenterContainer) set_use_top_left #

fn (s &CenterContainer) set_use_top_left(enable bool)

fn (CenterContainer) is_using_top_left #

fn (s &CenterContainer) is_using_top_left() bool

struct CharFXTransform #

struct CharFXTransform {
	RefCounted
}

Controls how an individual character will be displayed in a [RichTextEffect].

fn (CharFXTransform) to_variant #

fn (s &CharFXTransform) to_variant() Variant

fn (CharFXTransform) from_variant #

fn (mut s CharFXTransform) from_variant(variant &Variant)

fn (CharFXTransform) get_transform #

fn (s &CharFXTransform) get_transform() Transform2D

fn (CharFXTransform) set_transform #

fn (s &CharFXTransform) set_transform(transform Transform2D)

fn (CharFXTransform) get_range #

fn (s &CharFXTransform) get_range() Vector2i

fn (CharFXTransform) set_range #

fn (s &CharFXTransform) set_range(range Vector2i)

fn (CharFXTransform) get_elapsed_time #

fn (s &CharFXTransform) get_elapsed_time() f64

fn (CharFXTransform) set_elapsed_time #

fn (s &CharFXTransform) set_elapsed_time(time f64)

fn (CharFXTransform) is_visible #

fn (s &CharFXTransform) is_visible() bool

fn (CharFXTransform) set_visibility #

fn (s &CharFXTransform) set_visibility(visibility bool)

fn (CharFXTransform) is_outline #

fn (s &CharFXTransform) is_outline() bool

fn (CharFXTransform) set_outline #

fn (s &CharFXTransform) set_outline(outline bool)

fn (CharFXTransform) get_offset #

fn (s &CharFXTransform) get_offset() Vector2

fn (CharFXTransform) set_offset #

fn (s &CharFXTransform) set_offset(offset Vector2)

fn (CharFXTransform) get_color #

fn (s &CharFXTransform) get_color() Color

fn (CharFXTransform) set_color #

fn (s &CharFXTransform) set_color(color Color)

fn (CharFXTransform) get_environment #

fn (s &CharFXTransform) get_environment() Dictionary

fn (CharFXTransform) set_environment #

fn (s &CharFXTransform) set_environment(environment Dictionary)

fn (CharFXTransform) get_glyph_index #

fn (s &CharFXTransform) get_glyph_index() i64

fn (CharFXTransform) set_glyph_index #

fn (s &CharFXTransform) set_glyph_index(glyph_index i64)

fn (CharFXTransform) get_relative_index #

fn (s &CharFXTransform) get_relative_index() i64

fn (CharFXTransform) set_relative_index #

fn (s &CharFXTransform) set_relative_index(relative_index i64)

fn (CharFXTransform) get_glyph_count #

fn (s &CharFXTransform) get_glyph_count() i64

fn (CharFXTransform) set_glyph_count #

fn (s &CharFXTransform) set_glyph_count(glyph_count i64)

fn (CharFXTransform) get_glyph_flags #

fn (s &CharFXTransform) get_glyph_flags() i64

fn (CharFXTransform) set_glyph_flags #

fn (s &CharFXTransform) set_glyph_flags(glyph_flags i64)

fn (CharFXTransform) get_font #

fn (s &CharFXTransform) get_font() RID

fn (CharFXTransform) set_font #

fn (s &CharFXTransform) set_font(font RID)

struct CharacterBody2D #

struct CharacterBody2D {
	PhysicsBody2D
}

A 2D physics body specialized for characters moved by script.

fn (CharacterBody2D) to_variant #

fn (s &CharacterBody2D) to_variant() Variant

fn (CharacterBody2D) from_variant #

fn (mut s CharacterBody2D) from_variant(variant &Variant)

fn (CharacterBody2D) move_and_slide #

fn (s &CharacterBody2D) move_and_slide() bool

Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision]. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. The general behavior and available properties change according to the [member motion_mode]. Returns true if the body collided, otherwise, returns false.

fn (CharacterBody2D) apply_floor_snap #

fn (s &CharacterBody2D) apply_floor_snap()

Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when [method is_on_floor] returns true.

fn (CharacterBody2D) set_velocity #

fn (s &CharacterBody2D) set_velocity(velocity Vector2)

fn (CharacterBody2D) get_velocity #

fn (s &CharacterBody2D) get_velocity() Vector2

fn (CharacterBody2D) set_safe_margin #

fn (s &CharacterBody2D) set_safe_margin(margin f64)

fn (CharacterBody2D) get_safe_margin #

fn (s &CharacterBody2D) get_safe_margin() f64

fn (CharacterBody2D) is_floor_stop_on_slope_enabled #

fn (s &CharacterBody2D) is_floor_stop_on_slope_enabled() bool

fn (CharacterBody2D) set_floor_stop_on_slope_enabled #

fn (s &CharacterBody2D) set_floor_stop_on_slope_enabled(enabled bool)

fn (CharacterBody2D) set_floor_constant_speed_enabled #

fn (s &CharacterBody2D) set_floor_constant_speed_enabled(enabled bool)

fn (CharacterBody2D) is_floor_constant_speed_enabled #

fn (s &CharacterBody2D) is_floor_constant_speed_enabled() bool

fn (CharacterBody2D) set_floor_block_on_wall_enabled #

fn (s &CharacterBody2D) set_floor_block_on_wall_enabled(enabled bool)

fn (CharacterBody2D) is_floor_block_on_wall_enabled #

fn (s &CharacterBody2D) is_floor_block_on_wall_enabled() bool

fn (CharacterBody2D) set_slide_on_ceiling_enabled #

fn (s &CharacterBody2D) set_slide_on_ceiling_enabled(enabled bool)

fn (CharacterBody2D) is_slide_on_ceiling_enabled #

fn (s &CharacterBody2D) is_slide_on_ceiling_enabled() bool

fn (CharacterBody2D) set_platform_floor_layers #

fn (s &CharacterBody2D) set_platform_floor_layers(exclude_layer i64)

fn (CharacterBody2D) get_platform_floor_layers #

fn (s &CharacterBody2D) get_platform_floor_layers() i64

fn (CharacterBody2D) set_platform_wall_layers #

fn (s &CharacterBody2D) set_platform_wall_layers(exclude_layer i64)

fn (CharacterBody2D) get_platform_wall_layers #

fn (s &CharacterBody2D) get_platform_wall_layers() i64

fn (CharacterBody2D) get_max_slides #

fn (s &CharacterBody2D) get_max_slides() i64

fn (CharacterBody2D) set_max_slides #

fn (s &CharacterBody2D) set_max_slides(max_slides i64)

fn (CharacterBody2D) get_floor_max_angle #

fn (s &CharacterBody2D) get_floor_max_angle() f64

fn (CharacterBody2D) set_floor_max_angle #

fn (s &CharacterBody2D) set_floor_max_angle(radians f64)

fn (CharacterBody2D) get_floor_snap_length #

fn (s &CharacterBody2D) get_floor_snap_length() f64

fn (CharacterBody2D) set_floor_snap_length #

fn (s &CharacterBody2D) set_floor_snap_length(floor_snap_length f64)

fn (CharacterBody2D) get_wall_min_slide_angle #

fn (s &CharacterBody2D) get_wall_min_slide_angle() f64

fn (CharacterBody2D) set_wall_min_slide_angle #

fn (s &CharacterBody2D) set_wall_min_slide_angle(radians f64)

fn (CharacterBody2D) get_up_direction #

fn (s &CharacterBody2D) get_up_direction() Vector2

fn (CharacterBody2D) set_up_direction #

fn (s &CharacterBody2D) set_up_direction(up_direction Vector2)

fn (CharacterBody2D) set_motion_mode #

fn (s &CharacterBody2D) set_motion_mode(mode CharacterBody2DMotionMode)

fn (CharacterBody2D) get_motion_mode #

fn (s &CharacterBody2D) get_motion_mode() CharacterBody2DMotionMode

fn (CharacterBody2D) set_platform_on_leave #

fn (s &CharacterBody2D) set_platform_on_leave(on_leave_apply_velocity CharacterBody2DPlatformOnLeave)

fn (CharacterBody2D) get_platform_on_leave #

fn (s &CharacterBody2D) get_platform_on_leave() CharacterBody2DPlatformOnLeave

fn (CharacterBody2D) is_on_floor #

fn (s &CharacterBody2D) is_on_floor() bool

Returns true if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not.

fn (CharacterBody2D) is_on_floor_only #

fn (s &CharacterBody2D) is_on_floor_only() bool

Returns true if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not.

fn (CharacterBody2D) is_on_ceiling #

fn (s &CharacterBody2D) is_on_ceiling() bool

Returns true if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not.

fn (CharacterBody2D) is_on_ceiling_only #

fn (s &CharacterBody2D) is_on_ceiling_only() bool

Returns true if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not.

fn (CharacterBody2D) is_on_wall #

fn (s &CharacterBody2D) is_on_wall() bool

Returns true if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not.

fn (CharacterBody2D) is_on_wall_only #

fn (s &CharacterBody2D) is_on_wall_only() bool

Returns true if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not.

fn (CharacterBody2D) get_floor_normal #

fn (s &CharacterBody2D) get_floor_normal() Vector2

Returns the collision normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns true. [b]Warning:[/b] The collision normal is not always the same as the surface normal.

fn (CharacterBody2D) get_wall_normal #

fn (s &CharacterBody2D) get_wall_normal() Vector2

Returns the collision normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns true. [b]Warning:[/b] The collision normal is not always the same as the surface normal.

fn (CharacterBody2D) get_last_motion #

fn (s &CharacterBody2D) get_last_motion() Vector2

Returns the last motion applied to the [CharacterBody2D] during the last call to [method move_and_slide]. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement.

fn (CharacterBody2D) get_position_delta #

fn (s &CharacterBody2D) get_position_delta() Vector2

Returns the travel (position delta) that occurred during the last call to [method move_and_slide].

fn (CharacterBody2D) get_real_velocity #

fn (s &CharacterBody2D) get_real_velocity() Vector2

Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member velocity] which returns the requested velocity.

fn (CharacterBody2D) get_floor_angle #

fn (s &CharacterBody2D) get_floor_angle(cfg CharacterBody2D_get_floor_angle_Cfg) f64

Returns the floor's collision angle at the last collision point according to [param up_direction], which is [constant Vector2.UP] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns true.

fn (CharacterBody2D) get_platform_velocity #

fn (s &CharacterBody2D) get_platform_velocity() Vector2

Returns the linear velocity of the platform at the last collision point. Only valid after calling [method move_and_slide].

fn (CharacterBody2D) get_slide_collision_count #

fn (s &CharacterBody2D) get_slide_collision_count() i64

Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].

fn (CharacterBody2D) get_slide_collision #

fn (s &CharacterBody2D) get_slide_collision(slide_idx i64) KinematicCollision2D

Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_collision_count] - 1). [b]Example:[/b] Iterate through the collisions with a for loop: [codeblocks] [gdscript] for i in get_slide_collision_count(): var collision = get_slide_collision(i) print("Collided with: ", collision.get_collider().name) [/gdscript] [csharp] for (int i = 0; i < GetSlideCollisionCount(); i++) { KinematicCollision2D collision = GetSlideCollision(i); GD.Print("Collided with: ", (collision.GetCollider() as Node).Name); } [/csharp] [/codeblocks]

fn (CharacterBody2D) get_last_slide_collision #

fn (s &CharacterBody2D) get_last_slide_collision() KinematicCollision2D

Returns a [KinematicCollision2D], which contains information about the latest collision that occurred during the last call to [method move_and_slide].

struct CharacterBody2D_get_floor_angle_Cfg #

@[params]
struct CharacterBody2D_get_floor_angle_Cfg {
pub:
	up_direction Vector2 = Vector2{0, -1}
}

Optional parameters for CharacterBody2D#get_floor_angle

struct CharacterBody3D #

struct CharacterBody3D {
	PhysicsBody3D
}

A 3D physics body specialized for characters moved by script.

fn (CharacterBody3D) to_variant #

fn (s &CharacterBody3D) to_variant() Variant

fn (CharacterBody3D) from_variant #

fn (mut s CharacterBody3D) from_variant(variant &Variant)

fn (CharacterBody3D) move_and_slide #

fn (s &CharacterBody3D) move_and_slide() bool

Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for more detailed information about collisions that occurred, use [method get_slide_collision]. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. Returns true if the body collided, otherwise, returns false.

fn (CharacterBody3D) apply_floor_snap #

fn (s &CharacterBody3D) apply_floor_snap()

Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when [method is_on_floor] returns true.

fn (CharacterBody3D) set_velocity #

fn (s &CharacterBody3D) set_velocity(velocity Vector3)

fn (CharacterBody3D) get_velocity #

fn (s &CharacterBody3D) get_velocity() Vector3

fn (CharacterBody3D) set_safe_margin #

fn (s &CharacterBody3D) set_safe_margin(margin f64)

fn (CharacterBody3D) get_safe_margin #

fn (s &CharacterBody3D) get_safe_margin() f64

fn (CharacterBody3D) is_floor_stop_on_slope_enabled #

fn (s &CharacterBody3D) is_floor_stop_on_slope_enabled() bool

fn (CharacterBody3D) set_floor_stop_on_slope_enabled #

fn (s &CharacterBody3D) set_floor_stop_on_slope_enabled(enabled bool)

fn (CharacterBody3D) set_floor_constant_speed_enabled #

fn (s &CharacterBody3D) set_floor_constant_speed_enabled(enabled bool)

fn (CharacterBody3D) is_floor_constant_speed_enabled #

fn (s &CharacterBody3D) is_floor_constant_speed_enabled() bool

fn (CharacterBody3D) set_floor_block_on_wall_enabled #

fn (s &CharacterBody3D) set_floor_block_on_wall_enabled(enabled bool)

fn (CharacterBody3D) is_floor_block_on_wall_enabled #

fn (s &CharacterBody3D) is_floor_block_on_wall_enabled() bool

fn (CharacterBody3D) set_slide_on_ceiling_enabled #

fn (s &CharacterBody3D) set_slide_on_ceiling_enabled(enabled bool)

fn (CharacterBody3D) is_slide_on_ceiling_enabled #

fn (s &CharacterBody3D) is_slide_on_ceiling_enabled() bool

fn (CharacterBody3D) set_platform_floor_layers #

fn (s &CharacterBody3D) set_platform_floor_layers(exclude_layer i64)

fn (CharacterBody3D) get_platform_floor_layers #

fn (s &CharacterBody3D) get_platform_floor_layers() i64

fn (CharacterBody3D) set_platform_wall_layers #

fn (s &CharacterBody3D) set_platform_wall_layers(exclude_layer i64)

fn (CharacterBody3D) get_platform_wall_layers #

fn (s &CharacterBody3D) get_platform_wall_layers() i64

fn (CharacterBody3D) get_max_slides #

fn (s &CharacterBody3D) get_max_slides() i64

fn (CharacterBody3D) set_max_slides #

fn (s &CharacterBody3D) set_max_slides(max_slides i64)

fn (CharacterBody3D) get_floor_max_angle #

fn (s &CharacterBody3D) get_floor_max_angle() f64

fn (CharacterBody3D) set_floor_max_angle #

fn (s &CharacterBody3D) set_floor_max_angle(radians f64)

fn (CharacterBody3D) get_floor_snap_length #

fn (s &CharacterBody3D) get_floor_snap_length() f64

fn (CharacterBody3D) set_floor_snap_length #

fn (s &CharacterBody3D) set_floor_snap_length(floor_snap_length f64)

fn (CharacterBody3D) get_wall_min_slide_angle #

fn (s &CharacterBody3D) get_wall_min_slide_angle() f64

fn (CharacterBody3D) set_wall_min_slide_angle #

fn (s &CharacterBody3D) set_wall_min_slide_angle(radians f64)

fn (CharacterBody3D) get_up_direction #

fn (s &CharacterBody3D) get_up_direction() Vector3

fn (CharacterBody3D) set_up_direction #

fn (s &CharacterBody3D) set_up_direction(up_direction Vector3)

fn (CharacterBody3D) set_motion_mode #

fn (s &CharacterBody3D) set_motion_mode(mode CharacterBody3DMotionMode)

fn (CharacterBody3D) get_motion_mode #

fn (s &CharacterBody3D) get_motion_mode() CharacterBody3DMotionMode

fn (CharacterBody3D) set_platform_on_leave #

fn (s &CharacterBody3D) set_platform_on_leave(on_leave_apply_velocity CharacterBody3DPlatformOnLeave)

fn (CharacterBody3D) get_platform_on_leave #

fn (s &CharacterBody3D) get_platform_on_leave() CharacterBody3DPlatformOnLeave

fn (CharacterBody3D) is_on_floor #

fn (s &CharacterBody3D) is_on_floor() bool

Returns true if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not.

fn (CharacterBody3D) is_on_floor_only #

fn (s &CharacterBody3D) is_on_floor_only() bool

Returns true if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not.

fn (CharacterBody3D) is_on_ceiling #

fn (s &CharacterBody3D) is_on_ceiling() bool

Returns true if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not.

fn (CharacterBody3D) is_on_ceiling_only #

fn (s &CharacterBody3D) is_on_ceiling_only() bool

Returns true if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not.

fn (CharacterBody3D) is_on_wall #

fn (s &CharacterBody3D) is_on_wall() bool

Returns true if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not.

fn (CharacterBody3D) is_on_wall_only #

fn (s &CharacterBody3D) is_on_wall_only() bool

Returns true if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns false. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not.

fn (CharacterBody3D) get_floor_normal #

fn (s &CharacterBody3D) get_floor_normal() Vector3

Returns the collision normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns true. [b]Warning:[/b] The collision normal is not always the same as the surface normal.

fn (CharacterBody3D) get_wall_normal #

fn (s &CharacterBody3D) get_wall_normal() Vector3

Returns the collision normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns true. [b]Warning:[/b] The collision normal is not always the same as the surface normal.

fn (CharacterBody3D) get_last_motion #

fn (s &CharacterBody3D) get_last_motion() Vector3

Returns the last motion applied to the [CharacterBody3D] during the last call to [method move_and_slide]. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement.

fn (CharacterBody3D) get_position_delta #

fn (s &CharacterBody3D) get_position_delta() Vector3

Returns the travel (position delta) that occurred during the last call to [method move_and_slide].

fn (CharacterBody3D) get_real_velocity #

fn (s &CharacterBody3D) get_real_velocity() Vector3

Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member velocity] which returns the requested velocity.

fn (CharacterBody3D) get_floor_angle #

fn (s &CharacterBody3D) get_floor_angle(cfg CharacterBody3D_get_floor_angle_Cfg) f64

Returns the floor's collision angle at the last collision point according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns true.

fn (CharacterBody3D) get_platform_velocity #

fn (s &CharacterBody3D) get_platform_velocity() Vector3

Returns the linear velocity of the platform at the last collision point. Only valid after calling [method move_and_slide].

fn (CharacterBody3D) get_platform_angular_velocity #

fn (s &CharacterBody3D) get_platform_angular_velocity() Vector3

Returns the angular velocity of the platform at the last collision point. Only valid after calling [method move_and_slide].

fn (CharacterBody3D) get_slide_collision_count #

fn (s &CharacterBody3D) get_slide_collision_count() i64

Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].

fn (CharacterBody3D) get_slide_collision #

fn (s &CharacterBody3D) get_slide_collision(slide_idx i64) KinematicCollision3D

Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_collision_count] - 1).

fn (CharacterBody3D) get_last_slide_collision #

fn (s &CharacterBody3D) get_last_slide_collision() KinematicCollision3D

Returns a [KinematicCollision3D], which contains information about the latest collision that occurred during the last call to [method move_and_slide].

struct CharacterBody3D_get_floor_angle_Cfg #

@[params]
struct CharacterBody3D_get_floor_angle_Cfg {
pub:
	up_direction Vector3 = Vector3{0, 1, 0}
}

Optional parameters for CharacterBody3D#get_floor_angle

struct CheckBox #

struct CheckBox {
	Button
}

A button that represents a binary choice.

fn (CheckBox) to_variant #

fn (s &CheckBox) to_variant() Variant

fn (CheckBox) from_variant #

fn (mut s CheckBox) from_variant(variant &Variant)

struct CheckButton #

struct CheckButton {
	Button
}

A button that represents a binary choice.

fn (CheckButton) to_variant #

fn (s &CheckButton) to_variant() Variant

fn (CheckButton) from_variant #

fn (mut s CheckButton) from_variant(variant &Variant)

struct CircleShape2D #

struct CircleShape2D {
	Shape2D
}

A 2D circle shape used for physics collision.

fn (CircleShape2D) to_variant #

fn (s &CircleShape2D) to_variant() Variant

fn (CircleShape2D) from_variant #

fn (mut s CircleShape2D) from_variant(variant &Variant)

fn (CircleShape2D) set_radius #

fn (s &CircleShape2D) set_radius(radius f64)

fn (CircleShape2D) get_radius #

fn (s &CircleShape2D) get_radius() f64

struct Class #

struct Class {
	godot_class bool = true
}

struct ClassDB #

struct ClassDB {
	Object
}

A class information repository.

fn (ClassDB) to_variant #

fn (s &ClassDB) to_variant() Variant

fn (ClassDB) from_variant #

fn (mut s ClassDB) from_variant(variant &Variant)

fn (ClassDB) get_class_list #

fn (s &ClassDB) get_class_list() PackedStringArray

Returns the names of all the classes available.

fn (ClassDB) get_inheriters_from_class #

fn (s &ClassDB) get_inheriters_from_class(class string) PackedStringArray

Returns the names of all the classes that directly or indirectly inherit from [param class].

fn (ClassDB) get_parent_class #

fn (s &ClassDB) get_parent_class(class string) string

Returns the parent class of [param class].

fn (ClassDB) class_exists #

fn (s &ClassDB) class_exists(class string) bool

Returns whether the specified [param class] is available or not.

fn (ClassDB) is_parent_class #

fn (s &ClassDB) is_parent_class(class string, inherits string) bool

Returns whether [param inherits] is an ancestor of [param class] or not.

fn (ClassDB) can_instantiate #

fn (s &ClassDB) can_instantiate(class string) bool

Returns true if objects can be instantiated from the specified [param class], otherwise returns false.

fn (ClassDB) instantiate #

fn (s &ClassDB) instantiate(class string) Variant

Creates an instance of [param class].

fn (ClassDB) class_get_api_type #

fn (s &ClassDB) class_get_api_type(class string) ClassDBAPIType

Returns the API type of the specified [param class].

fn (ClassDB) class_has_signal #

fn (s &ClassDB) class_has_signal(class string, signal string) bool

Returns whether [param class] or its ancestry has a signal called [param signal] or not.

fn (ClassDB) class_get_signal #

fn (s &ClassDB) class_get_signal(class string, signal string) Dictionary

Returns the [param signal] data of [param class] or its ancestry. The returned value is a [Dictionary] with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage).

fn (ClassDB) class_get_signal_list #

fn (s &ClassDB) class_get_signal_list(class string, cfg ClassDB_class_get_signal_list_Cfg) Array

Returns an array with all the signals of [param class] or its ancestry if [param no_inheritance] is false. Every element of the array is a [Dictionary] as described in [method class_get_signal].

fn (ClassDB) class_get_property_list #

fn (s &ClassDB) class_get_property_list(class string, cfg ClassDB_class_get_property_list_Cfg) Array

Returns an array with all the properties of [param class] or its ancestry if [param no_inheritance] is false.

fn (ClassDB) class_get_property_getter #

fn (s &ClassDB) class_get_property_getter(class string, property string) string

Returns the getter method name of [param property] of [param class].

fn (ClassDB) class_get_property_setter #

fn (s &ClassDB) class_get_property_setter(class string, property string) string

Returns the setter method name of [param property] of [param class].

fn (ClassDB) class_get_property #

fn (s &ClassDB) class_get_property(object Object, property string) Variant

Returns the value of [param property] of [param object] or its ancestry.

fn (ClassDB) class_set_property #

fn (s &ClassDB) class_set_property(object Object, property string, value_ ToVariant) GDError

Sets [param property] value of [param object] to [param value].

fn (ClassDB) class_get_property_default_value #

fn (s &ClassDB) class_get_property_default_value(class string, property string) Variant

Returns the default value of [param property] of [param class] or its ancestor classes.

fn (ClassDB) class_has_method #

fn (s &ClassDB) class_has_method(class string, method string, cfg ClassDB_class_has_method_Cfg) bool

Returns whether [param class] (or its ancestry if [param no_inheritance] is false) has a method called [param method] or not.

fn (ClassDB) class_get_method_argument_count #

fn (s &ClassDB) class_get_method_argument_count(class string, method string, cfg ClassDB_class_get_method_argument_count_Cfg) i64

Returns the number of arguments of the method [param method] of [param class] or its ancestry if [param no_inheritance] is false.

fn (ClassDB) class_get_method_list #

fn (s &ClassDB) class_get_method_list(class string, cfg ClassDB_class_get_method_list_Cfg) Array

Returns an array with all the methods of [param class] or its ancestry if [param no_inheritance] is false. Every element of the array is a [Dictionary] with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage). [b]Note:[/b] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names.

fn (ClassDB) class_call_static #

fn (s &ClassDB) class_call_static(class string, method string, varargs ...ToVariant) Variant

Calls a static method on a class.

fn (ClassDB) class_get_integer_constant_list #

fn (s &ClassDB) class_get_integer_constant_list(class string, cfg ClassDB_class_get_integer_constant_list_Cfg) PackedStringArray

Returns an array with the names all the integer constants of [param class] or its ancestry.

fn (ClassDB) class_has_integer_constant #

fn (s &ClassDB) class_has_integer_constant(class string, name string) bool

Returns whether [param class] or its ancestry has an integer constant called [param name] or not.

fn (ClassDB) class_get_integer_constant #

fn (s &ClassDB) class_get_integer_constant(class string, name string) i64

Returns the value of the integer constant [param name] of [param class] or its ancestry. Always returns 0 when the constant could not be found.

fn (ClassDB) class_has_enum #

fn (s &ClassDB) class_has_enum(class string, name string, cfg ClassDB_class_has_enum_Cfg) bool

Returns whether [param class] or its ancestry has an enum called [param name] or not.

fn (ClassDB) class_get_enum_list #

fn (s &ClassDB) class_get_enum_list(class string, cfg ClassDB_class_get_enum_list_Cfg) PackedStringArray

Returns an array with all the enums of [param class] or its ancestry.

fn (ClassDB) class_get_enum_constants #

fn (s &ClassDB) class_get_enum_constants(class string, gd_enum string, cfg ClassDB_class_get_enum_constants_Cfg) PackedStringArray

Returns an array with all the keys in [param enum] of [param class] or its ancestry.

fn (ClassDB) class_get_integer_constant_enum #

fn (s &ClassDB) class_get_integer_constant_enum(class string, name string, cfg ClassDB_class_get_integer_constant_enum_Cfg) string

Returns which enum the integer constant [param name] of [param class] or its ancestry belongs to.

fn (ClassDB) is_class_enum_bitfield #

fn (s &ClassDB) is_class_enum_bitfield(class string, gd_enum string, cfg ClassDB_is_class_enum_bitfield_Cfg) bool

Returns whether [param class] (or its ancestor classes if [param no_inheritance] is false) has an enum called [param enum] that is a bitfield.

fn (ClassDB) is_class_enabled #

fn (s &ClassDB) is_class_enabled(class string) bool

Returns whether this [param class] is enabled or not.

struct ClassDB_class_get_enum_constants_Cfg #

@[params]
struct ClassDB_class_get_enum_constants_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_get_enum_constants

struct ClassDB_class_get_enum_list_Cfg #

@[params]
struct ClassDB_class_get_enum_list_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_get_enum_list

struct ClassDB_class_get_integer_constant_enum_Cfg #

@[params]
struct ClassDB_class_get_integer_constant_enum_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_get_integer_constant_enum

struct ClassDB_class_get_integer_constant_list_Cfg #

@[params]
struct ClassDB_class_get_integer_constant_list_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_get_integer_constant_list

struct ClassDB_class_get_method_argument_count_Cfg #

@[params]
struct ClassDB_class_get_method_argument_count_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_get_method_argument_count

struct ClassDB_class_get_method_list_Cfg #

@[params]
struct ClassDB_class_get_method_list_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_get_method_list

struct ClassDB_class_get_property_list_Cfg #

@[params]
struct ClassDB_class_get_property_list_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_get_property_list

struct ClassDB_class_get_signal_list_Cfg #

@[params]
struct ClassDB_class_get_signal_list_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_get_signal_list

struct ClassDB_class_has_enum_Cfg #

@[params]
struct ClassDB_class_has_enum_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_has_enum

struct ClassDB_class_has_method_Cfg #

@[params]
struct ClassDB_class_has_method_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#class_has_method

struct ClassDB_is_class_enum_bitfield_Cfg #

@[params]
struct ClassDB_is_class_enum_bitfield_Cfg {
pub:
	no_inheritance bool
}

Optional parameters for ClassDB#is_class_enum_bitfield

struct CodeEdit #

struct CodeEdit {
	TextEdit
}

A multiline text editor designed for editing code.

fn (CodeEdit) to_variant #

fn (s &CodeEdit) to_variant() Variant

fn (CodeEdit) from_variant #

fn (mut s CodeEdit) from_variant(variant &Variant)

fn (CodeEdit) gd_confirm_code_completion #

fn (s &CodeEdit) gd_confirm_code_completion(replace bool)

Override this method to define how the selected entry should be inserted. If [param replace] is true, any existing text should be replaced.

fn (CodeEdit) gd_request_code_completion #

fn (s &CodeEdit) gd_request_code_completion(force bool)

Override this method to define what happens when the user requests code completion. If [param force] is true, any checks should be bypassed.

fn (CodeEdit) gd_filter_code_completion_candidates #

fn (s &CodeEdit) gd_filter_code_completion_candidates(candidates Array) Array

Override this method to define what items in [param candidates] should be displayed. Both [param candidates] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content.

fn (CodeEdit) set_indent_size #

fn (s &CodeEdit) set_indent_size(size i64)

fn (CodeEdit) get_indent_size #

fn (s &CodeEdit) get_indent_size() i64

fn (CodeEdit) set_indent_using_spaces #

fn (s &CodeEdit) set_indent_using_spaces(use_spaces bool)

fn (CodeEdit) is_indent_using_spaces #

fn (s &CodeEdit) is_indent_using_spaces() bool

fn (CodeEdit) set_auto_indent_enabled #

fn (s &CodeEdit) set_auto_indent_enabled(enable bool)

fn (CodeEdit) is_auto_indent_enabled #

fn (s &CodeEdit) is_auto_indent_enabled() bool

fn (CodeEdit) set_auto_indent_prefixes #

fn (s &CodeEdit) set_auto_indent_prefixes(prefixes Array)

fn (CodeEdit) get_auto_indent_prefixes #

fn (s &CodeEdit) get_auto_indent_prefixes() Array

fn (CodeEdit) do_indent #

fn (s &CodeEdit) do_indent()

If there is no selection, indentation is inserted at the caret. Otherwise, the selected lines are indented like [method indent_lines]. Equivalent to the [member ProjectSettings.input/ui_text_indent] action. The indentation characters used depend on [member indent_use_spaces] and [member indent_size].

fn (CodeEdit) indent_lines #

fn (s &CodeEdit) indent_lines()

Indents all lines that are selected or have a caret on them. Uses spaces or a tab depending on [member indent_use_spaces]. See [method unindent_lines].

fn (CodeEdit) unindent_lines #

fn (s &CodeEdit) unindent_lines()

Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on [member indent_use_spaces]. Equivalent to the [member ProjectSettings.input/ui_text_dedent] action. See [method indent_lines].

fn (CodeEdit) convert_indent #

fn (s &CodeEdit) convert_indent(cfg CodeEdit_convert_indent_Cfg)

Converts the indents of lines between [param from_line] and [param to_line] to tabs or spaces as set by [member indent_use_spaces]. Values of -1 convert the entire text.

fn (CodeEdit) set_auto_brace_completion_enabled #

fn (s &CodeEdit) set_auto_brace_completion_enabled(enable bool)

fn (CodeEdit) is_auto_brace_completion_enabled #

fn (s &CodeEdit) is_auto_brace_completion_enabled() bool

fn (CodeEdit) set_highlight_matching_braces_enabled #

fn (s &CodeEdit) set_highlight_matching_braces_enabled(enable bool)

fn (CodeEdit) is_highlight_matching_braces_enabled #

fn (s &CodeEdit) is_highlight_matching_braces_enabled() bool

fn (CodeEdit) add_auto_brace_completion_pair #

fn (s &CodeEdit) add_auto_brace_completion_pair(start_key string, end_key string)

Adds a brace pair. Both the start and end keys must be symbols. Only the start key has to be unique.

fn (CodeEdit) set_auto_brace_completion_pairs #

fn (s &CodeEdit) set_auto_brace_completion_pairs(pairs Dictionary)

fn (CodeEdit) get_auto_brace_completion_pairs #

fn (s &CodeEdit) get_auto_brace_completion_pairs() Dictionary

fn (CodeEdit) has_auto_brace_completion_open_key #

fn (s &CodeEdit) has_auto_brace_completion_open_key(open_key string) bool

Returns true if open key [param open_key] exists.

fn (CodeEdit) has_auto_brace_completion_close_key #

fn (s &CodeEdit) has_auto_brace_completion_close_key(close_key string) bool

Returns true if close key [param close_key] exists.

fn (CodeEdit) get_auto_brace_completion_close_key #

fn (s &CodeEdit) get_auto_brace_completion_close_key(open_key string) string

Gets the matching auto brace close key for [param open_key].

fn (CodeEdit) set_draw_breakpoints_gutter #

fn (s &CodeEdit) set_draw_breakpoints_gutter(enable bool)

fn (CodeEdit) is_drawing_breakpoints_gutter #

fn (s &CodeEdit) is_drawing_breakpoints_gutter() bool

fn (CodeEdit) set_draw_bookmarks_gutter #

fn (s &CodeEdit) set_draw_bookmarks_gutter(enable bool)

fn (CodeEdit) is_drawing_bookmarks_gutter #

fn (s &CodeEdit) is_drawing_bookmarks_gutter() bool

fn (CodeEdit) set_draw_executing_lines_gutter #

fn (s &CodeEdit) set_draw_executing_lines_gutter(enable bool)

fn (CodeEdit) is_drawing_executing_lines_gutter #

fn (s &CodeEdit) is_drawing_executing_lines_gutter() bool

fn (CodeEdit) set_line_as_breakpoint #

fn (s &CodeEdit) set_line_as_breakpoint(line i64, breakpointed bool)

Sets the given line as a breakpoint. If true and [member gutters_draw_breakpoints_gutter] is true, draws the [theme_item breakpoint] icon in the gutter for this line. See [method get_breakpointed_lines] and [method is_line_breakpointed].

fn (CodeEdit) is_line_breakpointed #

fn (s &CodeEdit) is_line_breakpointed(line i64) bool

Returns true if the given line is breakpointed. See [method set_line_as_breakpoint].

fn (CodeEdit) clear_breakpointed_lines #

fn (s &CodeEdit) clear_breakpointed_lines()

Clears all breakpointed lines.

fn (CodeEdit) get_breakpointed_lines #

fn (s &CodeEdit) get_breakpointed_lines() PackedInt32Array

Gets all breakpointed lines.

fn (CodeEdit) set_line_as_bookmarked #

fn (s &CodeEdit) set_line_as_bookmarked(line i64, bookmarked bool)

Sets the given line as bookmarked. If true and [member gutters_draw_bookmarks] is true, draws the [theme_item bookmark] icon in the gutter for this line. See [method get_bookmarked_lines] and [method is_line_bookmarked].

fn (CodeEdit) is_line_bookmarked #

fn (s &CodeEdit) is_line_bookmarked(line i64) bool

Returns true if the given line is bookmarked. See [method set_line_as_bookmarked].

fn (CodeEdit) clear_bookmarked_lines #

fn (s &CodeEdit) clear_bookmarked_lines()

Clears all bookmarked lines.

fn (CodeEdit) get_bookmarked_lines #

fn (s &CodeEdit) get_bookmarked_lines() PackedInt32Array

Gets all bookmarked lines.

fn (CodeEdit) set_line_as_executing #

fn (s &CodeEdit) set_line_as_executing(line i64, executing bool)

Sets the given line as executing. If true and [member gutters_draw_executing_lines] is true, draws the [theme_item executing_line] icon in the gutter for this line. See [method get_executing_lines] and [method is_line_executing].

fn (CodeEdit) is_line_executing #

fn (s &CodeEdit) is_line_executing(line i64) bool

Returns true if the given line is marked as executing. See [method set_line_as_executing].

fn (CodeEdit) clear_executing_lines #

fn (s &CodeEdit) clear_executing_lines()

Clears all executed lines.

fn (CodeEdit) get_executing_lines #

fn (s &CodeEdit) get_executing_lines() PackedInt32Array

Gets all executing lines.

fn (CodeEdit) set_draw_line_numbers #

fn (s &CodeEdit) set_draw_line_numbers(enable bool)

fn (CodeEdit) is_draw_line_numbers_enabled #

fn (s &CodeEdit) is_draw_line_numbers_enabled() bool

fn (CodeEdit) set_line_numbers_zero_padded #

fn (s &CodeEdit) set_line_numbers_zero_padded(enable bool)

fn (CodeEdit) is_line_numbers_zero_padded #

fn (s &CodeEdit) is_line_numbers_zero_padded() bool

fn (CodeEdit) set_draw_fold_gutter #

fn (s &CodeEdit) set_draw_fold_gutter(enable bool)

fn (CodeEdit) is_drawing_fold_gutter #

fn (s &CodeEdit) is_drawing_fold_gutter() bool

fn (CodeEdit) set_line_folding_enabled #

fn (s &CodeEdit) set_line_folding_enabled(enabled bool)

fn (CodeEdit) is_line_folding_enabled #

fn (s &CodeEdit) is_line_folding_enabled() bool

fn (CodeEdit) can_fold_line #

fn (s &CodeEdit) can_fold_line(line i64) bool

Returns true if the given line is foldable. A line is foldable if it is the start of a valid code region (see [method get_code_region_start_tag]), if it is the start of a comment or string block, or if the next non-empty line is more indented (see [method TextEdit.get_indent_level]).

fn (CodeEdit) fold_line #

fn (s &CodeEdit) fold_line(line i64)

Folds the given line, if possible (see [method can_fold_line]).

fn (CodeEdit) unfold_line #

fn (s &CodeEdit) unfold_line(line i64)

Unfolds the given line if it is folded or if it is hidden under a folded line.

fn (CodeEdit) fold_all_lines #

fn (s &CodeEdit) fold_all_lines()

Folds all lines that are possible to be folded (see [method can_fold_line]).

fn (CodeEdit) unfold_all_lines #

fn (s &CodeEdit) unfold_all_lines()

Unfolds all lines that are folded.

fn (CodeEdit) toggle_foldable_line #

fn (s &CodeEdit) toggle_foldable_line(line i64)

Toggle the folding of the code block at the given line.

fn (CodeEdit) toggle_foldable_lines_at_carets #

fn (s &CodeEdit) toggle_foldable_lines_at_carets()

Toggle the folding of the code block on all lines with a caret on them.

fn (CodeEdit) is_line_folded #

fn (s &CodeEdit) is_line_folded(line i64) bool

Returns true if the given line is folded. See [method fold_line].

fn (CodeEdit) get_folded_lines #

fn (s &CodeEdit) get_folded_lines() Array

Returns all lines that are currently folded.

fn (CodeEdit) create_code_region #

fn (s &CodeEdit) create_code_region()

Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see [method add_comment_delimiter]). A code region is a part of code that is highlighted when folded and can help organize your script. Code region start and end tags can be customized (see [method set_code_region_tags]). Code regions are delimited using start and end tags (respectively region and endregion by default) preceded by one line comment delimiter. (eg. #region and #endregion)

fn (CodeEdit) get_code_region_start_tag #

fn (s &CodeEdit) get_code_region_start_tag() string

Returns the code region start tag (without comment delimiter).

fn (CodeEdit) get_code_region_end_tag #

fn (s &CodeEdit) get_code_region_end_tag() string

Returns the code region end tag (without comment delimiter).

fn (CodeEdit) set_code_region_tags #

fn (s &CodeEdit) set_code_region_tags(cfg CodeEdit_set_code_region_tags_Cfg)

Sets the code region start and end tags (without comment delimiter).

fn (CodeEdit) is_line_code_region_start #

fn (s &CodeEdit) is_line_code_region_start(line i64) bool

Returns true if the given line is a code region start. See [method set_code_region_tags].

fn (CodeEdit) is_line_code_region_end #

fn (s &CodeEdit) is_line_code_region_end(line i64) bool

Returns true if the given line is a code region end. See [method set_code_region_tags].

fn (CodeEdit) add_string_delimiter #

fn (s &CodeEdit) add_string_delimiter(start_key string, end_key string, cfg CodeEdit_add_string_delimiter_Cfg)

Defines a string delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. If [param line_only] is true or [param end_key] is an empty [String], the region does not carry over to the next line.

fn (CodeEdit) remove_string_delimiter #

fn (s &CodeEdit) remove_string_delimiter(start_key string)

Removes the string delimiter with [param start_key].

fn (CodeEdit) has_string_delimiter #

fn (s &CodeEdit) has_string_delimiter(start_key string) bool

Returns true if string [param start_key] exists.

fn (CodeEdit) set_string_delimiters #

fn (s &CodeEdit) set_string_delimiters(string_delimiters Array)

fn (CodeEdit) clear_string_delimiters #

fn (s &CodeEdit) clear_string_delimiters()

Removes all string delimiters.

fn (CodeEdit) get_string_delimiters #

fn (s &CodeEdit) get_string_delimiters() Array

fn (CodeEdit) is_in_string #

fn (s &CodeEdit) is_in_string(line i64, cfg CodeEdit_is_in_string_Cfg) i64

Returns the delimiter index if [param line] [param column] is in a string. If [param column] is not provided, will return the delimiter index if the entire [param line] is a string. Otherwise -1.

fn (CodeEdit) add_comment_delimiter #

fn (s &CodeEdit) add_comment_delimiter(start_key string, end_key string, cfg CodeEdit_add_comment_delimiter_Cfg)

Adds a comment delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. If [param line_only] is true or [param end_key] is an empty [String], the region does not carry over to the next line.

fn (CodeEdit) remove_comment_delimiter #

fn (s &CodeEdit) remove_comment_delimiter(start_key string)

Removes the comment delimiter with [param start_key].

fn (CodeEdit) has_comment_delimiter #

fn (s &CodeEdit) has_comment_delimiter(start_key string) bool

Returns true if comment [param start_key] exists.

fn (CodeEdit) set_comment_delimiters #

fn (s &CodeEdit) set_comment_delimiters(comment_delimiters Array)

fn (CodeEdit) clear_comment_delimiters #

fn (s &CodeEdit) clear_comment_delimiters()

Removes all comment delimiters.

fn (CodeEdit) get_comment_delimiters #

fn (s &CodeEdit) get_comment_delimiters() Array

fn (CodeEdit) is_in_comment #

fn (s &CodeEdit) is_in_comment(line i64, cfg CodeEdit_is_in_comment_Cfg) i64

Returns delimiter index if [param line] [param column] is in a comment. If [param column] is not provided, will return delimiter index if the entire [param line] is a comment. Otherwise -1.

fn (CodeEdit) get_delimiter_start_key #

fn (s &CodeEdit) get_delimiter_start_key(delimiter_index i64) string

Gets the start key for a string or comment region index.

fn (CodeEdit) get_delimiter_end_key #

fn (s &CodeEdit) get_delimiter_end_key(delimiter_index i64) string

Gets the end key for a string or comment region index.

fn (CodeEdit) get_delimiter_start_position #

fn (s &CodeEdit) get_delimiter_start_position(line i64, column i64) Vector2

If [param line] [param column] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be -1.

fn (CodeEdit) get_delimiter_end_position #

fn (s &CodeEdit) get_delimiter_end_position(line i64, column i64) Vector2

If [param line] [param column] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be -1.

fn (CodeEdit) set_code_hint #

fn (s &CodeEdit) set_code_hint(code_hint string)

Sets the code hint text. Pass an empty string to clear.

fn (CodeEdit) set_code_hint_draw_below #

fn (s &CodeEdit) set_code_hint_draw_below(draw_below bool)

If true, the code hint will draw below the main caret. If false, the code hint will draw above the main caret. See [method set_code_hint].

fn (CodeEdit) get_text_for_code_completion #

fn (s &CodeEdit) get_text_for_code_completion() string

Returns the full text with char 0xFFFF at the caret location.

fn (CodeEdit) request_code_completion #

fn (s &CodeEdit) request_code_completion(cfg CodeEdit_request_code_completion_Cfg)

Emits [signal code_completion_requested], if [param force] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal.

fn (CodeEdit) add_code_completion_option #

fn (s &CodeEdit) add_code_completion_option(gd_type CodeEditCodeCompletionKind, display_text string, insert_text string, cfg CodeEdit_add_code_completion_option_Cfg)

Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list. [param location] indicates location of the option relative to the location of the code completion query. See [enum CodeEdit.CodeCompletionLocation] for how to set this value. [b]Note:[/b] This list will replace all current candidates.

fn (CodeEdit) update_code_completion_options #

fn (s &CodeEdit) update_code_completion_options(force bool)

Submits all completion options added with [method add_code_completion_option]. Will try to force the autocomplete menu to popup, if [param force] is true. [b]Note:[/b] This will replace all current candidates.

fn (CodeEdit) get_code_completion_options #

fn (s &CodeEdit) get_code_completion_options() Array

Gets all completion options, see [method get_code_completion_option] for return content.

fn (CodeEdit) get_code_completion_option #

fn (s &CodeEdit) get_code_completion_option(index i64) Dictionary

Gets the completion option at [param index]. The return [Dictionary] has the following key-values: kind: [enum CodeCompletionKind] display_text: Text that is shown on the autocomplete menu. insert_text: Text that is to be inserted when this item is selected. font_color: Color of the text on the autocomplete menu. icon: Icon to draw on the autocomplete menu. default_value: Value of the symbol.

fn (CodeEdit) get_code_completion_selected_index #

fn (s &CodeEdit) get_code_completion_selected_index() i64

Gets the index of the current selected completion option.

fn (CodeEdit) set_code_completion_selected_index #

fn (s &CodeEdit) set_code_completion_selected_index(index i64)

Sets the current selected completion option.

fn (CodeEdit) confirm_code_completion #

fn (s &CodeEdit) confirm_code_completion(cfg CodeEdit_confirm_code_completion_Cfg)

Inserts the selected entry into the text. If [param replace] is true, any existing text is replaced rather than merged.

fn (CodeEdit) cancel_code_completion #

fn (s &CodeEdit) cancel_code_completion()

Cancels the autocomplete menu.

fn (CodeEdit) set_code_completion_enabled #

fn (s &CodeEdit) set_code_completion_enabled(enable bool)

fn (CodeEdit) is_code_completion_enabled #

fn (s &CodeEdit) is_code_completion_enabled() bool

fn (CodeEdit) set_code_completion_prefixes #

fn (s &CodeEdit) set_code_completion_prefixes(prefixes Array)

fn (CodeEdit) get_code_completion_prefixes #

fn (s &CodeEdit) get_code_completion_prefixes() Array

fn (CodeEdit) set_line_length_guidelines #

fn (s &CodeEdit) set_line_length_guidelines(guideline_columns Array)

fn (CodeEdit) get_line_length_guidelines #

fn (s &CodeEdit) get_line_length_guidelines() Array

fn (CodeEdit) set_symbol_lookup_on_click_enabled #

fn (s &CodeEdit) set_symbol_lookup_on_click_enabled(enable bool)

fn (CodeEdit) is_symbol_lookup_on_click_enabled #

fn (s &CodeEdit) is_symbol_lookup_on_click_enabled() bool

fn (CodeEdit) get_text_for_symbol_lookup #

fn (s &CodeEdit) get_text_for_symbol_lookup() string

Returns the full text with char 0xFFFF at the cursor location.

fn (CodeEdit) get_text_with_cursor_char #

fn (s &CodeEdit) get_text_with_cursor_char(line i64, column i64) string

Returns the full text with char 0xFFFF at the specified location.

fn (CodeEdit) set_symbol_lookup_word_as_valid #

fn (s &CodeEdit) set_symbol_lookup_word_as_valid(valid bool)

Sets the symbol emitted by [signal symbol_validate] as a valid lookup.

fn (CodeEdit) set_symbol_tooltip_on_hover_enabled #

fn (s &CodeEdit) set_symbol_tooltip_on_hover_enabled(enable bool)

fn (CodeEdit) is_symbol_tooltip_on_hover_enabled #

fn (s &CodeEdit) is_symbol_tooltip_on_hover_enabled() bool

fn (CodeEdit) move_lines_up #

fn (s &CodeEdit) move_lines_up()

Moves all lines up that are selected or have a caret on them.

fn (CodeEdit) move_lines_down #

fn (s &CodeEdit) move_lines_down()

Moves all lines down that are selected or have a caret on them.

fn (CodeEdit) delete_lines #

fn (s &CodeEdit) delete_lines()

Deletes all lines that are selected or have a caret on them.

fn (CodeEdit) duplicate_selection #

fn (s &CodeEdit) duplicate_selection()

Duplicates all selected text and duplicates all lines with a caret on them.

fn (CodeEdit) duplicate_lines #

fn (s &CodeEdit) duplicate_lines()

Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line.

struct CodeEdit_add_code_completion_option_Cfg #

@[params]
struct CodeEdit_add_code_completion_option_Cfg {
pub:
	text_color Color = Color{1, 1, 1, 1}
	icon       Resource
	value      ToVariant
	location   i64 = 1024
}

Optional parameters for CodeEdit#add_code_completion_option

struct CodeEdit_add_comment_delimiter_Cfg #

@[params]
struct CodeEdit_add_comment_delimiter_Cfg {
pub:
	line_only bool
}

Optional parameters for CodeEdit#add_comment_delimiter

struct CodeEdit_add_string_delimiter_Cfg #

@[params]
struct CodeEdit_add_string_delimiter_Cfg {
pub:
	line_only bool
}

Optional parameters for CodeEdit#add_string_delimiter

struct CodeEdit_confirm_code_completion_Cfg #

@[params]
struct CodeEdit_confirm_code_completion_Cfg {
pub:
	replace bool
}

Optional parameters for CodeEdit#confirm_code_completion

struct CodeEdit_convert_indent_Cfg #

@[params]
struct CodeEdit_convert_indent_Cfg {
pub:
	from_line i64 = -1
	to_line   i64 = -1
}

Optional parameters for CodeEdit#convert_indent

struct CodeEdit_is_in_comment_Cfg #

@[params]
struct CodeEdit_is_in_comment_Cfg {
pub:
	column i64 = -1
}

Optional parameters for CodeEdit#is_in_comment

struct CodeEdit_is_in_string_Cfg #

@[params]
struct CodeEdit_is_in_string_Cfg {
pub:
	column i64 = -1
}

Optional parameters for CodeEdit#is_in_string

struct CodeEdit_request_code_completion_Cfg #

@[params]
struct CodeEdit_request_code_completion_Cfg {
pub:
	force bool
}

Optional parameters for CodeEdit#request_code_completion

struct CodeEdit_set_code_region_tags_Cfg #

@[params]
struct CodeEdit_set_code_region_tags_Cfg {
pub:
	start string
	end   string
}

Optional parameters for CodeEdit#set_code_region_tags

struct CodeHighlighter #

struct CodeHighlighter {
	SyntaxHighlighter
}

A syntax highlighter intended for code.

fn (CodeHighlighter) to_variant #

fn (s &CodeHighlighter) to_variant() Variant

fn (CodeHighlighter) from_variant #

fn (mut s CodeHighlighter) from_variant(variant &Variant)

fn (CodeHighlighter) add_keyword_color #

fn (s &CodeHighlighter) add_keyword_color(keyword string, color Color)

Sets the color for a keyword. The keyword cannot contain any symbols except '_'.

fn (CodeHighlighter) remove_keyword_color #

fn (s &CodeHighlighter) remove_keyword_color(keyword string)

Removes the keyword.

fn (CodeHighlighter) has_keyword_color #

fn (s &CodeHighlighter) has_keyword_color(keyword string) bool

Returns true if the keyword exists, else false.

fn (CodeHighlighter) get_keyword_color #

fn (s &CodeHighlighter) get_keyword_color(keyword string) Color

Returns the color for a keyword.

fn (CodeHighlighter) set_keyword_colors #

fn (s &CodeHighlighter) set_keyword_colors(keywords Dictionary)

fn (CodeHighlighter) clear_keyword_colors #

fn (s &CodeHighlighter) clear_keyword_colors()

Removes all keywords.

fn (CodeHighlighter) get_keyword_colors #

fn (s &CodeHighlighter) get_keyword_colors() Dictionary

fn (CodeHighlighter) add_member_keyword_color #

fn (s &CodeHighlighter) add_member_keyword_color(member_keyword string, color Color)

Sets the color for a member keyword. The member keyword cannot contain any symbols except '_'. It will not be highlighted if preceded by a '.'.

fn (CodeHighlighter) remove_member_keyword_color #

fn (s &CodeHighlighter) remove_member_keyword_color(member_keyword string)

Removes the member keyword.

fn (CodeHighlighter) has_member_keyword_color #

fn (s &CodeHighlighter) has_member_keyword_color(member_keyword string) bool

Returns true if the member keyword exists, else false.

fn (CodeHighlighter) get_member_keyword_color #

fn (s &CodeHighlighter) get_member_keyword_color(member_keyword string) Color

Returns the color for a member keyword.

fn (CodeHighlighter) set_member_keyword_colors #

fn (s &CodeHighlighter) set_member_keyword_colors(member_keyword Dictionary)

fn (CodeHighlighter) clear_member_keyword_colors #

fn (s &CodeHighlighter) clear_member_keyword_colors()

Removes all member keywords.

fn (CodeHighlighter) get_member_keyword_colors #

fn (s &CodeHighlighter) get_member_keyword_colors() Dictionary

fn (CodeHighlighter) add_color_region #

fn (s &CodeHighlighter) add_color_region(start_key string, end_key string, color Color, cfg CodeHighlighter_add_color_region_Cfg)

Adds a color region (such as for comments or strings) from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. If [param line_only] is true or [param end_key] is an empty [String], the region does not carry over to the next line.

fn (CodeHighlighter) remove_color_region #

fn (s &CodeHighlighter) remove_color_region(start_key string)

Removes the color region that uses that start key.

fn (CodeHighlighter) has_color_region #

fn (s &CodeHighlighter) has_color_region(start_key string) bool

Returns true if the start key exists, else false.

fn (CodeHighlighter) set_color_regions #

fn (s &CodeHighlighter) set_color_regions(color_regions Dictionary)

fn (CodeHighlighter) clear_color_regions #

fn (s &CodeHighlighter) clear_color_regions()

Removes all color regions.

fn (CodeHighlighter) get_color_regions #

fn (s &CodeHighlighter) get_color_regions() Dictionary

fn (CodeHighlighter) set_function_color #

fn (s &CodeHighlighter) set_function_color(color Color)

fn (CodeHighlighter) get_function_color #

fn (s &CodeHighlighter) get_function_color() Color

fn (CodeHighlighter) set_number_color #

fn (s &CodeHighlighter) set_number_color(color Color)

fn (CodeHighlighter) get_number_color #

fn (s &CodeHighlighter) get_number_color() Color

fn (CodeHighlighter) set_symbol_color #

fn (s &CodeHighlighter) set_symbol_color(color Color)

fn (CodeHighlighter) get_symbol_color #

fn (s &CodeHighlighter) get_symbol_color() Color

fn (CodeHighlighter) set_member_variable_color #

fn (s &CodeHighlighter) set_member_variable_color(color Color)

fn (CodeHighlighter) get_member_variable_color #

fn (s &CodeHighlighter) get_member_variable_color() Color

struct CodeHighlighter_add_color_region_Cfg #

@[params]
struct CodeHighlighter_add_color_region_Cfg {
pub:
	line_only bool
}

Optional parameters for CodeHighlighter#add_color_region

struct CollisionObject2D #

struct CollisionObject2D {
	Node2D
}

Abstract base class for 2D physics objects.

fn (CollisionObject2D) to_variant #

fn (s &CollisionObject2D) to_variant() Variant

fn (CollisionObject2D) from_variant #

fn (mut s CollisionObject2D) from_variant(variant &Variant)

fn (CollisionObject2D) gd_input_event #

fn (s &CollisionObject2D) gd_input_event(viewport Viewport, event InputEvent, shape_idx i64)

Accepts unhandled [InputEvent]s. [param shape_idx] is the child index of the clicked [Shape2D]. Connect to [signal input_event] to easily pick up these events. [b]Note:[/b] [method _input_event] requires [member input_pickable] to be true and at least one [member collision_layer] bit to be set.

fn (CollisionObject2D) gd_mouse_enter #

fn (s &CollisionObject2D) gd_mouse_enter()

Called when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be true and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this function to be called.

fn (CollisionObject2D) gd_mouse_exit #

fn (s &CollisionObject2D) gd_mouse_exit()

Called when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be true and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this function to be called.

fn (CollisionObject2D) gd_mouse_shape_enter #

fn (s &CollisionObject2D) gd_mouse_shape_enter(shape_idx i64)

Called when the mouse pointer enters any of this object's shapes or moves from one shape to another. [param shape_idx] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be true and at least one [member collision_layer] bit to be called.

fn (CollisionObject2D) gd_mouse_shape_exit #

fn (s &CollisionObject2D) gd_mouse_shape_exit(shape_idx i64)

Called when the mouse pointer exits any of this object's shapes. [param shape_idx] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be true and at least one [member collision_layer] bit to be called.

fn (CollisionObject2D) get_rid #

fn (s &CollisionObject2D) get_rid() RID

Returns the object's [RID].

fn (CollisionObject2D) set_collision_layer #

fn (s &CollisionObject2D) set_collision_layer(layer i64)

fn (CollisionObject2D) get_collision_layer #

fn (s &CollisionObject2D) get_collision_layer() i64

fn (CollisionObject2D) set_collision_mask #

fn (s &CollisionObject2D) set_collision_mask(mask i64)

fn (CollisionObject2D) get_collision_mask #

fn (s &CollisionObject2D) get_collision_mask() i64

fn (CollisionObject2D) set_collision_layer_value #

fn (s &CollisionObject2D) set_collision_layer_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.

fn (CollisionObject2D) get_collision_layer_value #

fn (s &CollisionObject2D) get_collision_layer_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.

fn (CollisionObject2D) set_collision_mask_value #

fn (s &CollisionObject2D) set_collision_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.

fn (CollisionObject2D) get_collision_mask_value #

fn (s &CollisionObject2D) get_collision_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (CollisionObject2D) set_collision_priority #

fn (s &CollisionObject2D) set_collision_priority(priority f64)

fn (CollisionObject2D) get_collision_priority #

fn (s &CollisionObject2D) get_collision_priority() f64

fn (CollisionObject2D) set_disable_mode #

fn (s &CollisionObject2D) set_disable_mode(mode CollisionObject2DDisableMode)

fn (CollisionObject2D) get_disable_mode #

fn (s &CollisionObject2D) get_disable_mode() CollisionObject2DDisableMode

fn (CollisionObject2D) set_pickable #

fn (s &CollisionObject2D) set_pickable(enabled bool)

fn (CollisionObject2D) is_pickable #

fn (s &CollisionObject2D) is_pickable() bool

fn (CollisionObject2D) create_shape_owner #

fn (s &CollisionObject2D) create_shape_owner(owner Object) i64

Creates a new shape owner for the given object. Returns owner_id of the new owner for future reference.

fn (CollisionObject2D) remove_shape_owner #

fn (s &CollisionObject2D) remove_shape_owner(owner_id i64)

Removes the given shape owner.

fn (CollisionObject2D) get_shape_owners #

fn (s &CollisionObject2D) get_shape_owners() PackedInt32Array

Returns an [Array] of owner_id identifiers. You can use these ids in other methods that take owner_id as an argument.

fn (CollisionObject2D) shape_owner_set_transform #

fn (s &CollisionObject2D) shape_owner_set_transform(owner_id i64, transform Transform2D)

Sets the [Transform2D] of the given shape owner.

fn (CollisionObject2D) shape_owner_get_transform #

fn (s &CollisionObject2D) shape_owner_get_transform(owner_id i64) Transform2D

Returns the shape owner's [Transform2D].

fn (CollisionObject2D) shape_owner_get_owner #

fn (s &CollisionObject2D) shape_owner_get_owner(owner_id i64) Object

Returns the parent object of the given shape owner.

fn (CollisionObject2D) shape_owner_set_disabled #

fn (s &CollisionObject2D) shape_owner_set_disabled(owner_id i64, disabled bool)

If true, disables the given shape owner.

fn (CollisionObject2D) is_shape_owner_disabled #

fn (s &CollisionObject2D) is_shape_owner_disabled(owner_id i64) bool

If true, the shape owner and its shapes are disabled.

fn (CollisionObject2D) shape_owner_set_one_way_collision #

fn (s &CollisionObject2D) shape_owner_set_one_way_collision(owner_id i64, enable bool)

If [param enable] is true, collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s.

fn (CollisionObject2D) is_shape_owner_one_way_collision_enabled #

fn (s &CollisionObject2D) is_shape_owner_one_way_collision_enabled(owner_id i64) bool

Returns true if collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s.

fn (CollisionObject2D) shape_owner_set_one_way_collision_margin #

fn (s &CollisionObject2D) shape_owner_set_one_way_collision_margin(owner_id i64, margin f64)

Sets the one_way_collision_margin of the shape owner identified by given [param owner_id] to [param margin] pixels.

fn (CollisionObject2D) get_shape_owner_one_way_collision_margin #

fn (s &CollisionObject2D) get_shape_owner_one_way_collision_margin(owner_id i64) f64

Returns the one_way_collision_margin of the shape owner identified by given [param owner_id].

fn (CollisionObject2D) shape_owner_add_shape #

fn (s &CollisionObject2D) shape_owner_add_shape(owner_id i64, shape Shape2D)

Adds a [Shape2D] to the shape owner.

fn (CollisionObject2D) shape_owner_get_shape_count #

fn (s &CollisionObject2D) shape_owner_get_shape_count(owner_id i64) i64

Returns the number of shapes the given shape owner contains.

fn (CollisionObject2D) shape_owner_get_shape #

fn (s &CollisionObject2D) shape_owner_get_shape(owner_id i64, shape_id i64) Shape2D

Returns the [Shape2D] with the given ID from the given shape owner.

fn (CollisionObject2D) shape_owner_get_shape_index #

fn (s &CollisionObject2D) shape_owner_get_shape_index(owner_id i64, shape_id i64) i64

Returns the child index of the [Shape2D] with the given ID from the given shape owner.

fn (CollisionObject2D) shape_owner_remove_shape #

fn (s &CollisionObject2D) shape_owner_remove_shape(owner_id i64, shape_id i64)

Removes a shape from the given shape owner.

fn (CollisionObject2D) shape_owner_clear_shapes #

fn (s &CollisionObject2D) shape_owner_clear_shapes(owner_id i64)

Removes all shapes from the shape owner.

fn (CollisionObject2D) shape_find_owner #

fn (s &CollisionObject2D) shape_find_owner(shape_index i64) i64

Returns the owner_id of the given shape.

struct CollisionObject3D #

struct CollisionObject3D {
	Node3D
}

Abstract base class for 3D physics objects.

fn (CollisionObject3D) to_variant #

fn (s &CollisionObject3D) to_variant() Variant

fn (CollisionObject3D) from_variant #

fn (mut s CollisionObject3D) from_variant(variant &Variant)

fn (CollisionObject3D) gd_input_event #

fn (s &CollisionObject3D) gd_input_event(camera Camera3D, event InputEvent, event_position Vector3, normal Vector3, shape_idx i64)

Receives unhandled [InputEvent]s. [param event_position] is the location in world space of the mouse pointer on the surface of the shape with index [param shape_idx] and [param normal] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events. [b]Note:[/b] [method _input_event] requires [member input_ray_pickable] to be true and at least one [member collision_layer] bit to be set.

fn (CollisionObject3D) gd_mouse_enter #

fn (s &CollisionObject3D) gd_mouse_enter()

Called when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be true and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject3D] won't cause this function to be called.

fn (CollisionObject3D) gd_mouse_exit #

fn (s &CollisionObject3D) gd_mouse_exit()

Called when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be true and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject3D] won't cause this function to be called.

fn (CollisionObject3D) set_collision_layer #

fn (s &CollisionObject3D) set_collision_layer(layer i64)

fn (CollisionObject3D) get_collision_layer #

fn (s &CollisionObject3D) get_collision_layer() i64

fn (CollisionObject3D) set_collision_mask #

fn (s &CollisionObject3D) set_collision_mask(mask i64)

fn (CollisionObject3D) get_collision_mask #

fn (s &CollisionObject3D) get_collision_mask() i64

fn (CollisionObject3D) set_collision_layer_value #

fn (s &CollisionObject3D) set_collision_layer_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.

fn (CollisionObject3D) get_collision_layer_value #

fn (s &CollisionObject3D) get_collision_layer_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.

fn (CollisionObject3D) set_collision_mask_value #

fn (s &CollisionObject3D) set_collision_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.

fn (CollisionObject3D) get_collision_mask_value #

fn (s &CollisionObject3D) get_collision_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (CollisionObject3D) set_collision_priority #

fn (s &CollisionObject3D) set_collision_priority(priority f64)

fn (CollisionObject3D) get_collision_priority #

fn (s &CollisionObject3D) get_collision_priority() f64

fn (CollisionObject3D) set_disable_mode #

fn (s &CollisionObject3D) set_disable_mode(mode CollisionObject3DDisableMode)

fn (CollisionObject3D) get_disable_mode #

fn (s &CollisionObject3D) get_disable_mode() CollisionObject3DDisableMode

fn (CollisionObject3D) set_ray_pickable #

fn (s &CollisionObject3D) set_ray_pickable(ray_pickable bool)

fn (CollisionObject3D) is_ray_pickable #

fn (s &CollisionObject3D) is_ray_pickable() bool

fn (CollisionObject3D) set_capture_input_on_drag #

fn (s &CollisionObject3D) set_capture_input_on_drag(enable bool)

fn (CollisionObject3D) get_capture_input_on_drag #

fn (s &CollisionObject3D) get_capture_input_on_drag() bool

fn (CollisionObject3D) get_rid #

fn (s &CollisionObject3D) get_rid() RID

Returns the object's [RID].

fn (CollisionObject3D) create_shape_owner #

fn (s &CollisionObject3D) create_shape_owner(owner Object) i64

Creates a new shape owner for the given object. Returns owner_id of the new owner for future reference.

fn (CollisionObject3D) remove_shape_owner #

fn (s &CollisionObject3D) remove_shape_owner(owner_id i64)

Removes the given shape owner.

fn (CollisionObject3D) get_shape_owners #

fn (s &CollisionObject3D) get_shape_owners() PackedInt32Array

Returns an [Array] of owner_id identifiers. You can use these ids in other methods that take owner_id as an argument.

fn (CollisionObject3D) shape_owner_set_transform #

fn (s &CollisionObject3D) shape_owner_set_transform(owner_id i64, transform Transform3D)

Sets the [Transform3D] of the given shape owner.

fn (CollisionObject3D) shape_owner_get_transform #

fn (s &CollisionObject3D) shape_owner_get_transform(owner_id i64) Transform3D

Returns the shape owner's [Transform3D].

fn (CollisionObject3D) shape_owner_get_owner #

fn (s &CollisionObject3D) shape_owner_get_owner(owner_id i64) Object

Returns the parent object of the given shape owner.

fn (CollisionObject3D) shape_owner_set_disabled #

fn (s &CollisionObject3D) shape_owner_set_disabled(owner_id i64, disabled bool)

If true, disables the given shape owner.

fn (CollisionObject3D) is_shape_owner_disabled #

fn (s &CollisionObject3D) is_shape_owner_disabled(owner_id i64) bool

If true, the shape owner and its shapes are disabled.

fn (CollisionObject3D) shape_owner_add_shape #

fn (s &CollisionObject3D) shape_owner_add_shape(owner_id i64, shape Shape3D)

Adds a [Shape3D] to the shape owner.

fn (CollisionObject3D) shape_owner_get_shape_count #

fn (s &CollisionObject3D) shape_owner_get_shape_count(owner_id i64) i64

Returns the number of shapes the given shape owner contains.

fn (CollisionObject3D) shape_owner_get_shape #

fn (s &CollisionObject3D) shape_owner_get_shape(owner_id i64, shape_id i64) Shape3D

Returns the [Shape3D] with the given ID from the given shape owner.

fn (CollisionObject3D) shape_owner_get_shape_index #

fn (s &CollisionObject3D) shape_owner_get_shape_index(owner_id i64, shape_id i64) i64

Returns the child index of the [Shape3D] with the given ID from the given shape owner.

fn (CollisionObject3D) shape_owner_remove_shape #

fn (s &CollisionObject3D) shape_owner_remove_shape(owner_id i64, shape_id i64)

Removes a shape from the given shape owner.

fn (CollisionObject3D) shape_owner_clear_shapes #

fn (s &CollisionObject3D) shape_owner_clear_shapes(owner_id i64)

Removes all shapes from the shape owner.

fn (CollisionObject3D) shape_find_owner #

fn (s &CollisionObject3D) shape_find_owner(shape_index i64) i64

Returns the owner_id of the given shape.

struct CollisionPolygon2D #

struct CollisionPolygon2D {
	Node2D
}

A node that provides a polygon shape to a [CollisionObject2D] parent.

fn (CollisionPolygon2D) to_variant #

fn (s &CollisionPolygon2D) to_variant() Variant

fn (CollisionPolygon2D) from_variant #

fn (mut s CollisionPolygon2D) from_variant(variant &Variant)

fn (CollisionPolygon2D) set_polygon #

fn (s &CollisionPolygon2D) set_polygon(polygon PackedVector2Array)

fn (CollisionPolygon2D) get_polygon #

fn (s &CollisionPolygon2D) get_polygon() PackedVector2Array

fn (CollisionPolygon2D) set_build_mode #

fn (s &CollisionPolygon2D) set_build_mode(build_mode CollisionPolygon2DBuildMode)

fn (CollisionPolygon2D) get_build_mode #

fn (s &CollisionPolygon2D) get_build_mode() CollisionPolygon2DBuildMode

fn (CollisionPolygon2D) set_disabled #

fn (s &CollisionPolygon2D) set_disabled(disabled bool)

fn (CollisionPolygon2D) is_disabled #

fn (s &CollisionPolygon2D) is_disabled() bool

fn (CollisionPolygon2D) set_one_way_collision #

fn (s &CollisionPolygon2D) set_one_way_collision(enabled bool)

fn (CollisionPolygon2D) is_one_way_collision_enabled #

fn (s &CollisionPolygon2D) is_one_way_collision_enabled() bool

fn (CollisionPolygon2D) set_one_way_collision_margin #

fn (s &CollisionPolygon2D) set_one_way_collision_margin(margin f64)

fn (CollisionPolygon2D) get_one_way_collision_margin #

fn (s &CollisionPolygon2D) get_one_way_collision_margin() f64

struct CollisionPolygon3D #

struct CollisionPolygon3D {
	Node3D
}

A node that provides a thickened polygon shape (a prism) to a [CollisionObject3D] parent.

fn (CollisionPolygon3D) to_variant #

fn (s &CollisionPolygon3D) to_variant() Variant

fn (CollisionPolygon3D) from_variant #

fn (mut s CollisionPolygon3D) from_variant(variant &Variant)

fn (CollisionPolygon3D) set_depth #

fn (s &CollisionPolygon3D) set_depth(depth f64)

fn (CollisionPolygon3D) get_depth #

fn (s &CollisionPolygon3D) get_depth() f64

fn (CollisionPolygon3D) set_polygon #

fn (s &CollisionPolygon3D) set_polygon(polygon PackedVector2Array)

fn (CollisionPolygon3D) get_polygon #

fn (s &CollisionPolygon3D) get_polygon() PackedVector2Array

fn (CollisionPolygon3D) set_disabled #

fn (s &CollisionPolygon3D) set_disabled(disabled bool)

fn (CollisionPolygon3D) is_disabled #

fn (s &CollisionPolygon3D) is_disabled() bool

fn (CollisionPolygon3D) set_debug_color #

fn (s &CollisionPolygon3D) set_debug_color(color Color)

fn (CollisionPolygon3D) get_debug_color #

fn (s &CollisionPolygon3D) get_debug_color() Color

fn (CollisionPolygon3D) set_enable_debug_fill #

fn (s &CollisionPolygon3D) set_enable_debug_fill(enable bool)

fn (CollisionPolygon3D) get_enable_debug_fill #

fn (s &CollisionPolygon3D) get_enable_debug_fill() bool

fn (CollisionPolygon3D) set_margin #

fn (s &CollisionPolygon3D) set_margin(margin f64)

fn (CollisionPolygon3D) get_margin #

fn (s &CollisionPolygon3D) get_margin() f64

struct CollisionShape2D #

struct CollisionShape2D {
	Node2D
}

A node that provides a [Shape2D] to a [CollisionObject2D] parent.

fn (CollisionShape2D) to_variant #

fn (s &CollisionShape2D) to_variant() Variant

fn (CollisionShape2D) from_variant #

fn (mut s CollisionShape2D) from_variant(variant &Variant)

fn (CollisionShape2D) set_shape #

fn (s &CollisionShape2D) set_shape(shape Shape2D)

fn (CollisionShape2D) get_shape #

fn (s &CollisionShape2D) get_shape() Shape2D

fn (CollisionShape2D) set_disabled #

fn (s &CollisionShape2D) set_disabled(disabled bool)

fn (CollisionShape2D) is_disabled #

fn (s &CollisionShape2D) is_disabled() bool

fn (CollisionShape2D) set_one_way_collision #

fn (s &CollisionShape2D) set_one_way_collision(enabled bool)

fn (CollisionShape2D) is_one_way_collision_enabled #

fn (s &CollisionShape2D) is_one_way_collision_enabled() bool

fn (CollisionShape2D) set_one_way_collision_margin #

fn (s &CollisionShape2D) set_one_way_collision_margin(margin f64)

fn (CollisionShape2D) get_one_way_collision_margin #

fn (s &CollisionShape2D) get_one_way_collision_margin() f64

fn (CollisionShape2D) set_debug_color #

fn (s &CollisionShape2D) set_debug_color(color Color)

fn (CollisionShape2D) get_debug_color #

fn (s &CollisionShape2D) get_debug_color() Color

struct CollisionShape3D #

struct CollisionShape3D {
	Node3D
}

A node that provides a [Shape3D] to a [CollisionObject3D] parent.

fn (CollisionShape3D) to_variant #

fn (s &CollisionShape3D) to_variant() Variant

fn (CollisionShape3D) from_variant #

fn (mut s CollisionShape3D) from_variant(variant &Variant)

fn (CollisionShape3D) resource_changed #

fn (s &CollisionShape3D) resource_changed(resource Resource)

This method does nothing.

fn (CollisionShape3D) set_shape #

fn (s &CollisionShape3D) set_shape(shape Shape3D)

fn (CollisionShape3D) get_shape #

fn (s &CollisionShape3D) get_shape() Shape3D

fn (CollisionShape3D) set_disabled #

fn (s &CollisionShape3D) set_disabled(enable bool)

fn (CollisionShape3D) is_disabled #

fn (s &CollisionShape3D) is_disabled() bool

fn (CollisionShape3D) make_convex_from_siblings #

fn (s &CollisionShape3D) make_convex_from_siblings()

Sets the collision shape's shape to the addition of all its convexed [MeshInstance3D] siblings geometry.

fn (CollisionShape3D) set_debug_color #

fn (s &CollisionShape3D) set_debug_color(color Color)

fn (CollisionShape3D) get_debug_color #

fn (s &CollisionShape3D) get_debug_color() Color

fn (CollisionShape3D) set_enable_debug_fill #

fn (s &CollisionShape3D) set_enable_debug_fill(enable bool)

fn (CollisionShape3D) get_enable_debug_fill #

fn (s &CollisionShape3D) get_enable_debug_fill() bool

struct Color #

@[packed]
struct Color {
pub mut:
	// The color's red component, typically on the range of 0 to 1.
	r f32 // offset 0
	// The color's green component, typically on the range of 0 to 1.
	g f32 // offset 4
	// The color's blue component, typically on the range of 0 to 1.
	b f32 // offset 8
	// The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque.
	// [b]Note:[/b] The alpha channel is always stored with linear encoding, regardless of the color space of the other color channels. The [method linear_to_srgb] and [method srgb_to_linear] methods do not affect the alpha channel.
	a f32 // offset 12
}

A color represented in RGBA format.

A color represented in RGBA format by a red ([member r]), green ([member g]), blue ([member b]), and alpha ([member a]) component. Each component is a 32-bit floating-point value, usually ranging from 0.0 to 1.0. Some properties (such as [member CanvasItem.modulate]) may support values greater than 1.0, for overbright or HDR (High Dynamic Range) colors. Colors can be created in various ways: By the various [Color] constructors, by static methods such as [method from_hsv], and by using a name from the set of standardized colors based on [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url] with the addition of [constant TRANSPARENT]. GDScript also provides [method @GDScript.Color8], which uses integers from 0 to 255 and doesn't support overbright colors. Color data may be stored in many color spaces and encodings. The [method srgb_to_linear] and [method linear_to_srgb] methods can convert between nonlinear sRGB encoding and linear RGB encoding. [b]Note:[/b] In a boolean context, a Color will evaluate to false if it is equal to Color(0, 0, 0, 1) (opaque black). Otherwise, a Color will always evaluate to true. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]

fn (Color) to_argb32 #

fn (s &Color) to_argb32() i64

Returns the color converted to a 32-bit integer in ARGB format (each component is 8 bits). ARGB is more compatible with DirectX. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) print(color.to_argb32()) # Prints 4294934323 [/gdscript] [csharp] var color = new Color(1.0f, 0.5f, 0.2f); GD.Print(color.ToArgb32()); // Prints 4294934323 [/csharp] [/codeblocks]

fn (Color) to_abgr32 #

fn (s &Color) to_abgr32() i64

Returns the color converted to a 32-bit integer in ABGR format (each component is 8 bits). ABGR is the reversed version of the default RGBA format. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) print(color.to_abgr32()) # Prints 4281565439 [/gdscript] [csharp] var color = new Color(1.0f, 0.5f, 0.2f); GD.Print(color.ToAbgr32()); // Prints 4281565439 [/csharp] [/codeblocks]

fn (Color) to_rgba32 #

fn (s &Color) to_rgba32() i64

Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format. This method is the inverse of [method hex]. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) print(color.to_rgba32()) # Prints 4286526463 [/gdscript] [csharp] var color = new Color(1, 0.5f, 0.2f); GD.Print(color.ToRgba32()); // Prints 4286526463 [/csharp] [/codeblocks]

fn (Color) to_argb64 #

fn (s &Color) to_argb64() i64

Returns the color converted to a 64-bit integer in ARGB format (each component is 16 bits). ARGB is more compatible with DirectX. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) print(color.to_argb64()) # Prints -2147470541 [/gdscript] [csharp] var color = new Color(1.0f, 0.5f, 0.2f); GD.Print(color.ToArgb64()); // Prints -2147470541 [/csharp] [/codeblocks]

fn (Color) to_abgr64 #

fn (s &Color) to_abgr64() i64

Returns the color converted to a 64-bit integer in ABGR format (each component is 16 bits). ABGR is the reversed version of the default RGBA format. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) print(color.to_abgr64()) # Prints -225178692812801 [/gdscript] [csharp] var color = new Color(1.0f, 0.5f, 0.2f); GD.Print(color.ToAbgr64()); // Prints -225178692812801 [/csharp] [/codeblocks]

fn (Color) to_rgba64 #

fn (s &Color) to_rgba64() i64

Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format. This method is the inverse of [method hex64]. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) print(color.to_rgba64()) # Prints -140736629309441 [/gdscript] [csharp] var color = new Color(1, 0.5f, 0.2f); GD.Print(color.ToRgba64()); // Prints -140736629309441 [/csharp] [/codeblocks]

fn (Color) to_html #

fn (s &Color) to_html(cfg Color_to_html_Cfg) String

Returns the color converted to an HTML hexadecimal color [String] in RGBA format, without the hash (#) prefix. Setting [param with_alpha] to false, excludes alpha from the hexadecimal string, using RGB format instead of RGBA format. [codeblocks] [gdscript] var white = Color(1, 1, 1, 0.5) var with_alpha = white.to_html() # Returns "ffffff7f" var without_alpha = white.to_html(false) # Returns "ffffff" [/gdscript] [csharp] var white = new Color(1, 1, 1, 0.5f); string withAlpha = white.ToHtml(); // Returns "ffffff7f" string withoutAlpha = white.ToHtml(false); // Returns "ffffff" [/csharp] [/codeblocks]

fn (Color) clamp #

fn (s &Color) clamp(cfg Color_clamp_Cfg) Color

Returns a new color with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Color) inverted #

fn (s &Color) inverted() Color

Returns the color with its [member r], [member g], and [member b] components inverted ((1 - r, 1 - g, 1 - b, a)). [codeblocks] [gdscript] var black = Color.WHITE.inverted() var color = Color(0.3, 0.4, 0.9) var inverted_color = color.inverted() # Equivalent to Color(0.7, 0.6, 0.1) [/gdscript] [csharp] var black = Colors.White.Inverted(); var color = new Color(0.3f, 0.4f, 0.9f); Color invertedColor = color.Inverted(); // Equivalent to new Color(0.7f, 0.6f, 0.1f) [/csharp] [/codeblocks]

fn (Color) lerp #

fn (s &Color) lerp(to Color, weight f64) Color

Returns the linear interpolation between this color's components and [param to]'s components. The interpolation factor [param weight] should be between 0.0 and 1.0 (inclusive). See also [method @GlobalScope.lerp]. [codeblocks] [gdscript] var red = Color(1.0, 0.0, 0.0) var aqua = Color(0.0, 1.0, 0.8)

red.lerp(aqua, 0.2) # Returns Color(0.8, 0.2, 0.16) red.lerp(aqua, 0.5) # Returns Color(0.5, 0.5, 0.4) red.lerp(aqua, 1.0) # Returns Color(0.0, 1.0, 0.8) [/gdscript] [csharp] var red = new Color(1.0f, 0.0f, 0.0f); var aqua = new Color(0.0f, 1.0f, 0.8f);

red.Lerp(aqua, 0.2f); // Returns Color(0.8f, 0.2f, 0.16f) red.Lerp(aqua, 0.5f); // Returns Color(0.5f, 0.5f, 0.4f) red.Lerp(aqua, 1.0f); // Returns Color(0.0f, 1.0f, 0.8f) [/csharp] [/codeblocks]

fn (Color) lightened #

fn (s &Color) lightened(amount f64) Color

Returns a new color resulting from making this color lighter by the specified [param amount], which should be a ratio from 0.0 to 1.0. See also [method darkened]. [codeblocks] [gdscript] var green = Color(0.0, 1.0, 0.0) var light_green = green.lightened(0.2) # 20% lighter than regular green [/gdscript] [csharp] var green = new Color(0.0f, 1.0f, 0.0f); Color lightGreen = green.Lightened(0.2f); // 20% lighter than regular green [/csharp] [/codeblocks]

fn (Color) darkened #

fn (s &Color) darkened(amount f64) Color

Returns a new color resulting from making this color darker by the specified [param amount] (ratio from 0.0 to 1.0). See also [method lightened]. [codeblocks] [gdscript] var green = Color(0.0, 1.0, 0.0) var darkgreen = green.darkened(0.2) # 20% darker than regular green [/gdscript] [csharp] var green = new Color(0.0f, 1.0f, 0.0f); Color darkgreen = green.Darkened(0.2f); // 20% darker than regular green [/csharp] [/codeblocks]

fn (Color) blend #

fn (s &Color) blend(over Color) Color

Returns a new color resulting from overlaying this color over the given color. In a painting program, you can imagine it as the [param over] color painted over this color (including alpha). [codeblocks] [gdscript] var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50% var fg = Color(1.0, 0.0, 0.0, 0.5) # Red with alpha of 50% var blended_color = bg.blend(fg) # Brown with alpha of 75% [/gdscript] [csharp] var bg = new Color(0.0f, 1.0f, 0.0f, 0.5f); // Green with alpha of 50% var fg = new Color(1.0f, 0.0f, 0.0f, 0.5f); // Red with alpha of 50% Color blendedColor = bg.Blend(fg); // Brown with alpha of 75% [/csharp] [/codeblocks]

fn (Color) get_luminance #

fn (s &Color) get_luminance() f64

Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclusive). This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark. [b]Note:[/b] [method get_luminance] relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first.

fn (Color) srgb_to_linear #

fn (s &Color) srgb_to_linear() Color

Returns the color converted to the linear color space. This method assumes the original color already is in the sRGB color space. See also [method linear_to_srgb] which performs the opposite operation. [b]Note:[/b] The color's [member a]lpha channel is not affected. The alpha channel is always stored with linear encoding, regardless of the color space of the other color channels.

fn (Color) linear_to_srgb #

fn (s &Color) linear_to_srgb() Color

Returns the color converted to the [url=https://en.wikipedia.org/wiki/SRGB]sRGB[/url] color space. This method assumes the original color is in the linear color space. See also [method srgb_to_linear] which performs the opposite operation. [b]Note:[/b] The color's [member a]lpha channel is not affected. The alpha channel is always stored with linear encoding, regardless of the color space of the other color channels.

fn (Color) is_equal_approx #

fn (s &Color) is_equal_approx(to Color) bool

Returns true if this color and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.

fn (Color) to_variant #

fn (s &Color) to_variant() Variant

fn (Color) from_variant #

fn (mut s Color) from_variant(variant &Variant)

fn (Color) index #

fn (v &Color) index(i i64) f64

fn (Color) mul_i64 #

fn (a Color) mul_i64(b i64) Color

Multiplies each component of the [Color] by the given [int].

fn (Color) div_i64 #

fn (a Color) div_i64(b i64) Color

Divides each component of the [Color] by the given [int].

fn (Color) mul_f64 #

fn (a Color) mul_f64(b f64) Color

Multiplies each component of the [Color] by the given [float].

fn (Color) div_f64 #

fn (a Color) div_f64(b f64) Color

Divides each component of the [Color] by the given [float].

fn (Color) == #

fn (a Color) == (b Color) bool

Returns true if the colors are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Color) eq_color #

fn (a Color) eq_color(b Color) bool

Returns true if the colors are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Color) ne_color #

fn (a Color) ne_color(b Color) bool

Returns true if the colors are not exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Color) + #

fn (a Color) + (b Color) Color

Adds each component of the [Color] with the components of the given [Color].

fn (Color) add_color #

fn (a Color) add_color(b Color) Color

Adds each component of the [Color] with the components of the given [Color].

fn (Color) - #

fn (a Color) - (b Color) Color

Subtracts each component of the [Color] by the components of the given [Color].

fn (Color) sub_color #

fn (a Color) sub_color(b Color) Color

Subtracts each component of the [Color] by the components of the given [Color].

fn (Color) * #

fn (a Color) * (b Color) Color

Multiplies each component of the [Color] by the components of the given [Color].

fn (Color) mul_color #

fn (a Color) mul_color(b Color) Color

Multiplies each component of the [Color] by the components of the given [Color].

fn (Color) / #

fn (a Color) / (b Color) Color

Divides each component of the [Color] by the components of the given [Color].

fn (Color) div_color #

fn (a Color) div_color(b Color) Color

Divides each component of the [Color] by the components of the given [Color].

fn (Color) in_dictionary #

fn (a Color) in_dictionary(b Dictionary) bool

fn (Color) in_array #

fn (a Color) in_array(b Array) bool

fn (Color) in_packedcolorarray #

fn (a Color) in_packedcolorarray(b PackedColorArray) bool

struct ColorPalette #

struct ColorPalette {
	Resource
}

A resource class for managing a palette of colors, which can be loaded and saved using [ColorPicker].

fn (ColorPalette) to_variant #

fn (s &ColorPalette) to_variant() Variant

fn (ColorPalette) from_variant #

fn (mut s ColorPalette) from_variant(variant &Variant)

fn (ColorPalette) set_colors #

fn (s &ColorPalette) set_colors(colors PackedColorArray)

fn (ColorPalette) get_colors #

fn (s &ColorPalette) get_colors() PackedColorArray

struct ColorPicker #

struct ColorPicker {
	VBoxContainer
}

A widget that provides an interface for selecting or modifying a color.

fn (ColorPicker) to_variant #

fn (s &ColorPicker) to_variant() Variant

fn (ColorPicker) from_variant #

fn (mut s ColorPicker) from_variant(variant &Variant)

fn (ColorPicker) set_pick_color #

fn (s &ColorPicker) set_pick_color(color Color)

fn (ColorPicker) get_pick_color #

fn (s &ColorPicker) get_pick_color() Color

fn (ColorPicker) set_deferred_mode #

fn (s &ColorPicker) set_deferred_mode(mode bool)

fn (ColorPicker) is_deferred_mode #

fn (s &ColorPicker) is_deferred_mode() bool

fn (ColorPicker) set_color_mode #

fn (s &ColorPicker) set_color_mode(color_mode ColorPickerColorModeType)

fn (ColorPicker) get_color_mode #

fn (s &ColorPicker) get_color_mode() ColorPickerColorModeType

fn (ColorPicker) set_edit_alpha #

fn (s &ColorPicker) set_edit_alpha(show bool)

fn (ColorPicker) is_editing_alpha #

fn (s &ColorPicker) is_editing_alpha() bool

fn (ColorPicker) set_edit_intensity #

fn (s &ColorPicker) set_edit_intensity(show bool)

fn (ColorPicker) is_editing_intensity #

fn (s &ColorPicker) is_editing_intensity() bool

fn (ColorPicker) set_can_add_swatches #

fn (s &ColorPicker) set_can_add_swatches(enabled bool)

fn (ColorPicker) are_swatches_enabled #

fn (s &ColorPicker) are_swatches_enabled() bool

fn (ColorPicker) set_presets_visible #

fn (s &ColorPicker) set_presets_visible(visible bool)

fn (ColorPicker) are_presets_visible #

fn (s &ColorPicker) are_presets_visible() bool

fn (ColorPicker) set_modes_visible #

fn (s &ColorPicker) set_modes_visible(visible bool)

fn (ColorPicker) are_modes_visible #

fn (s &ColorPicker) are_modes_visible() bool

fn (ColorPicker) set_sampler_visible #

fn (s &ColorPicker) set_sampler_visible(visible bool)

fn (ColorPicker) is_sampler_visible #

fn (s &ColorPicker) is_sampler_visible() bool

fn (ColorPicker) set_sliders_visible #

fn (s &ColorPicker) set_sliders_visible(visible bool)

fn (ColorPicker) are_sliders_visible #

fn (s &ColorPicker) are_sliders_visible() bool

fn (ColorPicker) set_hex_visible #

fn (s &ColorPicker) set_hex_visible(visible bool)

fn (ColorPicker) is_hex_visible #

fn (s &ColorPicker) is_hex_visible() bool

fn (ColorPicker) add_preset #

fn (s &ColorPicker) add_preset(color Color)

Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. [b]Note:[/b] The presets list is only for [i]this[/i] color picker.

fn (ColorPicker) erase_preset #

fn (s &ColorPicker) erase_preset(color Color)

Removes the given color from the list of color presets of this color picker.

fn (ColorPicker) get_presets #

fn (s &ColorPicker) get_presets() PackedColorArray

Returns the list of colors in the presets of the color picker.

fn (ColorPicker) add_recent_preset #

fn (s &ColorPicker) add_recent_preset(color Color)

Adds the given color to a list of color recent presets so that it can be picked later. Recent presets are the colors that were picked recently, a new preset is automatically created and added to recent presets when you pick a new color. [b]Note:[/b] The recent presets list is only for [i]this[/i] color picker.

fn (ColorPicker) erase_recent_preset #

fn (s &ColorPicker) erase_recent_preset(color Color)

Removes the given color from the list of color recent presets of this color picker.

fn (ColorPicker) get_recent_presets #

fn (s &ColorPicker) get_recent_presets() PackedColorArray

Returns the list of colors in the recent presets of the color picker.

fn (ColorPicker) set_picker_shape #

fn (s &ColorPicker) set_picker_shape(shape ColorPickerPickerShapeType)

fn (ColorPicker) get_picker_shape #

fn (s &ColorPicker) get_picker_shape() ColorPickerPickerShapeType

struct ColorPickerButton #

struct ColorPickerButton {
	Button
}

A button that brings up a [ColorPicker] when pressed.

fn (ColorPickerButton) to_variant #

fn (s &ColorPickerButton) to_variant() Variant

fn (ColorPickerButton) from_variant #

fn (mut s ColorPickerButton) from_variant(variant &Variant)

fn (ColorPickerButton) set_pick_color #

fn (s &ColorPickerButton) set_pick_color(color Color)

fn (ColorPickerButton) get_pick_color #

fn (s &ColorPickerButton) get_pick_color() Color

fn (ColorPickerButton) get_picker #

fn (s &ColorPickerButton) get_picker() ColorPicker

Returns the [ColorPicker] that this node toggles. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (ColorPickerButton) get_popup #

fn (s &ColorPickerButton) get_popup() PopupPanel

Returns the control's [PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.

fn (ColorPickerButton) set_edit_alpha #

fn (s &ColorPickerButton) set_edit_alpha(show bool)

fn (ColorPickerButton) is_editing_alpha #

fn (s &ColorPickerButton) is_editing_alpha() bool

fn (ColorPickerButton) set_edit_intensity #

fn (s &ColorPickerButton) set_edit_intensity(show bool)

fn (ColorPickerButton) is_editing_intensity #

fn (s &ColorPickerButton) is_editing_intensity() bool

struct ColorRect #

struct ColorRect {
	Control
}

A control that displays a solid color rectangle.

fn (ColorRect) to_variant #

fn (s &ColorRect) to_variant() Variant

fn (ColorRect) from_variant #

fn (mut s ColorRect) from_variant(variant &Variant)

fn (ColorRect) set_color #

fn (s &ColorRect) set_color(color Color)

fn (ColorRect) get_color #

fn (s &ColorRect) get_color() Color

struct Color_clamp_Cfg #

@[params]
struct Color_clamp_Cfg {
pub:
	min Color = Color{0, 0, 0, 0}
	max Color = Color{1, 1, 1, 1}
}

struct Color_from_hsv_Cfg #

@[params]
struct Color_from_hsv_Cfg {
pub:
	alpha f64 = 1.0
}

struct Color_from_ok_hsl_Cfg #

@[params]
struct Color_from_ok_hsl_Cfg {
pub:
	alpha f64 = 1.0
}

struct Color_from_rgba8_Cfg #

@[params]
struct Color_from_rgba8_Cfg {
pub:
	a8 i64 = 255
}

struct Color_to_html_Cfg #

@[params]
struct Color_to_html_Cfg {
pub:
	with_alpha bool
}

struct Compositor #

struct Compositor {
	Resource
}

Stores attributes used to customize how a Viewport is rendered.

fn (Compositor) to_variant #

fn (s &Compositor) to_variant() Variant

fn (Compositor) from_variant #

fn (mut s Compositor) from_variant(variant &Variant)

fn (Compositor) set_compositor_effects #

fn (s &Compositor) set_compositor_effects(compositor_effects Array)

fn (Compositor) get_compositor_effects #

fn (s &Compositor) get_compositor_effects() Array

struct CompositorEffect #

struct CompositorEffect {
	Resource
}

This resource allows for creating a custom rendering effect.

fn (CompositorEffect) to_variant #

fn (s &CompositorEffect) to_variant() Variant

fn (CompositorEffect) from_variant #

fn (mut s CompositorEffect) from_variant(variant &Variant)

fn (CompositorEffect) gd_render_callback #

fn (s &CompositorEffect) gd_render_callback(effect_callback_type i64, render_data RenderData)

Implement this function with your custom rendering code. [param effect_callback_type] should always match the effect callback type you've specified in [member effect_callback_type]. [param render_data] provides access to the rendering state, it is only valid during rendering and should not be stored.

fn (CompositorEffect) set_enabled #

fn (s &CompositorEffect) set_enabled(enabled bool)

fn (CompositorEffect) get_enabled #

fn (s &CompositorEffect) get_enabled() bool

fn (CompositorEffect) set_effect_callback_type #

fn (s &CompositorEffect) set_effect_callback_type(effect_callback_type CompositorEffectEffectCallbackType)

fn (CompositorEffect) get_effect_callback_type #

fn (s &CompositorEffect) get_effect_callback_type() CompositorEffectEffectCallbackType

fn (CompositorEffect) set_access_resolved_color #

fn (s &CompositorEffect) set_access_resolved_color(enable bool)

fn (CompositorEffect) get_access_resolved_color #

fn (s &CompositorEffect) get_access_resolved_color() bool

fn (CompositorEffect) set_access_resolved_depth #

fn (s &CompositorEffect) set_access_resolved_depth(enable bool)

fn (CompositorEffect) get_access_resolved_depth #

fn (s &CompositorEffect) get_access_resolved_depth() bool

fn (CompositorEffect) set_needs_motion_vectors #

fn (s &CompositorEffect) set_needs_motion_vectors(enable bool)

fn (CompositorEffect) get_needs_motion_vectors #

fn (s &CompositorEffect) get_needs_motion_vectors() bool

fn (CompositorEffect) set_needs_normal_roughness #

fn (s &CompositorEffect) set_needs_normal_roughness(enable bool)

fn (CompositorEffect) get_needs_normal_roughness #

fn (s &CompositorEffect) get_needs_normal_roughness() bool

fn (CompositorEffect) set_needs_separate_specular #

fn (s &CompositorEffect) set_needs_separate_specular(enable bool)

fn (CompositorEffect) get_needs_separate_specular #

fn (s &CompositorEffect) get_needs_separate_specular() bool

struct CompressedCubemap #

struct CompressedCubemap {
	CompressedTextureLayered
}

An optionally compressed [Cubemap].

fn (CompressedCubemap) to_variant #

fn (s &CompressedCubemap) to_variant() Variant

fn (CompressedCubemap) from_variant #

fn (mut s CompressedCubemap) from_variant(variant &Variant)

struct CompressedCubemapArray #

struct CompressedCubemapArray {
	CompressedTextureLayered
}

An optionally compressed [CubemapArray].

fn (CompressedCubemapArray) to_variant #

fn (s &CompressedCubemapArray) to_variant() Variant

fn (CompressedCubemapArray) from_variant #

fn (mut s CompressedCubemapArray) from_variant(variant &Variant)

struct CompressedTexture2D #

struct CompressedTexture2D {
	Texture2D
}

Texture with 2 dimensions, optionally compressed.

fn (CompressedTexture2D) to_variant #

fn (s &CompressedTexture2D) to_variant() Variant

fn (CompressedTexture2D) from_variant #

fn (mut s CompressedTexture2D) from_variant(variant &Variant)

fn (CompressedTexture2D) load #

fn (s &CompressedTexture2D) load(path string) GDError

Loads the texture from the specified [param path].

fn (CompressedTexture2D) get_load_path #

fn (s &CompressedTexture2D) get_load_path() string

struct CompressedTexture2DArray #

struct CompressedTexture2DArray {
	CompressedTextureLayered
}

Array of 2-dimensional textures, optionally compressed.

fn (CompressedTexture2DArray) to_variant #

fn (s &CompressedTexture2DArray) to_variant() Variant

fn (CompressedTexture2DArray) from_variant #

fn (mut s CompressedTexture2DArray) from_variant(variant &Variant)

struct CompressedTexture3D #

struct CompressedTexture3D {
	Texture3D
}

Texture with 3 dimensions, optionally compressed.

fn (CompressedTexture3D) to_variant #

fn (s &CompressedTexture3D) to_variant() Variant

fn (CompressedTexture3D) from_variant #

fn (mut s CompressedTexture3D) from_variant(variant &Variant)

fn (CompressedTexture3D) load #

fn (s &CompressedTexture3D) load(path string) GDError

Loads the texture from the specified [param path].

fn (CompressedTexture3D) get_load_path #

fn (s &CompressedTexture3D) get_load_path() string

struct CompressedTextureLayered #

struct CompressedTextureLayered {
	TextureLayered
}

Base class for texture arrays that can optionally be compressed.

fn (CompressedTextureLayered) to_variant #

fn (s &CompressedTextureLayered) to_variant() Variant

fn (CompressedTextureLayered) from_variant #

fn (mut s CompressedTextureLayered) from_variant(variant &Variant)

fn (CompressedTextureLayered) load #

fn (s &CompressedTextureLayered) load(path string) GDError

Loads the texture at [param path].

fn (CompressedTextureLayered) get_load_path #

fn (s &CompressedTextureLayered) get_load_path() string

struct ConcavePolygonShape2D #

struct ConcavePolygonShape2D {
	Shape2D
}

A 2D polyline shape used for physics collision.

fn (ConcavePolygonShape2D) to_variant #

fn (s &ConcavePolygonShape2D) to_variant() Variant

fn (ConcavePolygonShape2D) from_variant #

fn (mut s ConcavePolygonShape2D) from_variant(variant &Variant)

fn (ConcavePolygonShape2D) set_segments #

fn (s &ConcavePolygonShape2D) set_segments(segments PackedVector2Array)

fn (ConcavePolygonShape2D) get_segments #

fn (s &ConcavePolygonShape2D) get_segments() PackedVector2Array

struct ConcavePolygonShape3D #

struct ConcavePolygonShape3D {
	Shape3D
}

A 3D trimesh shape used for physics collision.

fn (ConcavePolygonShape3D) to_variant #

fn (s &ConcavePolygonShape3D) to_variant() Variant

fn (ConcavePolygonShape3D) from_variant #

fn (mut s ConcavePolygonShape3D) from_variant(variant &Variant)

fn (ConcavePolygonShape3D) set_faces #

fn (s &ConcavePolygonShape3D) set_faces(faces PackedVector3Array)

Sets the faces of the trimesh shape from an array of vertices. The [param faces] array should be composed of triples such that each triple of vertices defines a triangle.

fn (ConcavePolygonShape3D) get_faces #

fn (s &ConcavePolygonShape3D) get_faces() PackedVector3Array

Returns the faces of the trimesh shape as an array of vertices. The array (of length divisible by three) is naturally divided into triples; each triple of vertices defines a triangle.

fn (ConcavePolygonShape3D) set_backface_collision_enabled #

fn (s &ConcavePolygonShape3D) set_backface_collision_enabled(enabled bool)

fn (ConcavePolygonShape3D) is_backface_collision_enabled #

fn (s &ConcavePolygonShape3D) is_backface_collision_enabled() bool

struct ConeTwistJoint3D #

struct ConeTwistJoint3D {
	Joint3D
}

A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint.

fn (ConeTwistJoint3D) to_variant #

fn (s &ConeTwistJoint3D) to_variant() Variant

fn (ConeTwistJoint3D) from_variant #

fn (mut s ConeTwistJoint3D) from_variant(variant &Variant)

fn (ConeTwistJoint3D) set_param #

fn (s &ConeTwistJoint3D) set_param(param ConeTwistJoint3DParam, value f64)

Sets the value of the specified parameter.

fn (ConeTwistJoint3D) get_param #

fn (s &ConeTwistJoint3D) get_param(param ConeTwistJoint3DParam) f64

Returns the value of the specified parameter.

struct ConfigFile #

struct ConfigFile {
	RefCounted
}

Helper class to handle INI-style files.

fn (ConfigFile) to_variant #

fn (s &ConfigFile) to_variant() Variant

fn (ConfigFile) from_variant #

fn (mut s ConfigFile) from_variant(variant &Variant)

fn (ConfigFile) set_value #

fn (s &ConfigFile) set_value(section string, key string, value_ ToVariant)

Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a null value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed.

fn (ConfigFile) get_value #

fn (s &ConfigFile) get_value(section string, key string, cfg ConfigFile_get_value_Cfg) Variant

Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback [param default] value. If [param default] is not specified or set to null, an error is also raised.

fn (ConfigFile) has_section #

fn (s &ConfigFile) has_section(section string) bool

Returns true if the specified section exists.

fn (ConfigFile) has_section_key #

fn (s &ConfigFile) has_section_key(section string, key string) bool

Returns true if the specified section-key pair exists.

fn (ConfigFile) get_sections #

fn (s &ConfigFile) get_sections() PackedStringArray

Returns an array of all defined section identifiers.

fn (ConfigFile) get_section_keys #

fn (s &ConfigFile) get_section_keys(section string) PackedStringArray

Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist.

fn (ConfigFile) erase_section #

fn (s &ConfigFile) erase_section(section string)

Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist.

fn (ConfigFile) erase_section_key #

fn (s &ConfigFile) erase_section_key(section string, key string)

Deletes the specified key in a section. Raises an error if either the section or the key do not exist.

fn (ConfigFile) load #

fn (s &ConfigFile) load(path string) GDError

Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed.

fn (ConfigFile) parse #

fn (s &ConfigFile) parse(data string) GDError

Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed.

fn (ConfigFile) save #

fn (s &ConfigFile) save(path string) GDError

Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure. Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed.

fn (ConfigFile) encode_to_text #

fn (s &ConfigFile) encode_to_text() string

Obtain the text version of this config file (the same text that would be written to a file).

fn (ConfigFile) load_encrypted #

fn (s &ConfigFile) load_encrypted(path string, key PackedByteArray) GDError

Loads the encrypted config file specified as a parameter, using the provided [param key] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed.

fn (ConfigFile) load_encrypted_pass #

fn (s &ConfigFile) load_encrypted_pass(path string, password string) GDError

Loads the encrypted config file specified as a parameter, using the provided [param password] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed.

fn (ConfigFile) save_encrypted #

fn (s &ConfigFile) save_encrypted(path string, key PackedByteArray) GDError

Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param key] to encrypt it. The output file uses an INI-style structure. Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed.

fn (ConfigFile) save_encrypted_pass #

fn (s &ConfigFile) save_encrypted_pass(path string, password string) GDError

Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param password] to encrypt it. The output file uses an INI-style structure. Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed.

fn (ConfigFile) clear #

fn (s &ConfigFile) clear()

Removes the entire contents of the config.

struct ConfigFile_get_value_Cfg #

@[params]
struct ConfigFile_get_value_Cfg {
pub:
	default ToVariant
}

Optional parameters for ConfigFile#get_value

struct ConfirmationDialog #

struct ConfirmationDialog {
	AcceptDialog
}

A dialog used for confirmation of actions.

fn (ConfirmationDialog) to_variant #

fn (s &ConfirmationDialog) to_variant() Variant

fn (ConfirmationDialog) from_variant #

fn (mut s ConfirmationDialog) from_variant(variant &Variant)

fn (ConfirmationDialog) get_cancel_button #

fn (s &ConfirmationDialog) get_cancel_button() Button

Returns the cancel button. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (ConfirmationDialog) set_cancel_button_text #

fn (s &ConfirmationDialog) set_cancel_button_text(text string)

fn (ConfirmationDialog) get_cancel_button_text #

fn (s &ConfirmationDialog) get_cancel_button_text() string

struct Container #

struct Container {
	Control
}

Base class for all GUI containers.

fn (Container) to_variant #

fn (s &Container) to_variant() Variant

fn (Container) from_variant #

fn (mut s Container) from_variant(variant &Variant)

fn (Container) gd_get_allowed_size_flags_horizontal #

fn (s &Container) gd_get_allowed_size_flags_horizontal() PackedInt32Array

Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.

fn (Container) gd_get_allowed_size_flags_vertical #

fn (s &Container) gd_get_allowed_size_flags_vertical() PackedInt32Array

Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.

fn (Container) queue_sort #

fn (s &Container) queue_sort()

Queue resort of the contained children. This is called automatically anyway, but can be called upon request.

fn (Container) fit_child_in_rect #

fn (s &Container) fit_child_in_rect(child Control, rect Rect2)

Fit a child control in a given rect. This is mainly a helper for creating custom container classes.

struct Control #

struct Control {
	CanvasItem
}

Base class for all GUI controls. Adapts its position and size based on its parent control.

fn (Control) to_variant #

fn (s &Control) to_variant() Variant

fn (Control) from_variant #

fn (mut s Control) from_variant(variant &Variant)

fn (Control) gd_has_point #

fn (s &Control) gd_has_point(point Vector2) bool

Virtual method to be implemented by the user. Returns whether the given [param point] is inside this control. If not overridden, default behavior is checking if the point is within control's Rect. [b]Note:[/b] If you want to check if a point is inside the control, you can use Rect2(Vector2.ZERO, size).has_point(point).

fn (Control) gd_structured_text_parser #

fn (s &Control) gd_structured_text_parser(gd_args Array, text string) Array

User defined BiDi algorithm override function. Returns an [Array] of [Vector3i] text ranges and text base directions, in the left-to-right order. Ranges should cover full source [param text] without overlaps. BiDi algorithm will be used on each range separately.

fn (Control) gd_get_minimum_size #

fn (s &Control) gd_get_minimum_size() Vector2

Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member custom_minimum_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). If not overridden, defaults to [constant Vector2.ZERO]. [b]Note:[/b] This method will not be called when the script is attached to a [Control] node that already overrides its minimum size (e.g. [Label], [Button], [PanelContainer] etc.). It can only be used with most basic GUI nodes, like [Control], [Container], [Panel] etc.

fn (Control) gd_get_tooltip #

fn (s &Control) gd_get_tooltip(at_position Vector2) string

Virtual method to be implemented by the user. Returns the tooltip text for the position [param at_position] in control's local coordinates, which will typically appear when the cursor is resting over this control. See [method get_tooltip]. [b]Note:[/b] If this method returns an empty [String] and [method _make_custom_tooltip] is not overridden, no tooltip is displayed.

fn (Control) gd_get_drag_data #

fn (s &Control) gd_get_drag_data(at_position Vector2) Variant

Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns null if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [param at_position] is local to this control. Drag may be forced with [method force_drag]. A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method. [b]Note:[/b] If the drag was initiated by a keyboard shortcut or [method accessibility_drag], [param at_position] is set to [constant Vector2.INF], and the currently selected item/text position should be used as the drag position. [codeblocks] [gdscript] func _get_drag_data(position): var mydata = make_data() # This is your custom method generating the drag data. set_drag_preview(make_preview(mydata)) # This is your custom method generating the preview of the drag data. return mydata [/gdscript] [csharp] public override Variant _GetDragData(Vector2 atPosition) { var myData = MakeData(); // This is your custom method generating the drag data. SetDragPreview(MakePreview(myData)); // This is your custom method generating the preview of the drag data. return myData; } [/csharp] [/codeblocks]

fn (Control) gd_can_drop_data #

fn (s &Control) gd_can_drop_data(at_position Vector2, data_ ToVariant) bool

Godot calls this method to test if [param data] from a control's [method _get_drag_data] can be dropped at [param at_position]. [param at_position] is local to this control. This method should only be used to test the data. Process the data in [method _drop_data]. [b]Note:[/b] If the drag was initiated by a keyboard shortcut or [method accessibility_drag], [param at_position] is set to [constant Vector2.INF], and the currently selected item/text position should be used as the drop position. [codeblocks] [gdscript] func _can_drop_data(position, data):# Check position if it is relevant to you

Otherwise, just check data

return typeof(data) == TYPE_DICTIONARY and data.has("expected") [/gdscript] [csharp] public override bool _CanDropData(Vector2 atPosition, Variant data) { // Check position if it is relevant to you // Otherwise, just check data return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().ContainsKey("expected"); } [/csharp] [/codeblocks]

fn (Control) gd_drop_data #

fn (s &Control) gd_drop_data(at_position Vector2, data_ ToVariant)

Godot calls this method to pass you the [param data] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [param data] is allowed to drop at [param at_position] where [param at_position] is local to this control. [b]Note:[/b] If the drag was initiated by a keyboard shortcut or [method accessibility_drag], [param at_position] is set to [constant Vector2.INF], and the currently selected item/text position should be used as the drop position. [codeblocks] [gdscript] func _can_drop_data(position, data): return typeof(data) == TYPE_DICTIONARY and data.has("color")

func _drop_data(position, data): var color = data["color"] [/gdscript] [csharp] public override bool _CanDropData(Vector2 atPosition, Variant data) { return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().ContainsKey("color"); }

public override void _DropData(Vector2 atPosition, Variant data) { Color color = data.AsGodotDictionary()["color"].AsColor(); } [/csharp] [/codeblocks]

fn (Control) gd_make_custom_tooltip #

fn (s &Control) gd_make_custom_tooltip(for_text string) Object

Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. [param for_text] is the return value of [method get_tooltip]. The returned node must be of type [Control] or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When null or a non-Control node is returned, the default tooltip will be used instead. The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type "TooltipPanel" (see [member tooltip_text] for an example). [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member custom_minimum_size] to some non-zero value. [b]Note:[/b] The node (and any relevant children) should have their [member CanvasItem.visible] set to true when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. [b]Note:[/b] If overridden, this method is called even if [method get_tooltip] returns an empty string. When this happens with the default tooltip, it is not displayed. To copy this behavior, return null in this method when [param for_text] is empty. [b]Example:[/b] Use a constructed node as a tooltip: [codeblocks] [gdscript] func _make_custom_tooltip(for_text): var label = Label.new() label.text = for_text return label [/gdscript] [csharp] public override Control _MakeCustomTooltip(string forText) { var label = new Label(); label.Text = forText; return label; } [/csharp] [/codeblocks] [b]Example:[/b] Usa a scene instance as a tooltip: [codeblocks] [gdscript] func _make_custom_tooltip(for_text): var tooltip = preload("res://some_tooltip_scene.tscn").instantiate() tooltip.get_node("Label").text = for_text return tooltip [/gdscript] [csharp] public override Control _MakeCustomTooltip(string forText) { Node tooltip = ResourceLoader.Load("res://some_tooltip_scene.tscn").Instantiate(); tooltip.GetNode

fn (Control) gd_accessibility_get_contextual_info #

fn (s &Control) gd_accessibility_get_contextual_info() string

Return the description of the keyboard shortcuts and other contextual help for this control.

fn (Control) gd_get_accessibility_container_name #

fn (s &Control) gd_get_accessibility_container_name(node Node) string

Override this method to return a human-readable description of the position of the child [param node] in the custom container, added to the [member accessibility_name].

fn (Control) gd_gui_input #

fn (s &Control) gd_gui_input(event InputEvent)

Virtual method to be implemented by the user. Override this method to handle and accept inputs on UI elements. See also [method accept_event]. [b]Example:[/b] Click on the control to print a message: [codeblocks] [gdscript] func _gui_input(event): if event is InputEventMouseButton: if event.button_index == MOUSE_BUTTON_LEFT and event.pressed: print("I've been clicked D:") [/gdscript] [csharp] public override void _GuiInput(InputEvent @event) { if (@event is InputEventMouseButton mb) { if (mb.ButtonIndex == MouseButton.Left && mb.Pressed) { GD.Print("I've been clicked D:"); } } } [/csharp] [/codeblocks] If the [param event] inherits [InputEventMouse], this method will [b]not[/b] be called when:- the control's [member mouse_filter] is set to [constant MOUSE_FILTER_IGNORE];

  • the control is obstructed by another control on top, that doesn't have [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
  • the control's parent has [member mouse_filter] set to [constant MOUSE_FILTER_STOP] or has accepted the event;
  • the control's parent has [member clip_contents] enabled and the [param event]'s position is outside the parent's rectangle;
  • the [param event]'s position is outside the control (see [method _has_point]).[b]Note:[/b] The [param event]'s position is relative to this control's origin.

fn (Control) accept_event #

fn (s &Control) accept_event()

Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input]. [b]Note:[/b] This does not affect the methods in [Input], only the way events are propagated.

fn (Control) get_minimum_size #

fn (s &Control) get_minimum_size() Vector2

Returns the minimum size for this control. See [member custom_minimum_size].

fn (Control) get_combined_minimum_size #

fn (s &Control) get_combined_minimum_size() Vector2

Returns combined minimum size from [member custom_minimum_size] and [method get_minimum_size].

fn (Control) set_anchors_preset #

fn (s &Control) set_anchors_preset(preset ControlLayoutPreset, cfg Control_set_anchors_preset_Cfg)

Sets the anchors to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. If [param keep_offsets] is true, control's position will also be updated.

fn (Control) set_offsets_preset #

fn (s &Control) set_offsets_preset(preset ControlLayoutPreset, cfg Control_set_offsets_preset_Cfg)

Sets the offsets to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. Use parameter [param resize_mode] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [constant PRESET_LEFT_WIDE]. Use parameter [param margin] to determine the gap between the [Control] and the edges.

fn (Control) set_anchors_and_offsets_preset #

fn (s &Control) set_anchors_and_offsets_preset(preset ControlLayoutPreset, cfg Control_set_anchors_and_offsets_preset_Cfg)

Sets both anchor preset and offset preset. See [method set_anchors_preset] and [method set_offsets_preset].

fn (Control) set_anchor #

fn (s &Control) set_anchor(side Side, anchor f64, cfg Control_set_anchor_Cfg)

Sets the anchor for the specified [enum Side] to [param anchor]. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top]. If [param keep_offset] is true, offsets aren't updated after this operation. If [param push_opposite_anchor] is true and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If [param push_opposite_anchor] was false, the left anchor would get value 0.5.

fn (Control) get_anchor #

fn (s &Control) get_anchor(side Side) f64

Returns the anchor for the specified [enum Side]. A getter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top].

fn (Control) set_offset #

fn (s &Control) set_offset(side Side, offset f64)

Sets the offset for the specified [enum Side] to [param offset]. A setter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].

fn (Control) get_offset #

fn (s &Control) get_offset(offset Side) f64

Returns the offset for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].

fn (Control) set_anchor_and_offset #

fn (s &Control) set_anchor_and_offset(side Side, anchor f64, offset f64, cfg Control_set_anchor_and_offset_Cfg)

Works the same as [method set_anchor], but instead of keep_offset argument and automatic update of offset, it allows to set the offset yourself (see [method set_offset]).

fn (Control) set_begin #

fn (s &Control) set_begin(position Vector2)

Sets [member offset_left] and [member offset_top] at the same time. Equivalent of changing [member position].

fn (Control) set_end #

fn (s &Control) set_end(position Vector2)

Sets [member offset_right] and [member offset_bottom] at the same time.

fn (Control) set_position #

fn (s &Control) set_position(position Vector2, cfg Control_set_position_Cfg)

Sets the [member position] to given [param position]. If [param keep_offsets] is true, control's anchors will be updated instead of offsets.

fn (Control) set_size #

fn (s &Control) set_size(size Vector2, cfg Control_set_size_Cfg)

Sets the size (see [member size]). If [param keep_offsets] is true, control's anchors will be updated instead of offsets.

fn (Control) reset_size #

fn (s &Control) reset_size()

Resets the size to [method get_combined_minimum_size]. This is equivalent to calling set_size(Vector2()) (or any size below the minimum).

fn (Control) set_custom_minimum_size #

fn (s &Control) set_custom_minimum_size(size Vector2)

fn (Control) set_global_position #

fn (s &Control) set_global_position(position Vector2, cfg Control_set_global_position_Cfg)

Sets the [member global_position] to given [param position]. If [param keep_offsets] is true, control's anchors will be updated instead of offsets.

fn (Control) set_rotation #

fn (s &Control) set_rotation(radians f64)

fn (Control) set_rotation_degrees #

fn (s &Control) set_rotation_degrees(degrees f64)

fn (Control) set_scale #

fn (s &Control) set_scale(scale Vector2)

fn (Control) set_pivot_offset #

fn (s &Control) set_pivot_offset(pivot_offset Vector2)

fn (Control) get_begin #

fn (s &Control) get_begin() Vector2

Returns [member offset_left] and [member offset_top]. See also [member position].

fn (Control) get_end #

fn (s &Control) get_end() Vector2

Returns [member offset_right] and [member offset_bottom].

fn (Control) get_position #

fn (s &Control) get_position() Vector2

fn (Control) get_size #

fn (s &Control) get_size() Vector2

fn (Control) get_rotation #

fn (s &Control) get_rotation() f64

fn (Control) get_rotation_degrees #

fn (s &Control) get_rotation_degrees() f64

fn (Control) get_scale #

fn (s &Control) get_scale() Vector2

fn (Control) get_pivot_offset #

fn (s &Control) get_pivot_offset() Vector2

fn (Control) get_custom_minimum_size #

fn (s &Control) get_custom_minimum_size() Vector2

fn (Control) get_parent_area_size #

fn (s &Control) get_parent_area_size() Vector2

Returns the width/height occupied in the parent control.

fn (Control) get_global_position #

fn (s &Control) get_global_position() Vector2

fn (Control) get_screen_position #

fn (s &Control) get_screen_position() Vector2

Returns the position of this [Control] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. Equals to [member global_position] if the window is embedded (see [member Viewport.gui_embed_subwindows]). [b]Example:[/b] Show a popup at the mouse position:

popup_menu.position = get_screen_position() + get_local_mouse_position()
popup_menu.reset_size()
popup_menu.popup()

fn (Control) get_rect #

fn (s &Control) get_rect() Rect2

Returns the position and size of the control in the coordinate system of the containing node. See [member position], [member scale] and [member size]. [b]Note:[/b] If [member rotation] is not the default rotation, the resulting size is not meaningful. [b]Note:[/b] Setting [member Viewport.gui_snap_controls_to_pixels] to true can lead to rounding inaccuracies between the displayed control and the returned [Rect2].

fn (Control) get_global_rect #

fn (s &Control) get_global_rect() Rect2

Returns the position and size of the control relative to the containing canvas. See [member global_position] and [member size]. [b]Note:[/b] If the node itself or any parent [CanvasItem] between the node and the canvas have a non default rotation or skew, the resulting size is likely not meaningful. [b]Note:[/b] Setting [member Viewport.gui_snap_controls_to_pixels] to true can lead to rounding inaccuracies between the displayed control and the returned [Rect2].

fn (Control) set_focus_mode #

fn (s &Control) set_focus_mode(mode ControlFocusMode)

fn (Control) get_focus_mode #

fn (s &Control) get_focus_mode() ControlFocusMode

fn (Control) get_focus_mode_with_override #

fn (s &Control) get_focus_mode_with_override() ControlFocusMode

Returns the [member focus_mode], but takes the [member focus_behavior_recursive] into account. If [member focus_behavior_recursive] is set to [constant FOCUS_BEHAVIOR_DISABLED], or it is set to [constant FOCUS_BEHAVIOR_INHERITED] and its ancestor is set to [constant FOCUS_BEHAVIOR_DISABLED], then this returns [constant FOCUS_NONE].

fn (Control) set_focus_behavior_recursive #

fn (s &Control) set_focus_behavior_recursive(focus_behavior_recursive ControlFocusBehaviorRecursive)

fn (Control) get_focus_behavior_recursive #

fn (s &Control) get_focus_behavior_recursive() ControlFocusBehaviorRecursive

fn (Control) has_focus #

fn (s &Control) has_focus() bool

Returns true if this is the current focused control. See [member focus_mode].

fn (Control) grab_focus #

fn (s &Control) grab_focus()

Steal the focus from another control and become the focused control (see [member focus_mode]). [b]Note:[/b] Using this method together with [method Callable.call_deferred] makes it more reliable, especially when called inside [method Node._ready].

fn (Control) release_focus #

fn (s &Control) release_focus()

Give up the focus. No other control will be able to receive input.

fn (Control) find_prev_valid_focus #

fn (s &Control) find_prev_valid_focus() Control

Finds the previous (above in the tree) [Control] that can receive the focus.

fn (Control) find_next_valid_focus #

fn (s &Control) find_next_valid_focus() Control

Finds the next (below in the tree) [Control] that can receive the focus.

fn (Control) find_valid_focus_neighbor #

fn (s &Control) find_valid_focus_neighbor(side Side) Control

Finds the next [Control] that can receive the focus on the specified [enum Side]. [b]Note:[/b] This is different from [method get_focus_neighbor], which returns the path of a specified focus neighbor.

fn (Control) set_h_size_flags #

fn (s &Control) set_h_size_flags(flags ControlSizeFlags)

fn (Control) get_h_size_flags #

fn (s &Control) get_h_size_flags() ControlSizeFlags

fn (Control) set_stretch_ratio #

fn (s &Control) set_stretch_ratio(ratio f64)

fn (Control) get_stretch_ratio #

fn (s &Control) get_stretch_ratio() f64

fn (Control) set_v_size_flags #

fn (s &Control) set_v_size_flags(flags ControlSizeFlags)

fn (Control) get_v_size_flags #

fn (s &Control) get_v_size_flags() ControlSizeFlags

fn (Control) set_theme #

fn (s &Control) set_theme(theme Theme)

fn (Control) get_theme #

fn (s &Control) get_theme() Theme

fn (Control) set_theme_type_variation #

fn (s &Control) set_theme_type_variation(theme_type string)

fn (Control) get_theme_type_variation #

fn (s &Control) get_theme_type_variation() string

fn (Control) begin_bulk_theme_override #

fn (s &Control) begin_bulk_theme_override()

Prevents *_theme_*_override methods from emitting [constant NOTIFICATION_THEME_CHANGED] until [method end_bulk_theme_override] is called.

fn (Control) end_bulk_theme_override #

fn (s &Control) end_bulk_theme_override()

Ends a bulk theme override update. See [method begin_bulk_theme_override].

fn (Control) add_theme_icon_override #

fn (s &Control) add_theme_icon_override(name string, texture Texture2D)

Creates a local override for a theme icon with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override]. See also [method get_theme_icon].

fn (Control) add_theme_stylebox_override #

fn (s &Control) add_theme_stylebox_override(name string, stylebox StyleBox)

Creates a local override for a theme [StyleBox] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override]. See also [method get_theme_stylebox]. [b]Example:[/b] Modify a property in a [StyleBox] by duplicating it: [codeblocks] [gdscript]# The snippet below assumes the child node "MyButton" has a StyleBoxFlat assigned.

Resources are shared across instances, so we need to duplicate it

to avoid modifying the appearance of all other buttons.

var new_stylebox_normal = $MyButton.get_theme_stylebox("normal").duplicate() new_stylebox_normal.border_width_top = 3 new_stylebox_normal.border_color = Color(0, 1, 0.5) $MyButton.add_theme_stylebox_override("normal", new_stylebox_normal)# Remove the stylebox override.$MyButton.remove_theme_stylebox_override("normal") [/gdscript] [csharp] // The snippet below assumes the child node "MyButton" has a StyleBoxFlat assigned. // Resources are shared across instances, so we need to duplicate it // to avoid modifying the appearance of all other buttons. StyleBoxFlat newStyleboxNormal = GetNode

fn (Control) add_theme_font_override #

fn (s &Control) add_theme_font_override(name string, font Font)

Creates a local override for a theme [Font] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override]. See also [method get_theme_font].

fn (Control) add_theme_font_size_override #

fn (s &Control) add_theme_font_size_override(name string, font_size i64)

Creates a local override for a theme font size with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override]. See also [method get_theme_font_size].

fn (Control) add_theme_color_override #

fn (s &Control) add_theme_color_override(name string, color Color)

Creates a local override for a theme [Color] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override]. See also [method get_theme_color]. [b]Example:[/b] Override a [Label]'s color and reset it later: [codeblocks] [gdscript]# Given the child Label node "MyLabel", override its font color with a custom value.$MyLabel.add_theme_color_override("font_color", Color(1, 0.5, 0))# Reset the font color of the child label.$MyLabel.remove_theme_color_override("font_color")# Alternatively it can be overridden with the default value from the Label type.$MyLabel.add_theme_color_override("font_color", get_theme_color("font_color", "Label")) [/gdscript] [csharp] // Given the child Label node "MyLabel", override its font color with a custom value. GetNode

fn (Control) add_theme_constant_override #

fn (s &Control) add_theme_constant_override(name string, constant i64)

Creates a local override for a theme constant with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override]. See also [method get_theme_constant].

fn (Control) remove_theme_icon_override #

fn (s &Control) remove_theme_icon_override(name string)

Removes a local override for a theme icon with the specified [param name] previously added by [method add_theme_icon_override] or via the Inspector dock.

fn (Control) remove_theme_stylebox_override #

fn (s &Control) remove_theme_stylebox_override(name string)

Removes a local override for a theme [StyleBox] with the specified [param name] previously added by [method add_theme_stylebox_override] or via the Inspector dock.

fn (Control) remove_theme_font_override #

fn (s &Control) remove_theme_font_override(name string)

Removes a local override for a theme [Font] with the specified [param name] previously added by [method add_theme_font_override] or via the Inspector dock.

fn (Control) remove_theme_font_size_override #

fn (s &Control) remove_theme_font_size_override(name string)

Removes a local override for a theme font size with the specified [param name] previously added by [method add_theme_font_size_override] or via the Inspector dock.

fn (Control) remove_theme_color_override #

fn (s &Control) remove_theme_color_override(name string)

Removes a local override for a theme [Color] with the specified [param name] previously added by [method add_theme_color_override] or via the Inspector dock.

fn (Control) remove_theme_constant_override #

fn (s &Control) remove_theme_constant_override(name string)

Removes a local override for a theme constant with the specified [param name] previously added by [method add_theme_constant_override] or via the Inspector dock.

fn (Control) get_theme_icon #

fn (s &Control) get_theme_icon(name string, cfg Control_get_theme_icon_Cfg) Texture2D

Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) get_theme_stylebox #

fn (s &Control) get_theme_stylebox(name string, cfg Control_get_theme_stylebox_Cfg) StyleBox

Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) get_theme_font #

fn (s &Control) get_theme_font(name string, cfg Control_get_theme_font_Cfg) Font

Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) get_theme_font_size #

fn (s &Control) get_theme_font_size(name string, cfg Control_get_theme_font_size_Cfg) i64

Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) get_theme_color #

fn (s &Control) get_theme_color(name string, cfg Control_get_theme_color_Cfg) Color

Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [param name] and [param theme_type]. If [param theme_type] is omitted the class name of the current control is used as the type, or [member theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. For the current control its local overrides are considered first (see [method add_theme_color_override]), then its assigned [member theme]. After the current control, each parent control and its assigned [member theme] are considered; controls without a [member theme] assigned are skipped. If no matching [Theme] is found in the tree, the custom project [Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [Theme] are used (see [ThemeDB]). [codeblocks] [gdscript] func _ready():# Get the font color defined for the current Control's class, if it exists.modulate = get_theme_color("font_color")# Get the font color defined for the Button class.modulate = get_theme_color("font_color", "Button") [/gdscript] [csharp] public override void _Ready() { // Get the font color defined for the current Control's class, if it exists. Modulate = GetThemeColor("font_color"); // Get the font color defined for the Button class. Modulate = GetThemeColor("font_color", "Button"); } [/csharp] [/codeblocks]

fn (Control) get_theme_constant #

fn (s &Control) get_theme_constant(name string, cfg Control_get_theme_constant_Cfg) i64

Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) has_theme_icon_override #

fn (s &Control) has_theme_icon_override(name string) bool

Returns true if there is a local override for a theme icon with the specified [param name] in this [Control] node. See [method add_theme_icon_override].

fn (Control) has_theme_stylebox_override #

fn (s &Control) has_theme_stylebox_override(name string) bool

Returns true if there is a local override for a theme [StyleBox] with the specified [param name] in this [Control] node. See [method add_theme_stylebox_override].

fn (Control) has_theme_font_override #

fn (s &Control) has_theme_font_override(name string) bool

Returns true if there is a local override for a theme [Font] with the specified [param name] in this [Control] node. See [method add_theme_font_override].

fn (Control) has_theme_font_size_override #

fn (s &Control) has_theme_font_size_override(name string) bool

Returns true if there is a local override for a theme font size with the specified [param name] in this [Control] node. See [method add_theme_font_size_override].

fn (Control) has_theme_color_override #

fn (s &Control) has_theme_color_override(name string) bool

Returns true if there is a local override for a theme [Color] with the specified [param name] in this [Control] node. See [method add_theme_color_override].

fn (Control) has_theme_constant_override #

fn (s &Control) has_theme_constant_override(name string) bool

Returns true if there is a local override for a theme constant with the specified [param name] in this [Control] node. See [method add_theme_constant_override].

fn (Control) has_theme_icon #

fn (s &Control) has_theme_icon(name string, cfg Control_has_theme_icon_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has an icon item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) has_theme_stylebox #

fn (s &Control) has_theme_stylebox(name string, cfg Control_has_theme_stylebox_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a stylebox item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) has_theme_font #

fn (s &Control) has_theme_font(name string, cfg Control_has_theme_font_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a font item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) has_theme_font_size #

fn (s &Control) has_theme_font_size(name string, cfg Control_has_theme_font_size_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a font size item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) has_theme_color #

fn (s &Control) has_theme_color(name string, cfg Control_has_theme_color_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a color item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) has_theme_constant #

fn (s &Control) has_theme_constant(name string, cfg Control_has_theme_constant_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a constant item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details.

fn (Control) get_theme_default_base_scale #

fn (s &Control) get_theme_default_base_scale() f64

Returns the default base scale value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_base_scale] value. See [method get_theme_color] for details.

fn (Control) get_theme_default_font #

fn (s &Control) get_theme_default_font() Font

Returns the default font from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font] value. See [method get_theme_color] for details.

fn (Control) get_theme_default_font_size #

fn (s &Control) get_theme_default_font_size() i64

Returns the default font size value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font_size] value. See [method get_theme_color] for details.

fn (Control) get_parent_control #

fn (s &Control) get_parent_control() Control

Returns the parent control node.

fn (Control) set_h_grow_direction #

fn (s &Control) set_h_grow_direction(direction ControlGrowDirection)

fn (Control) get_h_grow_direction #

fn (s &Control) get_h_grow_direction() ControlGrowDirection

fn (Control) set_v_grow_direction #

fn (s &Control) set_v_grow_direction(direction ControlGrowDirection)

fn (Control) get_v_grow_direction #

fn (s &Control) get_v_grow_direction() ControlGrowDirection

fn (Control) set_tooltip_auto_translate_mode #

fn (s &Control) set_tooltip_auto_translate_mode(mode NodeAutoTranslateMode)

fn (Control) get_tooltip_auto_translate_mode #

fn (s &Control) get_tooltip_auto_translate_mode() NodeAutoTranslateMode

fn (Control) set_tooltip_text #

fn (s &Control) set_tooltip_text(hint string)

fn (Control) get_tooltip_text #

fn (s &Control) get_tooltip_text() string

fn (Control) get_tooltip #

fn (s &Control) get_tooltip(cfg Control_get_tooltip_Cfg) string

Returns the tooltip text for the position [param at_position] in control's local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns [member tooltip_text]. This method can be overridden to customize its behavior. See [method _get_tooltip]. [b]Note:[/b] If this method returns an empty [String] and [method _make_custom_tooltip] is not overridden, no tooltip is displayed.

fn (Control) set_default_cursor_shape #

fn (s &Control) set_default_cursor_shape(shape ControlCursorShape)

fn (Control) get_default_cursor_shape #

fn (s &Control) get_default_cursor_shape() ControlCursorShape

fn (Control) get_cursor_shape #

fn (s &Control) get_cursor_shape(cfg Control_get_cursor_shape_Cfg) ControlCursorShape

Returns the mouse cursor shape for this control when hovered over [param position] in local coordinates. For most controls, this is the same as [member mouse_default_cursor_shape], but some built-in controls implement more complex logic.

fn (Control) set_focus_neighbor #

fn (s &Control) set_focus_neighbor(side Side, neighbor NodePath)

Sets the focus neighbor for the specified [enum Side] to the [Control] at [param neighbor] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].

fn (Control) get_focus_neighbor #

fn (s &Control) get_focus_neighbor(side Side) NodePath

Returns the focus neighbor for the specified [enum Side]. A getter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top]. [b]Note:[/b] To find the next [Control] on the specific [enum Side], even if a neighbor is not assigned, use [method find_valid_focus_neighbor].

fn (Control) set_focus_next #

fn (s &Control) set_focus_next(next NodePath)

fn (Control) get_focus_next #

fn (s &Control) get_focus_next() NodePath

fn (Control) set_focus_previous #

fn (s &Control) set_focus_previous(previous NodePath)

fn (Control) get_focus_previous #

fn (s &Control) get_focus_previous() NodePath

fn (Control) force_drag #

fn (s &Control) force_drag(data_ ToVariant, preview Control)

Forces drag and bypasses [method _get_drag_data] and [method set_drag_preview] by passing [param data] and [param preview]. Drag will start even if the mouse is neither over nor pressed on this control. The methods [method _can_drop_data] and [method _drop_data] must be implemented on controls that want to receive drop data.

fn (Control) accessibility_drag #

fn (s &Control) accessibility_drag()

Starts drag-and-drop operation without using a mouse.

fn (Control) accessibility_drop #

fn (s &Control) accessibility_drop()

Ends drag-and-drop operation without using a mouse.

fn (Control) set_accessibility_name #

fn (s &Control) set_accessibility_name(name string)

fn (Control) get_accessibility_name #

fn (s &Control) get_accessibility_name() string

fn (Control) set_accessibility_description #

fn (s &Control) set_accessibility_description(description string)

fn (Control) get_accessibility_description #

fn (s &Control) get_accessibility_description() string

fn (Control) set_accessibility_live #

fn (s &Control) set_accessibility_live(mode DisplayServerAccessibilityLiveMode)

fn (Control) get_accessibility_live #

fn (s &Control) get_accessibility_live() DisplayServerAccessibilityLiveMode

fn (Control) set_accessibility_controls_nodes #

fn (s &Control) set_accessibility_controls_nodes(node_path Array)

fn (Control) get_accessibility_controls_nodes #

fn (s &Control) get_accessibility_controls_nodes() Array

fn (Control) set_accessibility_described_by_nodes #

fn (s &Control) set_accessibility_described_by_nodes(node_path Array)

fn (Control) get_accessibility_described_by_nodes #

fn (s &Control) get_accessibility_described_by_nodes() Array

fn (Control) set_accessibility_labeled_by_nodes #

fn (s &Control) set_accessibility_labeled_by_nodes(node_path Array)

fn (Control) get_accessibility_labeled_by_nodes #

fn (s &Control) get_accessibility_labeled_by_nodes() Array

fn (Control) set_accessibility_flow_to_nodes #

fn (s &Control) set_accessibility_flow_to_nodes(node_path Array)

fn (Control) get_accessibility_flow_to_nodes #

fn (s &Control) get_accessibility_flow_to_nodes() Array

fn (Control) set_mouse_filter #

fn (s &Control) set_mouse_filter(filter ControlMouseFilter)

fn (Control) get_mouse_filter #

fn (s &Control) get_mouse_filter() ControlMouseFilter

fn (Control) get_mouse_filter_with_override #

fn (s &Control) get_mouse_filter_with_override() ControlMouseFilter

Returns the [member mouse_filter], but takes the [member mouse_behavior_recursive] into account. If [member mouse_behavior_recursive] is set to [constant MOUSE_BEHAVIOR_DISABLED], or it is set to [constant MOUSE_BEHAVIOR_INHERITED] and its ancestor is set to [constant MOUSE_BEHAVIOR_DISABLED], then this returns [constant MOUSE_FILTER_IGNORE].

fn (Control) set_mouse_behavior_recursive #

fn (s &Control) set_mouse_behavior_recursive(mouse_behavior_recursive ControlMouseBehaviorRecursive)

fn (Control) get_mouse_behavior_recursive #

fn (s &Control) get_mouse_behavior_recursive() ControlMouseBehaviorRecursive

fn (Control) set_force_pass_scroll_events #

fn (s &Control) set_force_pass_scroll_events(force_pass_scroll_events bool)

fn (Control) is_force_pass_scroll_events #

fn (s &Control) is_force_pass_scroll_events() bool

fn (Control) set_clip_contents #

fn (s &Control) set_clip_contents(enable bool)

fn (Control) is_clipping_contents #

fn (s &Control) is_clipping_contents() bool

fn (Control) grab_click_focus #

fn (s &Control) grab_click_focus()

Creates an [InputEventMouseButton] that attempts to click the control. If the event is received, the control gains focus. [codeblocks] [gdscript] func _process(delta): grab_click_focus() # When clicking another Control node, this node will be clicked instead. [/gdscript] [csharp] public override void _Process(double delta) { GrabClickFocus(); // When clicking another Control node, this node will be clicked instead. } [/csharp] [/codeblocks]

fn (Control) set_drag_forwarding #

fn (s &Control) set_drag_forwarding(drag_func Callable, can_drop_func Callable, drop_func Callable)

Sets the given callables to be used instead of the control's own drag-and-drop virtual methods. If a callable is empty, its respective virtual method is used as normal. The arguments for each callable should be exactly the same as their respective virtual methods, which would be:- [param drag_func] corresponds to [method _get_drag_data] and requires a [Vector2];

  • [param can_drop_func] corresponds to [method _can_drop_data] and requires both a [Vector2] and a [Variant];
  • [param drop_func] corresponds to [method _drop_data] and requires both a [Vector2] and a [Variant].

fn (Control) set_drag_preview #

fn (s &Control) set_drag_preview(control Control)

Shows the given control at the mouse pointer. A good time to call this method is in [method _get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. [codeblocks] [gdscript] @export var color = Color(1, 0, 0, 1)

func _get_drag_data(position):# Use a control that is not in the treevar cpb = ColorPickerButton.new() cpb.color = color cpb.size = Vector2(50, 50) set_drag_preview(cpb) return color [/gdscript] [csharp] [Export] private Color _color = new Color(1, 0, 0, 1);

public override Variant _GetDragData(Vector2 atPosition) { // Use a control that is not in the tree var cpb = new ColorPickerButton(); cpb.Color = _color; cpb.Size = new Vector2(50, 50); SetDragPreview(cpb); return _color; } [/csharp] [/codeblocks]

fn (Control) is_drag_successful #

fn (s &Control) is_drag_successful() bool

Returns true if a drag operation is successful. Alternative to [method Viewport.gui_is_drag_successful]. Best used with [constant Node.NOTIFICATION_DRAG_END].

fn (Control) warp_mouse #

fn (s &Control) warp_mouse(position Vector2)

Moves the mouse cursor to [param position], relative to [member position] of this [Control]. [b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.

fn (Control) set_shortcut_context #

fn (s &Control) set_shortcut_context(node Node)

fn (Control) get_shortcut_context #

fn (s &Control) get_shortcut_context() Node

fn (Control) update_minimum_size #

fn (s &Control) update_minimum_size()

Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member custom_minimum_size] directly calls this method automatically.

fn (Control) set_layout_direction #

fn (s &Control) set_layout_direction(direction ControlLayoutDirection)

fn (Control) get_layout_direction #

fn (s &Control) get_layout_direction() ControlLayoutDirection

fn (Control) is_layout_rtl #

fn (s &Control) is_layout_rtl() bool

Returns true if the layout is right-to-left. See also [member layout_direction].

fn (Control) set_auto_translate #

fn (s &Control) set_auto_translate(enable bool)

fn (Control) is_auto_translating #

fn (s &Control) is_auto_translating() bool

fn (Control) set_localize_numeral_system #

fn (s &Control) set_localize_numeral_system(enable bool)

fn (Control) is_localizing_numeral_system #

fn (s &Control) is_localizing_numeral_system() bool

struct Control_get_cursor_shape_Cfg #

@[params]
struct Control_get_cursor_shape_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for Control#get_cursor_shape

struct Control_get_theme_color_Cfg #

@[params]
struct Control_get_theme_color_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#get_theme_color

struct Control_get_theme_constant_Cfg #

@[params]
struct Control_get_theme_constant_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#get_theme_constant

struct Control_get_theme_font_Cfg #

@[params]
struct Control_get_theme_font_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#get_theme_font

struct Control_get_theme_font_size_Cfg #

@[params]
struct Control_get_theme_font_size_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#get_theme_font_size

struct Control_get_theme_icon_Cfg #

@[params]
struct Control_get_theme_icon_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#get_theme_icon

struct Control_get_theme_stylebox_Cfg #

@[params]
struct Control_get_theme_stylebox_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#get_theme_stylebox

struct Control_get_tooltip_Cfg #

@[params]
struct Control_get_tooltip_Cfg {
pub:
	at_position Vector2 = Vector2{0, 0}
}

Optional parameters for Control#get_tooltip

struct Control_has_theme_color_Cfg #

@[params]
struct Control_has_theme_color_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#has_theme_color

struct Control_has_theme_constant_Cfg #

@[params]
struct Control_has_theme_constant_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#has_theme_constant

struct Control_has_theme_font_Cfg #

@[params]
struct Control_has_theme_font_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#has_theme_font

struct Control_has_theme_font_size_Cfg #

@[params]
struct Control_has_theme_font_size_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#has_theme_font_size

struct Control_has_theme_icon_Cfg #

@[params]
struct Control_has_theme_icon_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#has_theme_icon

struct Control_has_theme_stylebox_Cfg #

@[params]
struct Control_has_theme_stylebox_Cfg {
pub:
	theme_type string
}

Optional parameters for Control#has_theme_stylebox

struct Control_set_anchor_Cfg #

@[params]
struct Control_set_anchor_Cfg {
pub:
	keep_offset          bool
	push_opposite_anchor bool
}

Optional parameters for Control#set_anchor

struct Control_set_anchor_and_offset_Cfg #

@[params]
struct Control_set_anchor_and_offset_Cfg {
pub:
	push_opposite_anchor bool
}

Optional parameters for Control#set_anchor_and_offset

struct Control_set_anchors_and_offsets_preset_Cfg #

@[params]
struct Control_set_anchors_and_offsets_preset_Cfg {
pub:
	resize_mode ControlLayoutPresetMode = unsafe { ControlLayoutPresetMode(0) }
	margin      i64
}

Optional parameters for Control#set_anchors_and_offsets_preset

struct Control_set_anchors_preset_Cfg #

@[params]
struct Control_set_anchors_preset_Cfg {
pub:
	keep_offsets bool
}

Optional parameters for Control#set_anchors_preset

struct Control_set_global_position_Cfg #

@[params]
struct Control_set_global_position_Cfg {
pub:
	keep_offsets bool
}

Optional parameters for Control#set_global_position

struct Control_set_offsets_preset_Cfg #

@[params]
struct Control_set_offsets_preset_Cfg {
pub:
	resize_mode ControlLayoutPresetMode = unsafe { ControlLayoutPresetMode(0) }
	margin      i64
}

Optional parameters for Control#set_offsets_preset

struct Control_set_position_Cfg #

@[params]
struct Control_set_position_Cfg {
pub:
	keep_offsets bool
}

Optional parameters for Control#set_position

struct Control_set_size_Cfg #

@[params]
struct Control_set_size_Cfg {
pub:
	keep_offsets bool
}

Optional parameters for Control#set_size

struct ConvertTransformModifier3D #

struct ConvertTransformModifier3D {
	BoneConstraint3D
}

A [SkeletonModifier3D] that apply transform to the bone which converted from reference.

fn (ConvertTransformModifier3D) to_variant #

fn (s &ConvertTransformModifier3D) to_variant() Variant

fn (ConvertTransformModifier3D) from_variant #

fn (mut s ConvertTransformModifier3D) from_variant(variant &Variant)

fn (ConvertTransformModifier3D) set_apply_transform_mode #

fn (s &ConvertTransformModifier3D) set_apply_transform_mode(index i64, transform_mode ConvertTransformModifier3DTransformMode)

Sets the operation of the remapping destination transform.

fn (ConvertTransformModifier3D) get_apply_transform_mode #

fn (s &ConvertTransformModifier3D) get_apply_transform_mode(index i64) ConvertTransformModifier3DTransformMode

Returns the operation of the remapping destination transform.

fn (ConvertTransformModifier3D) set_apply_axis #

fn (s &ConvertTransformModifier3D) set_apply_axis(index i64, axis Vector3Axis)

Sets the axis of the remapping destination transform.

fn (ConvertTransformModifier3D) get_apply_axis #

fn (s &ConvertTransformModifier3D) get_apply_axis(index i64) Vector3Axis

Returns the axis of the remapping destination transform.

fn (ConvertTransformModifier3D) set_apply_range_min #

fn (s &ConvertTransformModifier3D) set_apply_range_min(index i64, range_min f64)

Sets the minimum value of the remapping destination range.

fn (ConvertTransformModifier3D) get_apply_range_min #

fn (s &ConvertTransformModifier3D) get_apply_range_min(index i64) f64

Returns the minimum value of the remapping destination range.

fn (ConvertTransformModifier3D) set_apply_range_max #

fn (s &ConvertTransformModifier3D) set_apply_range_max(index i64, range_max f64)

Sets the maximum value of the remapping destination range.

fn (ConvertTransformModifier3D) get_apply_range_max #

fn (s &ConvertTransformModifier3D) get_apply_range_max(index i64) f64

Returns the maximum value of the remapping destination range.

fn (ConvertTransformModifier3D) set_reference_transform_mode #

fn (s &ConvertTransformModifier3D) set_reference_transform_mode(index i64, transform_mode ConvertTransformModifier3DTransformMode)

Sets the operation of the remapping source transform.

fn (ConvertTransformModifier3D) get_reference_transform_mode #

fn (s &ConvertTransformModifier3D) get_reference_transform_mode(index i64) ConvertTransformModifier3DTransformMode

Returns the operation of the remapping source transform.

fn (ConvertTransformModifier3D) set_reference_axis #

fn (s &ConvertTransformModifier3D) set_reference_axis(index i64, axis Vector3Axis)

Sets the axis of the remapping source transform.

fn (ConvertTransformModifier3D) get_reference_axis #

fn (s &ConvertTransformModifier3D) get_reference_axis(index i64) Vector3Axis

Returns the axis of the remapping source transform.

fn (ConvertTransformModifier3D) set_reference_range_min #

fn (s &ConvertTransformModifier3D) set_reference_range_min(index i64, range_min f64)

Sets the minimum value of the remapping source range.

fn (ConvertTransformModifier3D) get_reference_range_min #

fn (s &ConvertTransformModifier3D) get_reference_range_min(index i64) f64

Returns the minimum value of the remapping source range.

fn (ConvertTransformModifier3D) set_reference_range_max #

fn (s &ConvertTransformModifier3D) set_reference_range_max(index i64, range_max f64)

Sets the maximum value of the remapping source range.

fn (ConvertTransformModifier3D) get_reference_range_max #

fn (s &ConvertTransformModifier3D) get_reference_range_max(index i64) f64

Returns the maximum value of the remapping source range.

fn (ConvertTransformModifier3D) set_relative #

fn (s &ConvertTransformModifier3D) set_relative(index i64, enabled bool)

Sets relative option in the setting at [param index] to [param enabled]. If sets [param enabled] to true, the extracted and applying transform is relative to the rest. If sets [param enabled] to false, the extracted transform is absolute.

fn (ConvertTransformModifier3D) is_relative #

fn (s &ConvertTransformModifier3D) is_relative(index i64) bool

Returns true if the relative option is enabled in the setting at [param index].

fn (ConvertTransformModifier3D) set_additive #

fn (s &ConvertTransformModifier3D) set_additive(index i64, enabled bool)

Sets additive option in the setting at [param index] to [param enabled]. This mainly affects the process of applying transform to the [method BoneConstraint3D.set_apply_bone]. If sets [param enabled] to true, the processed transform is added to the pose of the current apply bone. If sets [param enabled] to false, the pose of the current apply bone is replaced with the processed transform. However, if set [method set_relative] to true, the transform is relative to rest.

fn (ConvertTransformModifier3D) is_additive #

fn (s &ConvertTransformModifier3D) is_additive(index i64) bool

Returns true if the additive option is enabled in the setting at [param index].

struct ConvexPolygonShape2D #

struct ConvexPolygonShape2D {
	Shape2D
}

A 2D convex polygon shape used for physics collision.

fn (ConvexPolygonShape2D) to_variant #

fn (s &ConvexPolygonShape2D) to_variant() Variant

fn (ConvexPolygonShape2D) from_variant #

fn (mut s ConvexPolygonShape2D) from_variant(variant &Variant)

fn (ConvexPolygonShape2D) set_point_cloud #

fn (s &ConvexPolygonShape2D) set_point_cloud(point_cloud PackedVector2Array)

Based on the set of points provided, this assigns the [member points] property using the convex hull algorithm, removing all unneeded points. See [method Geometry2D.convex_hull] for details.

fn (ConvexPolygonShape2D) set_points #

fn (s &ConvexPolygonShape2D) set_points(points PackedVector2Array)

fn (ConvexPolygonShape2D) get_points #

fn (s &ConvexPolygonShape2D) get_points() PackedVector2Array

struct ConvexPolygonShape3D #

struct ConvexPolygonShape3D {
	Shape3D
}

A 3D convex polyhedron shape used for physics collision.

fn (ConvexPolygonShape3D) to_variant #

fn (s &ConvexPolygonShape3D) to_variant() Variant

fn (ConvexPolygonShape3D) from_variant #

fn (mut s ConvexPolygonShape3D) from_variant(variant &Variant)

fn (ConvexPolygonShape3D) set_points #

fn (s &ConvexPolygonShape3D) set_points(points PackedVector3Array)

fn (ConvexPolygonShape3D) get_points #

fn (s &ConvexPolygonShape3D) get_points() PackedVector3Array

struct CopyTransformModifier3D #

struct CopyTransformModifier3D {
	BoneConstraint3D
}

A [SkeletonModifier3D] that apply transform to the bone which copied from reference.

fn (CopyTransformModifier3D) to_variant #

fn (s &CopyTransformModifier3D) to_variant() Variant

fn (CopyTransformModifier3D) from_variant #

fn (mut s CopyTransformModifier3D) from_variant(variant &Variant)

fn (CopyTransformModifier3D) set_copy_flags #

fn (s &CopyTransformModifier3D) set_copy_flags(index i64, copy_flags CopyTransformModifier3DTransformFlag)

Sets the flags to process the transform operations. If the flag is valid, the transform operation is processed. [b]Note:[/b] If the rotation is valid for only one axis, it respects the roll of the valid axis. If the rotation is valid for two axes, it discards the roll of the invalid axis.

fn (CopyTransformModifier3D) get_copy_flags #

fn (s &CopyTransformModifier3D) get_copy_flags(index i64) CopyTransformModifier3DTransformFlag

Returns the copy flags of the setting at [param index].

fn (CopyTransformModifier3D) set_axis_flags #

fn (s &CopyTransformModifier3D) set_axis_flags(index i64, axis_flags CopyTransformModifier3DAxisFlag)

Sets the flags to copy axes. If the flag is valid, the axis is copied.

fn (CopyTransformModifier3D) get_axis_flags #

fn (s &CopyTransformModifier3D) get_axis_flags(index i64) CopyTransformModifier3DAxisFlag

Returns the axis flags of the setting at [param index].

fn (CopyTransformModifier3D) set_invert_flags #

fn (s &CopyTransformModifier3D) set_invert_flags(index i64, axis_flags CopyTransformModifier3DAxisFlag)

Sets the flags to inverte axes. If the flag is valid, the axis is copied. [b]Note:[/b] An inverted scale means an inverse number, not a negative scale. For example, inverting 2.0 means 0.5. [b]Note:[/b] An inverted rotation flips the elements of the quaternion. For example, a two-axis inversion will flip the roll of each axis, and a three-axis inversion will flip the final orientation. However, be aware that flipping only one axis may cause unintended rotation by the unflipped axes, due to the characteristics of the quaternion.

fn (CopyTransformModifier3D) get_invert_flags #

fn (s &CopyTransformModifier3D) get_invert_flags(index i64) CopyTransformModifier3DAxisFlag

Returns the invert flags of the setting at [param index].

fn (CopyTransformModifier3D) set_copy_position #

fn (s &CopyTransformModifier3D) set_copy_position(index i64, enabled bool)

If sets [param enabled] to true, the position will be copied.

fn (CopyTransformModifier3D) is_position_copying #

fn (s &CopyTransformModifier3D) is_position_copying(index i64) bool

Returns true if the copy flags has the flag for the position in the setting at [param index]. See also [method set_copy_flags].

fn (CopyTransformModifier3D) set_copy_rotation #

fn (s &CopyTransformModifier3D) set_copy_rotation(index i64, enabled bool)

If sets [param enabled] to true, the rotation will be copied.

fn (CopyTransformModifier3D) is_rotation_copying #

fn (s &CopyTransformModifier3D) is_rotation_copying(index i64) bool

Returns true if the copy flags has the flag for the rotation in the setting at [param index]. See also [method set_copy_flags].

fn (CopyTransformModifier3D) set_copy_scale #

fn (s &CopyTransformModifier3D) set_copy_scale(index i64, enabled bool)

If sets [param enabled] to true, the scale will be copied.

fn (CopyTransformModifier3D) is_scale_copying #

fn (s &CopyTransformModifier3D) is_scale_copying(index i64) bool

Returns true if the copy flags has the flag for the scale in the setting at [param index]. See also [method set_copy_flags].

fn (CopyTransformModifier3D) set_axis_x_enabled #

fn (s &CopyTransformModifier3D) set_axis_x_enabled(index i64, enabled bool)

If sets [param enabled] to true, the X-axis will be copied.

fn (CopyTransformModifier3D) is_axis_x_enabled #

fn (s &CopyTransformModifier3D) is_axis_x_enabled(index i64) bool

Returns true if the enable flags has the flag for the X-axis in the setting at [param index]. See also [method set_axis_flags].

fn (CopyTransformModifier3D) set_axis_y_enabled #

fn (s &CopyTransformModifier3D) set_axis_y_enabled(index i64, enabled bool)

If sets [param enabled] to true, the Y-axis will be copied.

fn (CopyTransformModifier3D) is_axis_y_enabled #

fn (s &CopyTransformModifier3D) is_axis_y_enabled(index i64) bool

Returns true if the enable flags has the flag for the Y-axis in the setting at [param index]. See also [method set_axis_flags].

fn (CopyTransformModifier3D) set_axis_z_enabled #

fn (s &CopyTransformModifier3D) set_axis_z_enabled(index i64, enabled bool)

If sets [param enabled] to true, the Z-axis will be copied.

fn (CopyTransformModifier3D) is_axis_z_enabled #

fn (s &CopyTransformModifier3D) is_axis_z_enabled(index i64) bool

Returns true if the enable flags has the flag for the Z-axis in the setting at [param index]. See also [method set_axis_flags].

fn (CopyTransformModifier3D) set_axis_x_inverted #

fn (s &CopyTransformModifier3D) set_axis_x_inverted(index i64, enabled bool)

If sets [param enabled] to true, the X-axis will be inverted.

fn (CopyTransformModifier3D) is_axis_x_inverted #

fn (s &CopyTransformModifier3D) is_axis_x_inverted(index i64) bool

Returns true if the invert flags has the flag for the X-axis in the setting at [param index]. See also [method set_invert_flags].

fn (CopyTransformModifier3D) set_axis_y_inverted #

fn (s &CopyTransformModifier3D) set_axis_y_inverted(index i64, enabled bool)

If sets [param enabled] to true, the Y-axis will be inverted.

fn (CopyTransformModifier3D) is_axis_y_inverted #

fn (s &CopyTransformModifier3D) is_axis_y_inverted(index i64) bool

Returns true if the invert flags has the flag for the Y-axis in the setting at [param index]. See also [method set_invert_flags].

fn (CopyTransformModifier3D) set_axis_z_inverted #

fn (s &CopyTransformModifier3D) set_axis_z_inverted(index i64, enabled bool)

If sets [param enabled] to true, the Z-axis will be inverted.

fn (CopyTransformModifier3D) is_axis_z_inverted #

fn (s &CopyTransformModifier3D) is_axis_z_inverted(index i64) bool

Returns true if the invert flags has the flag for the Z-axis in the setting at [param index]. See also [method set_invert_flags].

fn (CopyTransformModifier3D) set_relative #

fn (s &CopyTransformModifier3D) set_relative(index i64, enabled bool)

Sets relative option in the setting at [param index] to [param enabled]. If sets [param enabled] to true, the extracted and applying transform is relative to the rest. If sets [param enabled] to false, the extracted transform is absolute.

fn (CopyTransformModifier3D) is_relative #

fn (s &CopyTransformModifier3D) is_relative(index i64) bool

Returns true if the relative option is enabled in the setting at [param index].

fn (CopyTransformModifier3D) set_additive #

fn (s &CopyTransformModifier3D) set_additive(index i64, enabled bool)

Sets additive option in the setting at [param index] to [param enabled]. This mainly affects the process of applying transform to the [method BoneConstraint3D.set_apply_bone]. If sets [param enabled] to true, the processed transform is added to the pose of the current apply bone. If sets [param enabled] to false, the pose of the current apply bone is replaced with the processed transform. However, if set [method set_relative] to true, the transform is relative to rest.

fn (CopyTransformModifier3D) is_additive #

fn (s &CopyTransformModifier3D) is_additive(index i64) bool

Returns true if the additive option is enabled in the setting at [param index].

struct Crypto #

struct Crypto {
	RefCounted
}

Provides access to advanced cryptographic functionalities.

fn (Crypto) to_variant #

fn (s &Crypto) to_variant() Variant

fn (Crypto) from_variant #

fn (mut s Crypto) from_variant(variant &Variant)

fn (Crypto) generate_random_bytes #

fn (s &Crypto) generate_random_bytes(size i64) PackedByteArray

Generates a [PackedByteArray] of cryptographically secure random bytes with given [param size].

fn (Crypto) generate_rsa #

fn (s &Crypto) generate_rsa(size i64) CryptoKey

Generates an RSA [CryptoKey] that can be used for creating self-signed certificates and passed to [method StreamPeerTLS.accept_stream].

fn (Crypto) generate_self_signed_certificate #

fn (s &Crypto) generate_self_signed_certificate(key CryptoKey, cfg Crypto_generate_self_signed_certificate_Cfg) X509Certificate

Generates a self-signed [X509Certificate] from the given [CryptoKey] and [param issuer_name]. The certificate validity will be defined by [param not_before] and [param not_after] (first valid date and last valid date). The [param issuer_name] must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). A small example to generate an RSA key and an X509 self-signed certificate. [codeblocks] [gdscript] var crypto = Crypto.new()# Generate 4096 bits RSA key.var key = crypto.generate_rsa(4096)# Generate self-signed certificate using the given key.var cert = crypto.generate_self_signed_certificate(key, "CN=example.com,O=A Game Company,C=IT") [/gdscript] [csharp] var crypto = new Crypto(); // Generate 4096 bits RSA key. CryptoKey key = crypto.GenerateRsa(4096); // Generate self-signed certificate using the given key. X509Certificate cert = crypto.GenerateSelfSignedCertificate(key, "CN=mydomain.com,O=My Game Company,C=IT"); [/csharp] [/codeblocks]

fn (Crypto) sign #

fn (s &Crypto) sign(hash_type HashingContextHashType, hash PackedByteArray, key CryptoKey) PackedByteArray

Sign a given [param hash] of type [param hash_type] with the provided private [param key].

fn (Crypto) verify #

fn (s &Crypto) verify(hash_type HashingContextHashType, hash PackedByteArray, signature PackedByteArray, key CryptoKey) bool

Verify that a given [param signature] for [param hash] of type [param hash_type] against the provided public [param key].

fn (Crypto) encrypt #

fn (s &Crypto) encrypt(key CryptoKey, plaintext PackedByteArray) PackedByteArray

Encrypt the given [param plaintext] with the provided public [param key]. [b]Note:[/b] The maximum size of accepted plaintext is limited by the key size.

fn (Crypto) decrypt #

fn (s &Crypto) decrypt(key CryptoKey, ciphertext PackedByteArray) PackedByteArray

Decrypt the given [param ciphertext] with the provided private [param key]. [b]Note:[/b] The maximum size of accepted ciphertext is limited by the key size.

fn (Crypto) hmac_digest #

fn (s &Crypto) hmac_digest(hash_type HashingContextHashType, key PackedByteArray, msg PackedByteArray) PackedByteArray

Generates an [url=https://en.wikipedia.org/wiki/HMAC]HMAC[/url] digest of [param msg] using [param key]. The [param hash_type] parameter is the hashing algorithm that is used for the inner and outer hashes. Currently, only [constant HashingContext.HASH_SHA256] and [constant HashingContext.HASH_SHA1] are supported.

fn (Crypto) constant_time_compare #

fn (s &Crypto) constant_time_compare(trusted PackedByteArray, received PackedByteArray) bool

Compares two [PackedByteArray]s for equality without leaking timing information in order to prevent timing attacks. See [url=https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy]this blog post[/url] for more information.

struct CryptoKey #

struct CryptoKey {
	Resource
}

A cryptographic key (RSA or elliptic-curve).

fn (CryptoKey) to_variant #

fn (s &CryptoKey) to_variant() Variant

fn (CryptoKey) from_variant #

fn (mut s CryptoKey) from_variant(variant &Variant)

fn (CryptoKey) save #

fn (s &CryptoKey) save(path string, cfg CryptoKey_save_Cfg) GDError

Saves a key to the given [param path]. If [param public_only] is true, only the public key will be saved. [b]Note:[/b] [param path] should be a ".pub" file if [param public_only] is true, a ".key" file otherwise.

fn (CryptoKey) load #

fn (s &CryptoKey) load(path string, cfg CryptoKey_load_Cfg) GDError

Loads a key from [param path]. If [param public_only] is true, only the public key will be loaded. [b]Note:[/b] [param path] should be a ".pub" file if [param public_only] is true, a ".key" file otherwise.

fn (CryptoKey) is_public_only #

fn (s &CryptoKey) is_public_only() bool

Returns true if this CryptoKey only has the public part, and not the private one.

fn (CryptoKey) save_to_string #

fn (s &CryptoKey) save_to_string(cfg CryptoKey_save_to_string_Cfg) string

Returns a string containing the key in PEM format. If [param public_only] is true, only the public key will be included.

fn (CryptoKey) load_from_string #

fn (s &CryptoKey) load_from_string(string_key string, cfg CryptoKey_load_from_string_Cfg) GDError

Loads a key from the given [param string_key]. If [param public_only] is true, only the public key will be loaded.

struct CryptoKey_load_Cfg #

@[params]
struct CryptoKey_load_Cfg {
pub:
	public_only bool
}

Optional parameters for CryptoKey#load

struct CryptoKey_load_from_string_Cfg #

@[params]
struct CryptoKey_load_from_string_Cfg {
pub:
	public_only bool
}

Optional parameters for CryptoKey#load_from_string

struct CryptoKey_save_Cfg #

@[params]
struct CryptoKey_save_Cfg {
pub:
	public_only bool
}

Optional parameters for CryptoKey#save

struct CryptoKey_save_to_string_Cfg #

@[params]
struct CryptoKey_save_to_string_Cfg {
pub:
	public_only bool
}

Optional parameters for CryptoKey#save_to_string

struct Crypto_generate_self_signed_certificate_Cfg #

@[params]
struct Crypto_generate_self_signed_certificate_Cfg {
pub:
	issuer_name string
	not_before  string
	not_after   string
}

Optional parameters for Crypto#generate_self_signed_certificate

struct Cubemap #

struct Cubemap {
	ImageTextureLayered
}

Six square textures representing the faces of a cube. Commonly used as a skybox.

fn (Cubemap) to_variant #

fn (s &Cubemap) to_variant() Variant

fn (Cubemap) from_variant #

fn (mut s Cubemap) from_variant(variant &Variant)

fn (Cubemap) create_placeholder #

fn (s &Cubemap) create_placeholder() Resource

Creates a placeholder version of this resource ([PlaceholderCubemap]).

struct CubemapArray #

struct CubemapArray {
	ImageTextureLayered
}

An array of [Cubemap]s, stored together and with a single reference.

fn (CubemapArray) to_variant #

fn (s &CubemapArray) to_variant() Variant

fn (CubemapArray) from_variant #

fn (mut s CubemapArray) from_variant(variant &Variant)

fn (CubemapArray) create_placeholder #

fn (s &CubemapArray) create_placeholder() Resource

Creates a placeholder version of this resource ([PlaceholderCubemapArray]).

struct Curve #

struct Curve {
	Resource
}

A mathematical curve.

fn (Curve) to_variant #

fn (s &Curve) to_variant() Variant

fn (Curve) from_variant #

fn (mut s Curve) from_variant(variant &Variant)

fn (Curve) get_point_count #

fn (s &Curve) get_point_count() i64

fn (Curve) set_point_count #

fn (s &Curve) set_point_count(count i64)

fn (Curve) add_point #

fn (s &Curve) add_point(position Vector2, cfg Curve_add_point_Cfg) i64

Adds a point to the curve. For each side, if the *_mode is [constant TANGENT_LINEAR], the *_tangent angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the *_tangent angle if *_mode is set to [constant TANGENT_FREE].

fn (Curve) remove_point #

fn (s &Curve) remove_point(index i64)

Removes the point at [param index] from the curve.

fn (Curve) clear_points #

fn (s &Curve) clear_points()

Removes all points from the curve.

fn (Curve) get_point_position #

fn (s &Curve) get_point_position(index i64) Vector2

Returns the curve coordinates for the point at [param index].

fn (Curve) set_point_value #

fn (s &Curve) set_point_value(index i64, y f64)

Assigns the vertical position [param y] to the point at [param index].

fn (Curve) set_point_offset #

fn (s &Curve) set_point_offset(index i64, offset f64) i64

Sets the offset from 0.5.

fn (Curve) sample #

fn (s &Curve) sample(offset f64) f64

Returns the Y value for the point that would exist at the X position [param offset] along the curve.

fn (Curve) sample_baked #

fn (s &Curve) sample_baked(offset f64) f64

Returns the Y value for the point that would exist at the X position [param offset] along the curve using the baked cache. Bakes the curve's points if not already baked.

fn (Curve) get_point_left_tangent #

fn (s &Curve) get_point_left_tangent(index i64) f64

Returns the left tangent angle (in degrees) for the point at [param index].

fn (Curve) get_point_right_tangent #

fn (s &Curve) get_point_right_tangent(index i64) f64

Returns the right tangent angle (in degrees) for the point at [param index].

fn (Curve) get_point_left_mode #

fn (s &Curve) get_point_left_mode(index i64) CurveTangentMode

Returns the left [enum TangentMode] for the point at [param index].

fn (Curve) get_point_right_mode #

fn (s &Curve) get_point_right_mode(index i64) CurveTangentMode

Returns the right [enum TangentMode] for the point at [param index].

fn (Curve) set_point_left_tangent #

fn (s &Curve) set_point_left_tangent(index i64, tangent f64)

Sets the left tangent angle for the point at [param index] to [param tangent].

fn (Curve) set_point_right_tangent #

fn (s &Curve) set_point_right_tangent(index i64, tangent f64)

Sets the right tangent angle for the point at [param index] to [param tangent].

fn (Curve) set_point_left_mode #

fn (s &Curve) set_point_left_mode(index i64, mode CurveTangentMode)

Sets the left [enum TangentMode] for the point at [param index] to [param mode].

fn (Curve) set_point_right_mode #

fn (s &Curve) set_point_right_mode(index i64, mode CurveTangentMode)

Sets the right [enum TangentMode] for the point at [param index] to [param mode].

fn (Curve) get_min_value #

fn (s &Curve) get_min_value() f64

fn (Curve) set_min_value #

fn (s &Curve) set_min_value(min f64)

fn (Curve) get_max_value #

fn (s &Curve) get_max_value() f64

fn (Curve) set_max_value #

fn (s &Curve) set_max_value(max f64)

fn (Curve) get_value_range #

fn (s &Curve) get_value_range() f64

Returns the difference between [member min_value] and [member max_value].

fn (Curve) get_min_domain #

fn (s &Curve) get_min_domain() f64

fn (Curve) set_min_domain #

fn (s &Curve) set_min_domain(min f64)

fn (Curve) get_max_domain #

fn (s &Curve) get_max_domain() f64

fn (Curve) set_max_domain #

fn (s &Curve) set_max_domain(max f64)

fn (Curve) get_domain_range #

fn (s &Curve) get_domain_range() f64

Returns the difference between [member min_domain] and [member max_domain].

fn (Curve) clean_dupes #

fn (s &Curve) clean_dupes()

Removes duplicate points, i.e. points that are less than 0.00001 units (engine epsilon value) away from their neighbor on the curve.

fn (Curve) bake #

fn (s &Curve) bake()

Recomputes the baked cache of points for the curve.

fn (Curve) get_bake_resolution #

fn (s &Curve) get_bake_resolution() i64

fn (Curve) set_bake_resolution #

fn (s &Curve) set_bake_resolution(resolution i64)

struct Curve2D #

struct Curve2D {
	Resource
}

Describes a Bézier curve in 2D space.

fn (Curve2D) to_variant #

fn (s &Curve2D) to_variant() Variant

fn (Curve2D) from_variant #

fn (mut s Curve2D) from_variant(variant &Variant)

fn (Curve2D) get_point_count #

fn (s &Curve2D) get_point_count() i64

fn (Curve2D) set_point_count #

fn (s &Curve2D) set_point_count(count i64)

fn (Curve2D) add_point #

fn (s &Curve2D) add_point(position Vector2, cfg Curve2D_add_point_Cfg)

Adds a point with the specified [param position] relative to the curve's own position, with control points [param in] and [param out]. Appends the new point at the end of the point list. If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to 0 and must not exceed the number of existing points in the line. See [member point_count].

fn (Curve2D) set_point_position #

fn (s &Curve2D) set_point_position(idx i64, position Vector2)

Sets the position for the vertex [param idx]. If the index is out of bounds, the function sends an error to the console.

fn (Curve2D) get_point_position #

fn (s &Curve2D) get_point_position(idx i64) Vector2

Returns the position of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns (0, 0).

fn (Curve2D) set_point_in #

fn (s &Curve2D) set_point_in(idx i64, position Vector2)

Sets the position of the control point leading to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.

fn (Curve2D) get_point_in #

fn (s &Curve2D) get_point_in(idx i64) Vector2

Returns the position of the control point leading to the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns (0, 0).

fn (Curve2D) set_point_out #

fn (s &Curve2D) set_point_out(idx i64, position Vector2)

Sets the position of the control point leading out of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.

fn (Curve2D) get_point_out #

fn (s &Curve2D) get_point_out(idx i64) Vector2

Returns the position of the control point leading out of the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns (0, 0).

fn (Curve2D) remove_point #

fn (s &Curve2D) remove_point(idx i64)

Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds.

fn (Curve2D) clear_points #

fn (s &Curve2D) clear_points()

Removes all points from the curve.

fn (Curve2D) sample #

fn (s &Curve2D) sample(idx i64, t f64) Vector2

Returns the position between the vertex [param idx] and the vertex idx + 1, where [param t] controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of [param t] outside the range (0.0 <= t <= 1.0) give strange, but predictable results. If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0).

fn (Curve2D) samplef #

fn (s &Curve2D) samplef(fofs f64) Vector2

Returns the position at the vertex [param fofs]. It calls [method sample] using the integer part of [param fofs] as idx, and its fractional part as t.

fn (Curve2D) set_bake_interval #

fn (s &Curve2D) set_bake_interval(distance f64)

fn (Curve2D) get_bake_interval #

fn (s &Curve2D) get_bake_interval() f64

fn (Curve2D) get_baked_length #

fn (s &Curve2D) get_baked_length() f64

Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough.

fn (Curve2D) sample_baked #

fn (s &Curve2D) sample_baked(cfg Curve2D_sample_baked_Cfg) Vector2

Returns a point within the curve at position [param offset], where [param offset] is measured as a pixel distance along the curve. To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to true, or linear if set to false. Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).

fn (Curve2D) sample_baked_with_rotation #

fn (s &Curve2D) sample_baked_with_rotation(cfg Curve2D_sample_baked_with_rotation_Cfg) Transform2D

Similar to [method sample_baked], but returns [Transform2D] that includes a rotation along the curve, with [member Transform2D.origin] as the point position and the [member Transform2D.x] vector pointing in the direction of the path at that point. Returns an empty transform if the length of the curve is 0.

var baked = curve.sample_baked_with_rotation(offset)
##transform = baked
##position = baked.get_origin()
rotation = baked.get_rotation()

fn (Curve2D) get_baked_points #

fn (s &Curve2D) get_baked_points() PackedVector2Array

Returns the cache of points as a [PackedVector2Array].

fn (Curve2D) get_closest_point #

fn (s &Curve2D) get_closest_point(to_point Vector2) Vector2

Returns the closest point on baked segments (in curve's local space) to [param to_point]. [param to_point] must be in this curve's local space.

fn (Curve2D) get_closest_offset #

fn (s &Curve2D) get_closest_offset(to_point Vector2) f64

Returns the closest offset to [param to_point]. This offset is meant to be used in [method sample_baked]. [param to_point] must be in this curve's local space.

fn (Curve2D) tessellate #

fn (s &Curve2D) tessellate(cfg Curve2D_tessellate_Cfg) PackedVector2Array

Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! [param tolerance_degrees] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.

fn (Curve2D) tessellate_even_length #

fn (s &Curve2D) tessellate_even_length(cfg Curve2D_tessellate_even_length_Cfg) PackedVector2Array

Returns a list of points along the curve, with almost uniform density. [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! [param tolerance_length] controls the maximal distance between two neighboring points, before the segment has to be subdivided.

struct Curve2D_add_point_Cfg #

@[params]
struct Curve2D_add_point_Cfg {
pub:
	gd_in Vector2 = Vector2{0, 0}
	out   Vector2 = Vector2{0, 0}
	index i64     = -1
}

Optional parameters for Curve2D#add_point

struct Curve2D_sample_baked_Cfg #

@[params]
struct Curve2D_sample_baked_Cfg {
pub:
	offset f64 = 0.0
	cubic  bool
}

Optional parameters for Curve2D#sample_baked

struct Curve2D_sample_baked_with_rotation_Cfg #

@[params]
struct Curve2D_sample_baked_with_rotation_Cfg {
pub:
	offset f64 = 0.0
	cubic  bool
}

Optional parameters for Curve2D#sample_baked_with_rotation

struct Curve2D_tessellate_Cfg #

@[params]
struct Curve2D_tessellate_Cfg {
pub:
	max_stages        i64 = 5
	tolerance_degrees f64 = 4
}

Optional parameters for Curve2D#tessellate

struct Curve2D_tessellate_even_length_Cfg #

@[params]
struct Curve2D_tessellate_even_length_Cfg {
pub:
	max_stages       i64 = 5
	tolerance_length f64 = 20.0
}

Optional parameters for Curve2D#tessellate_even_length

struct Curve3D #

struct Curve3D {
	Resource
}

Describes a Bézier curve in 3D space.

fn (Curve3D) to_variant #

fn (s &Curve3D) to_variant() Variant

fn (Curve3D) from_variant #

fn (mut s Curve3D) from_variant(variant &Variant)

fn (Curve3D) get_point_count #

fn (s &Curve3D) get_point_count() i64

fn (Curve3D) set_point_count #

fn (s &Curve3D) set_point_count(count i64)

fn (Curve3D) add_point #

fn (s &Curve3D) add_point(position Vector3, cfg Curve3D_add_point_Cfg)

Adds a point with the specified [param position] relative to the curve's own position, with control points [param in] and [param out]. Appends the new point at the end of the point list. If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to 0 and must not exceed the number of existing points in the line. See [member point_count].

fn (Curve3D) set_point_position #

fn (s &Curve3D) set_point_position(idx i64, position Vector3)

Sets the position for the vertex [param idx]. If the index is out of bounds, the function sends an error to the console.

fn (Curve3D) get_point_position #

fn (s &Curve3D) get_point_position(idx i64) Vector3

Returns the position of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).

fn (Curve3D) set_point_tilt #

fn (s &Curve3D) set_point_tilt(idx i64, tilt f64)

Sets the tilt angle in radians for the point [param idx]. If the index is out of bounds, the function sends an error to the console. The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow3D], this tilt is an offset over the natural tilt the [PathFollow3D] calculates.

fn (Curve3D) get_point_tilt #

fn (s &Curve3D) get_point_tilt(idx i64) f64

Returns the tilt angle in radians for the point [param idx]. If the index is out of bounds, the function sends an error to the console, and returns 0.

fn (Curve3D) set_point_in #

fn (s &Curve3D) set_point_in(idx i64, position Vector3)

Sets the position of the control point leading to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.

fn (Curve3D) get_point_in #

fn (s &Curve3D) get_point_in(idx i64) Vector3

Returns the position of the control point leading to the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).

fn (Curve3D) set_point_out #

fn (s &Curve3D) set_point_out(idx i64, position Vector3)

Sets the position of the control point leading out of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.

fn (Curve3D) get_point_out #

fn (s &Curve3D) get_point_out(idx i64) Vector3

Returns the position of the control point leading out of the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).

fn (Curve3D) remove_point #

fn (s &Curve3D) remove_point(idx i64)

Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds.

fn (Curve3D) clear_points #

fn (s &Curve3D) clear_points()

Removes all points from the curve.

fn (Curve3D) sample #

fn (s &Curve3D) sample(idx i64, t f64) Vector3

Returns the position between the vertex [param idx] and the vertex idx + 1, where [param t] controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of [param t] outside the range (0.0 >= t <=1) give strange, but predictable results. If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0).

fn (Curve3D) samplef #

fn (s &Curve3D) samplef(fofs f64) Vector3

Returns the position at the vertex [param fofs]. It calls [method sample] using the integer part of [param fofs] as idx, and its fractional part as t.

fn (Curve3D) set_closed #

fn (s &Curve3D) set_closed(closed bool)

fn (Curve3D) is_closed #

fn (s &Curve3D) is_closed() bool

fn (Curve3D) set_bake_interval #

fn (s &Curve3D) set_bake_interval(distance f64)

fn (Curve3D) get_bake_interval #

fn (s &Curve3D) get_bake_interval() f64

fn (Curve3D) set_up_vector_enabled #

fn (s &Curve3D) set_up_vector_enabled(enable bool)

fn (Curve3D) is_up_vector_enabled #

fn (s &Curve3D) is_up_vector_enabled() bool

fn (Curve3D) get_baked_length #

fn (s &Curve3D) get_baked_length() f64

Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough.

fn (Curve3D) sample_baked #

fn (s &Curve3D) sample_baked(cfg Curve3D_sample_baked_Cfg) Vector3

Returns a point within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve. To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to true, or linear if set to false. Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).

fn (Curve3D) sample_baked_with_rotation #

fn (s &Curve3D) sample_baked_with_rotation(cfg Curve3D_sample_baked_with_rotation_Cfg) Transform3D

Returns a [Transform3D] with origin as point position, basis.x as sideway vector, basis.y as up vector, basis.z as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. See also [method sample_baked].

fn (Curve3D) sample_baked_up_vector #

fn (s &Curve3D) sample_baked_up_vector(offset f64, cfg Curve3D_sample_baked_up_vector_Cfg) Vector3

Returns an up vector within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve. To do that, it finds the two cached up vectors where the [param offset] lies between, then interpolates the values. If [param apply_tilt] is true, an interpolated tilt is applied to the interpolated up vector. If the curve has no up vectors, the function sends an error to the console, and returns (0, 1, 0).

fn (Curve3D) get_baked_points #

fn (s &Curve3D) get_baked_points() PackedVector3Array

Returns the cache of points as a [PackedVector3Array].

fn (Curve3D) get_baked_tilts #

fn (s &Curve3D) get_baked_tilts() PackedFloat32Array

Returns the cache of tilts as a [PackedFloat32Array].

fn (Curve3D) get_baked_up_vectors #

fn (s &Curve3D) get_baked_up_vectors() PackedVector3Array

Returns the cache of up vectors as a [PackedVector3Array]. If [member up_vector_enabled] is false, the cache will be empty.

fn (Curve3D) get_closest_point #

fn (s &Curve3D) get_closest_point(to_point Vector3) Vector3

Returns the closest point on baked segments (in curve's local space) to [param to_point]. [param to_point] must be in this curve's local space.

fn (Curve3D) get_closest_offset #

fn (s &Curve3D) get_closest_offset(to_point Vector3) f64

Returns the closest offset to [param to_point]. This offset is meant to be used in [method sample_baked] or [method sample_baked_up_vector]. [param to_point] must be in this curve's local space.

fn (Curve3D) tessellate #

fn (s &Curve3D) tessellate(cfg Curve3D_tessellate_Cfg) PackedVector3Array

Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! [param tolerance_degrees] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.

fn (Curve3D) tessellate_even_length #

fn (s &Curve3D) tessellate_even_length(cfg Curve3D_tessellate_even_length_Cfg) PackedVector3Array

Returns a list of points along the curve, with almost uniform density. [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! [param tolerance_length] controls the maximal distance between two neighboring points, before the segment has to be subdivided.

struct Curve3D_add_point_Cfg #

@[params]
struct Curve3D_add_point_Cfg {
pub:
	gd_in Vector3 = Vector3{0, 0, 0}
	out   Vector3 = Vector3{0, 0, 0}
	index i64     = -1
}

Optional parameters for Curve3D#add_point

struct Curve3D_sample_baked_Cfg #

@[params]
struct Curve3D_sample_baked_Cfg {
pub:
	offset f64 = 0.0
	cubic  bool
}

Optional parameters for Curve3D#sample_baked

struct Curve3D_sample_baked_up_vector_Cfg #

@[params]
struct Curve3D_sample_baked_up_vector_Cfg {
pub:
	apply_tilt bool
}

Optional parameters for Curve3D#sample_baked_up_vector

struct Curve3D_sample_baked_with_rotation_Cfg #

@[params]
struct Curve3D_sample_baked_with_rotation_Cfg {
pub:
	offset     f64 = 0.0
	cubic      bool
	apply_tilt bool
}

Optional parameters for Curve3D#sample_baked_with_rotation

struct Curve3D_tessellate_Cfg #

@[params]
struct Curve3D_tessellate_Cfg {
pub:
	max_stages        i64 = 5
	tolerance_degrees f64 = 4
}

Optional parameters for Curve3D#tessellate

struct Curve3D_tessellate_even_length_Cfg #

@[params]
struct Curve3D_tessellate_even_length_Cfg {
pub:
	max_stages       i64 = 5
	tolerance_length f64 = 0.2
}

Optional parameters for Curve3D#tessellate_even_length

struct CurveTexture #

struct CurveTexture {
	Texture2D
}

A 1D texture where pixel brightness corresponds to points on a curve.

fn (CurveTexture) to_variant #

fn (s &CurveTexture) to_variant() Variant

fn (CurveTexture) from_variant #

fn (mut s CurveTexture) from_variant(variant &Variant)

fn (CurveTexture) set_width #

fn (s &CurveTexture) set_width(width i64)

fn (CurveTexture) set_curve #

fn (s &CurveTexture) set_curve(curve Curve)

fn (CurveTexture) get_curve #

fn (s &CurveTexture) get_curve() Curve

fn (CurveTexture) set_texture_mode #

fn (s &CurveTexture) set_texture_mode(texture_mode CurveTextureTextureMode)

fn (CurveTexture) get_texture_mode #

fn (s &CurveTexture) get_texture_mode() CurveTextureTextureMode

struct CurveXYZTexture #

struct CurveXYZTexture {
	Texture2D
}

A 1D texture where the red, green, and blue color channels correspond to points on 3 curves.

fn (CurveXYZTexture) to_variant #

fn (s &CurveXYZTexture) to_variant() Variant

fn (CurveXYZTexture) from_variant #

fn (mut s CurveXYZTexture) from_variant(variant &Variant)

fn (CurveXYZTexture) set_width #

fn (s &CurveXYZTexture) set_width(width i64)

fn (CurveXYZTexture) set_curve_x #

fn (s &CurveXYZTexture) set_curve_x(curve Curve)

fn (CurveXYZTexture) get_curve_x #

fn (s &CurveXYZTexture) get_curve_x() Curve

fn (CurveXYZTexture) set_curve_y #

fn (s &CurveXYZTexture) set_curve_y(curve Curve)

fn (CurveXYZTexture) get_curve_y #

fn (s &CurveXYZTexture) get_curve_y() Curve

fn (CurveXYZTexture) set_curve_z #

fn (s &CurveXYZTexture) set_curve_z(curve Curve)

fn (CurveXYZTexture) get_curve_z #

fn (s &CurveXYZTexture) get_curve_z() Curve

struct Curve_add_point_Cfg #

@[params]
struct Curve_add_point_Cfg {
pub:
	left_tangent  f64
	right_tangent f64
	left_mode     CurveTangentMode = unsafe { CurveTangentMode(0) }
	right_mode    CurveTangentMode = unsafe { CurveTangentMode(0) }
}

Optional parameters for Curve#add_point

struct CylinderMesh #

struct CylinderMesh {
	PrimitiveMesh
}

Class representing a cylindrical [PrimitiveMesh].

fn (CylinderMesh) to_variant #

fn (s &CylinderMesh) to_variant() Variant

fn (CylinderMesh) from_variant #

fn (mut s CylinderMesh) from_variant(variant &Variant)

fn (CylinderMesh) set_top_radius #

fn (s &CylinderMesh) set_top_radius(radius f64)

fn (CylinderMesh) get_top_radius #

fn (s &CylinderMesh) get_top_radius() f64

fn (CylinderMesh) set_bottom_radius #

fn (s &CylinderMesh) set_bottom_radius(radius f64)

fn (CylinderMesh) get_bottom_radius #

fn (s &CylinderMesh) get_bottom_radius() f64

fn (CylinderMesh) set_height #

fn (s &CylinderMesh) set_height(height f64)

fn (CylinderMesh) get_height #

fn (s &CylinderMesh) get_height() f64

fn (CylinderMesh) set_radial_segments #

fn (s &CylinderMesh) set_radial_segments(segments i64)

fn (CylinderMesh) get_radial_segments #

fn (s &CylinderMesh) get_radial_segments() i64

fn (CylinderMesh) set_rings #

fn (s &CylinderMesh) set_rings(rings i64)

fn (CylinderMesh) get_rings #

fn (s &CylinderMesh) get_rings() i64

fn (CylinderMesh) set_cap_top #

fn (s &CylinderMesh) set_cap_top(cap_top bool)

fn (CylinderMesh) is_cap_top #

fn (s &CylinderMesh) is_cap_top() bool

fn (CylinderMesh) set_cap_bottom #

fn (s &CylinderMesh) set_cap_bottom(cap_bottom bool)

fn (CylinderMesh) is_cap_bottom #

fn (s &CylinderMesh) is_cap_bottom() bool

struct CylinderShape3D #

struct CylinderShape3D {
	Shape3D
}

A 3D cylinder shape used for physics collision.

fn (CylinderShape3D) to_variant #

fn (s &CylinderShape3D) to_variant() Variant

fn (CylinderShape3D) from_variant #

fn (mut s CylinderShape3D) from_variant(variant &Variant)

fn (CylinderShape3D) set_radius #

fn (s &CylinderShape3D) set_radius(radius f64)

fn (CylinderShape3D) get_radius #

fn (s &CylinderShape3D) get_radius() f64

fn (CylinderShape3D) set_height #

fn (s &CylinderShape3D) set_height(height f64)

fn (CylinderShape3D) get_height #

fn (s &CylinderShape3D) get_height() f64

struct DTLSServer #

struct DTLSServer {
	RefCounted
}

Helper class to implement a DTLS server.

fn (DTLSServer) to_variant #

fn (s &DTLSServer) to_variant() Variant

fn (DTLSServer) from_variant #

fn (mut s DTLSServer) from_variant(variant &Variant)

fn (DTLSServer) setup #

fn (s &DTLSServer) setup(server_options TLSOptions) GDError

Setup the DTLS server to use the given [param server_options]. See [method TLSOptions.server].

fn (DTLSServer) take_connection #

fn (s &DTLSServer) take_connection(udp_peer PacketPeerUDP) PacketPeerDTLS

Try to initiate the DTLS handshake with the given [param udp_peer] which must be already connected (see [method PacketPeerUDP.connect_to_host]). [b]Note:[/b] You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange.

struct DampedSpringJoint2D #

struct DampedSpringJoint2D {
	Joint2D
}

A physics joint that connects two 2D physics bodies with a spring-like force.

fn (DampedSpringJoint2D) to_variant #

fn (s &DampedSpringJoint2D) to_variant() Variant

fn (DampedSpringJoint2D) from_variant #

fn (mut s DampedSpringJoint2D) from_variant(variant &Variant)

fn (DampedSpringJoint2D) set_length #

fn (s &DampedSpringJoint2D) set_length(length f64)

fn (DampedSpringJoint2D) get_length #

fn (s &DampedSpringJoint2D) get_length() f64

fn (DampedSpringJoint2D) set_rest_length #

fn (s &DampedSpringJoint2D) set_rest_length(rest_length f64)

fn (DampedSpringJoint2D) get_rest_length #

fn (s &DampedSpringJoint2D) get_rest_length() f64

fn (DampedSpringJoint2D) set_stiffness #

fn (s &DampedSpringJoint2D) set_stiffness(stiffness f64)

fn (DampedSpringJoint2D) get_stiffness #

fn (s &DampedSpringJoint2D) get_stiffness() f64

fn (DampedSpringJoint2D) set_damping #

fn (s &DampedSpringJoint2D) set_damping(damping f64)

fn (DampedSpringJoint2D) get_damping #

fn (s &DampedSpringJoint2D) get_damping() f64

struct Decal #

struct Decal {
	VisualInstance3D
}

Node that projects a texture onto a [MeshInstance3D].

fn (Decal) to_variant #

fn (s &Decal) to_variant() Variant

fn (Decal) from_variant #

fn (mut s Decal) from_variant(variant &Variant)

fn (Decal) set_size #

fn (s &Decal) set_size(size Vector3)

fn (Decal) get_size #

fn (s &Decal) get_size() Vector3

fn (Decal) set_texture #

fn (s &Decal) set_texture(gd_type DecalTexture, texture Texture2D)

Sets the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. For example, instead of $Decal.set_texture(Decal.TEXTURE_ALBEDO, albedo_tex), use $Decal.texture_albedo = albedo_tex. One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example: [codeblocks] [gdscript] for i in Decal.TEXTURE_MAX: $NewDecal.set_texture(i, $OldDecal.get_texture(i)) [/gdscript] [csharp] for (int i = 0; i < (int)Decal.DecalTexture.Max; i++) { GetNode("NewDecal").SetTexture(i, GetNode("OldDecal").GetTexture(i)); } [/csharp] [/codeblocks]

fn (Decal) get_texture #

fn (s &Decal) get_texture(gd_type DecalTexture) Texture2D

Returns the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. For example, instead of albedo_tex = $Decal.get_texture(Decal.TEXTURE_ALBEDO), use albedo_tex = $Decal.texture_albedo. One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example: [codeblocks] [gdscript] for i in Decal.TEXTURE_MAX: $NewDecal.set_texture(i, $OldDecal.get_texture(i)) [/gdscript] [csharp] for (int i = 0; i < (int)Decal.DecalTexture.Max; i++) { GetNode("NewDecal").SetTexture(i, GetNode("OldDecal").GetTexture(i)); } [/csharp] [/codeblocks]

fn (Decal) set_emission_energy #

fn (s &Decal) set_emission_energy(energy f64)

fn (Decal) get_emission_energy #

fn (s &Decal) get_emission_energy() f64

fn (Decal) set_albedo_mix #

fn (s &Decal) set_albedo_mix(energy f64)

fn (Decal) get_albedo_mix #

fn (s &Decal) get_albedo_mix() f64

fn (Decal) set_modulate #

fn (s &Decal) set_modulate(color Color)

fn (Decal) get_modulate #

fn (s &Decal) get_modulate() Color

fn (Decal) set_upper_fade #

fn (s &Decal) set_upper_fade(fade f64)

fn (Decal) get_upper_fade #

fn (s &Decal) get_upper_fade() f64

fn (Decal) set_lower_fade #

fn (s &Decal) set_lower_fade(fade f64)

fn (Decal) get_lower_fade #

fn (s &Decal) get_lower_fade() f64

fn (Decal) set_normal_fade #

fn (s &Decal) set_normal_fade(fade f64)

fn (Decal) get_normal_fade #

fn (s &Decal) get_normal_fade() f64

fn (Decal) set_enable_distance_fade #

fn (s &Decal) set_enable_distance_fade(enable bool)

fn (Decal) is_distance_fade_enabled #

fn (s &Decal) is_distance_fade_enabled() bool

fn (Decal) set_distance_fade_begin #

fn (s &Decal) set_distance_fade_begin(distance f64)

fn (Decal) get_distance_fade_begin #

fn (s &Decal) get_distance_fade_begin() f64

fn (Decal) set_distance_fade_length #

fn (s &Decal) set_distance_fade_length(distance f64)

fn (Decal) get_distance_fade_length #

fn (s &Decal) get_distance_fade_length() f64

fn (Decal) set_cull_mask #

fn (s &Decal) set_cull_mask(mask i64)

fn (Decal) get_cull_mask #

fn (s &Decal) get_cull_mask() i64

struct Dictionary #

@[packed]
struct Dictionary {
	data_ [8]u8
}

A built-in data structure that holds key-value pairs.

Dictionaries are associative containers that contain values referenced by unique keys. Dictionaries will preserve the insertion order when adding new entries. In other programming languages, this data structure is often referred to as a hash map or an associative array. You can define a dictionary by placing a comma-separated list of key: value pairs inside curly braces {}. Creating a dictionary: [codeblocks] [gdscript] var my_dict = {} # Creates an empty dictionary.

var dict_variable_key = "Another key name" var dict_variable_value = "value2" var another_dict = { "Some key name": "value1", dict_variable_key: dict_variable_value, }

var points_dict = { "White": 50, "Yellow": 75, "Orange": 100 }

Alternative Lua-style syntax.

Doesn't require quotes around keys, but only string constants can be used as key names.

Additionally, key names must start with a letter or an underscore.

Here, some_key is a string literal, not a variable!

another_dict = { some_key = 42, } [/gdscript] [csharp] var myDict = new Godot.Collections.Dictionary(); // Creates an empty dictionary. var pointsDict = new Godot.Collections.Dictionary { { "White", 50 }, { "Yellow", 75 }, { "Orange", 100 }, }; [/csharp] [/codeblocks] You can access a dictionary's value by referencing its corresponding key. In the above example, points_dict["White"] will return 50. You can also write points_dict.White, which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable). [codeblocks] [gdscript] @export_enum("White", "Yellow", "Orange") var my_color: String var points_dict = { "White": 50, "Yellow": 75, "Orange": 100 } func _ready():# We can't use dot syntax here as my_color is a variable.var points = points_dict[my_color] [/gdscript] [csharp] [Export(PropertyHint.Enum, "White,Yellow,Orange")] public string MyColor { get; set; } private Godot.Collections.Dictionary _pointsDict = new Godot.Collections.Dictionary { { "White", 50 }, { "Yellow", 75 }, { "Orange", 100 }, };

public override void _Ready() { int points = (int)_pointsDict[MyColor]; } [/csharp] [/codeblocks] In the above code, points will be assigned the value that is paired with the appropriate color selected in my_color. Dictionaries can contain more complex data: [codeblocks] [gdscript] var my_dict = { "First Array": [1, 2, 3, 4] # Assigns an Array to a String key. } [/gdscript] [csharp] var myDict = new Godot.Collections.Dictionary { { "First Array", new Godot.Collections.Array { 1, 2, 3, 4 } } }; [/csharp] [/codeblocks] To add a key to an existing dictionary, access it like an existing key and assign to it: [codeblocks] [gdscript] var points_dict = { "White": 50, "Yellow": 75, "Orange": 100 } points_dict["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. [/gdscript] [csharp] var pointsDict = new Godot.Collections.Dictionary { { "White", 50 }, { "Yellow", 75 }, { "Orange", 100 }, }; pointsDict["Blue"] = 150; // Add "Blue" as a key and assign 150 as its value. [/csharp] [/codeblocks] Finally, dictionaries can contain different types of keys and values in the same dictionary: [codeblocks] [gdscript]# This is a valid dictionary.

To access the string "Nested value" below, use my_dict.sub_dict.sub_key or my_dict["sub_dict"]["sub_key"].

Indexing styles can be mixed and matched depending on your needs.

var my_dict = { "String Key": 5, 4: [1, 2, 3], 7: "Hello", "sub_dict": { "sub_key": "Nested value" }, } [/gdscript] [csharp] // This is a valid dictionary. // To access the string "Nested value" below, use ((Godot.Collections.Dictionary)myDict["sub_dict"])["sub_key"]. var myDict = new Godot.Collections.Dictionary { { "String Key", 5 }, { 4, new Godot.Collections.Array { 1, 2, 3 } }, { 7, "Hello" }, { "sub_dict", new Godot.Collections.Dictionary { { "sub_key", "Nested value" } } }, }; [/csharp] [/codeblocks] The keys of a dictionary can be iterated with the for keyword: [codeblocks] [gdscript] var groceries = { "Orange": 20, "Apple": 2, "Banana": 4 } for fruit in groceries: var amount = groceries[fruit] [/gdscript] [csharp] var groceries = new Godot.Collections.Dictionary { { "Orange", 20 }, { "Apple", 2 }, { "Banana", 4 } }; foreach (var (fruit, amount) in groceries) { // fruit is the key, amount is the value. } [/csharp] [/codeblocks] [b]Note:[/b] Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use [method duplicate]. [b]Note:[/b] Erasing elements while iterating over dictionaries is [b]not[/b] supported and will result in unpredictable behavior.

fn (Dictionary) deinit #

fn (s &Dictionary) deinit()

fn (Dictionary) size #

fn (s &Dictionary) size() i64

Returns the number of entries in the dictionary. Empty dictionaries ({ }) always return 0. See also [method is_empty].

fn (Dictionary) is_empty #

fn (s &Dictionary) is_empty() bool

Returns true if the dictionary is empty (its size is 0). See also [method size].

fn (Dictionary) clear #

fn (s &Dictionary) clear()

Clears the dictionary, removing all entries from it.

fn (Dictionary) assign #

fn (s &Dictionary) assign(dictionary Dictionary)

Assigns elements of another [param dictionary] into the dictionary. Resizes the dictionary to match [param dictionary]. Performs type conversions if the dictionary is typed.

fn (Dictionary) sort #

fn (s &Dictionary) sort()

Sorts the dictionary in ascending order, by key. The final order is dependent on the "less than" (<) comparison between keys. [codeblocks] [gdscript] var numbers = { "c": 2, "a": 0, "b": 1 } numbers.sort() print(numbers) # Prints { "a": 0, "b": 1, "c": 2 } [/gdscript] [/codeblocks] This method ensures that the dictionary's entries are ordered consistently when [method keys] or [method values] are called, or when the dictionary needs to be converted to a string through [method @GlobalScope.str] or [method JSON.stringify].

fn (Dictionary) merge #

fn (s &Dictionary) merge(dictionary Dictionary, cfg Dictionary_merge_Cfg)

Adds entries from [param dictionary] to this dictionary. By default, duplicate keys are not copied over, unless [param overwrite] is true. [codeblocks] [gdscript] var dict = { "item": "sword", "quantity": 2 } var other_dict = { "quantity": 15, "color": "silver" }

Overwriting of existing keys is disabled by default.

dict.merge(other_dict) print(dict) # { "item": "sword", "quantity": 2, "color": "silver" }

With overwriting of existing keys enabled.

dict.merge(other_dict, true) print(dict) # { "item": "sword", "quantity": 15, "color": "silver" } [/gdscript] [csharp] var dict = new Godot.Collections.Dictionary { ["item"] = "sword", ["quantity"] = 2, };

var otherDict = new Godot.Collections.Dictionary { ["quantity"] = 15, ["color"] = "silver", };

// Overwriting of existing keys is disabled by default. dict.Merge(otherDict); GD.Print(dict); // { "item": "sword", "quantity": 2, "color": "silver" }

// With overwriting of existing keys enabled. dict.Merge(otherDict, true); GD.Print(dict); // { "item": "sword", "quantity": 15, "color": "silver" } [/csharp] [/codeblocks] [b]Note:[/b] [method merge] is [i]not[/i] recursive. Nested dictionaries are considered as keys that can be overwritten or not depending on the value of [param overwrite], but they will never be merged together.

fn (Dictionary) merged #

fn (s &Dictionary) merged(dictionary Dictionary, cfg Dictionary_merged_Cfg) Dictionary

Returns a copy of this dictionary merged with the other [param dictionary]. By default, duplicate keys are not copied over, unless [param overwrite] is true. See also [method merge]. This method is useful for quickly making dictionaries with default values:

var base = { 'fruit': 'apple', 'vegetable': 'potato' }
var extra = { 'fruit': 'orange', 'dressing': 'vinegar' }
##print(extra.merged(base))
##print(extra.merged(base, true))

fn (Dictionary) has #

fn (s &Dictionary) has(key_ ToVariant) bool

Returns true if the dictionary contains an entry with the given [param key]. [codeblocks] [gdscript] var my_dict = { "Godot" : 4, 210 : null, }

print(my_dict.has("Godot")) # Prints true print(my_dict.has(210)) # Prints true print(my_dict.has(4)) # Prints false [/gdscript] [csharp] var myDict = new Godot.Collections.Dictionary { { "Godot", 4 }, { 210, default }, };

GD.Print(myDict.ContainsKey("Godot")); // Prints True GD.Print(myDict.ContainsKey(210)); // Prints True GD.Print(myDict.ContainsKey(4)); // Prints False [/csharp] [/codeblocks] In GDScript, this is equivalent to the in operator:

if 'Godot' in { 'Godot': 4 }:
print('The key is here!') ##

[b]Note:[/b] This method returns true as long as the [param key] exists, even if its corresponding value is null.

fn (Dictionary) has_all #

fn (s &Dictionary) has_all(keys Array) bool

Returns true if the dictionary contains all keys in the given [param keys] array.

var data = { 'width': 10, 'height': 20 }
data.has_all(['height', 'width']) ##

fn (Dictionary) find_key #

fn (s &Dictionary) find_key(value_ ToVariant) Variant

Finds and returns the first key whose associated value is equal to [param value], or null if it is not found. [b]Note:[/b] null is also a valid key. If inside the dictionary, [method find_key] may give misleading results.

fn (Dictionary) erase #

fn (s &Dictionary) erase(key_ ToVariant) bool

Removes the dictionary entry by key, if it exists. Returns true if the given [param key] existed in the dictionary, otherwise false. [b]Note:[/b] Do not erase entries while iterating over the dictionary. You can iterate over the [method keys] array instead.

fn (Dictionary) hash #

fn (s &Dictionary) hash() i64

Returns a hashed 32-bit integer value representing the dictionary contents. [codeblocks] [gdscript] var dict1 = { "A": 10, "B": 2 } var dict2 = { "A": 10, "B": 2 }

print(dict1.hash() == dict2.hash()) # Prints true [/gdscript] [csharp] var dict1 = new Godot.Collections.Dictionary { { "A", 10 }, { "B", 2 } }; var dict2 = new Godot.Collections.Dictionary { { "A", 10 }, { "B", 2 } };

// Godot.Collections.Dictionary has no Hash() method. Use GD.Hash() instead. GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints True [/csharp] [/codeblocks] [b]Note:[/b] Dictionaries with the same entries but in a different order will not have the same hash. [b]Note:[/b] Dictionaries with equal hash values are [i]not[/i] guaranteed to be the same, because of hash collisions. On the contrary, dictionaries with different hash values are guaranteed to be different.

fn (Dictionary) keys #

fn (s &Dictionary) keys() Array

Returns the list of keys in the dictionary.

fn (Dictionary) values #

fn (s &Dictionary) values() Array

Returns the list of values in this dictionary.

fn (Dictionary) duplicate #

fn (s &Dictionary) duplicate(cfg Dictionary_duplicate_Cfg) Dictionary

Returns a new copy of the dictionary. By default, a [b]shallow[/b] copy is returned: all nested [Array], [Dictionary], and [Resource] keys and values are shared with the original dictionary. Modifying any of those in one dictionary will also affect them in the other. If [param deep] is true, a [b]deep[/b] copy is returned: all nested arrays and dictionaries are also duplicated (recursively). Any [Resource] is still shared with the original dictionary, though.

fn (Dictionary) duplicate_deep #

fn (s &Dictionary) duplicate_deep(cfg Dictionary_duplicate_deep_Cfg) Dictionary

Duplicates this dictionary, deeply, like [method duplicate](true), with extra control over how subresources are handled. [param deep_subresources_mode] must be one of the values from [enum Resource.ResourceDeepDuplicateMode]. By default, only internal resources will be duplicated (recursively).

fn (Dictionary) get #

fn (s &Dictionary) get(key_ ToVariant, cfg Dictionary_get_Cfg) Variant

Returns the corresponding value for the given [param key] in the dictionary. If the [param key] does not exist, returns [param default], or null if the parameter is omitted.

fn (Dictionary) get_or_add #

fn (s &Dictionary) get_or_add(key_ ToVariant, cfg Dictionary_get_or_add_Cfg) Variant

Gets a value and ensures the key is set. If the [param key] exists in the dictionary, this behaves like [method get]. Otherwise, the [param default] value is inserted into the dictionary and returned.

fn (Dictionary) set #

fn (s &Dictionary) set(key_ ToVariant, value_ ToVariant) bool

Sets the value of the element at the given [param key] to the given [param value]. This is the same as using the [] operator (array[index] = value).

fn (Dictionary) is_typed #

fn (s &Dictionary) is_typed() bool

Returns true if the dictionary is typed. Typed dictionaries can only store keys/values of their associated type and provide type safety for the [] operator. Methods of typed dictionary still return [Variant].

fn (Dictionary) is_typed_key #

fn (s &Dictionary) is_typed_key() bool

Returns true if the dictionary's keys are typed.

fn (Dictionary) is_typed_value #

fn (s &Dictionary) is_typed_value() bool

Returns true if the dictionary's values are typed.

fn (Dictionary) is_same_typed #

fn (s &Dictionary) is_same_typed(dictionary Dictionary) bool

Returns true if the dictionary is typed the same as [param dictionary].

fn (Dictionary) is_same_typed_key #

fn (s &Dictionary) is_same_typed_key(dictionary Dictionary) bool

Returns true if the dictionary's keys are typed the same as [param dictionary]'s keys.

fn (Dictionary) is_same_typed_value #

fn (s &Dictionary) is_same_typed_value(dictionary Dictionary) bool

Returns true if the dictionary's values are typed the same as [param dictionary]'s values.

fn (Dictionary) get_typed_key_builtin #

fn (s &Dictionary) get_typed_key_builtin() i64

Returns the built-in [Variant] type of the typed dictionary's keys as a [enum Variant.Type] constant. If the keys are not typed, returns [constant TYPE_NIL]. See also [method is_typed_key].

fn (Dictionary) get_typed_value_builtin #

fn (s &Dictionary) get_typed_value_builtin() i64

Returns the built-in [Variant] type of the typed dictionary's values as a [enum Variant.Type] constant. If the values are not typed, returns [constant TYPE_NIL]. See also [method is_typed_value].

fn (Dictionary) get_typed_key_class_name #

fn (s &Dictionary) get_typed_key_class_name() StringName

Returns the [b]built-in[/b] class name of the typed dictionary's keys, if the built-in [Variant] type is [constant TYPE_OBJECT]. Otherwise, returns an empty [StringName]. See also [method is_typed_key] and [method Object.get_class].

fn (Dictionary) get_typed_value_class_name #

fn (s &Dictionary) get_typed_value_class_name() StringName

Returns the [b]built-in[/b] class name of the typed dictionary's values, if the built-in [Variant] type is [constant TYPE_OBJECT]. Otherwise, returns an empty [StringName]. See also [method is_typed_value] and [method Object.get_class].

fn (Dictionary) get_typed_key_script #

fn (s &Dictionary) get_typed_key_script() Variant

Returns the [Script] instance associated with this typed dictionary's keys, or null if it does not exist. See also [method is_typed_key].

fn (Dictionary) get_typed_value_script #

fn (s &Dictionary) get_typed_value_script() Variant

Returns the [Script] instance associated with this typed dictionary's values, or null if it does not exist. See also [method is_typed_value].

fn (Dictionary) make_read_only #

fn (s &Dictionary) make_read_only()

Makes the dictionary read-only, i.e. disables modification of the dictionary's contents. Does not apply to nested content, e.g. content of nested dictionaries.

fn (Dictionary) is_read_only #

fn (s &Dictionary) is_read_only() bool

Returns true if the dictionary is read-only. See [method make_read_only]. Dictionaries are automatically read-only if declared with const keyword.

fn (Dictionary) recursive_equal #

fn (s &Dictionary) recursive_equal(dictionary Dictionary, recursion_count i64) bool

Returns true if the two dictionaries contain the same keys and values, inner [Dictionary] and [Array] keys and values are compared recursively.

fn (Dictionary) to_variant #

fn (s &Dictionary) to_variant() Variant

fn (Dictionary) from_variant #

fn (mut s Dictionary) from_variant(variant &Variant)

fn (Dictionary) index_get #

fn (v &Dictionary) index_get(i &Variant) ?Variant

fn (Dictionary) index_get_named #

fn (v &Dictionary) index_get_named(sn &StringName) ?Variant

fn (Dictionary) index_get_keyed #

fn (v &Dictionary) index_get_keyed(i &Variant) ?Variant

fn (Dictionary) index_set #

fn (v &Dictionary) index_set(key &Variant, value &Variant) !

fn (Dictionary) index_set_named #

fn (v &Dictionary) index_set_named(key &StringName, value &Variant) !

fn (Dictionary) index_set_keyed #

fn (v &Dictionary) index_set_keyed(key &Variant, value &Variant) !

fn (Dictionary) == #

fn (a Dictionary) == (b Dictionary) bool

Returns true if the two dictionaries contain the same keys and values. The order of the entries does not matter. [b]Note:[/b] In C#, by convention, this operator compares by [b]reference[/b]. If you need to compare by value, iterate over both dictionaries.

fn (Dictionary) eq_dictionary #

fn (a Dictionary) eq_dictionary(b Dictionary) bool

Returns true if the two dictionaries contain the same keys and values. The order of the entries does not matter. [b]Note:[/b] In C#, by convention, this operator compares by [b]reference[/b]. If you need to compare by value, iterate over both dictionaries.

fn (Dictionary) ne_dictionary #

fn (a Dictionary) ne_dictionary(b Dictionary) bool

Returns true if the two dictionaries do not contain the same keys and values.

fn (Dictionary) in #

fn (a Dictionary) in(b Dictionary) bool

fn (Dictionary) in_dictionary #

fn (a Dictionary) in_dictionary(b Dictionary) bool

fn (Dictionary) in_array #

fn (a Dictionary) in_array(b Array) bool

struct Dictionary_duplicate_Cfg #

@[params]
struct Dictionary_duplicate_Cfg {
pub:
	deep bool
}

struct Dictionary_duplicate_deep_Cfg #

@[params]
struct Dictionary_duplicate_deep_Cfg {
pub:
	deep_subresources_mode i64 = 1
}

struct Dictionary_get_Cfg #

@[params]
struct Dictionary_get_Cfg {
pub:
	default ToVariant
}

struct Dictionary_get_or_add_Cfg #

@[params]
struct Dictionary_get_or_add_Cfg {
pub:
	default ToVariant
}

struct Dictionary_merge_Cfg #

@[params]
struct Dictionary_merge_Cfg {
pub:
	overwrite bool
}

struct Dictionary_merged_Cfg #

@[params]
struct Dictionary_merged_Cfg {
pub:
	overwrite bool
}

struct DirAccess #

struct DirAccess {
	RefCounted
}

Provides methods for managing directories and their content.

fn (DirAccess) to_variant #

fn (s &DirAccess) to_variant() Variant

fn (DirAccess) from_variant #

fn (mut s DirAccess) from_variant(variant &Variant)

fn (DirAccess) list_dir_begin #

fn (s &DirAccess) list_dir_begin() GDError

Initializes the stream used to list all files and directories using the [method get_next] function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. Affected by [member include_hidden] and [member include_navigational]. [b]Note:[/b] The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use [method get_files] or [method get_directories].

fn (DirAccess) get_next #

fn (s &DirAccess) get_next() string

Returns the next element (file or directory) in the current directory. The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty [String] and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case).

fn (DirAccess) current_is_dir #

fn (s &DirAccess) current_is_dir() bool

Returns whether the current item processed with the last [method get_next] call is a directory (. and .. are considered directories).

fn (DirAccess) list_dir_end #

fn (s &DirAccess) list_dir_end()

Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] does not matter).

fn (DirAccess) get_files #

fn (s &DirAccess) get_files() PackedStringArray

Returns a [PackedStringArray] containing filenames of the directory contents, excluding directories. The array is sorted alphabetically. Affected by [member include_hidden]. [b]Note:[/b] When used on a res:// path in an exported project, only the files actually included in the PCK at the given folder level are returned. In practice, this means that since imported resources are stored in a top-level .godot/ folder, only paths to *.gd and *.import files are returned (plus a few files such as project.godot or project.binary and the project icon). In an exported project, the list of returned files will also vary depending on whether [member ProjectSettings.editor/export/convert_text_resources_to_binary] is true.

fn (DirAccess) get_directories #

fn (s &DirAccess) get_directories() PackedStringArray

Returns a [PackedStringArray] containing filenames of the directory contents, excluding files. The array is sorted alphabetically. Affected by [member include_hidden] and [member include_navigational]. [b]Note:[/b] The returned directories in the editor and after exporting in the res:// directory may differ as some files are converted to engine-specific formats when exported.

fn (DirAccess) get_current_drive #

fn (s &DirAccess) get_current_drive() i64

Returns the currently opened directory's drive index. See [method get_drive_name] to convert returned index to the name of the drive.

fn (DirAccess) change_dir #

fn (s &DirAccess) change_dir(to_dir string) GDError

Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. newdir or ../newdir), or an absolute path (e.g. /tmp/newdir or res://somedir/newdir). Returns one of the [enum Error] code constants ([constant OK] on success). [b]Note:[/b] The new directory must be within the same scope, e.g. when you had opened a directory inside res://, you can't change it to user:// directory. If you need to open a directory in another access scope, use [method open] to create a new instance instead.

fn (DirAccess) get_current_dir #

fn (s &DirAccess) get_current_dir(cfg DirAccess_get_current_dir_Cfg) string

Returns the absolute path to the currently opened directory (e.g. res://folder or C:\tmp\folder).

fn (DirAccess) make_dir #

fn (s &DirAccess) make_dir(path string) GDError

Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). Returns one of the [enum Error] code constants ([constant OK] on success).

fn (DirAccess) make_dir_recursive #

fn (s &DirAccess) make_dir_recursive(path string) GDError

Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. Returns one of the [enum Error] code constants ([constant OK] on success).

fn (DirAccess) file_exists #

fn (s &DirAccess) file_exists(path string) bool

Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. For a static equivalent, use [method FileAccess.file_exists]. [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account.

fn (DirAccess) dir_exists #

fn (s &DirAccess) dir_exists(path string) bool

Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path. [b]Note:[/b] The returned [bool] in the editor and after exporting when used on a path in the res:// directory may be different. Some files are converted to engine-specific formats when exported, potentially changing the directory structure.

fn (DirAccess) get_space_left #

fn (s &DirAccess) get_space_left() i64

Returns the available space on the current directory's disk, in bytes. Returns 0 if the platform-specific method to query the available space fails.

fn (DirAccess) copy #

fn (s &DirAccess) copy(from string, to string, cfg DirAccess_copy_Cfg) GDError

Copies the [param from] file to the [param to] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. If [param chmod_flags] is different than -1, the Unix permissions for the destination path will be set to the provided value, if available on the current operating system. Returns one of the [enum Error] code constants ([constant OK] on success).

fn (DirAccess) rename #

fn (s &DirAccess) rename(from string, to string) GDError

Renames (move) the [param from] file or directory to the [param to] destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten. Returns one of the [enum Error] code constants ([constant OK] on success).

fn (DirAccess) remove #

fn (s &DirAccess) remove(path string) GDError

Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. If you don't want to delete the file/directory permanently, use [method OS.move_to_trash] instead. Returns one of the [enum Error] code constants ([constant OK] on success).

fn (DirAccess) is_bundle #

fn (s &DirAccess) is_bundle(path string) bool

Returns true if the directory is a macOS bundle. [b]Note:[/b] This method is implemented on macOS.

fn (DirAccess) set_include_navigational #

fn (s &DirAccess) set_include_navigational(enable bool)

fn (DirAccess) get_include_navigational #

fn (s &DirAccess) get_include_navigational() bool

fn (DirAccess) set_include_hidden #

fn (s &DirAccess) set_include_hidden(enable bool)

fn (DirAccess) get_include_hidden #

fn (s &DirAccess) get_include_hidden() bool

fn (DirAccess) get_filesystem_type #

fn (s &DirAccess) get_filesystem_type() string

Returns file system type name of the current directory's disk. Returned values are uppercase strings like NTFS, FAT32, EXFAT, APFS, EXT4, BTRFS, and so on. [b]Note:[/b] This method is implemented on macOS, Linux, Windows and for PCK virtual file system.

fn (DirAccess) is_case_sensitive #

fn (s &DirAccess) is_case_sensitive(path string) bool

Returns true if the file system or directory use case sensitive file names. [b]Note:[/b] This method is implemented on macOS, Linux (for EXT4 and F2FS filesystems only) and Windows. On other platforms, it always returns true.

fn (DirAccess) is_equivalent #

fn (s &DirAccess) is_equivalent(path_a string, path_b string) bool

Returns true if paths [param path_a] and [param path_b] resolve to the same file system object. Returns false otherwise, even if the files are bit-for-bit identical (e.g., identical copies of the file that are not symbolic links).

struct DirAccess_copy_Cfg #

@[params]
struct DirAccess_copy_Cfg {
pub:
	chmod_flags i64 = -1
}

Optional parameters for DirAccess#copy

struct DirAccess_copy_absolute_Cfg #

@[params]
struct DirAccess_copy_absolute_Cfg {
pub:
	chmod_flags i64 = -1
}

Optional parameters for DirAccess#copy_absolute

struct DirAccess_create_temp_Cfg #

@[params]
struct DirAccess_create_temp_Cfg {
pub:
	prefix string
	keep   bool
}

Optional parameters for DirAccess#create_temp

struct DirAccess_get_current_dir_Cfg #

@[params]
struct DirAccess_get_current_dir_Cfg {
pub:
	include_drive bool
}

Optional parameters for DirAccess#get_current_dir

struct DirectionalLight2D #

struct DirectionalLight2D {
	Light2D
}

Directional 2D light from a distance.

fn (DirectionalLight2D) to_variant #

fn (s &DirectionalLight2D) to_variant() Variant

fn (DirectionalLight2D) from_variant #

fn (mut s DirectionalLight2D) from_variant(variant &Variant)

fn (DirectionalLight2D) set_max_distance #

fn (s &DirectionalLight2D) set_max_distance(pixels f64)

fn (DirectionalLight2D) get_max_distance #

fn (s &DirectionalLight2D) get_max_distance() f64

struct DirectionalLight3D #

struct DirectionalLight3D {
	Light3D
}

Directional light from a distance, as from the Sun.

fn (DirectionalLight3D) to_variant #

fn (s &DirectionalLight3D) to_variant() Variant

fn (DirectionalLight3D) from_variant #

fn (mut s DirectionalLight3D) from_variant(variant &Variant)

fn (DirectionalLight3D) set_shadow_mode #

fn (s &DirectionalLight3D) set_shadow_mode(mode DirectionalLight3DShadowMode)

fn (DirectionalLight3D) get_shadow_mode #

fn (s &DirectionalLight3D) get_shadow_mode() DirectionalLight3DShadowMode

fn (DirectionalLight3D) set_blend_splits #

fn (s &DirectionalLight3D) set_blend_splits(enabled bool)

fn (DirectionalLight3D) is_blend_splits_enabled #

fn (s &DirectionalLight3D) is_blend_splits_enabled() bool

fn (DirectionalLight3D) set_sky_mode #

fn (s &DirectionalLight3D) set_sky_mode(mode DirectionalLight3DSkyMode)

fn (DirectionalLight3D) get_sky_mode #

fn (s &DirectionalLight3D) get_sky_mode() DirectionalLight3DSkyMode

struct DisplayServer #

struct DisplayServer {
	Object
}

A server interface for low-level window management.

fn (DisplayServer) to_variant #

fn (s &DisplayServer) to_variant() Variant

fn (DisplayServer) from_variant #

fn (mut s DisplayServer) from_variant(variant &Variant)

fn (DisplayServer) has_feature #

fn (s &DisplayServer) has_feature(feature DisplayServerFeature) bool

Returns true if the specified [param feature] is supported by the current [DisplayServer], false otherwise.

fn (DisplayServer) get_name #

fn (s &DisplayServer) get_name() string

Returns the name of the [DisplayServer] currently in use. Most operating systems only have a single [DisplayServer], but Linux has access to more than one [DisplayServer] (currently X11 and Wayland). The names of built-in display servers are Windows, macOS, X11 (Linux), Wayland (Linux), Android, iOS, web (HTML5), and headless (when started with the --headless [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]).

fn (DisplayServer) help_set_search_callbacks #

fn (s &DisplayServer) help_set_search_callbacks(search_callback Callable, action_callback Callable)

Sets native help system search callbacks. [param search_callback] has the following arguments: String search_string, int result_limit and return a [Dictionary] with "key, display name" pairs for the search results. Called when the user enters search terms in the Help menu. [param action_callback] has the following arguments: String key. Called when the user selects a search result in the Help menu. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_popup_callbacks #

fn (s &DisplayServer) global_menu_set_popup_callbacks(menu_root string, open_callback Callable, close_callback Callable)

Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments.

fn (DisplayServer) global_menu_add_submenu_item #

fn (s &DisplayServer) global_menu_add_submenu_item(menu_root string, label string, submenu string, cfg DisplayServer_global_menu_add_submenu_item_Cfg) i64

Adds an item that will act as a submenu of the global menu [param menu_root]. The [param submenu] argument is the ID of the global menu root that will be shown when the item is clicked. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_add_item #

fn (s &DisplayServer) global_menu_add_item(menu_root string, label string, cfg DisplayServer_global_menu_add_item_Cfg) i64

Adds a new item with text [param label] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_add_check_item #

fn (s &DisplayServer) global_menu_add_check_item(menu_root string, label string, cfg DisplayServer_global_menu_add_check_item_Cfg) i64

Adds a new checkable item with text [param label] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_add_icon_item #

fn (s &DisplayServer) global_menu_add_icon_item(menu_root string, icon Texture2D, label string, cfg DisplayServer_global_menu_add_icon_item_Cfg) i64

Adds a new item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_add_icon_check_item #

fn (s &DisplayServer) global_menu_add_icon_check_item(menu_root string, icon Texture2D, label string, cfg DisplayServer_global_menu_add_icon_check_item_Cfg) i64

Adds a new checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_add_radio_check_item #

fn (s &DisplayServer) global_menu_add_radio_check_item(menu_root string, label string, cfg DisplayServer_global_menu_add_radio_check_item_Cfg) i64

Adds a new radio-checkable item with text [param label] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it. [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_add_icon_radio_check_item #

fn (s &DisplayServer) global_menu_add_icon_radio_check_item(menu_root string, icon Texture2D, label string, cfg DisplayServer_global_menu_add_icon_radio_check_item_Cfg) i64

Adds a new radio-checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it. [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_add_multistate_item #

fn (s &DisplayServer) global_menu_add_multistate_item(menu_root string, label string, max_states i64, default_state i64, cfg DisplayServer_global_menu_add_multistate_item_Cfg) i64

Adds a new item with text [param label] to the global menu with ID [param menu_root]. Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] By default, there's no indication of the current item state, it should be changed manually. [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_add_separator #

fn (s &DisplayServer) global_menu_add_separator(menu_root string, cfg DisplayServer_global_menu_add_separator_Cfg) i64

Adds a separator between items to the global menu with ID [param menu_root]. Separators also occupy an index. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_get_item_index_from_text #

fn (s &DisplayServer) global_menu_get_item_index_from_text(menu_root string, text string) i64

Returns the index of the item with the specified [param text]. Indices are automatically assigned to each item by the engine, and cannot be set manually. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_index_from_tag #

fn (s &DisplayServer) global_menu_get_item_index_from_tag(menu_root string, tag_ ToVariant) i64

Returns the index of the item with the specified [param tag]. Indices are automatically assigned to each item by the engine, and cannot be set manually. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_is_item_checked #

fn (s &DisplayServer) global_menu_is_item_checked(menu_root string, idx i64) bool

Returns true if the item at index [param idx] is checked. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_is_item_checkable #

fn (s &DisplayServer) global_menu_is_item_checkable(menu_root string, idx i64) bool

Returns true if the item at index [param idx] is checkable in some way, i.e. if it has a checkbox or radio button. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_is_item_radio_checkable #

fn (s &DisplayServer) global_menu_is_item_radio_checkable(menu_root string, idx i64) bool

Returns true if the item at index [param idx] has radio button-style checkability. [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_callback #

fn (s &DisplayServer) global_menu_get_item_callback(menu_root string, idx i64) Callable

Returns the callback of the item at index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_key_callback #

fn (s &DisplayServer) global_menu_get_item_key_callback(menu_root string, idx i64) Callable

Returns the callback of the item accelerator at index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_tag #

fn (s &DisplayServer) global_menu_get_item_tag(menu_root string, idx i64) Variant

Returns the metadata of the specified item, which might be of any type. You can set it with [method global_menu_set_item_tag], which provides a simple way of assigning context data to items. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_text #

fn (s &DisplayServer) global_menu_get_item_text(menu_root string, idx i64) string

Returns the text of the item at index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_submenu #

fn (s &DisplayServer) global_menu_get_item_submenu(menu_root string, idx i64) string

Returns the submenu ID of the item at index [param idx]. See [method global_menu_add_submenu_item] for more info on how to add a submenu. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_accelerator #

fn (s &DisplayServer) global_menu_get_item_accelerator(menu_root string, idx i64) Key

Returns the accelerator of the item at index [param idx]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_is_item_disabled #

fn (s &DisplayServer) global_menu_is_item_disabled(menu_root string, idx i64) bool

Returns true if the item at index [param idx] is disabled. When it is disabled it can't be selected, or its action invoked. See [method global_menu_set_item_disabled] for more info on how to disable an item. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_is_item_hidden #

fn (s &DisplayServer) global_menu_is_item_hidden(menu_root string, idx i64) bool

Returns true if the item at index [param idx] is hidden. See [method global_menu_set_item_hidden] for more info on how to hide an item. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_tooltip #

fn (s &DisplayServer) global_menu_get_item_tooltip(menu_root string, idx i64) string

Returns the tooltip associated with the specified index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_state #

fn (s &DisplayServer) global_menu_get_item_state(menu_root string, idx i64) i64

Returns the state of a multistate item. See [method global_menu_add_multistate_item] for details. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_max_states #

fn (s &DisplayServer) global_menu_get_item_max_states(menu_root string, idx i64) i64

Returns number of states of a multistate item. See [method global_menu_add_multistate_item] for details. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_icon #

fn (s &DisplayServer) global_menu_get_item_icon(menu_root string, idx i64) Texture2D

Returns the icon of the item at index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_indentation_level #

fn (s &DisplayServer) global_menu_get_item_indentation_level(menu_root string, idx i64) i64

Returns the horizontal offset of the item at the given [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_checked #

fn (s &DisplayServer) global_menu_set_item_checked(menu_root string, idx i64, checked bool)

Sets the checkstate status of the item at index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_checkable #

fn (s &DisplayServer) global_menu_set_item_checkable(menu_root string, idx i64, checkable bool)

Sets whether the item at index [param idx] has a checkbox. If false, sets the type of the item to plain text. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_radio_checkable #

fn (s &DisplayServer) global_menu_set_item_radio_checkable(menu_root string, idx i64, checkable bool)

Sets the type of the item at the specified index [param idx] to radio button. If false, sets the type of the item to plain text. [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_callback #

fn (s &DisplayServer) global_menu_set_item_callback(menu_root string, idx i64, callback Callable)

Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed. [b]Note:[/b] The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_hover_callbacks #

fn (s &DisplayServer) global_menu_set_item_hover_callbacks(menu_root string, idx i64, callback Callable)

Sets the callback of the item at index [param idx]. The callback is emitted when an item is hovered. [b]Note:[/b] The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_key_callback #

fn (s &DisplayServer) global_menu_set_item_key_callback(menu_root string, idx i64, key_callback Callable)

Sets the callback of the item at index [param idx]. Callback is emitted when its accelerator is activated. [b]Note:[/b] The [param key_callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_tag #

fn (s &DisplayServer) global_menu_set_item_tag(menu_root string, idx i64, tag_ ToVariant)

Sets the metadata of an item, which may be of any type. You can later get it with [method global_menu_get_item_tag], which provides a simple way of assigning context data to items. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_text #

fn (s &DisplayServer) global_menu_set_item_text(menu_root string, idx i64, text string)

Sets the text of the item at index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_submenu #

fn (s &DisplayServer) global_menu_set_item_submenu(menu_root string, idx i64, submenu string)

Sets the submenu of the item at index [param idx]. The submenu is the ID of a global menu root that would be shown when the item is clicked. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_accelerator #

fn (s &DisplayServer) global_menu_set_item_accelerator(menu_root string, idx i64, keycode Key)

Sets the accelerator of the item at index [param idx]. [param keycode] can be a single [enum Key], or a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_disabled #

fn (s &DisplayServer) global_menu_set_item_disabled(menu_root string, idx i64, disabled bool)

Enables/disables the item at index [param idx]. When it is disabled, it can't be selected and its action can't be invoked. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_hidden #

fn (s &DisplayServer) global_menu_set_item_hidden(menu_root string, idx i64, hidden bool)

Hides/shows the item at index [param idx]. When it is hidden, an item does not appear in a menu and its action cannot be invoked. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_tooltip #

fn (s &DisplayServer) global_menu_set_item_tooltip(menu_root string, idx i64, tooltip string)

Sets the [String] tooltip of the item at the specified index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_state #

fn (s &DisplayServer) global_menu_set_item_state(menu_root string, idx i64, state i64)

Sets the state of a multistate item. See [method global_menu_add_multistate_item] for details. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_max_states #

fn (s &DisplayServer) global_menu_set_item_max_states(menu_root string, idx i64, max_states i64)

Sets number of state of a multistate item. See [method global_menu_add_multistate_item] for details. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_set_item_icon #

fn (s &DisplayServer) global_menu_set_item_icon(menu_root string, idx i64, icon Texture2D)

Replaces the [Texture2D] icon of the specified [param idx]. [b]Note:[/b] This method is implemented only on macOS. [b]Note:[/b] This method is not supported by macOS "_dock" menu items.

fn (DisplayServer) global_menu_set_item_indentation_level #

fn (s &DisplayServer) global_menu_set_item_indentation_level(menu_root string, idx i64, level i64)

Sets the horizontal offset of the item at the given [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_get_item_count #

fn (s &DisplayServer) global_menu_get_item_count(menu_root string) i64

Returns number of items in the global menu with ID [param menu_root]. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_remove_item #

fn (s &DisplayServer) global_menu_remove_item(menu_root string, idx i64)

Removes the item at index [param idx] from the global menu [param menu_root]. [b]Note:[/b] The indices of items after the removed item will be shifted by one. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) global_menu_clear #

fn (s &DisplayServer) global_menu_clear(menu_root string)

Removes all items from the global menu with ID [param menu_root]. [b]Note:[/b] This method is implemented only on macOS. [b]Supported system menu IDs:[/b] [codeblock lang=text] "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). "_apple" - Apple menu (macOS, custom items added before "Services"). "_window" - Window menu (macOS, custom items added after "Bring All to Front"). "_help" - Help menu (macOS).

fn (DisplayServer) global_menu_get_system_menu_roots #

fn (s &DisplayServer) global_menu_get_system_menu_roots() Dictionary

Returns Dictionary of supported system menu IDs and names. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) tts_is_speaking #

fn (s &DisplayServer) tts_is_speaking() bool

Returns true if the synthesizer is generating speech, or have utterance waiting in the queue. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) tts_is_paused #

fn (s &DisplayServer) tts_is_paused() bool

Returns true if the synthesizer is in a paused state. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) tts_get_voices #

fn (s &DisplayServer) tts_get_voices() Array

Returns an [Array] of voice information dictionaries. Each [Dictionary] contains two [String] entries:- name is voice name.

  • id is voice identifier.
  • language is language code in lang_Variant format. The lang part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. The [code skip-lint]Variant` part is an engine-dependent string describing country, region or/and dialect.Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and macOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) tts_get_voices_for_language #

fn (s &DisplayServer) tts_get_voices_for_language(language string) PackedStringArray

Returns an [PackedStringArray] of voice identifiers for the [param language]. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) tts_speak #

fn (s &DisplayServer) tts_speak(text string, voice string, cfg DisplayServer_tts_speak_Cfg)

Adds an utterance to the queue. If [param interrupt] is true, the queue is cleared first.- [param voice] identifier is one of the "id" values returned by [method tts_get_voices] or one of the values returned by [method tts_get_voices_for_language].

  • [param volume] ranges from 0 (lowest) to 100 (highest).
  • [param pitch] ranges from 0.0 (lowest) to 2.0 (highest), 1.0 is default pitch for the current voice.
  • [param rate] ranges from 0.1 (lowest) to 10.0 (highest), 1.0 is a normal speaking rate. Other values act as a percentage relative.
  • [param utterance_id] is passed as a parameter to the callback functions.[b]Note:[/b] On Windows and Linux (X11/Wayland), utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak]. [b]Note:[/b] The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) tts_pause #

fn (s &DisplayServer) tts_pause()

Puts the synthesizer into a paused state. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) tts_resume #

fn (s &DisplayServer) tts_resume()

Resumes the synthesizer if it was paused. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) tts_stop #

fn (s &DisplayServer) tts_stop()

Stops synthesis in progress and removes all utterances from the queue. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) tts_set_utterance_callback #

fn (s &DisplayServer) tts_set_utterance_callback(event DisplayServerTTSUtteranceEvent, callable Callable)

Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.- [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance ID.

  • [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance ID.[b]Note:[/b] The granularity of the boundary callbacks is engine dependent. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) is_dark_mode_supported #

fn (s &DisplayServer) is_dark_mode_supported() bool

Returns true if OS supports dark mode. [b]Note:[/b] This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).

fn (DisplayServer) is_dark_mode #

fn (s &DisplayServer) is_dark_mode() bool

Returns true if OS is using dark mode. [b]Note:[/b] This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).

fn (DisplayServer) get_accent_color #

fn (s &DisplayServer) get_accent_color() Color

Returns OS theme accent color. Returns Color(0, 0, 0, 0), if accent color is unknown. [b]Note:[/b] This method is implemented on macOS, Windows, Android, and Linux (X11/Wayland).

fn (DisplayServer) get_base_color #

fn (s &DisplayServer) get_base_color() Color

Returns the OS theme base color (default control background). Returns Color(0, 0, 0, 0) if the base color is unknown. [b]Note:[/b] This method is implemented on macOS, Windows, and Android.

fn (DisplayServer) set_system_theme_change_callback #

fn (s &DisplayServer) set_system_theme_change_callback(callable Callable)

Sets the [param callable] that should be called when system theme settings are changed. Callback method should have zero arguments. [b]Note:[/b] This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).

fn (DisplayServer) mouse_set_mode #

fn (s &DisplayServer) mouse_set_mode(mouse_mode DisplayServerMouseMode)

Sets the current mouse mode. See also [method mouse_get_mode].

fn (DisplayServer) mouse_get_mode #

fn (s &DisplayServer) mouse_get_mode() DisplayServerMouseMode

Returns the current mouse mode. See also [method mouse_set_mode].

fn (DisplayServer) warp_mouse #

fn (s &DisplayServer) warp_mouse(position Vector2i)

Sets the mouse cursor position to the given [param position] relative to an origin at the upper left corner of the currently focused game Window Manager window. [b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web.

fn (DisplayServer) mouse_get_position #

fn (s &DisplayServer) mouse_get_position() Vector2i

Returns the mouse cursor's current position in screen coordinates.

fn (DisplayServer) mouse_get_button_state #

fn (s &DisplayServer) mouse_get_button_state() MouseButtonMask

Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method Input.get_mouse_button_mask].

fn (DisplayServer) clipboard_set #

fn (s &DisplayServer) clipboard_set(clipboard string)

Sets the user's clipboard content to the given string.

fn (DisplayServer) clipboard_get #

fn (s &DisplayServer) clipboard_get() string

Returns the user's clipboard as a string if possible.

fn (DisplayServer) clipboard_get_image #

fn (s &DisplayServer) clipboard_get_image() Image

Returns the user's clipboard as an image if possible. [b]Note:[/b] This method uses the copied pixel data, e.g. from a image editing software or a web browser, not an image file copied from file explorer.

fn (DisplayServer) clipboard_has #

fn (s &DisplayServer) clipboard_has() bool

Returns true if there is a text content on the user's clipboard.

fn (DisplayServer) clipboard_has_image #

fn (s &DisplayServer) clipboard_has_image() bool

Returns true if there is an image content on the user's clipboard.

fn (DisplayServer) clipboard_set_primary #

fn (s &DisplayServer) clipboard_set_primary(clipboard_primary string)

Sets the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. [b]Note:[/b] This method is only implemented on Linux (X11/Wayland).

fn (DisplayServer) clipboard_get_primary #

fn (s &DisplayServer) clipboard_get_primary() string

Returns the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. [b]Note:[/b] This method is only implemented on Linux (X11/Wayland).

fn (DisplayServer) get_display_cutouts #

fn (s &DisplayServer) get_display_cutouts() Array

Returns an [Array] of [Rect2], each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also [method get_display_safe_area]. [b]Note:[/b] Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches.

fn (DisplayServer) get_display_safe_area #

fn (s &DisplayServer) get_display_safe_area() Rect2i

Returns the unobscured area of the display where interactive controls should be rendered. See also [method get_display_cutouts]. [b]Note:[/b] Currently only implemented on Android and iOS. On other platforms, screen_get_usable_rect(SCREEN_OF_MAIN_WINDOW) will be returned as a fallback. See also [method screen_get_usable_rect].

fn (DisplayServer) get_screen_count #

fn (s &DisplayServer) get_screen_count() i64

Returns the number of displays available. [b]Note:[/b] This method is implemented on Linux (X11 and Wayland), macOS, and Windows. On other platforms, this method always returns 1.

fn (DisplayServer) get_primary_screen #

fn (s &DisplayServer) get_primary_screen() i64

Returns index of the primary screen. [b]Note:[/b] This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns 0.

fn (DisplayServer) get_keyboard_focus_screen #

fn (s &DisplayServer) get_keyboard_focus_screen() i64

Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window. [b]Note:[/b] This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns the primary screen.

fn (DisplayServer) get_screen_from_rect #

fn (s &DisplayServer) get_screen_from_rect(rect Rect2) i64

Returns the index of the screen that overlaps the most with the given rectangle. Returns [constant INVALID_SCREEN] if the rectangle doesn't overlap with any screen or has no area.

fn (DisplayServer) screen_get_position #

fn (s &DisplayServer) screen_get_position(cfg DisplayServer_screen_get_position_Cfg) Vector2i

Returns the screen's top-left corner position in pixels. Returns [constant Vector2i.ZERO] if [param screen] is invalid. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin might be located outside any display like this: [codeblock lang=text]* (0, 0) +-------+| |+-------------+ | || | | || | | |+-------------+ +-------+

See also [method screen_get_size].
[b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS].

fn (DisplayServer) screen_get_size #

fn (s &DisplayServer) screen_get_size(cfg DisplayServer_screen_get_size_Cfg) Vector2i

Returns the screen's size in pixels. See also [method screen_get_position] and [method screen_get_usable_rect]. Returns [constant Vector2i.ZERO] if [param screen] is invalid. [b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS].

fn (DisplayServer) screen_get_usable_rect #

fn (s &DisplayServer) screen_get_usable_rect(cfg DisplayServer_screen_get_usable_rect_Cfg) Rect2i

Returns the portion of the screen that is not obstructed by a status bar in pixels. See also [method screen_get_size]. [b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS]. [b]Note:[/b] This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns Rect2i(screen_get_position(screen), screen_get_size(screen)).

fn (DisplayServer) screen_get_dpi #

fn (s &DisplayServer) screen_get_dpi(cfg DisplayServer_screen_get_dpi_Cfg) i64

Returns the dots per inch density of the specified screen. Returns platform specific default value if [param screen] is invalid. [b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS]. [b]Note:[/b] On macOS, returned value is inaccurate if fractional display scaling mode is used. [b]Note:[/b] On Android devices, the actual screen densities are grouped into six generalized densities: [codeblock lang=text] ldpi - 120 dpi mdpi - 160 dpi hdpi - 240 dpi xhdpi - 320 dpi xxhdpi - 480 dpi xxxhdpi - 640 dpi

[b]Note:[/b] This method is implemented on Android, iOS, Linux (X11/Wayland), macOS, Web, and Windows. On other platforms, this method always returns `72`.

fn (DisplayServer) screen_get_scale #

fn (s &DisplayServer) screen_get_scale(cfg DisplayServer_screen_get_scale_Cfg) f64

Returns the scale factor of the specified screen by index. Returns 1.0 if [param screen] is invalid. [b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS]. [b]Note:[/b] On macOS, the returned value is 2.0 for hiDPI (Retina) screens, and 1.0 for all other cases. [b]Note:[/b] On Linux (Wayland), the returned value is accurate only when [param screen] is [constant SCREEN_OF_MAIN_WINDOW]. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. 1.25 would get rounded up to 2.0). [b]Note:[/b] This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland). On other platforms, this method always returns 1.0.

fn (DisplayServer) is_touchscreen_available #

fn (s &DisplayServer) is_touchscreen_available() bool

Returns true if touch events are available (Android or iOS), the capability is detected on the Web platform or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is true.

fn (DisplayServer) screen_get_max_scale #

fn (s &DisplayServer) screen_get_max_scale() f64

Returns the greatest scale factor of all screens. [b]Note:[/b] On macOS returned value is 2.0 if there is at least one hiDPI (Retina) screen in the system, and 1.0 in all other cases. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) screen_get_refresh_rate #

fn (s &DisplayServer) screen_get_refresh_rate(cfg DisplayServer_screen_get_refresh_rate_Cfg) f64

Returns the current refresh rate of the specified screen. Returns -1.0 if [param screen] is invalid or the [DisplayServer] fails to find the refresh rate for the specified screen. To fallback to a default refresh rate if the method fails, try:

var refresh_rate = DisplayServer.screen_get_refresh_rate()
if refresh_rate < 0:
refresh_rate = 60.0

[b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS]. [b]Note:[/b] This method is implemented on Android, iOS, macOS, Linux (X11 and Wayland), and Windows. On other platforms, this method always returns -1.0.

fn (DisplayServer) screen_get_pixel #

fn (s &DisplayServer) screen_get_pixel(position Vector2i) Color

Returns color of the display pixel at the [param position]. [b]Note:[/b] This method is implemented on Linux (X11, excluding XWayland), macOS, and Windows. On other platforms, this method always returns [Color]. [b]Note:[/b] On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will only contain the desktop wallpaper, the current application's window, and other related UI elements.

fn (DisplayServer) screen_get_image #

fn (s &DisplayServer) screen_get_image(cfg DisplayServer_screen_get_image_Cfg) Image

Returns a screenshot of the [param screen]. Returns null if [param screen] is invalid or the [DisplayServer] fails to capture screenshot. [b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS]. [b]Note:[/b] This method is implemented on Linux (X11, excluding XWayland), macOS, and Windows. On other platforms, this method always returns null. [b]Note:[/b] On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will not include other application windows or OS elements not related to the application.

fn (DisplayServer) screen_get_image_rect #

fn (s &DisplayServer) screen_get_image_rect(rect Rect2i) Image

Returns a screenshot of the screen region defined by [param rect]. Returns null if [param rect] is outside screen bounds or the [DisplayServer] fails to capture screenshot. [b]Note:[/b] This method is implemented on macOS and Windows. On other platforms, this method always returns null. [b]Note:[/b] On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will not include other application windows or OS elements not related to the application.

fn (DisplayServer) screen_set_orientation #

fn (s &DisplayServer) screen_set_orientation(orientation DisplayServerScreenOrientation, cfg DisplayServer_screen_set_orientation_Cfg)

Sets the [param screen]'s [param orientation]. See also [method screen_get_orientation]. [b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS]. [b]Note:[/b] This method is implemented on Android and iOS. [b]Note:[/b] On iOS, this method has no effect if [member ProjectSettings.display/window/handheld/orientation] is not set to [constant SCREEN_SENSOR].

fn (DisplayServer) screen_get_orientation #

fn (s &DisplayServer) screen_get_orientation(cfg DisplayServer_screen_get_orientation_Cfg) DisplayServerScreenOrientation

Returns the [param screen]'s current orientation. See also [method screen_set_orientation]. Returns [constant SCREEN_LANDSCAPE] if [param screen] is invalid. [b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS]. [b]Note:[/b] This method is implemented on Android and iOS. On other platforms, this method always returns [constant SCREEN_LANDSCAPE].

fn (DisplayServer) screen_set_keep_on #

fn (s &DisplayServer) screen_set_keep_on(enable bool)

Sets whether the screen should never be turned off by the operating system's power-saving measures. See also [method screen_is_kept_on].

fn (DisplayServer) screen_is_kept_on #

fn (s &DisplayServer) screen_is_kept_on() bool

Returns true if the screen should never be turned off by the operating system's power-saving measures. See also [method screen_set_keep_on].

fn (DisplayServer) get_window_list #

fn (s &DisplayServer) get_window_list() PackedInt32Array

Returns the list of Godot window IDs belonging to this process. [b]Note:[/b] Native dialogs are not included in this list.

fn (DisplayServer) get_window_at_screen_position #

fn (s &DisplayServer) get_window_at_screen_position(position Vector2i) i64

Returns the ID of the window at the specified screen [param position] (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: [codeblock lang=text]* (0, 0) +-------+| |+-------------+ | || | | || | | |+-------------+ +-------+

fn (DisplayServer) window_get_native_handle #

fn (s &DisplayServer) window_get_native_handle(handle_type DisplayServerHandleType, cfg DisplayServer_window_get_native_handle_Cfg) i64

Returns internal structure pointers for use in plugins. [b]Note:[/b] This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) window_get_active_popup #

fn (s &DisplayServer) window_get_active_popup() i64

Returns ID of the active popup window, or [constant INVALID_WINDOW_ID] if there is none.

fn (DisplayServer) window_set_popup_safe_rect #

fn (s &DisplayServer) window_set_popup_safe_rect(window i64, rect Rect2i)

Sets the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. Clicking this area will not auto-close this popup.

fn (DisplayServer) window_get_popup_safe_rect #

fn (s &DisplayServer) window_get_popup_safe_rect(window i64) Rect2i

Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.

fn (DisplayServer) window_set_title #

fn (s &DisplayServer) window_set_title(title string, cfg DisplayServer_window_set_title_Cfg)

Sets the title of the given window to [param title]. [b]Note:[/b] It's recommended to change this value using [member Window.title] instead. [b]Note:[/b] Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most.

fn (DisplayServer) window_get_title_size #

fn (s &DisplayServer) window_get_title_size(title string, cfg DisplayServer_window_get_title_size_Cfg) Vector2i

Returns the estimated window title bar size (including text and window buttons) for the window specified by [param window_id] (in pixels). This method does not change the window title. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (DisplayServer) window_set_mouse_passthrough #

fn (s &DisplayServer) window_set_mouse_passthrough(region PackedVector2Array, cfg DisplayServer_window_set_mouse_passthrough_Cfg)

Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior). [codeblocks] [gdscript]# Set region, using Path2D node.DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points())

Set region, using Polygon2D node.

DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon)

Reset region to default.

DisplayServer.window_set_mouse_passthrough([]) [/gdscript] [csharp] // Set region, using Path2D node. DisplayServer.WindowSetMousePassthrough(GetNode("Path2D").Curve.GetBakedPoints());

// Set region, using Polygon2D node. DisplayServer.WindowSetMousePassthrough(GetNode("Polygon2D").Polygon);

// Reset region to default. DisplayServer.WindowSetMousePassthrough([]); [/csharp] [/codeblocks] [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is. [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.

fn (DisplayServer) window_get_current_screen #

fn (s &DisplayServer) window_get_current_screen(cfg DisplayServer_window_get_current_screen_Cfg) i64

Returns the screen the window specified by [param window_id] is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also [method window_set_current_screen]. Returns [constant INVALID_SCREEN] if [param window_id] is invalid. [b]Note:[/b] This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns 0.

fn (DisplayServer) window_set_current_screen #

fn (s &DisplayServer) window_set_current_screen(screen i64, cfg DisplayServer_window_set_current_screen_Cfg)

Moves the window specified by [param window_id] to the specified [param screen]. See also [method window_get_current_screen]. [b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS]. [b]Note:[/b] This method is implemented on Linux/X11, macOS, and Windows.

fn (DisplayServer) window_get_position #

fn (s &DisplayServer) window_get_position(cfg DisplayServer_window_get_position_Cfg) Vector2i

Returns the position of the client area of the given window on the screen.

fn (DisplayServer) window_get_position_with_decorations #

fn (s &DisplayServer) window_get_position_with_decorations(cfg DisplayServer_window_get_position_with_decorations_Cfg) Vector2i

Returns the position of the given window on the screen including the borders drawn by the operating system. See also [method window_get_position].

fn (DisplayServer) window_set_position #

fn (s &DisplayServer) window_set_position(position Vector2i, cfg DisplayServer_window_set_position_Cfg)

Sets the position of the given window to [param position]. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: [codeblock lang=text]* (0, 0) +-------+| |+-------------+ | || | | || | | |+-------------+ +-------+

See also [method window_get_position] and [method window_set_size].
[b]Note:[/b] It's recommended to change this value using [member Window.position] instead.
[b]Note:[/b] On Linux (Wayland): this method is a no-op.

fn (DisplayServer) window_get_size #

fn (s &DisplayServer) window_get_size(cfg DisplayServer_window_get_size_Cfg) Vector2i

Returns the size of the window specified by [param window_id] (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also [method window_get_size_with_decorations], [method window_set_size] and [method window_get_position].

fn (DisplayServer) window_set_size #

fn (s &DisplayServer) window_set_size(size Vector2i, cfg DisplayServer_window_set_size_Cfg)

Sets the size of the given window to [param size] (in pixels). See also [method window_get_size] and [method window_get_position]. [b]Note:[/b] It's recommended to change this value using [member Window.size] instead.

fn (DisplayServer) window_set_rect_changed_callback #

fn (s &DisplayServer) window_set_rect_changed_callback(callback Callable, cfg DisplayServer_window_set_rect_changed_callback_Cfg)

Sets the [param callback] that will be called when the window specified by [param window_id] is moved or resized. [b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.

fn (DisplayServer) window_set_window_event_callback #

fn (s &DisplayServer) window_set_window_event_callback(callback Callable, cfg DisplayServer_window_set_window_event_callback_Cfg)

Sets the [param callback] that will be called when an event occurs in the window specified by [param window_id]. [b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.

fn (DisplayServer) window_set_input_event_callback #

fn (s &DisplayServer) window_set_input_event_callback(callback Callable, cfg DisplayServer_window_set_input_event_callback_Cfg)

Sets the [param callback] that should be called when any [InputEvent] is sent to the window specified by [param window_id]. [b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.

fn (DisplayServer) window_set_input_text_callback #

fn (s &DisplayServer) window_set_input_text_callback(callback Callable, cfg DisplayServer_window_set_input_text_callback_Cfg)

Sets the [param callback] that should be called when text is entered using the virtual keyboard to the window specified by [param window_id]. [b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.

fn (DisplayServer) window_set_drop_files_callback #

fn (s &DisplayServer) window_set_drop_files_callback(callback Callable, cfg DisplayServer_window_set_drop_files_callback_Cfg)

Sets the [param callback] that should be called when files are dropped from the operating system's file manager to the window specified by [param window_id]. [param callback] should take one [PackedStringArray] argument, which is the list of dropped files. [b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs. [b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web.

fn (DisplayServer) window_get_attached_instance_id #

fn (s &DisplayServer) window_get_attached_instance_id(cfg DisplayServer_window_get_attached_instance_id_Cfg) i64

Returns the [method Object.get_instance_id] of the [Window] the [param window_id] is attached to.

fn (DisplayServer) window_get_max_size #

fn (s &DisplayServer) window_get_max_size(cfg DisplayServer_window_get_max_size_Cfg) Vector2i

Returns the window's maximum size (in pixels). See also [method window_set_max_size].

fn (DisplayServer) window_set_max_size #

fn (s &DisplayServer) window_set_max_size(max_size Vector2i, cfg DisplayServer_window_set_max_size_Cfg)

Sets the maximum size of the window specified by [param window_id] in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also [method window_get_max_size]. [b]Note:[/b] It's recommended to change this value using [member Window.max_size] instead. [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.

fn (DisplayServer) window_get_min_size #

fn (s &DisplayServer) window_get_min_size(cfg DisplayServer_window_get_min_size_Cfg) Vector2i

Returns the window's minimum size (in pixels). See also [method window_set_min_size].

fn (DisplayServer) window_set_min_size #

fn (s &DisplayServer) window_set_min_size(min_size Vector2i, cfg DisplayServer_window_set_min_size_Cfg)

Sets the minimum size for the given window to [param min_size] in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also [method window_get_min_size]. [b]Note:[/b] It's recommended to change this value using [member Window.min_size] instead. [b]Note:[/b] By default, the main window has a minimum size of Vector2i(64, 64). This prevents issues that can arise when the window is resized to a near-zero size. [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.

fn (DisplayServer) window_get_size_with_decorations #

fn (s &DisplayServer) window_get_size_with_decorations(cfg DisplayServer_window_get_size_with_decorations_Cfg) Vector2i

Returns the size of the window specified by [param window_id] (in pixels), including the borders drawn by the operating system. See also [method window_get_size].

fn (DisplayServer) window_get_mode #

fn (s &DisplayServer) window_get_mode(cfg DisplayServer_window_get_mode_Cfg) DisplayServerWindowMode

Returns the mode of the given window.

fn (DisplayServer) window_set_mode #

fn (s &DisplayServer) window_set_mode(mode DisplayServerWindowMode, cfg DisplayServer_window_set_mode_Cfg)

Sets window mode for the given window to [param mode]. [b]Note:[/b] On Android, setting it to [constant WINDOW_MODE_FULLSCREEN] or [constant WINDOW_MODE_EXCLUSIVE_FULLSCREEN] will enable immersive mode. [b]Note:[/b] Setting the window to full screen forcibly sets the borderless flag to true, so make sure to set it back to false when not wanted.

fn (DisplayServer) window_set_flag #

fn (s &DisplayServer) window_set_flag(flag DisplayServerWindowFlags, enabled bool, cfg DisplayServer_window_set_flag_Cfg)

Enables or disables the given window's given [param flag].

fn (DisplayServer) window_get_flag #

fn (s &DisplayServer) window_get_flag(flag DisplayServerWindowFlags, cfg DisplayServer_window_get_flag_Cfg) bool

Returns the current value of the given window's [param flag].

fn (DisplayServer) window_set_window_buttons_offset #

fn (s &DisplayServer) window_set_window_buttons_offset(offset Vector2i, cfg DisplayServer_window_set_window_buttons_offset_Cfg)

When [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set, set offset to the center of the first titlebar button. [b]Note:[/b] This flag is implemented only on macOS.

fn (DisplayServer) window_get_safe_title_margins #

fn (s &DisplayServer) window_get_safe_title_margins(cfg DisplayServer_window_get_safe_title_margins_Cfg) Vector3i

Returns left margins (x), right margins (y) and height (z) of the title that are safe to use (contains no buttons or other elements) when [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set.

fn (DisplayServer) window_request_attention #

fn (s &DisplayServer) window_request_attention(cfg DisplayServer_window_request_attention_Cfg)

Makes the window specified by [param window_id] request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system.

fn (DisplayServer) window_move_to_foreground #

fn (s &DisplayServer) window_move_to_foreground(cfg DisplayServer_window_move_to_foreground_Cfg)

Moves the window specified by [param window_id] to the foreground, so that it is visible over other windows.

fn (DisplayServer) window_is_focused #

fn (s &DisplayServer) window_is_focused(cfg DisplayServer_window_is_focused_Cfg) bool

Returns true if the window specified by [param window_id] is focused.

fn (DisplayServer) window_can_draw #

fn (s &DisplayServer) window_can_draw(cfg DisplayServer_window_can_draw_Cfg) bool

Returns true if anything can be drawn in the window specified by [param window_id], false otherwise. Using the --disable-render-loop command line argument or a headless build will return false.

fn (DisplayServer) window_set_transient #

fn (s &DisplayServer) window_set_transient(window_id i64, parent_window_id i64)

Sets window transient parent. Transient window will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. [b]Note:[/b] It's recommended to change this value using [member Window.transient] instead. [b]Note:[/b] The behavior might be different depending on the platform.

fn (DisplayServer) window_set_exclusive #

fn (s &DisplayServer) window_set_exclusive(window_id i64, exclusive bool)

If set to true, this window will always stay on top of its parent window, parent window will ignore input while this window is opened. [b]Note:[/b] On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (DisplayServer) window_set_ime_active #

fn (s &DisplayServer) window_set_ime_active(active bool, cfg DisplayServer_window_set_ime_active_Cfg)

Sets whether [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] should be enabled for the window specified by [param window_id]. See also [method window_set_ime_position].

fn (DisplayServer) window_set_ime_position #

fn (s &DisplayServer) window_set_ime_position(position Vector2i, cfg DisplayServer_window_set_ime_position_Cfg)

Sets the position of the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] popup for the specified [param window_id]. Only effective if [method window_set_ime_active] was set to true for the specified [param window_id].

fn (DisplayServer) window_set_vsync_mode #

fn (s &DisplayServer) window_set_vsync_mode(vsync_mode DisplayServerVSyncMode, cfg DisplayServer_window_set_vsync_mode_Cfg)

Sets the V-Sync mode of the given window. See also [member ProjectSettings.display/window/vsync/vsync_mode]. Depending on the platform and used renderer, the engine will fall back to [constant VSYNC_ENABLED] if the desired mode is not supported. [b]Note:[/b] V-Sync modes other than [constant VSYNC_ENABLED] are only supported in the Forward+ and Mobile rendering methods, not Compatibility.

fn (DisplayServer) window_get_vsync_mode #

fn (s &DisplayServer) window_get_vsync_mode(cfg DisplayServer_window_get_vsync_mode_Cfg) DisplayServerVSyncMode

Returns the V-Sync mode of the given window.

fn (DisplayServer) window_is_maximize_allowed #

fn (s &DisplayServer) window_is_maximize_allowed(cfg DisplayServer_window_is_maximize_allowed_Cfg) bool

Returns true if the given window can be maximized (the maximize button is enabled).

fn (DisplayServer) window_maximize_on_title_dbl_click #

fn (s &DisplayServer) window_maximize_on_title_dbl_click() bool

Returns true, if double-click on a window title should maximize it. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) window_minimize_on_title_dbl_click #

fn (s &DisplayServer) window_minimize_on_title_dbl_click() bool

Returns true, if double-click on a window title should minimize it. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) window_start_drag #

fn (s &DisplayServer) window_start_drag(cfg DisplayServer_window_start_drag_Cfg)

Starts an interactive drag operation on the window with the given [param window_id], using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's title bar. Using this method allows the window to participate in space switching, tiling, and other system features. [b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) window_start_resize #

fn (s &DisplayServer) window_start_resize(edge DisplayServerWindowResizeEdge, cfg DisplayServer_window_start_resize_Cfg)

Starts an interactive resize operation on the window with the given [param window_id], using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's edge. [b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) accessibility_should_increase_contrast #

fn (s &DisplayServer) accessibility_should_increase_contrast() i64

Returns 1 if a high-contrast user interface theme should be used, 0 otherwise. Returns -1 if status is unknown. [b]Note:[/b] This method is implemented on Linux (X11/Wayland, GNOME), macOS, and Windows.

fn (DisplayServer) accessibility_should_reduce_animation #

fn (s &DisplayServer) accessibility_should_reduce_animation() i64

Returns 1 if flashing, blinking, and other moving content that can cause seizures in users with photosensitive epilepsy should be disabled, 0 otherwise. Returns -1 if status is unknown. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (DisplayServer) accessibility_should_reduce_transparency #

fn (s &DisplayServer) accessibility_should_reduce_transparency() i64

Returns 1 if background images, transparency, and other features that can reduce the contrast between the foreground and background should be disabled, 0 otherwise. Returns -1 if status is unknown. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (DisplayServer) accessibility_screen_reader_active #

fn (s &DisplayServer) accessibility_screen_reader_active() i64

Returns 1 if a screen reader, Braille display or other assistive app is active, 0 otherwise. Returns -1 if status is unknown. [b]Note:[/b] This method is implemented on Linux, macOS, and Windows. [b]Note:[/b] Accessibility debugging tools, such as Accessibility Insights for Windows, macOS Accessibility Inspector, or AT-SPI Browser do not count as assistive apps and will not affect this value. To test your app with these tools, set [member ProjectSettings.accessibility/general/accessibility_support] to 1.

fn (DisplayServer) accessibility_create_element #

fn (s &DisplayServer) accessibility_create_element(window_id i64, role DisplayServerAccessibilityRole) RID

Creates a new, empty accessibility element resource. [b]Note:[/b] An accessibility element is created and freed automatically for each [Node]. In general, this function should not be called manually.

fn (DisplayServer) accessibility_create_sub_element #

fn (s &DisplayServer) accessibility_create_sub_element(parent_rid RID, role DisplayServerAccessibilityRole, cfg DisplayServer_accessibility_create_sub_element_Cfg) RID

Creates a new, empty accessibility sub-element resource. Sub-elements can be used to provide accessibility information for objects which are not [Node]s, such as list items, table cells, or menu items. Sub-elements are freed automatically when the parent element is freed, or can be freed early using the [method accessibility_free_element] method.

fn (DisplayServer) accessibility_create_sub_text_edit_elements #

fn (s &DisplayServer) accessibility_create_sub_text_edit_elements(parent_rid RID, shaped_text RID, min_height f64, cfg DisplayServer_accessibility_create_sub_text_edit_elements_Cfg) RID

Creates a new, empty accessibility sub-element from the shaped text buffer. Sub-elements are freed automatically when the parent element is freed, or can be freed early using the [method accessibility_free_element] method.

fn (DisplayServer) accessibility_has_element #

fn (s &DisplayServer) accessibility_has_element(id RID) bool

Returns true if [param id] is a valid accessibility element.

fn (DisplayServer) accessibility_free_element #

fn (s &DisplayServer) accessibility_free_element(id RID)

Frees an object created by [method accessibility_create_element], [method accessibility_create_sub_element], or [method accessibility_create_sub_text_edit_elements].

fn (DisplayServer) accessibility_element_set_meta #

fn (s &DisplayServer) accessibility_element_set_meta(id RID, meta_ ToVariant)

Sets the metadata of the accessibility element.

fn (DisplayServer) accessibility_element_get_meta #

fn (s &DisplayServer) accessibility_element_get_meta(id RID) Variant

Returns the metadata of the accessibility element.

fn (DisplayServer) accessibility_set_window_rect #

fn (s &DisplayServer) accessibility_set_window_rect(window_id i64, rect_out Rect2, rect_in Rect2)

Sets window outer (with decorations) and inner (without decorations) bounds for assistive apps. [b]Note:[/b] This method is implemented on Linux, macOS, and Windows. [b]Note:[/b] Advanced users only! [Window] objects call this method automatically.

fn (DisplayServer) accessibility_set_window_focused #

fn (s &DisplayServer) accessibility_set_window_focused(window_id i64, focused bool)

Sets the window focused state for assistive apps. [b]Note:[/b] This method is implemented on Linux, macOS, and Windows. [b]Note:[/b] Advanced users only! [Window] objects call this method automatically.

fn (DisplayServer) accessibility_update_set_focus #

fn (s &DisplayServer) accessibility_update_set_focus(id RID)

Sets currently focused element.

fn (DisplayServer) accessibility_get_window_root #

fn (s &DisplayServer) accessibility_get_window_root(window_id i64) RID

Returns the main accessibility element of the OS native window.

fn (DisplayServer) accessibility_update_set_role #

fn (s &DisplayServer) accessibility_update_set_role(id RID, role DisplayServerAccessibilityRole)

Sets element accessibility role.

fn (DisplayServer) accessibility_update_set_name #

fn (s &DisplayServer) accessibility_update_set_name(id RID, name string)

Sets element accessibility name.

fn (DisplayServer) accessibility_update_set_extra_info #

fn (s &DisplayServer) accessibility_update_set_extra_info(id RID, name string)

Sets element accessibility extra information added to the element name.

fn (DisplayServer) accessibility_update_set_description #

fn (s &DisplayServer) accessibility_update_set_description(id RID, description string)

Sets element accessibility description.

fn (DisplayServer) accessibility_update_set_value #

fn (s &DisplayServer) accessibility_update_set_value(id RID, value string)

Sets element text value.

fn (DisplayServer) accessibility_update_set_tooltip #

fn (s &DisplayServer) accessibility_update_set_tooltip(id RID, tooltip string)

Sets tooltip text.

fn (DisplayServer) accessibility_update_set_bounds #

fn (s &DisplayServer) accessibility_update_set_bounds(id RID, p_rect Rect2)

Sets element bounding box, relative to the node position.

fn (DisplayServer) accessibility_update_set_transform #

fn (s &DisplayServer) accessibility_update_set_transform(id RID, transform Transform2D)

Sets element 2D transform.

fn (DisplayServer) accessibility_update_add_child #

fn (s &DisplayServer) accessibility_update_add_child(id RID, child_id RID)

Adds a child accessibility element. [b]Note:[/b] [Node] children and sub-elements are added to the child list automatically.

fn (DisplayServer) accessibility_update_set_active_descendant #

fn (s &DisplayServer) accessibility_update_set_active_descendant(id RID, other_id RID)

Adds an element that is an active descendant of this element.

fn (DisplayServer) accessibility_update_set_next_on_line #

fn (s &DisplayServer) accessibility_update_set_next_on_line(id RID, other_id RID)

Sets next element on the line.

fn (DisplayServer) accessibility_update_set_previous_on_line #

fn (s &DisplayServer) accessibility_update_set_previous_on_line(id RID, other_id RID)

Sets previous element on the line.

fn (DisplayServer) accessibility_update_set_member_of #

fn (s &DisplayServer) accessibility_update_set_member_of(id RID, group_id RID)

Sets the element to be a member of the group.

fn (DisplayServer) accessibility_update_set_error_message #

fn (s &DisplayServer) accessibility_update_set_error_message(id RID, other_id RID)

Sets an element which contains an error message for this element.

fn (DisplayServer) accessibility_update_set_live #

fn (s &DisplayServer) accessibility_update_set_live(id RID, live DisplayServerAccessibilityLiveMode)

Sets the priority of the live region updates.

fn (DisplayServer) accessibility_update_add_action #

fn (s &DisplayServer) accessibility_update_add_action(id RID, action DisplayServerAccessibilityAction, callable Callable)

Adds a callback for the accessibility action (action which can be performed by using a special screen reader command or buttons on the Braille display), and marks this action as supported. The action callback receives one [Variant] argument, which value depends on action type.

fn (DisplayServer) accessibility_update_add_custom_action #

fn (s &DisplayServer) accessibility_update_add_custom_action(id RID, action_id i64, action_description string)

Adds support for a custom accessibility action. [param action_id] is passed as an argument to the callback of [constant ACTION_CUSTOM] action.

fn (DisplayServer) accessibility_update_set_table_row_count #

fn (s &DisplayServer) accessibility_update_set_table_row_count(id RID, count i64)

Sets number of rows in the table.

fn (DisplayServer) accessibility_update_set_table_column_count #

fn (s &DisplayServer) accessibility_update_set_table_column_count(id RID, count i64)

Sets number of columns in the table.

fn (DisplayServer) accessibility_update_set_table_row_index #

fn (s &DisplayServer) accessibility_update_set_table_row_index(id RID, index i64)

Sets position of the row in the table.

fn (DisplayServer) accessibility_update_set_table_column_index #

fn (s &DisplayServer) accessibility_update_set_table_column_index(id RID, index i64)

Sets position of the column.

fn (DisplayServer) accessibility_update_set_table_cell_position #

fn (s &DisplayServer) accessibility_update_set_table_cell_position(id RID, row_index i64, column_index i64)

Sets cell position in the table.

fn (DisplayServer) accessibility_update_set_table_cell_span #

fn (s &DisplayServer) accessibility_update_set_table_cell_span(id RID, row_span i64, column_span i64)

Sets cell row/column span.

fn (DisplayServer) accessibility_update_set_list_item_count #

fn (s &DisplayServer) accessibility_update_set_list_item_count(id RID, size i64)

Sets number of items in the list.

fn (DisplayServer) accessibility_update_set_list_item_index #

fn (s &DisplayServer) accessibility_update_set_list_item_index(id RID, index i64)

Sets the position of the element in the list.

fn (DisplayServer) accessibility_update_set_list_item_level #

fn (s &DisplayServer) accessibility_update_set_list_item_level(id RID, level i64)

Sets the hierarchical level of the element in the list.

fn (DisplayServer) accessibility_update_set_list_item_selected #

fn (s &DisplayServer) accessibility_update_set_list_item_selected(id RID, selected bool)

Sets list/tree item selected status.

fn (DisplayServer) accessibility_update_set_list_item_expanded #

fn (s &DisplayServer) accessibility_update_set_list_item_expanded(id RID, expanded bool)

Sets list/tree item expanded status.

fn (DisplayServer) accessibility_update_set_popup_type #

fn (s &DisplayServer) accessibility_update_set_popup_type(id RID, popup DisplayServerAccessibilityPopupType)

Sets popup type for popup buttons.

fn (DisplayServer) accessibility_update_set_checked #

fn (s &DisplayServer) accessibility_update_set_checked(id RID, checekd bool)

Sets element checked state.

fn (DisplayServer) accessibility_update_set_num_value #

fn (s &DisplayServer) accessibility_update_set_num_value(id RID, position f64)

Sets numeric value.

fn (DisplayServer) accessibility_update_set_num_range #

fn (s &DisplayServer) accessibility_update_set_num_range(id RID, min f64, max f64)

Sets numeric value range.

fn (DisplayServer) accessibility_update_set_num_step #

fn (s &DisplayServer) accessibility_update_set_num_step(id RID, step f64)

Sets numeric value step.

fn (DisplayServer) accessibility_update_set_num_jump #

fn (s &DisplayServer) accessibility_update_set_num_jump(id RID, jump f64)

Sets numeric value jump.

fn (DisplayServer) accessibility_update_set_scroll_x #

fn (s &DisplayServer) accessibility_update_set_scroll_x(id RID, position f64)

Sets scroll bar x position.

fn (DisplayServer) accessibility_update_set_scroll_x_range #

fn (s &DisplayServer) accessibility_update_set_scroll_x_range(id RID, min f64, max f64)

Sets scroll bar x range.

fn (DisplayServer) accessibility_update_set_scroll_y #

fn (s &DisplayServer) accessibility_update_set_scroll_y(id RID, position f64)

Sets scroll bar y position.

fn (DisplayServer) accessibility_update_set_scroll_y_range #

fn (s &DisplayServer) accessibility_update_set_scroll_y_range(id RID, min f64, max f64)

Sets scroll bar y range.

fn (DisplayServer) accessibility_update_set_text_decorations #

fn (s &DisplayServer) accessibility_update_set_text_decorations(id RID, underline bool, strikethrough bool, overline bool)

Sets text underline/overline/strikethrough.

fn (DisplayServer) accessibility_update_set_text_align #

fn (s &DisplayServer) accessibility_update_set_text_align(id RID, align HorizontalAlignment)

Sets element text alignment.

fn (DisplayServer) accessibility_update_set_text_selection #

fn (s &DisplayServer) accessibility_update_set_text_selection(id RID, text_start_id RID, start_char i64, text_end_id RID, end_char i64)

Sets text selection to the text field. [param text_start_id] and [param text_end_id] should be elements created by [method accessibility_create_sub_text_edit_elements]. Character offsets are relative to the corresponding element.

fn (DisplayServer) accessibility_update_set_flag #

fn (s &DisplayServer) accessibility_update_set_flag(id RID, flag DisplayServerAccessibilityFlags, value bool)

Sets element flag.

fn (DisplayServer) accessibility_update_set_classname #

fn (s &DisplayServer) accessibility_update_set_classname(id RID, gd_classname string)

Sets element class name.

fn (DisplayServer) accessibility_update_set_placeholder #

fn (s &DisplayServer) accessibility_update_set_placeholder(id RID, placeholder string)

Sets placeholder text.

fn (DisplayServer) accessibility_update_set_language #

fn (s &DisplayServer) accessibility_update_set_language(id RID, language string)

Sets element text language.

fn (DisplayServer) accessibility_update_set_text_orientation #

fn (s &DisplayServer) accessibility_update_set_text_orientation(id RID, vertical bool)

Sets text orientation.

fn (DisplayServer) accessibility_update_set_list_orientation #

fn (s &DisplayServer) accessibility_update_set_list_orientation(id RID, vertical bool)

Sets the orientation of the list elements.

fn (DisplayServer) accessibility_update_set_shortcut #

fn (s &DisplayServer) accessibility_update_set_shortcut(id RID, shortcut string)

Sets the list of keyboard shortcuts used by element.

fn (DisplayServer) accessibility_update_set_url #

fn (s &DisplayServer) accessibility_update_set_url(id RID, url string)

Sets link URL.

fn (DisplayServer) accessibility_update_set_role_description #

fn (s &DisplayServer) accessibility_update_set_role_description(id RID, description string)

Sets element accessibility role description text.

fn (DisplayServer) accessibility_update_set_state_description #

fn (s &DisplayServer) accessibility_update_set_state_description(id RID, description string)

Sets human-readable description of the current checked state.

fn (DisplayServer) accessibility_update_set_color_value #

fn (s &DisplayServer) accessibility_update_set_color_value(id RID, color Color)

Sets element color value.

fn (DisplayServer) accessibility_update_set_background_color #

fn (s &DisplayServer) accessibility_update_set_background_color(id RID, color Color)

Sets element background color.

fn (DisplayServer) accessibility_update_set_foreground_color #

fn (s &DisplayServer) accessibility_update_set_foreground_color(id RID, color Color)

Sets element foreground color.

fn (DisplayServer) ime_get_selection #

fn (s &DisplayServer) ime_get_selection() Vector2i

Returns the text selection in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] composition string, with the [Vector2i]'s x component being the caret position and y being the length of the selection. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) ime_get_text #

fn (s &DisplayServer) ime_get_text() string

Returns the composition string contained within the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] window. [b]Note:[/b] This method is implemented only on macOS.

fn (DisplayServer) virtual_keyboard_show #

fn (s &DisplayServer) virtual_keyboard_show(existing_text string, cfg DisplayServer_virtual_keyboard_show_Cfg)

Shows the virtual keyboard if the platform has one. [param existing_text] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). [param position] parameter is the screen space [Rect2] of the edited text. [param type] parameter allows configuring which type of virtual keyboard to show. [param max_length] limits the number of characters that can be entered if different from -1. [param cursor_start] can optionally define the current text cursor position if [param cursor_end] is not set. [param cursor_start] and [param cursor_end] can optionally define the current text selection. [b]Note:[/b] This method is implemented on Android, iOS and Web.

fn (DisplayServer) virtual_keyboard_hide #

fn (s &DisplayServer) virtual_keyboard_hide()

Hides the virtual keyboard if it is shown, does nothing otherwise.

fn (DisplayServer) virtual_keyboard_get_height #

fn (s &DisplayServer) virtual_keyboard_get_height() i64

Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.

fn (DisplayServer) has_hardware_keyboard #

fn (s &DisplayServer) has_hardware_keyboard() bool

Returns true if a hardware keyboard is connected. [b]Note:[/b] This method is implemented on Android and iOS. On other platforms, this method always returns true.

fn (DisplayServer) set_hardware_keyboard_connection_change_callback #

fn (s &DisplayServer) set_hardware_keyboard_connection_change_callback(callable Callable)

Sets the [param callable] that should be called when hardware keyboard is connected/disconnected. [param callable] should accept a single [bool] parameter indicating whether the keyboard is connected (true) or disconnected (false). [b]Note:[/b] This method is only implemented on Android.

fn (DisplayServer) cursor_set_shape #

fn (s &DisplayServer) cursor_set_shape(shape DisplayServerCursorShape)

Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also [method cursor_get_shape] and [method cursor_set_custom_image].

fn (DisplayServer) cursor_get_shape #

fn (s &DisplayServer) cursor_get_shape() DisplayServerCursorShape

Returns the default mouse cursor shape set by [method cursor_set_shape].

fn (DisplayServer) cursor_set_custom_image #

fn (s &DisplayServer) cursor_set_custom_image(cursor Resource, cfg DisplayServer_cursor_set_custom_image_Cfg)

Sets a custom mouse cursor image for the given [param shape]. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. [param cursor] can be either a [Texture2D] or an [Image], and it should not be larger than 256×256 to display correctly. Optionally, [param hotspot] can be set to offset the image's position relative to the click point. By default, [param hotspot] is set to the top-left corner of the image. See also [method cursor_set_shape].

fn (DisplayServer) get_swap_cancel_ok #

fn (s &DisplayServer) get_swap_cancel_ok() bool

Returns true if positions of [b]OK[/b] and [b]Cancel[/b] buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing [member ProjectSettings.gui/common/swap_cancel_ok]. [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show].

fn (DisplayServer) enable_for_stealing_focus #

fn (s &DisplayServer) enable_for_stealing_focus(process_id i64)

Allows the [param process_id] PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID. [b]Note:[/b] This method is implemented only on Windows.

fn (DisplayServer) dialog_show #

fn (s &DisplayServer) dialog_show(title string, description string, buttons PackedStringArray, callback Callable) GDError

Shows a text dialog which uses the operating system's native look-and-feel. [param callback] should accept a single [int] parameter which corresponds to the index of the pressed button. [b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG] feature. Supported platforms include macOS, Windows, and Android.

fn (DisplayServer) dialog_input_text #

fn (s &DisplayServer) dialog_input_text(title string, description string, existing_text string, callback Callable) GDError

Shows a text input dialog which uses the operating system's native look-and-feel. [param callback] should accept a single [String] parameter which contains the text field's contents. [b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG_INPUT] feature. Supported platforms include macOS, Windows, and Android.

fn (DisplayServer) file_dialog_show #

fn (s &DisplayServer) file_dialog_show(title string, current_directory string, filename string, show_hidden bool, mode DisplayServerFileDialogMode, filters PackedStringArray, callback Callable, cfg DisplayServer_file_dialog_show_Cfg) GDError

Displays OS native dialog for selecting files or directories in the file system. Each filter string in the [param filters] array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also [member FileDialog.filters]. Callbacks have the following arguments: status: bool, selected_paths: PackedStringArray, selected_filter_index: int. [b]On Android,[/b] the third callback argument (selected_filter_index) is always 0. [b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG_FILE] feature. Supported platforms include Linux (X11/Wayland), Windows, macOS, and Android. [b]Note:[/b] [param current_directory] might be ignored. [b]Note:[/b] Embedded file dialog and Windows file dialog support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types. [b]Note:[/b] On Android and Linux, [param show_hidden] is ignored. [b]Note:[/b] On Android and macOS, native file dialogs have no title. [b]Note:[/b] On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use [method OS.get_granted_permissions] to get a list of saved bookmarks.

fn (DisplayServer) file_dialog_with_options_show #

fn (s &DisplayServer) file_dialog_with_options_show(title string, current_directory string, root string, filename string, show_hidden bool, mode DisplayServerFileDialogMode, filters PackedStringArray, options Array, callback Callable, cfg DisplayServer_file_dialog_with_options_show_Cfg) GDError

Displays OS native dialog for selecting files or directories in the file system with additional user selectable options. Each filter string in the [param filters] array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also [member FileDialog.filters]. [param options] is array of [Dictionary]s with the following keys:- "name" - option's name [String].

  • "values" - [PackedStringArray] of values. If empty, boolean option (check box) is used.
  • "default" - default selected option index ([int]) or default boolean value ([bool]).Callbacks have the following arguments: status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary. [b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG_FILE_EXTRA] feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. [b]Note:[/b] [param current_directory] might be ignored. [b]Note:[/b] Embedded file dialog and Windows file dialog support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types. [b]Note:[/b] On Linux (X11), [param show_hidden] is ignored. [b]Note:[/b] On macOS, native file dialogs have no title. [b]Note:[/b] On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use [method OS.get_granted_permissions] to get a list of saved bookmarks.

fn (DisplayServer) beep #

fn (s &DisplayServer) beep()

Plays the beep sound from the operative system, if possible. Because it comes from the OS, the beep sound will be audible even if the application is muted. It may also be disabled for the entire OS by the user. [b]Note:[/b] This method is implemented on macOS, Linux (X11/Wayland), and Windows.

fn (DisplayServer) keyboard_get_layout_count #

fn (s &DisplayServer) keyboard_get_layout_count() i64

Returns the number of keyboard layouts. [b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.

fn (DisplayServer) keyboard_get_current_layout #

fn (s &DisplayServer) keyboard_get_current_layout() i64

Returns active keyboard layout index. [b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS, and Windows.

fn (DisplayServer) keyboard_set_current_layout #

fn (s &DisplayServer) keyboard_set_current_layout(index i64)

Sets the active keyboard layout. [b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.

fn (DisplayServer) keyboard_get_layout_language #

fn (s &DisplayServer) keyboard_get_layout_language(index i64) string

Returns the ISO-639/BCP-47 language code of the keyboard layout at position [param index]. [b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.

fn (DisplayServer) keyboard_get_layout_name #

fn (s &DisplayServer) keyboard_get_layout_name(index i64) string

Returns the localized name of the keyboard layout at position [param index]. [b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.

fn (DisplayServer) keyboard_get_keycode_from_physical #

fn (s &DisplayServer) keyboard_get_keycode_from_physical(keycode Key) Key

Converts a physical (US QWERTY) [param keycode] to one in the active keyboard layout. [b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.

fn (DisplayServer) keyboard_get_label_from_physical #

fn (s &DisplayServer) keyboard_get_label_from_physical(keycode Key) Key

Converts a physical (US QWERTY) [param keycode] to localized label printed on the key in the active keyboard layout. [b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.

fn (DisplayServer) show_emoji_and_symbol_picker #

fn (s &DisplayServer) show_emoji_and_symbol_picker()

Opens system emoji and symbol picker. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (DisplayServer) color_picker #

fn (s &DisplayServer) color_picker(callback Callable) bool

Displays OS native color picker. Callbacks have the following arguments: status: bool, color: Color. [b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_COLOR_PICKER] feature. [b]Note:[/b] This method is only implemented on Linux (X11/Wayland).

fn (DisplayServer) process_events #

fn (s &DisplayServer) process_events()

Perform window manager processing, including input flushing. See also [method force_process_and_drop_events], [method Input.flush_buffered_events] and [member Input.use_accumulated_input].

fn (DisplayServer) force_process_and_drop_events #

fn (s &DisplayServer) force_process_and_drop_events()

Forces window manager processing while ignoring all [InputEvent]s. See also [method process_events]. [b]Note:[/b] This method is implemented on Windows and macOS.

fn (DisplayServer) set_native_icon #

fn (s &DisplayServer) set_native_icon(filename string)

Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. The file at [param filename] must be in .ico format on Windows or .icns on macOS. By using specially crafted .ico or .icns icons, [method set_native_icon] allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use [method set_icon] instead. [b]Note:[/b] Requires support for [constant FEATURE_NATIVE_ICON].

fn (DisplayServer) set_icon #

fn (s &DisplayServer) set_icon(image Image)

Sets the window icon (usually displayed in the top-left corner) with an [Image]. To use icons in the operating system's native format, use [method set_native_icon] instead. [b]Note:[/b] Requires support for [constant FEATURE_ICON].

fn (DisplayServer) create_status_indicator #

fn (s &DisplayServer) create_status_indicator(icon Texture2D, tooltip string, callback Callable) i64

Creates a new application status indicator with the specified icon, tooltip, and activation callback. [param callback] should take two arguments: the pressed mouse button (one of the [enum MouseButton] constants) and the click position in screen coordinates (a [Vector2i]).

fn (DisplayServer) status_indicator_set_icon #

fn (s &DisplayServer) status_indicator_set_icon(id i64, icon Texture2D)

Sets the application status indicator icon. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (DisplayServer) status_indicator_set_tooltip #

fn (s &DisplayServer) status_indicator_set_tooltip(id i64, tooltip string)

Sets the application status indicator tooltip. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (DisplayServer) status_indicator_set_menu #

fn (s &DisplayServer) status_indicator_set_menu(id i64, menu_rid RID)

Sets the application status indicator native popup menu. [b]Note:[/b] On macOS, the menu is activated by any mouse button. Its activation callback is [i]not[/i] triggered. [b]Note:[/b] On Windows, the menu is activated by the right mouse button, selecting the status icon and pressing [kbd]Shift + F10[/kbd], or the applications key. The menu's activation callback for the other mouse buttons is still triggered. [b]Note:[/b] Native popup is only supported if [NativeMenu] supports the [constant NativeMenu.FEATURE_POPUP_MENU] feature.

fn (DisplayServer) status_indicator_set_callback #

fn (s &DisplayServer) status_indicator_set_callback(id i64, callback Callable)

Sets the application status indicator activation callback. [param callback] should take two arguments: [int] mouse button index (one of [enum MouseButton] values) and [Vector2i] click position in screen coordinates. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (DisplayServer) status_indicator_get_rect #

fn (s &DisplayServer) status_indicator_get_rect(id i64) Rect2

Returns the rectangle for the given status indicator [param id] in screen coordinates. If the status indicator is not visible, returns an empty [Rect2]. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (DisplayServer) delete_status_indicator #

fn (s &DisplayServer) delete_status_indicator(id i64)

Removes the application status indicator.

fn (DisplayServer) tablet_get_driver_count #

fn (s &DisplayServer) tablet_get_driver_count() i64

Returns the total number of available tablet drivers. [b]Note:[/b] This method is implemented only on Windows.

fn (DisplayServer) tablet_get_driver_name #

fn (s &DisplayServer) tablet_get_driver_name(idx i64) string

Returns the tablet driver name for the given index. [b]Note:[/b] This method is implemented only on Windows.

fn (DisplayServer) tablet_get_current_driver #

fn (s &DisplayServer) tablet_get_current_driver() string

Returns current active tablet driver name. [b]Note:[/b] This method is implemented only on Windows.

fn (DisplayServer) tablet_set_current_driver #

fn (s &DisplayServer) tablet_set_current_driver(name string)

Set active tablet driver name. Supported drivers:- winink: Windows Ink API, default.

  • wintab: Wacom Wintab API (compatible device driver required).
  • dummy: Dummy driver, tablet input is disabled.[b]Note:[/b] This method is implemented only on Windows.

fn (DisplayServer) is_window_transparency_available #

fn (s &DisplayServer) is_window_transparency_available() bool

Returns true if the window background can be made transparent. This method returns false if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to false, or if transparency is not supported by the renderer or OS compositor.

fn (DisplayServer) register_additional_output #

fn (s &DisplayServer) register_additional_output(object Object)

Registers an [Object] which represents an additional output that will be rendered too, beyond normal windows. The [Object] is only used as an identifier, which can be later passed to [method unregister_additional_output]. This can be used to prevent Godot from skipping rendering when no normal windows are visible.

fn (DisplayServer) unregister_additional_output #

fn (s &DisplayServer) unregister_additional_output(object Object)

Unregisters an [Object] representing an additional output, that was registered via [method register_additional_output].

fn (DisplayServer) has_additional_outputs #

fn (s &DisplayServer) has_additional_outputs() bool

Returns true if any additional outputs have been registered via [method register_additional_output].

struct DisplayServer_accessibility_create_sub_element_Cfg #

@[params]
struct DisplayServer_accessibility_create_sub_element_Cfg {
pub:
	insert_pos i64 = -1
}

Optional parameters for DisplayServer#accessibility_create_sub_element

struct DisplayServer_accessibility_create_sub_text_edit_elements_Cfg #

@[params]
struct DisplayServer_accessibility_create_sub_text_edit_elements_Cfg {
pub:
	insert_pos i64 = -1
}

Optional parameters for DisplayServer#accessibility_create_sub_text_edit_elements

struct DisplayServer_cursor_set_custom_image_Cfg #

@[params]
struct DisplayServer_cursor_set_custom_image_Cfg {
pub:
	shape   DisplayServerCursorShape = unsafe { DisplayServerCursorShape(0) }
	hotspot Vector2                  = Vector2{0, 0}
}

Optional parameters for DisplayServer#cursor_set_custom_image

struct DisplayServer_file_dialog_show_Cfg #

@[params]
struct DisplayServer_file_dialog_show_Cfg {
pub:
	parent_window_id i64
}

Optional parameters for DisplayServer#file_dialog_show

struct DisplayServer_file_dialog_with_options_show_Cfg #

@[params]
struct DisplayServer_file_dialog_with_options_show_Cfg {
pub:
	parent_window_id i64
}

Optional parameters for DisplayServer#file_dialog_with_options_show

struct DisplayServer_global_menu_add_check_item_Cfg #

@[params]
struct DisplayServer_global_menu_add_check_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for DisplayServer#global_menu_add_check_item

struct DisplayServer_global_menu_add_icon_check_item_Cfg #

@[params]
struct DisplayServer_global_menu_add_icon_check_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for DisplayServer#global_menu_add_icon_check_item

struct DisplayServer_global_menu_add_icon_item_Cfg #

@[params]
struct DisplayServer_global_menu_add_icon_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for DisplayServer#global_menu_add_icon_item

struct DisplayServer_global_menu_add_icon_radio_check_item_Cfg #

@[params]
struct DisplayServer_global_menu_add_icon_radio_check_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for DisplayServer#global_menu_add_icon_radio_check_item

struct DisplayServer_global_menu_add_item_Cfg #

@[params]
struct DisplayServer_global_menu_add_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for DisplayServer#global_menu_add_item

struct DisplayServer_global_menu_add_multistate_item_Cfg #

@[params]
struct DisplayServer_global_menu_add_multistate_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for DisplayServer#global_menu_add_multistate_item

struct DisplayServer_global_menu_add_radio_check_item_Cfg #

@[params]
struct DisplayServer_global_menu_add_radio_check_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for DisplayServer#global_menu_add_radio_check_item

struct DisplayServer_global_menu_add_separator_Cfg #

@[params]
struct DisplayServer_global_menu_add_separator_Cfg {
pub:
	index i64 = -1
}

Optional parameters for DisplayServer#global_menu_add_separator

struct DisplayServer_global_menu_add_submenu_item_Cfg #

@[params]
struct DisplayServer_global_menu_add_submenu_item_Cfg {
pub:
	index i64 = -1
}

Optional parameters for DisplayServer#global_menu_add_submenu_item

struct DisplayServer_screen_get_dpi_Cfg #

@[params]
struct DisplayServer_screen_get_dpi_Cfg {
pub:
	screen i64 = -1
}

Optional parameters for DisplayServer#screen_get_dpi

struct DisplayServer_screen_get_image_Cfg #

@[params]
struct DisplayServer_screen_get_image_Cfg {
pub:
	screen i64 = -1
}

Optional parameters for DisplayServer#screen_get_image

struct DisplayServer_screen_get_orientation_Cfg #

@[params]
struct DisplayServer_screen_get_orientation_Cfg {
pub:
	screen i64 = -1
}

Optional parameters for DisplayServer#screen_get_orientation

struct DisplayServer_screen_get_position_Cfg #

@[params]
struct DisplayServer_screen_get_position_Cfg {
pub:
	screen i64 = -1
}

Optional parameters for DisplayServer#screen_get_position

struct DisplayServer_screen_get_refresh_rate_Cfg #

@[params]
struct DisplayServer_screen_get_refresh_rate_Cfg {
pub:
	screen i64 = -1
}

Optional parameters for DisplayServer#screen_get_refresh_rate

struct DisplayServer_screen_get_scale_Cfg #

@[params]
struct DisplayServer_screen_get_scale_Cfg {
pub:
	screen i64 = -1
}

Optional parameters for DisplayServer#screen_get_scale

struct DisplayServer_screen_get_size_Cfg #

@[params]
struct DisplayServer_screen_get_size_Cfg {
pub:
	screen i64 = -1
}

Optional parameters for DisplayServer#screen_get_size

struct DisplayServer_screen_get_usable_rect_Cfg #

@[params]
struct DisplayServer_screen_get_usable_rect_Cfg {
pub:
	screen i64 = -1
}

Optional parameters for DisplayServer#screen_get_usable_rect

struct DisplayServer_screen_set_orientation_Cfg #

@[params]
struct DisplayServer_screen_set_orientation_Cfg {
pub:
	screen i64 = -1
}

Optional parameters for DisplayServer#screen_set_orientation

struct DisplayServer_tts_speak_Cfg #

@[params]
struct DisplayServer_tts_speak_Cfg {
pub:
	volume       i64 = 50
	pitch        f64 = 1.0
	rate         f64 = 1.0
	utterance_id i64
	interrupt    bool
}

Optional parameters for DisplayServer#tts_speak

struct DisplayServer_virtual_keyboard_show_Cfg #

@[params]
struct DisplayServer_virtual_keyboard_show_Cfg {
pub:
	position     Rect2 = Rect2{Vector2{0, 0}, Vector2{0, 0}}
	gd_type      DisplayServerVirtualKeyboardType = unsafe { DisplayServerVirtualKeyboardType(0) }
	max_length   i64 = -1
	cursor_start i64 = -1
	cursor_end   i64 = -1
}

Optional parameters for DisplayServer#virtual_keyboard_show

struct DisplayServer_window_can_draw_Cfg #

@[params]
struct DisplayServer_window_can_draw_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_can_draw

struct DisplayServer_window_get_attached_instance_id_Cfg #

@[params]
struct DisplayServer_window_get_attached_instance_id_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_attached_instance_id

struct DisplayServer_window_get_current_screen_Cfg #

@[params]
struct DisplayServer_window_get_current_screen_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_current_screen

struct DisplayServer_window_get_flag_Cfg #

@[params]
struct DisplayServer_window_get_flag_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_flag

struct DisplayServer_window_get_max_size_Cfg #

@[params]
struct DisplayServer_window_get_max_size_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_max_size

struct DisplayServer_window_get_min_size_Cfg #

@[params]
struct DisplayServer_window_get_min_size_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_min_size

struct DisplayServer_window_get_mode_Cfg #

@[params]
struct DisplayServer_window_get_mode_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_mode

struct DisplayServer_window_get_native_handle_Cfg #

@[params]
struct DisplayServer_window_get_native_handle_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_native_handle

struct DisplayServer_window_get_position_Cfg #

@[params]
struct DisplayServer_window_get_position_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_position

struct DisplayServer_window_get_position_with_decorations_Cfg #

@[params]
struct DisplayServer_window_get_position_with_decorations_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_position_with_decorations

struct DisplayServer_window_get_safe_title_margins_Cfg #

@[params]
struct DisplayServer_window_get_safe_title_margins_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_safe_title_margins

struct DisplayServer_window_get_size_Cfg #

@[params]
struct DisplayServer_window_get_size_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_size

struct DisplayServer_window_get_size_with_decorations_Cfg #

@[params]
struct DisplayServer_window_get_size_with_decorations_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_size_with_decorations

struct DisplayServer_window_get_title_size_Cfg #

@[params]
struct DisplayServer_window_get_title_size_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_title_size

struct DisplayServer_window_get_vsync_mode_Cfg #

@[params]
struct DisplayServer_window_get_vsync_mode_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_get_vsync_mode

struct DisplayServer_window_is_focused_Cfg #

@[params]
struct DisplayServer_window_is_focused_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_is_focused

struct DisplayServer_window_is_maximize_allowed_Cfg #

@[params]
struct DisplayServer_window_is_maximize_allowed_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_is_maximize_allowed

struct DisplayServer_window_move_to_foreground_Cfg #

@[params]
struct DisplayServer_window_move_to_foreground_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_move_to_foreground

struct DisplayServer_window_request_attention_Cfg #

@[params]
struct DisplayServer_window_request_attention_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_request_attention

struct DisplayServer_window_set_current_screen_Cfg #

@[params]
struct DisplayServer_window_set_current_screen_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_current_screen

struct DisplayServer_window_set_drop_files_callback_Cfg #

@[params]
struct DisplayServer_window_set_drop_files_callback_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_drop_files_callback

struct DisplayServer_window_set_flag_Cfg #

@[params]
struct DisplayServer_window_set_flag_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_flag

struct DisplayServer_window_set_ime_active_Cfg #

@[params]
struct DisplayServer_window_set_ime_active_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_ime_active

struct DisplayServer_window_set_ime_position_Cfg #

@[params]
struct DisplayServer_window_set_ime_position_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_ime_position

struct DisplayServer_window_set_input_event_callback_Cfg #

@[params]
struct DisplayServer_window_set_input_event_callback_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_input_event_callback

struct DisplayServer_window_set_input_text_callback_Cfg #

@[params]
struct DisplayServer_window_set_input_text_callback_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_input_text_callback

struct DisplayServer_window_set_max_size_Cfg #

@[params]
struct DisplayServer_window_set_max_size_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_max_size

struct DisplayServer_window_set_min_size_Cfg #

@[params]
struct DisplayServer_window_set_min_size_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_min_size

struct DisplayServer_window_set_mode_Cfg #

@[params]
struct DisplayServer_window_set_mode_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_mode

struct DisplayServer_window_set_mouse_passthrough_Cfg #

@[params]
struct DisplayServer_window_set_mouse_passthrough_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_mouse_passthrough

struct DisplayServer_window_set_position_Cfg #

@[params]
struct DisplayServer_window_set_position_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_position

struct DisplayServer_window_set_rect_changed_callback_Cfg #

@[params]
struct DisplayServer_window_set_rect_changed_callback_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_rect_changed_callback

struct DisplayServer_window_set_size_Cfg #

@[params]
struct DisplayServer_window_set_size_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_size

struct DisplayServer_window_set_title_Cfg #

@[params]
struct DisplayServer_window_set_title_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_title

struct DisplayServer_window_set_vsync_mode_Cfg #

@[params]
struct DisplayServer_window_set_vsync_mode_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_vsync_mode

struct DisplayServer_window_set_window_buttons_offset_Cfg #

@[params]
struct DisplayServer_window_set_window_buttons_offset_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_window_buttons_offset

struct DisplayServer_window_set_window_event_callback_Cfg #

@[params]
struct DisplayServer_window_set_window_event_callback_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_set_window_event_callback

struct DisplayServer_window_start_drag_Cfg #

@[params]
struct DisplayServer_window_start_drag_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_start_drag

struct DisplayServer_window_start_resize_Cfg #

@[params]
struct DisplayServer_window_start_resize_Cfg {
pub:
	window_id i64
}

Optional parameters for DisplayServer#window_start_resize

struct ENetConnection #

struct ENetConnection {
	RefCounted
}

A wrapper class for an [url=http://enet.bespin.org/group__host.html]ENetHost[/url].

fn (ENetConnection) to_variant #

fn (s &ENetConnection) to_variant() Variant

fn (ENetConnection) from_variant #

fn (mut s ENetConnection) from_variant(variant &Variant)

fn (ENetConnection) create_host_bound #

fn (s &ENetConnection) create_host_bound(bind_address string, bind_port i64, cfg ENetConnection_create_host_bound_Cfg) GDError

Creates an ENetHost bound to the given [param bind_address] and [param bind_port] that allows up to [param max_peers] connected peers, each allocating up to [param max_channels] channels, optionally limiting bandwidth to [param in_bandwidth] and [param out_bandwidth] (if greater than zero). [b]Note:[/b] It is necessary to create a host in both client and server in order to establish a connection.

fn (ENetConnection) create_host #

fn (s &ENetConnection) create_host(cfg ENetConnection_create_host_Cfg) GDError

Creates an ENetHost that allows up to [param max_peers] connected peers, each allocating up to [param max_channels] channels, optionally limiting bandwidth to [param in_bandwidth] and [param out_bandwidth] (if greater than zero). This method binds a random available dynamic UDP port on the host machine at the [i]unspecified[/i] address. Use [method create_host_bound] to specify the address and port. [b]Note:[/b] It is necessary to create a host in both client and server in order to establish a connection.

fn (ENetConnection) destroy #

fn (s &ENetConnection) destroy()

Destroys the host and all resources associated with it.

fn (ENetConnection) connect_to_host #

fn (s &ENetConnection) connect_to_host(address string, port i64, cfg ENetConnection_connect_to_host_Cfg) ENetPacketPeer

Initiates a connection to a foreign [param address] using the specified [param port] and allocating the requested [param channels]. Optional [param data] can be passed during connection in the form of a 32 bit integer. [b]Note:[/b] You must call either [method create_host] or [method create_host_bound] on both ends before calling this method.

fn (ENetConnection) service #

fn (s &ENetConnection) service(cfg ENetConnection_service_Cfg) Array

Waits for events on this connection and shuttles packets between the host and its peers, with the given [param timeout] (in milliseconds). The returned [Array] will have 4 elements. An [enum EventType], the [ENetPacketPeer] which generated the event, the event associated data (if any), the event associated channel (if any). If the generated event is [constant EVENT_RECEIVE], the received packet will be queued to the associated [ENetPacketPeer]. Call this function regularly to handle connections, disconnections, and to receive new packets. [b]Note:[/b] This method must be called on both ends involved in the event (sending and receiving hosts).

fn (ENetConnection) flush #

fn (s &ENetConnection) flush()

Sends any queued packets on the host specified to its designated peers.

fn (ENetConnection) bandwidth_limit #

fn (s &ENetConnection) bandwidth_limit(cfg ENetConnection_bandwidth_limit_Cfg)

Adjusts the bandwidth limits of a host.

fn (ENetConnection) channel_limit #

fn (s &ENetConnection) channel_limit(limit i64)

Limits the maximum allowed channels of future incoming connections.

fn (ENetConnection) broadcast #

fn (s &ENetConnection) broadcast(channel i64, packet PackedByteArray, flags i64)

Queues a [param packet] to be sent to all peers associated with the host over the specified [param channel]. See [ENetPacketPeer] FLAG_* constants for available packet flags.

fn (ENetConnection) compress #

fn (s &ENetConnection) compress(mode ENetConnectionCompressionMode)

Sets the compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. [b]Note:[/b] Most games' network design involve sending many small packets frequently (smaller than 4 KB each). If in doubt, it is recommended to keep the default compression algorithm as it works best on these small packets. [b]Note:[/b] The compression mode must be set to the same value on both the server and all its clients. Clients will fail to connect if the compression mode set on the client differs from the one set on the server.

fn (ENetConnection) dtls_server_setup #

fn (s &ENetConnection) dtls_server_setup(server_options TLSOptions) GDError

Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after [method create_host_bound] to have ENet expect peers to connect using DTLS. See [method TLSOptions.server].

fn (ENetConnection) dtls_client_setup #

fn (s &ENetConnection) dtls_client_setup(hostname string, cfg ENetConnection_dtls_client_setup_Cfg) GDError

Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before [method connect_to_host] to have ENet connect using DTLS validating the server certificate against [param hostname]. You can pass the optional [param client_options] parameter to customize the trusted certification authorities, or disable the common name verification. See [method TLSOptions.client] and [method TLSOptions.client_unsafe].

fn (ENetConnection) refuse_new_connections #

fn (s &ENetConnection) refuse_new_connections(refuse bool)

Configures the DTLS server to automatically drop new connections. [b]Note:[/b] This method is only relevant after calling [method dtls_server_setup].

fn (ENetConnection) pop_statistic #

fn (s &ENetConnection) pop_statistic(statistic ENetConnectionHostStatistic) f64

Returns and resets host statistics.

fn (ENetConnection) get_max_channels #

fn (s &ENetConnection) get_max_channels() i64

Returns the maximum number of channels allowed for connected peers.

fn (ENetConnection) get_local_port #

fn (s &ENetConnection) get_local_port() i64

Returns the local port to which this peer is bound.

fn (ENetConnection) get_peers #

fn (s &ENetConnection) get_peers() Array

Returns the list of peers associated with this host. [b]Note:[/b] This list might include some peers that are not fully connected or are still being disconnected.

fn (ENetConnection) socket_send #

fn (s &ENetConnection) socket_send(destination_address string, destination_port i64, packet PackedByteArray)

Sends a [param packet] toward a destination from the address and port currently bound by this ENetConnection instance. This is useful as it serves to establish entries in NAT routing tables on all devices between this bound instance and the public facing internet, allowing a prospective client's connection packets to be routed backward through the NAT device(s) between the public internet and this host. This requires forward knowledge of a prospective client's address and communication port as seen by the public internet - after any NAT devices have handled their connection request. This information can be obtained by a [url=https://en.wikipedia.org/wiki/STUN]STUN[/url] service, and must be handed off to your host by an entity that is not the prospective client. This will never work for a client behind a Symmetric NAT due to the nature of the Symmetric NAT routing algorithm, as their IP and Port cannot be known beforehand.

struct ENetConnection_bandwidth_limit_Cfg #

@[params]
struct ENetConnection_bandwidth_limit_Cfg {
pub:
	in_bandwidth  i64
	out_bandwidth i64
}

Optional parameters for ENetConnection#bandwidth_limit

struct ENetConnection_connect_to_host_Cfg #

@[params]
struct ENetConnection_connect_to_host_Cfg {
pub:
	channels i64
	data     i64
}

Optional parameters for ENetConnection#connect_to_host

struct ENetConnection_create_host_Cfg #

@[params]
struct ENetConnection_create_host_Cfg {
pub:
	max_peers     i64 = 32
	max_channels  i64
	in_bandwidth  i64
	out_bandwidth i64
}

Optional parameters for ENetConnection#create_host

struct ENetConnection_create_host_bound_Cfg #

@[params]
struct ENetConnection_create_host_bound_Cfg {
pub:
	max_peers     i64 = 32
	max_channels  i64
	in_bandwidth  i64
	out_bandwidth i64
}

Optional parameters for ENetConnection#create_host_bound

struct ENetConnection_dtls_client_setup_Cfg #

@[params]
struct ENetConnection_dtls_client_setup_Cfg {
pub:
	client_options TLSOptions
}

Optional parameters for ENetConnection#dtls_client_setup

struct ENetConnection_service_Cfg #

@[params]
struct ENetConnection_service_Cfg {
pub:
	timeout i64
}

Optional parameters for ENetConnection#service

struct ENetMultiplayerPeer #

struct ENetMultiplayerPeer {
	MultiplayerPeer
}

A MultiplayerPeer implementation using the [url=http://enet.bespin.org/index.html]ENet[/url] library.

fn (ENetMultiplayerPeer) to_variant #

fn (s &ENetMultiplayerPeer) to_variant() Variant

fn (ENetMultiplayerPeer) from_variant #

fn (mut s ENetMultiplayerPeer) from_variant(variant &Variant)

fn (ENetMultiplayerPeer) create_server #

fn (s &ENetMultiplayerPeer) create_server(port i64, cfg ENetMultiplayerPeer_create_server_Cfg) GDError

Create server that listens to connections via [param port]. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use [method set_bind_ip]. The default IP is the wildcard "*", which listens on all available interfaces. [param max_clients] is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see [method create_client]. Returns [constant OK] if a server was created, [constant ERR_ALREADY_IN_USE] if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call [method MultiplayerPeer.close] first) or [constant ERR_CANT_CREATE] if the server could not be created.

fn (ENetMultiplayerPeer) create_client #

fn (s &ENetMultiplayerPeer) create_client(address string, port i64, cfg ENetMultiplayerPeer_create_client_Cfg) GDError

Create client that connects to a server at [param address] using specified [param port]. The given address needs to be either a fully qualified domain name (e.g. "www.example.com") or an IP address in IPv4 or IPv6 format (e.g. "192.168.1.1"). The [param port] is the port the server is listening on. The [param channel_count] parameter can be used to specify the number of ENet channels allocated for the connection. The [param in_bandwidth] and [param out_bandwidth] parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns [constant OK] if a client was created, [constant ERR_ALREADY_IN_USE] if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call [method MultiplayerPeer.close] first) or [constant ERR_CANT_CREATE] if the client could not be created. If [param local_port] is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques.

fn (ENetMultiplayerPeer) create_mesh #

fn (s &ENetMultiplayerPeer) create_mesh(unique_id i64) GDError

Initialize this [MultiplayerPeer] in mesh mode. The provided [param unique_id] will be used as the local peer network unique ID once assigned as the [member MultiplayerAPI.multiplayer_peer]. In the mesh configuration you will need to set up each new peer manually using [ENetConnection] before calling [method add_mesh_peer]. While this technique is more advanced, it allows for better control over the connection process (e.g. when dealing with NAT punch-through) and for better distribution of the network load (which would otherwise be more taxing on the server).

fn (ENetMultiplayerPeer) add_mesh_peer #

fn (s &ENetMultiplayerPeer) add_mesh_peer(peer_id i64, host ENetConnection) GDError

Add a new remote peer with the given [param peer_id] connected to the given [param host]. [b]Note:[/b] The [param host] must have exactly one peer in the [constant ENetPacketPeer.STATE_CONNECTED] state.

fn (ENetMultiplayerPeer) set_bind_ip #

fn (s &ENetMultiplayerPeer) set_bind_ip(ip string)

The IP used when creating a server. This is set to the wildcard "*" by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: "192.168.1.1".

fn (ENetMultiplayerPeer) get_host #

fn (s &ENetMultiplayerPeer) get_host() ENetConnection

fn (ENetMultiplayerPeer) get_peer #

fn (s &ENetMultiplayerPeer) get_peer(id i64) ENetPacketPeer

Returns the [ENetPacketPeer] associated to the given [param id].

struct ENetMultiplayerPeer_create_client_Cfg #

@[params]
struct ENetMultiplayerPeer_create_client_Cfg {
pub:
	channel_count i64
	in_bandwidth  i64
	out_bandwidth i64
	local_port    i64
}

Optional parameters for ENetMultiplayerPeer#create_client

struct ENetMultiplayerPeer_create_server_Cfg #

@[params]
struct ENetMultiplayerPeer_create_server_Cfg {
pub:
	max_clients   i64 = 32
	max_channels  i64
	in_bandwidth  i64
	out_bandwidth i64
}

Optional parameters for ENetMultiplayerPeer#create_server

struct ENetPacketPeer #

struct ENetPacketPeer {
	PacketPeer
}

A wrapper class for an [url=http://enet.bespin.org/group__peer.html]ENetPeer[/url].

fn (ENetPacketPeer) to_variant #

fn (s &ENetPacketPeer) to_variant() Variant

fn (ENetPacketPeer) from_variant #

fn (mut s ENetPacketPeer) from_variant(variant &Variant)

fn (ENetPacketPeer) peer_disconnect #

fn (s &ENetPacketPeer) peer_disconnect(cfg ENetPacketPeer_peer_disconnect_Cfg)

Request a disconnection from a peer. An [constant ENetConnection.EVENT_DISCONNECT] will be generated during [method ENetConnection.service] once the disconnection is complete.

fn (ENetPacketPeer) peer_disconnect_later #

fn (s &ENetPacketPeer) peer_disconnect_later(cfg ENetPacketPeer_peer_disconnect_later_Cfg)

Request a disconnection from a peer, but only after all queued outgoing packets are sent. An [constant ENetConnection.EVENT_DISCONNECT] will be generated during [method ENetConnection.service] once the disconnection is complete.

fn (ENetPacketPeer) peer_disconnect_now #

fn (s &ENetPacketPeer) peer_disconnect_now(cfg ENetPacketPeer_peer_disconnect_now_Cfg)

Force an immediate disconnection from a peer. No [constant ENetConnection.EVENT_DISCONNECT] will be generated. The foreign peer is not guaranteed to receive the disconnect notification, and is reset immediately upon return from this function.

fn (ENetPacketPeer) ping #

fn (s &ENetPacketPeer) ping()

Sends a ping request to a peer. ENet automatically pings all connected peers at regular intervals, however, this function may be called to ensure more frequent ping requests.

fn (ENetPacketPeer) ping_interval #

fn (s &ENetPacketPeer) ping_interval(ping_interval i64)

Sets the [param ping_interval] in milliseconds at which pings will be sent to a peer. Pings are used both to monitor the liveness of the connection and also to dynamically adjust the throttle during periods of low traffic so that the throttle has reasonable responsiveness during traffic spikes. The default ping interval is 500 milliseconds.

fn (ENetPacketPeer) reset #

fn (s &ENetPacketPeer) reset()

Forcefully disconnects a peer. The foreign host represented by the peer is not notified of the disconnection and will timeout on its connection to the local host.

fn (ENetPacketPeer) send #

fn (s &ENetPacketPeer) send(channel i64, packet PackedByteArray, flags i64) GDError

Queues a [param packet] to be sent over the specified [param channel]. See FLAG_* constants for available packet flags.

fn (ENetPacketPeer) throttle_configure #

fn (s &ENetPacketPeer) throttle_configure(interval i64, acceleration i64, deceleration i64)

Configures throttle parameter for a peer. Unreliable packets are dropped by ENet in response to the varying conditions of the Internet connection to the peer. The throttle represents a probability that an unreliable packet should not be dropped and thus sent by ENet to the peer. By measuring fluctuations in round trip times of reliable packets over the specified [param interval], ENet will either increase the probability by the amount specified in the [param acceleration] parameter, or decrease it by the amount specified in the [param deceleration] parameter (both are ratios to [constant PACKET_THROTTLE_SCALE]). When the throttle has a value of [constant PACKET_THROTTLE_SCALE], no unreliable packets are dropped by ENet, and so 100% of all unreliable packets will be sent. When the throttle has a value of 0, all unreliable packets are dropped by ENet, and so 0% of all unreliable packets will be sent. Intermediate values for the throttle represent intermediate probabilities between 0% and 100% of unreliable packets being sent. The bandwidth limits of the local and foreign hosts are taken into account to determine a sensible limit for the throttle probability above which it should not raise even in the best of conditions.

fn (ENetPacketPeer) set_timeout #

fn (s &ENetPacketPeer) set_timeout(timeout i64, timeout_min i64, timeout_max i64)

Sets the timeout parameters for a peer. The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds. The [param timeout] is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached [param timeout_min]. The [param timeout_max] parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped.

fn (ENetPacketPeer) get_packet_flags #

fn (s &ENetPacketPeer) get_packet_flags() i64

Returns the ENet flags of the next packet in the received queue. See FLAG_* constants for available packet flags. Note that not all flags are replicated from the sending peer to the receiving peer.

fn (ENetPacketPeer) get_remote_address #

fn (s &ENetPacketPeer) get_remote_address() string

Returns the IP address of this peer.

fn (ENetPacketPeer) get_remote_port #

fn (s &ENetPacketPeer) get_remote_port() i64

Returns the remote port of this peer.

fn (ENetPacketPeer) get_statistic #

fn (s &ENetPacketPeer) get_statistic(statistic ENetPacketPeerPeerStatistic) f64

Returns the requested [param statistic] for this peer.

fn (ENetPacketPeer) get_state #

fn (s &ENetPacketPeer) get_state() ENetPacketPeerPeerState

Returns the current peer state.

fn (ENetPacketPeer) get_channels #

fn (s &ENetPacketPeer) get_channels() i64

Returns the number of channels allocated for communication with peer.

fn (ENetPacketPeer) is_active #

fn (s &ENetPacketPeer) is_active() bool

Returns true if the peer is currently active (i.e. the associated [ENetConnection] is still valid).

struct ENetPacketPeer_peer_disconnect_Cfg #

@[params]
struct ENetPacketPeer_peer_disconnect_Cfg {
pub:
	data i64
}

Optional parameters for ENetPacketPeer#peer_disconnect

struct ENetPacketPeer_peer_disconnect_later_Cfg #

@[params]
struct ENetPacketPeer_peer_disconnect_later_Cfg {
pub:
	data i64
}

Optional parameters for ENetPacketPeer#peer_disconnect_later

struct ENetPacketPeer_peer_disconnect_now_Cfg #

@[params]
struct ENetPacketPeer_peer_disconnect_now_Cfg {
pub:
	data i64
}

Optional parameters for ENetPacketPeer#peer_disconnect_now

struct EditorCommandPalette #

struct EditorCommandPalette {
	ConfirmationDialog
}

Godot editor's command palette.

fn (EditorCommandPalette) to_variant #

fn (s &EditorCommandPalette) to_variant() Variant

fn (EditorCommandPalette) from_variant #

fn (mut s EditorCommandPalette) from_variant(variant &Variant)

fn (EditorCommandPalette) add_command #

fn (s &EditorCommandPalette) add_command(command_name string, key_name string, binded_callable Callable, cfg EditorCommandPalette_add_command_Cfg)

Adds a custom command to EditorCommandPalette.- [param command_name]: [String] (Name of the [b]Command[/b]. This is displayed to the user.)

fn (EditorCommandPalette) remove_command #

fn (s &EditorCommandPalette) remove_command(key_name string)

Removes the custom command from EditorCommandPalette.- [param key_name]: [String] (Name of the key for a particular [b]Command[/b].)

struct EditorCommandPalette_add_command_Cfg #

@[params]
struct EditorCommandPalette_add_command_Cfg {
pub:
	shortcut_text string
}

Optional parameters for EditorCommandPalette#add_command

struct EditorContextMenuPlugin #

struct EditorContextMenuPlugin {
	RefCounted
}

Plugin for adding custom context menus in the editor.

fn (EditorContextMenuPlugin) to_variant #

fn (s &EditorContextMenuPlugin) to_variant() Variant

fn (EditorContextMenuPlugin) from_variant #

fn (mut s EditorContextMenuPlugin) from_variant(variant &Variant)

fn (EditorContextMenuPlugin) gd_popup_menu #

fn (s &EditorContextMenuPlugin) gd_popup_menu(paths PackedStringArray)

Called when creating a context menu, custom options can be added by using the [method add_context_menu_item] or [method add_context_menu_item_from_shortcut] functions. [param paths] contains currently selected paths (depending on menu), which can be used to conditionally add options.

fn (EditorContextMenuPlugin) add_menu_shortcut #

fn (s &EditorContextMenuPlugin) add_menu_shortcut(shortcut Shortcut, callback Callable)

Registers a shortcut associated with the plugin's context menu. This method should be called once (e.g. in plugin's [method Object._init]). [param callback] will be called when user presses the specified [param shortcut] while the menu's context is in effect (e.g. FileSystem dock is focused). Callback should take single [Array] argument; array contents depend on context menu slot.

func _init():
add_menu_shortcut(SHORTCUT, handle)

fn (EditorContextMenuPlugin) add_context_menu_item #

fn (s &EditorContextMenuPlugin) add_context_menu_item(name string, callback Callable, cfg EditorContextMenuPlugin_add_context_menu_item_Cfg)

Add custom option to the context menu of the plugin's specified slot. When the option is activated, [param callback] will be called. Callback should take single [Array] argument; array contents depend on context menu slot.

func _popup_menu(paths):
add_context_menu_item('File Custom options', handle, ICON)

If you want to assign shortcut to the menu item, use [method add_context_menu_item_from_shortcut] instead.

fn (EditorContextMenuPlugin) add_context_menu_item_from_shortcut #

fn (s &EditorContextMenuPlugin) add_context_menu_item_from_shortcut(name string, shortcut Shortcut, cfg EditorContextMenuPlugin_add_context_menu_item_from_shortcut_Cfg)

Add custom option to the context menu of the plugin's specified slot. The option will have the [param shortcut] assigned and reuse its callback. The shortcut has to be registered beforehand with [method add_menu_shortcut].

func _init():
add_menu_shortcut(SHORTCUT, handle)

func _popup_menu(paths):
add_context_menu_item_from_shortcut('File Custom options', SHORTCUT, ICON)

fn (EditorContextMenuPlugin) add_context_submenu_item #

fn (s &EditorContextMenuPlugin) add_context_submenu_item(name string, menu PopupMenu, cfg EditorContextMenuPlugin_add_context_submenu_item_Cfg)

Add a submenu to the context menu of the plugin's specified slot. The submenu is not automatically handled, you need to connect to its signals yourself. Also the submenu is freed on every popup, so provide a new [PopupMenu] every time.

func _popup_menu(paths):
var popup_menu = PopupMenu.new()
popup_menu.add_item('Blue')
popup_menu.add_item('White')
popup_menu.id_pressed.connect(_on_color_submenu_option)

add_context_submenu_item('Set Node Color', popup_menu)

struct EditorContextMenuPlugin_add_context_menu_item_Cfg #

@[params]
struct EditorContextMenuPlugin_add_context_menu_item_Cfg {
pub:
	icon Texture2D
}

Optional parameters for EditorContextMenuPlugin#add_context_menu_item

struct EditorContextMenuPlugin_add_context_menu_item_from_shortcut_Cfg #

@[params]
struct EditorContextMenuPlugin_add_context_menu_item_from_shortcut_Cfg {
pub:
	icon Texture2D
}

Optional parameters for EditorContextMenuPlugin#add_context_menu_item_from_shortcut

struct EditorContextMenuPlugin_add_context_submenu_item_Cfg #

@[params]
struct EditorContextMenuPlugin_add_context_submenu_item_Cfg {
pub:
	icon Texture2D
}

Optional parameters for EditorContextMenuPlugin#add_context_submenu_item

struct EditorDebuggerPlugin #

struct EditorDebuggerPlugin {
	RefCounted
}

A base class to implement debugger plugins.

fn (EditorDebuggerPlugin) to_variant #

fn (s &EditorDebuggerPlugin) to_variant() Variant

fn (EditorDebuggerPlugin) from_variant #

fn (mut s EditorDebuggerPlugin) from_variant(variant &Variant)

fn (EditorDebuggerPlugin) gd_setup_session #

fn (s &EditorDebuggerPlugin) gd_setup_session(session_id i64)

Override this method to be notified whenever a new [EditorDebuggerSession] is created. Note that the session may be inactive during this stage.

fn (EditorDebuggerPlugin) gd_has_capture #

fn (s &EditorDebuggerPlugin) gd_has_capture(capture string) bool

Override this method to enable receiving messages from the debugger. If [param capture] is "my_message" then messages starting with "my_message:" will be passed to the [method _capture] method.

fn (EditorDebuggerPlugin) gd_capture #

fn (s &EditorDebuggerPlugin) gd_capture(message string, data Array, session_id i64) bool

Override this method to process incoming messages. The [param session_id] is the ID of the [EditorDebuggerSession] that received the [param message]. Use [method get_session] to retrieve the session. This method should return true if the message is recognized.

fn (EditorDebuggerPlugin) gd_goto_script_line #

fn (s &EditorDebuggerPlugin) gd_goto_script_line(script Script, line i64)

Override this method to be notified when a breakpoint line has been clicked in the debugger breakpoint panel.

fn (EditorDebuggerPlugin) gd_breakpoints_cleared_in_tree #

fn (s &EditorDebuggerPlugin) gd_breakpoints_cleared_in_tree()

Override this method to be notified when all breakpoints are cleared in the editor.

fn (EditorDebuggerPlugin) gd_breakpoint_set_in_tree #

fn (s &EditorDebuggerPlugin) gd_breakpoint_set_in_tree(script Script, line i64, enabled bool)

Override this method to be notified when a breakpoint is set in the editor.

fn (EditorDebuggerPlugin) get_session #

fn (s &EditorDebuggerPlugin) get_session(id i64) EditorDebuggerSession

Returns the [EditorDebuggerSession] with the given [param id].

fn (EditorDebuggerPlugin) get_sessions #

fn (s &EditorDebuggerPlugin) get_sessions() Array

Returns an array of [EditorDebuggerSession] currently available to this debugger plugin. [b]Note:[/b] Sessions in the array may be inactive, check their state via [method EditorDebuggerSession.is_active].

struct EditorDebuggerSession #

struct EditorDebuggerSession {
	RefCounted
}

A class to interact with the editor debugger.

fn (EditorDebuggerSession) to_variant #

fn (s &EditorDebuggerSession) to_variant() Variant

fn (EditorDebuggerSession) from_variant #

fn (mut s EditorDebuggerSession) from_variant(variant &Variant)

fn (EditorDebuggerSession) send_message #

fn (s &EditorDebuggerSession) send_message(message string, cfg EditorDebuggerSession_send_message_Cfg)

Sends the given [param message] to the attached remote instance, optionally passing additionally [param data]. See [EngineDebugger] for how to retrieve those messages.

fn (EditorDebuggerSession) toggle_profiler #

fn (s &EditorDebuggerSession) toggle_profiler(profiler string, enable bool, cfg EditorDebuggerSession_toggle_profiler_Cfg)

Toggle the given [param profiler] on the attached remote instance, optionally passing additionally [param data]. See [EngineProfiler] for more details.

fn (EditorDebuggerSession) is_breaked #

fn (s &EditorDebuggerSession) is_breaked() bool

Returns true if the attached remote instance is currently in the debug loop.

fn (EditorDebuggerSession) is_debuggable #

fn (s &EditorDebuggerSession) is_debuggable() bool

Returns true if the attached remote instance can be debugged.

fn (EditorDebuggerSession) is_active #

fn (s &EditorDebuggerSession) is_active() bool

Returns true if the debug session is currently attached to a remote instance.

fn (EditorDebuggerSession) add_session_tab #

fn (s &EditorDebuggerSession) add_session_tab(control Control)

Adds the given [param control] to the debug session UI in the debugger bottom panel. The [param control]'s node name will be used as the tab title.

fn (EditorDebuggerSession) remove_session_tab #

fn (s &EditorDebuggerSession) remove_session_tab(control Control)

Removes the given [param control] from the debug session UI in the debugger bottom panel.

fn (EditorDebuggerSession) set_breakpoint #

fn (s &EditorDebuggerSession) set_breakpoint(path string, line i64, enabled bool)

Enables or disables a specific breakpoint based on [param enabled], updating the Editor Breakpoint Panel accordingly.

struct EditorDebuggerSession_send_message_Cfg #

@[params]
struct EditorDebuggerSession_send_message_Cfg {
pub:
	data Array = Array.new0()
}

Optional parameters for EditorDebuggerSession#send_message

struct EditorDebuggerSession_toggle_profiler_Cfg #

@[params]
struct EditorDebuggerSession_toggle_profiler_Cfg {
pub:
	data Array = Array.new0()
}

Optional parameters for EditorDebuggerSession#toggle_profiler

struct EditorExportPlatform #

struct EditorExportPlatform {
	RefCounted
}

Identifies a supported export platform, and internally provides the functionality of exporting to that platform.

fn (EditorExportPlatform) to_variant #

fn (s &EditorExportPlatform) to_variant() Variant

fn (EditorExportPlatform) from_variant #

fn (mut s EditorExportPlatform) from_variant(variant &Variant)

fn (EditorExportPlatform) get_os_name #

fn (s &EditorExportPlatform) get_os_name() string

Returns the name of the export operating system handled by this [EditorExportPlatform] class, as a friendly string. Possible return values are Windows, Linux, macOS, Android, iOS, and Web.

fn (EditorExportPlatform) create_preset #

fn (s &EditorExportPlatform) create_preset() EditorExportPreset

Create a new preset for this platform.

fn (EditorExportPlatform) find_export_template #

fn (s &EditorExportPlatform) find_export_template(template_file_name string) Dictionary

Locates export template for the platform, and returns [Dictionary] with the following keys: path: String and error: String. This method is provided for convenience and custom export platforms aren't required to use it or keep export templates stored in the same way official templates are.

fn (EditorExportPlatform) get_current_presets #

fn (s &EditorExportPlatform) get_current_presets() Array

Returns array of [EditorExportPreset]s for this platform.

fn (EditorExportPlatform) save_pack #

fn (s &EditorExportPlatform) save_pack(preset EditorExportPreset, debug bool, path string, cfg EditorExportPlatform_save_pack_Cfg) Dictionary

Saves PCK archive and returns [Dictionary] with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String). If [param embed] is true, PCK content is appended to the end of [param path] file and return [Dictionary] additionally include following keys: embedded_start: int (embedded PCK offset) and embedded_size: int (embedded PCK size).

fn (EditorExportPlatform) save_zip #

fn (s &EditorExportPlatform) save_zip(preset EditorExportPreset, debug bool, path string) Dictionary

Saves ZIP archive and returns [Dictionary] with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).

fn (EditorExportPlatform) save_pack_patch #

fn (s &EditorExportPlatform) save_pack_patch(preset EditorExportPreset, debug bool, path string) Dictionary

Saves patch PCK archive and returns [Dictionary] with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).

fn (EditorExportPlatform) save_zip_patch #

fn (s &EditorExportPlatform) save_zip_patch(preset EditorExportPreset, debug bool, path string) Dictionary

Saves patch ZIP archive and returns [Dictionary] with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).

fn (EditorExportPlatform) gen_export_flags #

fn (s &EditorExportPlatform) gen_export_flags(flags EditorExportPlatformDebugFlags) PackedStringArray

Generates array of command line arguments for the default export templates for the debug flags and editor settings.

fn (EditorExportPlatform) export_project_files #

fn (s &EditorExportPlatform) export_project_files(preset EditorExportPreset, debug bool, save_cb Callable, cfg EditorExportPlatform_export_project_files_Cfg) GDError

Exports project files for the specified preset. This method can be used to implement custom export format, other than PCK and ZIP. One of the callbacks is called for each exported file. [param save_cb] is called for all exported files and have the following arguments: file_path: String, file_data: PackedByteArray, file_index: int, file_count: int, encryption_include_filters: PackedStringArray, encryption_exclude_filters: PackedStringArray, encryption_key: PackedByteArray. [param shared_cb] is called for exported native shared/static libraries and have the following arguments: file_path: String, tags: PackedStringArray, target_folder: String. [b]Note:[/b] file_index and file_count are intended for progress tracking only and aren't necessarily unique and precise.

fn (EditorExportPlatform) export_project #

fn (s &EditorExportPlatform) export_project(preset EditorExportPreset, debug bool, path string, cfg EditorExportPlatform_export_project_Cfg) GDError

Creates a full project at [param path] for the specified [param preset].

fn (EditorExportPlatform) export_pack #

fn (s &EditorExportPlatform) export_pack(preset EditorExportPreset, debug bool, path string, cfg EditorExportPlatform_export_pack_Cfg) GDError

Creates a PCK archive at [param path] for the specified [param preset].

fn (EditorExportPlatform) export_zip #

fn (s &EditorExportPlatform) export_zip(preset EditorExportPreset, debug bool, path string, cfg EditorExportPlatform_export_zip_Cfg) GDError

Create a ZIP archive at [param path] for the specified [param preset].

fn (EditorExportPlatform) export_pack_patch #

fn (s &EditorExportPlatform) export_pack_patch(preset EditorExportPreset, debug bool, path string, cfg EditorExportPlatform_export_pack_patch_Cfg) GDError

Creates a patch PCK archive at [param path] for the specified [param preset], containing only the files that have changed since the last patch. [b]Note:[/b] [param patches] is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead.

fn (EditorExportPlatform) export_zip_patch #

fn (s &EditorExportPlatform) export_zip_patch(preset EditorExportPreset, debug bool, path string, cfg EditorExportPlatform_export_zip_patch_Cfg) GDError

Create a patch ZIP archive at [param path] for the specified [param preset], containing only the files that have changed since the last patch. [b]Note:[/b] [param patches] is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead.

fn (EditorExportPlatform) clear_messages #

fn (s &EditorExportPlatform) clear_messages()

Clears the export log.

fn (EditorExportPlatform) add_message #

fn (s &EditorExportPlatform) add_message(gd_type EditorExportPlatformExportMessageType, category string, message string)

Adds a message to the export log that will be displayed when exporting ends.

fn (EditorExportPlatform) get_message_count #

fn (s &EditorExportPlatform) get_message_count() i64

Returns number of messages in the export log.

fn (EditorExportPlatform) get_message_type #

fn (s &EditorExportPlatform) get_message_type(index i64) EditorExportPlatformExportMessageType

Returns message type, for the message with [param index].

fn (EditorExportPlatform) get_message_category #

fn (s &EditorExportPlatform) get_message_category(index i64) string

Returns message category, for the message with [param index].

fn (EditorExportPlatform) get_message_text #

fn (s &EditorExportPlatform) get_message_text(index i64) string

Returns message text, for the message with [param index].

fn (EditorExportPlatform) get_worst_message_type #

fn (s &EditorExportPlatform) get_worst_message_type() EditorExportPlatformExportMessageType

Returns most severe message type currently present in the export log.

fn (EditorExportPlatform) ssh_run_on_remote #

fn (s &EditorExportPlatform) ssh_run_on_remote(host string, port string, ssh_arg PackedStringArray, cmd_args string, cfg EditorExportPlatform_ssh_run_on_remote_Cfg) GDError

Executes specified command on the remote host via SSH protocol and returns command output in the [param output].

fn (EditorExportPlatform) ssh_run_on_remote_no_wait #

fn (s &EditorExportPlatform) ssh_run_on_remote_no_wait(host string, port string, ssh_args PackedStringArray, cmd_args string, cfg EditorExportPlatform_ssh_run_on_remote_no_wait_Cfg) i64

Executes specified command on the remote host via SSH protocol and returns process ID (on the remote host) without waiting for command to finish.

fn (EditorExportPlatform) ssh_push_to_remote #

fn (s &EditorExportPlatform) ssh_push_to_remote(host string, port string, scp_args PackedStringArray, src_file string, dst_file string) GDError

Uploads specified file over SCP protocol to the remote host.

fn (EditorExportPlatform) get_internal_export_files #

fn (s &EditorExportPlatform) get_internal_export_files(preset EditorExportPreset, debug bool) Dictionary

Returns additional files that should always be exported regardless of preset configuration, and are not part of the project source. The returned [Dictionary] contains filename keys ([String]) and their corresponding raw data ([PackedByteArray]).

struct EditorExportPlatformAndroid #

struct EditorExportPlatformAndroid {
	EditorExportPlatform
}

Exporter for Android.

fn (EditorExportPlatformAndroid) to_variant #

fn (s &EditorExportPlatformAndroid) to_variant() Variant

fn (EditorExportPlatformAndroid) from_variant #

fn (mut s EditorExportPlatformAndroid) from_variant(variant &Variant)

struct EditorExportPlatformAppleEmbedded #

struct EditorExportPlatformAppleEmbedded {
	EditorExportPlatform
}

Base class for the Apple embedded platform exporters (iOS and visionOS).

fn (EditorExportPlatformAppleEmbedded) to_variant #

fn (s &EditorExportPlatformAppleEmbedded) to_variant() Variant

fn (EditorExportPlatformAppleEmbedded) from_variant #

fn (mut s EditorExportPlatformAppleEmbedded) from_variant(variant &Variant)

struct EditorExportPlatformExtension #

struct EditorExportPlatformExtension {
	EditorExportPlatform
}

Base class for custom [EditorExportPlatform] implementations (plugins).

fn (EditorExportPlatformExtension) to_variant #

fn (s &EditorExportPlatformExtension) to_variant() Variant

fn (EditorExportPlatformExtension) from_variant #

fn (mut s EditorExportPlatformExtension) from_variant(variant &Variant)

fn (EditorExportPlatformExtension) gd_get_preset_features #

fn (s &EditorExportPlatformExtension) gd_get_preset_features(preset EditorExportPreset) PackedStringArray

Returns array of platform specific features for the specified [param preset].

fn (EditorExportPlatformExtension) gd_is_executable #

fn (s &EditorExportPlatformExtension) gd_is_executable(path string) bool

Returns true if specified file is a valid executable (native executable or script) for the target platform.

fn (EditorExportPlatformExtension) gd_get_export_options #

fn (s &EditorExportPlatformExtension) gd_get_export_options() Array

Returns a property list, as an [Array] of dictionaries. Each [Dictionary] must at least contain the name: StringName and type: Variant.Type entries. Additionally, the following keys are supported:- hint: PropertyHint

  • hint_string: String
  • usage: PropertyUsageFlags
  • class_name: StringName
  • default_value: Variant, default value of the property.
  • update_visibility: bool, if set to true, [method _get_export_option_visibility] is called for each property when this property is changed.
  • required: bool, if set to true, this property warnings are critical, and should be resolved to make export possible. This value is a hint for the [method _has_valid_export_configuration] implementation, and not used by the engine directly.See also [method Object._get_property_list].

fn (EditorExportPlatformExtension) gd_should_update_export_options #

fn (s &EditorExportPlatformExtension) gd_should_update_export_options() bool

Returns true if export options list is changed and presets should be updated.

fn (EditorExportPlatformExtension) gd_get_export_option_visibility #

fn (s &EditorExportPlatformExtension) gd_get_export_option_visibility(preset EditorExportPreset, option string) bool

Validates [param option] and returns visibility for the specified [param preset]. Default implementation return true for all options.

fn (EditorExportPlatformExtension) gd_get_export_option_warning #

fn (s &EditorExportPlatformExtension) gd_get_export_option_warning(preset EditorExportPreset, option string) string

Validates [param option] and returns warning message for the specified [param preset]. Default implementation return empty string for all options.

fn (EditorExportPlatformExtension) gd_get_os_name #

fn (s &EditorExportPlatformExtension) gd_get_os_name() string

Returns target OS name.

fn (EditorExportPlatformExtension) gd_get_name #

fn (s &EditorExportPlatformExtension) gd_get_name() string

Returns export platform name.

fn (EditorExportPlatformExtension) gd_poll_export #

fn (s &EditorExportPlatformExtension) gd_poll_export() bool

Returns true if one-click deploy options are changed and editor interface should be updated.

fn (EditorExportPlatformExtension) gd_get_options_count #

fn (s &EditorExportPlatformExtension) gd_get_options_count() i64

Returns the number of devices (or other options) available in the one-click deploy menu.

fn (EditorExportPlatformExtension) gd_get_options_tooltip #

fn (s &EditorExportPlatformExtension) gd_get_options_tooltip() string

Returns tooltip of the one-click deploy menu button.

fn (EditorExportPlatformExtension) gd_get_option_icon #

fn (s &EditorExportPlatformExtension) gd_get_option_icon(device i64) ImageTexture

Returns the item icon for the specified [param device] in the one-click deploy menu. The icon should be 16×16 pixels, adjusted for the current editor scale (see [method EditorInterface.get_editor_scale]).

fn (EditorExportPlatformExtension) gd_get_option_label #

fn (s &EditorExportPlatformExtension) gd_get_option_label(device i64) string

Returns one-click deploy menu item label for the specified [param device].

fn (EditorExportPlatformExtension) gd_get_option_tooltip #

fn (s &EditorExportPlatformExtension) gd_get_option_tooltip(device i64) string

Returns one-click deploy menu item tooltip for the specified [param device].

fn (EditorExportPlatformExtension) gd_get_device_architecture #

fn (s &EditorExportPlatformExtension) gd_get_device_architecture(device i64) string

Returns device architecture for one-click deploy.

fn (EditorExportPlatformExtension) gd_cleanup #

fn (s &EditorExportPlatformExtension) gd_cleanup()

Called by the editor before platform is unregistered.

fn (EditorExportPlatformExtension) gd_run #

fn (s &EditorExportPlatformExtension) gd_run(preset EditorExportPreset, device i64, debug_flags EditorExportPlatformDebugFlags) GDError

This method is called when [param device] one-click deploy menu option is selected. Implementation should export project to a temporary location, upload and run it on the specific [param device], or perform another action associated with the menu item.

fn (EditorExportPlatformExtension) gd_get_run_icon #

fn (s &EditorExportPlatformExtension) gd_get_run_icon() Texture2D

Returns the icon of the one-click deploy menu button. The icon should be 16×16 pixels, adjusted for the current editor scale (see [method EditorInterface.get_editor_scale]).

fn (EditorExportPlatformExtension) gd_can_export #

fn (s &EditorExportPlatformExtension) gd_can_export(preset EditorExportPreset, debug bool) bool

Returns true, if specified [param preset] is valid and can be exported. Use [method set_config_error] and [method set_config_missing_templates] to set error details. Usual implementation can call [method _has_valid_export_configuration] and [method _has_valid_project_configuration] to determine if export is possible.

fn (EditorExportPlatformExtension) gd_has_valid_export_configuration #

fn (s &EditorExportPlatformExtension) gd_has_valid_export_configuration(preset EditorExportPreset, debug bool) bool

Returns true if export configuration is valid.

fn (EditorExportPlatformExtension) gd_has_valid_project_configuration #

fn (s &EditorExportPlatformExtension) gd_has_valid_project_configuration(preset EditorExportPreset) bool

Returns true if project configuration is valid.

fn (EditorExportPlatformExtension) gd_get_binary_extensions #

fn (s &EditorExportPlatformExtension) gd_get_binary_extensions(preset EditorExportPreset) PackedStringArray

Returns array of supported binary extensions for the full project export.

fn (EditorExportPlatformExtension) gd_export_project #

fn (s &EditorExportPlatformExtension) gd_export_project(preset EditorExportPreset, debug bool, path string, flags EditorExportPlatformDebugFlags) GDError

Creates a full project at [param path] for the specified [param preset]. This method is called when "Export" button is pressed in the export dialog. This method implementation can call [method EditorExportPlatform.save_pack] or [method EditorExportPlatform.save_zip] to use default PCK/ZIP export process, or calls [method EditorExportPlatform.export_project_files] and implement custom callback for processing each exported file.

fn (EditorExportPlatformExtension) gd_export_pack #

fn (s &EditorExportPlatformExtension) gd_export_pack(preset EditorExportPreset, debug bool, path string, flags EditorExportPlatformDebugFlags) GDError

Creates a PCK archive at [param path] for the specified [param preset]. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and PCK is selected as a file type.

fn (EditorExportPlatformExtension) gd_export_zip #

fn (s &EditorExportPlatformExtension) gd_export_zip(preset EditorExportPreset, debug bool, path string, flags EditorExportPlatformDebugFlags) GDError

Create a ZIP archive at [param path] for the specified [param preset]. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and ZIP is selected as a file type.

fn (EditorExportPlatformExtension) gd_export_pack_patch #

fn (s &EditorExportPlatformExtension) gd_export_pack_patch(preset EditorExportPreset, debug bool, path string, patches PackedStringArray, flags EditorExportPlatformDebugFlags) GDError

Creates a patch PCK archive at [param path] for the specified [param preset], containing only the files that have changed since the last patch. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and PCK is selected as a file type. [b]Note:[/b] The patches provided in [param patches] have already been loaded when this method is called and are merely provided as context. When empty the patches defined in the export preset have been loaded instead.

fn (EditorExportPlatformExtension) gd_export_zip_patch #

fn (s &EditorExportPlatformExtension) gd_export_zip_patch(preset EditorExportPreset, debug bool, path string, patches PackedStringArray, flags EditorExportPlatformDebugFlags) GDError

Create a ZIP archive at [param path] for the specified [param preset], containing only the files that have changed since the last patch. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and ZIP is selected as a file type. [b]Note:[/b] The patches provided in [param patches] have already been loaded when this method is called and are merely provided as context. When empty the patches defined in the export preset have been loaded instead.

fn (EditorExportPlatformExtension) gd_get_platform_features #

fn (s &EditorExportPlatformExtension) gd_get_platform_features() PackedStringArray

Returns array of platform specific features.

fn (EditorExportPlatformExtension) gd_get_debug_protocol #

fn (s &EditorExportPlatformExtension) gd_get_debug_protocol() string

Returns protocol used for remote debugging. Default implementation return tcp://.

fn (EditorExportPlatformExtension) set_config_error #

fn (s &EditorExportPlatformExtension) set_config_error(error_text string)

Sets current configuration error message text. This method should be called only from the [method _can_export], [method _has_valid_export_configuration], or [method _has_valid_project_configuration] implementations.

fn (EditorExportPlatformExtension) get_config_error #

fn (s &EditorExportPlatformExtension) get_config_error() string

Returns current configuration error message text. This method should be called only from the [method _can_export], [method _has_valid_export_configuration], or [method _has_valid_project_configuration] implementations.

fn (EditorExportPlatformExtension) set_config_missing_templates #

fn (s &EditorExportPlatformExtension) set_config_missing_templates(missing_templates bool)

Set to true is export templates are missing from the current configuration. This method should be called only from the [method _can_export], [method _has_valid_export_configuration], or [method _has_valid_project_configuration] implementations.

fn (EditorExportPlatformExtension) get_config_missing_templates #

fn (s &EditorExportPlatformExtension) get_config_missing_templates() bool

Returns true is export templates are missing from the current configuration. This method should be called only from the [method _can_export], [method _has_valid_export_configuration], or [method _has_valid_project_configuration] implementations.

struct EditorExportPlatformIOS #

struct EditorExportPlatformIOS {
	EditorExportPlatformAppleEmbedded
}

Exporter for iOS.

fn (EditorExportPlatformIOS) to_variant #

fn (s &EditorExportPlatformIOS) to_variant() Variant

fn (EditorExportPlatformIOS) from_variant #

fn (mut s EditorExportPlatformIOS) from_variant(variant &Variant)

struct EditorExportPlatformLinuxBSD #

struct EditorExportPlatformLinuxBSD {
	EditorExportPlatformPC
}

Exporter for Linux/BSD.

fn (EditorExportPlatformLinuxBSD) to_variant #

fn (s &EditorExportPlatformLinuxBSD) to_variant() Variant

fn (EditorExportPlatformLinuxBSD) from_variant #

fn (mut s EditorExportPlatformLinuxBSD) from_variant(variant &Variant)

struct EditorExportPlatformMacOS #

struct EditorExportPlatformMacOS {
	EditorExportPlatform
}

Exporter for macOS.

fn (EditorExportPlatformMacOS) to_variant #

fn (s &EditorExportPlatformMacOS) to_variant() Variant

fn (EditorExportPlatformMacOS) from_variant #

fn (mut s EditorExportPlatformMacOS) from_variant(variant &Variant)

struct EditorExportPlatformPC #

struct EditorExportPlatformPC {
	EditorExportPlatform
}

Base class for the desktop platform exporter (Windows and Linux/BSD).

fn (EditorExportPlatformPC) to_variant #

fn (s &EditorExportPlatformPC) to_variant() Variant

fn (EditorExportPlatformPC) from_variant #

fn (mut s EditorExportPlatformPC) from_variant(variant &Variant)

struct EditorExportPlatformVisionOS #

struct EditorExportPlatformVisionOS {
	EditorExportPlatformAppleEmbedded
}

Exporter for visionOS.

fn (EditorExportPlatformVisionOS) to_variant #

fn (s &EditorExportPlatformVisionOS) to_variant() Variant

fn (EditorExportPlatformVisionOS) from_variant #

fn (mut s EditorExportPlatformVisionOS) from_variant(variant &Variant)

struct EditorExportPlatformWeb #

struct EditorExportPlatformWeb {
	EditorExportPlatform
}

Exporter for the Web.

fn (EditorExportPlatformWeb) to_variant #

fn (s &EditorExportPlatformWeb) to_variant() Variant

fn (EditorExportPlatformWeb) from_variant #

fn (mut s EditorExportPlatformWeb) from_variant(variant &Variant)

struct EditorExportPlatformWindows #

struct EditorExportPlatformWindows {
	EditorExportPlatformPC
}

Exporter for Windows.

fn (EditorExportPlatformWindows) to_variant #

fn (s &EditorExportPlatformWindows) to_variant() Variant

fn (EditorExportPlatformWindows) from_variant #

fn (mut s EditorExportPlatformWindows) from_variant(variant &Variant)

struct EditorExportPlatform_export_pack_Cfg #

@[params]
struct EditorExportPlatform_export_pack_Cfg {
pub:
	flags EditorExportPlatformDebugFlags
}

Optional parameters for EditorExportPlatform#export_pack

struct EditorExportPlatform_export_pack_patch_Cfg #

@[params]
struct EditorExportPlatform_export_pack_patch_Cfg {
pub:
	patches PackedStringArray = PackedStringArray{}
	flags   EditorExportPlatformDebugFlags
}

Optional parameters for EditorExportPlatform#export_pack_patch

struct EditorExportPlatform_export_project_Cfg #

@[params]
struct EditorExportPlatform_export_project_Cfg {
pub:
	flags EditorExportPlatformDebugFlags
}

Optional parameters for EditorExportPlatform#export_project

struct EditorExportPlatform_export_project_files_Cfg #

@[params]
struct EditorExportPlatform_export_project_files_Cfg {
pub:
	shared_cb Callable = Callable{}
}

Optional parameters for EditorExportPlatform#export_project_files

struct EditorExportPlatform_export_zip_Cfg #

@[params]
struct EditorExportPlatform_export_zip_Cfg {
pub:
	flags EditorExportPlatformDebugFlags
}

Optional parameters for EditorExportPlatform#export_zip

struct EditorExportPlatform_export_zip_patch_Cfg #

@[params]
struct EditorExportPlatform_export_zip_patch_Cfg {
pub:
	patches PackedStringArray = PackedStringArray{}
	flags   EditorExportPlatformDebugFlags
}

Optional parameters for EditorExportPlatform#export_zip_patch

struct EditorExportPlatform_save_pack_Cfg #

@[params]
struct EditorExportPlatform_save_pack_Cfg {
pub:
	embed bool
}

Optional parameters for EditorExportPlatform#save_pack

struct EditorExportPlatform_ssh_run_on_remote_Cfg #

@[params]
struct EditorExportPlatform_ssh_run_on_remote_Cfg {
pub:
	output   Array = Array.new0()
	port_fwd i64   = -1
}

Optional parameters for EditorExportPlatform#ssh_run_on_remote

struct EditorExportPlatform_ssh_run_on_remote_no_wait_Cfg #

@[params]
struct EditorExportPlatform_ssh_run_on_remote_no_wait_Cfg {
pub:
	port_fwd i64 = -1
}

Optional parameters for EditorExportPlatform#ssh_run_on_remote_no_wait

struct EditorExportPlugin #

struct EditorExportPlugin {
	RefCounted
}

A script that is executed when exporting the project.

fn (EditorExportPlugin) to_variant #

fn (s &EditorExportPlugin) to_variant() Variant

fn (EditorExportPlugin) from_variant #

fn (mut s EditorExportPlugin) from_variant(variant &Variant)

fn (EditorExportPlugin) gd_export_file #

fn (s &EditorExportPlugin) gd_export_file(path string, gd_type string, features PackedStringArray)

Virtual method to be overridden by the user. Called for each exported file before [method _customize_resource] and [method _customize_scene]. The arguments can be used to identify the file. [param path] is the path of the file, [param type] is the [Resource] represented by the file (e.g. [PackedScene]), and [param features] is the list of features for the export. Calling [method skip] inside this callback will make the file not included in the export.

fn (EditorExportPlugin) gd_export_begin #

fn (s &EditorExportPlugin) gd_export_begin(features PackedStringArray, is_debug bool, path string, flags i64)

Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. [param features] is the list of features for the export, [param is_debug] is true for debug builds, [param path] is the target path for the exported project. [param flags] is only used when running a runnable profile, e.g. when using native run on Android.

fn (EditorExportPlugin) gd_export_end #

fn (s &EditorExportPlugin) gd_export_end()

Virtual method to be overridden by the user. Called when the export is finished.

fn (EditorExportPlugin) gd_begin_customize_resources #

fn (s &EditorExportPlugin) gd_begin_customize_resources(platform EditorExportPlatform, features PackedStringArray) bool

Return true if this plugin will customize resources based on the platform and features used. When enabled, [method _get_customization_configuration_hash] and [method _customize_resource] will be called and must be implemented.

fn (EditorExportPlugin) gd_customize_resource #

fn (s &EditorExportPlugin) gd_customize_resource(resource Resource, path string) Resource

Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return null. When a new resource is returned, [param resource] will be replaced by a copy of the new resource. The [param path] argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty. Implementing this method is required if [method _begin_customize_resources] returns true. [b]Note:[/b] When customizing any of the following types and returning another resource, the other resource should not be skipped using [method skip] in [method _export_file]:- [AtlasTexture]

  • [CompressedCubemap]
  • [CompressedCubemapArray]
  • [CompressedTexture2D]
  • [CompressedTexture2DArray]
  • [CompressedTexture3D]

fn (EditorExportPlugin) gd_begin_customize_scenes #

fn (s &EditorExportPlugin) gd_begin_customize_scenes(platform EditorExportPlatform, features PackedStringArray) bool

Return true if this plugin will customize scenes based on the platform and features used. When enabled, [method _get_customization_configuration_hash] and [method _customize_scene] will be called and must be implemented. [b]Note:[/b] [method _customize_scene] will only be called for scenes that have been modified since the last export.

fn (EditorExportPlugin) gd_customize_scene #

fn (s &EditorExportPlugin) gd_customize_scene(scene Node, path string) Node

Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return null. If a new scene is returned, it is up to you to dispose of the old one. Implementing this method is required if [method _begin_customize_scenes] returns true.

fn (EditorExportPlugin) gd_get_customization_configuration_hash #

fn (s &EditorExportPlugin) gd_get_customization_configuration_hash() i64

Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. Implementing this method is required if [method _begin_customize_resources] returns true.

fn (EditorExportPlugin) gd_end_customize_scenes #

fn (s &EditorExportPlugin) gd_end_customize_scenes()

This is called when the customization process for scenes ends.

fn (EditorExportPlugin) gd_end_customize_resources #

fn (s &EditorExportPlugin) gd_end_customize_resources()

This is called when the customization process for resources ends.

fn (EditorExportPlugin) gd_get_export_options #

fn (s &EditorExportPlugin) gd_get_export_options(platform EditorExportPlatform) Array

Return a list of export options that can be configured for this export plugin. Each element in the return value is a [Dictionary] with the following keys:- option: A dictionary with the structure documented by [method Object.get_property_list], but all keys are optional.

  • default_value: The default value for this option.
  • update_visibility: An optional boolean value. If set to true, the preset will emit [signal Object.property_list_changed] when the option is changed.

fn (EditorExportPlugin) gd_get_export_options_overrides #

fn (s &EditorExportPlugin) gd_get_export_options_overrides(platform EditorExportPlatform) Dictionary

Return a [Dictionary] of override values for export options, that will be used instead of user-provided values. Overridden options will be hidden from the user interface.

class MyExportPlugin extends EditorExportPlugin:
func _get_name() -> String:
return 'MyExportPlugin'

func _supports_platform(platform) -> bool:
if platform is EditorExportPlatformPC:
##return true
return false

func _get_export_options_overrides(platform) -> Dictionary:
##return {
'binary_format/embed_pck': true,
}

fn (EditorExportPlugin) gd_should_update_export_options #

fn (s &EditorExportPlugin) gd_should_update_export_options(platform EditorExportPlatform) bool

Return true if the result of [method _get_export_options] has changed and the export options of the preset corresponding to [param platform] should be updated.

fn (EditorExportPlugin) gd_get_export_option_visibility #

fn (s &EditorExportPlugin) gd_get_export_option_visibility(platform EditorExportPlatform, option string) bool

Validates [param option] and returns the visibility for the specified [param platform]. The default implementation returns true for all options.

fn (EditorExportPlugin) gd_get_export_option_warning #

fn (s &EditorExportPlugin) gd_get_export_option_warning(platform EditorExportPlatform, option string) string

Check the requirements for the given [param option] and return a non-empty warning string if they are not met. [b]Note:[/b] Use [method get_option] to check the value of the export options.

fn (EditorExportPlugin) gd_get_export_features #

fn (s &EditorExportPlugin) gd_get_export_features(platform EditorExportPlatform, debug bool) PackedStringArray

Return a [PackedStringArray] of additional features this preset, for the given [param platform], should have.

fn (EditorExportPlugin) gd_get_name #

fn (s &EditorExportPlugin) gd_get_name() string

Return the name identifier of this plugin (for future identification by the exporter). The plugins are sorted by name before exporting. Implementing this method is required.

fn (EditorExportPlugin) gd_supports_platform #

fn (s &EditorExportPlugin) gd_supports_platform(platform EditorExportPlatform) bool

Return true if the plugin supports the given [param platform].

fn (EditorExportPlugin) gd_get_android_dependencies #

fn (s &EditorExportPlugin) gd_get_android_dependencies(platform EditorExportPlatform, debug bool) PackedStringArray

Virtual method to be overridden by the user. This is called to retrieve the set of Android dependencies provided by this plugin. Each returned Android dependency should have the format of an Android remote binary dependency: org.godot.example:my-plugin:0.0.0 For more information see [url=https://developer.android.com/build/dependencies?agpversion=4.1#dependency-types]Android documentation on dependencies[/url]. [b]Note:[/b] Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled.

fn (EditorExportPlugin) gd_get_android_dependencies_maven_repos #

fn (s &EditorExportPlugin) gd_get_android_dependencies_maven_repos(platform EditorExportPlatform, debug bool) PackedStringArray

Virtual method to be overridden by the user. This is called to retrieve the URLs of Maven repositories for the set of Android dependencies provided by this plugin. For more information see [url=https://docs.gradle.org/current/userguide/dependency_management.html#sec:maven_repo]Gradle documentation on dependency management[/url]. [b]Note:[/b] Google's Maven repo and the Maven Central repo are already included by default. [b]Note:[/b] Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled.

fn (EditorExportPlugin) gd_get_android_libraries #

fn (s &EditorExportPlugin) gd_get_android_libraries(platform EditorExportPlatform, debug bool) PackedStringArray

Virtual method to be overridden by the user. This is called to retrieve the local paths of the Android libraries archive (AAR) files provided by this plugin. [b]Note:[/b] Relative paths [b]must[/b] be relative to Godot's res://addons/ directory. For example, an AAR file located under res://addons/hello_world_plugin/HelloWorld.release.aar can be returned as an absolute path using res://addons/hello_world_plugin/HelloWorld.release.aar or a relative path using hello_world_plugin/HelloWorld.release.aar. [b]Note:[/b] Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled.

fn (EditorExportPlugin) gd_get_android_manifest_activity_element_contents #

fn (s &EditorExportPlugin) gd_get_android_manifest_activity_element_contents(platform EditorExportPlatform, debug bool) string

Virtual method to be overridden by the user. This is used at export time to update the contents of the activity element in the generated Android manifest. [b]Note:[/b] Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled.

fn (EditorExportPlugin) gd_get_android_manifest_application_element_contents #

fn (s &EditorExportPlugin) gd_get_android_manifest_application_element_contents(platform EditorExportPlatform, debug bool) string

Virtual method to be overridden by the user. This is used at export time to update the contents of the application element in the generated Android manifest. [b]Note:[/b] Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled.

fn (EditorExportPlugin) gd_get_android_manifest_element_contents #

fn (s &EditorExportPlugin) gd_get_android_manifest_element_contents(platform EditorExportPlatform, debug bool) string

Virtual method to be overridden by the user. This is used at export time to update the contents of the manifest element in the generated Android manifest. [b]Note:[/b] Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled.

fn (EditorExportPlugin) gd_update_android_prebuilt_manifest #

fn (s &EditorExportPlugin) gd_update_android_prebuilt_manifest(platform EditorExportPlatform, manifest_data PackedByteArray) PackedByteArray

Provide access to the Android prebuilt manifest and allows the plugin to modify it if needed. Implementers of this virtual method should take the binary manifest data from [param manifest_data], copy it, modify it, and then return it with the modifications. If no modifications are needed, then an empty [PackedByteArray] should be returned.

fn (EditorExportPlugin) add_shared_object #

fn (s &EditorExportPlugin) add_shared_object(path string, tags PackedStringArray, target string)

Adds a shared object or a directory containing only shared objects with the given [param tags] and destination [param path]. [b]Note:[/b] In case of macOS exports, those shared objects will be added to Frameworks directory of app bundle. In case of a directory code-sign will error if you place non code object in directory.

fn (EditorExportPlugin) add_file #

fn (s &EditorExportPlugin) add_file(path string, file PackedByteArray, remap bool)

Adds a custom file to be exported. [param path] is the virtual path that can be used to load the file, [param file] is the binary data of the file. When called inside [method _export_file] and [param remap] is true, the current file will not be exported, but instead remapped to this custom file. [param remap] is ignored when called in other places. [param file] will not be imported, so consider using [method _customize_resource] to remap imported resources.

fn (EditorExportPlugin) add_apple_embedded_platform_project_static_lib #

fn (s &EditorExportPlugin) add_apple_embedded_platform_project_static_lib(path string)

Adds a static library from the given [param path] to the Apple embedded platform project.

fn (EditorExportPlugin) add_apple_embedded_platform_framework #

fn (s &EditorExportPlugin) add_apple_embedded_platform_framework(path string)

Adds a static library (.a) or a dynamic library (.dylib, *.framework) to the Linking Phase to the Apple embedded platform's Xcode project.

fn (EditorExportPlugin) add_apple_embedded_platform_embedded_framework #

fn (s &EditorExportPlugin) add_apple_embedded_platform_embedded_framework(path string)

Adds a dynamic library (*.dylib, .framework) to the Linking Phase in the Apple embedded platform's Xcode project and embeds it into the resulting binary. [b]Note:[/b] For static libraries (.a), this works in the same way as [method add_apple_embedded_platform_framework]. [b]Note:[/b] This method should not be used for System libraries as they are already present on the device.

fn (EditorExportPlugin) add_apple_embedded_platform_plist_content #

fn (s &EditorExportPlugin) add_apple_embedded_platform_plist_content(plist_content string)

Adds additional fields to the Apple embedded platform's project Info.plist file.

fn (EditorExportPlugin) add_apple_embedded_platform_linker_flags #

fn (s &EditorExportPlugin) add_apple_embedded_platform_linker_flags(flags string)

Adds linker flags for the Apple embedded platform export.

fn (EditorExportPlugin) add_apple_embedded_platform_bundle_file #

fn (s &EditorExportPlugin) add_apple_embedded_platform_bundle_file(path string)

Adds an Apple embedded platform bundle file from the given [param path] to the exported project.

fn (EditorExportPlugin) add_apple_embedded_platform_cpp_code #

fn (s &EditorExportPlugin) add_apple_embedded_platform_cpp_code(code string)

Adds C++ code to the Apple embedded platform export. The final code is created from the code appended by each active export plugin.

fn (EditorExportPlugin) add_ios_project_static_lib #

fn (s &EditorExportPlugin) add_ios_project_static_lib(path string)

Adds a static library from the given [param path] to the iOS project.

fn (EditorExportPlugin) add_ios_framework #

fn (s &EditorExportPlugin) add_ios_framework(path string)

Adds a static library (.a) or a dynamic library (.dylib, *.framework) to the Linking Phase to the iOS Xcode project.

fn (EditorExportPlugin) add_ios_embedded_framework #

fn (s &EditorExportPlugin) add_ios_embedded_framework(path string)

Adds a dynamic library (*.dylib, .framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary. [b]Note:[/b] For static libraries (.a), this works the in same way as [method add_apple_embedded_platform_framework]. [b]Note:[/b] This method should not be used for System libraries as they are already present on the device.

fn (EditorExportPlugin) add_ios_plist_content #

fn (s &EditorExportPlugin) add_ios_plist_content(plist_content string)

Adds additional fields to the iOS project Info.plist file.

fn (EditorExportPlugin) add_ios_linker_flags #

fn (s &EditorExportPlugin) add_ios_linker_flags(flags string)

Adds linker flags for the iOS export.

fn (EditorExportPlugin) add_ios_bundle_file #

fn (s &EditorExportPlugin) add_ios_bundle_file(path string)

Adds an iOS bundle file from the given [param path] to the exported project.

fn (EditorExportPlugin) add_ios_cpp_code #

fn (s &EditorExportPlugin) add_ios_cpp_code(code string)

Adds C++ code to the iOS export. The final code is created from the code appended by each active export plugin.

fn (EditorExportPlugin) add_macos_plugin_file #

fn (s &EditorExportPlugin) add_macos_plugin_file(path string)

Adds file or directory matching [param path] to PlugIns directory of macOS app bundle. [b]Note:[/b] This is useful only for macOS exports.

fn (EditorExportPlugin) skip #

fn (s &EditorExportPlugin) skip()

To be called inside [method _export_file]. Skips the current file, so it's not included in the export.

fn (EditorExportPlugin) get_option #

fn (s &EditorExportPlugin) get_option(name string) Variant

Returns the current value of an export option supplied by [method _get_export_options].

fn (EditorExportPlugin) get_export_preset #

fn (s &EditorExportPlugin) get_export_preset() EditorExportPreset

Returns currently used export preset.

fn (EditorExportPlugin) get_export_platform #

fn (s &EditorExportPlugin) get_export_platform() EditorExportPlatform

Returns currently used export platform.

struct EditorExportPreset #

struct EditorExportPreset {
	RefCounted
}

Export preset configuration.

fn (EditorExportPreset) to_variant #

fn (s &EditorExportPreset) to_variant() Variant

fn (EditorExportPreset) from_variant #

fn (mut s EditorExportPreset) from_variant(variant &Variant)

fn (EditorExportPreset) has #

fn (s &EditorExportPreset) has(property string) bool

Returns true if the preset has the property named [param property].

fn (EditorExportPreset) get_files_to_export #

fn (s &EditorExportPreset) get_files_to_export() PackedStringArray

Returns array of files to export.

fn (EditorExportPreset) get_customized_files #

fn (s &EditorExportPreset) get_customized_files() Dictionary

Returns a dictionary of files selected in the "Resources" tab of the export dialog. The dictionary's keys are file paths, and its values are the corresponding export modes: "strip", "keep", or "remove". See also [method get_file_export_mode].

fn (EditorExportPreset) get_customized_files_count #

fn (s &EditorExportPreset) get_customized_files_count() i64

Returns the number of files selected in the "Resources" tab of the export dialog.

fn (EditorExportPreset) has_export_file #

fn (s &EditorExportPreset) has_export_file(path string) bool

Returns true if the file at the specified [param path] will be exported.

fn (EditorExportPreset) get_file_export_mode #

fn (s &EditorExportPreset) get_file_export_mode(path string, cfg EditorExportPreset_get_file_export_mode_Cfg) EditorExportPresetFileExportMode

Returns file export mode for the specified file.

fn (EditorExportPreset) get_project_setting #

fn (s &EditorExportPreset) get_project_setting(name string) Variant

Returns the value of the setting identified by [param name] using export preset feature tag overrides instead of current OS features.

fn (EditorExportPreset) get_preset_name #

fn (s &EditorExportPreset) get_preset_name() string

Returns this export preset's name.

fn (EditorExportPreset) is_runnable #

fn (s &EditorExportPreset) is_runnable() bool

Returns true if the "Runnable" toggle is enabled in the export dialog.

fn (EditorExportPreset) are_advanced_options_enabled #

fn (s &EditorExportPreset) are_advanced_options_enabled() bool

Returns true if the "Advanced" toggle is enabled in the export dialog.

fn (EditorExportPreset) is_dedicated_server #

fn (s &EditorExportPreset) is_dedicated_server() bool

Returns true if the dedicated server export mode is selected in the export dialog.

fn (EditorExportPreset) get_export_filter #

fn (s &EditorExportPreset) get_export_filter() EditorExportPresetExportFilter

Returns export file filter mode selected in the "Resources" tab of the export dialog.

fn (EditorExportPreset) get_include_filter #

fn (s &EditorExportPreset) get_include_filter() string

Returns file filters to include during export.

fn (EditorExportPreset) get_exclude_filter #

fn (s &EditorExportPreset) get_exclude_filter() string

Returns file filters to exclude during export.

fn (EditorExportPreset) get_custom_features #

fn (s &EditorExportPreset) get_custom_features() string

Returns a comma-separated list of custom features added to this preset, as a string. See [url=$DOCS_URL/tutorials/export/feature_tags.html]Feature tags[/url] in the documentation for more information.

fn (EditorExportPreset) get_patches #

fn (s &EditorExportPreset) get_patches() PackedStringArray

Returns the list of packs on which to base a patch export on.

fn (EditorExportPreset) get_export_path #

fn (s &EditorExportPreset) get_export_path() string

Returns export target path.

fn (EditorExportPreset) get_encryption_in_filter #

fn (s &EditorExportPreset) get_encryption_in_filter() string

Returns file filters to include during PCK encryption.

fn (EditorExportPreset) get_encryption_ex_filter #

fn (s &EditorExportPreset) get_encryption_ex_filter() string

Returns file filters to exclude during PCK encryption.

fn (EditorExportPreset) get_encrypt_pck #

fn (s &EditorExportPreset) get_encrypt_pck() bool

Returns true if PCK encryption is enabled in the export dialog.

fn (EditorExportPreset) get_encrypt_directory #

fn (s &EditorExportPreset) get_encrypt_directory() bool

Returns true if PCK directory encryption is enabled in the export dialog.

fn (EditorExportPreset) get_encryption_key #

fn (s &EditorExportPreset) get_encryption_key() string

Returns PCK encryption key.

fn (EditorExportPreset) get_script_export_mode #

fn (s &EditorExportPreset) get_script_export_mode() i64

Returns the export mode used by GDScript files. 0 for "Text", 1 for "Binary tokens", and 2 for "Compressed binary tokens (smaller files)".

fn (EditorExportPreset) get_or_env #

fn (s &EditorExportPreset) get_or_env(name string, env_var string) Variant

Returns export option value or value of environment variable if it is set.

fn (EditorExportPreset) get_version #

fn (s &EditorExportPreset) get_version(name string, windows_version bool) string

Returns the preset's version number, or fall back to the [member ProjectSettings.application/config/version] project setting if set to an empty string. If [param windows_version] is true, formats the returned version number to be compatible with Windows executable metadata.

struct EditorExportPreset_get_file_export_mode_Cfg #

@[params]
struct EditorExportPreset_get_file_export_mode_Cfg {
pub:
	default EditorExportPresetFileExportMode = unsafe { EditorExportPresetFileExportMode(0) }
}

Optional parameters for EditorExportPreset#get_file_export_mode

struct EditorFeatureProfile #

struct EditorFeatureProfile {
	RefCounted
}

An editor feature profile which can be used to disable specific features.

fn (EditorFeatureProfile) to_variant #

fn (s &EditorFeatureProfile) to_variant() Variant

fn (EditorFeatureProfile) from_variant #

fn (mut s EditorFeatureProfile) from_variant(variant &Variant)

fn (EditorFeatureProfile) set_disable_class #

fn (s &EditorFeatureProfile) set_disable_class(class_name string, disable bool)

If [param disable] is true, disables the class specified by [param class_name]. When disabled, the class won't appear in the Create New Node dialog.

fn (EditorFeatureProfile) is_class_disabled #

fn (s &EditorFeatureProfile) is_class_disabled(class_name string) bool

Returns true if the class specified by [param class_name] is disabled. When disabled, the class won't appear in the Create New Node dialog.

fn (EditorFeatureProfile) set_disable_class_editor #

fn (s &EditorFeatureProfile) set_disable_class_editor(class_name string, disable bool)

If [param disable] is true, disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class.

fn (EditorFeatureProfile) is_class_editor_disabled #

fn (s &EditorFeatureProfile) is_class_editor_disabled(class_name string) bool

Returns true if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class.

fn (EditorFeatureProfile) set_disable_class_property #

fn (s &EditorFeatureProfile) set_disable_class_property(class_name string, property string, disable bool)

If [param disable] is true, disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name].

fn (EditorFeatureProfile) is_class_property_disabled #

fn (s &EditorFeatureProfile) is_class_property_disabled(class_name string, property string) bool

Returns true if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name].

fn (EditorFeatureProfile) set_disable_feature #

fn (s &EditorFeatureProfile) set_disable_feature(feature EditorFeatureProfileFeature, disable bool)

If [param disable] is true, disables the editor feature specified in [param feature]. When a feature is disabled, it will disappear from the editor entirely.

fn (EditorFeatureProfile) is_feature_disabled #

fn (s &EditorFeatureProfile) is_feature_disabled(feature EditorFeatureProfileFeature) bool

Returns true if the [param feature] is disabled. When a feature is disabled, it will disappear from the editor entirely.

fn (EditorFeatureProfile) get_feature_name #

fn (s &EditorFeatureProfile) get_feature_name(feature EditorFeatureProfileFeature) string

Returns the specified [param feature]'s human-readable name.

fn (EditorFeatureProfile) save_to_file #

fn (s &EditorFeatureProfile) save_to_file(path string) GDError

Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's [b]Import[/b] button or the [method load_from_file] method. [b]Note:[/b] Feature profiles created via the user interface are saved in the feature_profiles directory, as a file with the .profile extension. The editor configuration folder can be found by using [method EditorPaths.get_config_dir].

fn (EditorFeatureProfile) load_from_file #

fn (s &EditorFeatureProfile) load_from_file(path string) GDError

Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's [b]Export[/b] button or the [method save_to_file] method. [b]Note:[/b] Feature profiles created via the user interface are loaded from the feature_profiles directory, as a file with the .profile extension. The editor configuration folder can be found by using [method EditorPaths.get_config_dir].

struct EditorFileDialog #

struct EditorFileDialog {
	ConfirmationDialog
}

A modified version of [FileDialog] used by the editor.

fn (EditorFileDialog) to_variant #

fn (s &EditorFileDialog) to_variant() Variant

fn (EditorFileDialog) from_variant #

fn (mut s EditorFileDialog) from_variant(variant &Variant)

fn (EditorFileDialog) clear_filters #

fn (s &EditorFileDialog) clear_filters()

Removes all filters except for "All Files (.)".

fn (EditorFileDialog) add_filter #

fn (s &EditorFileDialog) add_filter(filter string, cfg EditorFileDialog_add_filter_Cfg)

Adds a comma-separated file name [param filter] option to the [EditorFileDialog] with an optional [param description], which restricts what files can be picked. A [param filter] should be of the form "filename.extension", where filename and extension can be * to match any string. Filters starting with . (i.e. empty filenames) are not allowed. For example, a [param filter] of "*.tscn, *.scn" and a [param description] of "Scenes" results in filter text "Scenes (*.tscn, *.scn)".

fn (EditorFileDialog) set_filters #

fn (s &EditorFileDialog) set_filters(filters PackedStringArray)

fn (EditorFileDialog) get_filters #

fn (s &EditorFileDialog) get_filters() PackedStringArray

fn (EditorFileDialog) get_option_name #

fn (s &EditorFileDialog) get_option_name(option i64) string

Returns the name of the [OptionButton] or [CheckBox] with index [param option].

fn (EditorFileDialog) get_option_values #

fn (s &EditorFileDialog) get_option_values(option i64) PackedStringArray

Returns an array of values of the [OptionButton] with index [param option].

fn (EditorFileDialog) get_option_default #

fn (s &EditorFileDialog) get_option_default(option i64) i64

Returns the default value index of the [OptionButton] or [CheckBox] with index [param option].

fn (EditorFileDialog) set_option_name #

fn (s &EditorFileDialog) set_option_name(option i64, name string)

Sets the name of the [OptionButton] or [CheckBox] with index [param option].

fn (EditorFileDialog) set_option_values #

fn (s &EditorFileDialog) set_option_values(option i64, values PackedStringArray)

Sets the option values of the [OptionButton] with index [param option].

fn (EditorFileDialog) set_option_default #

fn (s &EditorFileDialog) set_option_default(option i64, default_value_index i64)

Sets the default value index of the [OptionButton] or [CheckBox] with index [param option].

fn (EditorFileDialog) set_option_count #

fn (s &EditorFileDialog) set_option_count(count i64)

fn (EditorFileDialog) get_option_count #

fn (s &EditorFileDialog) get_option_count() i64

fn (EditorFileDialog) add_option #

fn (s &EditorFileDialog) add_option(name string, values PackedStringArray, default_value_index i64)

Adds an additional [OptionButton] to the file dialog. If [param values] is empty, a [CheckBox] is added instead. [param default_value_index] should be an index of the value in the [param values]. If [param values] is empty it should be either 1 (checked), or 0 (unchecked).

fn (EditorFileDialog) get_selected_options #

fn (s &EditorFileDialog) get_selected_options() Dictionary

Returns a [Dictionary] with the selected values of the additional [OptionButton]s and/or [CheckBox]es. [Dictionary] keys are names and values are selected value indices.

fn (EditorFileDialog) clear_filename_filter #

fn (s &EditorFileDialog) clear_filename_filter()

Clear the filter for file names.

fn (EditorFileDialog) set_filename_filter #

fn (s &EditorFileDialog) set_filename_filter(filter string)

Sets the value of the filter for file names.

fn (EditorFileDialog) get_filename_filter #

fn (s &EditorFileDialog) get_filename_filter() string

Returns the value of the filter for file names.

fn (EditorFileDialog) get_current_dir #

fn (s &EditorFileDialog) get_current_dir() string

fn (EditorFileDialog) get_current_file #

fn (s &EditorFileDialog) get_current_file() string

fn (EditorFileDialog) get_current_path #

fn (s &EditorFileDialog) get_current_path() string

fn (EditorFileDialog) set_current_dir #

fn (s &EditorFileDialog) set_current_dir(dir string)

fn (EditorFileDialog) set_current_file #

fn (s &EditorFileDialog) set_current_file(file string)

fn (EditorFileDialog) set_current_path #

fn (s &EditorFileDialog) set_current_path(path string)

fn (EditorFileDialog) set_file_mode #

fn (s &EditorFileDialog) set_file_mode(mode EditorFileDialogFileMode)

fn (EditorFileDialog) get_file_mode #

fn (s &EditorFileDialog) get_file_mode() EditorFileDialogFileMode

fn (EditorFileDialog) get_vbox #

fn (s &EditorFileDialog) get_vbox() VBoxContainer

Returns the [VBoxContainer] used to display the file system. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (EditorFileDialog) get_line_edit #

fn (s &EditorFileDialog) get_line_edit() LineEdit

Returns the LineEdit for the selected file. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (EditorFileDialog) set_access #

fn (s &EditorFileDialog) set_access(access EditorFileDialogAccess)

fn (EditorFileDialog) get_access #

fn (s &EditorFileDialog) get_access() EditorFileDialogAccess

fn (EditorFileDialog) set_show_hidden_files #

fn (s &EditorFileDialog) set_show_hidden_files(show bool)

fn (EditorFileDialog) is_showing_hidden_files #

fn (s &EditorFileDialog) is_showing_hidden_files() bool

fn (EditorFileDialog) set_display_mode #

fn (s &EditorFileDialog) set_display_mode(mode EditorFileDialogDisplayMode)

fn (EditorFileDialog) get_display_mode #

fn (s &EditorFileDialog) get_display_mode() EditorFileDialogDisplayMode

fn (EditorFileDialog) set_disable_overwrite_warning #

fn (s &EditorFileDialog) set_disable_overwrite_warning(disable bool)

fn (EditorFileDialog) is_overwrite_warning_disabled #

fn (s &EditorFileDialog) is_overwrite_warning_disabled() bool

fn (EditorFileDialog) add_side_menu #

fn (s &EditorFileDialog) add_side_menu(menu Control, cfg EditorFileDialog_add_side_menu_Cfg)

Adds the given [param menu] to the side of the file dialog with the given [param title] text on top. Only one side menu is allowed.

fn (EditorFileDialog) popup_file_dialog #

fn (s &EditorFileDialog) popup_file_dialog()

Shows the [EditorFileDialog] at the default size and position for file dialogs in the editor, and selects the file name if there is a current file.

fn (EditorFileDialog) invalidate #

fn (s &EditorFileDialog) invalidate()

Notify the [EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update.

struct EditorFileDialog_add_filter_Cfg #

@[params]
struct EditorFileDialog_add_filter_Cfg {
pub:
	description string
}

Optional parameters for EditorFileDialog#add_filter

struct EditorFileDialog_add_side_menu_Cfg #

@[params]
struct EditorFileDialog_add_side_menu_Cfg {
pub:
	title string
}

Optional parameters for EditorFileDialog#add_side_menu

struct EditorFileSystem #

struct EditorFileSystem {
	Node
}

Resource filesystem, as the editor sees it.

fn (EditorFileSystem) to_variant #

fn (s &EditorFileSystem) to_variant() Variant

fn (EditorFileSystem) from_variant #

fn (mut s EditorFileSystem) from_variant(variant &Variant)

fn (EditorFileSystem) get_filesystem #

fn (s &EditorFileSystem) get_filesystem() EditorFileSystemDirectory

Gets the root directory object.

fn (EditorFileSystem) is_scanning #

fn (s &EditorFileSystem) is_scanning() bool

Returns true if the filesystem is being scanned.

fn (EditorFileSystem) get_scanning_progress #

fn (s &EditorFileSystem) get_scanning_progress() f64

Returns the scan progress for 0 to 1 if the FS is being scanned.

fn (EditorFileSystem) scan #

fn (s &EditorFileSystem) scan()

Scan the filesystem for changes.

fn (EditorFileSystem) scan_sources #

fn (s &EditorFileSystem) scan_sources()

Check if the source of any imported resource changed.

fn (EditorFileSystem) update_file #

fn (s &EditorFileSystem) update_file(path string)

Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. This will not import the file. To reimport, call [method reimport_files] or [method scan] methods.

fn (EditorFileSystem) get_filesystem_path #

fn (s &EditorFileSystem) get_filesystem_path(path string) EditorFileSystemDirectory

Returns a view into the filesystem at [param path].

fn (EditorFileSystem) get_file_type #

fn (s &EditorFileSystem) get_file_type(path string) string

Returns the resource type of the file, given the full path. This returns a string such as "Resource" or "GDScript", [i]not[/i] a file extension such as ".gd".

fn (EditorFileSystem) reimport_files #

fn (s &EditorFileSystem) reimport_files(files PackedStringArray)

Reimports a set of files. Call this if these files or their .import files were directly edited by script or an external program. If the file type changed or the file was newly created, use [method update_file] or [method scan]. [b]Note:[/b] This function blocks until the import is finished. However, the main loop iteration, including timers and [method Node._process], will occur during the import process due to progress bar updates. Avoid calls to [method reimport_files] or [method scan] while an import is in progress.

struct EditorFileSystemDirectory #

struct EditorFileSystemDirectory {
	Object
}

A directory for the resource filesystem.

fn (EditorFileSystemDirectory) to_variant #

fn (s &EditorFileSystemDirectory) to_variant() Variant

fn (EditorFileSystemDirectory) from_variant #

fn (mut s EditorFileSystemDirectory) from_variant(variant &Variant)

fn (EditorFileSystemDirectory) get_subdir_count #

fn (s &EditorFileSystemDirectory) get_subdir_count() i64

Returns the number of subdirectories in this directory.

fn (EditorFileSystemDirectory) get_subdir #

fn (s &EditorFileSystemDirectory) get_subdir(idx i64) EditorFileSystemDirectory

Returns the subdirectory at index [param idx].

fn (EditorFileSystemDirectory) get_file_count #

fn (s &EditorFileSystemDirectory) get_file_count() i64

Returns the number of files in this directory.

fn (EditorFileSystemDirectory) get_file #

fn (s &EditorFileSystemDirectory) get_file(idx i64) string

Returns the name of the file at index [param idx].

fn (EditorFileSystemDirectory) get_file_path #

fn (s &EditorFileSystemDirectory) get_file_path(idx i64) string

Returns the path to the file at index [param idx].

fn (EditorFileSystemDirectory) get_file_type #

fn (s &EditorFileSystemDirectory) get_file_type(idx i64) string

Returns the resource type of the file at index [param idx]. This returns a string such as "Resource" or "GDScript", [i]not[/i] a file extension such as ".gd".

fn (EditorFileSystemDirectory) get_file_script_class_name #

fn (s &EditorFileSystemDirectory) get_file_script_class_name(idx i64) string

Returns the name of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the class_name syntax, this will return an empty string.

fn (EditorFileSystemDirectory) get_file_script_class_extends #

fn (s &EditorFileSystemDirectory) get_file_script_class_extends(idx i64) string

Returns the base class of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the class_name syntax, this will return an empty string.

fn (EditorFileSystemDirectory) get_file_import_is_valid #

fn (s &EditorFileSystemDirectory) get_file_import_is_valid(idx i64) bool

Returns true if the file at index [param idx] imported properly.

fn (EditorFileSystemDirectory) get_name #

fn (s &EditorFileSystemDirectory) get_name() string

Returns the name of this directory.

fn (EditorFileSystemDirectory) get_path #

fn (s &EditorFileSystemDirectory) get_path() string

Returns the path to this directory.

fn (EditorFileSystemDirectory) get_parent #

fn (s &EditorFileSystemDirectory) get_parent() EditorFileSystemDirectory

Returns the parent directory for this directory or null if called on a directory at res:// or user://.

fn (EditorFileSystemDirectory) find_file_index #

fn (s &EditorFileSystemDirectory) find_file_index(name string) i64

Returns the index of the file with name [param name] or -1 if not found.

fn (EditorFileSystemDirectory) find_dir_index #

fn (s &EditorFileSystemDirectory) find_dir_index(name string) i64

Returns the index of the directory with name [param name] or -1 if not found.

struct EditorFileSystemImportFormatSupportQuery #

struct EditorFileSystemImportFormatSupportQuery {
	RefCounted
}

Used to query and configure import format support.

fn (EditorFileSystemImportFormatSupportQuery) to_variant #

fn (s &EditorFileSystemImportFormatSupportQuery) to_variant() Variant

fn (EditorFileSystemImportFormatSupportQuery) from_variant #

fn (mut s EditorFileSystemImportFormatSupportQuery) from_variant(variant &Variant)

fn (EditorFileSystemImportFormatSupportQuery) gd_is_active #

fn (s &EditorFileSystemImportFormatSupportQuery) gd_is_active() bool

Return whether this importer is active.

fn (EditorFileSystemImportFormatSupportQuery) gd_get_file_extensions #

fn (s &EditorFileSystemImportFormatSupportQuery) gd_get_file_extensions() PackedStringArray

Return the file extensions supported.

fn (EditorFileSystemImportFormatSupportQuery) gd_query #

fn (s &EditorFileSystemImportFormatSupportQuery) gd_query() bool

Query support. Return false if import must not continue.

struct EditorImportPlugin #

struct EditorImportPlugin {
	ResourceImporter
}

Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type.

fn (EditorImportPlugin) to_variant #

fn (s &EditorImportPlugin) to_variant() Variant

fn (EditorImportPlugin) from_variant #

fn (mut s EditorImportPlugin) from_variant(variant &Variant)

fn (EditorImportPlugin) gd_get_importer_name #

fn (s &EditorImportPlugin) gd_get_importer_name() string

Gets the unique name of the importer.

fn (EditorImportPlugin) gd_get_visible_name #

fn (s &EditorImportPlugin) gd_get_visible_name() string

Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh".

fn (EditorImportPlugin) gd_get_preset_count #

fn (s &EditorImportPlugin) gd_get_preset_count() i64

Gets the number of initial presets defined by the plugin. Use [method _get_import_options] to get the default options for the preset and [method _get_preset_name] to get the name of the preset.

fn (EditorImportPlugin) gd_get_preset_name #

fn (s &EditorImportPlugin) gd_get_preset_name(preset_index i64) string

Gets the name of the options preset at this index.

fn (EditorImportPlugin) gd_get_recognized_extensions #

fn (s &EditorImportPlugin) gd_get_recognized_extensions() PackedStringArray

Gets the list of file extensions to associate with this loader (case-insensitive). e.g. ["obj"].

fn (EditorImportPlugin) gd_get_import_options #

fn (s &EditorImportPlugin) gd_get_import_options(path string, preset_index i64) Array

Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: name, default_value, property_hint (optional), hint_string (optional), usage (optional).

fn (EditorImportPlugin) gd_get_save_extension #

fn (s &EditorImportPlugin) gd_get_save_extension() string

Gets the extension used to save this resource in the .godot/imported directory (see [member ProjectSettings.application/config/use_hidden_project_data_directory]).

fn (EditorImportPlugin) gd_get_resource_type #

fn (s &EditorImportPlugin) gd_get_resource_type() string

Gets the Godot resource type associated with this loader. e.g. "Mesh" or "Animation".

fn (EditorImportPlugin) gd_get_priority #

fn (s &EditorImportPlugin) gd_get_priority() f64

Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is 1.0.

fn (EditorImportPlugin) gd_get_import_order #

fn (s &EditorImportPlugin) gd_get_import_order() i64

Gets the order of this importer to be run when importing resources. Importers with [i]lower[/i] import orders will be called first, and higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. The default import order is 0 unless overridden by a specific importer. See [enum ResourceImporter.ImportOrder] for some predefined values.

fn (EditorImportPlugin) gd_get_format_version #

fn (s &EditorImportPlugin) gd_get_format_version() i64

Gets the format version of this importer. Increment this version when making incompatible changes to the format of the imported resources.

fn (EditorImportPlugin) gd_get_option_visibility #

fn (s &EditorImportPlugin) gd_get_option_visibility(path string, option_name string, options Dictionary) bool

Gets whether the import option specified by [param option_name] should be visible in the Import dock. The default implementation always returns true, making all options visible. This is mainly useful for hiding options that depend on others if one of them is disabled. [codeblocks] [gdscript] func _get_option_visibility(option, options):# Only show the lossy quality setting if the compression mode is set to "Lossy".if option == "compress/lossy_quality" and options.has("compress/mode"): return int(options["compress/mode"]) == COMPRESS_LOSSY # This is a constant that you set

return true [/gdscript] [csharp] public void _GetOptionVisibility(string option, Godot.Collections.Dictionary options) { // Only show the lossy quality setting if the compression mode is set to "Lossy". if (option == "compress/lossy_quality" && options.ContainsKey("compress/mode")) { return (int)options["compress/mode"] == CompressLossy; // This is a constant you set }

return true; } [/csharp] [/codeblocks]

fn (EditorImportPlugin) gd_import #

fn (s &EditorImportPlugin) gd_import(source_file string, save_path string, options Dictionary, platform_variants Array, gen_files Array) GDError

Imports [param source_file] with the import [param options] specified. Should return [constant @GlobalScope.OK] if the import is successful, other values indicate failure. The imported resource is expected to be saved to save_path + "." + _get_save_extension(). If a different variant is preferred for a [url=$DOCS_URL/tutorials/export/feature_tags.html]feature tag[/url], save the variant to save_path + "." + tag + "." + _get_save_extension() and add the feature tag to [param platform_variants]. If additional resource files are generated in the resource filesystem (res://), add their full path to [param gen_files] so that the editor knows they depend on [param source_file]. This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method.

fn (EditorImportPlugin) gd_can_import_threaded #

fn (s &EditorImportPlugin) gd_can_import_threaded() bool

Tells whether this importer can be run in parallel on threads, or, on the contrary, it's only safe for the editor to call it from the main thread, for one file at a time. If this method is not overridden, it will return false by default. If this importer's implementation is thread-safe and can be run in parallel, override this with true to optimize for concurrency.

fn (EditorImportPlugin) append_import_external_resource #

fn (s &EditorImportPlugin) append_import_external_resource(path string, cfg EditorImportPlugin_append_import_external_resource_Cfg) GDError

This function can only be called during the [method _import] callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the [param custom_options]. Additionally, in cases where multiple importers can handle a file, the [param custom_importer] can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. [param generator_parameters] defines optional extra metadata which will be stored as [code skip-lint]generator_parametersin theremapsection of the.import` file, for example to store a md5 hash of the source data.

struct EditorImportPlugin_append_import_external_resource_Cfg #

@[params]
struct EditorImportPlugin_append_import_external_resource_Cfg {
pub:
	custom_options       Dictionary
	custom_importer      string
	generator_parameters ToVariant
}

Optional parameters for EditorImportPlugin#append_import_external_resource

struct EditorInspector #

struct EditorInspector {
	ScrollContainer
}

A control used to edit properties of an object.

fn (EditorInspector) to_variant #

fn (s &EditorInspector) to_variant() Variant

fn (EditorInspector) from_variant #

fn (mut s EditorInspector) from_variant(variant &Variant)

fn (EditorInspector) edit #

fn (s &EditorInspector) edit(object Object)

Shows the properties of the given [param object] in this inspector for editing. To clear the inspector, call this method with null. [b]Note:[/b] If you want to edit an object in the editor's main inspector, use the edit_* methods in [EditorInterface] instead.

fn (EditorInspector) get_selected_path #

fn (s &EditorInspector) get_selected_path() string

Gets the path of the currently selected property.

fn (EditorInspector) get_edited_object #

fn (s &EditorInspector) get_edited_object() Object

Returns the object currently selected in this inspector.

struct EditorInspectorPlugin #

struct EditorInspectorPlugin {
	RefCounted
}

Plugin for adding custom property editors on the inspector.

fn (EditorInspectorPlugin) to_variant #

fn (s &EditorInspectorPlugin) to_variant() Variant

fn (EditorInspectorPlugin) from_variant #

fn (mut s EditorInspectorPlugin) from_variant(variant &Variant)

fn (EditorInspectorPlugin) gd_can_handle #

fn (s &EditorInspectorPlugin) gd_can_handle(object Object) bool

Returns true if this object can be handled by this plugin.

fn (EditorInspectorPlugin) gd_parse_begin #

fn (s &EditorInspectorPlugin) gd_parse_begin(object Object)

Called to allow adding controls at the beginning of the property list for [param object].

fn (EditorInspectorPlugin) gd_parse_category #

fn (s &EditorInspectorPlugin) gd_parse_category(object Object, category string)

Called to allow adding controls at the beginning of a category in the property list for [param object].

fn (EditorInspectorPlugin) gd_parse_group #

fn (s &EditorInspectorPlugin) gd_parse_group(object Object, group string)

Called to allow adding controls at the beginning of a group or a sub-group in the property list for [param object].

fn (EditorInspectorPlugin) gd_parse_property #

fn (s &EditorInspectorPlugin) gd_parse_property(object Object, gd_type VariantType, name string, hint_type PropertyHint, hint_string string, usage_flags PropertyUsageFlags, wide bool) bool

Called to allow adding property-specific editors to the property list for [param object]. The added editor control must extend [EditorProperty]. Returning true removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.

fn (EditorInspectorPlugin) gd_parse_end #

fn (s &EditorInspectorPlugin) gd_parse_end(object Object)

Called to allow adding controls at the end of the property list for [param object].

fn (EditorInspectorPlugin) add_custom_control #

fn (s &EditorInspectorPlugin) add_custom_control(control Control)

Adds a custom control, which is not necessarily a property editor.

fn (EditorInspectorPlugin) add_property_editor #

fn (s &EditorInspectorPlugin) add_property_editor(property string, editor Control, cfg EditorInspectorPlugin_add_property_editor_Cfg)

Adds a property editor for an individual property. The [param editor] control must extend [EditorProperty]. There can be multiple property editors for a property. If [param add_to_end] is true, this newly added editor will be displayed after all the other editors of the property whose [param add_to_end] is false. For example, the editor uses this parameter to add an "Edit Region" button for [member Sprite2D.region_rect] below the regular [Rect2] editor. [param label] can be used to choose a custom label for the property editor in the inspector. If left empty, the label is computed from the name of the property instead.

fn (EditorInspectorPlugin) add_property_editor_for_multiple_properties #

fn (s &EditorInspectorPlugin) add_property_editor_for_multiple_properties(label string, properties PackedStringArray, editor Control)

Adds an editor that allows modifying multiple properties. The [param editor] control must extend [EditorProperty].

struct EditorInspectorPlugin_add_property_editor_Cfg #

@[params]
struct EditorInspectorPlugin_add_property_editor_Cfg {
pub:
	add_to_end bool
	label      string
}

Optional parameters for EditorInspectorPlugin#add_property_editor

struct EditorInspector_instantiate_property_editor_Cfg #

@[params]
struct EditorInspector_instantiate_property_editor_Cfg {
pub:
	wide bool
}

Optional parameters for EditorInspector#instantiate_property_editor

struct EditorInterface #

struct EditorInterface {
	Object
}

Godot editor's interface.

fn (EditorInterface) to_variant #

fn (s &EditorInterface) to_variant() Variant

fn (EditorInterface) from_variant #

fn (mut s EditorInterface) from_variant(variant &Variant)

fn (EditorInterface) restart_editor #

fn (s &EditorInterface) restart_editor(cfg EditorInterface_restart_editor_Cfg)

Restarts the editor. This closes the editor and then opens the same project. If [param save] is true, the project will be saved before restarting.

fn (EditorInterface) get_command_palette #

fn (s &EditorInterface) get_command_palette() EditorCommandPalette

Returns the editor's [EditorCommandPalette] instance. [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.

fn (EditorInterface) get_resource_filesystem #

fn (s &EditorInterface) get_resource_filesystem() EditorFileSystem

Returns the editor's [EditorFileSystem] instance.

fn (EditorInterface) get_editor_paths #

fn (s &EditorInterface) get_editor_paths() EditorPaths

Returns the [EditorPaths] singleton.

fn (EditorInterface) get_resource_previewer #

fn (s &EditorInterface) get_resource_previewer() EditorResourcePreview

Returns the editor's [EditorResourcePreview] instance.

fn (EditorInterface) get_selection #

fn (s &EditorInterface) get_selection() EditorSelection

Returns the editor's [EditorSelection] instance.

fn (EditorInterface) get_editor_settings #

fn (s &EditorInterface) get_editor_settings() EditorSettings

Returns the editor's [EditorSettings] instance.

fn (EditorInterface) get_editor_toaster #

fn (s &EditorInterface) get_editor_toaster() EditorToaster

Returns the editor's [EditorToaster].

fn (EditorInterface) get_editor_undo_redo #

fn (s &EditorInterface) get_editor_undo_redo() EditorUndoRedoManager

Returns the editor's [EditorUndoRedoManager].

fn (EditorInterface) make_mesh_previews #

fn (s &EditorInterface) make_mesh_previews(meshes Array, preview_size i64) Array

Returns mesh previews rendered at the given size as an [Array] of [Texture2D]s.

fn (EditorInterface) set_plugin_enabled #

fn (s &EditorInterface) set_plugin_enabled(plugin string, enabled bool)

Sets the enabled status of a plugin. The plugin name is the same as its directory name.

fn (EditorInterface) is_plugin_enabled #

fn (s &EditorInterface) is_plugin_enabled(plugin string) bool

Returns true if the specified [param plugin] is enabled. The plugin name is the same as its directory name.

fn (EditorInterface) get_editor_theme #

fn (s &EditorInterface) get_editor_theme() Theme

Returns the editor's [Theme]. [b]Note:[/b] When creating custom editor UI, prefer accessing theme items directly from your GUI nodes using the get_theme_* methods.

fn (EditorInterface) get_base_control #

fn (s &EditorInterface) get_base_control() Control

Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. [b]Warning:[/b] Removing and freeing this node will render the editor useless and may cause a crash.

fn (EditorInterface) get_editor_main_screen #

fn (s &EditorInterface) get_editor_main_screen() VBoxContainer

Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement [method EditorPlugin._has_main_screen]. [b]Note:[/b] This node is a [VBoxContainer], which means that if you add a [Control] child to it, you need to set the child's [member Control.size_flags_vertical] to [constant Control.SIZE_EXPAND_FILL] to make it use the full available space. [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.

fn (EditorInterface) get_script_editor #

fn (s &EditorInterface) get_script_editor() ScriptEditor

Returns the editor's [ScriptEditor] instance. [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.

fn (EditorInterface) get_editor_viewport_2d #

fn (s &EditorInterface) get_editor_viewport_2d() SubViewport

Returns the 2D editor [SubViewport]. It does not have a camera. Instead, the view transforms are done directly and can be accessed with [member Viewport.global_canvas_transform].

fn (EditorInterface) get_editor_viewport_3d #

fn (s &EditorInterface) get_editor_viewport_3d(cfg EditorInterface_get_editor_viewport_3d_Cfg) SubViewport

Returns the specified 3D editor [SubViewport], from 0 to 3. The viewport can be used to access the active editor cameras with [method Viewport.get_camera_3d].

fn (EditorInterface) set_main_screen_editor #

fn (s &EditorInterface) set_main_screen_editor(name string)

Sets the editor's current main screen to the one specified in [param name]. [param name] must match the title of the tab in question exactly (e.g. 2D, 3D, [code skip-lint]Script, Game, or AssetLib` for default tabs).

fn (EditorInterface) set_distraction_free_mode #

fn (s &EditorInterface) set_distraction_free_mode(enter bool)

fn (EditorInterface) is_distraction_free_mode_enabled #

fn (s &EditorInterface) is_distraction_free_mode_enabled() bool

fn (EditorInterface) is_multi_window_enabled #

fn (s &EditorInterface) is_multi_window_enabled() bool

Returns true if multiple window support is enabled in the editor. Multiple window support is enabled if [i]all[/i] of these statements are true:- [member EditorSettings.interface/multi_window/enable] is true.

  • [member EditorSettings.interface/editor/single_window_mode] is false.
  • [member Viewport.gui_embed_subwindows] is false. This is forced to true on platforms that don't support multiple windows such as Web, or when the --single-window [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] is used.

fn (EditorInterface) get_editor_scale #

fn (s &EditorInterface) get_editor_scale() f64

Returns the actual scale of the editor UI (1.0 being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins. [b]Note:[/b] This value is set via the [member EditorSettings.interface/editor/display_scale] and [member EditorSettings.interface/editor/custom_display_scale] settings. The editor must be restarted for changes to be properly applied.

fn (EditorInterface) popup_dialog #

fn (s &EditorInterface) popup_dialog(dialog Window, cfg EditorInterface_popup_dialog_Cfg)

Pops up the [param dialog] in the editor UI with [method Window.popup_exclusive]. The dialog must have no current parent, otherwise the method fails. See also [method Window.set_unparent_when_invisible].

fn (EditorInterface) popup_dialog_centered #

fn (s &EditorInterface) popup_dialog_centered(dialog Window, cfg EditorInterface_popup_dialog_centered_Cfg)

Pops up the [param dialog] in the editor UI with [method Window.popup_exclusive_centered]. The dialog must have no current parent, otherwise the method fails. See also [method Window.set_unparent_when_invisible].

fn (EditorInterface) popup_dialog_centered_ratio #

fn (s &EditorInterface) popup_dialog_centered_ratio(dialog Window, cfg EditorInterface_popup_dialog_centered_ratio_Cfg)

Pops up the [param dialog] in the editor UI with [method Window.popup_exclusive_centered_ratio]. The dialog must have no current parent, otherwise the method fails. See also [method Window.set_unparent_when_invisible].

fn (EditorInterface) popup_dialog_centered_clamped #

fn (s &EditorInterface) popup_dialog_centered_clamped(dialog Window, cfg EditorInterface_popup_dialog_centered_clamped_Cfg)

Pops up the [param dialog] in the editor UI with [method Window.popup_exclusive_centered_clamped]. The dialog must have no current parent, otherwise the method fails. See also [method Window.set_unparent_when_invisible].

fn (EditorInterface) get_current_feature_profile #

fn (s &EditorInterface) get_current_feature_profile() string

Returns the name of the currently activated feature profile. If the default profile is currently active, an empty string is returned instead. In order to get a reference to the [EditorFeatureProfile], you must load the feature profile using [method EditorFeatureProfile.load_from_file]. [b]Note:[/b] Feature profiles created via the user interface are loaded from the feature_profiles directory, as a file with the .profile extension. The editor configuration folder can be found by using [method EditorPaths.get_config_dir].

fn (EditorInterface) set_current_feature_profile #

fn (s &EditorInterface) set_current_feature_profile(profile_name string)

Selects and activates the specified feature profile with the given [param profile_name]. Set [param profile_name] to an empty string to reset to the default feature profile. A feature profile can be created programmatically using the [EditorFeatureProfile] class. [b]Note:[/b] The feature profile that gets activated must be located in the feature_profiles directory, as a file with the .profile extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using [method EditorPaths.get_config_dir].

fn (EditorInterface) popup_node_selector #

fn (s &EditorInterface) popup_node_selector(callback Callable, cfg EditorInterface_popup_node_selector_Cfg)

Pops up an editor dialog for selecting a [Node] from the edited scene. The [param callback] must take a single argument of type [NodePath]. It is called on the selected [NodePath] or the empty path ^"" if the dialog is canceled. If [param valid_types] is provided, the dialog will only show Nodes that match one of the listed Node types. If [param current_value] is provided, the Node will be automatically selected in the tree, if it exists. [b]Example:[/b] Display the node selection dialog as soon as this node is added to the tree for the first time:

func _ready():
if Engine.is_editor_hint():
EditorInterface.popup_node_selector(_on_node_selected, ['Button'])

func _on_node_selected(node_path):
if node_path.is_empty():
print('node selection canceled')
else:
print('selected ', node_path)

fn (EditorInterface) popup_property_selector #

fn (s &EditorInterface) popup_property_selector(object Object, callback Callable, cfg EditorInterface_popup_property_selector_Cfg)

Pops up an editor dialog for selecting properties from [param object]. The [param callback] must take a single argument of type [NodePath]. It is called on the selected property path (see [method NodePath.get_as_property_path]) or the empty path ^"" if the dialog is canceled. If [param type_filter] is provided, the dialog will only show properties that match one of the listed [enum Variant.Type] values. If [param current_value] is provided, the property will be selected automatically in the property list, if it exists.

func _ready():
if Engine.is_editor_hint():
EditorInterface.popup_property_selector(this, _on_property_selected, [TYPE_INT])

func _on_property_selected(property_path):
if property_path.is_empty():
print('property selection canceled')
else:
print('selected ', property_path)

fn (EditorInterface) popup_method_selector #

fn (s &EditorInterface) popup_method_selector(object Object, callback Callable, cfg EditorInterface_popup_method_selector_Cfg)

Pops up an editor dialog for selecting a method from [param object]. The [param callback] must take a single argument of type [String] which will contain the name of the selected method or be empty if the dialog is canceled. If [param current_value] is provided, the method will be selected automatically in the method list, if it exists.

fn (EditorInterface) popup_quick_open #

fn (s &EditorInterface) popup_quick_open(callback Callable, cfg EditorInterface_popup_quick_open_Cfg)

Pops up an editor dialog for quick selecting a resource file. The [param callback] must take a single argument of type [String] which will contain the path of the selected resource or be empty if the dialog is canceled. If [param base_types] is provided, the dialog will only show resources that match these types. Only types deriving from [Resource] are supported.

fn (EditorInterface) popup_create_dialog #

fn (s &EditorInterface) popup_create_dialog(callback Callable, cfg EditorInterface_popup_create_dialog_Cfg)

Pops up an editor dialog for creating an object. The [param callback] must take a single argument of type [StringName] which will contain the type name of the selected object or be empty if no item is selected. The [param base_type] specifies the base type of objects to display. For example, if you set this to "Resource", all types derived from [Resource] will display in the create dialog. The [param current_type] will be passed in the search box of the create dialog, and the specified type can be immediately selected when the dialog pops up. If the [param current_type] is not derived from [param base_type], there will be no result of the type in the dialog. The [param dialog_title] allows you to define a custom title for the dialog. This is useful if you want to accurately hint the usage of the dialog. If the [param dialog_title] is an empty string, the dialog will use "Create New 'Base Type'" as the default title. The [param type_blocklist] contains a list of type names, and the types in the blocklist will be hidden from the create dialog. [b]Note:[/b] Trying to list the base type in the [param type_blocklist] will hide all types derived from the base type from the create dialog.

fn (EditorInterface) get_file_system_dock #

fn (s &EditorInterface) get_file_system_dock() FileSystemDock

Returns the editor's [FileSystemDock] instance. [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.

fn (EditorInterface) select_file #

fn (s &EditorInterface) select_file(file string)

Selects the file, with the path provided by [param file], in the FileSystem dock.

fn (EditorInterface) get_selected_paths #

fn (s &EditorInterface) get_selected_paths() PackedStringArray

Returns an array containing the paths of the currently selected files (and directories) in the [FileSystemDock].

fn (EditorInterface) get_current_path #

fn (s &EditorInterface) get_current_path() string

Returns the current path being viewed in the [FileSystemDock].

fn (EditorInterface) get_current_directory #

fn (s &EditorInterface) get_current_directory() string

Returns the current directory being viewed in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead.

fn (EditorInterface) get_inspector #

fn (s &EditorInterface) get_inspector() EditorInspector

Returns the editor's [EditorInspector] instance. [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.

fn (EditorInterface) inspect_object #

fn (s &EditorInterface) inspect_object(object Object, cfg EditorInterface_inspect_object_Cfg)

Shows the given property on the given [param object] in the editor's Inspector dock. If [param inspector_only] is true, plugins will not attempt to edit [param object].

fn (EditorInterface) edit_resource #

fn (s &EditorInterface) edit_resource(resource Resource)

Edits the given [Resource]. If the resource is a [Script] you can also edit it with [method edit_script] to specify the line and column position.

fn (EditorInterface) edit_node #

fn (s &EditorInterface) edit_node(node Node)

Edits the given [Node]. The node will be also selected if it's inside the scene tree.

fn (EditorInterface) edit_script #

fn (s &EditorInterface) edit_script(script Script, cfg EditorInterface_edit_script_Cfg)

Edits the given [Script]. The line and column on which to open the script can also be specified. The script will be open with the user-configured editor for the script's language which may be an external editor.

fn (EditorInterface) open_scene_from_path #

fn (s &EditorInterface) open_scene_from_path(scene_filepath string, cfg EditorInterface_open_scene_from_path_Cfg)

Opens the scene at the given path. If [param set_inherited] is true, creates a new inherited scene.

fn (EditorInterface) reload_scene_from_path #

fn (s &EditorInterface) reload_scene_from_path(scene_filepath string)

Reloads the scene at the given path.

fn (EditorInterface) get_open_scenes #

fn (s &EditorInterface) get_open_scenes() PackedStringArray

Returns an array with the file paths of the currently opened scenes.

fn (EditorInterface) get_open_scene_roots #

fn (s &EditorInterface) get_open_scene_roots() Array

Returns an array with references to the root nodes of the currently opened scenes.

fn (EditorInterface) get_edited_scene_root #

fn (s &EditorInterface) get_edited_scene_root() Node

Returns the edited (current) scene's root [Node].

fn (EditorInterface) save_scene #

fn (s &EditorInterface) save_scene() GDError

Saves the currently active scene. Returns either [constant OK] or [constant ERR_CANT_CREATE].

fn (EditorInterface) save_scene_as #

fn (s &EditorInterface) save_scene_as(path string, cfg EditorInterface_save_scene_as_Cfg)

Saves the currently active scene as a file at [param path]. [b]Note:[/b] The [param with_preview] parameter has no effect.

fn (EditorInterface) save_all_scenes #

fn (s &EditorInterface) save_all_scenes()

Saves all opened scenes in the editor.

fn (EditorInterface) close_scene #

fn (s &EditorInterface) close_scene() GDError

Closes the currently active scene, discarding any pending changes in the process. Returns [constant OK] on success or [constant ERR_DOES_NOT_EXIST] if there is no scene to close.

fn (EditorInterface) mark_scene_as_unsaved #

fn (s &EditorInterface) mark_scene_as_unsaved()

Marks the current scene tab as unsaved.

fn (EditorInterface) play_main_scene #

fn (s &EditorInterface) play_main_scene()

Plays the main scene.

fn (EditorInterface) play_current_scene #

fn (s &EditorInterface) play_current_scene()

Plays the currently active scene.

fn (EditorInterface) play_custom_scene #

fn (s &EditorInterface) play_custom_scene(scene_filepath string)

Plays the scene specified by its filepath.

fn (EditorInterface) stop_playing_scene #

fn (s &EditorInterface) stop_playing_scene()

Stops the scene that is currently playing.

fn (EditorInterface) is_playing_scene #

fn (s &EditorInterface) is_playing_scene() bool

Returns true if a scene is currently being played, false otherwise. Paused scenes are considered as being played.

fn (EditorInterface) get_playing_scene #

fn (s &EditorInterface) get_playing_scene() string

Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string.

fn (EditorInterface) set_movie_maker_enabled #

fn (s &EditorInterface) set_movie_maker_enabled(enabled bool)

fn (EditorInterface) is_movie_maker_enabled #

fn (s &EditorInterface) is_movie_maker_enabled() bool

struct EditorInterface_edit_script_Cfg #

@[params]
struct EditorInterface_edit_script_Cfg {
pub:
	line       i64 = -1
	column     i64
	grab_focus bool
}

Optional parameters for EditorInterface#edit_script

struct EditorInterface_get_editor_viewport_3d_Cfg #

@[params]
struct EditorInterface_get_editor_viewport_3d_Cfg {
pub:
	idx i64
}

Optional parameters for EditorInterface#get_editor_viewport_3d

struct EditorInterface_inspect_object_Cfg #

@[params]
struct EditorInterface_inspect_object_Cfg {
pub:
	for_property   string
	inspector_only bool
}

Optional parameters for EditorInterface#inspect_object

struct EditorInterface_open_scene_from_path_Cfg #

@[params]
struct EditorInterface_open_scene_from_path_Cfg {
pub:
	set_inherited bool
}

Optional parameters for EditorInterface#open_scene_from_path

struct EditorInterface_popup_create_dialog_Cfg #

@[params]
struct EditorInterface_popup_create_dialog_Cfg {
pub:
	base_type      string
	current_type   string
	dialog_title   string
	type_blocklist Array
}

Optional parameters for EditorInterface#popup_create_dialog

struct EditorInterface_popup_dialog_Cfg #

@[params]
struct EditorInterface_popup_dialog_Cfg {
pub:
	rect Rect2i = Rect2i{Vector2i{0, 0}, Vector2i{0, 0}}
}

Optional parameters for EditorInterface#popup_dialog

struct EditorInterface_popup_dialog_centered_Cfg #

@[params]
struct EditorInterface_popup_dialog_centered_Cfg {
pub:
	minsize Vector2i = Vector2i{0, 0}
}

Optional parameters for EditorInterface#popup_dialog_centered

struct EditorInterface_popup_dialog_centered_clamped_Cfg #

@[params]
struct EditorInterface_popup_dialog_centered_clamped_Cfg {
pub:
	minsize        Vector2i = Vector2i{0, 0}
	fallback_ratio f64      = 0.75
}

Optional parameters for EditorInterface#popup_dialog_centered_clamped

struct EditorInterface_popup_dialog_centered_ratio_Cfg #

@[params]
struct EditorInterface_popup_dialog_centered_ratio_Cfg {
pub:
	ratio f64 = 0.8
}

Optional parameters for EditorInterface#popup_dialog_centered_ratio

struct EditorInterface_popup_method_selector_Cfg #

@[params]
struct EditorInterface_popup_method_selector_Cfg {
pub:
	current_value string
}

Optional parameters for EditorInterface#popup_method_selector

struct EditorInterface_popup_node_selector_Cfg #

@[params]
struct EditorInterface_popup_node_selector_Cfg {
pub:
	valid_types   Array
	current_value Node
}

Optional parameters for EditorInterface#popup_node_selector

struct EditorInterface_popup_property_selector_Cfg #

@[params]
struct EditorInterface_popup_property_selector_Cfg {
pub:
	type_filter   PackedInt32Array = PackedInt32Array{}
	current_value string
}

Optional parameters for EditorInterface#popup_property_selector

struct EditorInterface_popup_quick_open_Cfg #

@[params]
struct EditorInterface_popup_quick_open_Cfg {
pub:
	base_types Array
}

Optional parameters for EditorInterface#popup_quick_open

struct EditorInterface_restart_editor_Cfg #

@[params]
struct EditorInterface_restart_editor_Cfg {
pub:
	save bool
}

Optional parameters for EditorInterface#restart_editor

struct EditorInterface_save_scene_as_Cfg #

@[params]
struct EditorInterface_save_scene_as_Cfg {
pub:
	with_preview bool
}

Optional parameters for EditorInterface#save_scene_as

struct EditorNode3DGizmo #

struct EditorNode3DGizmo {
	Node3DGizmo
}

Gizmo for editing [Node3D] objects.

fn (EditorNode3DGizmo) to_variant #

fn (s &EditorNode3DGizmo) to_variant() Variant

fn (EditorNode3DGizmo) from_variant #

fn (mut s EditorNode3DGizmo) from_variant(variant &Variant)

fn (EditorNode3DGizmo) gd_redraw #

fn (s &EditorNode3DGizmo) gd_redraw()

Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call [method clear] at the beginning of this method and then add visual elements depending on the node's properties.

fn (EditorNode3DGizmo) gd_get_handle_name #

fn (s &EditorNode3DGizmo) gd_get_handle_name(id i64, secondary bool) string

Override this method to return the name of an edited handle (handles must have been previously added by [method add_handles]). Handles can be named for reference to the user when editing. The [param secondary] argument is true when the requested handle is secondary (see [method add_handles] for more information).

fn (EditorNode3DGizmo) gd_is_handle_highlighted #

fn (s &EditorNode3DGizmo) gd_is_handle_highlighted(id i64, secondary bool) bool

Override this method to return true whenever the given handle should be highlighted in the editor. The [param secondary] argument is true when the requested handle is secondary (see [method add_handles] for more information).

fn (EditorNode3DGizmo) gd_get_handle_value #

fn (s &EditorNode3DGizmo) gd_get_handle_value(id i64, secondary bool) Variant

Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the restore argument in [method _commit_handle]. The [param secondary] argument is true when the requested handle is secondary (see [method add_handles] for more information).

fn (EditorNode3DGizmo) gd_begin_handle_action #

fn (s &EditorNode3DGizmo) gd_begin_handle_action(id i64, secondary bool)

fn (EditorNode3DGizmo) gd_set_handle #

fn (s &EditorNode3DGizmo) gd_set_handle(id i64, secondary bool, camera Camera3D, point Vector2)

Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [param point] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts. The [param secondary] argument is true when the edited handle is secondary (see [method add_handles] for more information).

fn (EditorNode3DGizmo) gd_commit_handle #

fn (s &EditorNode3DGizmo) gd_commit_handle(id i64, secondary bool, restore_ ToVariant, cancel bool)

Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo". If the [param cancel] argument is true, the [param restore] value should be directly set, without any [UndoRedo] action. The [param secondary] argument is true when the committed handle is secondary (see [method add_handles] for more information).

fn (EditorNode3DGizmo) gd_subgizmos_intersect_ray #

fn (s &EditorNode3DGizmo) gd_subgizmos_intersect_ray(camera Camera3D, point Vector2) i64

Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param point] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos].

fn (EditorNode3DGizmo) gd_subgizmos_intersect_frustum #

fn (s &EditorNode3DGizmo) gd_subgizmos_intersect_frustum(camera Camera3D, frustum Array) PackedInt32Array

Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and a [param frustum], this method should return which subgizmos are contained within the frustum. The [param frustum] argument consists of an array with all the [Plane]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos].

fn (EditorNode3DGizmo) gd_set_subgizmo_transform #

fn (s &EditorNode3DGizmo) gd_set_subgizmo_transform(id i64, transform Transform3D)

Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the [Node3D]'s local coordinate system.

fn (EditorNode3DGizmo) gd_get_subgizmo_transform #

fn (s &EditorNode3DGizmo) gd_get_subgizmo_transform(id i64) Transform3D

Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the restore argument in [method _commit_subgizmos].

fn (EditorNode3DGizmo) gd_commit_subgizmos #

fn (s &EditorNode3DGizmo) gd_commit_subgizmos(ids PackedInt32Array, restores Array, cancel bool)

Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo". If the [param cancel] argument is true, the [param restores] transforms should be directly set, without any [UndoRedo] action.

fn (EditorNode3DGizmo) add_lines #

fn (s &EditorNode3DGizmo) add_lines(lines PackedVector3Array, material Material, cfg EditorNode3DGizmo_add_lines_Cfg)

Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during [method _redraw].

fn (EditorNode3DGizmo) add_mesh #

fn (s &EditorNode3DGizmo) add_mesh(mesh Mesh, cfg EditorNode3DGizmo_add_mesh_Cfg)

Adds a mesh to the gizmo with the specified [param material], local [param transform] and [param skeleton]. Call this method during [method _redraw].

fn (EditorNode3DGizmo) add_collision_segments #

fn (s &EditorNode3DGizmo) add_collision_segments(segments PackedVector3Array)

Adds the specified [param segments] to the gizmo's collision shape for picking. Call this method during [method _redraw].

fn (EditorNode3DGizmo) add_collision_triangles #

fn (s &EditorNode3DGizmo) add_collision_triangles(triangles TriangleMesh)

Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this method during [method _redraw].

fn (EditorNode3DGizmo) add_unscaled_billboard #

fn (s &EditorNode3DGizmo) add_unscaled_billboard(material Material, cfg EditorNode3DGizmo_add_unscaled_billboard_Cfg)

Adds an unscaled billboard for visualization and selection. Call this method during [method _redraw].

fn (EditorNode3DGizmo) add_handles #

fn (s &EditorNode3DGizmo) add_handles(handles PackedVector3Array, material Material, ids PackedInt32Array, cfg EditorNode3DGizmo_add_handles_Cfg)

Adds a list of handles (points) which can be used to edit the properties of the gizmo's [Node3D]. The [param ids] argument can be used to specify a custom identifier for each handle, if an empty array is passed, the ids will be assigned automatically from the [param handles] argument order. The [param secondary] argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection. There are virtual methods which will be called upon editing of these handles. Call this method during [method _redraw].

fn (EditorNode3DGizmo) set_node_3d #

fn (s &EditorNode3DGizmo) set_node_3d(node Node)

Sets the reference [Node3D] node for the gizmo. [param node] must inherit from [Node3D].

fn (EditorNode3DGizmo) get_node_3d #

fn (s &EditorNode3DGizmo) get_node_3d() Node3D

Returns the [Node3D] node associated with this gizmo.

fn (EditorNode3DGizmo) get_plugin #

fn (s &EditorNode3DGizmo) get_plugin() EditorNode3DGizmoPlugin

Returns the [EditorNode3DGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorNode3DGizmoPlugin.get_material].

fn (EditorNode3DGizmo) clear #

fn (s &EditorNode3DGizmo) clear()

Removes everything in the gizmo including meshes, collisions and handles.

fn (EditorNode3DGizmo) set_hidden #

fn (s &EditorNode3DGizmo) set_hidden(hidden bool)

Sets the gizmo's hidden state. If true, the gizmo will be hidden. If false, it will be shown.

fn (EditorNode3DGizmo) is_subgizmo_selected #

fn (s &EditorNode3DGizmo) is_subgizmo_selected(id i64) bool

Returns true if the given subgizmo is currently selected. Can be used to highlight selected elements during [method _redraw].

fn (EditorNode3DGizmo) get_subgizmo_selection #

fn (s &EditorNode3DGizmo) get_subgizmo_selection() PackedInt32Array

Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during [method _redraw].

struct EditorNode3DGizmoPlugin #

struct EditorNode3DGizmoPlugin {
	Resource
}

A class used by the editor to define Node3D gizmo types.

fn (EditorNode3DGizmoPlugin) to_variant #

fn (s &EditorNode3DGizmoPlugin) to_variant() Variant

fn (EditorNode3DGizmoPlugin) from_variant #

fn (mut s EditorNode3DGizmoPlugin) from_variant(variant &Variant)

fn (EditorNode3DGizmoPlugin) gd_has_gizmo #

fn (s &EditorNode3DGizmoPlugin) gd_has_gizmo(for_node_3d Node3D) bool

Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns true the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos.

fn (EditorNode3DGizmoPlugin) gd_create_gizmo #

fn (s &EditorNode3DGizmoPlugin) gd_create_gizmo(for_node_3d Node3D) EditorNode3DGizmo

Override this method to return a custom [EditorNode3DGizmo] for the 3D nodes of your choice, return null for the rest of nodes. See also [method _has_gizmo].

fn (EditorNode3DGizmoPlugin) gd_get_gizmo_name #

fn (s &EditorNode3DGizmoPlugin) gd_get_gizmo_name() string

Override this method to provide the name that will appear in the gizmo visibility menu.

fn (EditorNode3DGizmoPlugin) gd_get_priority #

fn (s &EditorNode3DGizmoPlugin) gd_get_priority() i64

Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection. All built-in editor gizmos return a priority of -1. If not overridden, this method will return 0, which means custom gizmos will automatically get higher priority than built-in gizmos.

fn (EditorNode3DGizmoPlugin) gd_can_be_hidden #

fn (s &EditorNode3DGizmoPlugin) gd_can_be_hidden() bool

Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns true if not overridden.

fn (EditorNode3DGizmoPlugin) gd_is_selectable_when_hidden #

fn (s &EditorNode3DGizmoPlugin) gd_is_selectable_when_hidden() bool

Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden.

fn (EditorNode3DGizmoPlugin) gd_redraw #

fn (s &EditorNode3DGizmoPlugin) gd_redraw(gizmo EditorNode3DGizmo)

Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call [method EditorNode3DGizmo.clear] at the beginning of this method and then add visual elements depending on the node's properties.

fn (EditorNode3DGizmoPlugin) gd_get_handle_name #

fn (s &EditorNode3DGizmoPlugin) gd_get_handle_name(gizmo EditorNode3DGizmo, handle_id i64, secondary bool) string

Override this method to provide gizmo's handle names. The [param secondary] argument is true when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) gd_is_handle_highlighted #

fn (s &EditorNode3DGizmoPlugin) gd_is_handle_highlighted(gizmo EditorNode3DGizmo, handle_id i64, secondary bool) bool

Override this method to return true whenever to given handle should be highlighted in the editor. The [param secondary] argument is true when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) gd_get_handle_value #

fn (s &EditorNode3DGizmoPlugin) gd_get_handle_value(gizmo EditorNode3DGizmo, handle_id i64, secondary bool) Variant

Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the restore argument in [method _commit_handle]. The [param secondary] argument is true when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) gd_begin_handle_action #

fn (s &EditorNode3DGizmoPlugin) gd_begin_handle_action(gizmo EditorNode3DGizmo, handle_id i64, secondary bool)

fn (EditorNode3DGizmoPlugin) gd_set_handle #

fn (s &EditorNode3DGizmoPlugin) gd_set_handle(gizmo EditorNode3DGizmo, handle_id i64, secondary bool, camera Camera3D, screen_pos Vector2)

Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [param screen_pos] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts. The [param secondary] argument is true when the edited handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) gd_commit_handle #

fn (s &EditorNode3DGizmoPlugin) gd_commit_handle(gizmo EditorNode3DGizmo, handle_id i64, secondary bool, restore_ ToVariant, cancel bool)

Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo". If the [param cancel] argument is true, the [param restore] value should be directly set, without any [UndoRedo] action. The [param secondary] argument is true when the committed handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) gd_subgizmos_intersect_ray #

fn (s &EditorNode3DGizmoPlugin) gd_subgizmos_intersect_ray(gizmo EditorNode3DGizmo, camera Camera3D, screen_pos Vector2) i64

Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param screen_pos] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) gd_subgizmos_intersect_frustum #

fn (s &EditorNode3DGizmoPlugin) gd_subgizmos_intersect_frustum(gizmo EditorNode3DGizmo, camera Camera3D, frustum_planes Array) PackedInt32Array

Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and [param frustum_planes], this method should return which subgizmos are contained within the frustums. The [param frustum_planes] argument consists of an array with all the [Plane]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) gd_get_subgizmo_transform #

fn (s &EditorNode3DGizmoPlugin) gd_get_subgizmo_transform(gizmo EditorNode3DGizmo, subgizmo_id i64) Transform3D

Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the restore argument in [method _commit_subgizmos]. Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) gd_set_subgizmo_transform #

fn (s &EditorNode3DGizmoPlugin) gd_set_subgizmo_transform(gizmo EditorNode3DGizmo, subgizmo_id i64, transform Transform3D)

Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) gd_commit_subgizmos #

fn (s &EditorNode3DGizmoPlugin) gd_commit_subgizmos(gizmo EditorNode3DGizmo, ids PackedInt32Array, restores Array, cancel bool)

Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo". If the [param cancel] argument is true, the [param restores] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos.

fn (EditorNode3DGizmoPlugin) create_material #

fn (s &EditorNode3DGizmoPlugin) create_material(name string, color Color, cfg EditorNode3DGizmoPlugin_create_material_Cfg)

Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden.

fn (EditorNode3DGizmoPlugin) create_icon_material #

fn (s &EditorNode3DGizmoPlugin) create_icon_material(name string, texture Texture2D, cfg EditorNode3DGizmoPlugin_create_icon_material_Cfg)

Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden.

fn (EditorNode3DGizmoPlugin) create_handle_material #

fn (s &EditorNode3DGizmoPlugin) create_handle_material(name string, cfg EditorNode3DGizmoPlugin_create_handle_material_Cfg)

Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden. You can optionally provide a texture to use instead of the default icon.

fn (EditorNode3DGizmoPlugin) add_material #

fn (s &EditorNode3DGizmoPlugin) add_material(name string, material StandardMaterial3D)

Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden.

fn (EditorNode3DGizmoPlugin) get_material #

fn (s &EditorNode3DGizmoPlugin) get_material(name string, cfg EditorNode3DGizmoPlugin_get_material_Cfg) StandardMaterial3D

Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).

struct EditorNode3DGizmoPlugin_create_handle_material_Cfg #

@[params]
struct EditorNode3DGizmoPlugin_create_handle_material_Cfg {
pub:
	billboard bool
	texture   Texture2D
}

Optional parameters for EditorNode3DGizmoPlugin#create_handle_material

struct EditorNode3DGizmoPlugin_create_icon_material_Cfg #

@[params]
struct EditorNode3DGizmoPlugin_create_icon_material_Cfg {
pub:
	on_top bool
	color  Color = Color{1, 1, 1, 1}
}

Optional parameters for EditorNode3DGizmoPlugin#create_icon_material

struct EditorNode3DGizmoPlugin_create_material_Cfg #

@[params]
struct EditorNode3DGizmoPlugin_create_material_Cfg {
pub:
	billboard        bool
	on_top           bool
	use_vertex_color bool
}

Optional parameters for EditorNode3DGizmoPlugin#create_material

struct EditorNode3DGizmoPlugin_get_material_Cfg #

@[params]
struct EditorNode3DGizmoPlugin_get_material_Cfg {
pub:
	gizmo EditorNode3DGizmo
}

Optional parameters for EditorNode3DGizmoPlugin#get_material

struct EditorNode3DGizmo_add_handles_Cfg #

@[params]
struct EditorNode3DGizmo_add_handles_Cfg {
pub:
	billboard bool
	secondary bool
}

Optional parameters for EditorNode3DGizmo#add_handles

struct EditorNode3DGizmo_add_lines_Cfg #

@[params]
struct EditorNode3DGizmo_add_lines_Cfg {
pub:
	billboard bool
	modulate  Color = Color{1, 1, 1, 1}
}

Optional parameters for EditorNode3DGizmo#add_lines

struct EditorNode3DGizmo_add_mesh_Cfg #

@[params]
struct EditorNode3DGizmo_add_mesh_Cfg {
pub:
	material  Material
	transform Transform3D = Transform3D{Basis{Vector3{1, 0, 0}, Vector3{0, 1, 0}, Vector3{0, 0, 1}}, Vector3{0, 0, 0}}
	skeleton  SkinReference
}

Optional parameters for EditorNode3DGizmo#add_mesh

struct EditorNode3DGizmo_add_unscaled_billboard_Cfg #

@[params]
struct EditorNode3DGizmo_add_unscaled_billboard_Cfg {
pub:
	default_scale f64   = 1
	modulate      Color = Color{1, 1, 1, 1}
}

Optional parameters for EditorNode3DGizmo#add_unscaled_billboard

struct EditorPaths #

struct EditorPaths {
	Object
}

Editor-only singleton that returns paths to various OS-specific data folders and files.

fn (EditorPaths) to_variant #

fn (s &EditorPaths) to_variant() Variant

fn (EditorPaths) from_variant #

fn (mut s EditorPaths) from_variant(variant &Variant)

fn (EditorPaths) get_data_dir #

fn (s &EditorPaths) get_data_dir() string

Returns the absolute path to the user's data folder. This folder should be used for [i]persistent[/i] user data files such as installed export templates. [b]Default paths per platform:[/b] [codeblock lang=text]- Windows: %APPDATA%\Godot\ (same as get_config_dir())

  • macOS: ~/Library/Application Support/Godot/ (same as get_config_dir())
  • Linux: ~/.local/share/godot/

fn (EditorPaths) get_config_dir #

fn (s &EditorPaths) get_config_dir() string

Returns the absolute path to the user's configuration folder. This folder should be used for [i]persistent[/i] user configuration files. [b]Default paths per platform:[/b] [codeblock lang=text]- Windows: %APPDATA%\Godot\ (same as get_data_dir())

  • macOS: ~/Library/Application Support/Godot/ (same as get_data_dir())
  • Linux: ~/.config/godot/

fn (EditorPaths) get_cache_dir #

fn (s &EditorPaths) get_cache_dir() string

Returns the absolute path to the user's cache folder. This folder should be used for temporary data that can be removed safely whenever the editor is closed (such as generated resource thumbnails). [b]Default paths per platform:[/b] [codeblock lang=text]- Windows: %LOCALAPPDATA%\Godot\

  • macOS: ~/Library/Caches/Godot/
  • Linux: ~/.cache/godot/

fn (EditorPaths) is_self_contained #

fn (s &EditorPaths) is_self_contained() bool

Returns true if the editor is marked as self-contained, false otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an editor_data/ folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects. Self-contained mode can be enabled by creating a file named ._sc_ or _sc_ in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also [method get_self_contained_file]. [b]Note:[/b] On macOS, quarantine flag should be manually removed before using self-contained mode, see [url=https://docs.godotengine.org/en/stable/tutorials/export/running_on_macos.html]Running on macOS[/url]. [b]Note:[/b] On macOS, placing _sc_ or any other file inside .app bundle will break digital signature and make it non-portable, consider placing it in the same folder as the .app bundle instead. [b]Note:[/b] The Steam release of Godot uses self-contained mode by default.

fn (EditorPaths) get_self_contained_file #

fn (s &EditorPaths) get_self_contained_file() string

Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn't self-contained. See also [method is_self_contained].

fn (EditorPaths) get_project_settings_dir #

fn (s &EditorPaths) get_project_settings_dir() string

Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved.

struct EditorPlugin #

struct EditorPlugin {
	Node
}

Used by the editor to extend its functionality.

fn (EditorPlugin) to_variant #

fn (s &EditorPlugin) to_variant() Variant

fn (EditorPlugin) from_variant #

fn (mut s EditorPlugin) from_variant(variant &Variant)

fn (EditorPlugin) gd_forward_canvas_gui_input #

fn (s &EditorPlugin) gd_forward_canvas_gui_input(event InputEvent) bool

Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 2D viewport. If this method returns true, [param event] is intercepted by this [EditorPlugin], otherwise [param event] is forwarded to other Editor classes. [codeblocks] [gdscript]# Prevents the InputEvent from reaching other Editor classes.func _forward_canvas_gui_input(event): return true [/gdscript] [csharp] // Prevents the InputEvent from reaching other Editor classes. public override bool ForwardCanvasGuiInput(InputEvent @event) { return true; } [/csharp] [/codeblocks] This method must return false in order to forward the [InputEvent] to other Editor classes. [codeblocks] [gdscript]# Consumes InputEventMouseMotion and forwards other InputEvent types.func _forward_canvas_gui_input(event): if (event is InputEventMouseMotion): return true return false [/gdscript] [csharp] // Consumes InputEventMouseMotion and forwards other InputEvent types. public override bool _ForwardCanvasGuiInput(InputEvent @event) { if (@event is InputEventMouseMotion) { return true; } return false; } [/csharp] [/codeblocks]

fn (EditorPlugin) gd_forward_canvas_draw_over_viewport #

fn (s &EditorPlugin) gd_forward_canvas_draw_over_viewport(viewport_control Control)

Called by the engine when the 2D editor's viewport is updated. [param viewport_control] is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling [method update_overlays]. [codeblocks] [gdscript] func _forward_canvas_draw_over_viewport(overlay):# Draw a circle at the cursor's position.overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)

func _forward_canvas_gui_input(event): if event is InputEventMouseMotion:# Redraw the viewport when the cursor is moved.update_overlays() return true return false [/gdscript] [csharp] public override void _ForwardCanvasDrawOverViewport(Control viewportControl) { // Draw a circle at the cursor's position. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White); }

public override bool _ForwardCanvasGuiInput(InputEvent @event) { if (@event is InputEventMouseMotion) { // Redraw the viewport when the cursor is moved. UpdateOverlays(); return true; } return false; } [/csharp] [/codeblocks]

fn (EditorPlugin) gd_forward_canvas_force_draw_over_viewport #

fn (s &EditorPlugin) gd_forward_canvas_force_draw_over_viewport(viewport_control Control)

This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].

fn (EditorPlugin) gd_forward_3d_gui_input #

fn (s &EditorPlugin) gd_forward_3d_gui_input(viewport_camera Camera3D, event InputEvent) i64

Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 3D viewport. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options. [codeblocks] [gdscript]# Prevents the InputEvent from reaching other Editor classes.func _forward_3d_gui_input(camera, event): return EditorPlugin.AFTER_GUI_INPUT_STOP [/gdscript] [csharp] // Prevents the InputEvent from reaching other Editor classes. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event) { return EditorPlugin.AfterGuiInput.Stop; } [/csharp] [/codeblocks] This method must return [constant AFTER_GUI_INPUT_PASS] in order to forward the [InputEvent] to other Editor classes. [codeblocks] [gdscript]# Consumes InputEventMouseMotion and forwards other InputEvent types.func _forward_3d_gui_input(camera, event): return EditorPlugin.AFTER_GUI_INPUT_STOP if event is InputEventMouseMotion else EditorPlugin.AFTER_GUI_INPUT_PASS [/gdscript] [csharp] // Consumes InputEventMouseMotion and forwards other InputEvent types. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event) { return @event is InputEventMouseMotion ? EditorPlugin.AfterGuiInput.Stop : EditorPlugin.AfterGuiInput.Pass; } [/csharp] [/codeblocks]

fn (EditorPlugin) gd_forward_3d_draw_over_viewport #

fn (s &EditorPlugin) gd_forward_3d_draw_over_viewport(viewport_control Control)

Called by the engine when the 3D editor's viewport is updated. [param viewport_control] is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling [method update_overlays]. [codeblocks] [gdscript] func _forward_3d_draw_over_viewport(overlay):# Draw a circle at the cursor's position.overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)

func _forward_3d_gui_input(camera, event): if event is InputEventMouseMotion:# Redraw the viewport when the cursor is moved.update_overlays() return EditorPlugin.AFTER_GUI_INPUT_STOP return EditorPlugin.AFTER_GUI_INPUT_PASS [/gdscript] [csharp] public override void _Forward3DDrawOverViewport(Control viewportControl) { // Draw a circle at the cursor's position. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White); }

public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D viewportCamera, InputEvent @event) { if (@event is InputEventMouseMotion) { // Redraw the viewport when the cursor is moved. UpdateOverlays(); return EditorPlugin.AfterGuiInput.Stop; } return EditorPlugin.AfterGuiInput.Pass; } [/csharp] [/codeblocks]

fn (EditorPlugin) gd_forward_3d_force_draw_over_viewport #

fn (s &EditorPlugin) gd_forward_3d_force_draw_over_viewport(viewport_control Control)

This method is the same as [method _forward_3d_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].

fn (EditorPlugin) gd_get_plugin_name #

fn (s &EditorPlugin) gd_get_plugin_name() string

Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons.

fn (EditorPlugin) gd_get_plugin_icon #

fn (s &EditorPlugin) gd_get_plugin_icon() Texture2D

Override this method in your plugin to return a [Texture2D] in order to give it an icon. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons. Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size. [codeblocks] [gdscript] func _get_plugin_icon():# You can use a custom icon:return preload("res://addons/my_plugin/my_plugin_icon.svg")# Or use a built-in icon:return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons") [/gdscript] [csharp] public override Texture2D _GetPluginIcon() { // You can use a custom icon: return ResourceLoader.Load("res://addons/my_plugin/my_plugin_icon.svg"); // Or use a built-in icon: return EditorInterface.Singleton.GetEditorTheme().GetIcon("Node", "EditorIcons"); } [/csharp] [/codeblocks]

fn (EditorPlugin) gd_has_main_screen #

fn (s &EditorPlugin) gd_has_main_screen() bool

Returns true if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b], [b]Game[/b], and [b]AssetLib[/b]). When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of [method EditorInterface.get_editor_main_screen] and made visible inside [method _make_visible]. Use [method _get_plugin_name] and [method _get_plugin_icon] to customize the plugin button's appearance.

var plugin_control

func _enter_tree():
plugin_control = preload('my_plugin_control.tscn').instantiate()
EditorInterface.get_editor_main_screen().add_child(plugin_control)
plugin_control.hide()

func _has_main_screen():
return true

func _make_visible(visible):
plugin_control.visible = visible

func _get_plugin_name():
return 'My Super Cool Plugin 3000'

func _get_plugin_icon():
return EditorInterface.get_editor_theme().get_icon('Node', 'EditorIcons')

fn (EditorPlugin) gd_make_visible #

fn (s &EditorPlugin) gd_make_visible(visible bool)

This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. Remember that you have to manage the visibility of all your editor controls manually.

fn (EditorPlugin) gd_edit #

fn (s &EditorPlugin) gd_edit(object Object)

This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. [param object] can be null if the plugin was editing an object, but there is no longer any selected object handled by this plugin. It can be used to cleanup editing state.

fn (EditorPlugin) gd_handles #

fn (s &EditorPlugin) gd_handles(object Object) bool

Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_3d_gui_input] these will be called too. [b]Note:[/b] Each plugin should handle only one type of objects at a time. If a plugin handles more types of objects and they are edited at the same time, it will result in errors.

fn (EditorPlugin) gd_get_state #

fn (s &EditorPlugin) gd_get_state() Dictionary

Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an editstate file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use [method _get_window_layout] instead. Use [method _set_state] to restore your saved state. [b]Note:[/b] This method should not be used to save important settings that should persist with the project. [b]Note:[/b] You must implement [method _get_plugin_name] for the state to be stored and restored correctly.

func _get_state():
var state = { 'zoom': zoom, 'preferred_color': my_color }
return state

fn (EditorPlugin) gd_set_state #

fn (s &EditorPlugin) gd_set_state(state Dictionary)

Restore the state saved by [method _get_state]. This method is called when the current scene tab is changed in the editor. [b]Note:[/b] Your plugin must implement [method _get_plugin_name], otherwise it will not be recognized and this method will not be called.

func _set_state(data):
zoom = data.get('zoom', 1.0)
preferred_color = data.get('my_color', Color.WHITE)

fn (EditorPlugin) gd_clear #

fn (s &EditorPlugin) gd_clear()

Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.

fn (EditorPlugin) gd_get_unsaved_status #

fn (s &EditorPlugin) gd_get_unsaved_status(for_scene string) string

Override this method to provide a custom message that lists unsaved changes. The editor will call this method when exiting or when closing a scene, and display the returned string in a confirmation dialog. Return empty string if the plugin has no unsaved changes. When closing a scene, [param for_scene] is the path to the scene being closed. You can use it to handle built-in resources in that scene. If the user confirms saving, [method _save_external_data] will be called, before closing the editor.

func _get_unsaved_status(for_scene):
if not unsaved:
return ''

if for_scene.is_empty():
return 'Save changes in MyCustomPlugin before closing?'
else:
return 'Scene %s has changes from MyCustomPlugin. Save before closing?' % for_scene.get_file()

func _save_external_data():
unsaved = false

If the plugin has no scene-specific changes, you can ignore the calls when closing scenes:

func _get_unsaved_status(for_scene):
if not for_scene.is_empty():
return ''

fn (EditorPlugin) gd_save_external_data #

fn (s &EditorPlugin) gd_save_external_data()

This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.

fn (EditorPlugin) gd_apply_changes #

fn (s &EditorPlugin) gd_apply_changes()

This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency. This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.

fn (EditorPlugin) gd_get_breakpoints #

fn (s &EditorPlugin) gd_get_breakpoints() PackedStringArray

This is for editors that edit script-based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25.

fn (EditorPlugin) gd_set_window_layout #

fn (s &EditorPlugin) gd_set_window_layout(configuration ConfigFile)

Restore the plugin GUI layout and data saved by [method _get_window_layout]. This method is called for every plugin on editor startup. Use the provided [param configuration] file to read your saved data.

func _set_window_layout(configuration):
$Window.position = configuration.get_value('MyPlugin', 'window_position', Vector2())
$Icon.modulate = configuration.get_value('MyPlugin', 'icon_color', Color.WHITE)

fn (EditorPlugin) gd_get_window_layout #

fn (s &EditorPlugin) gd_get_window_layout(configuration ConfigFile)

Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the editor_layout.cfg file in the editor metadata directory. Use [method _set_window_layout] to restore your saved layout.

func _get_window_layout(configuration):
configuration.set_value('MyPlugin', 'window_position', $Window.position)
configuration.set_value('MyPlugin', 'icon_color', $Icon.modulate)

fn (EditorPlugin) gd_build #

fn (s &EditorPlugin) gd_build() bool

This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs. This method must return a boolean. If this method returns false, the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method _build] methods from running.

fn (EditorPlugin) gd_enable_plugin #

fn (s &EditorPlugin) gd_enable_plugin()

Called by the engine when the user enables the [EditorPlugin] in the Plugin tab of the project settings window.

fn (EditorPlugin) gd_disable_plugin #

fn (s &EditorPlugin) gd_disable_plugin()

Called by the engine when the user disables the [EditorPlugin] in the Plugin tab of the project settings window.

fn (EditorPlugin) add_control_to_container #

fn (s &EditorPlugin) add_control_to_container(container EditorPluginCustomControlContainer, control Control)

Adds a custom control to a container in the editor UI. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [method Node.queue_free].

fn (EditorPlugin) add_control_to_bottom_panel #

fn (s &EditorPlugin) add_control_to_bottom_panel(control Control, title string, cfg EditorPlugin_add_control_to_bottom_panel_Cfg) Button

Adds a control to the bottom panel (together with Output, Debug, Animation, etc.). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free]. Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the bottom panel's visibility. See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use [kbd]Alt[/kbd] modifier.

fn (EditorPlugin) add_control_to_dock #

fn (s &EditorPlugin) add_control_to_dock(slot EditorPluginDockSlot, control Control, cfg EditorPlugin_add_control_to_dock_Cfg)

Adds the control to a specific dock slot. If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free]. Optionally, you can specify a shortcut parameter. When pressed, this shortcut will open and focus the dock.

fn (EditorPlugin) remove_control_from_docks #

fn (s &EditorPlugin) remove_control_from_docks(control Control)

Removes the control from the dock. You have to manually [method Node.queue_free] the control.

fn (EditorPlugin) remove_control_from_bottom_panel #

fn (s &EditorPlugin) remove_control_from_bottom_panel(control Control)

Removes the control from the bottom panel. You have to manually [method Node.queue_free] the control.

fn (EditorPlugin) remove_control_from_container #

fn (s &EditorPlugin) remove_control_from_container(container EditorPluginCustomControlContainer, control Control)

Removes the control from the specified container. You have to manually [method Node.queue_free] the control.

fn (EditorPlugin) set_dock_tab_icon #

fn (s &EditorPlugin) set_dock_tab_icon(control Control, icon Texture2D)

Sets the tab icon for the given control in a dock slot. Setting to null removes the icon.

fn (EditorPlugin) add_tool_menu_item #

fn (s &EditorPlugin) add_tool_menu_item(name string, callable Callable)

Adds a custom menu item to [b]Project > Tools[/b] named [param name]. When clicked, the provided [param callable] will be called.

fn (EditorPlugin) add_tool_submenu_item #

fn (s &EditorPlugin) add_tool_submenu_item(name string, submenu PopupMenu)

Adds a custom [PopupMenu] submenu under [b]Project > Tools >[/b] [param name]. Use [method remove_tool_menu_item] on plugin clean up to remove the menu.

fn (EditorPlugin) remove_tool_menu_item #

fn (s &EditorPlugin) remove_tool_menu_item(name string)

Removes a menu [param name] from [b]Project > Tools[/b].

fn (EditorPlugin) get_export_as_menu #

fn (s &EditorPlugin) get_export_as_menu() PopupMenu

Returns the [PopupMenu] under [b]Scene > Export As...[/b].

fn (EditorPlugin) add_custom_type #

fn (s &EditorPlugin) add_custom_type(gd_type string, base string, script Script, icon Texture2D)

Adds a custom type, which will appear in the list of nodes or resources. When a given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object. [b]Note:[/b] The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes. You can use the virtual method [method _handles] to check if your custom object is being edited by checking the script or using the is keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. [b]Note:[/b] Custom types added this way are not true classes. They are just a helper to create a node with specific script.

fn (EditorPlugin) remove_custom_type #

fn (s &EditorPlugin) remove_custom_type(gd_type string)

Removes a custom type added by [method add_custom_type].

fn (EditorPlugin) add_autoload_singleton #

fn (s &EditorPlugin) add_autoload_singleton(name string, path string)

Adds a script at [param path] to the Autoload list as [param name].

fn (EditorPlugin) remove_autoload_singleton #

fn (s &EditorPlugin) remove_autoload_singleton(name string)

Removes an Autoload [param name] from the list.

fn (EditorPlugin) update_overlays #

fn (s &EditorPlugin) update_overlays() i64

Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_3d_draw_over_viewport] and [method _forward_3d_force_draw_over_viewport] to be called.

fn (EditorPlugin) make_bottom_panel_item_visible #

fn (s &EditorPlugin) make_bottom_panel_item_visible(item Control)

Makes a specific item in the bottom panel visible.

fn (EditorPlugin) hide_bottom_panel #

fn (s &EditorPlugin) hide_bottom_panel()

Minimizes the bottom panel.

fn (EditorPlugin) get_undo_redo #

fn (s &EditorPlugin) get_undo_redo() EditorUndoRedoManager

Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.

fn (EditorPlugin) add_undo_redo_inspector_hook_callback #

fn (s &EditorPlugin) add_undo_redo_inspector_hook_callback(callable Callable)

Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified. The callback should have 4 arguments: [Object] undo_redo, [Object] modified_object, [String] property and [Variant] new_value. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take.

fn (EditorPlugin) remove_undo_redo_inspector_hook_callback #

fn (s &EditorPlugin) remove_undo_redo_inspector_hook_callback(callable Callable)

Removes a callback previously added by [method add_undo_redo_inspector_hook_callback].

fn (EditorPlugin) queue_save_layout #

fn (s &EditorPlugin) queue_save_layout()

Queue save the project's editor layout.

fn (EditorPlugin) add_translation_parser_plugin #

fn (s &EditorPlugin) add_translation_parser_plugin(parser EditorTranslationParserPlugin)

Registers a custom translation parser plugin for extracting translatable strings from custom files.

fn (EditorPlugin) remove_translation_parser_plugin #

fn (s &EditorPlugin) remove_translation_parser_plugin(parser EditorTranslationParserPlugin)

Removes a custom translation parser plugin registered by [method add_translation_parser_plugin].

fn (EditorPlugin) add_import_plugin #

fn (s &EditorPlugin) add_import_plugin(importer EditorImportPlugin, cfg EditorPlugin_add_import_plugin_Cfg)

Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type. If [param first_priority] is true, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_format_importer_plugin] instead. See [method add_inspector_plugin] for an example of how to register a plugin.

fn (EditorPlugin) remove_import_plugin #

fn (s &EditorPlugin) remove_import_plugin(importer EditorImportPlugin)

Removes an import plugin registered by [method add_import_plugin].

fn (EditorPlugin) add_scene_format_importer_plugin #

fn (s &EditorPlugin) add_scene_format_importer_plugin(scene_format_importer EditorSceneFormatImporter, cfg EditorPlugin_add_scene_format_importer_plugin_Cfg)

Registers a new [EditorSceneFormatImporter]. Scene importers are used to import custom 3D asset formats as scenes. If [param first_priority] is true, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.

fn (EditorPlugin) remove_scene_format_importer_plugin #

fn (s &EditorPlugin) remove_scene_format_importer_plugin(scene_format_importer EditorSceneFormatImporter)

Removes a scene format importer registered by [method add_scene_format_importer_plugin].

fn (EditorPlugin) add_scene_post_import_plugin #

fn (s &EditorPlugin) add_scene_post_import_plugin(scene_import_plugin EditorScenePostImportPlugin, cfg EditorPlugin_add_scene_post_import_plugin_Cfg)

Add a [EditorScenePostImportPlugin]. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs. If [param first_priority] is true, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.

fn (EditorPlugin) remove_scene_post_import_plugin #

fn (s &EditorPlugin) remove_scene_post_import_plugin(scene_import_plugin EditorScenePostImportPlugin)

Remove the [EditorScenePostImportPlugin], added with [method add_scene_post_import_plugin].

fn (EditorPlugin) add_export_plugin #

fn (s &EditorPlugin) add_export_plugin(plugin EditorExportPlugin)

Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported. See [method add_inspector_plugin] for an example of how to register a plugin.

fn (EditorPlugin) remove_export_plugin #

fn (s &EditorPlugin) remove_export_plugin(plugin EditorExportPlugin)

Removes an export plugin registered by [method add_export_plugin].

fn (EditorPlugin) add_export_platform #

fn (s &EditorPlugin) add_export_platform(platform EditorExportPlatform)

Registers a new [EditorExportPlatform]. Export platforms provides functionality of exporting to the specific platform.

fn (EditorPlugin) remove_export_platform #

fn (s &EditorPlugin) remove_export_platform(platform EditorExportPlatform)

Removes an export platform registered by [method add_export_platform].

fn (EditorPlugin) add_node_3d_gizmo_plugin #

fn (s &EditorPlugin) add_node_3d_gizmo_plugin(plugin EditorNode3DGizmoPlugin)

Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D]. See [method add_inspector_plugin] for an example of how to register a plugin.

fn (EditorPlugin) remove_node_3d_gizmo_plugin #

fn (s &EditorPlugin) remove_node_3d_gizmo_plugin(plugin EditorNode3DGizmoPlugin)

Removes a gizmo plugin registered by [method add_node_3d_gizmo_plugin].

fn (EditorPlugin) add_inspector_plugin #

fn (s &EditorPlugin) add_inspector_plugin(plugin EditorInspectorPlugin)

Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties. [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior. [codeblocks] [gdscript] const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd") var inspector_plugin = MyInspectorPlugin.new()

func _enter_tree(): add_inspector_plugin(inspector_plugin)

func _exit_tree(): remove_inspector_plugin(inspector_plugin) [/gdscript] [/codeblocks]

fn (EditorPlugin) remove_inspector_plugin #

fn (s &EditorPlugin) remove_inspector_plugin(plugin EditorInspectorPlugin)

Removes an inspector plugin registered by [method add_inspector_plugin].

fn (EditorPlugin) add_resource_conversion_plugin #

fn (s &EditorPlugin) add_resource_conversion_plugin(plugin EditorResourceConversionPlugin)

Registers a new [EditorResourceConversionPlugin]. Resource conversion plugins are used to add custom resource converters to the editor inspector. See [EditorResourceConversionPlugin] for an example of how to create a resource conversion plugin.

fn (EditorPlugin) remove_resource_conversion_plugin #

fn (s &EditorPlugin) remove_resource_conversion_plugin(plugin EditorResourceConversionPlugin)

Removes a resource conversion plugin registered by [method add_resource_conversion_plugin].

fn (EditorPlugin) set_input_event_forwarding_always_enabled #

fn (s &EditorPlugin) set_input_event_forwarding_always_enabled()

Use this method if you always want to receive inputs from 3D view screen inside [method _forward_3d_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.

fn (EditorPlugin) set_force_draw_over_forwarding_enabled #

fn (s &EditorPlugin) set_force_draw_over_forwarding_enabled()

Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_3d_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin.

fn (EditorPlugin) add_context_menu_plugin #

fn (s &EditorPlugin) add_context_menu_plugin(slot EditorContextMenuPluginContextMenuSlot, plugin EditorContextMenuPlugin)

Adds a plugin to the context menu. [param slot] is the context menu where the plugin will be added. [b]Note:[/b] A plugin instance can belong only to a single context menu slot.

fn (EditorPlugin) remove_context_menu_plugin #

fn (s &EditorPlugin) remove_context_menu_plugin(plugin EditorContextMenuPlugin)

Removes the specified context menu plugin.

fn (EditorPlugin) get_editor_interface #

fn (s &EditorPlugin) get_editor_interface() EditorInterface

Returns the [EditorInterface] singleton instance.

fn (EditorPlugin) get_script_create_dialog #

fn (s &EditorPlugin) get_script_create_dialog() ScriptCreateDialog

Gets the Editor's dialog used for making scripts. [b]Note:[/b] Users can configure it before use. [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.

fn (EditorPlugin) add_debugger_plugin #

fn (s &EditorPlugin) add_debugger_plugin(script EditorDebuggerPlugin)

Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin].

fn (EditorPlugin) remove_debugger_plugin #

fn (s &EditorPlugin) remove_debugger_plugin(script EditorDebuggerPlugin)

Removes the debugger plugin with given script from the Debugger.

fn (EditorPlugin) get_plugin_version #

fn (s &EditorPlugin) get_plugin_version() string

Provide the version of the plugin declared in the plugin.cfg config file.

struct EditorPlugin_add_control_to_bottom_panel_Cfg #

@[params]
struct EditorPlugin_add_control_to_bottom_panel_Cfg {
pub:
	shortcut Shortcut
}

Optional parameters for EditorPlugin#add_control_to_bottom_panel

struct EditorPlugin_add_control_to_dock_Cfg #

@[params]
struct EditorPlugin_add_control_to_dock_Cfg {
pub:
	shortcut Shortcut
}

Optional parameters for EditorPlugin#add_control_to_dock

struct EditorPlugin_add_import_plugin_Cfg #

@[params]
struct EditorPlugin_add_import_plugin_Cfg {
pub:
	first_priority bool
}

Optional parameters for EditorPlugin#add_import_plugin

struct EditorPlugin_add_scene_format_importer_plugin_Cfg #

@[params]
struct EditorPlugin_add_scene_format_importer_plugin_Cfg {
pub:
	first_priority bool
}

Optional parameters for EditorPlugin#add_scene_format_importer_plugin

struct EditorPlugin_add_scene_post_import_plugin_Cfg #

@[params]
struct EditorPlugin_add_scene_post_import_plugin_Cfg {
pub:
	first_priority bool
}

Optional parameters for EditorPlugin#add_scene_post_import_plugin

struct EditorProperty #

struct EditorProperty {
	Container
}

Custom control for editing properties that can be added to the [EditorInspector].

fn (EditorProperty) to_variant #

fn (s &EditorProperty) to_variant() Variant

fn (EditorProperty) from_variant #

fn (mut s EditorProperty) from_variant(variant &Variant)

fn (EditorProperty) gd_update_property #

fn (s &EditorProperty) gd_update_property()

When this virtual function is called, you must update your editor.

fn (EditorProperty) gd_set_read_only #

fn (s &EditorProperty) gd_set_read_only(read_only bool)

Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state.

fn (EditorProperty) set_label #

fn (s &EditorProperty) set_label(text string)

fn (EditorProperty) get_label #

fn (s &EditorProperty) get_label() string

fn (EditorProperty) set_read_only #

fn (s &EditorProperty) set_read_only(read_only bool)

fn (EditorProperty) is_read_only #

fn (s &EditorProperty) is_read_only() bool

fn (EditorProperty) set_draw_label #

fn (s &EditorProperty) set_draw_label(draw_label bool)

fn (EditorProperty) is_draw_label #

fn (s &EditorProperty) is_draw_label() bool

fn (EditorProperty) set_draw_background #

fn (s &EditorProperty) set_draw_background(draw_background bool)

fn (EditorProperty) is_draw_background #

fn (s &EditorProperty) is_draw_background() bool

fn (EditorProperty) set_checkable #

fn (s &EditorProperty) set_checkable(checkable bool)

fn (EditorProperty) is_checkable #

fn (s &EditorProperty) is_checkable() bool

fn (EditorProperty) set_checked #

fn (s &EditorProperty) set_checked(checked bool)

fn (EditorProperty) is_checked #

fn (s &EditorProperty) is_checked() bool

fn (EditorProperty) set_draw_warning #

fn (s &EditorProperty) set_draw_warning(draw_warning bool)

fn (EditorProperty) is_draw_warning #

fn (s &EditorProperty) is_draw_warning() bool

fn (EditorProperty) set_keying #

fn (s &EditorProperty) set_keying(keying bool)

fn (EditorProperty) is_keying #

fn (s &EditorProperty) is_keying() bool

fn (EditorProperty) set_deletable #

fn (s &EditorProperty) set_deletable(deletable bool)

fn (EditorProperty) is_deletable #

fn (s &EditorProperty) is_deletable() bool

fn (EditorProperty) get_edited_property #

fn (s &EditorProperty) get_edited_property() string

Returns the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property. [b]Note:[/b] This method could return null if the editor has not yet been associated with a property. However, in [method _update_property] and [method _set_read_only], this value is [i]guaranteed[/i] to be non-null.

fn (EditorProperty) get_edited_object #

fn (s &EditorProperty) get_edited_object() Object

Returns the edited object. [b]Note:[/b] This method could return null if the editor has not yet been associated with a property. However, in [method _update_property] and [method _set_read_only], this value is [i]guaranteed[/i] to be non-null.

fn (EditorProperty) update_property #

fn (s &EditorProperty) update_property()

Forces a refresh of the property display.

fn (EditorProperty) add_focusable #

fn (s &EditorProperty) add_focusable(control Control)

If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed.

fn (EditorProperty) set_bottom_editor #

fn (s &EditorProperty) set_bottom_editor(editor Control)

Puts the [param editor] control below the property label. The control must be previously added using [method Node.add_child].

fn (EditorProperty) set_selectable #

fn (s &EditorProperty) set_selectable(selectable bool)

fn (EditorProperty) is_selectable #

fn (s &EditorProperty) is_selectable() bool

fn (EditorProperty) set_use_folding #

fn (s &EditorProperty) set_use_folding(use_folding bool)

fn (EditorProperty) is_using_folding #

fn (s &EditorProperty) is_using_folding() bool

fn (EditorProperty) set_name_split_ratio #

fn (s &EditorProperty) set_name_split_ratio(ratio f64)

fn (EditorProperty) get_name_split_ratio #

fn (s &EditorProperty) get_name_split_ratio() f64

fn (EditorProperty) deselect #

fn (s &EditorProperty) deselect()

Draw property as not selected. Used by the inspector.

fn (EditorProperty) is_selected #

fn (s &EditorProperty) is_selected() bool

Returns true if property is drawn as selected. Used by the inspector.

fn (EditorProperty) gd_select #

fn (s &EditorProperty) gd_select(cfg EditorProperty_gd_select_Cfg)

Draw property as selected. Used by the inspector.

fn (EditorProperty) set_object_and_property #

fn (s &EditorProperty) set_object_and_property(object Object, property string)

Assigns object and property to edit.

fn (EditorProperty) set_label_reference #

fn (s &EditorProperty) set_label_reference(control Control)

Used by the inspector, set to a control that will be used as a reference to calculate the size of the label.

fn (EditorProperty) emit_changed #

fn (s &EditorProperty) emit_changed(property string, value_ ToVariant, cfg EditorProperty_emit_changed_Cfg)

If one or several properties have changed, this must be called. [param field] is used in case your editor can modify fields separately (as an example, Vector3.x). The [param changing] argument avoids the editor requesting this property to be refreshed (leave as false if unsure).

struct EditorProperty_emit_changed_Cfg #

@[params]
struct EditorProperty_emit_changed_Cfg {
pub:
	field    string
	changing bool
}

Optional parameters for EditorProperty#emit_changed

struct EditorProperty_gd_select_Cfg #

@[params]
struct EditorProperty_gd_select_Cfg {
pub:
	focusable i64 = -1
}

Optional parameters for EditorProperty#gd_select

struct EditorResourceConversionPlugin #

struct EditorResourceConversionPlugin {
	RefCounted
}

Plugin for adding custom converters from one resource format to another in the editor resource picker context menu; for example, converting a [StandardMaterial3D] to a [ShaderMaterial].

fn (EditorResourceConversionPlugin) to_variant #

fn (s &EditorResourceConversionPlugin) to_variant() Variant

fn (EditorResourceConversionPlugin) from_variant #

fn (mut s EditorResourceConversionPlugin) from_variant(variant &Variant)

fn (EditorResourceConversionPlugin) gd_converts_to #

fn (s &EditorResourceConversionPlugin) gd_converts_to() string

Returns the class name of the target type of [Resource] that this plugin converts source resources to.

fn (EditorResourceConversionPlugin) gd_handles #

fn (s &EditorResourceConversionPlugin) gd_handles(resource Resource) bool

Called to determine whether a particular [Resource] can be converted to the target resource type by this plugin.

fn (EditorResourceConversionPlugin) gd_convert #

fn (s &EditorResourceConversionPlugin) gd_convert(resource Resource) Resource

Takes an input [Resource] and converts it to the type given in [method _converts_to]. The returned [Resource] is the result of the conversion, and the input [Resource] remains unchanged.

struct EditorResourcePicker #

struct EditorResourcePicker {
	HBoxContainer
}

Godot editor's control for selecting [Resource] type properties.

fn (EditorResourcePicker) to_variant #

fn (s &EditorResourcePicker) to_variant() Variant

fn (EditorResourcePicker) from_variant #

fn (mut s EditorResourcePicker) from_variant(variant &Variant)

fn (EditorResourcePicker) gd_set_create_options #

fn (s &EditorResourcePicker) gd_set_create_options(menu_node Object)

This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [param menu_node] is a reference to the [PopupMenu] node. [b]Note:[/b] Implement [method _handle_menu_selected] to handle these custom items.

fn (EditorResourcePicker) gd_handle_menu_selected #

fn (s &EditorResourcePicker) gd_handle_menu_selected(id i64) bool

This virtual method can be implemented to handle context menu items not handled by default. See [method _set_create_options].

fn (EditorResourcePicker) set_base_type #

fn (s &EditorResourcePicker) set_base_type(base_type string)

fn (EditorResourcePicker) get_base_type #

fn (s &EditorResourcePicker) get_base_type() string

fn (EditorResourcePicker) get_allowed_types #

fn (s &EditorResourcePicker) get_allowed_types() PackedStringArray

Returns a list of all allowed types and subtypes corresponding to the [member base_type]. If the [member base_type] is empty, an empty list is returned.

fn (EditorResourcePicker) set_edited_resource #

fn (s &EditorResourcePicker) set_edited_resource(resource Resource)

fn (EditorResourcePicker) get_edited_resource #

fn (s &EditorResourcePicker) get_edited_resource() Resource

fn (EditorResourcePicker) set_toggle_mode #

fn (s &EditorResourcePicker) set_toggle_mode(enable bool)

fn (EditorResourcePicker) is_toggle_mode #

fn (s &EditorResourcePicker) is_toggle_mode() bool

fn (EditorResourcePicker) set_toggle_pressed #

fn (s &EditorResourcePicker) set_toggle_pressed(pressed bool)

Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to true.

fn (EditorResourcePicker) set_editable #

fn (s &EditorResourcePicker) set_editable(enable bool)

fn (EditorResourcePicker) is_editable #

fn (s &EditorResourcePicker) is_editable() bool

struct EditorResourcePreview #

struct EditorResourcePreview {
	Node
}

A node used to generate previews of resources or files.

fn (EditorResourcePreview) to_variant #

fn (s &EditorResourcePreview) to_variant() Variant

fn (EditorResourcePreview) from_variant #

fn (mut s EditorResourcePreview) from_variant(variant &Variant)

fn (EditorResourcePreview) queue_resource_preview #

fn (s &EditorResourcePreview) queue_resource_preview(path string, receiver Object, receiver_func string, userdata_ ToVariant)

Queue a resource file located at [param path] for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called. [b]Note:[/b] If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be null.

fn (EditorResourcePreview) queue_edited_resource_preview #

fn (s &EditorResourcePreview) queue_edited_resource_preview(resource Resource, receiver Object, receiver_func string, userdata_ ToVariant)

Queue the [param resource] being edited for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called. [b]Note:[/b] If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be null.

fn (EditorResourcePreview) add_preview_generator #

fn (s &EditorResourcePreview) add_preview_generator(generator EditorResourcePreviewGenerator)

Create an own, custom preview generator.

fn (EditorResourcePreview) remove_preview_generator #

fn (s &EditorResourcePreview) remove_preview_generator(generator EditorResourcePreviewGenerator)

Removes a custom preview generator.

fn (EditorResourcePreview) check_for_invalidation #

fn (s &EditorResourcePreview) check_for_invalidation(path string)

Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted.

struct EditorResourcePreviewGenerator #

struct EditorResourcePreviewGenerator {
	RefCounted
}

Custom generator of previews.

fn (EditorResourcePreviewGenerator) to_variant #

fn (s &EditorResourcePreviewGenerator) to_variant() Variant

fn (EditorResourcePreviewGenerator) from_variant #

fn (mut s EditorResourcePreviewGenerator) from_variant(variant &Variant)

fn (EditorResourcePreviewGenerator) gd_handles #

fn (s &EditorResourcePreviewGenerator) gd_handles(gd_type string) bool

Returns true if your generator supports the resource of type [param type].

fn (EditorResourcePreviewGenerator) gd_generate #

fn (s &EditorResourcePreviewGenerator) gd_generate(resource Resource, size Vector2i, metadata Dictionary) Texture2D

Generate a preview from a given resource with the specified size. This must always be implemented. Returning null is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). [param metadata] dictionary can be modified to store file-specific metadata that can be used in [method EditorResourceTooltipPlugin._make_tooltip_for_path] (like image size, sample length etc.).

fn (EditorResourcePreviewGenerator) gd_generate_from_path #

fn (s &EditorResourcePreviewGenerator) gd_generate_from_path(path string, size Vector2i, metadata Dictionary) Texture2D

Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method _generate]. Returning null is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). [param metadata] dictionary can be modified to store file-specific metadata that can be used in [method EditorResourceTooltipPlugin._make_tooltip_for_path] (like image size, sample length etc.).

fn (EditorResourcePreviewGenerator) gd_generate_small_preview_automatically #

fn (s &EditorResourcePreviewGenerator) gd_generate_small_preview_automatically() bool

If this function returns true, the generator will automatically generate the small previews from the normal preview texture generated by the methods [method _generate] or [method _generate_from_path]. By default, it returns false.

fn (EditorResourcePreviewGenerator) gd_can_generate_small_preview #

fn (s &EditorResourcePreviewGenerator) gd_can_generate_small_preview() bool

If this function returns true, the generator will call [method _generate] or [method _generate_from_path] for small previews as well. By default, it returns false.

struct EditorResourceTooltipPlugin #

struct EditorResourceTooltipPlugin {
	RefCounted
}

A plugin that advanced tooltip for its handled resource type.

fn (EditorResourceTooltipPlugin) to_variant #

fn (s &EditorResourceTooltipPlugin) to_variant() Variant

fn (EditorResourceTooltipPlugin) from_variant #

fn (mut s EditorResourceTooltipPlugin) from_variant(variant &Variant)

fn (EditorResourceTooltipPlugin) gd_handles #

fn (s &EditorResourceTooltipPlugin) gd_handles(gd_type string) bool

Return true if the plugin is going to handle the given [Resource] [param type].

fn (EditorResourceTooltipPlugin) gd_make_tooltip_for_path #

fn (s &EditorResourceTooltipPlugin) gd_make_tooltip_for_path(path string, metadata Dictionary, base Control) Control

Create and return a tooltip that will be displayed when the user hovers a resource under the given [param path] in filesystem dock. The [param metadata] dictionary is provided by preview generator (see [method EditorResourcePreviewGenerator._generate]). [param base] is the base default tooltip, which is a [VBoxContainer] with a file name, type and size labels. If another plugin handled the same file type, [param base] will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned [Control]. [b]Note:[/b] It's unadvised to use [method ResourceLoader.load], especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use [method request_thumbnail] if you want to display a preview in your tooltip. [b]Note:[/b] If you decide to discard the [param base], make sure to call [method Node.queue_free], because it's not freed automatically.

func _make_tooltip_for_path(path, metadata, base):
var t_rect = TextureRect.new()
request_thumbnail(path, t_rect)
base.add_child(t_rect) ##return base

fn (EditorResourceTooltipPlugin) request_thumbnail #

fn (s &EditorResourceTooltipPlugin) request_thumbnail(path string, control TextureRect)

Requests a thumbnail for the given [TextureRect]. The thumbnail is created asynchronously by [EditorResourcePreview] and automatically set when available.

struct EditorSceneFormatImporter #

struct EditorSceneFormatImporter {
	RefCounted
}

Imports scenes from third-parties' 3D files.

fn (EditorSceneFormatImporter) to_variant #

fn (s &EditorSceneFormatImporter) to_variant() Variant

fn (EditorSceneFormatImporter) from_variant #

fn (mut s EditorSceneFormatImporter) from_variant(variant &Variant)

fn (EditorSceneFormatImporter) gd_get_extensions #

fn (s &EditorSceneFormatImporter) gd_get_extensions() PackedStringArray

Return supported file extensions for this scene importer.

fn (EditorSceneFormatImporter) gd_import_scene #

fn (s &EditorSceneFormatImporter) gd_import_scene(path string, flags i64, options Dictionary) Object

Perform the bulk of the scene import logic here, for example using [GLTFDocument] or [FBXDocument].

fn (EditorSceneFormatImporter) gd_get_import_options #

fn (s &EditorSceneFormatImporter) gd_get_import_options(path string)

Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced]. [b]Note:[/b] All [EditorSceneFormatImporter] and [EditorScenePostImportPlugin] instances will add options for all files. It is good practice to check the file extension when [param path] is non-empty. When the user is editing project settings, [param path] will be empty. It is recommended to add all options when [param path] is empty to allow the user to customize Import Defaults.

fn (EditorSceneFormatImporter) gd_get_option_visibility #

fn (s &EditorSceneFormatImporter) gd_get_option_visibility(path string, for_animation bool, option string) Variant

Should return true to show the given option, false to hide the given option, or null to ignore.

fn (EditorSceneFormatImporter) add_import_option #

fn (s &EditorSceneFormatImporter) add_import_option(name string, value_ ToVariant)

Add a specific import option (name and default value only). This function can only be called from [method _get_import_options].

fn (EditorSceneFormatImporter) add_import_option_advanced #

fn (s &EditorSceneFormatImporter) add_import_option_advanced(gd_type VariantType, name string, default_value_ ToVariant, cfg EditorSceneFormatImporter_add_import_option_advanced_Cfg)

Add a specific import option. This function can only be called from [method _get_import_options].

struct EditorSceneFormatImporterBlend #

struct EditorSceneFormatImporterBlend {
	EditorSceneFormatImporter
}

Importer for Blender's .blend scene file format.

fn (EditorSceneFormatImporterBlend) to_variant #

fn (s &EditorSceneFormatImporterBlend) to_variant() Variant

fn (EditorSceneFormatImporterBlend) from_variant #

fn (mut s EditorSceneFormatImporterBlend) from_variant(variant &Variant)

struct EditorSceneFormatImporterFBX2GLTF #

struct EditorSceneFormatImporterFBX2GLTF {
	EditorSceneFormatImporter
}

Importer for the .fbx scene file format.

fn (EditorSceneFormatImporterFBX2GLTF) to_variant #

fn (s &EditorSceneFormatImporterFBX2GLTF) to_variant() Variant

fn (EditorSceneFormatImporterFBX2GLTF) from_variant #

fn (mut s EditorSceneFormatImporterFBX2GLTF) from_variant(variant &Variant)

struct EditorSceneFormatImporterGLTF #

struct EditorSceneFormatImporterGLTF {
	EditorSceneFormatImporter
}

fn (EditorSceneFormatImporterGLTF) to_variant #

fn (s &EditorSceneFormatImporterGLTF) to_variant() Variant

fn (EditorSceneFormatImporterGLTF) from_variant #

fn (mut s EditorSceneFormatImporterGLTF) from_variant(variant &Variant)

struct EditorSceneFormatImporterUFBX #

struct EditorSceneFormatImporterUFBX {
	EditorSceneFormatImporter
}

Import FBX files using the ufbx library.

fn (EditorSceneFormatImporterUFBX) to_variant #

fn (s &EditorSceneFormatImporterUFBX) to_variant() Variant

fn (EditorSceneFormatImporterUFBX) from_variant #

fn (mut s EditorSceneFormatImporterUFBX) from_variant(variant &Variant)

struct EditorSceneFormatImporter_add_import_option_advanced_Cfg #

@[params]
struct EditorSceneFormatImporter_add_import_option_advanced_Cfg {
pub:
	hint        PropertyHint = unsafe { PropertyHint(0) }
	hint_string string
	usage_flags i64 = 6
}

Optional parameters for EditorSceneFormatImporter#add_import_option_advanced

struct EditorScenePostImport #

struct EditorScenePostImport {
	RefCounted
}

Post-processes scenes after import.

fn (EditorScenePostImport) to_variant #

fn (s &EditorScenePostImport) to_variant() Variant

fn (EditorScenePostImport) from_variant #

fn (mut s EditorScenePostImport) from_variant(variant &Variant)

fn (EditorScenePostImport) gd_post_import #

fn (s &EditorScenePostImport) gd_post_import(scene Node) Object

Called after the scene was imported. This method must return the modified version of the scene.

fn (EditorScenePostImport) get_source_file #

fn (s &EditorScenePostImport) get_source_file() string

Returns the source file path which got imported (e.g. res://scene.dae).

struct EditorScenePostImportPlugin #

struct EditorScenePostImportPlugin {
	RefCounted
}

Plugin to control and modifying the process of importing a scene.

fn (EditorScenePostImportPlugin) to_variant #

fn (s &EditorScenePostImportPlugin) to_variant() Variant

fn (EditorScenePostImportPlugin) from_variant #

fn (mut s EditorScenePostImportPlugin) from_variant(variant &Variant)

fn (EditorScenePostImportPlugin) gd_get_internal_import_options #

fn (s &EditorScenePostImportPlugin) gd_get_internal_import_options(category i64)

Override to add internal import options. These will appear in the 3D scene import dialog. Add options via [method add_import_option] and [method add_import_option_advanced].

fn (EditorScenePostImportPlugin) gd_get_internal_option_visibility #

fn (s &EditorScenePostImportPlugin) gd_get_internal_option_visibility(category i64, for_animation bool, option string) Variant

Should return true to show the given option, false to hide the given option, or null to ignore.

fn (EditorScenePostImportPlugin) gd_get_internal_option_update_view_required #

fn (s &EditorScenePostImportPlugin) gd_get_internal_option_update_view_required(category i64, option string) Variant

Should return true if the 3D view of the import dialog needs to update when changing the given option.

fn (EditorScenePostImportPlugin) gd_internal_process #

fn (s &EditorScenePostImportPlugin) gd_internal_process(category i64, base_node Node, node Node, resource Resource)

Process a specific node or resource for a given category.

fn (EditorScenePostImportPlugin) gd_get_import_options #

fn (s &EditorScenePostImportPlugin) gd_get_import_options(path string)

Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced].

fn (EditorScenePostImportPlugin) gd_get_option_visibility #

fn (s &EditorScenePostImportPlugin) gd_get_option_visibility(path string, for_animation bool, option string) Variant

Should return true to show the given option, false to hide the given option, or null to ignore.

fn (EditorScenePostImportPlugin) gd_pre_process #

fn (s &EditorScenePostImportPlugin) gd_pre_process(scene Node)

Pre-process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made. Pre-process may be used to adjust internal import options in the "nodes", "meshes", "animations" or "materials" keys inside get_option_value("_subresources").

fn (EditorScenePostImportPlugin) gd_post_process #

fn (s &EditorScenePostImportPlugin) gd_post_process(scene Node)

Post-process the scene. This function is called after the final scene has been configured.

fn (EditorScenePostImportPlugin) get_option_value #

fn (s &EditorScenePostImportPlugin) get_option_value(name string) Variant

Query the value of an option. This function can only be called from those querying visibility, or processing.

fn (EditorScenePostImportPlugin) add_import_option #

fn (s &EditorScenePostImportPlugin) add_import_option(name string, value_ ToVariant)

Add a specific import option (name and default value only). This function can only be called from [method _get_import_options] and [method _get_internal_import_options].

fn (EditorScenePostImportPlugin) add_import_option_advanced #

fn (s &EditorScenePostImportPlugin) add_import_option_advanced(gd_type VariantType, name string, default_value_ ToVariant, cfg EditorScenePostImportPlugin_add_import_option_advanced_Cfg)

Add a specific import option. This function can only be called from [method _get_import_options] and [method _get_internal_import_options].

struct EditorScenePostImportPlugin_add_import_option_advanced_Cfg #

@[params]
struct EditorScenePostImportPlugin_add_import_option_advanced_Cfg {
pub:
	hint        PropertyHint = unsafe { PropertyHint(0) }
	hint_string string
	usage_flags i64 = 6
}

Optional parameters for EditorScenePostImportPlugin#add_import_option_advanced

struct EditorScript #

struct EditorScript {
	RefCounted
}

Base script that can be used to add extension functions to the editor.

fn (EditorScript) to_variant #

fn (s &EditorScript) to_variant() Variant

fn (EditorScript) from_variant #

fn (mut s EditorScript) from_variant(variant &Variant)

fn (EditorScript) gd_run #

fn (s &EditorScript) gd_run()

This method is executed by the Editor when [b]File > Run[/b] is used.

fn (EditorScript) add_root_node #

fn (s &EditorScript) add_root_node(node Node)

Makes [param node] root of the currently opened scene. Only works if the scene is empty. If the [param node] is a scene instance, an inheriting scene will be created.

fn (EditorScript) get_scene #

fn (s &EditorScript) get_scene() Node

Returns the edited (current) scene's root [Node]. Equivalent of [method EditorInterface.get_edited_scene_root].

fn (EditorScript) get_editor_interface #

fn (s &EditorScript) get_editor_interface() EditorInterface

Returns the [EditorInterface] singleton instance.

struct EditorScriptPicker #

struct EditorScriptPicker {
	EditorResourcePicker
}

Godot editor's control for selecting the script property of a [Node].

fn (EditorScriptPicker) to_variant #

fn (s &EditorScriptPicker) to_variant() Variant

fn (EditorScriptPicker) from_variant #

fn (mut s EditorScriptPicker) from_variant(variant &Variant)

fn (EditorScriptPicker) set_script_owner #

fn (s &EditorScriptPicker) set_script_owner(owner_node Node)

fn (EditorScriptPicker) get_script_owner #

fn (s &EditorScriptPicker) get_script_owner() Node

struct EditorSelection #

struct EditorSelection {
	Object
}

Manages the SceneTree selection in the editor.

fn (EditorSelection) to_variant #

fn (s &EditorSelection) to_variant() Variant

fn (EditorSelection) from_variant #

fn (mut s EditorSelection) from_variant(variant &Variant)

fn (EditorSelection) clear #

fn (s &EditorSelection) clear()

Clear the selection.

fn (EditorSelection) add_node #

fn (s &EditorSelection) add_node(node Node)

Adds a node to the selection. [b]Note:[/b] The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [method EditorInterface.edit_node].

fn (EditorSelection) remove_node #

fn (s &EditorSelection) remove_node(node Node)

Removes a node from the selection.

fn (EditorSelection) get_selected_nodes #

fn (s &EditorSelection) get_selected_nodes() Array

Returns the list of selected nodes.

fn (EditorSelection) get_top_selected_nodes #

fn (s &EditorSelection) get_top_selected_nodes() Array

Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.). For example, if there is a node A with a child B and a sibling C, then selecting all three will cause this method to return only A and C. Changing the global transform of A will affect the global transform of B, so there is no need to change B separately.

fn (EditorSelection) get_transformable_selected_nodes #

fn (s &EditorSelection) get_transformable_selected_nodes() Array

Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.). See [method get_top_selected_nodes].

struct EditorSettings #

struct EditorSettings {
	Resource
}

Object that holds the project-independent editor settings.

fn (EditorSettings) to_variant #

fn (s &EditorSettings) to_variant() Variant

fn (EditorSettings) from_variant #

fn (mut s EditorSettings) from_variant(variant &Variant)

fn (EditorSettings) has_setting #

fn (s &EditorSettings) has_setting(name string) bool

Returns true if the setting specified by [param name] exists, false otherwise.

fn (EditorSettings) set_setting #

fn (s &EditorSettings) set_setting(name string, value_ ToVariant)

Sets the [param value] of the setting specified by [param name]. This is equivalent to using [method Object.set] on the EditorSettings instance.

fn (EditorSettings) get_setting #

fn (s &EditorSettings) get_setting(name string) Variant

Returns the value of the setting specified by [param name]. This is equivalent to using [method Object.get] on the EditorSettings instance.

fn (EditorSettings) erase #

fn (s &EditorSettings) erase(property string)

Erases the setting whose name is specified by [param property].

fn (EditorSettings) set_initial_value #

fn (s &EditorSettings) set_initial_value(name string, value_ ToVariant, update_current bool)

Sets the initial value of the setting specified by [param name] to [param value]. This is used to provide a value for the Revert button in the Editor Settings. If [param update_current] is true, the setting is reset to [param value] as well.

fn (EditorSettings) add_property_info #

fn (s &EditorSettings) add_property_info(info Dictionary)

Adds a custom property info to a property. The dictionary must contain:- name: [String] (the name of the property)

  • type: [int] (see [enum Variant.Type])
  • optionally hint: [int] (see [enum PropertyHint]) and hint_string: [String][codeblocks] [gdscript] var settings = EditorInterface.get_editor_settings() settings.set("category/property_name", 0)

var property_info = { "name": "category/property_name", "type": TYPE_INT, "hint": PROPERTY_HINT_ENUM, "hint_string": "one,two,three" }

settings.add_property_info(property_info) [/gdscript] [csharp] var settings = GetEditorInterface().GetEditorSettings(); settings.Set("category/property_name", 0);

var propertyInfo = new Godot.Collections.Dictionary { { "name", "category/propertyName" }, { "type", Variant.Type.Int }, { "hint", PropertyHint.Enum }, { "hint_string", "one,two,three" }, };

settings.AddPropertyInfo(propertyInfo); [/csharp] [/codeblocks]

fn (EditorSettings) set_project_metadata #

fn (s &EditorSettings) set_project_metadata(section string, key string, data_ ToVariant)

Sets project-specific metadata with the [param section], [param key] and [param data] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata].

fn (EditorSettings) get_project_metadata #

fn (s &EditorSettings) get_project_metadata(section string, key string, cfg EditorSettings_get_project_metadata_Cfg) Variant

Returns project-specific metadata for the [param section] and [param key] specified. If the metadata doesn't exist, [param default] will be returned instead. See also [method set_project_metadata].

fn (EditorSettings) set_favorites #

fn (s &EditorSettings) set_favorites(dirs PackedStringArray)

Sets the list of favorite files and directories for this project.

fn (EditorSettings) get_favorites #

fn (s &EditorSettings) get_favorites() PackedStringArray

Returns the list of favorite files and directories for this project.

fn (EditorSettings) set_recent_dirs #

fn (s &EditorSettings) set_recent_dirs(dirs PackedStringArray)

Sets the list of recently visited folders in the file dialog for this project.

fn (EditorSettings) get_recent_dirs #

fn (s &EditorSettings) get_recent_dirs() PackedStringArray

Returns the list of recently visited folders in the file dialog for this project.

fn (EditorSettings) set_builtin_action_override #

fn (s &EditorSettings) set_builtin_action_override(name string, actions_list Array)

Overrides the built-in editor action [param name] with the input actions defined in [param actions_list].

fn (EditorSettings) check_changed_settings_in_group #

fn (s &EditorSettings) check_changed_settings_in_group(setting_prefix string) bool

Checks if any settings with the prefix [param setting_prefix] exist in the set of changed settings. See also [method get_changed_settings].

fn (EditorSettings) get_changed_settings #

fn (s &EditorSettings) get_changed_settings() PackedStringArray

Gets an array of the settings which have been changed since the last save. Note that internally changed_settings is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED].

fn (EditorSettings) mark_setting_changed #

fn (s &EditorSettings) mark_setting_changed(setting string)

Marks the passed editor setting as being changed, see [method get_changed_settings]. Only settings which exist (see [method has_setting]) will be accepted.

struct EditorSettings_get_project_metadata_Cfg #

@[params]
struct EditorSettings_get_project_metadata_Cfg {
pub:
	default ToVariant
}

Optional parameters for EditorSettings#get_project_metadata

struct EditorSpinSlider #

struct EditorSpinSlider {
	Range
}

Godot editor's control for editing numeric values.

fn (EditorSpinSlider) to_variant #

fn (s &EditorSpinSlider) to_variant() Variant

fn (EditorSpinSlider) from_variant #

fn (mut s EditorSpinSlider) from_variant(variant &Variant)

fn (EditorSpinSlider) set_label #

fn (s &EditorSpinSlider) set_label(label string)

fn (EditorSpinSlider) get_label #

fn (s &EditorSpinSlider) get_label() string

fn (EditorSpinSlider) set_suffix #

fn (s &EditorSpinSlider) set_suffix(suffix string)

fn (EditorSpinSlider) get_suffix #

fn (s &EditorSpinSlider) get_suffix() string

fn (EditorSpinSlider) set_read_only #

fn (s &EditorSpinSlider) set_read_only(read_only bool)

fn (EditorSpinSlider) is_read_only #

fn (s &EditorSpinSlider) is_read_only() bool

fn (EditorSpinSlider) set_flat #

fn (s &EditorSpinSlider) set_flat(flat bool)

fn (EditorSpinSlider) is_flat #

fn (s &EditorSpinSlider) is_flat() bool

fn (EditorSpinSlider) set_hide_slider #

fn (s &EditorSpinSlider) set_hide_slider(hide_slider bool)

fn (EditorSpinSlider) is_hiding_slider #

fn (s &EditorSpinSlider) is_hiding_slider() bool

fn (EditorSpinSlider) set_editing_integer #

fn (s &EditorSpinSlider) set_editing_integer(editing_integer bool)

fn (EditorSpinSlider) is_editing_integer #

fn (s &EditorSpinSlider) is_editing_integer() bool

struct EditorSyntaxHighlighter #

struct EditorSyntaxHighlighter {
	SyntaxHighlighter
}

Base class for [SyntaxHighlighter] used by the [ScriptEditor].

fn (EditorSyntaxHighlighter) to_variant #

fn (s &EditorSyntaxHighlighter) to_variant() Variant

fn (EditorSyntaxHighlighter) from_variant #

fn (mut s EditorSyntaxHighlighter) from_variant(variant &Variant)

fn (EditorSyntaxHighlighter) gd_get_name #

fn (s &EditorSyntaxHighlighter) gd_get_name() string

Virtual method which can be overridden to return the syntax highlighter name.

fn (EditorSyntaxHighlighter) gd_get_supported_languages #

fn (s &EditorSyntaxHighlighter) gd_get_supported_languages() PackedStringArray

Virtual method which can be overridden to return the supported language names.

fn (EditorSyntaxHighlighter) gd_create #

fn (s &EditorSyntaxHighlighter) gd_create() EditorSyntaxHighlighter

Virtual method which creates a new instance of the syntax highlighter.

struct EditorToaster #

struct EditorToaster {
	HBoxContainer
}

Manages toast notifications within the editor.

fn (EditorToaster) to_variant #

fn (s &EditorToaster) to_variant() Variant

fn (EditorToaster) from_variant #

fn (mut s EditorToaster) from_variant(variant &Variant)

fn (EditorToaster) push_toast #

fn (s &EditorToaster) push_toast(message string, cfg EditorToaster_push_toast_Cfg)

Pushes a toast notification to the editor for display.

struct EditorToaster_push_toast_Cfg #

@[params]
struct EditorToaster_push_toast_Cfg {
pub:
	severity EditorToasterSeverity = unsafe { EditorToasterSeverity(0) }
	tooltip  string
}

Optional parameters for EditorToaster#push_toast

struct EditorTranslationParserPlugin #

struct EditorTranslationParserPlugin {
	RefCounted
}

Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.).

fn (EditorTranslationParserPlugin) to_variant #

fn (s &EditorTranslationParserPlugin) to_variant() Variant

fn (EditorTranslationParserPlugin) from_variant #

fn (mut s EditorTranslationParserPlugin) from_variant(variant &Variant)

fn (EditorTranslationParserPlugin) gd_parse_file #

fn (s &EditorTranslationParserPlugin) gd_parse_file(path string) Array

Override this method to define a custom parsing logic to extract the translatable strings.

fn (EditorTranslationParserPlugin) gd_get_recognized_extensions #

fn (s &EditorTranslationParserPlugin) gd_get_recognized_extensions() PackedStringArray

Gets the list of file extensions to associate with this parser, e.g. ["csv"].

struct EditorUndoRedoManager #

struct EditorUndoRedoManager {
	Object
}

Manages undo history of scenes opened in the editor.

fn (EditorUndoRedoManager) to_variant #

fn (s &EditorUndoRedoManager) to_variant() Variant

fn (EditorUndoRedoManager) from_variant #

fn (mut s EditorUndoRedoManager) from_variant(variant &Variant)

fn (EditorUndoRedoManager) create_action #

fn (s &EditorUndoRedoManager) create_action(name string, cfg EditorUndoRedoManager_create_action_Cfg)

Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action]. The way actions are merged is dictated by the [param merge_mode] argument. If [param custom_context] object is provided, it will be used for deducing target history (instead of using the first operation). The way undo operation are ordered in actions is dictated by [param backward_undo_ops]. When [param backward_undo_ops] is false undo option are ordered in the same order they were added. Which means the first operation to be added will be the first to be undone. If [param mark_unsaved] is false, the action will not mark the history as unsaved. This is useful for example for actions that change a selection, or a setting that will be saved automatically. Otherwise, this should be left to true if the action requires saving by the user or if it can cause data loss when left unsaved.

fn (EditorUndoRedoManager) commit_action #

fn (s &EditorUndoRedoManager) commit_action(cfg EditorUndoRedoManager_commit_action_Cfg)

Commits the action. If [param execute] is true (default), all "do" methods/properties are called/set when this function is called.

fn (EditorUndoRedoManager) is_committing_action #

fn (s &EditorUndoRedoManager) is_committing_action() bool

Returns true if the [EditorUndoRedoManager] is currently committing the action, i.e. running its "do" method or property change (see [method commit_action]).

fn (EditorUndoRedoManager) force_fixed_history #

fn (s &EditorUndoRedoManager) force_fixed_history()

Forces the next operation (e.g. [method add_do_method]) to use the action's history rather than guessing it from the object. This is sometimes needed when a history can't be correctly determined, like for a nested resource that doesn't have a path yet. This method should only be used when absolutely necessary, otherwise it might cause invalid history state. For most of complex cases, the custom_context parameter of [method create_action] is sufficient.

fn (EditorUndoRedoManager) add_do_method #

fn (s &EditorUndoRedoManager) add_do_method(object Object, method string, varargs ...ToVariant)

Register a method that will be called when the action is committed (i.e. the "do" action). If this is the first operation, the [param object] will be used to deduce target undo history.

fn (EditorUndoRedoManager) add_undo_method #

fn (s &EditorUndoRedoManager) add_undo_method(object Object, method string, varargs ...ToVariant)

Register a method that will be called when the action is undone (i.e. the "undo" action). If this is the first operation, the [param object] will be used to deduce target undo history.

fn (EditorUndoRedoManager) add_do_property #

fn (s &EditorUndoRedoManager) add_do_property(object Object, property string, value_ ToVariant)

Register a property value change for "do". If this is the first operation, the [param object] will be used to deduce target undo history.

fn (EditorUndoRedoManager) add_undo_property #

fn (s &EditorUndoRedoManager) add_undo_property(object Object, property string, value_ ToVariant)

Register a property value change for "undo". If this is the first operation, the [param object] will be used to deduce target undo history.

fn (EditorUndoRedoManager) add_do_reference #

fn (s &EditorUndoRedoManager) add_do_reference(object Object)

Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources.

fn (EditorUndoRedoManager) add_undo_reference #

fn (s &EditorUndoRedoManager) add_undo_reference(object Object)

Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!).

fn (EditorUndoRedoManager) get_object_history_id #

fn (s &EditorUndoRedoManager) get_object_history_id(object Object) i64

Returns the history ID deduced from the given [param object]. It can be used with [method get_history_undo_redo].

fn (EditorUndoRedoManager) get_history_undo_redo #

fn (s &EditorUndoRedoManager) get_history_undo_redo(id i64) UndoRedo

Returns the [UndoRedo] object associated with the given history [param id]. [param id] above 0 are mapped to the opened scene tabs (but it doesn't match their order). [param id] of 0 or lower have special meaning (see [enum SpecialHistory]). Best used with [method get_object_history_id]. This method is only provided in case you need some more advanced methods of [UndoRedo] (but keep in mind that directly operating on the [UndoRedo] object might affect editor's stability).

fn (EditorUndoRedoManager) clear_history #

fn (s &EditorUndoRedoManager) clear_history(cfg EditorUndoRedoManager_clear_history_Cfg)

Clears the given undo history. You can clear history for a specific scene, global history, or for all scenes at once if [param id] is [constant INVALID_HISTORY]. If [param increase_version] is true, the undo history version will be increased, marking it as unsaved. Useful for operations that modify the scene, but don't support undo.

var scene_root = EditorInterface.get_edited_scene_root()
var undo_redo = EditorInterface.get_editor_undo_redo()
undo_redo.clear_history(undo_redo.get_object_history_id(scene_root))

[b]Note:[/b] If you want to mark an edited scene as unsaved without clearing its history, use [method EditorInterface.mark_scene_as_unsaved] instead.

struct EditorUndoRedoManager_clear_history_Cfg #

@[params]
struct EditorUndoRedoManager_clear_history_Cfg {
pub:
	id               i64 = -99
	increase_version bool
}

Optional parameters for EditorUndoRedoManager#clear_history

struct EditorUndoRedoManager_commit_action_Cfg #

@[params]
struct EditorUndoRedoManager_commit_action_Cfg {
pub:
	execute bool
}

Optional parameters for EditorUndoRedoManager#commit_action

struct EditorUndoRedoManager_create_action_Cfg #

@[params]
struct EditorUndoRedoManager_create_action_Cfg {
pub:
	merge_mode        UndoRedoMergeMode = unsafe { UndoRedoMergeMode(0) }
	custom_context    Object
	backward_undo_ops bool
	mark_unsaved      bool
}

Optional parameters for EditorUndoRedoManager#create_action

struct EditorVCSInterface #

struct EditorVCSInterface {
	Object
}

Version Control System (VCS) interface, which reads and writes to the local VCS in use.

fn (EditorVCSInterface) to_variant #

fn (s &EditorVCSInterface) to_variant() Variant

fn (EditorVCSInterface) from_variant #

fn (mut s EditorVCSInterface) from_variant(variant &Variant)

fn (EditorVCSInterface) gd_initialize #

fn (s &EditorVCSInterface) gd_initialize(project_path string) bool

Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at [param project_path].

fn (EditorVCSInterface) gd_set_credentials #

fn (s &EditorVCSInterface) gd_set_credentials(username string, password string, ssh_public_key_path string, ssh_private_key_path string, ssh_passphrase string)

Set user credentials in the underlying VCS. [param username] and [param password] are used only during HTTPS authentication unless not already mentioned in the remote URL. [param ssh_public_key_path], [param ssh_private_key_path], and [param ssh_passphrase] are only used during SSH authentication.

fn (EditorVCSInterface) gd_get_modified_files_data #

fn (s &EditorVCSInterface) gd_get_modified_files_data() Array

Returns an [Array] of [Dictionary] items (see [method create_status_file]), each containing the status data of every modified file in the project folder.

fn (EditorVCSInterface) gd_stage_file #

fn (s &EditorVCSInterface) gd_stage_file(file_path string)

Stages the file present at [param file_path] to the staged area.

fn (EditorVCSInterface) gd_unstage_file #

fn (s &EditorVCSInterface) gd_unstage_file(file_path string)

Unstages the file present at [param file_path] from the staged area to the unstaged area.

fn (EditorVCSInterface) gd_discard_file #

fn (s &EditorVCSInterface) gd_discard_file(file_path string)

Discards the changes made in a file present at [param file_path].

fn (EditorVCSInterface) gd_commit #

fn (s &EditorVCSInterface) gd_commit(msg string)

Commits the currently staged changes and applies the commit [param msg] to the resulting commit.

fn (EditorVCSInterface) gd_get_diff #

fn (s &EditorVCSInterface) gd_get_diff(identifier string, area i64) Array

Returns an array of [Dictionary] items (see [method create_diff_file], [method create_diff_hunk], [method create_diff_line], [method add_line_diffs_into_diff_hunk] and [method add_diff_hunks_into_diff_file]), each containing information about a diff. If [param identifier] is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff.

fn (EditorVCSInterface) gd_shut_down #

fn (s &EditorVCSInterface) gd_shut_down() bool

Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI.

fn (EditorVCSInterface) gd_get_vcs_name #

fn (s &EditorVCSInterface) gd_get_vcs_name() string

Returns the name of the underlying VCS provider.

fn (EditorVCSInterface) gd_get_previous_commits #

fn (s &EditorVCSInterface) gd_get_previous_commits(max_commits i64) Array

Returns an [Array] of [Dictionary] items (see [method create_commit]), each containing the data for a past commit.

fn (EditorVCSInterface) gd_get_branch_list #

fn (s &EditorVCSInterface) gd_get_branch_list() Array

Gets an instance of an [Array] of [String]s containing available branch names in the VCS.

fn (EditorVCSInterface) gd_get_remotes #

fn (s &EditorVCSInterface) gd_get_remotes() Array

Returns an [Array] of [String]s, each containing the name of a remote configured in the VCS.

fn (EditorVCSInterface) gd_create_branch #

fn (s &EditorVCSInterface) gd_create_branch(branch_name string)

Creates a new branch named [param branch_name] in the VCS.

fn (EditorVCSInterface) gd_remove_branch #

fn (s &EditorVCSInterface) gd_remove_branch(branch_name string)

Remove a branch from the local VCS.

fn (EditorVCSInterface) gd_create_remote #

fn (s &EditorVCSInterface) gd_create_remote(remote_name string, remote_url string)

Creates a new remote destination with name [param remote_name] and points it to [param remote_url]. This can be an HTTPS remote or an SSH remote.

fn (EditorVCSInterface) gd_remove_remote #

fn (s &EditorVCSInterface) gd_remove_remote(remote_name string)

Remove a remote from the local VCS.

fn (EditorVCSInterface) gd_get_current_branch_name #

fn (s &EditorVCSInterface) gd_get_current_branch_name() string

Gets the current branch name defined in the VCS.

fn (EditorVCSInterface) gd_checkout_branch #

fn (s &EditorVCSInterface) gd_checkout_branch(branch_name string) bool

Checks out a [param branch_name] in the VCS.

fn (EditorVCSInterface) gd_pull #

fn (s &EditorVCSInterface) gd_pull(remote string)

Pulls changes from the remote. This can give rise to merge conflicts.

fn (EditorVCSInterface) gd_push #

fn (s &EditorVCSInterface) gd_push(remote string, force bool)

Pushes changes to the [param remote]. If [param force] is true, a force push will override the change history already present on the remote.

fn (EditorVCSInterface) gd_fetch #

fn (s &EditorVCSInterface) gd_fetch(remote string)

Fetches new changes from the [param remote], but doesn't write changes to the current working directory. Equivalent to git fetch.

fn (EditorVCSInterface) gd_get_line_diff #

fn (s &EditorVCSInterface) gd_get_line_diff(file_path string, text string) Array

Returns an [Array] of [Dictionary] items (see [method create_diff_hunk]), each containing a line diff between a file at [param file_path] and the [param text] which is passed in.

fn (EditorVCSInterface) create_diff_line #

fn (s &EditorVCSInterface) create_diff_line(new_line_no i64, old_line_no i64, content string, status string) Dictionary

Helper function to create a [Dictionary] for storing a line diff. [param new_line_no] is the line number in the new file (can be -1 if the line is deleted). [param old_line_no] is the line number in the old file (can be -1 if the line is added). [param content] is the diff text. [param status] is a single character string which stores the line origin.

fn (EditorVCSInterface) create_diff_hunk #

fn (s &EditorVCSInterface) create_diff_hunk(old_start i64, new_start i64, old_lines i64, new_lines i64) Dictionary

Helper function to create a [Dictionary] for storing diff hunk data. [param old_start] is the starting line number in old file. [param new_start] is the starting line number in new file. [param old_lines] is the number of lines in the old file. [param new_lines] is the number of lines in the new file.

fn (EditorVCSInterface) create_diff_file #

fn (s &EditorVCSInterface) create_diff_file(new_file string, old_file string) Dictionary

Helper function to create a [Dictionary] for storing old and new diff file paths.

fn (EditorVCSInterface) create_commit #

fn (s &EditorVCSInterface) create_commit(msg string, author string, id string, unix_timestamp i64, offset_minutes i64) Dictionary

Helper function to create a commit [Dictionary] item. [param msg] is the commit message of the commit. [param author] is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. [param id] is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. [param unix_timestamp] is the UTC Unix timestamp of when the commit was created. [param offset_minutes] is the timezone offset in minutes, recorded from the system timezone where the commit was created.

fn (EditorVCSInterface) create_status_file #

fn (s &EditorVCSInterface) create_status_file(file_path string, change_type EditorVCSInterfaceChangeType, area EditorVCSInterfaceTreeArea) Dictionary

Helper function to create a [Dictionary] used by editor to read the status of a file.

fn (EditorVCSInterface) add_diff_hunks_into_diff_file #

fn (s &EditorVCSInterface) add_diff_hunks_into_diff_file(diff_file Dictionary, diff_hunks Array) Dictionary

Helper function to add an array of [param diff_hunks] into a [param diff_file].

fn (EditorVCSInterface) add_line_diffs_into_diff_hunk #

fn (s &EditorVCSInterface) add_line_diffs_into_diff_hunk(diff_hunk Dictionary, line_diffs Array) Dictionary

Helper function to add an array of [param line_diffs] into a [param diff_hunk].

fn (EditorVCSInterface) popup_error #

fn (s &EditorVCSInterface) popup_error(msg string)

Pops up an error message in the editor which is shown as coming from the underlying VCS. Use this to show VCS specific error messages.

struct EncodedObjectAsID #

struct EncodedObjectAsID {
	RefCounted
}

Holds a reference to an [Object]'s instance ID.

fn (EncodedObjectAsID) to_variant #

fn (s &EncodedObjectAsID) to_variant() Variant

fn (EncodedObjectAsID) from_variant #

fn (mut s EncodedObjectAsID) from_variant(variant &Variant)

fn (EncodedObjectAsID) set_object_id #

fn (s &EncodedObjectAsID) set_object_id(id i64)

fn (EncodedObjectAsID) get_object_id #

fn (s &EncodedObjectAsID) get_object_id() i64

struct Engine #

struct Engine {
	Object
}

Provides access to engine properties.

fn (Engine) to_variant #

fn (s &Engine) to_variant() Variant

fn (Engine) from_variant #

fn (mut s Engine) from_variant(variant &Variant)

fn (Engine) set_physics_ticks_per_second #

fn (s &Engine) set_physics_ticks_per_second(physics_ticks_per_second i64)

fn (Engine) get_physics_ticks_per_second #

fn (s &Engine) get_physics_ticks_per_second() i64

fn (Engine) set_max_physics_steps_per_frame #

fn (s &Engine) set_max_physics_steps_per_frame(max_physics_steps i64)

fn (Engine) get_max_physics_steps_per_frame #

fn (s &Engine) get_max_physics_steps_per_frame() i64

fn (Engine) set_physics_jitter_fix #

fn (s &Engine) set_physics_jitter_fix(physics_jitter_fix f64)

fn (Engine) get_physics_jitter_fix #

fn (s &Engine) get_physics_jitter_fix() f64

fn (Engine) get_physics_interpolation_fraction #

fn (s &Engine) get_physics_interpolation_fraction() f64

Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation.

fn (Engine) set_max_fps #

fn (s &Engine) set_max_fps(max_fps i64)

fn (Engine) get_max_fps #

fn (s &Engine) get_max_fps() i64

fn (Engine) set_time_scale #

fn (s &Engine) set_time_scale(time_scale f64)

fn (Engine) get_time_scale #

fn (s &Engine) get_time_scale() f64

fn (Engine) get_frames_drawn #

fn (s &Engine) get_frames_drawn() i64

Returns the total number of frames drawn since the engine started. [b]Note:[/b] On headless platforms, or if rendering is disabled with --disable-render-loop via command line, this method always returns 0. See also [method get_process_frames].

fn (Engine) get_frames_per_second #

fn (s &Engine) get_frames_per_second() f64

Returns the average frames rendered every second (FPS), also known as the framerate.

fn (Engine) get_physics_frames #

fn (s &Engine) get_physics_frames() i64

Returns the total number of frames passed since the engine started. This number is increased every [b]physics frame[/b]. See also [method get_process_frames]. This method can be used to run expensive logic less often without relying on a [Timer]: [codeblocks] [gdscript] func _physics_process(_delta): if Engine.get_physics_frames() % 2 == 0: pass # Run expensive logic only once every 2 physics frames here. [/gdscript] [csharp] public override void _PhysicsProcess(double delta) { base._PhysicsProcess(delta);

if (Engine.GetPhysicsFrames() % 2 == 0) { // Run expensive logic only once every 2 physics frames here. } } [/csharp] [/codeblocks]

fn (Engine) get_process_frames #

fn (s &Engine) get_process_frames() i64

Returns the total number of frames passed since the engine started. This number is increased every [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn] and [method get_physics_frames]. This method can be used to run expensive logic less often without relying on a [Timer]: [codeblocks] [gdscript] func _process(_delta): if Engine.get_process_frames() % 5 == 0: pass # Run expensive logic only once every 5 process (render) frames here. [/gdscript] [csharp] public override void _Process(double delta) { base._Process(delta);

if (Engine.GetProcessFrames() % 5 == 0) { // Run expensive logic only once every 5 process (render) frames here. } } [/csharp] [/codeblocks]

fn (Engine) get_main_loop #

fn (s &Engine) get_main_loop() MainLoop

Returns the instance of the [MainLoop]. This is usually the main [SceneTree] and is the same as [method Node.get_tree]. [b]Note:[/b] The type instantiated as the main loop can changed with [member ProjectSettings.application/run/main_loop_type].

fn (Engine) get_version_info #

fn (s &Engine) get_version_info() Dictionary

Returns the current engine version information as a [Dictionary] containing the following entries:- major - Major version number as an int;

  • minor - Minor version number as an int;
  • patch - Patch version number as an int;
  • hex - Full version encoded as a hexadecimal int with one byte (2 hex digits) per number (see example below);
  • status - Status (such as "beta", "rc1", "rc2", "stable", etc.) as a String;
  • build - Build name (e.g. "custom_build") as a String;
  • hash - Full Git commit hash as a String;
  • timestamp - Holds the Git commit date UNIX timestamp in seconds as an int, or 0 if unavailable;
  • string - major, minor, patch, status, and build in a single String.The hex value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be 0x03010C. [b]Note:[/b] The hex value is still an [int] internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for quick version comparisons from code: [codeblocks] [gdscript] if Engine.get_version_info().hex >= 0x040100: pass # Do things specific to version 4.1 or later. else: pass # Do things specific to versions before 4.1. [/gdscript] [csharp] if ((int)Engine.GetVersionInfo()["hex"] >= 0x040100) { // Do things specific to version 4.1 or later. } else { // Do things specific to versions before 4.1. } [/csharp] [/codeblocks]

fn (Engine) get_author_info #

fn (s &Engine) get_author_info() Dictionary

Returns the engine author information as a [Dictionary], where each entry is an [Array] of strings with the names of notable contributors to the Godot Engine: lead_developers, founders, project_managers, and developers.

fn (Engine) get_donor_info #

fn (s &Engine) get_donor_info() Dictionary

Returns a [Dictionary] of categorized donor names. Each entry is an [Array] of strings: {platinum_sponsors, gold_sponsors, silver_sponsors, bronze_sponsors, mini_sponsors, gold_donors, silver_donors, bronze_donors}

fn (Engine) get_license_info #

fn (s &Engine) get_license_info() Dictionary

Returns a [Dictionary] of licenses used by Godot and included third party components. Each entry is a license name (such as "[url=https://en.wikipedia.org/wiki/MIT_License#Ambiguity_and_variants]Expat[/url]") and its associated text.

fn (Engine) get_license_text #

fn (s &Engine) get_license_text() string

Returns the full Godot license text.

fn (Engine) get_architecture_name #

fn (s &Engine) get_architecture_name() string

Returns the name of the CPU architecture the Godot binary was built for. Possible return values include "x86_64", "x86_32", "arm64", "arm32", "rv64", "ppc64", "loongarch64", "wasm64", and "wasm32". To detect whether the current build is 64-bit, or the type of architecture, don't use the architecture name. Instead, use [method OS.has_feature] to check for the "64" feature tag, or tags such as "x86" or "arm". See the [url=$DOCS_URL/tutorials/export/feature_tags.html]Feature Tags[/url] documentation for more details. [b]Note:[/b] This method does [i]not[/i] return the name of the system's CPU architecture (like [method OS.get_processor_name]). For example, when running an x86_32 Godot binary on an x86_64 system, the returned value will still be "x86_32".

fn (Engine) is_in_physics_frame #

fn (s &Engine) is_in_physics_frame() bool

Returns true if the engine is inside the fixed physics process step of the main loop.

func _enter_tree():
####print(Engine.is_in_physics_frame())

func _process(delta):
print(Engine.is_in_physics_frame()) ##
func _physics_process(delta):
print(Engine.is_in_physics_frame()) ##

fn (Engine) has_singleton #

fn (s &Engine) has_singleton(name string) bool

Returns true if a singleton with the given [param name] exists in the global scope. See also [method get_singleton]. [codeblocks] [gdscript] print(Engine.has_singleton("OS")) # Prints true print(Engine.has_singleton("Engine")) # Prints true print(Engine.has_singleton("AudioServer")) # Prints true print(Engine.has_singleton("Unknown")) # Prints false [/gdscript] [csharp] GD.Print(Engine.HasSingleton("OS")); // Prints True GD.Print(Engine.HasSingleton("Engine")); // Prints True GD.Print(Engine.HasSingleton("AudioServer")); // Prints True GD.Print(Engine.HasSingleton("Unknown")); // Prints False [/csharp] [/codeblocks] [b]Note:[/b] Global singletons are not the same as autoloaded nodes, which are configurable in the project settings.

fn (Engine) get_singleton #

fn (s &Engine) get_singleton(name string) Object

Returns the global singleton with the given [param name], or null if it does not exist. Often used for plugins. See also [method has_singleton] and [method get_singleton_list]. [b]Note:[/b] Global singletons are not the same as autoloaded nodes, which are configurable in the project settings.

fn (Engine) register_singleton #

fn (s &Engine) register_singleton(name string, instance Object)

Registers the given [Object] [param instance] as a singleton, available globally under [param name]. Useful for plugins.

fn (Engine) unregister_singleton #

fn (s &Engine) unregister_singleton(name string)

Removes the singleton registered under [param name]. The singleton object is [i]not[/i] freed. Only works with user-defined singletons registered with [method register_singleton].

fn (Engine) get_singleton_list #

fn (s &Engine) get_singleton_list() PackedStringArray

Returns a list of names of all available global singletons. See also [method get_singleton].

fn (Engine) register_script_language #

fn (s &Engine) register_script_language(language ScriptLanguage) GDError

Registers a [ScriptLanguage] instance to be available with ScriptServer. Returns:- [constant OK] on success;

  • [constant ERR_UNAVAILABLE] if ScriptServer has reached the limit and cannot register any new language;
  • [constant ERR_ALREADY_EXISTS] if ScriptServer already contains a language with similar extension/name/type.

fn (Engine) unregister_script_language #

fn (s &Engine) unregister_script_language(language ScriptLanguage) GDError

Unregisters the [ScriptLanguage] instance from ScriptServer. Returns:- [constant OK] on success;

  • [constant ERR_DOES_NOT_EXIST] if the language is not registered in ScriptServer.

fn (Engine) get_script_language_count #

fn (s &Engine) get_script_language_count() i64

Returns the number of available script languages. Use with [method get_script_language].

fn (Engine) get_script_language #

fn (s &Engine) get_script_language(index i64) ScriptLanguage

Returns an instance of a [ScriptLanguage] with the given [param index].

fn (Engine) capture_script_backtraces #

fn (s &Engine) capture_script_backtraces(cfg Engine_capture_script_backtraces_Cfg) Array

Captures and returns backtraces from all registered script languages. By default, the returned [ScriptBacktrace] will only contain stack frames in editor builds and debug builds. To enable them for release builds as well, you need to enable [member ProjectSettings.debug/settings/gdscript/always_track_call_stacks]. If [param include_variables] is true, the backtrace will also include the names and values of any global variables (e.g. autoload singletons) at the point of the capture, as well as local variables and class member variables at each stack frame. This will however will only be respected when running the game with a debugger attached, like when running the game from the editor. To enable it for export builds as well, you need to enable [member ProjectSettings.debug/settings/gdscript/always_track_local_variables]. [b]Warning:[/b] When [param include_variables] is true, any captured variables can potentially (e.g. with GDScript backtraces) be their actual values, including any object references. This means that storing such a [ScriptBacktrace] will prevent those objects from being deallocated, so it's generally recommended not to do so.

fn (Engine) is_editor_hint #

fn (s &Engine) is_editor_hint() bool

Returns true if the script is currently running inside the editor, otherwise returns false. This is useful for @tool scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor: [codeblocks] [gdscript] if Engine.is_editor_hint(): draw_gizmos() else: simulate_physics() [/gdscript] [csharp] if (Engine.IsEditorHint()) DrawGizmos(); else SimulatePhysics(); [/csharp] [/codeblocks] See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information. [b]Note:[/b] To detect whether the script is running on an editor [i]build[/i] (such as when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the "editor" argument instead. OS.has_feature("editor") evaluate to true both when the script is running in the editor and when running the project from the editor, but returns false when run from an exported project.

fn (Engine) is_embedded_in_editor #

fn (s &Engine) is_embedded_in_editor() bool

Returns true if the engine is running embedded in the editor. This is useful to prevent attempting to update window mode or window flags that are not supported when running the project embedded in the editor.

fn (Engine) get_write_movie_path #

fn (s &Engine) get_write_movie_path() string

Returns the path to the [MovieWriter]'s output file, or an empty string if the engine wasn't started in Movie Maker mode. The default path can be changed in [member ProjectSettings.editor/movie_writer/movie_file].

fn (Engine) set_print_to_stdout #

fn (s &Engine) set_print_to_stdout(enabled bool)

fn (Engine) is_printing_to_stdout #

fn (s &Engine) is_printing_to_stdout() bool

fn (Engine) set_print_error_messages #

fn (s &Engine) set_print_error_messages(enabled bool)

fn (Engine) is_printing_error_messages #

fn (s &Engine) is_printing_error_messages() bool

struct EngineDebugger #

struct EngineDebugger {
	Object
}

Exposes the internal debugger.

fn (EngineDebugger) to_variant #

fn (s &EngineDebugger) to_variant() Variant

fn (EngineDebugger) from_variant #

fn (mut s EngineDebugger) from_variant(variant &Variant)

fn (EngineDebugger) is_active #

fn (s &EngineDebugger) is_active() bool

Returns true if the debugger is active otherwise false.

fn (EngineDebugger) register_profiler #

fn (s &EngineDebugger) register_profiler(name string, profiler EngineProfiler)

Registers a profiler with the given [param name]. See [EngineProfiler] for more information.

fn (EngineDebugger) unregister_profiler #

fn (s &EngineDebugger) unregister_profiler(name string)

Unregisters a profiler with given [param name].

fn (EngineDebugger) is_profiling #

fn (s &EngineDebugger) is_profiling(name string) bool

Returns true if a profiler with the given name is present and active otherwise false.

fn (EngineDebugger) has_profiler #

fn (s &EngineDebugger) has_profiler(name string) bool

Returns true if a profiler with the given name is present otherwise false.

fn (EngineDebugger) profiler_add_frame_data #

fn (s &EngineDebugger) profiler_add_frame_data(name string, data Array)

Calls the add callable of the profiler with given [param name] and [param data].

fn (EngineDebugger) profiler_enable #

fn (s &EngineDebugger) profiler_enable(name string, enable bool, cfg EngineDebugger_profiler_enable_Cfg)

Calls the toggle callable of the profiler with given [param name] and [param arguments]. Enables/Disables the same profiler depending on [param enable] argument.

fn (EngineDebugger) register_message_capture #

fn (s &EngineDebugger) register_message_capture(name string, callable Callable)

Registers a message capture with given [param name]. If [param name] is "my_message" then messages starting with "my_message:" will be called with the given callable. The callable must accept a message string and a data array as argument. The callable should return true if the message is recognized. [b]Note:[/b] The callable will receive the message with the prefix stripped, unlike [method EditorDebuggerPlugin._capture]. See the [EditorDebuggerPlugin] description for an example.

fn (EngineDebugger) unregister_message_capture #

fn (s &EngineDebugger) unregister_message_capture(name string)

Unregisters the message capture with given [param name].

fn (EngineDebugger) has_capture #

fn (s &EngineDebugger) has_capture(name string) bool

Returns true if a capture with the given name is present otherwise false.

fn (EngineDebugger) line_poll #

fn (s &EngineDebugger) line_poll()

Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught.

fn (EngineDebugger) send_message #

fn (s &EngineDebugger) send_message(message string, data Array)

Sends a message with given [param message] and [param data] array.

fn (EngineDebugger) debug #

fn (s &EngineDebugger) debug(cfg EngineDebugger_debug_Cfg)

Starts a debug break in script execution, optionally specifying whether the program can continue based on [param can_continue] and whether the break was due to a breakpoint.

fn (EngineDebugger) script_debug #

fn (s &EngineDebugger) script_debug(language ScriptLanguage, cfg EngineDebugger_script_debug_Cfg)

Starts a debug break in script execution, optionally specifying whether the program can continue based on [param can_continue] and whether the break was due to a breakpoint.

fn (EngineDebugger) set_lines_left #

fn (s &EngineDebugger) set_lines_left(lines i64)

Sets the current debugging lines that remain.

fn (EngineDebugger) get_lines_left #

fn (s &EngineDebugger) get_lines_left() i64

Returns the number of lines that remain.

fn (EngineDebugger) set_depth #

fn (s &EngineDebugger) set_depth(depth i64)

Sets the current debugging depth.

fn (EngineDebugger) get_depth #

fn (s &EngineDebugger) get_depth() i64

Returns the current debug depth.

fn (EngineDebugger) is_breakpoint #

fn (s &EngineDebugger) is_breakpoint(line i64, source string) bool

Returns true if the given [param source] and [param line] represent an existing breakpoint.

fn (EngineDebugger) is_skipping_breakpoints #

fn (s &EngineDebugger) is_skipping_breakpoints() bool

Returns true if the debugger is skipping breakpoints otherwise false.

fn (EngineDebugger) insert_breakpoint #

fn (s &EngineDebugger) insert_breakpoint(line i64, source string)

Inserts a new breakpoint with the given [param source] and [param line].

fn (EngineDebugger) remove_breakpoint #

fn (s &EngineDebugger) remove_breakpoint(line i64, source string)

Removes a breakpoint with the given [param source] and [param line].

fn (EngineDebugger) clear_breakpoints #

fn (s &EngineDebugger) clear_breakpoints()

Clears all breakpoints.

struct EngineDebugger_debug_Cfg #

@[params]
struct EngineDebugger_debug_Cfg {
pub:
	can_continue        bool
	is_error_breakpoint bool
}

Optional parameters for EngineDebugger#debug

struct EngineDebugger_profiler_enable_Cfg #

@[params]
struct EngineDebugger_profiler_enable_Cfg {
pub:
	arguments Array = Array.new0()
}

Optional parameters for EngineDebugger#profiler_enable

struct EngineDebugger_script_debug_Cfg #

@[params]
struct EngineDebugger_script_debug_Cfg {
pub:
	can_continue        bool
	is_error_breakpoint bool
}

Optional parameters for EngineDebugger#script_debug

struct EngineProfiler #

struct EngineProfiler {
	RefCounted
}

Base class for creating custom profilers.

fn (EngineProfiler) to_variant #

fn (s &EngineProfiler) to_variant() Variant

fn (EngineProfiler) from_variant #

fn (mut s EngineProfiler) from_variant(variant &Variant)

fn (EngineProfiler) gd_toggle #

fn (s &EngineProfiler) gd_toggle(enable bool, options Array)

Called when the profiler is enabled/disabled, along with a set of [param options].

fn (EngineProfiler) gd_add_frame #

fn (s &EngineProfiler) gd_add_frame(data Array)

Called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data].

fn (EngineProfiler) gd_tick #

fn (s &EngineProfiler) gd_tick(frame_time f64, process_time f64, physics_time f64, physics_frame_time f64)

Called once every engine iteration when the profiler is active with information about the current frame. All time values are in seconds. Lower values represent faster processing times and are therefore considered better.

struct Engine_capture_script_backtraces_Cfg #

@[params]
struct Engine_capture_script_backtraces_Cfg {
pub:
	include_variables bool
}

Optional parameters for Engine#capture_script_backtraces

struct Environment #

struct Environment {
	Resource
}

Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options.

fn (Environment) to_variant #

fn (s &Environment) to_variant() Variant

fn (Environment) from_variant #

fn (mut s Environment) from_variant(variant &Variant)

fn (Environment) set_background #

fn (s &Environment) set_background(mode EnvironmentBGMode)

fn (Environment) get_background #

fn (s &Environment) get_background() EnvironmentBGMode

fn (Environment) set_sky #

fn (s &Environment) set_sky(sky Sky)

fn (Environment) get_sky #

fn (s &Environment) get_sky() Sky

fn (Environment) set_sky_custom_fov #

fn (s &Environment) set_sky_custom_fov(scale f64)

fn (Environment) get_sky_custom_fov #

fn (s &Environment) get_sky_custom_fov() f64

fn (Environment) set_sky_rotation #

fn (s &Environment) set_sky_rotation(euler_radians Vector3)

fn (Environment) get_sky_rotation #

fn (s &Environment) get_sky_rotation() Vector3

fn (Environment) set_bg_color #

fn (s &Environment) set_bg_color(color Color)

fn (Environment) get_bg_color #

fn (s &Environment) get_bg_color() Color

fn (Environment) set_bg_energy_multiplier #

fn (s &Environment) set_bg_energy_multiplier(energy f64)

fn (Environment) get_bg_energy_multiplier #

fn (s &Environment) get_bg_energy_multiplier() f64

fn (Environment) set_bg_intensity #

fn (s &Environment) set_bg_intensity(energy f64)

fn (Environment) get_bg_intensity #

fn (s &Environment) get_bg_intensity() f64

fn (Environment) set_canvas_max_layer #

fn (s &Environment) set_canvas_max_layer(layer i64)

fn (Environment) get_canvas_max_layer #

fn (s &Environment) get_canvas_max_layer() i64

fn (Environment) set_camera_feed_id #

fn (s &Environment) set_camera_feed_id(id i64)

fn (Environment) get_camera_feed_id #

fn (s &Environment) get_camera_feed_id() i64

fn (Environment) set_ambient_light_color #

fn (s &Environment) set_ambient_light_color(color Color)

fn (Environment) get_ambient_light_color #

fn (s &Environment) get_ambient_light_color() Color

fn (Environment) set_ambient_source #

fn (s &Environment) set_ambient_source(source EnvironmentAmbientSource)

fn (Environment) get_ambient_source #

fn (s &Environment) get_ambient_source() EnvironmentAmbientSource

fn (Environment) set_ambient_light_energy #

fn (s &Environment) set_ambient_light_energy(energy f64)

fn (Environment) get_ambient_light_energy #

fn (s &Environment) get_ambient_light_energy() f64

fn (Environment) set_ambient_light_sky_contribution #

fn (s &Environment) set_ambient_light_sky_contribution(ratio f64)

fn (Environment) get_ambient_light_sky_contribution #

fn (s &Environment) get_ambient_light_sky_contribution() f64

fn (Environment) set_reflection_source #

fn (s &Environment) set_reflection_source(source EnvironmentReflectionSource)

fn (Environment) get_reflection_source #

fn (s &Environment) get_reflection_source() EnvironmentReflectionSource

fn (Environment) set_tonemapper #

fn (s &Environment) set_tonemapper(mode EnvironmentToneMapper)

fn (Environment) get_tonemapper #

fn (s &Environment) get_tonemapper() EnvironmentToneMapper

fn (Environment) set_tonemap_exposure #

fn (s &Environment) set_tonemap_exposure(exposure f64)

fn (Environment) get_tonemap_exposure #

fn (s &Environment) get_tonemap_exposure() f64

fn (Environment) set_tonemap_white #

fn (s &Environment) set_tonemap_white(white f64)

fn (Environment) get_tonemap_white #

fn (s &Environment) get_tonemap_white() f64

fn (Environment) set_ssr_enabled #

fn (s &Environment) set_ssr_enabled(enabled bool)

fn (Environment) is_ssr_enabled #

fn (s &Environment) is_ssr_enabled() bool

fn (Environment) set_ssr_max_steps #

fn (s &Environment) set_ssr_max_steps(max_steps i64)

fn (Environment) get_ssr_max_steps #

fn (s &Environment) get_ssr_max_steps() i64

fn (Environment) set_ssr_fade_in #

fn (s &Environment) set_ssr_fade_in(fade_in f64)

fn (Environment) get_ssr_fade_in #

fn (s &Environment) get_ssr_fade_in() f64

fn (Environment) set_ssr_fade_out #

fn (s &Environment) set_ssr_fade_out(fade_out f64)

fn (Environment) get_ssr_fade_out #

fn (s &Environment) get_ssr_fade_out() f64

fn (Environment) set_ssr_depth_tolerance #

fn (s &Environment) set_ssr_depth_tolerance(depth_tolerance f64)

fn (Environment) get_ssr_depth_tolerance #

fn (s &Environment) get_ssr_depth_tolerance() f64

fn (Environment) set_ssao_enabled #

fn (s &Environment) set_ssao_enabled(enabled bool)

fn (Environment) is_ssao_enabled #

fn (s &Environment) is_ssao_enabled() bool

fn (Environment) set_ssao_radius #

fn (s &Environment) set_ssao_radius(radius f64)

fn (Environment) get_ssao_radius #

fn (s &Environment) get_ssao_radius() f64

fn (Environment) set_ssao_intensity #

fn (s &Environment) set_ssao_intensity(intensity f64)

fn (Environment) get_ssao_intensity #

fn (s &Environment) get_ssao_intensity() f64

fn (Environment) set_ssao_power #

fn (s &Environment) set_ssao_power(power f64)

fn (Environment) get_ssao_power #

fn (s &Environment) get_ssao_power() f64

fn (Environment) set_ssao_detail #

fn (s &Environment) set_ssao_detail(detail f64)

fn (Environment) get_ssao_detail #

fn (s &Environment) get_ssao_detail() f64

fn (Environment) set_ssao_horizon #

fn (s &Environment) set_ssao_horizon(horizon f64)

fn (Environment) get_ssao_horizon #

fn (s &Environment) get_ssao_horizon() f64

fn (Environment) set_ssao_sharpness #

fn (s &Environment) set_ssao_sharpness(sharpness f64)

fn (Environment) get_ssao_sharpness #

fn (s &Environment) get_ssao_sharpness() f64

fn (Environment) set_ssao_direct_light_affect #

fn (s &Environment) set_ssao_direct_light_affect(amount f64)

fn (Environment) get_ssao_direct_light_affect #

fn (s &Environment) get_ssao_direct_light_affect() f64

fn (Environment) set_ssao_ao_channel_affect #

fn (s &Environment) set_ssao_ao_channel_affect(amount f64)

fn (Environment) get_ssao_ao_channel_affect #

fn (s &Environment) get_ssao_ao_channel_affect() f64

fn (Environment) set_ssil_enabled #

fn (s &Environment) set_ssil_enabled(enabled bool)

fn (Environment) is_ssil_enabled #

fn (s &Environment) is_ssil_enabled() bool

fn (Environment) set_ssil_radius #

fn (s &Environment) set_ssil_radius(radius f64)

fn (Environment) get_ssil_radius #

fn (s &Environment) get_ssil_radius() f64

fn (Environment) set_ssil_intensity #

fn (s &Environment) set_ssil_intensity(intensity f64)

fn (Environment) get_ssil_intensity #

fn (s &Environment) get_ssil_intensity() f64

fn (Environment) set_ssil_sharpness #

fn (s &Environment) set_ssil_sharpness(sharpness f64)

fn (Environment) get_ssil_sharpness #

fn (s &Environment) get_ssil_sharpness() f64

fn (Environment) set_ssil_normal_rejection #

fn (s &Environment) set_ssil_normal_rejection(normal_rejection f64)

fn (Environment) get_ssil_normal_rejection #

fn (s &Environment) get_ssil_normal_rejection() f64

fn (Environment) set_sdfgi_enabled #

fn (s &Environment) set_sdfgi_enabled(enabled bool)

fn (Environment) is_sdfgi_enabled #

fn (s &Environment) is_sdfgi_enabled() bool

fn (Environment) set_sdfgi_cascades #

fn (s &Environment) set_sdfgi_cascades(amount i64)

fn (Environment) get_sdfgi_cascades #

fn (s &Environment) get_sdfgi_cascades() i64

fn (Environment) set_sdfgi_min_cell_size #

fn (s &Environment) set_sdfgi_min_cell_size(size f64)

fn (Environment) get_sdfgi_min_cell_size #

fn (s &Environment) get_sdfgi_min_cell_size() f64

fn (Environment) set_sdfgi_max_distance #

fn (s &Environment) set_sdfgi_max_distance(distance f64)

fn (Environment) get_sdfgi_max_distance #

fn (s &Environment) get_sdfgi_max_distance() f64

fn (Environment) set_sdfgi_cascade0_distance #

fn (s &Environment) set_sdfgi_cascade0_distance(distance f64)

fn (Environment) get_sdfgi_cascade0_distance #

fn (s &Environment) get_sdfgi_cascade0_distance() f64

fn (Environment) set_sdfgi_y_scale #

fn (s &Environment) set_sdfgi_y_scale(scale EnvironmentSDFGIYScale)

fn (Environment) get_sdfgi_y_scale #

fn (s &Environment) get_sdfgi_y_scale() EnvironmentSDFGIYScale

fn (Environment) set_sdfgi_use_occlusion #

fn (s &Environment) set_sdfgi_use_occlusion(enable bool)

fn (Environment) is_sdfgi_using_occlusion #

fn (s &Environment) is_sdfgi_using_occlusion() bool

fn (Environment) set_sdfgi_bounce_feedback #

fn (s &Environment) set_sdfgi_bounce_feedback(amount f64)

fn (Environment) get_sdfgi_bounce_feedback #

fn (s &Environment) get_sdfgi_bounce_feedback() f64

fn (Environment) set_sdfgi_read_sky_light #

fn (s &Environment) set_sdfgi_read_sky_light(enable bool)

fn (Environment) is_sdfgi_reading_sky_light #

fn (s &Environment) is_sdfgi_reading_sky_light() bool

fn (Environment) set_sdfgi_energy #

fn (s &Environment) set_sdfgi_energy(amount f64)

fn (Environment) get_sdfgi_energy #

fn (s &Environment) get_sdfgi_energy() f64

fn (Environment) set_sdfgi_normal_bias #

fn (s &Environment) set_sdfgi_normal_bias(bias f64)

fn (Environment) get_sdfgi_normal_bias #

fn (s &Environment) get_sdfgi_normal_bias() f64

fn (Environment) set_sdfgi_probe_bias #

fn (s &Environment) set_sdfgi_probe_bias(bias f64)

fn (Environment) get_sdfgi_probe_bias #

fn (s &Environment) get_sdfgi_probe_bias() f64

fn (Environment) set_glow_enabled #

fn (s &Environment) set_glow_enabled(enabled bool)

fn (Environment) is_glow_enabled #

fn (s &Environment) is_glow_enabled() bool

fn (Environment) set_glow_level #

fn (s &Environment) set_glow_level(idx i64, intensity f64)

Sets the intensity of the glow level [param idx]. A value above 0.0 enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled.

fn (Environment) get_glow_level #

fn (s &Environment) get_glow_level(idx i64) f64

Returns the intensity of the glow level [param idx].

fn (Environment) set_glow_normalized #

fn (s &Environment) set_glow_normalized(normalize bool)

fn (Environment) is_glow_normalized #

fn (s &Environment) is_glow_normalized() bool

fn (Environment) set_glow_intensity #

fn (s &Environment) set_glow_intensity(intensity f64)

fn (Environment) get_glow_intensity #

fn (s &Environment) get_glow_intensity() f64

fn (Environment) set_glow_strength #

fn (s &Environment) set_glow_strength(strength f64)

fn (Environment) get_glow_strength #

fn (s &Environment) get_glow_strength() f64

fn (Environment) set_glow_mix #

fn (s &Environment) set_glow_mix(mix f64)

fn (Environment) get_glow_mix #

fn (s &Environment) get_glow_mix() f64

fn (Environment) set_glow_bloom #

fn (s &Environment) set_glow_bloom(amount f64)

fn (Environment) get_glow_bloom #

fn (s &Environment) get_glow_bloom() f64

fn (Environment) set_glow_blend_mode #

fn (s &Environment) set_glow_blend_mode(mode EnvironmentGlowBlendMode)

fn (Environment) get_glow_blend_mode #

fn (s &Environment) get_glow_blend_mode() EnvironmentGlowBlendMode

fn (Environment) set_glow_hdr_bleed_threshold #

fn (s &Environment) set_glow_hdr_bleed_threshold(threshold f64)

fn (Environment) get_glow_hdr_bleed_threshold #

fn (s &Environment) get_glow_hdr_bleed_threshold() f64

fn (Environment) set_glow_hdr_bleed_scale #

fn (s &Environment) set_glow_hdr_bleed_scale(scale f64)

fn (Environment) get_glow_hdr_bleed_scale #

fn (s &Environment) get_glow_hdr_bleed_scale() f64

fn (Environment) set_glow_hdr_luminance_cap #

fn (s &Environment) set_glow_hdr_luminance_cap(amount f64)

fn (Environment) get_glow_hdr_luminance_cap #

fn (s &Environment) get_glow_hdr_luminance_cap() f64

fn (Environment) set_glow_map_strength #

fn (s &Environment) set_glow_map_strength(strength f64)

fn (Environment) get_glow_map_strength #

fn (s &Environment) get_glow_map_strength() f64

fn (Environment) set_glow_map #

fn (s &Environment) set_glow_map(mode Texture)

fn (Environment) get_glow_map #

fn (s &Environment) get_glow_map() Texture

fn (Environment) set_fog_enabled #

fn (s &Environment) set_fog_enabled(enabled bool)

fn (Environment) is_fog_enabled #

fn (s &Environment) is_fog_enabled() bool

fn (Environment) set_fog_mode #

fn (s &Environment) set_fog_mode(mode EnvironmentFogMode)

fn (Environment) get_fog_mode #

fn (s &Environment) get_fog_mode() EnvironmentFogMode

fn (Environment) set_fog_light_color #

fn (s &Environment) set_fog_light_color(light_color Color)

fn (Environment) get_fog_light_color #

fn (s &Environment) get_fog_light_color() Color

fn (Environment) set_fog_light_energy #

fn (s &Environment) set_fog_light_energy(light_energy f64)

fn (Environment) get_fog_light_energy #

fn (s &Environment) get_fog_light_energy() f64

fn (Environment) set_fog_sun_scatter #

fn (s &Environment) set_fog_sun_scatter(sun_scatter f64)

fn (Environment) get_fog_sun_scatter #

fn (s &Environment) get_fog_sun_scatter() f64

fn (Environment) set_fog_density #

fn (s &Environment) set_fog_density(density f64)

fn (Environment) get_fog_density #

fn (s &Environment) get_fog_density() f64

fn (Environment) set_fog_height #

fn (s &Environment) set_fog_height(height f64)

fn (Environment) get_fog_height #

fn (s &Environment) get_fog_height() f64

fn (Environment) set_fog_height_density #

fn (s &Environment) set_fog_height_density(height_density f64)

fn (Environment) get_fog_height_density #

fn (s &Environment) get_fog_height_density() f64

fn (Environment) set_fog_aerial_perspective #

fn (s &Environment) set_fog_aerial_perspective(aerial_perspective f64)

fn (Environment) get_fog_aerial_perspective #

fn (s &Environment) get_fog_aerial_perspective() f64

fn (Environment) set_fog_sky_affect #

fn (s &Environment) set_fog_sky_affect(sky_affect f64)

fn (Environment) get_fog_sky_affect #

fn (s &Environment) get_fog_sky_affect() f64

fn (Environment) set_fog_depth_curve #

fn (s &Environment) set_fog_depth_curve(curve f64)

fn (Environment) get_fog_depth_curve #

fn (s &Environment) get_fog_depth_curve() f64

fn (Environment) set_fog_depth_begin #

fn (s &Environment) set_fog_depth_begin(begin f64)

fn (Environment) get_fog_depth_begin #

fn (s &Environment) get_fog_depth_begin() f64

fn (Environment) set_fog_depth_end #

fn (s &Environment) set_fog_depth_end(end f64)

fn (Environment) get_fog_depth_end #

fn (s &Environment) get_fog_depth_end() f64

fn (Environment) set_volumetric_fog_enabled #

fn (s &Environment) set_volumetric_fog_enabled(enabled bool)

fn (Environment) is_volumetric_fog_enabled #

fn (s &Environment) is_volumetric_fog_enabled() bool

fn (Environment) set_volumetric_fog_emission #

fn (s &Environment) set_volumetric_fog_emission(color Color)

fn (Environment) get_volumetric_fog_emission #

fn (s &Environment) get_volumetric_fog_emission() Color

fn (Environment) set_volumetric_fog_albedo #

fn (s &Environment) set_volumetric_fog_albedo(color Color)

fn (Environment) get_volumetric_fog_albedo #

fn (s &Environment) get_volumetric_fog_albedo() Color

fn (Environment) set_volumetric_fog_density #

fn (s &Environment) set_volumetric_fog_density(density f64)

fn (Environment) get_volumetric_fog_density #

fn (s &Environment) get_volumetric_fog_density() f64

fn (Environment) set_volumetric_fog_emission_energy #

fn (s &Environment) set_volumetric_fog_emission_energy(begin f64)

fn (Environment) get_volumetric_fog_emission_energy #

fn (s &Environment) get_volumetric_fog_emission_energy() f64

fn (Environment) set_volumetric_fog_anisotropy #

fn (s &Environment) set_volumetric_fog_anisotropy(anisotropy f64)

fn (Environment) get_volumetric_fog_anisotropy #

fn (s &Environment) get_volumetric_fog_anisotropy() f64

fn (Environment) set_volumetric_fog_length #

fn (s &Environment) set_volumetric_fog_length(length f64)

fn (Environment) get_volumetric_fog_length #

fn (s &Environment) get_volumetric_fog_length() f64

fn (Environment) set_volumetric_fog_detail_spread #

fn (s &Environment) set_volumetric_fog_detail_spread(detail_spread f64)

fn (Environment) get_volumetric_fog_detail_spread #

fn (s &Environment) get_volumetric_fog_detail_spread() f64

fn (Environment) set_volumetric_fog_gi_inject #

fn (s &Environment) set_volumetric_fog_gi_inject(gi_inject f64)

fn (Environment) get_volumetric_fog_gi_inject #

fn (s &Environment) get_volumetric_fog_gi_inject() f64

fn (Environment) set_volumetric_fog_ambient_inject #

fn (s &Environment) set_volumetric_fog_ambient_inject(enabled f64)

fn (Environment) get_volumetric_fog_ambient_inject #

fn (s &Environment) get_volumetric_fog_ambient_inject() f64

fn (Environment) set_volumetric_fog_sky_affect #

fn (s &Environment) set_volumetric_fog_sky_affect(sky_affect f64)

fn (Environment) get_volumetric_fog_sky_affect #

fn (s &Environment) get_volumetric_fog_sky_affect() f64

fn (Environment) set_volumetric_fog_temporal_reprojection_enabled #

fn (s &Environment) set_volumetric_fog_temporal_reprojection_enabled(enabled bool)

fn (Environment) is_volumetric_fog_temporal_reprojection_enabled #

fn (s &Environment) is_volumetric_fog_temporal_reprojection_enabled() bool

fn (Environment) set_volumetric_fog_temporal_reprojection_amount #

fn (s &Environment) set_volumetric_fog_temporal_reprojection_amount(temporal_reprojection_amount f64)

fn (Environment) get_volumetric_fog_temporal_reprojection_amount #

fn (s &Environment) get_volumetric_fog_temporal_reprojection_amount() f64

fn (Environment) set_adjustment_enabled #

fn (s &Environment) set_adjustment_enabled(enabled bool)

fn (Environment) is_adjustment_enabled #

fn (s &Environment) is_adjustment_enabled() bool

fn (Environment) set_adjustment_brightness #

fn (s &Environment) set_adjustment_brightness(brightness f64)

fn (Environment) get_adjustment_brightness #

fn (s &Environment) get_adjustment_brightness() f64

fn (Environment) set_adjustment_contrast #

fn (s &Environment) set_adjustment_contrast(contrast f64)

fn (Environment) get_adjustment_contrast #

fn (s &Environment) get_adjustment_contrast() f64

fn (Environment) set_adjustment_saturation #

fn (s &Environment) set_adjustment_saturation(saturation f64)

fn (Environment) get_adjustment_saturation #

fn (s &Environment) get_adjustment_saturation() f64

fn (Environment) set_adjustment_color_correction #

fn (s &Environment) set_adjustment_color_correction(color_correction Texture)

fn (Environment) get_adjustment_color_correction #

fn (s &Environment) get_adjustment_color_correction() Texture

struct Expression #

struct Expression {
	RefCounted
}

A class that stores an expression you can execute.

fn (Expression) to_variant #

fn (s &Expression) to_variant() Variant

fn (Expression) from_variant #

fn (mut s Expression) from_variant(variant &Variant)

fn (Expression) parse #

fn (s &Expression) parse(expression string, cfg Expression_parse_Cfg) GDError

Parses the expression and returns an [enum Error] code. You can optionally specify names of variables that may appear in the expression with [param input_names], so that you can bind them when it gets executed.

fn (Expression) execute #

fn (s &Expression) execute(cfg Expression_execute_Cfg) Variant

Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed]. If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order.

fn (Expression) has_execute_failed #

fn (s &Expression) has_execute_failed() bool

Returns true if [method execute] has failed.

fn (Expression) get_error_text #

fn (s &Expression) get_error_text() string

Returns the error text if [method parse] or [method execute] has failed.

struct Expression_execute_Cfg #

@[params]
struct Expression_execute_Cfg {
pub:
	inputs           Array = Array.new0()
	base_instance    Object
	show_error       bool
	const_calls_only bool
}

Optional parameters for Expression#execute

struct Expression_parse_Cfg #

@[params]
struct Expression_parse_Cfg {
pub:
	input_names PackedStringArray = PackedStringArray{}
}

Optional parameters for Expression#parse

struct ExternalTexture #

struct ExternalTexture {
	Texture2D
}

Texture which displays the content of an external buffer.

fn (ExternalTexture) to_variant #

fn (s &ExternalTexture) to_variant() Variant

fn (ExternalTexture) from_variant #

fn (mut s ExternalTexture) from_variant(variant &Variant)

fn (ExternalTexture) set_size #

fn (s &ExternalTexture) set_size(size Vector2)

fn (ExternalTexture) get_external_texture_id #

fn (s &ExternalTexture) get_external_texture_id() i64

Returns the external texture ID. Depending on your use case, you may need to pass this to platform APIs, for example, when creating an android.graphics.SurfaceTexture on Android.

fn (ExternalTexture) set_external_buffer_id #

fn (s &ExternalTexture) set_external_buffer_id(external_buffer_id i64)

Sets the external buffer ID. Depending on your use case, you may need to call this with data received from a platform API, for example, SurfaceTexture.getHardwareBuffer() on Android.

struct FBXDocument #

struct FBXDocument {
	GLTFDocument
}

Handles FBX documents.

fn (FBXDocument) to_variant #

fn (s &FBXDocument) to_variant() Variant

fn (FBXDocument) from_variant #

fn (mut s FBXDocument) from_variant(variant &Variant)

struct FBXState #

struct FBXState {
	GLTFState
}

fn (FBXState) to_variant #

fn (s &FBXState) to_variant() Variant

fn (FBXState) from_variant #

fn (mut s FBXState) from_variant(variant &Variant)

fn (FBXState) get_allow_geometry_helper_nodes #

fn (s &FBXState) get_allow_geometry_helper_nodes() bool

fn (FBXState) set_allow_geometry_helper_nodes #

fn (s &FBXState) set_allow_geometry_helper_nodes(allow bool)

struct FastNoiseLite #

struct FastNoiseLite {
	Noise
}

Generates noise using the FastNoiseLite library.

fn (FastNoiseLite) to_variant #

fn (s &FastNoiseLite) to_variant() Variant

fn (FastNoiseLite) from_variant #

fn (mut s FastNoiseLite) from_variant(variant &Variant)

fn (FastNoiseLite) set_noise_type #

fn (s &FastNoiseLite) set_noise_type(gd_type FastNoiseLiteNoiseType)

fn (FastNoiseLite) get_noise_type #

fn (s &FastNoiseLite) get_noise_type() FastNoiseLiteNoiseType

fn (FastNoiseLite) set_seed #

fn (s &FastNoiseLite) set_seed(seed i64)

fn (FastNoiseLite) get_seed #

fn (s &FastNoiseLite) get_seed() i64

fn (FastNoiseLite) set_frequency #

fn (s &FastNoiseLite) set_frequency(freq f64)

fn (FastNoiseLite) get_frequency #

fn (s &FastNoiseLite) get_frequency() f64

fn (FastNoiseLite) set_offset #

fn (s &FastNoiseLite) set_offset(offset Vector3)

fn (FastNoiseLite) get_offset #

fn (s &FastNoiseLite) get_offset() Vector3

fn (FastNoiseLite) set_fractal_type #

fn (s &FastNoiseLite) set_fractal_type(gd_type FastNoiseLiteFractalType)

fn (FastNoiseLite) get_fractal_type #

fn (s &FastNoiseLite) get_fractal_type() FastNoiseLiteFractalType

fn (FastNoiseLite) set_fractal_octaves #

fn (s &FastNoiseLite) set_fractal_octaves(octave_count i64)

fn (FastNoiseLite) get_fractal_octaves #

fn (s &FastNoiseLite) get_fractal_octaves() i64

fn (FastNoiseLite) set_fractal_lacunarity #

fn (s &FastNoiseLite) set_fractal_lacunarity(lacunarity f64)

fn (FastNoiseLite) get_fractal_lacunarity #

fn (s &FastNoiseLite) get_fractal_lacunarity() f64

fn (FastNoiseLite) set_fractal_gain #

fn (s &FastNoiseLite) set_fractal_gain(gain f64)

fn (FastNoiseLite) get_fractal_gain #

fn (s &FastNoiseLite) get_fractal_gain() f64

fn (FastNoiseLite) set_fractal_weighted_strength #

fn (s &FastNoiseLite) set_fractal_weighted_strength(weighted_strength f64)

fn (FastNoiseLite) get_fractal_weighted_strength #

fn (s &FastNoiseLite) get_fractal_weighted_strength() f64

fn (FastNoiseLite) set_fractal_ping_pong_strength #

fn (s &FastNoiseLite) set_fractal_ping_pong_strength(ping_pong_strength f64)

fn (FastNoiseLite) get_fractal_ping_pong_strength #

fn (s &FastNoiseLite) get_fractal_ping_pong_strength() f64

fn (FastNoiseLite) set_cellular_distance_function #

fn (s &FastNoiseLite) set_cellular_distance_function(func FastNoiseLiteCellularDistanceFunction)

fn (FastNoiseLite) get_cellular_distance_function #

fn (s &FastNoiseLite) get_cellular_distance_function() FastNoiseLiteCellularDistanceFunction

fn (FastNoiseLite) set_cellular_jitter #

fn (s &FastNoiseLite) set_cellular_jitter(jitter f64)

fn (FastNoiseLite) get_cellular_jitter #

fn (s &FastNoiseLite) get_cellular_jitter() f64

fn (FastNoiseLite) set_cellular_return_type #

fn (s &FastNoiseLite) set_cellular_return_type(ret FastNoiseLiteCellularReturnType)

fn (FastNoiseLite) get_cellular_return_type #

fn (s &FastNoiseLite) get_cellular_return_type() FastNoiseLiteCellularReturnType

fn (FastNoiseLite) set_domain_warp_enabled #

fn (s &FastNoiseLite) set_domain_warp_enabled(domain_warp_enabled bool)

fn (FastNoiseLite) is_domain_warp_enabled #

fn (s &FastNoiseLite) is_domain_warp_enabled() bool

fn (FastNoiseLite) set_domain_warp_type #

fn (s &FastNoiseLite) set_domain_warp_type(domain_warp_type FastNoiseLiteDomainWarpType)

fn (FastNoiseLite) get_domain_warp_type #

fn (s &FastNoiseLite) get_domain_warp_type() FastNoiseLiteDomainWarpType

fn (FastNoiseLite) set_domain_warp_amplitude #

fn (s &FastNoiseLite) set_domain_warp_amplitude(domain_warp_amplitude f64)

fn (FastNoiseLite) get_domain_warp_amplitude #

fn (s &FastNoiseLite) get_domain_warp_amplitude() f64

fn (FastNoiseLite) set_domain_warp_frequency #

fn (s &FastNoiseLite) set_domain_warp_frequency(domain_warp_frequency f64)

fn (FastNoiseLite) get_domain_warp_frequency #

fn (s &FastNoiseLite) get_domain_warp_frequency() f64

fn (FastNoiseLite) set_domain_warp_fractal_type #

fn (s &FastNoiseLite) set_domain_warp_fractal_type(domain_warp_fractal_type FastNoiseLiteDomainWarpFractalType)

fn (FastNoiseLite) get_domain_warp_fractal_type #

fn (s &FastNoiseLite) get_domain_warp_fractal_type() FastNoiseLiteDomainWarpFractalType

fn (FastNoiseLite) set_domain_warp_fractal_octaves #

fn (s &FastNoiseLite) set_domain_warp_fractal_octaves(domain_warp_octave_count i64)

fn (FastNoiseLite) get_domain_warp_fractal_octaves #

fn (s &FastNoiseLite) get_domain_warp_fractal_octaves() i64

fn (FastNoiseLite) set_domain_warp_fractal_lacunarity #

fn (s &FastNoiseLite) set_domain_warp_fractal_lacunarity(domain_warp_lacunarity f64)

fn (FastNoiseLite) get_domain_warp_fractal_lacunarity #

fn (s &FastNoiseLite) get_domain_warp_fractal_lacunarity() f64

fn (FastNoiseLite) set_domain_warp_fractal_gain #

fn (s &FastNoiseLite) set_domain_warp_fractal_gain(domain_warp_gain f64)

fn (FastNoiseLite) get_domain_warp_fractal_gain #

fn (s &FastNoiseLite) get_domain_warp_fractal_gain() f64

struct FileAccess #

struct FileAccess {
	RefCounted
}

Provides methods for file reading and writing operations.

fn (FileAccess) to_variant #

fn (s &FileAccess) to_variant() Variant

fn (FileAccess) from_variant #

fn (mut s FileAccess) from_variant(variant &Variant)

fn (FileAccess) resize #

fn (s &FileAccess) resize(length i64) GDError

Resizes the file to a specified length. The file must be open in a mode that permits writing. If the file is extended, NUL characters are appended. If the file is truncated, all data from the end file to the original length of the file is lost.

fn (FileAccess) flush #

fn (s &FileAccess) flush()

Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. [b]Note:[/b] Only call [method flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes.

fn (FileAccess) get_path #

fn (s &FileAccess) get_path() string

Returns the path as a [String] for the current open file.

fn (FileAccess) get_path_absolute #

fn (s &FileAccess) get_path_absolute() string

Returns the absolute path as a [String] for the current open file.

fn (FileAccess) is_open #

fn (s &FileAccess) is_open() bool

Returns true if the file is currently opened.

fn (FileAccess) seek #

fn (s &FileAccess) seek(position i64)

Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). This changes the value returned by [method get_position].

fn (FileAccess) seek_end #

fn (s &FileAccess) seek_end(cfg FileAccess_seek_end_Cfg)

Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). This changes the value returned by [method get_position]. [b]Note:[/b] This is an offset, so you should use negative numbers or the file cursor will be at the end of the file.

fn (FileAccess) get_position #

fn (s &FileAccess) get_position() i64

Returns the file cursor's position in bytes from the beginning of the file. This is the file reading/writing cursor set by [method seek] or [method seek_end] and advanced by read/write operations.

fn (FileAccess) get_length #

fn (s &FileAccess) get_length() i64

Returns the size of the file in bytes. For a pipe, returns the number of bytes available for reading from the pipe.

fn (FileAccess) eof_reached #

fn (s &FileAccess) eof_reached() bool

Returns true if the file cursor has already read past the end of the file. [b]Note:[/b] eof_reached() == false cannot be used to check whether there is more data available. To loop while there is more data available, use: [codeblocks] [gdscript] while file.get_position() < file.get_length():# Read data[/gdscript] [csharp] while (file.GetPosition() < file.GetLength()) { // Read data } [/csharp] [/codeblocks]

fn (FileAccess) get_8 #

fn (s &FileAccess) get_8() i64

Returns the next 8 bits from the file as an integer. This advances the file cursor by 1 byte. See [method store_8] for details on what values can be stored and retrieved this way.

fn (FileAccess) get_16 #

fn (s &FileAccess) get_16() i64

Returns the next 16 bits from the file as an integer. This advances the file cursor by 2 bytes. See [method store_16] for details on what values can be stored and retrieved this way.

fn (FileAccess) get_32 #

fn (s &FileAccess) get_32() i64

Returns the next 32 bits from the file as an integer. This advances the file cursor by 4 bytes. See [method store_32] for details on what values can be stored and retrieved this way.

fn (FileAccess) get_64 #

fn (s &FileAccess) get_64() i64

Returns the next 64 bits from the file as an integer. This advances the file cursor by 8 bytes. See [method store_64] for details on what values can be stored and retrieved this way.

fn (FileAccess) get_half #

fn (s &FileAccess) get_half() f64

Returns the next 16 bits from the file as a half-precision floating-point number. This advances the file cursor by 2 bytes.

fn (FileAccess) get_float #

fn (s &FileAccess) get_float() f64

Returns the next 32 bits from the file as a floating-point number. This advances the file cursor by 4 bytes.

fn (FileAccess) get_double #

fn (s &FileAccess) get_double() f64

Returns the next 64 bits from the file as a floating-point number. This advances the file cursor by 8 bytes.

fn (FileAccess) get_real #

fn (s &FileAccess) get_real() f64

Returns the next bits from the file as a floating-point number. This advances the file cursor by either 4 or 8 bytes, depending on the precision used by the Godot build that saved the file. If the file was saved by a Godot build compiled with the precision=single option (the default), the number of read bits for that file is 32. Otherwise, if compiled with the precision=double option, the number of read bits is 64.

fn (FileAccess) get_buffer #

fn (s &FileAccess) get_buffer(length i64) PackedByteArray

Returns next [param length] bytes of the file as a [PackedByteArray]. This advances the file cursor by [param length] bytes.

fn (FileAccess) get_line #

fn (s &FileAccess) get_line() string

Returns the next line of the file as a [String]. The returned string doesn't include newline (\n) or carriage return (\r) characters, but does include any other leading or trailing whitespace. This advances the file cursor to after the newline character at the end of the line. Text is interpreted as being UTF-8 encoded.

fn (FileAccess) get_csv_line #

fn (s &FileAccess) get_csv_line(cfg FileAccess_get_csv_line_Cfg) PackedStringArray

Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default "," (comma). This delimiter must be one-character long, and cannot be a double quotation mark. Text is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence. This advances the file cursor to after the newline character at the end of the line. For example, the following CSV lines are valid and will be properly parsed as two strings each: [codeblock lang=text] Alice,"Hello, Bob!" Bob,Alice! What a surprise! Alice,"I thought you'd reply with ""Hello, world""."

Note how the second line can omit the enclosing quotes as it does not include the delimiter. However it [i]could[/i] very well use quotes, it was only written without for demonstration purposes. The third line must use `""` for each quotation mark that needs to be interpreted as such instead of the end of a text value.

fn (FileAccess) get_as_text #

fn (s &FileAccess) get_as_text(cfg FileAccess_get_as_text_Cfg) string

Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded. This ignores the file cursor and does not affect it. If [param skip_cr] is true, carriage return characters (\r, CR) will be ignored when parsing the UTF-8, so that only line feed characters (\n, LF) represent a new line (Unix convention).

fn (FileAccess) is_big_endian #

fn (s &FileAccess) is_big_endian() bool

fn (FileAccess) set_big_endian #

fn (s &FileAccess) set_big_endian(big_endian bool)

fn (FileAccess) get_error #

fn (s &FileAccess) get_error() GDError

Returns the last error that happened when trying to perform operations. Compare with the ERR_FILE_* constants from [enum Error].

fn (FileAccess) get_var #

fn (s &FileAccess) get_var(cfg FileAccess_get_var_Cfg) Variant

Returns the next [Variant] value from the file. If [param allow_objects] is true, decoding objects is allowed. This advances the file cursor by the number of bytes read. Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method, as described in the [url=$DOCS_URL/tutorials/io/binary_serialization_api.html]Binary serialization API[/url] documentation. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.

fn (FileAccess) store_8 #

fn (s &FileAccess) store_8(value i64) bool

Stores an integer as 8 bits in the file. This advances the file cursor by 1 byte. [b]Note:[/b] The [param value] should lie in the interval [0, 255]. Any other value will overflow and wrap around. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate. To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example).

fn (FileAccess) store_16 #

fn (s &FileAccess) store_16(value i64) bool

Stores an integer as 16 bits in the file. This advances the file cursor by 2 bytes. [b]Note:[/b] The [param value] should lie in the interval [0, 2^16 - 1]. Any other value will overflow and wrap around. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate. To store a signed integer, use [method store_64] or store a signed integer from the interval [-2^15, 2^15 - 1] (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example: [codeblocks] [gdscript] const MAX_15B = 1 << 15 const MAX_16B = 1 << 16

func unsigned16_to_signed(unsigned): return (unsigned + MAX_15B) % MAX_16B - MAX_15B

func _ready(): var f = FileAccess.open("user://file.dat", FileAccess.WRITE_READ) f.store_16(-42) # This wraps around and stores 65494 (2^16 - 42). f.store_16(121) # In bounds, will store 121. f.seek(0) # Go back to start to read the stored value. var read1 = f.get_16() # 65494 var read2 = f.get_16() # 121 var converted1 = unsigned16_to_signed(read1) # -42 var converted2 = unsigned16_to_signed(read2) # 121 [/gdscript] [csharp] public override void _Ready() { using var f = FileAccess.Open("user://file.dat", FileAccess.ModeFlags.WriteRead); f.Store16(unchecked((ushort)-42)); // This wraps around and stores 65494 (2^16 - 42). f.Store16(121); // In bounds, will store 121. f.Seek(0); // Go back to start to read the stored value. ushort read1 = f.Get16(); // 65494 ushort read2 = f.Get16(); // 121 short converted1 = (short)read1; // -42 short converted2 = (short)read2; // 121 } [/csharp] [/codeblocks]

fn (FileAccess) store_32 #

fn (s &FileAccess) store_32(value i64) bool

Stores an integer as 32 bits in the file. This advances the file cursor by 4 bytes. [b]Note:[/b] The [param value] should lie in the interval [0, 2^32 - 1]. Any other value will overflow and wrap around. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate. To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example).

fn (FileAccess) store_64 #

fn (s &FileAccess) store_64(value i64) bool

Stores an integer as 64 bits in the file. This advances the file cursor by 8 bytes. [b]Note:[/b] The [param value] must lie in the interval [-2^63, 2^63 - 1] (i.e. be a valid [int] value). [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_half #

fn (s &FileAccess) store_half(value f64) bool

Stores a half-precision floating-point number as 16 bits in the file. This advances the file cursor by 2 bytes. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_float #

fn (s &FileAccess) store_float(value f64) bool

Stores a floating-point number as 32 bits in the file. This advances the file cursor by 4 bytes. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_double #

fn (s &FileAccess) store_double(value f64) bool

Stores a floating-point number as 64 bits in the file. This advances the file cursor by 8 bytes. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_real #

fn (s &FileAccess) store_real(value f64) bool

Stores a floating-point number in the file. This advances the file cursor by either 4 or 8 bytes, depending on the precision used by the current Godot build. If using a Godot build compiled with the precision=single option (the default), this method will save a 32-bit float. Otherwise, if compiled with the precision=double option, this will save a 64-bit float. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_buffer #

fn (s &FileAccess) store_buffer(buffer PackedByteArray) bool

Stores the given array of bytes in the file. This advances the file cursor by the number of bytes written. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_line #

fn (s &FileAccess) store_line(line string) bool

Stores [param line] in the file followed by a newline character (\n), encoding the text as UTF-8. This advances the file cursor by the length of the line, after the newline character. The amount of bytes written depends on the UTF-8 encoded bytes, which may be different from [method String.length] which counts the number of UTF-32 codepoints. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_csv_line #

fn (s &FileAccess) store_csv_line(values PackedStringArray, cfg FileAccess_store_csv_line_Cfg) bool

Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default "," (comma). This delimiter must be one-character long. Text will be encoded as UTF-8. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_string #

fn (s &FileAccess) store_string(gd_string string) bool

Stores [param string] in the file without a newline character (\n), encoding the text as UTF-8. This advances the file cursor by the length of the string in UTF-8 encoded bytes, which may be different from [method String.length] which counts the number of UTF-32 codepoints. [b]Note:[/b] This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using [method store_pascal_string] instead. For retrieving strings from a text file, you can use get_buffer(length).get_string_from_utf8() (if you know the length) or [method get_as_text]. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_var #

fn (s &FileAccess) store_var(value_ ToVariant, cfg FileAccess_store_var_Cfg) bool

Stores any Variant value in the file. If [param full_objects] is true, encoding objects is allowed (and can potentially include code). This advances the file cursor by the number of bytes written. Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method, as described in the [url=$DOCS_URL/tutorials/io/binary_serialization_api.html]Binary serialization API[/url] documentation. [b]Note:[/b] Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) store_pascal_string #

fn (s &FileAccess) store_pascal_string(gd_string string) bool

Stores the given [String] as a line in the file in Pascal format (i.e. also store the length of the string). Text will be encoded as UTF-8. This advances the file cursor by the number of bytes written depending on the UTF-8 encoded bytes, which may be different from [method String.length] which counts the number of UTF-32 codepoints. [b]Note:[/b] If an error occurs, the resulting value of the file position indicator is indeterminate.

fn (FileAccess) get_pascal_string #

fn (s &FileAccess) get_pascal_string() string

Returns a [String] saved in Pascal format from the file, meaning that the length of the string is explicitly stored at the start. See [method store_pascal_string]. This may include newline characters. The file cursor is advanced after the bytes read. Text is interpreted as being UTF-8 encoded.

fn (FileAccess) close #

fn (s &FileAccess) close()

Closes the currently opened file and prevents subsequent read/write operations. Use [method flush] to persist the data to disk without closing the file. [b]Note:[/b] [FileAccess] will automatically close when it's freed, which happens when it goes out of scope or when it gets assigned with null. In C# the reference must be disposed after we are done using it, this can be done with the using statement or calling the Dispose method directly.

struct FileAccess_create_temp_Cfg #

@[params]
struct FileAccess_create_temp_Cfg {
pub:
	prefix    string
	extension string
	keep      bool
}

Optional parameters for FileAccess#create_temp

struct FileAccess_get_as_text_Cfg #

@[params]
struct FileAccess_get_as_text_Cfg {
pub:
	skip_cr bool
}

Optional parameters for FileAccess#get_as_text

struct FileAccess_get_csv_line_Cfg #

@[params]
struct FileAccess_get_csv_line_Cfg {
pub:
	delim string
}

Optional parameters for FileAccess#get_csv_line

struct FileAccess_get_var_Cfg #

@[params]
struct FileAccess_get_var_Cfg {
pub:
	allow_objects bool
}

Optional parameters for FileAccess#get_var

struct FileAccess_open_compressed_Cfg #

@[params]
struct FileAccess_open_compressed_Cfg {
pub:
	compression_mode FileAccessCompressionMode = unsafe { FileAccessCompressionMode(0) }
}

Optional parameters for FileAccess#open_compressed

struct FileAccess_open_encrypted_Cfg #

@[params]
struct FileAccess_open_encrypted_Cfg {
pub:
	iv PackedByteArray = PackedByteArray{}
}

Optional parameters for FileAccess#open_encrypted

struct FileAccess_seek_end_Cfg #

@[params]
struct FileAccess_seek_end_Cfg {
pub:
	position i64
}

Optional parameters for FileAccess#seek_end

struct FileAccess_store_csv_line_Cfg #

@[params]
struct FileAccess_store_csv_line_Cfg {
pub:
	delim string
}

Optional parameters for FileAccess#store_csv_line

struct FileAccess_store_var_Cfg #

@[params]
struct FileAccess_store_var_Cfg {
pub:
	full_objects bool
}

Optional parameters for FileAccess#store_var

struct FileDialog #

struct FileDialog {
	ConfirmationDialog
}

A dialog for selecting files or directories in the filesystem.

fn (FileDialog) to_variant #

fn (s &FileDialog) to_variant() Variant

fn (FileDialog) from_variant #

fn (mut s FileDialog) from_variant(variant &Variant)

fn (FileDialog) clear_filters #

fn (s &FileDialog) clear_filters()

Clear all the added filters in the dialog.

fn (FileDialog) add_filter #

fn (s &FileDialog) add_filter(filter string, cfg FileDialog_add_filter_Cfg)

Adds a comma-separated file name [param filter] option to the [FileDialog] with an optional [param description], which restricts what files can be picked. A [param filter] should be of the form "filename.extension", where filename and extension can be * to match any string. Filters starting with . (i.e. empty filenames) are not allowed. For example, a [param filter] of "*.png, *.jpg" and a [param description] of "Images" results in filter text "Images (*.png, *.jpg)".

fn (FileDialog) set_filters #

fn (s &FileDialog) set_filters(filters PackedStringArray)

fn (FileDialog) get_filters #

fn (s &FileDialog) get_filters() PackedStringArray

fn (FileDialog) clear_filename_filter #

fn (s &FileDialog) clear_filename_filter()

Clear the filter for file names.

fn (FileDialog) set_filename_filter #

fn (s &FileDialog) set_filename_filter(filter string)

fn (FileDialog) get_filename_filter #

fn (s &FileDialog) get_filename_filter() string

fn (FileDialog) get_option_name #

fn (s &FileDialog) get_option_name(option i64) string

Returns the name of the [OptionButton] or [CheckBox] with index [param option].

fn (FileDialog) get_option_values #

fn (s &FileDialog) get_option_values(option i64) PackedStringArray

Returns an array of values of the [OptionButton] with index [param option].

fn (FileDialog) get_option_default #

fn (s &FileDialog) get_option_default(option i64) i64

Returns the default value index of the [OptionButton] or [CheckBox] with index [param option].

fn (FileDialog) set_option_name #

fn (s &FileDialog) set_option_name(option i64, name string)

Sets the name of the [OptionButton] or [CheckBox] with index [param option].

fn (FileDialog) set_option_values #

fn (s &FileDialog) set_option_values(option i64, values PackedStringArray)

Sets the option values of the [OptionButton] with index [param option].

fn (FileDialog) set_option_default #

fn (s &FileDialog) set_option_default(option i64, default_value_index i64)

Sets the default value index of the [OptionButton] or [CheckBox] with index [param option].

fn (FileDialog) set_option_count #

fn (s &FileDialog) set_option_count(count i64)

fn (FileDialog) get_option_count #

fn (s &FileDialog) get_option_count() i64

fn (FileDialog) add_option #

fn (s &FileDialog) add_option(name string, values PackedStringArray, default_value_index i64)

Adds an additional [OptionButton] to the file dialog. If [param values] is empty, a [CheckBox] is added instead. [param default_value_index] should be an index of the value in the [param values]. If [param values] is empty it should be either 1 (checked), or 0 (unchecked).

fn (FileDialog) get_selected_options #

fn (s &FileDialog) get_selected_options() Dictionary

Returns a [Dictionary] with the selected values of the additional [OptionButton]s and/or [CheckBox]es. [Dictionary] keys are names and values are selected value indices.

fn (FileDialog) get_current_dir #

fn (s &FileDialog) get_current_dir() string

fn (FileDialog) get_current_file #

fn (s &FileDialog) get_current_file() string

fn (FileDialog) get_current_path #

fn (s &FileDialog) get_current_path() string

fn (FileDialog) set_current_dir #

fn (s &FileDialog) set_current_dir(dir string)

fn (FileDialog) set_current_file #

fn (s &FileDialog) set_current_file(file string)

fn (FileDialog) set_current_path #

fn (s &FileDialog) set_current_path(path string)

fn (FileDialog) set_mode_overrides_title #

fn (s &FileDialog) set_mode_overrides_title(override bool)

fn (FileDialog) is_mode_overriding_title #

fn (s &FileDialog) is_mode_overriding_title() bool

fn (FileDialog) set_file_mode #

fn (s &FileDialog) set_file_mode(mode FileDialogFileMode)

fn (FileDialog) get_file_mode #

fn (s &FileDialog) get_file_mode() FileDialogFileMode

fn (FileDialog) set_display_mode #

fn (s &FileDialog) set_display_mode(mode FileDialogDisplayMode)

fn (FileDialog) get_display_mode #

fn (s &FileDialog) get_display_mode() FileDialogDisplayMode

fn (FileDialog) get_vbox #

fn (s &FileDialog) get_vbox() VBoxContainer

Returns the vertical box container of the dialog, custom controls can be added to it. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. [b]Note:[/b] Changes to this node are ignored by native file dialogs, use [method add_option] to add custom elements to the dialog instead.

fn (FileDialog) get_line_edit #

fn (s &FileDialog) get_line_edit() LineEdit

Returns the LineEdit for the selected file. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (FileDialog) set_access #

fn (s &FileDialog) set_access(access FileDialogAccess)

fn (FileDialog) get_access #

fn (s &FileDialog) get_access() FileDialogAccess

fn (FileDialog) set_root_subfolder #

fn (s &FileDialog) set_root_subfolder(dir string)

fn (FileDialog) get_root_subfolder #

fn (s &FileDialog) get_root_subfolder() string

fn (FileDialog) set_show_hidden_files #

fn (s &FileDialog) set_show_hidden_files(show bool)

fn (FileDialog) is_showing_hidden_files #

fn (s &FileDialog) is_showing_hidden_files() bool

fn (FileDialog) set_use_native_dialog #

fn (s &FileDialog) set_use_native_dialog(native bool)

fn (FileDialog) get_use_native_dialog #

fn (s &FileDialog) get_use_native_dialog() bool

fn (FileDialog) set_customization_flag_enabled #

fn (s &FileDialog) set_customization_flag_enabled(flag FileDialogCustomization, enabled bool)

Toggles the specified customization [param flag], allowing to customize features available in this [FileDialog]. See [enum Customization] for options.

fn (FileDialog) is_customization_flag_enabled #

fn (s &FileDialog) is_customization_flag_enabled(flag FileDialogCustomization) bool

Returns true if the provided [param flag] is enabled.

fn (FileDialog) deselect_all #

fn (s &FileDialog) deselect_all()

Clear all currently selected items in the dialog.

fn (FileDialog) invalidate #

fn (s &FileDialog) invalidate()

Invalidate and update the current dialog content list. [b]Note:[/b] This method does nothing on native file dialogs.

struct FileDialog_add_filter_Cfg #

@[params]
struct FileDialog_add_filter_Cfg {
pub:
	description string
}

Optional parameters for FileDialog#add_filter

struct FileSystemDock #

struct FileSystemDock {
	VBoxContainer
}

Godot editor's dock for managing files in the project.

fn (FileSystemDock) to_variant #

fn (s &FileSystemDock) to_variant() Variant

fn (FileSystemDock) from_variant #

fn (mut s FileSystemDock) from_variant(variant &Variant)

fn (FileSystemDock) navigate_to_path #

fn (s &FileSystemDock) navigate_to_path(path string)

Sets the given [param path] as currently selected, ensuring that the selected file/directory is visible.

fn (FileSystemDock) add_resource_tooltip_plugin #

fn (s &FileSystemDock) add_resource_tooltip_plugin(plugin EditorResourceTooltipPlugin)

Registers a new [EditorResourceTooltipPlugin].

fn (FileSystemDock) remove_resource_tooltip_plugin #

fn (s &FileSystemDock) remove_resource_tooltip_plugin(plugin EditorResourceTooltipPlugin)

Removes an [EditorResourceTooltipPlugin]. Fails if the plugin wasn't previously added.

struct FlowContainer #

struct FlowContainer {
	Container
}

A container that arranges its child controls horizontally or vertically and wraps them around at the borders.

fn (FlowContainer) to_variant #

fn (s &FlowContainer) to_variant() Variant

fn (FlowContainer) from_variant #

fn (mut s FlowContainer) from_variant(variant &Variant)

fn (FlowContainer) get_line_count #

fn (s &FlowContainer) get_line_count() i64

Returns the current line count.

fn (FlowContainer) set_alignment #

fn (s &FlowContainer) set_alignment(alignment FlowContainerAlignmentMode)

fn (FlowContainer) get_alignment #

fn (s &FlowContainer) get_alignment() FlowContainerAlignmentMode

fn (FlowContainer) set_last_wrap_alignment #

fn (s &FlowContainer) set_last_wrap_alignment(last_wrap_alignment FlowContainerLastWrapAlignmentMode)

fn (FlowContainer) get_last_wrap_alignment #

fn (s &FlowContainer) get_last_wrap_alignment() FlowContainerLastWrapAlignmentMode

fn (FlowContainer) set_vertical #

fn (s &FlowContainer) set_vertical(vertical bool)

fn (FlowContainer) is_vertical #

fn (s &FlowContainer) is_vertical() bool

fn (FlowContainer) set_reverse_fill #

fn (s &FlowContainer) set_reverse_fill(reverse_fill bool)

fn (FlowContainer) is_reverse_fill #

fn (s &FlowContainer) is_reverse_fill() bool

struct FogMaterial #

struct FogMaterial {
	Material
}

A material that controls how volumetric fog is rendered, to be assigned to a [FogVolume].

fn (FogMaterial) to_variant #

fn (s &FogMaterial) to_variant() Variant

fn (FogMaterial) from_variant #

fn (mut s FogMaterial) from_variant(variant &Variant)

fn (FogMaterial) set_density #

fn (s &FogMaterial) set_density(density f64)

fn (FogMaterial) get_density #

fn (s &FogMaterial) get_density() f64

fn (FogMaterial) set_albedo #

fn (s &FogMaterial) set_albedo(albedo Color)

fn (FogMaterial) get_albedo #

fn (s &FogMaterial) get_albedo() Color

fn (FogMaterial) set_emission #

fn (s &FogMaterial) set_emission(emission Color)

fn (FogMaterial) get_emission #

fn (s &FogMaterial) get_emission() Color

fn (FogMaterial) set_height_falloff #

fn (s &FogMaterial) set_height_falloff(height_falloff f64)

fn (FogMaterial) get_height_falloff #

fn (s &FogMaterial) get_height_falloff() f64

fn (FogMaterial) set_edge_fade #

fn (s &FogMaterial) set_edge_fade(edge_fade f64)

fn (FogMaterial) get_edge_fade #

fn (s &FogMaterial) get_edge_fade() f64

fn (FogMaterial) set_density_texture #

fn (s &FogMaterial) set_density_texture(density_texture Texture3D)

fn (FogMaterial) get_density_texture #

fn (s &FogMaterial) get_density_texture() Texture3D

struct FogVolume #

struct FogVolume {
	VisualInstance3D
}

A region that contributes to the default volumetric fog from the world environment.

fn (FogVolume) to_variant #

fn (s &FogVolume) to_variant() Variant

fn (FogVolume) from_variant #

fn (mut s FogVolume) from_variant(variant &Variant)

fn (FogVolume) set_size #

fn (s &FogVolume) set_size(size Vector3)

fn (FogVolume) get_size #

fn (s &FogVolume) get_size() Vector3

fn (FogVolume) set_shape #

fn (s &FogVolume) set_shape(shape RenderingServerFogVolumeShape)

fn (FogVolume) get_shape #

fn (s &FogVolume) get_shape() RenderingServerFogVolumeShape

fn (FogVolume) set_material #

fn (s &FogVolume) set_material(material Material)

fn (FogVolume) get_material #

fn (s &FogVolume) get_material() Material

struct FoldableContainer #

struct FoldableContainer {
	Container
}

A container that can be expanded/collapsed.

fn (FoldableContainer) to_variant #

fn (s &FoldableContainer) to_variant() Variant

fn (FoldableContainer) from_variant #

fn (mut s FoldableContainer) from_variant(variant &Variant)

fn (FoldableContainer) fold #

fn (s &FoldableContainer) fold()

Folds the container and emits [signal folding_changed].

fn (FoldableContainer) expand #

fn (s &FoldableContainer) expand()

Expands the container and emits [signal folding_changed].

fn (FoldableContainer) set_folded #

fn (s &FoldableContainer) set_folded(folded bool)

fn (FoldableContainer) is_folded #

fn (s &FoldableContainer) is_folded() bool

fn (FoldableContainer) set_foldable_group #

fn (s &FoldableContainer) set_foldable_group(button_group FoldableGroup)

fn (FoldableContainer) get_foldable_group #

fn (s &FoldableContainer) get_foldable_group() FoldableGroup

fn (FoldableContainer) set_title #

fn (s &FoldableContainer) set_title(text string)

fn (FoldableContainer) get_title #

fn (s &FoldableContainer) get_title() string

fn (FoldableContainer) set_title_alignment #

fn (s &FoldableContainer) set_title_alignment(alignment HorizontalAlignment)

fn (FoldableContainer) get_title_alignment #

fn (s &FoldableContainer) get_title_alignment() HorizontalAlignment

fn (FoldableContainer) set_language #

fn (s &FoldableContainer) set_language(language string)

fn (FoldableContainer) get_language #

fn (s &FoldableContainer) get_language() string

fn (FoldableContainer) set_title_text_direction #

fn (s &FoldableContainer) set_title_text_direction(text_direction ControlTextDirection)

fn (FoldableContainer) get_title_text_direction #

fn (s &FoldableContainer) get_title_text_direction() ControlTextDirection

fn (FoldableContainer) set_title_text_overrun_behavior #

fn (s &FoldableContainer) set_title_text_overrun_behavior(overrun_behavior TextServerOverrunBehavior)

fn (FoldableContainer) get_title_text_overrun_behavior #

fn (s &FoldableContainer) get_title_text_overrun_behavior() TextServerOverrunBehavior

fn (FoldableContainer) set_title_position #

fn (s &FoldableContainer) set_title_position(title_position FoldableContainerTitlePosition)

fn (FoldableContainer) get_title_position #

fn (s &FoldableContainer) get_title_position() FoldableContainerTitlePosition

fn (FoldableContainer) add_title_bar_control #

fn (s &FoldableContainer) add_title_bar_control(control Control)

Adds a [Control] that will be placed next to the container's title, obscuring the clickable area. Prime usage is adding [Button] nodes, but it can be any [Control]. The control will be added as a child of this container and removed from previous parent if necessary. The controls will be placed aligned to the right, with the first added control being the leftmost one.

fn (FoldableContainer) remove_title_bar_control #

fn (s &FoldableContainer) remove_title_bar_control(control Control)

Removes a [Control] added with [method add_title_bar_control]. The node is not freed automatically, you need to use [method Node.queue_free].

struct FoldableGroup #

struct FoldableGroup {
	Resource
}

A group of foldable containers that doesn't allow more than one container to be expanded at a time.

fn (FoldableGroup) to_variant #

fn (s &FoldableGroup) to_variant() Variant

fn (FoldableGroup) from_variant #

fn (mut s FoldableGroup) from_variant(variant &Variant)

fn (FoldableGroup) get_expanded_container #

fn (s &FoldableGroup) get_expanded_container() FoldableContainer

Returns the current expanded container.

fn (FoldableGroup) get_containers #

fn (s &FoldableGroup) get_containers() Array

Returns an [Array] of [FoldableContainer]s that have this as their FoldableGroup (see [member FoldableContainer.foldable_group]). This is equivalent to [ButtonGroup] but for FoldableContainers.

fn (FoldableGroup) set_allow_folding_all #

fn (s &FoldableGroup) set_allow_folding_all(enabled bool)

fn (FoldableGroup) is_allow_folding_all #

fn (s &FoldableGroup) is_allow_folding_all() bool

struct Font #

struct Font {
	Resource
}

Abstract base class for fonts and font variations.

fn (Font) to_variant #

fn (s &Font) to_variant() Variant

fn (Font) from_variant #

fn (mut s Font) from_variant(variant &Variant)

fn (Font) set_fallbacks #

fn (s &Font) set_fallbacks(fallbacks Array)

fn (Font) get_fallbacks #

fn (s &Font) get_fallbacks() Array

fn (Font) find_variation #

fn (s &Font) find_variation(variation_coordinates Dictionary, cfg Font_find_variation_Cfg) RID

Returns [TextServer] RID of the font cache for specific variation.

fn (Font) get_rids #

fn (s &Font) get_rids() Array

Returns [Array] of valid [Font] [RID]s, which can be passed to the [TextServer] methods.

fn (Font) get_height #

fn (s &Font) get_height(cfg Font_get_height_Cfg) f64

Returns the total average font height (ascent plus descent) in pixels. [b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line).

fn (Font) get_ascent #

fn (s &Font) get_ascent(cfg Font_get_ascent_Cfg) f64

Returns the average font ascent (number of pixels above the baseline). [b]Note:[/b] Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line).

fn (Font) get_descent #

fn (s &Font) get_descent(cfg Font_get_descent_Cfg) f64

Returns the average font descent (number of pixels below the baseline). [b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line).

fn (Font) get_underline_position #

fn (s &Font) get_underline_position(cfg Font_get_underline_position_Cfg) f64

Returns average pixel offset of the underline below the baseline. [b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.

fn (Font) get_underline_thickness #

fn (s &Font) get_underline_thickness(cfg Font_get_underline_thickness_Cfg) f64

Returns average thickness of the underline. [b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.

fn (Font) get_font_name #

fn (s &Font) get_font_name() string

Returns font family name.

fn (Font) get_font_style_name #

fn (s &Font) get_font_style_name() string

Returns font style name.

fn (Font) get_ot_name_strings #

fn (s &Font) get_ot_name_strings() Dictionary

Returns [Dictionary] with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).

fn (Font) get_font_style #

fn (s &Font) get_font_style() TextServerFontStyle

Returns font style flags.

fn (Font) get_font_weight #

fn (s &Font) get_font_weight() i64

Returns weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.

fn (Font) get_font_stretch #

fn (s &Font) get_font_stretch() i64

Returns font stretch amount, compared to a normal width. A percentage value between 50% and 200%.

fn (Font) get_spacing #

fn (s &Font) get_spacing(spacing TextServerSpacingType) i64

Returns the amount of spacing for the given [param spacing] type.

fn (Font) get_opentype_features #

fn (s &Font) get_opentype_features() Dictionary

Returns a set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].

fn (Font) set_cache_capacity #

fn (s &Font) set_cache_capacity(single_line i64, multi_line i64)

Sets LRU cache capacity for draw_* methods.

fn (Font) get_string_size #

fn (s &Font) get_string_size(text string, cfg Font_get_string_size_Cfg) Vector2

Returns the size of a bounding box of a single-line string, taking kerning, advance and subpixel positioning into account. See also [method get_multiline_string_size] and [method draw_string]. For example, to get the string size as displayed by a single-line Label, use: [codeblocks] [gdscript] var string_size = $Label.get_theme_font("font").get_string_size($Label.text, HORIZONTAL_ALIGNMENT_LEFT, -1, $Label.get_theme_font_size("font_size")) [/gdscript] [csharp] Label label = GetNode

fn (Font) get_multiline_string_size #

fn (s &Font) get_multiline_string_size(text string, cfg Font_get_multiline_string_size_Cfg) Vector2

Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. See also [method draw_multiline_string].

fn (Font) draw_string #

fn (s &Font) draw_string(canvas_item RID, pos Vector2, text string, cfg Font_draw_string_Cfg)

Draw [param text] into a canvas item using the font, at a given position, with [param modulate] color, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. See also [method CanvasItem.draw_string].

fn (Font) draw_multiline_string #

fn (s &Font) draw_multiline_string(canvas_item RID, pos Vector2, text string, cfg Font_draw_multiline_string_Cfg)

Breaks [param text] into lines using rules specified by [param brk_flags] and draws it into a canvas item using the font, at a given position, with [param modulate] color, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. See also [method CanvasItem.draw_multiline_string].

fn (Font) draw_string_outline #

fn (s &Font) draw_string_outline(canvas_item RID, pos Vector2, text string, cfg Font_draw_string_outline_Cfg)

Draw [param text] outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. See also [method CanvasItem.draw_string_outline].

fn (Font) draw_multiline_string_outline #

fn (s &Font) draw_multiline_string_outline(canvas_item RID, pos Vector2, text string, cfg Font_draw_multiline_string_outline_Cfg)

Breaks [param text] to the lines using rules specified by [param brk_flags] and draws text outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. See also [method CanvasItem.draw_multiline_string_outline].

fn (Font) get_char_size #

fn (s &Font) get_char_size(gd_char i64, font_size i64) Vector2

Returns the size of a character. Does not take kerning into account. [b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height.

fn (Font) draw_char #

fn (s &Font) draw_char(canvas_item RID, pos Vector2, gd_char i64, font_size i64, cfg Font_draw_char_Cfg) f64

Draw a single Unicode character [param char] into a canvas item using the font, at a given position, with [param modulate] color. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. [b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.

fn (Font) draw_char_outline #

fn (s &Font) draw_char_outline(canvas_item RID, pos Vector2, gd_char i64, font_size i64, cfg Font_draw_char_outline_Cfg) f64

Draw a single Unicode character [param char] outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. [b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.

fn (Font) has_char #

fn (s &Font) has_char(gd_char i64) bool

Returns true if a Unicode [param char] is available in the font.

fn (Font) get_supported_chars #

fn (s &Font) get_supported_chars() string

Returns a string containing all the characters available in the font. If a given character is included in more than one font data source, it appears only once in the returned string.

fn (Font) is_language_supported #

fn (s &Font) is_language_supported(language string) bool

Returns true, if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).

fn (Font) is_script_supported #

fn (s &Font) is_script_supported(script string) bool

Returns true, if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).

fn (Font) get_supported_feature_list #

fn (s &Font) get_supported_feature_list() Dictionary

Returns list of OpenType features supported by font.

fn (Font) get_supported_variation_list #

fn (s &Font) get_supported_variation_list() Dictionary

Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as tag: Vector3i(min_value,max_value,default_value). Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. To print available variation axes of a variable font:

var fv = FontVariation.new()
fv.base_font = load('res://RobotoFlex.ttf')
var variation_list = fv.get_supported_variation_list()
for tag in variation_list:
var name = TextServerManager.get_primary_interface().tag_to_name(tag)
var values = variation_list[tag]
print('variation axis: %s (%d)\n\tmin, max, default: %s' % [name, tag, values])

[b]Note:[/b] To set and get variation coordinates of a [FontVariation], use [member FontVariation.variation_opentype].

fn (Font) get_face_count #

fn (s &Font) get_face_count() i64

Returns number of faces in the TrueType / OpenType collection.

struct FontFile #

struct FontFile {
	Font
}

Holds font source data and prerendered glyph cache, imported from a dynamic or a bitmap font.

fn (FontFile) to_variant #

fn (s &FontFile) to_variant() Variant

fn (FontFile) from_variant #

fn (mut s FontFile) from_variant(variant &Variant)

fn (FontFile) load_bitmap_font #

fn (s &FontFile) load_bitmap_font(path string) GDError

Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [param path]. [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the user:// directory.

fn (FontFile) load_dynamic_font #

fn (s &FontFile) load_dynamic_font(path string) GDError

Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file [param path]. [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the user:// directory.

fn (FontFile) set_data #

fn (s &FontFile) set_data(data PackedByteArray)

fn (FontFile) get_data #

fn (s &FontFile) get_data() PackedByteArray

fn (FontFile) set_font_name #

fn (s &FontFile) set_font_name(name string)

fn (FontFile) set_font_style_name #

fn (s &FontFile) set_font_style_name(name string)

fn (FontFile) set_font_style #

fn (s &FontFile) set_font_style(style TextServerFontStyle)

fn (FontFile) set_font_weight #

fn (s &FontFile) set_font_weight(weight i64)

fn (FontFile) set_font_stretch #

fn (s &FontFile) set_font_stretch(stretch i64)

fn (FontFile) set_antialiasing #

fn (s &FontFile) set_antialiasing(antialiasing TextServerFontAntialiasing)

fn (FontFile) get_antialiasing #

fn (s &FontFile) get_antialiasing() TextServerFontAntialiasing

fn (FontFile) set_disable_embedded_bitmaps #

fn (s &FontFile) set_disable_embedded_bitmaps(disable_embedded_bitmaps bool)

fn (FontFile) get_disable_embedded_bitmaps #

fn (s &FontFile) get_disable_embedded_bitmaps() bool

fn (FontFile) set_generate_mipmaps #

fn (s &FontFile) set_generate_mipmaps(generate_mipmaps bool)

fn (FontFile) get_generate_mipmaps #

fn (s &FontFile) get_generate_mipmaps() bool

fn (FontFile) set_multichannel_signed_distance_field #

fn (s &FontFile) set_multichannel_signed_distance_field(msdf bool)

fn (FontFile) is_multichannel_signed_distance_field #

fn (s &FontFile) is_multichannel_signed_distance_field() bool

fn (FontFile) set_msdf_pixel_range #

fn (s &FontFile) set_msdf_pixel_range(msdf_pixel_range i64)

fn (FontFile) get_msdf_pixel_range #

fn (s &FontFile) get_msdf_pixel_range() i64

fn (FontFile) set_msdf_size #

fn (s &FontFile) set_msdf_size(msdf_size i64)

fn (FontFile) get_msdf_size #

fn (s &FontFile) get_msdf_size() i64

fn (FontFile) set_fixed_size #

fn (s &FontFile) set_fixed_size(fixed_size i64)

fn (FontFile) get_fixed_size #

fn (s &FontFile) get_fixed_size() i64

fn (FontFile) set_fixed_size_scale_mode #

fn (s &FontFile) set_fixed_size_scale_mode(fixed_size_scale_mode TextServerFixedSizeScaleMode)

fn (FontFile) get_fixed_size_scale_mode #

fn (s &FontFile) get_fixed_size_scale_mode() TextServerFixedSizeScaleMode

fn (FontFile) set_allow_system_fallback #

fn (s &FontFile) set_allow_system_fallback(allow_system_fallback bool)

fn (FontFile) is_allow_system_fallback #

fn (s &FontFile) is_allow_system_fallback() bool

fn (FontFile) set_force_autohinter #

fn (s &FontFile) set_force_autohinter(force_autohinter bool)

fn (FontFile) is_force_autohinter #

fn (s &FontFile) is_force_autohinter() bool

fn (FontFile) set_modulate_color_glyphs #

fn (s &FontFile) set_modulate_color_glyphs(modulate bool)

fn (FontFile) is_modulate_color_glyphs #

fn (s &FontFile) is_modulate_color_glyphs() bool

fn (FontFile) set_hinting #

fn (s &FontFile) set_hinting(hinting TextServerHinting)

fn (FontFile) get_hinting #

fn (s &FontFile) get_hinting() TextServerHinting

fn (FontFile) set_subpixel_positioning #

fn (s &FontFile) set_subpixel_positioning(subpixel_positioning TextServerSubpixelPositioning)

fn (FontFile) get_subpixel_positioning #

fn (s &FontFile) get_subpixel_positioning() TextServerSubpixelPositioning

fn (FontFile) set_keep_rounding_remainders #

fn (s &FontFile) set_keep_rounding_remainders(keep_rounding_remainders bool)

fn (FontFile) get_keep_rounding_remainders #

fn (s &FontFile) get_keep_rounding_remainders() bool

fn (FontFile) set_oversampling #

fn (s &FontFile) set_oversampling(oversampling f64)

fn (FontFile) get_oversampling #

fn (s &FontFile) get_oversampling() f64

fn (FontFile) get_cache_count #

fn (s &FontFile) get_cache_count() i64

Returns number of the font cache entries.

fn (FontFile) clear_cache #

fn (s &FontFile) clear_cache()

Removes all font cache entries.

fn (FontFile) remove_cache #

fn (s &FontFile) remove_cache(cache_index i64)

Removes specified font cache entry.

fn (FontFile) get_size_cache_list #

fn (s &FontFile) get_size_cache_list(cache_index i64) Array

Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size.

fn (FontFile) clear_size_cache #

fn (s &FontFile) clear_size_cache(cache_index i64)

Removes all font sizes from the cache entry.

fn (FontFile) remove_size_cache #

fn (s &FontFile) remove_size_cache(cache_index i64, size Vector2i)

Removes specified font size from the cache entry.

fn (FontFile) set_variation_coordinates #

fn (s &FontFile) set_variation_coordinates(cache_index i64, variation_coordinates Dictionary)

Sets variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info.

fn (FontFile) get_variation_coordinates #

fn (s &FontFile) get_variation_coordinates(cache_index i64) Dictionary

Returns variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info.

fn (FontFile) set_embolden #

fn (s &FontFile) set_embolden(cache_index i64, strength f64)

Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.

fn (FontFile) get_embolden #

fn (s &FontFile) get_embolden(cache_index i64) f64

Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.

fn (FontFile) set_transform #

fn (s &FontFile) set_transform(cache_index i64, transform Transform2D)

Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.

fn (FontFile) get_transform #

fn (s &FontFile) get_transform(cache_index i64) Transform2D

Returns 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.

fn (FontFile) set_extra_spacing #

fn (s &FontFile) set_extra_spacing(cache_index i64, spacing TextServerSpacingType, value i64)

Sets the spacing for [param spacing] to [param value] in pixels (not relative to the font size).

fn (FontFile) get_extra_spacing #

fn (s &FontFile) get_extra_spacing(cache_index i64, spacing TextServerSpacingType) i64

Returns spacing for [param spacing] in pixels (not relative to the font size).

fn (FontFile) set_extra_baseline_offset #

fn (s &FontFile) set_extra_baseline_offset(cache_index i64, baseline_offset f64)

Sets extra baseline offset (as a fraction of font height).

fn (FontFile) get_extra_baseline_offset #

fn (s &FontFile) get_extra_baseline_offset(cache_index i64) f64

Returns extra baseline offset (as a fraction of font height).

fn (FontFile) set_face_index #

fn (s &FontFile) set_face_index(cache_index i64, face_index i64)

Sets an active face index in the TrueType / OpenType collection.

fn (FontFile) get_face_index #

fn (s &FontFile) get_face_index(cache_index i64) i64

Returns an active face index in the TrueType / OpenType collection.

fn (FontFile) set_cache_ascent #

fn (s &FontFile) set_cache_ascent(cache_index i64, size i64, ascent f64)

Sets the font ascent (number of pixels above the baseline).

fn (FontFile) get_cache_ascent #

fn (s &FontFile) get_cache_ascent(cache_index i64, size i64) f64

Returns the font ascent (number of pixels above the baseline).

fn (FontFile) set_cache_descent #

fn (s &FontFile) set_cache_descent(cache_index i64, size i64, descent f64)

Sets the font descent (number of pixels below the baseline).

fn (FontFile) get_cache_descent #

fn (s &FontFile) get_cache_descent(cache_index i64, size i64) f64

Returns the font descent (number of pixels below the baseline).

fn (FontFile) set_cache_underline_position #

fn (s &FontFile) set_cache_underline_position(cache_index i64, size i64, underline_position f64)

Sets pixel offset of the underline below the baseline.

fn (FontFile) get_cache_underline_position #

fn (s &FontFile) get_cache_underline_position(cache_index i64, size i64) f64

Returns pixel offset of the underline below the baseline.

fn (FontFile) set_cache_underline_thickness #

fn (s &FontFile) set_cache_underline_thickness(cache_index i64, size i64, underline_thickness f64)

Sets thickness of the underline in pixels.

fn (FontFile) get_cache_underline_thickness #

fn (s &FontFile) get_cache_underline_thickness(cache_index i64, size i64) f64

Returns thickness of the underline in pixels.

fn (FontFile) set_cache_scale #

fn (s &FontFile) set_cache_scale(cache_index i64, size i64, scale f64)

Sets scaling factor of the color bitmap font.

fn (FontFile) get_cache_scale #

fn (s &FontFile) get_cache_scale(cache_index i64, size i64) f64

Returns scaling factor of the color bitmap font.

fn (FontFile) get_texture_count #

fn (s &FontFile) get_texture_count(cache_index i64, size Vector2i) i64

Returns number of textures used by font cache entry.

fn (FontFile) clear_textures #

fn (s &FontFile) clear_textures(cache_index i64, size Vector2i)

Removes all textures from font cache entry. [b]Note:[/b] This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually.

fn (FontFile) remove_texture #

fn (s &FontFile) remove_texture(cache_index i64, size Vector2i, texture_index i64)

Removes specified texture from the cache entry. [b]Note:[/b] This function will not remove glyphs associated with the texture. Remove them manually using [method remove_glyph].

fn (FontFile) set_texture_image #

fn (s &FontFile) set_texture_image(cache_index i64, size Vector2i, texture_index i64, image Image)

Sets font cache texture image.

fn (FontFile) get_texture_image #

fn (s &FontFile) get_texture_image(cache_index i64, size Vector2i, texture_index i64) Image

Returns a copy of the font cache texture image.

fn (FontFile) set_texture_offsets #

fn (s &FontFile) set_texture_offsets(cache_index i64, size Vector2i, texture_index i64, offset PackedInt32Array)

Sets array containing glyph packing data.

fn (FontFile) get_texture_offsets #

fn (s &FontFile) get_texture_offsets(cache_index i64, size Vector2i, texture_index i64) PackedInt32Array

Returns a copy of the array containing glyph packing data.

fn (FontFile) get_glyph_list #

fn (s &FontFile) get_glyph_list(cache_index i64, size Vector2i) PackedInt32Array

Returns list of rendered glyphs in the cache entry.

fn (FontFile) clear_glyphs #

fn (s &FontFile) clear_glyphs(cache_index i64, size Vector2i)

Removes all rendered glyph information from the cache entry. [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.

fn (FontFile) remove_glyph #

fn (s &FontFile) remove_glyph(cache_index i64, size Vector2i, glyph i64)

Removes specified rendered glyph information from the cache entry. [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.

fn (FontFile) set_glyph_advance #

fn (s &FontFile) set_glyph_advance(cache_index i64, size i64, glyph i64, advance Vector2)

Sets glyph advance (offset of the next glyph). [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.

fn (FontFile) get_glyph_advance #

fn (s &FontFile) get_glyph_advance(cache_index i64, size i64, glyph i64) Vector2

Returns glyph advance (offset of the next glyph). [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.

fn (FontFile) set_glyph_offset #

fn (s &FontFile) set_glyph_offset(cache_index i64, size Vector2i, glyph i64, offset Vector2)

Sets glyph offset from the baseline.

fn (FontFile) get_glyph_offset #

fn (s &FontFile) get_glyph_offset(cache_index i64, size Vector2i, glyph i64) Vector2

Returns glyph offset from the baseline.

fn (FontFile) set_glyph_size #

fn (s &FontFile) set_glyph_size(cache_index i64, size Vector2i, glyph i64, gl_size Vector2)

Sets glyph size.

fn (FontFile) get_glyph_size #

fn (s &FontFile) get_glyph_size(cache_index i64, size Vector2i, glyph i64) Vector2

Returns glyph size.

fn (FontFile) set_glyph_uv_rect #

fn (s &FontFile) set_glyph_uv_rect(cache_index i64, size Vector2i, glyph i64, uv_rect Rect2)

Sets rectangle in the cache texture containing the glyph.

fn (FontFile) get_glyph_uv_rect #

fn (s &FontFile) get_glyph_uv_rect(cache_index i64, size Vector2i, glyph i64) Rect2

Returns rectangle in the cache texture containing the glyph.

fn (FontFile) set_glyph_texture_idx #

fn (s &FontFile) set_glyph_texture_idx(cache_index i64, size Vector2i, glyph i64, texture_idx i64)

Sets index of the cache texture containing the glyph.

fn (FontFile) get_glyph_texture_idx #

fn (s &FontFile) get_glyph_texture_idx(cache_index i64, size Vector2i, glyph i64) i64

Returns index of the cache texture containing the glyph.

fn (FontFile) get_kerning_list #

fn (s &FontFile) get_kerning_list(cache_index i64, size i64) Array

Returns list of the kerning overrides.

fn (FontFile) clear_kerning_map #

fn (s &FontFile) clear_kerning_map(cache_index i64, size i64)

Removes all kerning overrides.

fn (FontFile) remove_kerning #

fn (s &FontFile) remove_kerning(cache_index i64, size i64, glyph_pair Vector2i)

Removes kerning override for the pair of glyphs.

fn (FontFile) set_kerning #

fn (s &FontFile) set_kerning(cache_index i64, size i64, glyph_pair Vector2i, kerning Vector2)

Sets kerning for the pair of glyphs.

fn (FontFile) get_kerning #

fn (s &FontFile) get_kerning(cache_index i64, size i64, glyph_pair Vector2i) Vector2

Returns kerning for the pair of glyphs.

fn (FontFile) render_range #

fn (s &FontFile) render_range(cache_index i64, size Vector2i, start i64, end i64)

Renders the range of characters to the font cache texture.

fn (FontFile) render_glyph #

fn (s &FontFile) render_glyph(cache_index i64, size Vector2i, index i64)

Renders specified glyph to the font cache texture.

fn (FontFile) set_language_support_override #

fn (s &FontFile) set_language_support_override(language string, supported bool)

Adds override for [method Font.is_language_supported].

fn (FontFile) get_language_support_override #

fn (s &FontFile) get_language_support_override(language string) bool

Returns true if support override is enabled for the [param language].

fn (FontFile) remove_language_support_override #

fn (s &FontFile) remove_language_support_override(language string)

Remove language support override.

fn (FontFile) get_language_support_overrides #

fn (s &FontFile) get_language_support_overrides() PackedStringArray

Returns list of language support overrides.

fn (FontFile) set_script_support_override #

fn (s &FontFile) set_script_support_override(script string, supported bool)

Adds override for [method Font.is_script_supported].

fn (FontFile) get_script_support_override #

fn (s &FontFile) get_script_support_override(script string) bool

Returns true if support override is enabled for the [param script].

fn (FontFile) remove_script_support_override #

fn (s &FontFile) remove_script_support_override(script string)

Removes script support override.

fn (FontFile) get_script_support_overrides #

fn (s &FontFile) get_script_support_overrides() PackedStringArray

Returns list of script support overrides.

fn (FontFile) set_opentype_feature_overrides #

fn (s &FontFile) set_opentype_feature_overrides(overrides Dictionary)

fn (FontFile) get_opentype_feature_overrides #

fn (s &FontFile) get_opentype_feature_overrides() Dictionary

fn (FontFile) get_glyph_index #

fn (s &FontFile) get_glyph_index(size i64, gd_char i64, variation_selector i64) i64

Returns the glyph index of a [param char], optionally modified by the [param variation_selector].

fn (FontFile) get_char_from_glyph_index #

fn (s &FontFile) get_char_from_glyph_index(size i64, glyph_index i64) i64

Returns character code associated with [param glyph_index], or 0 if [param glyph_index] is invalid. See [method get_glyph_index].

struct FontVariation #

struct FontVariation {
	Font
}

A variation of a font with additional settings.

fn (FontVariation) to_variant #

fn (s &FontVariation) to_variant() Variant

fn (FontVariation) from_variant #

fn (mut s FontVariation) from_variant(variant &Variant)

fn (FontVariation) set_base_font #

fn (s &FontVariation) set_base_font(font Font)

fn (FontVariation) get_base_font #

fn (s &FontVariation) get_base_font() Font

fn (FontVariation) set_variation_opentype #

fn (s &FontVariation) set_variation_opentype(coords Dictionary)

fn (FontVariation) get_variation_opentype #

fn (s &FontVariation) get_variation_opentype() Dictionary

fn (FontVariation) set_variation_embolden #

fn (s &FontVariation) set_variation_embolden(strength f64)

fn (FontVariation) get_variation_embolden #

fn (s &FontVariation) get_variation_embolden() f64

fn (FontVariation) set_variation_face_index #

fn (s &FontVariation) set_variation_face_index(face_index i64)

fn (FontVariation) get_variation_face_index #

fn (s &FontVariation) get_variation_face_index() i64

fn (FontVariation) set_variation_transform #

fn (s &FontVariation) set_variation_transform(transform Transform2D)

fn (FontVariation) get_variation_transform #

fn (s &FontVariation) get_variation_transform() Transform2D

fn (FontVariation) set_opentype_features #

fn (s &FontVariation) set_opentype_features(features Dictionary)

fn (FontVariation) set_spacing #

fn (s &FontVariation) set_spacing(spacing TextServerSpacingType, value i64)

Sets the spacing for [param spacing] to [param value] in pixels (not relative to the font size).

fn (FontVariation) set_baseline_offset #

fn (s &FontVariation) set_baseline_offset(baseline_offset f64)

fn (FontVariation) get_baseline_offset #

fn (s &FontVariation) get_baseline_offset() f64

struct Font_draw_char_Cfg #

@[params]
struct Font_draw_char_Cfg {
pub:
	modulate     Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for Font#draw_char

struct Font_draw_char_outline_Cfg #

@[params]
struct Font_draw_char_outline_Cfg {
pub:
	size         i64   = -1
	modulate     Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for Font#draw_char_outline

struct Font_draw_multiline_string_Cfg #

@[params]
struct Font_draw_multiline_string_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	max_lines           i64                 = -1
	modulate            Color               = Color{1, 1, 1, 1}
	brk_flags           TextServerLineBreakFlag
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
	oversampling        f64                   = 0.0
}

Optional parameters for Font#draw_multiline_string

struct Font_draw_multiline_string_outline_Cfg #

@[params]
struct Font_draw_multiline_string_outline_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	max_lines           i64                 = -1
	size                i64                 = 1
	modulate            Color               = Color{1, 1, 1, 1}
	brk_flags           TextServerLineBreakFlag
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
	oversampling        f64                   = 0.0
}

Optional parameters for Font#draw_multiline_string_outline

struct Font_draw_string_Cfg #

@[params]
struct Font_draw_string_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	modulate            Color               = Color{1, 1, 1, 1}
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
	oversampling        f64                   = 0.0
}

Optional parameters for Font#draw_string

struct Font_draw_string_outline_Cfg #

@[params]
struct Font_draw_string_outline_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	size                i64                 = 1
	modulate            Color               = Color{1, 1, 1, 1}
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
	oversampling        f64                   = 0.0
}

Optional parameters for Font#draw_string_outline

struct Font_find_variation_Cfg #

@[params]
struct Font_find_variation_Cfg {
pub:
	face_index      i64
	strength        f64         = 0.0
	transform       Transform2D = Transform2D{Vector2{1, 0}, Vector2{0, 1}, Vector2{0, 0}}
	spacing_top     i64
	spacing_bottom  i64
	spacing_space   i64
	spacing_glyph   i64
	baseline_offset f64 = 0.0
}

Optional parameters for Font#find_variation

struct Font_get_ascent_Cfg #

@[params]
struct Font_get_ascent_Cfg {
pub:
	font_size i64 = 16
}

Optional parameters for Font#get_ascent

struct Font_get_descent_Cfg #

@[params]
struct Font_get_descent_Cfg {
pub:
	font_size i64 = 16
}

Optional parameters for Font#get_descent

struct Font_get_height_Cfg #

@[params]
struct Font_get_height_Cfg {
pub:
	font_size i64 = 16
}

Optional parameters for Font#get_height

struct Font_get_multiline_string_size_Cfg #

@[params]
struct Font_get_multiline_string_size_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	max_lines           i64                 = -1
	brk_flags           TextServerLineBreakFlag
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
}

Optional parameters for Font#get_multiline_string_size

struct Font_get_string_size_Cfg #

@[params]
struct Font_get_string_size_Cfg {
pub:
	alignment           HorizontalAlignment = unsafe { HorizontalAlignment(0) }
	width               f64                 = -1
	font_size           i64                 = 16
	justification_flags TextServerJustificationFlag
	direction           TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation         TextServerOrientation = unsafe { TextServerOrientation(0) }
}

Optional parameters for Font#get_string_size

struct Font_get_underline_position_Cfg #

@[params]
struct Font_get_underline_position_Cfg {
pub:
	font_size i64 = 16
}

Optional parameters for Font#get_underline_position

struct Font_get_underline_thickness_Cfg #

@[params]
struct Font_get_underline_thickness_Cfg {
pub:
	font_size i64 = 16
}

Optional parameters for Font#get_underline_thickness

struct FramebufferCacheRD #

struct FramebufferCacheRD {
	Object
}

Framebuffer cache manager for Rendering Device based renderers.

fn (FramebufferCacheRD) to_variant #

fn (s &FramebufferCacheRD) to_variant() Variant

fn (FramebufferCacheRD) from_variant #

fn (mut s FramebufferCacheRD) from_variant(variant &Variant)

struct GDExtension #

struct GDExtension {
	Resource
}

A native library for GDExtension.

fn (GDExtension) to_variant #

fn (s &GDExtension) to_variant() Variant

fn (GDExtension) from_variant #

fn (mut s GDExtension) from_variant(variant &Variant)

fn (GDExtension) is_library_open #

fn (s &GDExtension) is_library_open() bool

Returns true if this extension's library has been opened.

fn (GDExtension) get_minimum_library_initialization_level #

fn (s &GDExtension) get_minimum_library_initialization_level() GDExtensionInitializationLevel

Returns the lowest level required for this extension to be properly initialized (see the [enum InitializationLevel] enum).

struct GDExtensionCallError #

struct GDExtensionCallError {
	error    GDExtensionCallErrorType
	argument int
	expected int
}

struct GDExtensionClassCreationInfo #

struct GDExtensionClassCreationInfo {
	is_virtual               GDExtensionBool
	is_abstract              GDExtensionBool
	set_func                 GDExtensionClassSet               = unsafe { nil }
	get_func                 GDExtensionClassGet               = unsafe { nil }
	get_property_list_func   GDExtensionClassGetPropertyList   = unsafe { nil }
	free_property_list_func  GDExtensionClassFreePropertyList  = unsafe { nil }
	property_can_revert_func GDExtensionClassPropertyCanRevert = unsafe { nil }
	property_get_revert_func GDExtensionClassPropertyGetRevert = unsafe { nil }
	notification_func        GDExtensionClassNotification      = unsafe { nil }
	to_string_func           GDExtensionClassToString          = unsafe { nil }
	reference_func           GDExtensionClassReference         = unsafe { nil }
	unreference_func         GDExtensionClassUnreference       = unsafe { nil }
	create_instance_func     GDExtensionClassCreateInstance    = unsafe { nil }
	free_instance_func       GDExtensionClassFreeInstance      = unsafe { nil }
	get_virtual_func         GDExtensionClassGetVirtual        = unsafe { nil }
	get_rid_func             GDExtensionClassGetRID            = unsafe { nil }
	class_userdata           voidptr
}

struct GDExtensionClassCreationInfo2 #

struct GDExtensionClassCreationInfo2 {
	is_virtual                  GDExtensionBool
	is_abstract                 GDExtensionBool
	is_exposed                  GDExtensionBool
	set_func                    GDExtensionClassSet                 = unsafe { nil }
	get_func                    GDExtensionClassGet                 = unsafe { nil }
	get_property_list_func      GDExtensionClassGetPropertyList     = unsafe { nil }
	free_property_list_func     GDExtensionClassFreePropertyList    = unsafe { nil }
	property_can_revert_func    GDExtensionClassPropertyCanRevert   = unsafe { nil }
	property_get_revert_func    GDExtensionClassPropertyGetRevert   = unsafe { nil }
	validate_property_func      GDExtensionClassValidateProperty    = unsafe { nil }
	notification_func           GDExtensionClassNotification2       = unsafe { nil }
	to_string_func              GDExtensionClassToString            = unsafe { nil }
	reference_func              GDExtensionClassReference           = unsafe { nil }
	unreference_func            GDExtensionClassUnreference         = unsafe { nil }
	create_instance_func        GDExtensionClassCreateInstance      = unsafe { nil }
	free_instance_func          GDExtensionClassFreeInstance        = unsafe { nil }
	recreate_instance_func      GDExtensionClassRecreateInstance    = unsafe { nil }
	get_virtual_func            GDExtensionClassGetVirtual          = unsafe { nil }
	get_virtual_call_data_func  GDExtensionClassGetVirtualCallData  = unsafe { nil }
	call_virtual_with_data_func GDExtensionClassCallVirtualWithData = unsafe { nil }
	get_rid_func                GDExtensionClassGetRID              = unsafe { nil }
	class_userdata              voidptr
}

struct GDExtensionClassCreationInfo3 #

struct GDExtensionClassCreationInfo3 {
	is_virtual                  GDExtensionBool
	is_abstract                 GDExtensionBool
	is_exposed                  GDExtensionBool
	is_runtime                  GDExtensionBool
	icon_path                   GDExtensionConstStringPtr
	set_func                    GDExtensionClassSet                 = unsafe { nil }
	get_func                    GDExtensionClassGet                 = unsafe { nil }
	get_property_list_func      GDExtensionClassGetPropertyList     = unsafe { nil }
	free_property_list_func     GDExtensionClassFreePropertyList    = unsafe { nil }
	property_can_revert_func    GDExtensionClassPropertyCanRevert   = unsafe { nil }
	property_get_revert_func    GDExtensionClassPropertyGetRevert   = unsafe { nil }
	validate_property_func      GDExtensionClassValidateProperty    = unsafe { nil }
	notification_func           GDExtensionClassNotification2       = unsafe { nil }
	to_string_func              GDExtensionClassToString            = unsafe { nil }
	reference_func              GDExtensionClassReference           = unsafe { nil }
	unreference_func            GDExtensionClassUnreference         = unsafe { nil }
	create_instance_func        GDExtensionClassCreateInstance      = unsafe { nil }
	free_instance_func          GDExtensionClassFreeInstance        = unsafe { nil }
	recreate_instance_func      GDExtensionClassRecreateInstance    = unsafe { nil }
	get_virtual_func            GDExtensionClassGetVirtual          = unsafe { nil }
	get_virtual_call_data_func  GDExtensionClassGetVirtualCallData  = unsafe { nil }
	call_virtual_with_data_func GDExtensionClassCallVirtualWithData = unsafe { nil }
	get_rid_func                GDExtensionClassGetRID              = unsafe { nil }
	class_userdata              voidptr
}

struct GDExtensionClassCreationInfo4 #

struct GDExtensionClassCreationInfo4 {
	// TEMP
pub:
	is_virtual                  GDExtensionBool
	is_abstract                 GDExtensionBool
	is_exposed                  GDExtensionBool
	is_runtime                  GDExtensionBool
	icon_path                   GDExtensionConstStringPtr
	set_func                    GDExtensionClassSet                 = unsafe { nil }
	get_func                    GDExtensionClassGet                 = unsafe { nil }
	get_property_list_func      GDExtensionClassGetPropertyList     = unsafe { nil }
	free_property_list_func     GDExtensionClassFreePropertyList    = unsafe { nil }
	property_can_revert_func    GDExtensionClassPropertyCanRevert   = unsafe { nil }
	property_get_revert_func    GDExtensionClassPropertyGetRevert   = unsafe { nil }
	validate_property_func      GDExtensionClassValidateProperty    = unsafe { nil }
	notification_func           GDExtensionClassNotification2       = unsafe { nil }
	to_string_func              GDExtensionClassToString            = unsafe { nil }
	reference_func              GDExtensionClassReference           = unsafe { nil }
	unreference_func            GDExtensionClassUnreference         = unsafe { nil }
	create_instance_func        GDExtensionClassCreateInstance2     = unsafe { nil }
	free_instance_func          GDExtensionClassFreeInstance        = unsafe { nil }
	recreate_instance_func      GDExtensionClassRecreateInstance    = unsafe { nil }
	get_virtual_func            GDExtensionClassGetVirtual2         = unsafe { nil }
	get_virtual_call_data_func  GDExtensionClassGetVirtualCallData2 = unsafe { nil }
	call_virtual_with_data_func GDExtensionClassCallVirtualWithData = unsafe { nil }
	class_userdata              voidptr
}

struct GDExtensionClassMethodInfo #

struct GDExtensionClassMethodInfo {
	// TEMP
pub:
	name                   &StringName
	method_userdata        voidptr
	call_func              GDExtensionClassMethodCall    = unsafe { nil }
	ptrcall_func           GDExtensionClassMethodPtrCall = unsafe { nil }
	method_flags           GDExtensionClassMethodFlags
	has_return_value       GDExtensionBool
	return_value_info      &GDExtensionPropertyInfo
	return_value_metadata  GDExtensionClassMethodArgumentMetadata
	argument_count         u32
	arguments_info         &GDExtensionPropertyInfo
	arguments_metadata     &GDExtensionClassMethodArgumentMetadata
	default_argument_count u32
	default_arguments      &&Variant
}

struct GDExtensionGodotVersion #

struct GDExtensionGodotVersion {
pub mut:
	major   u32
	minor   u32
	patch   u32
	string_ &i8 = unsafe { nil }
}

struct GDExtensionGodotVersion2 #

struct GDExtensionGodotVersion2 {
pub mut:
	major     u32
	minor     u32
	patch     u32
	hex       u32
	status    &i8
	build     &i8
	hash      &i8
	timestamp u64
	string_   &i8 = unsafe { nil }
}

struct GDExtensionInitialization #

struct GDExtensionInitialization {
	minimum_initialization_level GDExtensionInitializationLevel
	userdata                     voidptr
pub mut:
	initialize   GDExtensionInitFn = unsafe { nil }
	deinitialize GDExtensionInitFn = unsafe { nil }
}

struct GDExtensionInstanceBindingCallbacks #

struct GDExtensionInstanceBindingCallbacks {
	create_callback    GDExtensionInstanceBindingCreateCallback    = unsafe { nil }
	free_callback      GDExtensionInstanceBindingFreeCallback      = unsafe { nil }
	reference_callback GDExtensionInstanceBindingReferenceCallback = unsafe { nil }
}

struct GDExtensionInterfaceFunctions #

@[heap]
struct GDExtensionInterfaceFunctions {
pub:
	gpaddr                                             fn (&i8) GDExtensionInterfaceFunctionPtr                 @[required]
	clp                                                GDExtensionClassLibraryPtr                               @[required]
	get_godot_version                                  GDExtensionInterfaceGetGodotVersion                      @[required]
	get_godot_version2                                 GDExtensionInterfaceGetGodotVersion2                     @[required]
	mem_alloc                                          GDExtensionInterfaceMemAlloc                             @[required]
	mem_realloc                                        GDExtensionInterfaceMemRealloc                           @[required]
	mem_free                                           GDExtensionInterfaceMemFree                              @[required]
	print_error                                        GDExtensionInterfacePrintError                           @[required]
	print_error_with_message                           GDExtensionInterfacePrintErrorWithMessage                @[required]
	print_warning                                      GDExtensionInterfacePrintWarning                         @[required]
	print_warning_with_message                         GDExtensionInterfacePrintWarningWithMessage              @[required]
	print_script_error                                 GDExtensionInterfacePrintScriptError                     @[required]
	print_script_error_with_message                    GDExtensionInterfacePrintScriptErrorWithMessage          @[required]
	get_native_struct_size                             GDExtensionInterfaceGetNativeStructSize                  @[required]
	variant_new_copy                                   GDExtensionInterfaceVariantNewCopy                       @[required]
	variant_new_nil                                    GDExtensionInterfaceVariantNewNil                        @[required]
	variant_destroy                                    GDExtensionInterfaceVariantDestroy                       @[required]
	variant_call                                       GDExtensionInterfaceVariantCall                          @[required]
	variant_call_static                                GDExtensionInterfaceVariantCallStatic                    @[required]
	variant_evaluate                                   GDExtensionInterfaceVariantEvaluate                      @[required]
	variant_set                                        GDExtensionInterfaceVariantSet                           @[required]
	variant_set_named                                  GDExtensionInterfaceVariantSetNamed                      @[required]
	variant_set_keyed                                  GDExtensionInterfaceVariantSetKeyed                      @[required]
	variant_set_indexed                                GDExtensionInterfaceVariantSetIndexed                    @[required]
	variant_get                                        GDExtensionInterfaceVariantGet                           @[required]
	variant_get_named                                  GDExtensionInterfaceVariantGetNamed                      @[required]
	variant_get_keyed                                  GDExtensionInterfaceVariantGetKeyed                      @[required]
	variant_get_indexed                                GDExtensionInterfaceVariantGetIndexed                    @[required]
	variant_iter_init                                  GDExtensionInterfaceVariantIterInit                      @[required]
	variant_iter_next                                  GDExtensionInterfaceVariantIterNext                      @[required]
	variant_iter_get                                   GDExtensionInterfaceVariantIterGet                       @[required]
	variant_hash                                       GDExtensionInterfaceVariantHash                          @[required]
	variant_recursive_hash                             GDExtensionInterfaceVariantRecursiveHash                 @[required]
	variant_hash_compare                               GDExtensionInterfaceVariantHashCompare                   @[required]
	variant_booleanize                                 GDExtensionInterfaceVariantBooleanize                    @[required]
	variant_duplicate                                  GDExtensionInterfaceVariantDuplicate                     @[required]
	variant_stringify                                  GDExtensionInterfaceVariantStringify                     @[required]
	variant_get_type                                   GDExtensionInterfaceVariantGetType                       @[required]
	variant_has_method                                 GDExtensionInterfaceVariantHasMethod                     @[required]
	variant_has_member                                 GDExtensionInterfaceVariantHasMember                     @[required]
	variant_has_key                                    GDExtensionInterfaceVariantHasKey                        @[required]
	variant_get_type_name                              GDExtensionInterfaceVariantGetTypeName                   @[required]
	variant_can_convert                                GDExtensionInterfaceVariantCanConvert                    @[required]
	variant_can_convert_strict                         GDExtensionInterfaceVariantCanConvertStrict              @[required]
	get_variant_from_type_constructor                  GDExtensionInterfaceGetVariantFromTypeConstructor        @[required]
	get_variant_to_type_constructor                    GDExtensionInterfaceGetVariantToTypeConstructor          @[required]
	variant_get_ptr_operator_evaluator                 GDExtensionInterfaceVariantGetPtrOperatorEvaluator       @[required]
	variant_get_ptr_builtin_method                     GDExtensionInterfaceVariantGetPtrBuiltinMethod           @[required]
	variant_get_ptr_constructor                        GDExtensionInterfaceVariantGetPtrConstructor             @[required]
	variant_get_ptr_destructor                         GDExtensionInterfaceVariantGetPtrDestructor              @[required]
	variant_construct                                  GDExtensionInterfaceVariantConstruct                     @[required]
	variant_get_ptr_setter                             GDExtensionInterfaceVariantGetPtrSetter                  @[required]
	variant_get_ptr_getter                             GDExtensionInterfaceVariantGetPtrGetter                  @[required]
	variant_get_ptr_indexed_setter                     GDExtensionInterfaceVariantGetPtrIndexedSetter           @[required]
	variant_get_ptr_indexed_getter                     GDExtensionInterfaceVariantGetPtrIndexedGetter           @[required]
	variant_get_ptr_keyed_setter                       GDExtensionInterfaceVariantGetPtrKeyedSetter             @[required]
	variant_get_ptr_keyed_getter                       GDExtensionInterfaceVariantGetPtrKeyedGetter             @[required]
	variant_get_ptr_keyed_checker                      GDExtensionInterfaceVariantGetPtrKeyedChecker            @[required]
	variant_get_constant_value                         GDExtensionInterfaceVariantGetConstantValue              @[required]
	variant_get_ptr_utility_function                   GDExtensionInterfaceVariantGetPtrUtilityFunction         @[required]
	string_new_with_latin1_chars                       GDExtensionInterfaceStringNewWithLatin1Chars             @[required]
	string_new_with_utf8_chars                         GDExtensionInterfaceStringNewWithUtf8Chars               @[required]
	string_new_with_utf16_chars                        GDExtensionInterfaceStringNewWithUtf16Chars              @[required]
	string_new_with_utf32_chars                        GDExtensionInterfaceStringNewWithUtf32Chars              @[required]
	string_new_with_wide_chars                         GDExtensionInterfaceStringNewWithWideChars               @[required]
	string_new_with_latin1_chars_and_len               GDExtensionInterfaceStringNewWithLatin1CharsAndLen       @[required]
	string_new_with_utf8_chars_and_len                 GDExtensionInterfaceStringNewWithUtf8CharsAndLen         @[required]
	string_new_with_utf8_chars_and_len2                GDExtensionInterfaceStringNewWithUtf8CharsAndLen2        @[required]
	string_new_with_utf16_chars_and_len                GDExtensionInterfaceStringNewWithUtf16CharsAndLen        @[required]
	string_new_with_utf16_chars_and_len2               GDExtensionInterfaceStringNewWithUtf16CharsAndLen2       @[required]
	string_new_with_utf32_chars_and_len                GDExtensionInterfaceStringNewWithUtf32CharsAndLen        @[required]
	string_new_with_wide_chars_and_len                 GDExtensionInterfaceStringNewWithWideCharsAndLen         @[required]
	string_to_latin1_chars                             GDExtensionInterfaceStringToLatin1Chars                  @[required]
	string_to_utf8_chars                               GDExtensionInterfaceStringToUtf8Chars                    @[required]
	string_to_utf16_chars                              GDExtensionInterfaceStringToUtf16Chars                   @[required]
	string_to_utf32_chars                              GDExtensionInterfaceStringToUtf32Chars                   @[required]
	string_to_wide_chars                               GDExtensionInterfaceStringToWideChars                    @[required]
	string_operator_index                              GDExtensionInterfaceStringOperatorIndex                  @[required]
	string_operator_index_const                        GDExtensionInterfaceStringOperatorIndexConst             @[required]
	string_operator_plus_eq_string                     GDExtensionInterfaceStringOperatorPlusEqString           @[required]
	string_operator_plus_eq_char                       GDExtensionInterfaceStringOperatorPlusEqChar             @[required]
	string_operator_plus_eq_cstr                       GDExtensionInterfaceStringOperatorPlusEqCstr             @[required]
	string_operator_plus_eq_wcstr                      GDExtensionInterfaceStringOperatorPlusEqWcstr            @[required]
	string_operator_plus_eq_c32str                     GDExtensionInterfaceStringOperatorPlusEqC32str           @[required]
	xml_parser_open_buffer                             GDExtensionInterfaceXmlParserOpenBuffer                  @[required]
	file_access_store_buffer                           GDExtensionInterfaceFileAccessStoreBuffer                @[required]
	file_access_get_buffer                             GDExtensionInterfaceFileAccessGetBuffer                  @[required]
	packed_byte_array_operator_index_const             GDExtensionInterfacePackedByteArrayOperatorIndexConst    @[required]
	packed_color_array_operator_index                  GDExtensionInterfacePackedColorArrayOperatorIndex        @[required]
	packed_color_array_operator_index_const            GDExtensionInterfacePackedColorArrayOperatorIndexConst   @[required]
	packed_float32_array_operator_index                GDExtensionInterfacePackedFloat32ArrayOperatorIndex      @[required]
	packed_float32_array_operator_index_const          GDExtensionInterfacePackedFloat32ArrayOperatorIndexConst @[required]
	packed_float64_array_operator_index                GDExtensionInterfacePackedFloat64ArrayOperatorIndex      @[required]
	packed_float64_array_operator_index_const          GDExtensionInterfacePackedFloat64ArrayOperatorIndexConst @[required]
	packed_int32_array_operator_index                  GDExtensionInterfacePackedInt32ArrayOperatorIndex        @[required]
	packed_int32_array_operator_index_const            GDExtensionInterfacePackedInt32ArrayOperatorIndexConst   @[required]
	packed_int64_array_operator_index                  GDExtensionInterfacePackedInt64ArrayOperatorIndex        @[required]
	packed_int64_array_operator_index_const            GDExtensionInterfacePackedInt64ArrayOperatorIndexConst   @[required]
	packed_string_array_operator_index                 GDExtensionInterfacePackedStringArrayOperatorIndex       @[required]
	packed_string_array_operator_index_const           GDExtensionInterfacePackedStringArrayOperatorIndexConst  @[required]
	packed_vector2_array_operator_index                GDExtensionInterfacePackedVector2ArrayOperatorIndex      @[required]
	packed_vector2_array_operator_index_const          GDExtensionInterfacePackedVector2ArrayOperatorIndexConst @[required]
	packed_vector3_array_operator_index                GDExtensionInterfacePackedVector3ArrayOperatorIndex      @[required]
	packed_vector3_array_operator_index_const          GDExtensionInterfacePackedVector3ArrayOperatorIndexConst @[required]
	array_operator_index                               GDExtensionInterfaceArrayOperatorIndex                   @[required]
	array_operator_index_const                         GDExtensionInterfaceArrayOperatorIndexConst              @[required]
	array_ref                                          GDExtensionInterfaceArrayRef                                      @[required]
	array_set_typed                                    GDExtensionInterfaceArraySetTyped                                 @[required]
	dictionary_operator_index                          GDExtensionInterfaceDictionaryOperatorIndex                       @[required]
	dictionary_operator_index_const                    GDExtensionInterfaceDictionaryOperatorIndexConst                  @[required]
	object_method_bind_call                            GDExtensionInterfaceObjectMethodBindCall                          @[required]
	object_method_bind_ptrcall                         GDExtensionInterfaceObjectMethodBindPtrcall                       @[required]
	object_destroy                                     GDExtensionInterfaceObjectDestroy                                 @[required]
	global_get_singleton                               GDExtensionInterfaceGlobalGetSingleton                            @[required]
	object_get_instance_binding                        GDExtensionInterfaceObjectGetInstanceBinding                      @[required]
	object_set_instance_binding                        GDExtensionInterfaceObjectSetInstanceBinding                      @[required]
	object_set_instance                                GDExtensionInterfaceObjectSetInstance                             @[required]
	object_get_class_name                              GDExtensionInterfaceObjectGetClassName                            @[required]
	object_cast_to                                     GDExtensionInterfaceObjectCastTo                                  @[required]
	object_get_instance_from_id                        GDExtensionInterfaceObjectGetInstanceFromId                       @[required]
	object_get_instance_id                             GDExtensionInterfaceObjectGetInstanceId                           @[required]
	ref_get_object                                     GDExtensionInterfaceRefGetObject                                  @[required]
	ref_set_object                                     GDExtensionInterfaceRefSetObject                                  @[required]
	script_instance_create                             GDExtensionInterfaceScriptInstanceCreate                          @[required]
	script_instance_create3                            GDExtensionInterfaceScriptInstanceCreate3                         @[required]
	classdb_construct_object                           GDExtensionInterfaceClassdbConstructObject                        @[required]
	classdb_construct_object2                          GDExtensionInterfaceClassdbConstructObject2                       @[required]
	classdb_get_method_bind                            GDExtensionInterfaceClassdbGetMethodBind                          @[required]
	classdb_get_class_tag                              GDExtensionInterfaceClassdbGetClassTag                            @[required]
	classdb_register_extension_class                   GDExtensionInterfaceClassdbRegisterExtensionClass                 @[required]
	classdb_register_extension_class2                  GDExtensionInterfaceClassdbRegisterExtensionClass2                @[required]
	classdb_register_extension_class3                  GDExtensionInterfaceClassdbRegisterExtensionClass3                @[required]
	classdb_register_extension_class4                  GDExtensionInterfaceClassdbRegisterExtensionClass4                @[required]
	classdb_register_extension_class_method            GDExtensionInterfaceClassdbRegisterExtensionClassMethod           @[required]
	classdb_register_extension_class_integer_constant  GDExtensionInterfaceClassdbRegisterExtensionClassIntegerConstant  @[required]
	classdb_register_extension_class_property          GDExtensionInterfaceClassdbRegisterExtensionClassProperty         @[required]
	classdb_register_extension_class_property_group    GDExtensionInterfaceClassdbRegisterExtensionClassPropertyGroup    @[required]
	classdb_register_extension_class_property_subgroup GDExtensionInterfaceClassdbRegisterExtensionClassPropertySubgroup @[required]
	classdb_register_extension_class_signal            GDExtensionInterfaceClassdbRegisterExtensionClassSignal           @[required]
	classdb_unregister_extension_class                 GDExtensionInterfaceClassdbUnregisterExtensionClass               @[required]
	get_library_path                                   GDExtensionInterfaceGetLibraryPath     @[required]
	editor_add_plugin                                  GDExtensionInterfaceEditorAddPlugin    @[required]
	editor_remove_plugin                               GDExtensionInterfaceEditorRemovePlugin @[required]
}

struct GDExtensionManager #

struct GDExtensionManager {
	Object
}

Provides access to GDExtension functionality.

fn (GDExtensionManager) to_variant #

fn (s &GDExtensionManager) to_variant() Variant

fn (GDExtensionManager) from_variant #

fn (mut s GDExtensionManager) from_variant(variant &Variant)

fn (GDExtensionManager) load_extension #

fn (s &GDExtensionManager) load_extension(path string) GDExtensionManagerLoadStatus

Loads an extension by absolute file path. The [param path] needs to point to a valid [GDExtension]. Returns [constant LOAD_STATUS_OK] if successful.

fn (GDExtensionManager) reload_extension #

fn (s &GDExtensionManager) reload_extension(path string) GDExtensionManagerLoadStatus

Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED]. [b]Note:[/b] You can only reload extensions in the editor. In release builds, this method always fails and returns [constant LOAD_STATUS_FAILED].

fn (GDExtensionManager) unload_extension #

fn (s &GDExtensionManager) unload_extension(path string) GDExtensionManagerLoadStatus

Unloads an extension by file path. The [param path] needs to point to an already loaded [GDExtension], otherwise this method returns [constant LOAD_STATUS_NOT_LOADED].

fn (GDExtensionManager) is_extension_loaded #

fn (s &GDExtensionManager) is_extension_loaded(path string) bool

Returns true if the extension at the given file [param path] has already been loaded successfully. See also [method get_loaded_extensions].

fn (GDExtensionManager) get_loaded_extensions #

fn (s &GDExtensionManager) get_loaded_extensions() PackedStringArray

Returns the file paths of all currently loaded extensions.

fn (GDExtensionManager) get_extension #

fn (s &GDExtensionManager) get_extension(path string) GDExtension

Returns the [GDExtension] at the given file [param path], or null if it has not been loaded or does not exist.

struct GDExtensionMethodInfo #

struct GDExtensionMethodInfo {
	// TEMP
pub:
	name                   &StringName
	return_value           GDExtensionPropertyInfo
	flags                  u32
	id                     int
	argument_count         u32
	arguments              &GDExtensionPropertyInfo
	default_argument_count u32
	default_arguments      &&Variant
}

struct GDExtensionPropertyInfo #

struct GDExtensionPropertyInfo {
	// TEMP
pub:
	type_       GDExtensionVariantType
	name        &StringName = unsafe { nil }
	class_name  &StringName = unsafe { nil }
	hint        PropertyHint
	hint_string &String = unsafe { nil }
	usage       PropertyUsageFlags
}

struct GDExtensionScriptInstanceInfo #

struct GDExtensionScriptInstanceInfo {
	set_func                  GDExtensionScriptInstanceSet                 = unsafe { nil }
	get_func                  GDExtensionScriptInstanceGet                 = unsafe { nil }
	get_property_list_func    GDExtensionScriptInstanceGetPropertyList     = unsafe { nil }
	free_property_list_func   GDExtensionScriptInstanceFreePropertyList    = unsafe { nil }
	property_can_revert_func  GDExtensionScriptInstancePropertyCanRevert   = unsafe { nil }
	property_get_revert_func  GDExtensionScriptInstancePropertyGetRevert   = unsafe { nil }
	get_owner_func            GDExtensionScriptInstanceGetOwner            = unsafe { nil }
	get_property_state_func   GDExtensionScriptInstanceGetPropertyState    = unsafe { nil }
	get_method_list_func      GDExtensionScriptInstanceGetMethodList       = unsafe { nil }
	free_method_list_func     GDExtensionScriptInstanceFreeMethodList      = unsafe { nil }
	get_property_type_func    GDExtensionScriptInstanceGetPropertyType     = unsafe { nil }
	has_method_func           GDExtensionScriptInstanceHasMethod           = unsafe { nil }
	call_func                 GDExtensionScriptInstanceCall                = unsafe { nil }
	notification_func         GDExtensionScriptInstanceNotification        = unsafe { nil }
	to_string_func            GDExtensionScriptInstanceToString            = unsafe { nil }
	refcount_incremented_func GDExtensionScriptInstanceRefCountIncremented = unsafe { nil }
	refcount_decremented_func GDExtensionScriptInstanceRefCountDecremented = unsafe { nil }
	get_script_func           GDExtensionScriptInstanceGetScript           = unsafe { nil }
	is_placeholder_func       GDExtensionScriptInstanceIsPlaceholder       = unsafe { nil }
	set_fallback_func         GDExtensionScriptInstanceSet                 = unsafe { nil }
	get_fallback_func         GDExtensionScriptInstanceGet                 = unsafe { nil }
	get_language_func         GDExtensionScriptInstanceGetLanguage         = unsafe { nil }
	free_func                 GDExtensionScriptInstanceFree                = unsafe { nil }
}

struct GDExtensionScriptInstanceInfo3 #

struct GDExtensionScriptInstanceInfo3 {
	set_func                       GDExtensionScriptInstanceSet                    = unsafe { nil }
	get_func                       GDExtensionScriptInstanceGet                    = unsafe { nil }
	get_property_list_func         GDExtensionScriptInstanceGetPropertyList        = unsafe { nil }
	free_property_list_func        GDExtensionScriptInstanceFreePropertyList2      = unsafe { nil }
	get_class_category_func        GDExtensionScriptInstanceGetClassCategory       = unsafe { nil }
	property_can_revert_func       GDExtensionScriptInstancePropertyCanRevert      = unsafe { nil }
	property_get_revert_func       GDExtensionScriptInstancePropertyGetRevert      = unsafe { nil }
	get_owner_func                 GDExtensionScriptInstanceGetOwner               = unsafe { nil }
	get_property_state_func        GDExtensionScriptInstanceGetPropertyState       = unsafe { nil }
	get_method_list_func           GDExtensionScriptInstanceGetMethodList          = unsafe { nil }
	free_method_list_func          GDExtensionScriptInstanceFreeMethodList2        = unsafe { nil }
	get_property_type_func         GDExtensionScriptInstanceGetPropertyType        = unsafe { nil }
	validate_property_func         GDExtensionScriptInstanceValidateProperty       = unsafe { nil }
	has_method_func                GDExtensionScriptInstanceHasMethod              = unsafe { nil }
	get_method_argument_count_func GDExtensionScriptInstanceGetMethodArgumentCount = unsafe { nil }
	call_func                      GDExtensionScriptInstanceCall                   = unsafe { nil }
	notification_func              GDExtensionScriptInstanceNotification2          = unsafe { nil }
	to_string_func                 GDExtensionScriptInstanceToString               = unsafe { nil }
	refcount_incremented_func      GDExtensionScriptInstanceRefCountIncremented    = unsafe { nil }
	refcount_decremented_func      GDExtensionScriptInstanceRefCountDecremented    = unsafe { nil }
	get_script_func                GDExtensionScriptInstanceGetScript              = unsafe { nil }
	is_placeholder_func            GDExtensionScriptInstanceIsPlaceholder          = unsafe { nil }
	set_fallback_func              GDExtensionScriptInstanceSet                    = unsafe { nil }
	get_fallback_func              GDExtensionScriptInstanceGet                    = unsafe { nil }
	get_language_func              GDExtensionScriptInstanceGetLanguage            = unsafe { nil }
	free_func                      GDExtensionScriptInstanceFree                   = unsafe { nil }
}

struct GDScript #

struct GDScript {
	Script
}

A script implemented in the GDScript programming language.

fn (GDScript) to_variant #

fn (s &GDScript) to_variant() Variant

fn (GDScript) from_variant #

fn (mut s GDScript) from_variant(variant &Variant)

fn (GDScript) new #

fn (s &GDScript) new(varargs ...ToVariant) Variant

Returns a new instance of the script.

var MyClass = load('myclass.gd')
var instance = MyClass.new()
print(instance.get_script() == MyClass) ##

struct GDScriptSyntaxHighlighter #

struct GDScriptSyntaxHighlighter {
	EditorSyntaxHighlighter
}

A GDScript syntax highlighter that can be used with [TextEdit] and [CodeEdit] nodes.

fn (GDScriptSyntaxHighlighter) to_variant #

fn (s &GDScriptSyntaxHighlighter) to_variant() Variant

fn (GDScriptSyntaxHighlighter) from_variant #

fn (mut s GDScriptSyntaxHighlighter) from_variant(variant &Variant)

struct GLTFAccessor #

struct GLTFAccessor {
	Resource
}

Represents a glTF accessor.

fn (GLTFAccessor) to_variant #

fn (s &GLTFAccessor) to_variant() Variant

fn (GLTFAccessor) from_variant #

fn (mut s GLTFAccessor) from_variant(variant &Variant)

fn (GLTFAccessor) get_buffer_view #

fn (s &GLTFAccessor) get_buffer_view() i64

fn (GLTFAccessor) set_buffer_view #

fn (s &GLTFAccessor) set_buffer_view(buffer_view i64)

fn (GLTFAccessor) get_byte_offset #

fn (s &GLTFAccessor) get_byte_offset() i64

fn (GLTFAccessor) set_byte_offset #

fn (s &GLTFAccessor) set_byte_offset(byte_offset i64)

fn (GLTFAccessor) get_component_type #

fn (s &GLTFAccessor) get_component_type() GLTFAccessorGLTFComponentType

fn (GLTFAccessor) set_component_type #

fn (s &GLTFAccessor) set_component_type(component_type GLTFAccessorGLTFComponentType)

fn (GLTFAccessor) get_normalized #

fn (s &GLTFAccessor) get_normalized() bool

fn (GLTFAccessor) set_normalized #

fn (s &GLTFAccessor) set_normalized(normalized bool)

fn (GLTFAccessor) get_count #

fn (s &GLTFAccessor) get_count() i64

fn (GLTFAccessor) set_count #

fn (s &GLTFAccessor) set_count(count i64)

fn (GLTFAccessor) get_accessor_type #

fn (s &GLTFAccessor) get_accessor_type() GLTFAccessorType

fn (GLTFAccessor) set_accessor_type #

fn (s &GLTFAccessor) set_accessor_type(accessor_type GLTFAccessorType)

fn (GLTFAccessor) get_type #

fn (s &GLTFAccessor) get_type() i64

fn (GLTFAccessor) set_type #

fn (s &GLTFAccessor) set_type(gd_type i64)

fn (GLTFAccessor) get_min #

fn (s &GLTFAccessor) get_min() PackedFloat64Array

fn (GLTFAccessor) set_min #

fn (s &GLTFAccessor) set_min(min PackedFloat64Array)

fn (GLTFAccessor) get_max #

fn (s &GLTFAccessor) get_max() PackedFloat64Array

fn (GLTFAccessor) set_max #

fn (s &GLTFAccessor) set_max(max PackedFloat64Array)

fn (GLTFAccessor) get_sparse_count #

fn (s &GLTFAccessor) get_sparse_count() i64

fn (GLTFAccessor) set_sparse_count #

fn (s &GLTFAccessor) set_sparse_count(sparse_count i64)

fn (GLTFAccessor) get_sparse_indices_buffer_view #

fn (s &GLTFAccessor) get_sparse_indices_buffer_view() i64

fn (GLTFAccessor) set_sparse_indices_buffer_view #

fn (s &GLTFAccessor) set_sparse_indices_buffer_view(sparse_indices_buffer_view i64)

fn (GLTFAccessor) get_sparse_indices_byte_offset #

fn (s &GLTFAccessor) get_sparse_indices_byte_offset() i64

fn (GLTFAccessor) set_sparse_indices_byte_offset #

fn (s &GLTFAccessor) set_sparse_indices_byte_offset(sparse_indices_byte_offset i64)

fn (GLTFAccessor) get_sparse_indices_component_type #

fn (s &GLTFAccessor) get_sparse_indices_component_type() GLTFAccessorGLTFComponentType

fn (GLTFAccessor) set_sparse_indices_component_type #

fn (s &GLTFAccessor) set_sparse_indices_component_type(sparse_indices_component_type GLTFAccessorGLTFComponentType)

fn (GLTFAccessor) get_sparse_values_buffer_view #

fn (s &GLTFAccessor) get_sparse_values_buffer_view() i64

fn (GLTFAccessor) set_sparse_values_buffer_view #

fn (s &GLTFAccessor) set_sparse_values_buffer_view(sparse_values_buffer_view i64)

fn (GLTFAccessor) get_sparse_values_byte_offset #

fn (s &GLTFAccessor) get_sparse_values_byte_offset() i64

fn (GLTFAccessor) set_sparse_values_byte_offset #

fn (s &GLTFAccessor) set_sparse_values_byte_offset(sparse_values_byte_offset i64)

struct GLTFAnimation #

struct GLTFAnimation {
	Resource
}

fn (GLTFAnimation) to_variant #

fn (s &GLTFAnimation) to_variant() Variant

fn (GLTFAnimation) from_variant #

fn (mut s GLTFAnimation) from_variant(variant &Variant)

fn (GLTFAnimation) get_original_name #

fn (s &GLTFAnimation) get_original_name() string

fn (GLTFAnimation) set_original_name #

fn (s &GLTFAnimation) set_original_name(original_name string)

fn (GLTFAnimation) get_loop #

fn (s &GLTFAnimation) get_loop() bool

fn (GLTFAnimation) set_loop #

fn (s &GLTFAnimation) set_loop(loop bool)

fn (GLTFAnimation) get_additional_data #

fn (s &GLTFAnimation) get_additional_data(extension_name string) Variant

Gets additional arbitrary data in this [GLTFAnimation] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.

fn (GLTFAnimation) set_additional_data #

fn (s &GLTFAnimation) set_additional_data(extension_name string, additional_data_ ToVariant)

Sets additional arbitrary data in this [GLTFAnimation] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.

struct GLTFBufferView #

struct GLTFBufferView {
	Resource
}

Represents a glTF buffer view.

fn (GLTFBufferView) to_variant #

fn (s &GLTFBufferView) to_variant() Variant

fn (GLTFBufferView) from_variant #

fn (mut s GLTFBufferView) from_variant(variant &Variant)

fn (GLTFBufferView) load_buffer_view_data #

fn (s &GLTFBufferView) load_buffer_view_data(state GLTFState) PackedByteArray

Loads the buffer view data from the buffer referenced by this buffer view in the given [GLTFState]. Interleaved data with a byte stride is not yet supported by this method. The data is returned as a [PackedByteArray].

fn (GLTFBufferView) get_buffer #

fn (s &GLTFBufferView) get_buffer() i64

fn (GLTFBufferView) set_buffer #

fn (s &GLTFBufferView) set_buffer(buffer i64)

fn (GLTFBufferView) get_byte_offset #

fn (s &GLTFBufferView) get_byte_offset() i64

fn (GLTFBufferView) set_byte_offset #

fn (s &GLTFBufferView) set_byte_offset(byte_offset i64)

fn (GLTFBufferView) get_byte_length #

fn (s &GLTFBufferView) get_byte_length() i64

fn (GLTFBufferView) set_byte_length #

fn (s &GLTFBufferView) set_byte_length(byte_length i64)

fn (GLTFBufferView) get_byte_stride #

fn (s &GLTFBufferView) get_byte_stride() i64

fn (GLTFBufferView) set_byte_stride #

fn (s &GLTFBufferView) set_byte_stride(byte_stride i64)

fn (GLTFBufferView) get_indices #

fn (s &GLTFBufferView) get_indices() bool

fn (GLTFBufferView) set_indices #

fn (s &GLTFBufferView) set_indices(indices bool)

fn (GLTFBufferView) get_vertex_attributes #

fn (s &GLTFBufferView) get_vertex_attributes() bool

fn (GLTFBufferView) set_vertex_attributes #

fn (s &GLTFBufferView) set_vertex_attributes(is_attributes bool)

struct GLTFCamera #

struct GLTFCamera {
	Resource
}

Represents a glTF camera.

fn (GLTFCamera) to_variant #

fn (s &GLTFCamera) to_variant() Variant

fn (GLTFCamera) from_variant #

fn (mut s GLTFCamera) from_variant(variant &Variant)

fn (GLTFCamera) to_node #

fn (s &GLTFCamera) to_node() Camera3D

Converts this GLTFCamera instance into a Godot [Camera3D] node.

fn (GLTFCamera) to_dictionary #

fn (s &GLTFCamera) to_dictionary() Dictionary

Serializes this GLTFCamera instance into a [Dictionary].

fn (GLTFCamera) get_perspective #

fn (s &GLTFCamera) get_perspective() bool

fn (GLTFCamera) set_perspective #

fn (s &GLTFCamera) set_perspective(perspective bool)

fn (GLTFCamera) get_fov #

fn (s &GLTFCamera) get_fov() f64

fn (GLTFCamera) set_fov #

fn (s &GLTFCamera) set_fov(fov f64)

fn (GLTFCamera) get_size_mag #

fn (s &GLTFCamera) get_size_mag() f64

fn (GLTFCamera) set_size_mag #

fn (s &GLTFCamera) set_size_mag(size_mag f64)

fn (GLTFCamera) get_depth_far #

fn (s &GLTFCamera) get_depth_far() f64

fn (GLTFCamera) set_depth_far #

fn (s &GLTFCamera) set_depth_far(zdepth_far f64)

fn (GLTFCamera) get_depth_near #

fn (s &GLTFCamera) get_depth_near() f64

fn (GLTFCamera) set_depth_near #

fn (s &GLTFCamera) set_depth_near(zdepth_near f64)

struct GLTFDocument #

struct GLTFDocument {
	Resource
}

Class for importing and exporting glTF files in and out of Godot.

fn (GLTFDocument) to_variant #

fn (s &GLTFDocument) to_variant() Variant

fn (GLTFDocument) from_variant #

fn (mut s GLTFDocument) from_variant(variant &Variant)

fn (GLTFDocument) set_image_format #

fn (s &GLTFDocument) set_image_format(image_format string)

fn (GLTFDocument) get_image_format #

fn (s &GLTFDocument) get_image_format() string

fn (GLTFDocument) set_lossy_quality #

fn (s &GLTFDocument) set_lossy_quality(lossy_quality f64)

fn (GLTFDocument) get_lossy_quality #

fn (s &GLTFDocument) get_lossy_quality() f64

fn (GLTFDocument) set_fallback_image_format #

fn (s &GLTFDocument) set_fallback_image_format(fallback_image_format string)

fn (GLTFDocument) get_fallback_image_format #

fn (s &GLTFDocument) get_fallback_image_format() string

fn (GLTFDocument) set_fallback_image_quality #

fn (s &GLTFDocument) set_fallback_image_quality(fallback_image_quality f64)

fn (GLTFDocument) get_fallback_image_quality #

fn (s &GLTFDocument) get_fallback_image_quality() f64

fn (GLTFDocument) set_root_node_mode #

fn (s &GLTFDocument) set_root_node_mode(root_node_mode GLTFDocumentRootNodeMode)

fn (GLTFDocument) get_root_node_mode #

fn (s &GLTFDocument) get_root_node_mode() GLTFDocumentRootNodeMode

fn (GLTFDocument) set_visibility_mode #

fn (s &GLTFDocument) set_visibility_mode(visibility_mode GLTFDocumentVisibilityMode)

fn (GLTFDocument) get_visibility_mode #

fn (s &GLTFDocument) get_visibility_mode() GLTFDocumentVisibilityMode

fn (GLTFDocument) append_from_file #

fn (s &GLTFDocument) append_from_file(path string, state GLTFState, cfg GLTFDocument_append_from_file_Cfg) GDError

Takes a path to a glTF file and imports the data at that file path to the given [GLTFState] object through the [param state] parameter. [b]Note:[/b] The [param base_path] tells [method append_from_file] where to find dependencies and can be empty.

fn (GLTFDocument) append_from_buffer #

fn (s &GLTFDocument) append_from_buffer(bytes PackedByteArray, base_path string, state GLTFState, cfg GLTFDocument_append_from_buffer_Cfg) GDError

Takes a [PackedByteArray] defining a glTF and imports the data to the given [GLTFState] object through the [param state] parameter. [b]Note:[/b] The [param base_path] tells [method append_from_buffer] where to find dependencies and can be empty.

fn (GLTFDocument) append_from_scene #

fn (s &GLTFDocument) append_from_scene(node Node, state GLTFState, cfg GLTFDocument_append_from_scene_Cfg) GDError

Takes a Godot Engine scene node and exports it and its descendants to the given [GLTFState] object through the [param state] parameter.

fn (GLTFDocument) generate_scene #

fn (s &GLTFDocument) generate_scene(state GLTFState, cfg GLTFDocument_generate_scene_Cfg) Node

Takes a [GLTFState] object through the [param state] parameter and returns a Godot Engine scene node. The [param bake_fps] parameter overrides the bake_fps in [param state].

fn (GLTFDocument) generate_buffer #

fn (s &GLTFDocument) generate_buffer(state GLTFState) PackedByteArray

Takes a [GLTFState] object through the [param state] parameter and returns a glTF [PackedByteArray].

fn (GLTFDocument) write_to_filesystem #

fn (s &GLTFDocument) write_to_filesystem(state GLTFState, path string) GDError

Takes a [GLTFState] object through the [param state] parameter and writes a glTF file to the filesystem. [b]Note:[/b] The extension of the glTF file determines if it is a .glb binary file or a .gltf text file.

struct GLTFDocumentExtension #

struct GLTFDocumentExtension {
	Resource
}

[GLTFDocument] extension class.

fn (GLTFDocumentExtension) to_variant #

fn (s &GLTFDocumentExtension) to_variant() Variant

fn (GLTFDocumentExtension) from_variant #

fn (mut s GLTFDocumentExtension) from_variant(variant &Variant)

fn (GLTFDocumentExtension) gd_import_preflight #

fn (s &GLTFDocumentExtension) gd_import_preflight(state GLTFState, extensions PackedStringArray) GDError

Part of the import process. This method is run first, before all other parts of the import process. The return value is used to determine if this [GLTFDocumentExtension] instance should be used for importing a given glTF file. If [constant OK], the import will use this [GLTFDocumentExtension] instance. If not overridden, [constant OK] is returned.

fn (GLTFDocumentExtension) gd_get_supported_extensions #

fn (s &GLTFDocumentExtension) gd_get_supported_extensions() PackedStringArray

Part of the import process. This method is run after [method _import_preflight] and before [method _parse_node_extensions]. Returns an array of the glTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a glTF file with required extensions can be loaded.

fn (GLTFDocumentExtension) gd_parse_node_extensions #

fn (s &GLTFDocumentExtension) gd_parse_node_extensions(state GLTFState, gltf_node GLTFNode, extensions Dictionary) GDError

Part of the import process. This method is run after [method _get_supported_extensions] and before [method _import_post_parse]. Runs when parsing the node extensions of a GLTFNode. This method can be used to process the extension JSON data into a format that can be used by [method _generate_scene_node]. The return value should be a member of the [enum Error] enum.

fn (GLTFDocumentExtension) gd_parse_image_data #

fn (s &GLTFDocumentExtension) gd_parse_image_data(state GLTFState, image_data PackedByteArray, mime_type string, ret_image Image) GDError

Part of the import process. This method is run after [method _parse_node_extensions] and before [method _parse_texture_json]. Runs when parsing image data from a glTF file. The data could be sourced from a separate file, a URI, or a buffer, and then is passed as a byte array.

fn (GLTFDocumentExtension) gd_get_image_file_extension #

fn (s &GLTFDocumentExtension) gd_get_image_file_extension() string

Returns the file extension to use for saving image data into, for example, ".png". If defined, when this extension is used to handle images, and the images are saved to a separate file, the image bytes will be copied to a file with this extension. If this is set, there should be a [ResourceImporter] class able to import the file. If not defined or empty, Godot will save the image into a PNG file.

fn (GLTFDocumentExtension) gd_parse_texture_json #

fn (s &GLTFDocumentExtension) gd_parse_texture_json(state GLTFState, texture_json Dictionary, ret_gltf_texture GLTFTexture) GDError

Part of the import process. This method is run after [method _parse_image_data] and before [method _generate_scene_node]. Runs when parsing the texture JSON from the glTF textures array. This can be used to set the source image index to use as the texture.

fn (GLTFDocumentExtension) gd_import_object_model_property #

fn (s &GLTFDocumentExtension) gd_import_object_model_property(state GLTFState, split_json_pointer PackedStringArray, partial_paths Array) GLTFObjectModelProperty

Part of the import process. Allows GLTFDocumentExtension classes to provide mappings for JSON pointers to glTF properties, as defined by the glTF object model, to properties of nodes in the Godot scene tree. Returns a [GLTFObjectModelProperty] instance that defines how the property should be mapped. If your extension can't handle the property, return null or an instance without any NodePaths (see [method GLTFObjectModelProperty.has_node_paths]). You should use [method GLTFObjectModelProperty.set_types] to set the types, and [method GLTFObjectModelProperty.append_path_to_property] function is useful for most simple cases. In many cases, [param partial_paths] will contain the start of a path, allowing the extension to complete the path. For example, for /nodes/3/extensions/MY_ext/prop, Godot will pass you a NodePath that leads to node 3, so the GLTFDocumentExtension class only needs to resolve the last MY_ext/prop part of the path. In this example, the extension should check split.size() > 4 and split[0] == "nodes" and split[2] == "extensions" and split[3] == "MY_ext" at the start of the function to check if this JSON pointer applies to it, then it can use [param partial_paths] and handle split[4].

fn (GLTFDocumentExtension) gd_import_post_parse #

fn (s &GLTFDocumentExtension) gd_import_post_parse(state GLTFState) GDError

Part of the import process. This method is run after [method _parse_node_extensions] and before [method _import_pre_generate]. This method can be used to modify any of the data imported so far after parsing each node, but before generating the scene or any of its nodes.

fn (GLTFDocumentExtension) gd_import_pre_generate #

fn (s &GLTFDocumentExtension) gd_import_pre_generate(state GLTFState) GDError

Part of the import process. This method is run after [method _import_post_parse] and before [method _generate_scene_node]. This method can be used to modify or read from any of the processed data structures, before generating the nodes and then running the final per-node import step.

fn (GLTFDocumentExtension) gd_generate_scene_node #

fn (s &GLTFDocumentExtension) gd_generate_scene_node(state GLTFState, gltf_node GLTFNode, scene_parent Node) Node3D

Part of the import process. This method is run after [method _import_pre_generate] and before [method _import_node]. Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. [b]Note:[/b] The [param scene_parent] parameter may be null if this is the single root node.

fn (GLTFDocumentExtension) gd_import_node #

fn (s &GLTFDocumentExtension) gd_import_node(state GLTFState, gltf_node GLTFNode, json Dictionary, node Node) GDError

Part of the import process. This method is run after [method _generate_scene_node] and before [method _import_post]. This method can be used to make modifications to each of the generated Godot scene nodes.

fn (GLTFDocumentExtension) gd_import_post #

fn (s &GLTFDocumentExtension) gd_import_post(state GLTFState, root Node) GDError

Part of the import process. This method is run last, after all other parts of the import process. This method can be used to modify the final Godot scene generated by the import process.

fn (GLTFDocumentExtension) gd_export_preflight #

fn (s &GLTFDocumentExtension) gd_export_preflight(state GLTFState, root Node) GDError

Part of the export process. This method is run first, before all other parts of the export process. The return value is used to determine if this [GLTFDocumentExtension] instance should be used for exporting a given glTF file. If [constant OK], the export will use this [GLTFDocumentExtension] instance. If not overridden, [constant OK] is returned.

fn (GLTFDocumentExtension) gd_convert_scene_node #

fn (s &GLTFDocumentExtension) gd_convert_scene_node(state GLTFState, gltf_node GLTFNode, scene_node Node)

Part of the export process. This method is run after [method _export_preflight] and before [method _export_post_convert]. Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by [method _export_node].

fn (GLTFDocumentExtension) gd_export_post_convert #

fn (s &GLTFDocumentExtension) gd_export_post_convert(state GLTFState, root Node) GDError

Part of the export process. This method is run after [method _convert_scene_node] and before [method _export_preserialize]. This method can be used to modify the converted node data structures before serialization with any additional data from the scene tree.

fn (GLTFDocumentExtension) gd_export_preserialize #

fn (s &GLTFDocumentExtension) gd_export_preserialize(state GLTFState) GDError

Part of the export process. This method is run after [method _export_post_convert] and before [method _get_saveable_image_formats]. This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with [method GLTFDocument.generate_buffer] or writing to the file system with [method GLTFDocument.write_to_filesystem].

fn (GLTFDocumentExtension) gd_export_object_model_property #

fn (s &GLTFDocumentExtension) gd_export_object_model_property(state GLTFState, node_path NodePath, godot_node Node, gltf_node_index i64, target_object Object, target_depth i64) GLTFObjectModelProperty

Part of the export process. Allows GLTFDocumentExtension classes to provide mappings for properties of nodes in the Godot scene tree, to JSON pointers to glTF properties, as defined by the glTF object model. Returns a [GLTFObjectModelProperty] instance that defines how the property should be mapped. If your extension can't handle the property, return null or an instance without any JSON pointers (see [method GLTFObjectModelProperty.has_json_pointers]). You should use [method GLTFObjectModelProperty.set_types] to set the types, and set the JSON pointer(s) using the [member GLTFObjectModelProperty.json_pointers] property. The parameters provide context for the property, including the NodePath, the Godot node, the GLTF node index, and the target object. The [param target_object] will be equal to [param godot_node] if no sub-object can be found, otherwise it will point to a sub-object. For example, if the path is ^"A/B/C/MeshInstance3D:mesh:surface_0/material:emission_intensity", it will get the node, then the mesh, and then the material, so [param target_object] will be the [Material] resource, and [param target_depth] will be 2 because 2 levels were traversed to get to the target.

fn (GLTFDocumentExtension) gd_get_saveable_image_formats #

fn (s &GLTFDocumentExtension) gd_get_saveable_image_formats() PackedStringArray

Part of the export process. This method is run after [method _convert_scene_node] and before [method _export_node]. Returns an array of the image formats that can be saved/exported by this extension. This extension will only be selected as the image exporter if the [GLTFDocument]'s [member GLTFDocument.image_format] is in this array. If this [GLTFDocumentExtension] is selected as the image exporter, one of the [method _save_image_at_path] or [method _serialize_image_to_bytes] methods will run next, otherwise [method _export_node] will run next. If the format name contains "Lossy", the lossy quality slider will be displayed.

fn (GLTFDocumentExtension) gd_serialize_image_to_bytes #

fn (s &GLTFDocumentExtension) gd_serialize_image_to_bytes(state GLTFState, image Image, image_dict Dictionary, image_format string, lossy_quality f64) PackedByteArray

Part of the export process. This method is run after [method _get_saveable_image_formats] and before [method _serialize_texture_json]. This method is run when embedding images in the glTF file. When images are saved separately, [method _save_image_at_path] runs instead. Note that these methods only run when this [GLTFDocumentExtension] is selected as the image exporter. This method must set the image MIME type in the [param image_dict] with the "mimeType" key. For example, for a PNG image, it would be set to "image/png". The return value must be a [PackedByteArray] containing the image data.

fn (GLTFDocumentExtension) gd_save_image_at_path #

fn (s &GLTFDocumentExtension) gd_save_image_at_path(state GLTFState, image Image, file_path string, image_format string, lossy_quality f64) GDError

Part of the export process. This method is run after [method _get_saveable_image_formats] and before [method _serialize_texture_json]. This method is run when saving images separately from the glTF file. When images are embedded, [method _serialize_image_to_bytes] runs instead. Note that these methods only run when this [GLTFDocumentExtension] is selected as the image exporter.

fn (GLTFDocumentExtension) gd_serialize_texture_json #

fn (s &GLTFDocumentExtension) gd_serialize_texture_json(state GLTFState, texture_json Dictionary, gltf_texture GLTFTexture, image_format string) GDError

Part of the export process. This method is run after [method _save_image_at_path] or [method _serialize_image_to_bytes], and before [method _export_node]. Note that this method only runs when this [GLTFDocumentExtension] is selected as the image exporter. This method can be used to set up the extensions for the texture JSON by editing [param texture_json]. The extension must also be added as used extension with [method GLTFState.add_used_extension], be sure to set required to true if you are not providing a fallback.

fn (GLTFDocumentExtension) gd_export_node #

fn (s &GLTFDocumentExtension) gd_export_node(state GLTFState, gltf_node GLTFNode, json Dictionary, node Node) GDError

Part of the export process. This method is run after [method _get_saveable_image_formats] and before [method _export_post]. If this [GLTFDocumentExtension] is used for exporting images, this runs after [method _serialize_texture_json]. This method can be used to modify the final JSON of each node. Data should be primarily stored in [param gltf_node] prior to serializing the JSON, but the original Godot [Node] is also provided if available. [param node] may be null if not available, such as when exporting glTF data not generated from a Godot scene.

fn (GLTFDocumentExtension) gd_export_post #

fn (s &GLTFDocumentExtension) gd_export_post(state GLTFState) GDError

Part of the export process. This method is run last, after all other parts of the export process. This method can be used to modify the final JSON of the generated glTF file.

struct GLTFDocumentExtensionConvertImporterMesh #

struct GLTFDocumentExtensionConvertImporterMesh {
	GLTFDocumentExtension
}

fn (GLTFDocumentExtensionConvertImporterMesh) to_variant #

fn (s &GLTFDocumentExtensionConvertImporterMesh) to_variant() Variant

fn (GLTFDocumentExtensionConvertImporterMesh) from_variant #

fn (mut s GLTFDocumentExtensionConvertImporterMesh) from_variant(variant &Variant)

struct GLTFDocument_append_from_buffer_Cfg #

@[params]
struct GLTFDocument_append_from_buffer_Cfg {
pub:
	flags i64
}

Optional parameters for GLTFDocument#append_from_buffer

struct GLTFDocument_append_from_file_Cfg #

@[params]
struct GLTFDocument_append_from_file_Cfg {
pub:
	flags     i64
	base_path string
}

Optional parameters for GLTFDocument#append_from_file

struct GLTFDocument_append_from_scene_Cfg #

@[params]
struct GLTFDocument_append_from_scene_Cfg {
pub:
	flags i64
}

Optional parameters for GLTFDocument#append_from_scene

struct GLTFDocument_generate_scene_Cfg #

@[params]
struct GLTFDocument_generate_scene_Cfg {
pub:
	bake_fps                f64 = 30
	trimming                bool
	remove_immutable_tracks bool
}

Optional parameters for GLTFDocument#generate_scene

struct GLTFDocument_register_gltf_document_extension_Cfg #

@[params]
struct GLTFDocument_register_gltf_document_extension_Cfg {
pub:
	first_priority bool
}

Optional parameters for GLTFDocument#register_gltf_document_extension

struct GLTFLight #

struct GLTFLight {
	Resource
}

Represents a glTF light.

fn (GLTFLight) to_variant #

fn (s &GLTFLight) to_variant() Variant

fn (GLTFLight) from_variant #

fn (mut s GLTFLight) from_variant(variant &Variant)

fn (GLTFLight) to_node #

fn (s &GLTFLight) to_node() Light3D

Converts this GLTFLight instance into a Godot [Light3D] node.

fn (GLTFLight) to_dictionary #

fn (s &GLTFLight) to_dictionary() Dictionary

Serializes this GLTFLight instance into a [Dictionary].

fn (GLTFLight) get_color #

fn (s &GLTFLight) get_color() Color

fn (GLTFLight) set_color #

fn (s &GLTFLight) set_color(color Color)

fn (GLTFLight) get_intensity #

fn (s &GLTFLight) get_intensity() f64

fn (GLTFLight) set_intensity #

fn (s &GLTFLight) set_intensity(intensity f64)

fn (GLTFLight) get_light_type #

fn (s &GLTFLight) get_light_type() string

fn (GLTFLight) set_light_type #

fn (s &GLTFLight) set_light_type(light_type string)

fn (GLTFLight) get_range #

fn (s &GLTFLight) get_range() f64

fn (GLTFLight) set_range #

fn (s &GLTFLight) set_range(range f64)

fn (GLTFLight) get_inner_cone_angle #

fn (s &GLTFLight) get_inner_cone_angle() f64

fn (GLTFLight) set_inner_cone_angle #

fn (s &GLTFLight) set_inner_cone_angle(inner_cone_angle f64)

fn (GLTFLight) get_outer_cone_angle #

fn (s &GLTFLight) get_outer_cone_angle() f64

fn (GLTFLight) set_outer_cone_angle #

fn (s &GLTFLight) set_outer_cone_angle(outer_cone_angle f64)

fn (GLTFLight) get_additional_data #

fn (s &GLTFLight) get_additional_data(extension_name string) Variant

fn (GLTFLight) set_additional_data #

fn (s &GLTFLight) set_additional_data(extension_name string, additional_data_ ToVariant)

struct GLTFMesh #

struct GLTFMesh {
	Resource
}

GLTFMesh represents a glTF mesh.

fn (GLTFMesh) to_variant #

fn (s &GLTFMesh) to_variant() Variant

fn (GLTFMesh) from_variant #

fn (mut s GLTFMesh) from_variant(variant &Variant)

fn (GLTFMesh) get_original_name #

fn (s &GLTFMesh) get_original_name() string

fn (GLTFMesh) set_original_name #

fn (s &GLTFMesh) set_original_name(original_name string)

fn (GLTFMesh) get_mesh #

fn (s &GLTFMesh) get_mesh() ImporterMesh

fn (GLTFMesh) set_mesh #

fn (s &GLTFMesh) set_mesh(mesh ImporterMesh)

fn (GLTFMesh) get_blend_weights #

fn (s &GLTFMesh) get_blend_weights() PackedFloat32Array

fn (GLTFMesh) set_blend_weights #

fn (s &GLTFMesh) set_blend_weights(blend_weights PackedFloat32Array)

fn (GLTFMesh) get_instance_materials #

fn (s &GLTFMesh) get_instance_materials() Array

fn (GLTFMesh) set_instance_materials #

fn (s &GLTFMesh) set_instance_materials(instance_materials Array)

fn (GLTFMesh) get_additional_data #

fn (s &GLTFMesh) get_additional_data(extension_name string) Variant

Gets additional arbitrary data in this [GLTFMesh] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.

fn (GLTFMesh) set_additional_data #

fn (s &GLTFMesh) set_additional_data(extension_name string, additional_data_ ToVariant)

Sets additional arbitrary data in this [GLTFMesh] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.

struct GLTFNode #

struct GLTFNode {
	Resource
}

glTF node class.

fn (GLTFNode) to_variant #

fn (s &GLTFNode) to_variant() Variant

fn (GLTFNode) from_variant #

fn (mut s GLTFNode) from_variant(variant &Variant)

fn (GLTFNode) get_original_name #

fn (s &GLTFNode) get_original_name() string

fn (GLTFNode) set_original_name #

fn (s &GLTFNode) set_original_name(original_name string)

fn (GLTFNode) get_parent #

fn (s &GLTFNode) get_parent() i64

fn (GLTFNode) set_parent #

fn (s &GLTFNode) set_parent(parent i64)

fn (GLTFNode) get_height #

fn (s &GLTFNode) get_height() i64

fn (GLTFNode) set_height #

fn (s &GLTFNode) set_height(height i64)

fn (GLTFNode) get_xform #

fn (s &GLTFNode) get_xform() Transform3D

fn (GLTFNode) set_xform #

fn (s &GLTFNode) set_xform(xform Transform3D)

fn (GLTFNode) get_mesh #

fn (s &GLTFNode) get_mesh() i64

fn (GLTFNode) set_mesh #

fn (s &GLTFNode) set_mesh(mesh i64)

fn (GLTFNode) get_camera #

fn (s &GLTFNode) get_camera() i64

fn (GLTFNode) set_camera #

fn (s &GLTFNode) set_camera(camera i64)

fn (GLTFNode) get_skin #

fn (s &GLTFNode) get_skin() i64

fn (GLTFNode) set_skin #

fn (s &GLTFNode) set_skin(skin i64)

fn (GLTFNode) get_skeleton #

fn (s &GLTFNode) get_skeleton() i64

fn (GLTFNode) set_skeleton #

fn (s &GLTFNode) set_skeleton(skeleton i64)

fn (GLTFNode) get_position #

fn (s &GLTFNode) get_position() Vector3

fn (GLTFNode) set_position #

fn (s &GLTFNode) set_position(position Vector3)

fn (GLTFNode) get_rotation #

fn (s &GLTFNode) get_rotation() Quaternion

fn (GLTFNode) set_rotation #

fn (s &GLTFNode) set_rotation(rotation Quaternion)

fn (GLTFNode) get_scale #

fn (s &GLTFNode) get_scale() Vector3

fn (GLTFNode) set_scale #

fn (s &GLTFNode) set_scale(scale Vector3)

fn (GLTFNode) get_children #

fn (s &GLTFNode) get_children() PackedInt32Array

fn (GLTFNode) set_children #

fn (s &GLTFNode) set_children(children PackedInt32Array)

fn (GLTFNode) append_child_index #

fn (s &GLTFNode) append_child_index(child_index i64)

Appends the given child node index to the [member children] array.

fn (GLTFNode) get_light #

fn (s &GLTFNode) get_light() i64

fn (GLTFNode) set_light #

fn (s &GLTFNode) set_light(light i64)

fn (GLTFNode) get_visible #

fn (s &GLTFNode) get_visible() bool

fn (GLTFNode) set_visible #

fn (s &GLTFNode) set_visible(visible bool)

fn (GLTFNode) get_additional_data #

fn (s &GLTFNode) get_additional_data(extension_name string) Variant

Gets additional arbitrary data in this [GLTFNode] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.

fn (GLTFNode) set_additional_data #

fn (s &GLTFNode) set_additional_data(extension_name string, additional_data_ ToVariant)

Sets additional arbitrary data in this [GLTFNode] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.

fn (GLTFNode) get_scene_node_path #

fn (s &GLTFNode) get_scene_node_path(gltf_state GLTFState, cfg GLTFNode_get_scene_node_path_Cfg) NodePath

Returns the [NodePath] that this GLTF node will have in the Godot scene tree after being imported. This is useful when importing glTF object model pointers with [GLTFObjectModelProperty], for handling extensions such as KHR_animation_pointer or KHR_interactivity. If [param handle_skeletons] is true, paths to skeleton bone glTF nodes will be resolved properly. For example, a path that would be ^"A/B/C/Bone1/Bone2/Bone3" if false will become ^"A/B/C/Skeleton3D:Bone3".

struct GLTFNode_get_scene_node_path_Cfg #

@[params]
struct GLTFNode_get_scene_node_path_Cfg {
pub:
	handle_skeletons bool
}

Optional parameters for GLTFNode#get_scene_node_path

struct GLTFObjectModelProperty #

struct GLTFObjectModelProperty {
	RefCounted
}

Describes how to access a property as defined in the glTF object model.

fn (GLTFObjectModelProperty) to_variant #

fn (s &GLTFObjectModelProperty) to_variant() Variant

fn (GLTFObjectModelProperty) from_variant #

fn (mut s GLTFObjectModelProperty) from_variant(variant &Variant)

fn (GLTFObjectModelProperty) append_node_path #

fn (s &GLTFObjectModelProperty) append_node_path(node_path NodePath)

Appends a [NodePath] to [member node_paths]. This can be used by [GLTFDocumentExtension] classes to define how a glTF object model property maps to a Godot property, or multiple Godot properties. Prefer using [method append_path_to_property] for simple cases. Be sure to also call [method set_types] once (the order does not matter).

fn (GLTFObjectModelProperty) append_path_to_property #

fn (s &GLTFObjectModelProperty) append_path_to_property(node_path NodePath, prop_name string)

High-level wrapper over [method append_node_path] that handles the most common cases. It constructs a new [NodePath] using [param node_path] as a base and appends [param prop_name] to the subpath. Be sure to also call [method set_types] once (the order does not matter).

fn (GLTFObjectModelProperty) get_accessor_type #

fn (s &GLTFObjectModelProperty) get_accessor_type() GLTFAccessorType

The GLTF accessor type associated with this property's [member object_model_type]. See [member GLTFAccessor.accessor_type] for possible values, and see [enum GLTFObjectModelType] for how the object model type maps to accessor types.

fn (GLTFObjectModelProperty) get_gltf_to_godot_expression #

fn (s &GLTFObjectModelProperty) get_gltf_to_godot_expression() Expression

fn (GLTFObjectModelProperty) set_gltf_to_godot_expression #

fn (s &GLTFObjectModelProperty) set_gltf_to_godot_expression(gltf_to_godot_expr Expression)

fn (GLTFObjectModelProperty) get_godot_to_gltf_expression #

fn (s &GLTFObjectModelProperty) get_godot_to_gltf_expression() Expression

fn (GLTFObjectModelProperty) set_godot_to_gltf_expression #

fn (s &GLTFObjectModelProperty) set_godot_to_gltf_expression(godot_to_gltf_expr Expression)

fn (GLTFObjectModelProperty) get_node_paths #

fn (s &GLTFObjectModelProperty) get_node_paths() Array

fn (GLTFObjectModelProperty) has_node_paths #

fn (s &GLTFObjectModelProperty) has_node_paths() bool

Returns true if [member node_paths] is not empty. This is used during import to determine if a [GLTFObjectModelProperty] can handle converting a glTF object model property to a Godot property.

fn (GLTFObjectModelProperty) set_node_paths #

fn (s &GLTFObjectModelProperty) set_node_paths(node_paths Array)

fn (GLTFObjectModelProperty) get_object_model_type #

fn (s &GLTFObjectModelProperty) get_object_model_type() GLTFObjectModelPropertyGLTFObjectModelType

fn (GLTFObjectModelProperty) set_object_model_type #

fn (s &GLTFObjectModelProperty) set_object_model_type(gd_type GLTFObjectModelPropertyGLTFObjectModelType)

fn (GLTFObjectModelProperty) get_json_pointers #

fn (s &GLTFObjectModelProperty) get_json_pointers() Array

fn (GLTFObjectModelProperty) has_json_pointers #

fn (s &GLTFObjectModelProperty) has_json_pointers() bool

Returns true if [member json_pointers] is not empty. This is used during export to determine if a [GLTFObjectModelProperty] can handle converting a Godot property to a glTF object model property.

fn (GLTFObjectModelProperty) set_json_pointers #

fn (s &GLTFObjectModelProperty) set_json_pointers(json_pointers Array)

fn (GLTFObjectModelProperty) get_variant_type #

fn (s &GLTFObjectModelProperty) get_variant_type() VariantType

fn (GLTFObjectModelProperty) set_variant_type #

fn (s &GLTFObjectModelProperty) set_variant_type(variant_type VariantType)

fn (GLTFObjectModelProperty) set_types #

fn (s &GLTFObjectModelProperty) set_types(variant_type VariantType, obj_model_type GLTFObjectModelPropertyGLTFObjectModelType)

Sets the [member variant_type] and [member object_model_type] properties. This is a convenience method to set both properties at once, since they are almost always known at the same time. This method should be called once. Calling it again with the same values will have no effect.

struct GLTFPhysicsBody #

struct GLTFPhysicsBody {
	Resource
}

Represents a glTF physics body.

fn (GLTFPhysicsBody) to_variant #

fn (s &GLTFPhysicsBody) to_variant() Variant

fn (GLTFPhysicsBody) from_variant #

fn (mut s GLTFPhysicsBody) from_variant(variant &Variant)

fn (GLTFPhysicsBody) to_node #

fn (s &GLTFPhysicsBody) to_node() CollisionObject3D

Converts this GLTFPhysicsBody instance into a Godot [CollisionObject3D] node.

fn (GLTFPhysicsBody) to_dictionary #

fn (s &GLTFPhysicsBody) to_dictionary() Dictionary

Serializes this GLTFPhysicsBody instance into a [Dictionary]. It will be in the format expected by the OMI_physics_body glTF extension.

fn (GLTFPhysicsBody) get_body_type #

fn (s &GLTFPhysicsBody) get_body_type() string

fn (GLTFPhysicsBody) set_body_type #

fn (s &GLTFPhysicsBody) set_body_type(body_type string)

fn (GLTFPhysicsBody) get_mass #

fn (s &GLTFPhysicsBody) get_mass() f64

fn (GLTFPhysicsBody) set_mass #

fn (s &GLTFPhysicsBody) set_mass(mass f64)

fn (GLTFPhysicsBody) get_linear_velocity #

fn (s &GLTFPhysicsBody) get_linear_velocity() Vector3

fn (GLTFPhysicsBody) set_linear_velocity #

fn (s &GLTFPhysicsBody) set_linear_velocity(linear_velocity Vector3)

fn (GLTFPhysicsBody) get_angular_velocity #

fn (s &GLTFPhysicsBody) get_angular_velocity() Vector3

fn (GLTFPhysicsBody) set_angular_velocity #

fn (s &GLTFPhysicsBody) set_angular_velocity(angular_velocity Vector3)

fn (GLTFPhysicsBody) get_center_of_mass #

fn (s &GLTFPhysicsBody) get_center_of_mass() Vector3

fn (GLTFPhysicsBody) set_center_of_mass #

fn (s &GLTFPhysicsBody) set_center_of_mass(center_of_mass Vector3)

fn (GLTFPhysicsBody) get_inertia_diagonal #

fn (s &GLTFPhysicsBody) get_inertia_diagonal() Vector3

fn (GLTFPhysicsBody) set_inertia_diagonal #

fn (s &GLTFPhysicsBody) set_inertia_diagonal(inertia_diagonal Vector3)

fn (GLTFPhysicsBody) get_inertia_orientation #

fn (s &GLTFPhysicsBody) get_inertia_orientation() Quaternion

fn (GLTFPhysicsBody) set_inertia_orientation #

fn (s &GLTFPhysicsBody) set_inertia_orientation(inertia_orientation Quaternion)

fn (GLTFPhysicsBody) get_inertia_tensor #

fn (s &GLTFPhysicsBody) get_inertia_tensor() Basis

fn (GLTFPhysicsBody) set_inertia_tensor #

fn (s &GLTFPhysicsBody) set_inertia_tensor(inertia_tensor Basis)

struct GLTFPhysicsShape #

struct GLTFPhysicsShape {
	Resource
}

Represents a glTF physics shape.

fn (GLTFPhysicsShape) to_variant #

fn (s &GLTFPhysicsShape) to_variant() Variant

fn (GLTFPhysicsShape) from_variant #

fn (mut s GLTFPhysicsShape) from_variant(variant &Variant)

fn (GLTFPhysicsShape) to_node #

fn (s &GLTFPhysicsShape) to_node(cfg GLTFPhysicsShape_to_node_Cfg) CollisionShape3D

Converts this GLTFPhysicsShape instance into a Godot [CollisionShape3D] node.

fn (GLTFPhysicsShape) to_resource #

fn (s &GLTFPhysicsShape) to_resource(cfg GLTFPhysicsShape_to_resource_Cfg) Shape3D

Converts this GLTFPhysicsShape instance into a Godot [Shape3D] resource.

fn (GLTFPhysicsShape) to_dictionary #

fn (s &GLTFPhysicsShape) to_dictionary() Dictionary

Serializes this GLTFPhysicsShape instance into a [Dictionary] in the format defined by OMI_physics_shape.

fn (GLTFPhysicsShape) get_shape_type #

fn (s &GLTFPhysicsShape) get_shape_type() string

fn (GLTFPhysicsShape) set_shape_type #

fn (s &GLTFPhysicsShape) set_shape_type(shape_type string)

fn (GLTFPhysicsShape) get_size #

fn (s &GLTFPhysicsShape) get_size() Vector3

fn (GLTFPhysicsShape) set_size #

fn (s &GLTFPhysicsShape) set_size(size Vector3)

fn (GLTFPhysicsShape) get_radius #

fn (s &GLTFPhysicsShape) get_radius() f64

fn (GLTFPhysicsShape) set_radius #

fn (s &GLTFPhysicsShape) set_radius(radius f64)

fn (GLTFPhysicsShape) get_height #

fn (s &GLTFPhysicsShape) get_height() f64

fn (GLTFPhysicsShape) set_height #

fn (s &GLTFPhysicsShape) set_height(height f64)

fn (GLTFPhysicsShape) get_is_trigger #

fn (s &GLTFPhysicsShape) get_is_trigger() bool

fn (GLTFPhysicsShape) set_is_trigger #

fn (s &GLTFPhysicsShape) set_is_trigger(is_trigger bool)

fn (GLTFPhysicsShape) get_mesh_index #

fn (s &GLTFPhysicsShape) get_mesh_index() i64

fn (GLTFPhysicsShape) set_mesh_index #

fn (s &GLTFPhysicsShape) set_mesh_index(mesh_index i64)

fn (GLTFPhysicsShape) get_importer_mesh #

fn (s &GLTFPhysicsShape) get_importer_mesh() ImporterMesh

fn (GLTFPhysicsShape) set_importer_mesh #

fn (s &GLTFPhysicsShape) set_importer_mesh(importer_mesh ImporterMesh)

struct GLTFPhysicsShape_to_node_Cfg #

@[params]
struct GLTFPhysicsShape_to_node_Cfg {
pub:
	cache_shapes bool
}

Optional parameters for GLTFPhysicsShape#to_node

struct GLTFPhysicsShape_to_resource_Cfg #

@[params]
struct GLTFPhysicsShape_to_resource_Cfg {
pub:
	cache_shapes bool
}

Optional parameters for GLTFPhysicsShape#to_resource

struct GLTFSkeleton #

struct GLTFSkeleton {
	Resource
}

fn (GLTFSkeleton) to_variant #

fn (s &GLTFSkeleton) to_variant() Variant

fn (GLTFSkeleton) from_variant #

fn (mut s GLTFSkeleton) from_variant(variant &Variant)

fn (GLTFSkeleton) get_joints #

fn (s &GLTFSkeleton) get_joints() PackedInt32Array

fn (GLTFSkeleton) set_joints #

fn (s &GLTFSkeleton) set_joints(joints PackedInt32Array)

fn (GLTFSkeleton) get_roots #

fn (s &GLTFSkeleton) get_roots() PackedInt32Array

fn (GLTFSkeleton) set_roots #

fn (s &GLTFSkeleton) set_roots(roots PackedInt32Array)

fn (GLTFSkeleton) get_godot_skeleton #

fn (s &GLTFSkeleton) get_godot_skeleton() Skeleton3D

fn (GLTFSkeleton) get_unique_names #

fn (s &GLTFSkeleton) get_unique_names() Array

fn (GLTFSkeleton) set_unique_names #

fn (s &GLTFSkeleton) set_unique_names(unique_names Array)

fn (GLTFSkeleton) get_godot_bone_node #

fn (s &GLTFSkeleton) get_godot_bone_node() Dictionary

Returns a [Dictionary] that maps skeleton bone indices to the indices of glTF nodes. This property is unused during import, and only set during export. In a glTF file, a bone is a node, so Godot converts skeleton bones to glTF nodes.

fn (GLTFSkeleton) set_godot_bone_node #

fn (s &GLTFSkeleton) set_godot_bone_node(godot_bone_node Dictionary)

Sets a [Dictionary] that maps skeleton bone indices to the indices of glTF nodes. This property is unused during import, and only set during export. In a glTF file, a bone is a node, so Godot converts skeleton bones to glTF nodes.

fn (GLTFSkeleton) get_bone_attachment_count #

fn (s &GLTFSkeleton) get_bone_attachment_count() i64

fn (GLTFSkeleton) get_bone_attachment #

fn (s &GLTFSkeleton) get_bone_attachment(idx i64) BoneAttachment3D

struct GLTFSkin #

struct GLTFSkin {
	Resource
}

fn (GLTFSkin) to_variant #

fn (s &GLTFSkin) to_variant() Variant

fn (GLTFSkin) from_variant #

fn (mut s GLTFSkin) from_variant(variant &Variant)

fn (GLTFSkin) get_skin_root #

fn (s &GLTFSkin) get_skin_root() i64

fn (GLTFSkin) set_skin_root #

fn (s &GLTFSkin) set_skin_root(skin_root i64)

fn (GLTFSkin) get_joints_original #

fn (s &GLTFSkin) get_joints_original() PackedInt32Array

fn (GLTFSkin) set_joints_original #

fn (s &GLTFSkin) set_joints_original(joints_original PackedInt32Array)

fn (GLTFSkin) get_inverse_binds #

fn (s &GLTFSkin) get_inverse_binds() Array

fn (GLTFSkin) set_inverse_binds #

fn (s &GLTFSkin) set_inverse_binds(inverse_binds Array)

fn (GLTFSkin) get_joints #

fn (s &GLTFSkin) get_joints() PackedInt32Array

fn (GLTFSkin) set_joints #

fn (s &GLTFSkin) set_joints(joints PackedInt32Array)

fn (GLTFSkin) get_non_joints #

fn (s &GLTFSkin) get_non_joints() PackedInt32Array

fn (GLTFSkin) set_non_joints #

fn (s &GLTFSkin) set_non_joints(non_joints PackedInt32Array)

fn (GLTFSkin) get_roots #

fn (s &GLTFSkin) get_roots() PackedInt32Array

fn (GLTFSkin) set_roots #

fn (s &GLTFSkin) set_roots(roots PackedInt32Array)

fn (GLTFSkin) get_skeleton #

fn (s &GLTFSkin) get_skeleton() i64

fn (GLTFSkin) set_skeleton #

fn (s &GLTFSkin) set_skeleton(skeleton i64)

fn (GLTFSkin) get_joint_i_to_bone_i #

fn (s &GLTFSkin) get_joint_i_to_bone_i() Dictionary

fn (GLTFSkin) set_joint_i_to_bone_i #

fn (s &GLTFSkin) set_joint_i_to_bone_i(joint_i_to_bone_i Dictionary)

fn (GLTFSkin) get_joint_i_to_name #

fn (s &GLTFSkin) get_joint_i_to_name() Dictionary

fn (GLTFSkin) set_joint_i_to_name #

fn (s &GLTFSkin) set_joint_i_to_name(joint_i_to_name Dictionary)

fn (GLTFSkin) get_godot_skin #

fn (s &GLTFSkin) get_godot_skin() Skin

fn (GLTFSkin) set_godot_skin #

fn (s &GLTFSkin) set_godot_skin(godot_skin Skin)

struct GLTFSpecGloss #

struct GLTFSpecGloss {
	Resource
}

Archived glTF extension for specular/glossy materials.

fn (GLTFSpecGloss) to_variant #

fn (s &GLTFSpecGloss) to_variant() Variant

fn (GLTFSpecGloss) from_variant #

fn (mut s GLTFSpecGloss) from_variant(variant &Variant)

fn (GLTFSpecGloss) get_diffuse_img #

fn (s &GLTFSpecGloss) get_diffuse_img() Image

fn (GLTFSpecGloss) set_diffuse_img #

fn (s &GLTFSpecGloss) set_diffuse_img(diffuse_img Image)

fn (GLTFSpecGloss) get_diffuse_factor #

fn (s &GLTFSpecGloss) get_diffuse_factor() Color

fn (GLTFSpecGloss) set_diffuse_factor #

fn (s &GLTFSpecGloss) set_diffuse_factor(diffuse_factor Color)

fn (GLTFSpecGloss) get_gloss_factor #

fn (s &GLTFSpecGloss) get_gloss_factor() f64

fn (GLTFSpecGloss) set_gloss_factor #

fn (s &GLTFSpecGloss) set_gloss_factor(gloss_factor f64)

fn (GLTFSpecGloss) get_specular_factor #

fn (s &GLTFSpecGloss) get_specular_factor() Color

fn (GLTFSpecGloss) set_specular_factor #

fn (s &GLTFSpecGloss) set_specular_factor(specular_factor Color)

fn (GLTFSpecGloss) get_spec_gloss_img #

fn (s &GLTFSpecGloss) get_spec_gloss_img() Image

fn (GLTFSpecGloss) set_spec_gloss_img #

fn (s &GLTFSpecGloss) set_spec_gloss_img(spec_gloss_img Image)

struct GLTFState #

struct GLTFState {
	Resource
}

Represents all data of a glTF file.

fn (GLTFState) to_variant #

fn (s &GLTFState) to_variant() Variant

fn (GLTFState) from_variant #

fn (mut s GLTFState) from_variant(variant &Variant)

fn (GLTFState) add_used_extension #

fn (s &GLTFState) add_used_extension(extension_name string, required bool)

Appends an extension to the list of extensions used by this glTF file during serialization. If [param required] is true, the extension will also be added to the list of required extensions. Do not run this in [method GLTFDocumentExtension._export_post], as that stage is too late to add extensions. The final list is sorted alphabetically.

fn (GLTFState) append_data_to_buffers #

fn (s &GLTFState) append_data_to_buffers(data PackedByteArray, deduplication bool) i64

Appends the given byte array [param data] to the buffers and creates a [GLTFBufferView] for it. The index of the destination [GLTFBufferView] is returned. If [param deduplication] is true, the buffers are first searched for duplicate data, otherwise new bytes are always appended.

fn (GLTFState) append_gltf_node #

fn (s &GLTFState) append_gltf_node(gltf_node GLTFNode, godot_scene_node Node, parent_node_index i64) i64

Appends the given [GLTFNode] to the state, and returns its new index. This can be used to export one Godot node as multiple glTF nodes, or inject new glTF nodes at import time. On import, this must be called before [method GLTFDocumentExtension._generate_scene_node] finishes for the parent node. On export, this must be called before [method GLTFDocumentExtension._export_node] runs for the parent node. The [param godot_scene_node] parameter is the Godot scene node that corresponds to this glTF node. This is highly recommended to be set to a valid node, but may be null if there is no corresponding Godot scene node. One Godot scene node may be used for multiple glTF nodes, so if exporting multiple glTF nodes for one Godot scene node, use the same Godot scene node for each. The [param parent_node_index] parameter is the index of the parent [GLTFNode] in the state. If -1, the node will be a root node, otherwise the new node will be added to the parent's list of children. The index will also be written to the [member GLTFNode.parent] property of the new node.

fn (GLTFState) get_json #

fn (s &GLTFState) get_json() Dictionary

fn (GLTFState) set_json #

fn (s &GLTFState) set_json(json Dictionary)

fn (GLTFState) get_major_version #

fn (s &GLTFState) get_major_version() i64

fn (GLTFState) set_major_version #

fn (s &GLTFState) set_major_version(major_version i64)

fn (GLTFState) get_minor_version #

fn (s &GLTFState) get_minor_version() i64

fn (GLTFState) set_minor_version #

fn (s &GLTFState) set_minor_version(minor_version i64)

fn (GLTFState) get_glb_data #

fn (s &GLTFState) get_glb_data() PackedByteArray

fn (GLTFState) set_glb_data #

fn (s &GLTFState) set_glb_data(glb_data PackedByteArray)

fn (GLTFState) get_use_named_skin_binds #

fn (s &GLTFState) get_use_named_skin_binds() bool

fn (GLTFState) set_use_named_skin_binds #

fn (s &GLTFState) set_use_named_skin_binds(use_named_skin_binds bool)

fn (GLTFState) get_nodes #

fn (s &GLTFState) get_nodes() Array

Returns an array of all [GLTFNode]s in the glTF file. These are the nodes that [member GLTFNode.children] and [member root_nodes] refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes.

fn (GLTFState) set_nodes #

fn (s &GLTFState) set_nodes(nodes Array)

Sets the [GLTFNode]s in the state. These are the nodes that [member GLTFNode.children] and [member root_nodes] refer to. Some of the nodes set here may not be generated in the Godot scene, or may generate multiple Godot scene nodes.

fn (GLTFState) get_buffers #

fn (s &GLTFState) get_buffers() Array

fn (GLTFState) set_buffers #

fn (s &GLTFState) set_buffers(buffers Array)

fn (GLTFState) get_buffer_views #

fn (s &GLTFState) get_buffer_views() Array

fn (GLTFState) set_buffer_views #

fn (s &GLTFState) set_buffer_views(buffer_views Array)

fn (GLTFState) get_accessors #

fn (s &GLTFState) get_accessors() Array

fn (GLTFState) set_accessors #

fn (s &GLTFState) set_accessors(accessors Array)

fn (GLTFState) get_meshes #

fn (s &GLTFState) get_meshes() Array

Returns an array of all [GLTFMesh]es in the glTF file. These are the meshes that the [member GLTFNode.mesh] index refers to.

fn (GLTFState) set_meshes #

fn (s &GLTFState) set_meshes(meshes Array)

Sets the [GLTFMesh]es in the state. These are the meshes that the [member GLTFNode.mesh] index refers to.

fn (GLTFState) get_animation_players_count #

fn (s &GLTFState) get_animation_players_count(idx i64) i64

Returns the number of [AnimationPlayer] nodes in this [GLTFState]. These nodes are only used during the export process when converting Godot [AnimationPlayer] nodes to glTF animations.

fn (GLTFState) get_animation_player #

fn (s &GLTFState) get_animation_player(idx i64) AnimationPlayer

Returns the [AnimationPlayer] node with the given index. These nodes are only used during the export process when converting Godot [AnimationPlayer] nodes to glTF animations.

fn (GLTFState) get_materials #

fn (s &GLTFState) get_materials() Array

fn (GLTFState) set_materials #

fn (s &GLTFState) set_materials(materials Array)

fn (GLTFState) get_scene_name #

fn (s &GLTFState) get_scene_name() string

fn (GLTFState) set_scene_name #

fn (s &GLTFState) set_scene_name(scene_name string)

fn (GLTFState) get_base_path #

fn (s &GLTFState) get_base_path() string

fn (GLTFState) set_base_path #

fn (s &GLTFState) set_base_path(base_path string)

fn (GLTFState) get_filename #

fn (s &GLTFState) get_filename() string

fn (GLTFState) set_filename #

fn (s &GLTFState) set_filename(filename string)

fn (GLTFState) get_root_nodes #

fn (s &GLTFState) get_root_nodes() PackedInt32Array

fn (GLTFState) set_root_nodes #

fn (s &GLTFState) set_root_nodes(root_nodes PackedInt32Array)

fn (GLTFState) get_textures #

fn (s &GLTFState) get_textures() Array

fn (GLTFState) set_textures #

fn (s &GLTFState) set_textures(textures Array)

fn (GLTFState) get_texture_samplers #

fn (s &GLTFState) get_texture_samplers() Array

Retrieves the array of texture samplers that are used by the textures contained in the glTF.

fn (GLTFState) set_texture_samplers #

fn (s &GLTFState) set_texture_samplers(texture_samplers Array)

Sets the array of texture samplers that are used by the textures contained in the glTF.

fn (GLTFState) get_images #

fn (s &GLTFState) get_images() Array

Gets the images of the glTF file as an array of [Texture2D]s. These are the images that the [member GLTFTexture.src_image] index refers to.

fn (GLTFState) set_images #

fn (s &GLTFState) set_images(images Array)

Sets the images in the state stored as an array of [Texture2D]s. This can be used during export. These are the images that the [member GLTFTexture.src_image] index refers to.

fn (GLTFState) get_skins #

fn (s &GLTFState) get_skins() Array

Returns an array of all [GLTFSkin]s in the glTF file. These are the skins that the [member GLTFNode.skin] index refers to.

fn (GLTFState) set_skins #

fn (s &GLTFState) set_skins(skins Array)

Sets the [GLTFSkin]s in the state. These are the skins that the [member GLTFNode.skin] index refers to.

fn (GLTFState) get_cameras #

fn (s &GLTFState) get_cameras() Array

Returns an array of all [GLTFCamera]s in the glTF file. These are the cameras that the [member GLTFNode.camera] index refers to.

fn (GLTFState) set_cameras #

fn (s &GLTFState) set_cameras(cameras Array)

Sets the [GLTFCamera]s in the state. These are the cameras that the [member GLTFNode.camera] index refers to.

fn (GLTFState) get_lights #

fn (s &GLTFState) get_lights() Array

Returns an array of all [GLTFLight]s in the glTF file. These are the lights that the [member GLTFNode.light] index refers to.

fn (GLTFState) set_lights #

fn (s &GLTFState) set_lights(lights Array)

Sets the [GLTFLight]s in the state. These are the lights that the [member GLTFNode.light] index refers to.

fn (GLTFState) get_unique_names #

fn (s &GLTFState) get_unique_names() Array

Returns an array of unique node names. This is used in both the import process and export process.

fn (GLTFState) set_unique_names #

fn (s &GLTFState) set_unique_names(unique_names Array)

Sets the unique node names in the state. This is used in both the import process and export process.

fn (GLTFState) get_unique_animation_names #

fn (s &GLTFState) get_unique_animation_names() Array

Returns an array of unique animation names. This is only used during the import process.

fn (GLTFState) set_unique_animation_names #

fn (s &GLTFState) set_unique_animation_names(unique_animation_names Array)

Sets the unique animation names in the state. This is only used during the import process.

fn (GLTFState) get_skeletons #

fn (s &GLTFState) get_skeletons() Array

Returns an array of all [GLTFSkeleton]s in the glTF file. These are the skeletons that the [member GLTFNode.skeleton] index refers to.

fn (GLTFState) set_skeletons #

fn (s &GLTFState) set_skeletons(skeletons Array)

Sets the [GLTFSkeleton]s in the state. These are the skeletons that the [member GLTFNode.skeleton] index refers to.

fn (GLTFState) get_create_animations #

fn (s &GLTFState) get_create_animations() bool

fn (GLTFState) set_create_animations #

fn (s &GLTFState) set_create_animations(create_animations bool)

fn (GLTFState) get_import_as_skeleton_bones #

fn (s &GLTFState) get_import_as_skeleton_bones() bool

fn (GLTFState) set_import_as_skeleton_bones #

fn (s &GLTFState) set_import_as_skeleton_bones(import_as_skeleton_bones bool)

fn (GLTFState) get_animations #

fn (s &GLTFState) get_animations() Array

Returns an array of all [GLTFAnimation]s in the glTF file. When importing, these will be generated as animations in an [AnimationPlayer] node. When exporting, these will be generated from Godot [AnimationPlayer] nodes.

fn (GLTFState) set_animations #

fn (s &GLTFState) set_animations(animations Array)

Sets the [GLTFAnimation]s in the state. When importing, these will be generated as animations in an [AnimationPlayer] node. When exporting, these will be generated from Godot [AnimationPlayer] nodes.

fn (GLTFState) get_scene_node #

fn (s &GLTFState) get_scene_node(idx i64) Node

Returns the Godot scene node that corresponds to the same index as the [GLTFNode] it was generated from. This is the inverse of [method get_node_index]. Useful during the import process. [b]Note:[/b] Not every [GLTFNode] will have a scene node generated, and not every generated scene node will have a corresponding [GLTFNode]. If there is no scene node for this [GLTFNode] index, null is returned.

fn (GLTFState) get_node_index #

fn (s &GLTFState) get_node_index(scene_node Node) i64

Returns the index of the [GLTFNode] corresponding to this Godot scene node. This is the inverse of [method get_scene_node]. Useful during the export process. [b]Note:[/b] Not every Godot scene node will have a corresponding [GLTFNode], and not every [GLTFNode] will have a scene node generated. If there is no [GLTFNode] index for this scene node, -1 is returned.

fn (GLTFState) get_additional_data #

fn (s &GLTFState) get_additional_data(extension_name string) Variant

Gets additional arbitrary data in this [GLTFState] instance. This can be used to keep per-file state data in [GLTFDocumentExtension] classes, which is important because they are stateless. The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.

fn (GLTFState) set_additional_data #

fn (s &GLTFState) set_additional_data(extension_name string, additional_data_ ToVariant)

Sets additional arbitrary data in this [GLTFState] instance. This can be used to keep per-file state data in [GLTFDocumentExtension] classes, which is important because they are stateless. The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.

fn (GLTFState) get_handle_binary_image #

fn (s &GLTFState) get_handle_binary_image() i64

fn (GLTFState) set_handle_binary_image #

fn (s &GLTFState) set_handle_binary_image(method i64)

fn (GLTFState) set_bake_fps #

fn (s &GLTFState) set_bake_fps(value f64)

fn (GLTFState) get_bake_fps #

fn (s &GLTFState) get_bake_fps() f64

struct GLTFTexture #

struct GLTFTexture {
	Resource
}

GLTFTexture represents a texture in a glTF file.

fn (GLTFTexture) to_variant #

fn (s &GLTFTexture) to_variant() Variant

fn (GLTFTexture) from_variant #

fn (mut s GLTFTexture) from_variant(variant &Variant)

fn (GLTFTexture) get_src_image #

fn (s &GLTFTexture) get_src_image() i64

fn (GLTFTexture) set_src_image #

fn (s &GLTFTexture) set_src_image(src_image i64)

fn (GLTFTexture) get_sampler #

fn (s &GLTFTexture) get_sampler() i64

fn (GLTFTexture) set_sampler #

fn (s &GLTFTexture) set_sampler(sampler i64)

struct GLTFTextureSampler #

struct GLTFTextureSampler {
	Resource
}

Represents a glTF texture sampler

fn (GLTFTextureSampler) to_variant #

fn (s &GLTFTextureSampler) to_variant() Variant

fn (GLTFTextureSampler) from_variant #

fn (mut s GLTFTextureSampler) from_variant(variant &Variant)

fn (GLTFTextureSampler) get_mag_filter #

fn (s &GLTFTextureSampler) get_mag_filter() i64

fn (GLTFTextureSampler) set_mag_filter #

fn (s &GLTFTextureSampler) set_mag_filter(filter_mode i64)

fn (GLTFTextureSampler) get_min_filter #

fn (s &GLTFTextureSampler) get_min_filter() i64

fn (GLTFTextureSampler) set_min_filter #

fn (s &GLTFTextureSampler) set_min_filter(filter_mode i64)

fn (GLTFTextureSampler) get_wrap_s #

fn (s &GLTFTextureSampler) get_wrap_s() i64

fn (GLTFTextureSampler) set_wrap_s #

fn (s &GLTFTextureSampler) set_wrap_s(wrap_mode i64)

fn (GLTFTextureSampler) get_wrap_t #

fn (s &GLTFTextureSampler) get_wrap_t() i64

fn (GLTFTextureSampler) set_wrap_t #

fn (s &GLTFTextureSampler) set_wrap_t(wrap_mode i64)

struct GPUParticles2D #

struct GPUParticles2D {
	Node2D
}

A 2D particle emitter.

fn (GPUParticles2D) to_variant #

fn (s &GPUParticles2D) to_variant() Variant

fn (GPUParticles2D) from_variant #

fn (mut s GPUParticles2D) from_variant(variant &Variant)

fn (GPUParticles2D) set_emitting #

fn (s &GPUParticles2D) set_emitting(emitting bool)

fn (GPUParticles2D) set_amount #

fn (s &GPUParticles2D) set_amount(amount i64)

fn (GPUParticles2D) set_lifetime #

fn (s &GPUParticles2D) set_lifetime(secs f64)

fn (GPUParticles2D) set_one_shot #

fn (s &GPUParticles2D) set_one_shot(secs bool)

fn (GPUParticles2D) set_pre_process_time #

fn (s &GPUParticles2D) set_pre_process_time(secs f64)

fn (GPUParticles2D) set_explosiveness_ratio #

fn (s &GPUParticles2D) set_explosiveness_ratio(ratio f64)

fn (GPUParticles2D) set_randomness_ratio #

fn (s &GPUParticles2D) set_randomness_ratio(ratio f64)

fn (GPUParticles2D) set_visibility_rect #

fn (s &GPUParticles2D) set_visibility_rect(visibility_rect Rect2)

fn (GPUParticles2D) set_use_local_coordinates #

fn (s &GPUParticles2D) set_use_local_coordinates(enable bool)

fn (GPUParticles2D) set_fixed_fps #

fn (s &GPUParticles2D) set_fixed_fps(fps i64)

fn (GPUParticles2D) set_fractional_delta #

fn (s &GPUParticles2D) set_fractional_delta(enable bool)

fn (GPUParticles2D) set_interpolate #

fn (s &GPUParticles2D) set_interpolate(enable bool)

fn (GPUParticles2D) set_process_material #

fn (s &GPUParticles2D) set_process_material(material Material)

fn (GPUParticles2D) set_speed_scale #

fn (s &GPUParticles2D) set_speed_scale(scale f64)

fn (GPUParticles2D) set_collision_base_size #

fn (s &GPUParticles2D) set_collision_base_size(size f64)

fn (GPUParticles2D) set_interp_to_end #

fn (s &GPUParticles2D) set_interp_to_end(interp f64)

fn (GPUParticles2D) request_particles_process #

fn (s &GPUParticles2D) request_particles_process(process_time f64)

Requests the particles to process for extra process time during a single frame. Useful for particle playback, if used in combination with [member use_fixed_seed] or by calling [method restart] with parameter keep_seed set to true.

fn (GPUParticles2D) is_emitting #

fn (s &GPUParticles2D) is_emitting() bool

fn (GPUParticles2D) get_amount #

fn (s &GPUParticles2D) get_amount() i64

fn (GPUParticles2D) get_lifetime #

fn (s &GPUParticles2D) get_lifetime() f64

fn (GPUParticles2D) get_one_shot #

fn (s &GPUParticles2D) get_one_shot() bool

fn (GPUParticles2D) get_pre_process_time #

fn (s &GPUParticles2D) get_pre_process_time() f64

fn (GPUParticles2D) get_explosiveness_ratio #

fn (s &GPUParticles2D) get_explosiveness_ratio() f64

fn (GPUParticles2D) get_randomness_ratio #

fn (s &GPUParticles2D) get_randomness_ratio() f64

fn (GPUParticles2D) get_visibility_rect #

fn (s &GPUParticles2D) get_visibility_rect() Rect2

fn (GPUParticles2D) get_use_local_coordinates #

fn (s &GPUParticles2D) get_use_local_coordinates() bool

fn (GPUParticles2D) get_fixed_fps #

fn (s &GPUParticles2D) get_fixed_fps() i64

fn (GPUParticles2D) get_fractional_delta #

fn (s &GPUParticles2D) get_fractional_delta() bool

fn (GPUParticles2D) get_interpolate #

fn (s &GPUParticles2D) get_interpolate() bool

fn (GPUParticles2D) get_process_material #

fn (s &GPUParticles2D) get_process_material() Material

fn (GPUParticles2D) get_speed_scale #

fn (s &GPUParticles2D) get_speed_scale() f64

fn (GPUParticles2D) get_collision_base_size #

fn (s &GPUParticles2D) get_collision_base_size() f64

fn (GPUParticles2D) get_interp_to_end #

fn (s &GPUParticles2D) get_interp_to_end() f64

fn (GPUParticles2D) set_draw_order #

fn (s &GPUParticles2D) set_draw_order(order GPUParticles2DDrawOrder)

fn (GPUParticles2D) get_draw_order #

fn (s &GPUParticles2D) get_draw_order() GPUParticles2DDrawOrder

fn (GPUParticles2D) set_texture #

fn (s &GPUParticles2D) set_texture(texture Texture2D)

fn (GPUParticles2D) get_texture #

fn (s &GPUParticles2D) get_texture() Texture2D

fn (GPUParticles2D) capture_rect #

fn (s &GPUParticles2D) capture_rect() Rect2

Returns a rectangle containing the positions of all existing particles. [b]Note:[/b] When using threaded rendering this method synchronizes the rendering thread. Calling it often may have a negative impact on performance.

fn (GPUParticles2D) restart #

fn (s &GPUParticles2D) restart(cfg GPUParticles2D_restart_Cfg)

Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling. [b]Note:[/b] The [signal finished] signal is only emitted by [member one_shot] emitters. If [param keep_seed] is true, the current random seed will be preserved. Useful for seeking and playback.

fn (GPUParticles2D) set_sub_emitter #

fn (s &GPUParticles2D) set_sub_emitter(path NodePath)

fn (GPUParticles2D) get_sub_emitter #

fn (s &GPUParticles2D) get_sub_emitter() NodePath

fn (GPUParticles2D) emit_particle #

fn (s &GPUParticles2D) emit_particle(xform Transform2D, velocity Vector2, color Color, custom Color, flags i64)

Emits a single particle. Whether [param xform], [param velocity], [param color] and [param custom] are applied depends on the value of [param flags]. See [enum EmitFlags]. The default ParticleProcessMaterial will overwrite [param color] and use the contents of [param custom] as (rotation, age, animation, lifetime). [b]Note:[/b] [method emit_particle] is only supported on the Forward+ and Mobile rendering methods, not Compatibility.

fn (GPUParticles2D) set_trail_enabled #

fn (s &GPUParticles2D) set_trail_enabled(enabled bool)

fn (GPUParticles2D) set_trail_lifetime #

fn (s &GPUParticles2D) set_trail_lifetime(secs f64)

fn (GPUParticles2D) is_trail_enabled #

fn (s &GPUParticles2D) is_trail_enabled() bool

fn (GPUParticles2D) get_trail_lifetime #

fn (s &GPUParticles2D) get_trail_lifetime() f64

fn (GPUParticles2D) set_trail_sections #

fn (s &GPUParticles2D) set_trail_sections(sections i64)

fn (GPUParticles2D) get_trail_sections #

fn (s &GPUParticles2D) get_trail_sections() i64

fn (GPUParticles2D) set_trail_section_subdivisions #

fn (s &GPUParticles2D) set_trail_section_subdivisions(subdivisions i64)

fn (GPUParticles2D) get_trail_section_subdivisions #

fn (s &GPUParticles2D) get_trail_section_subdivisions() i64

fn (GPUParticles2D) convert_from_particles #

fn (s &GPUParticles2D) convert_from_particles(particles Node)

Sets this node's properties to match a given [CPUParticles2D] node.

fn (GPUParticles2D) set_amount_ratio #

fn (s &GPUParticles2D) set_amount_ratio(ratio f64)

fn (GPUParticles2D) get_amount_ratio #

fn (s &GPUParticles2D) get_amount_ratio() f64

fn (GPUParticles2D) set_use_fixed_seed #

fn (s &GPUParticles2D) set_use_fixed_seed(use_fixed_seed bool)

fn (GPUParticles2D) get_use_fixed_seed #

fn (s &GPUParticles2D) get_use_fixed_seed() bool

fn (GPUParticles2D) set_seed #

fn (s &GPUParticles2D) set_seed(seed i64)

fn (GPUParticles2D) get_seed #

fn (s &GPUParticles2D) get_seed() i64

struct GPUParticles2D_restart_Cfg #

@[params]
struct GPUParticles2D_restart_Cfg {
pub:
	keep_seed bool
}

Optional parameters for GPUParticles2D#restart

struct GPUParticles3D #

struct GPUParticles3D {
	GeometryInstance3D
}

A 3D particle emitter.

fn (GPUParticles3D) to_variant #

fn (s &GPUParticles3D) to_variant() Variant

fn (GPUParticles3D) from_variant #

fn (mut s GPUParticles3D) from_variant(variant &Variant)

fn (GPUParticles3D) set_emitting #

fn (s &GPUParticles3D) set_emitting(emitting bool)

fn (GPUParticles3D) set_amount #

fn (s &GPUParticles3D) set_amount(amount i64)

fn (GPUParticles3D) set_lifetime #

fn (s &GPUParticles3D) set_lifetime(secs f64)

fn (GPUParticles3D) set_one_shot #

fn (s &GPUParticles3D) set_one_shot(enable bool)

fn (GPUParticles3D) set_pre_process_time #

fn (s &GPUParticles3D) set_pre_process_time(secs f64)

fn (GPUParticles3D) set_explosiveness_ratio #

fn (s &GPUParticles3D) set_explosiveness_ratio(ratio f64)

fn (GPUParticles3D) set_randomness_ratio #

fn (s &GPUParticles3D) set_randomness_ratio(ratio f64)

fn (GPUParticles3D) set_visibility_aabb #

fn (s &GPUParticles3D) set_visibility_aabb(aabb AABB)

fn (GPUParticles3D) set_use_local_coordinates #

fn (s &GPUParticles3D) set_use_local_coordinates(enable bool)

fn (GPUParticles3D) set_fixed_fps #

fn (s &GPUParticles3D) set_fixed_fps(fps i64)

fn (GPUParticles3D) set_fractional_delta #

fn (s &GPUParticles3D) set_fractional_delta(enable bool)

fn (GPUParticles3D) set_interpolate #

fn (s &GPUParticles3D) set_interpolate(enable bool)

fn (GPUParticles3D) set_process_material #

fn (s &GPUParticles3D) set_process_material(material Material)

fn (GPUParticles3D) set_speed_scale #

fn (s &GPUParticles3D) set_speed_scale(scale f64)

fn (GPUParticles3D) set_collision_base_size #

fn (s &GPUParticles3D) set_collision_base_size(size f64)

fn (GPUParticles3D) set_interp_to_end #

fn (s &GPUParticles3D) set_interp_to_end(interp f64)

fn (GPUParticles3D) is_emitting #

fn (s &GPUParticles3D) is_emitting() bool

fn (GPUParticles3D) get_amount #

fn (s &GPUParticles3D) get_amount() i64

fn (GPUParticles3D) get_lifetime #

fn (s &GPUParticles3D) get_lifetime() f64

fn (GPUParticles3D) get_one_shot #

fn (s &GPUParticles3D) get_one_shot() bool

fn (GPUParticles3D) get_pre_process_time #

fn (s &GPUParticles3D) get_pre_process_time() f64

fn (GPUParticles3D) get_explosiveness_ratio #

fn (s &GPUParticles3D) get_explosiveness_ratio() f64

fn (GPUParticles3D) get_randomness_ratio #

fn (s &GPUParticles3D) get_randomness_ratio() f64

fn (GPUParticles3D) get_visibility_aabb #

fn (s &GPUParticles3D) get_visibility_aabb() AABB

fn (GPUParticles3D) get_use_local_coordinates #

fn (s &GPUParticles3D) get_use_local_coordinates() bool

fn (GPUParticles3D) get_fixed_fps #

fn (s &GPUParticles3D) get_fixed_fps() i64

fn (GPUParticles3D) get_fractional_delta #

fn (s &GPUParticles3D) get_fractional_delta() bool

fn (GPUParticles3D) get_interpolate #

fn (s &GPUParticles3D) get_interpolate() bool

fn (GPUParticles3D) get_process_material #

fn (s &GPUParticles3D) get_process_material() Material

fn (GPUParticles3D) get_speed_scale #

fn (s &GPUParticles3D) get_speed_scale() f64

fn (GPUParticles3D) get_collision_base_size #

fn (s &GPUParticles3D) get_collision_base_size() f64

fn (GPUParticles3D) get_interp_to_end #

fn (s &GPUParticles3D) get_interp_to_end() f64

fn (GPUParticles3D) set_use_fixed_seed #

fn (s &GPUParticles3D) set_use_fixed_seed(use_fixed_seed bool)

fn (GPUParticles3D) get_use_fixed_seed #

fn (s &GPUParticles3D) get_use_fixed_seed() bool

fn (GPUParticles3D) set_seed #

fn (s &GPUParticles3D) set_seed(seed i64)

fn (GPUParticles3D) get_seed #

fn (s &GPUParticles3D) get_seed() i64

fn (GPUParticles3D) set_draw_order #

fn (s &GPUParticles3D) set_draw_order(order GPUParticles3DDrawOrder)

fn (GPUParticles3D) get_draw_order #

fn (s &GPUParticles3D) get_draw_order() GPUParticles3DDrawOrder

fn (GPUParticles3D) set_draw_passes #

fn (s &GPUParticles3D) set_draw_passes(passes i64)

fn (GPUParticles3D) set_draw_pass_mesh #

fn (s &GPUParticles3D) set_draw_pass_mesh(pass i64, mesh Mesh)

Sets the [Mesh] that is drawn at index [param pass].

fn (GPUParticles3D) get_draw_passes #

fn (s &GPUParticles3D) get_draw_passes() i64

fn (GPUParticles3D) get_draw_pass_mesh #

fn (s &GPUParticles3D) get_draw_pass_mesh(pass i64) Mesh

Returns the [Mesh] that is drawn at index [param pass].

fn (GPUParticles3D) set_skin #

fn (s &GPUParticles3D) set_skin(skin Skin)

fn (GPUParticles3D) get_skin #

fn (s &GPUParticles3D) get_skin() Skin

fn (GPUParticles3D) restart #

fn (s &GPUParticles3D) restart(cfg GPUParticles3D_restart_Cfg)

Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling. [b]Note:[/b] The [signal finished] signal is only emitted by [member one_shot] emitters. If [param keep_seed] is true, the current random seed will be preserved. Useful for seeking and playback.

fn (GPUParticles3D) capture_aabb #

fn (s &GPUParticles3D) capture_aabb() AABB

Returns the axis-aligned bounding box that contains all the particles that are active in the current frame.

fn (GPUParticles3D) set_sub_emitter #

fn (s &GPUParticles3D) set_sub_emitter(path NodePath)

fn (GPUParticles3D) get_sub_emitter #

fn (s &GPUParticles3D) get_sub_emitter() NodePath

fn (GPUParticles3D) emit_particle #

fn (s &GPUParticles3D) emit_particle(xform Transform3D, velocity Vector3, color Color, custom Color, flags i64)

Emits a single particle. Whether [param xform], [param velocity], [param color] and [param custom] are applied depends on the value of [param flags]. See [enum EmitFlags]. The default ParticleProcessMaterial will overwrite [param color] and use the contents of [param custom] as (rotation, age, animation, lifetime). [b]Note:[/b] [method emit_particle] is only supported on the Forward+ and Mobile rendering methods, not Compatibility.

fn (GPUParticles3D) set_trail_enabled #

fn (s &GPUParticles3D) set_trail_enabled(enabled bool)

fn (GPUParticles3D) set_trail_lifetime #

fn (s &GPUParticles3D) set_trail_lifetime(secs f64)

fn (GPUParticles3D) is_trail_enabled #

fn (s &GPUParticles3D) is_trail_enabled() bool

fn (GPUParticles3D) get_trail_lifetime #

fn (s &GPUParticles3D) get_trail_lifetime() f64

fn (GPUParticles3D) set_transform_align #

fn (s &GPUParticles3D) set_transform_align(align GPUParticles3DTransformAlign)

fn (GPUParticles3D) get_transform_align #

fn (s &GPUParticles3D) get_transform_align() GPUParticles3DTransformAlign

fn (GPUParticles3D) convert_from_particles #

fn (s &GPUParticles3D) convert_from_particles(particles Node)

Sets this node's properties to match a given [CPUParticles3D] node.

fn (GPUParticles3D) set_amount_ratio #

fn (s &GPUParticles3D) set_amount_ratio(ratio f64)

fn (GPUParticles3D) get_amount_ratio #

fn (s &GPUParticles3D) get_amount_ratio() f64

fn (GPUParticles3D) request_particles_process #

fn (s &GPUParticles3D) request_particles_process(process_time f64)

Requests the particles to process for extra process time during a single frame. Useful for particle playback, if used in combination with [member use_fixed_seed] or by calling [method restart] with parameter keep_seed set to true.

struct GPUParticles3D_restart_Cfg #

@[params]
struct GPUParticles3D_restart_Cfg {
pub:
	keep_seed bool
}

Optional parameters for GPUParticles3D#restart

struct GPUParticlesAttractor3D #

struct GPUParticlesAttractor3D {
	VisualInstance3D
}

Abstract base class for 3D particle attractors.

fn (GPUParticlesAttractor3D) to_variant #

fn (s &GPUParticlesAttractor3D) to_variant() Variant

fn (GPUParticlesAttractor3D) from_variant #

fn (mut s GPUParticlesAttractor3D) from_variant(variant &Variant)

fn (GPUParticlesAttractor3D) set_cull_mask #

fn (s &GPUParticlesAttractor3D) set_cull_mask(mask i64)

fn (GPUParticlesAttractor3D) get_cull_mask #

fn (s &GPUParticlesAttractor3D) get_cull_mask() i64

fn (GPUParticlesAttractor3D) set_strength #

fn (s &GPUParticlesAttractor3D) set_strength(strength f64)

fn (GPUParticlesAttractor3D) get_strength #

fn (s &GPUParticlesAttractor3D) get_strength() f64

fn (GPUParticlesAttractor3D) set_attenuation #

fn (s &GPUParticlesAttractor3D) set_attenuation(attenuation f64)

fn (GPUParticlesAttractor3D) get_attenuation #

fn (s &GPUParticlesAttractor3D) get_attenuation() f64

fn (GPUParticlesAttractor3D) set_directionality #

fn (s &GPUParticlesAttractor3D) set_directionality(amount f64)

fn (GPUParticlesAttractor3D) get_directionality #

fn (s &GPUParticlesAttractor3D) get_directionality() f64

struct GPUParticlesAttractorBox3D #

struct GPUParticlesAttractorBox3D {
	GPUParticlesAttractor3D
}

A box-shaped attractor that influences particles from [GPUParticles3D] nodes.

fn (GPUParticlesAttractorBox3D) to_variant #

fn (s &GPUParticlesAttractorBox3D) to_variant() Variant

fn (GPUParticlesAttractorBox3D) from_variant #

fn (mut s GPUParticlesAttractorBox3D) from_variant(variant &Variant)

fn (GPUParticlesAttractorBox3D) set_size #

fn (s &GPUParticlesAttractorBox3D) set_size(size Vector3)

fn (GPUParticlesAttractorBox3D) get_size #

fn (s &GPUParticlesAttractorBox3D) get_size() Vector3

struct GPUParticlesAttractorSphere3D #

struct GPUParticlesAttractorSphere3D {
	GPUParticlesAttractor3D
}

A spheroid-shaped attractor that influences particles from [GPUParticles3D] nodes.

fn (GPUParticlesAttractorSphere3D) to_variant #

fn (s &GPUParticlesAttractorSphere3D) to_variant() Variant

fn (GPUParticlesAttractorSphere3D) from_variant #

fn (mut s GPUParticlesAttractorSphere3D) from_variant(variant &Variant)

fn (GPUParticlesAttractorSphere3D) set_radius #

fn (s &GPUParticlesAttractorSphere3D) set_radius(radius f64)

fn (GPUParticlesAttractorSphere3D) get_radius #

fn (s &GPUParticlesAttractorSphere3D) get_radius() f64

struct GPUParticlesAttractorVectorField3D #

struct GPUParticlesAttractorVectorField3D {
	GPUParticlesAttractor3D
}

A box-shaped attractor with varying directions and strengths defined in it that influences particles from [GPUParticles3D] nodes.

fn (GPUParticlesAttractorVectorField3D) to_variant #

fn (s &GPUParticlesAttractorVectorField3D) to_variant() Variant

fn (GPUParticlesAttractorVectorField3D) from_variant #

fn (mut s GPUParticlesAttractorVectorField3D) from_variant(variant &Variant)

fn (GPUParticlesAttractorVectorField3D) set_size #

fn (s &GPUParticlesAttractorVectorField3D) set_size(size Vector3)

fn (GPUParticlesAttractorVectorField3D) get_size #

fn (s &GPUParticlesAttractorVectorField3D) get_size() Vector3

fn (GPUParticlesAttractorVectorField3D) set_texture #

fn (s &GPUParticlesAttractorVectorField3D) set_texture(texture Texture3D)

fn (GPUParticlesAttractorVectorField3D) get_texture #

fn (s &GPUParticlesAttractorVectorField3D) get_texture() Texture3D

struct GPUParticlesCollision3D #

struct GPUParticlesCollision3D {
	VisualInstance3D
}

Abstract base class for 3D particle collision shapes affecting [GPUParticles3D] nodes.

fn (GPUParticlesCollision3D) to_variant #

fn (s &GPUParticlesCollision3D) to_variant() Variant

fn (GPUParticlesCollision3D) from_variant #

fn (mut s GPUParticlesCollision3D) from_variant(variant &Variant)

fn (GPUParticlesCollision3D) set_cull_mask #

fn (s &GPUParticlesCollision3D) set_cull_mask(mask i64)

fn (GPUParticlesCollision3D) get_cull_mask #

fn (s &GPUParticlesCollision3D) get_cull_mask() i64

struct GPUParticlesCollisionBox3D #

struct GPUParticlesCollisionBox3D {
	GPUParticlesCollision3D
}

A box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.

fn (GPUParticlesCollisionBox3D) to_variant #

fn (s &GPUParticlesCollisionBox3D) to_variant() Variant

fn (GPUParticlesCollisionBox3D) from_variant #

fn (mut s GPUParticlesCollisionBox3D) from_variant(variant &Variant)

fn (GPUParticlesCollisionBox3D) set_size #

fn (s &GPUParticlesCollisionBox3D) set_size(size Vector3)

fn (GPUParticlesCollisionBox3D) get_size #

fn (s &GPUParticlesCollisionBox3D) get_size() Vector3

struct GPUParticlesCollisionHeightField3D #

struct GPUParticlesCollisionHeightField3D {
	GPUParticlesCollision3D
}

A real-time heightmap-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.

fn (GPUParticlesCollisionHeightField3D) to_variant #

fn (s &GPUParticlesCollisionHeightField3D) to_variant() Variant

fn (GPUParticlesCollisionHeightField3D) from_variant #

fn (mut s GPUParticlesCollisionHeightField3D) from_variant(variant &Variant)

fn (GPUParticlesCollisionHeightField3D) set_size #

fn (s &GPUParticlesCollisionHeightField3D) set_size(size Vector3)

fn (GPUParticlesCollisionHeightField3D) get_size #

fn (s &GPUParticlesCollisionHeightField3D) get_size() Vector3

fn (GPUParticlesCollisionHeightField3D) set_resolution #

fn (s &GPUParticlesCollisionHeightField3D) set_resolution(resolution GPUParticlesCollisionHeightField3DResolution)

fn (GPUParticlesCollisionHeightField3D) get_resolution #

fn (s &GPUParticlesCollisionHeightField3D) get_resolution() GPUParticlesCollisionHeightField3DResolution

fn (GPUParticlesCollisionHeightField3D) set_update_mode #

fn (s &GPUParticlesCollisionHeightField3D) set_update_mode(update_mode GPUParticlesCollisionHeightField3DUpdateMode)

fn (GPUParticlesCollisionHeightField3D) get_update_mode #

fn (s &GPUParticlesCollisionHeightField3D) get_update_mode() GPUParticlesCollisionHeightField3DUpdateMode

fn (GPUParticlesCollisionHeightField3D) set_heightfield_mask #

fn (s &GPUParticlesCollisionHeightField3D) set_heightfield_mask(heightfield_mask i64)

fn (GPUParticlesCollisionHeightField3D) get_heightfield_mask #

fn (s &GPUParticlesCollisionHeightField3D) get_heightfield_mask() i64

fn (GPUParticlesCollisionHeightField3D) set_heightfield_mask_value #

fn (s &GPUParticlesCollisionHeightField3D) set_heightfield_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member heightfield_mask], given a [param layer_number] between 1 and 20, inclusive.

fn (GPUParticlesCollisionHeightField3D) get_heightfield_mask_value #

fn (s &GPUParticlesCollisionHeightField3D) get_heightfield_mask_value(layer_number i64) bool

Returns true if the specified layer of the [member heightfield_mask] is enabled, given a [param layer_number] between 1 and 20, inclusive.

fn (GPUParticlesCollisionHeightField3D) set_follow_camera_enabled #

fn (s &GPUParticlesCollisionHeightField3D) set_follow_camera_enabled(enabled bool)

fn (GPUParticlesCollisionHeightField3D) is_follow_camera_enabled #

fn (s &GPUParticlesCollisionHeightField3D) is_follow_camera_enabled() bool

struct GPUParticlesCollisionSDF3D #

struct GPUParticlesCollisionSDF3D {
	GPUParticlesCollision3D
}

A baked signed distance field 3D particle collision shape affecting [GPUParticles3D] nodes.

fn (GPUParticlesCollisionSDF3D) to_variant #

fn (s &GPUParticlesCollisionSDF3D) to_variant() Variant

fn (GPUParticlesCollisionSDF3D) from_variant #

fn (mut s GPUParticlesCollisionSDF3D) from_variant(variant &Variant)

fn (GPUParticlesCollisionSDF3D) set_size #

fn (s &GPUParticlesCollisionSDF3D) set_size(size Vector3)

fn (GPUParticlesCollisionSDF3D) get_size #

fn (s &GPUParticlesCollisionSDF3D) get_size() Vector3

fn (GPUParticlesCollisionSDF3D) set_resolution #

fn (s &GPUParticlesCollisionSDF3D) set_resolution(resolution GPUParticlesCollisionSDF3DResolution)

fn (GPUParticlesCollisionSDF3D) get_resolution #

fn (s &GPUParticlesCollisionSDF3D) get_resolution() GPUParticlesCollisionSDF3DResolution

fn (GPUParticlesCollisionSDF3D) set_texture #

fn (s &GPUParticlesCollisionSDF3D) set_texture(texture Texture3D)

fn (GPUParticlesCollisionSDF3D) get_texture #

fn (s &GPUParticlesCollisionSDF3D) get_texture() Texture3D

fn (GPUParticlesCollisionSDF3D) set_thickness #

fn (s &GPUParticlesCollisionSDF3D) set_thickness(thickness f64)

fn (GPUParticlesCollisionSDF3D) get_thickness #

fn (s &GPUParticlesCollisionSDF3D) get_thickness() f64

fn (GPUParticlesCollisionSDF3D) set_bake_mask #

fn (s &GPUParticlesCollisionSDF3D) set_bake_mask(mask i64)

fn (GPUParticlesCollisionSDF3D) get_bake_mask #

fn (s &GPUParticlesCollisionSDF3D) get_bake_mask() i64

fn (GPUParticlesCollisionSDF3D) set_bake_mask_value #

fn (s &GPUParticlesCollisionSDF3D) set_bake_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member bake_mask], given a [param layer_number] between 1 and 32.

fn (GPUParticlesCollisionSDF3D) get_bake_mask_value #

fn (s &GPUParticlesCollisionSDF3D) get_bake_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [param layer_number] between 1 and 32.

struct GPUParticlesCollisionSphere3D #

struct GPUParticlesCollisionSphere3D {
	GPUParticlesCollision3D
}

A sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.

fn (GPUParticlesCollisionSphere3D) to_variant #

fn (s &GPUParticlesCollisionSphere3D) to_variant() Variant

fn (GPUParticlesCollisionSphere3D) from_variant #

fn (mut s GPUParticlesCollisionSphere3D) from_variant(variant &Variant)

fn (GPUParticlesCollisionSphere3D) set_radius #

fn (s &GPUParticlesCollisionSphere3D) set_radius(radius f64)

fn (GPUParticlesCollisionSphere3D) get_radius #

fn (s &GPUParticlesCollisionSphere3D) get_radius() f64

struct Generic6DOFJoint3D #

struct Generic6DOFJoint3D {
	Joint3D
}

A physics joint that allows for complex movement and rotation between two 3D physics bodies.

fn (Generic6DOFJoint3D) to_variant #

fn (s &Generic6DOFJoint3D) to_variant() Variant

fn (Generic6DOFJoint3D) from_variant #

fn (mut s Generic6DOFJoint3D) from_variant(variant &Variant)

fn (Generic6DOFJoint3D) set_param_x #

fn (s &Generic6DOFJoint3D) set_param_x(param Generic6DOFJoint3DParam, value f64)

fn (Generic6DOFJoint3D) get_param_x #

fn (s &Generic6DOFJoint3D) get_param_x(param Generic6DOFJoint3DParam) f64

fn (Generic6DOFJoint3D) set_param_y #

fn (s &Generic6DOFJoint3D) set_param_y(param Generic6DOFJoint3DParam, value f64)

fn (Generic6DOFJoint3D) get_param_y #

fn (s &Generic6DOFJoint3D) get_param_y(param Generic6DOFJoint3DParam) f64

fn (Generic6DOFJoint3D) set_param_z #

fn (s &Generic6DOFJoint3D) set_param_z(param Generic6DOFJoint3DParam, value f64)

fn (Generic6DOFJoint3D) get_param_z #

fn (s &Generic6DOFJoint3D) get_param_z(param Generic6DOFJoint3DParam) f64

fn (Generic6DOFJoint3D) set_flag_x #

fn (s &Generic6DOFJoint3D) set_flag_x(flag Generic6DOFJoint3DFlag, value bool)

fn (Generic6DOFJoint3D) get_flag_x #

fn (s &Generic6DOFJoint3D) get_flag_x(flag Generic6DOFJoint3DFlag) bool

fn (Generic6DOFJoint3D) set_flag_y #

fn (s &Generic6DOFJoint3D) set_flag_y(flag Generic6DOFJoint3DFlag, value bool)

fn (Generic6DOFJoint3D) get_flag_y #

fn (s &Generic6DOFJoint3D) get_flag_y(flag Generic6DOFJoint3DFlag) bool

fn (Generic6DOFJoint3D) set_flag_z #

fn (s &Generic6DOFJoint3D) set_flag_z(flag Generic6DOFJoint3DFlag, value bool)

fn (Generic6DOFJoint3D) get_flag_z #

fn (s &Generic6DOFJoint3D) get_flag_z(flag Generic6DOFJoint3DFlag) bool

struct Geometry2D #

struct Geometry2D {
	Object
}

Provides methods for some common 2D geometric operations.

fn (Geometry2D) to_variant #

fn (s &Geometry2D) to_variant() Variant

fn (Geometry2D) from_variant #

fn (mut s Geometry2D) from_variant(variant &Variant)

fn (Geometry2D) is_point_in_circle #

fn (s &Geometry2D) is_point_in_circle(point Vector2, circle_position Vector2, circle_radius f64) bool

Returns true if [param point] is inside the circle or if it's located exactly [i]on[/i] the circle's boundary, otherwise returns false.

fn (Geometry2D) segment_intersects_circle #

fn (s &Geometry2D) segment_intersects_circle(segment_from Vector2, segment_to Vector2, circle_position Vector2, circle_radius f64) f64

Given the 2D segment ([param segment_from], [param segment_to]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [param circle_position] and has radius [param circle_radius]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not).

fn (Geometry2D) segment_intersects_segment #

fn (s &Geometry2D) segment_intersects_segment(from_a Vector2, to_a Vector2, from_b Vector2, to_b Vector2) Variant

Checks if the two segments ([param from_a], [param to_a]) and ([param from_b], [param to_b]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns null.

fn (Geometry2D) line_intersects_line #

fn (s &Geometry2D) line_intersects_line(from_a Vector2, dir_a Vector2, from_b Vector2, dir_b Vector2) Variant

Returns the point of intersection between the two lines ([param from_a], [param dir_a]) and ([param from_b], [param dir_b]). Returns a [Vector2], or null if the lines are parallel. from and dir are [i]not[/i] endpoints of a line segment or ray but the slope (dir) and a known point (from) on that line. [codeblocks] [gdscript] var from_a = Vector2.ZERO var dir_a = Vector2.RIGHT var from_b = Vector2.DOWN

Returns Vector2(1, 0)

Geometry2D.line_intersects_line(from_a, dir_a, from_b, Vector2(1, -1))# Returns Vector2(-1, 0)Geometry2D.line_intersects_line(from_a, dir_a, from_b, Vector2(-1, -1))# Returns nullGeometry2D.line_intersects_line(from_a, dir_a, from_b, Vector2.RIGHT) [/gdscript] [csharp] var fromA = Vector2.Zero; var dirA = Vector2.Right; var fromB = Vector2.Down;

// Returns new Vector2(1, 0) Geometry2D.LineIntersectsLine(fromA, dirA, fromB, new Vector2(1, -1)); // Returns new Vector2(-1, 0) Geometry2D.LineIntersectsLine(fromA, dirA, fromB, new Vector2(-1, -1)); // Returns null Geometry2D.LineIntersectsLine(fromA, dirA, fromB, Vector2.Right); [/csharp] [/codeblocks]

fn (Geometry2D) get_closest_points_between_segments #

fn (s &Geometry2D) get_closest_points_between_segments(p1 Vector2, q1 Vector2, p2 Vector2, q2 Vector2) PackedVector2Array

Given the two 2D segments ([param p1], [param q1]) and ([param p2], [param q2]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([param p1], [param q1]) as well the accompanying point on ([param p2], [param q2]).

fn (Geometry2D) get_closest_point_to_segment #

fn (s &Geometry2D) get_closest_point_to_segment(point Vector2, s1 Vector2, s2 Vector2) Vector2

Returns the 2D point on the 2D segment ([param s1], [param s2]) that is closest to [param point]. The returned point will always be inside the specified segment.

fn (Geometry2D) get_closest_point_to_segment_uncapped #

fn (s &Geometry2D) get_closest_point_to_segment_uncapped(point Vector2, s1 Vector2, s2 Vector2) Vector2

Returns the 2D point on the 2D line defined by ([param s1], [param s2]) that is closest to [param point]. The returned point can be inside the segment ([param s1], [param s2]) or outside of it, i.e. somewhere on the line extending from the segment.

fn (Geometry2D) point_is_inside_triangle #

fn (s &Geometry2D) point_is_inside_triangle(point Vector2, a Vector2, b Vector2, c Vector2) bool

Returns if [param point] is inside the triangle specified by [param a], [param b] and [param c].

fn (Geometry2D) is_polygon_clockwise #

fn (s &Geometry2D) is_polygon_clockwise(polygon PackedVector2Array) bool

Returns true if [param polygon]'s vertices are ordered in clockwise order, otherwise returns false. [b]Note:[/b] Assumes a Cartesian coordinate system where +x is right and +y is up. If using screen coordinates (+y is down), the result will need to be flipped (i.e. a true result will indicate counter-clockwise).

fn (Geometry2D) is_point_in_polygon #

fn (s &Geometry2D) is_point_in_polygon(point Vector2, polygon PackedVector2Array) bool

Returns true if [param point] is inside [param polygon] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns false.

fn (Geometry2D) triangulate_polygon #

fn (s &Geometry2D) triangulate_polygon(polygon PackedVector2Array) PackedInt32Array

Triangulates the polygon specified by the points in [param polygon]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [param polygon] (i.e. the returned array will have n * 3 elements, with n being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty [PackedInt32Array] is returned.

fn (Geometry2D) triangulate_delaunay #

fn (s &Geometry2D) triangulate_delaunay(points PackedVector2Array) PackedInt32Array

Triangulates the area specified by discrete set of [param points] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [param points] (i.e. the returned array will have n * 3 elements, with n being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned.

fn (Geometry2D) convex_hull #

fn (s &Geometry2D) convex_hull(points PackedVector2Array) PackedVector2Array

Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one.

fn (Geometry2D) decompose_polygon_in_convex #

fn (s &Geometry2D) decompose_polygon_in_convex(polygon PackedVector2Array) Array

Decomposes the [param polygon] into multiple convex hulls and returns an array of [PackedVector2Array].

fn (Geometry2D) merge_polygons #

fn (s &Geometry2D) merge_polygons(polygon_a PackedVector2Array, polygon_b PackedVector2Array) Array

Merges (combines) [param polygon_a] and [param polygon_b] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons. The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling [method is_polygon_clockwise].

fn (Geometry2D) clip_polygons #

fn (s &Geometry2D) clip_polygons(polygon_a PackedVector2Array, polygon_b PackedVector2Array) Array

Clips [param polygon_a] against [param polygon_b] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [param polygon_b] completely overlaps [param polygon_a]. If [param polygon_b] is enclosed by [param polygon_a], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise].

fn (Geometry2D) intersect_polygons #

fn (s &Geometry2D) intersect_polygons(polygon_a PackedVector2Array, polygon_b PackedVector2Array) Array

Intersects [param polygon_a] with [param polygon_b] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].

fn (Geometry2D) exclude_polygons #

fn (s &Geometry2D) exclude_polygons(polygon_a PackedVector2Array, polygon_b PackedVector2Array) Array

Mutually excludes common area defined by intersection of [param polygon_a] and [param polygon_b] (see [method intersect_polygons]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].

fn (Geometry2D) clip_polyline_with_polygon #

fn (s &Geometry2D) clip_polyline_with_polygon(polyline PackedVector2Array, polygon PackedVector2Array) Array

Clips [param polyline] against [param polygon] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape.

fn (Geometry2D) intersect_polyline_with_polygon #

fn (s &Geometry2D) intersect_polyline_with_polygon(polyline PackedVector2Array, polygon PackedVector2Array) Array

Intersects [param polyline] with [param polygon] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape.

fn (Geometry2D) offset_polygon #

fn (s &Geometry2D) offset_polygon(polygon PackedVector2Array, delta f64, cfg Geometry2D_offset_polygon_Cfg) Array

Inflates or deflates [param polygon] by [param delta] units (pixels). If [param delta] is positive, makes the polygon grow outward. If [param delta] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [param delta] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon. Each polygon's vertices will be rounded as determined by [param join_type]. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. [b]Note:[/b] To translate the polygon's vertices specifically, multiply them to a [Transform2D]: [codeblocks] [gdscript] var polygon = PackedVector2Array([Vector2(0, 0), Vector2(100, 0), Vector2(100, 100), Vector2(0, 100)]) var offset = Vector2(50, 50) polygon = Transform2D(0, offset) * polygon print(polygon) # Prints [(50.0, 50.0), (150.0, 50.0), (150.0, 150.0), (50.0, 150.0)] [/gdscript] [csharp] Vector2[] polygon = [new Vector2(0, 0), new Vector2(100, 0), new Vector2(100, 100), new Vector2(0, 100)]; var offset = new Vector2(50, 50); polygon = new Transform2D(0, offset) * polygon; GD.Print((Variant)polygon); // Prints [(50, 50), (150, 50), (150, 150), (50, 150)] [/csharp] [/codeblocks]

fn (Geometry2D) offset_polyline #

fn (s &Geometry2D) offset_polyline(polyline PackedVector2Array, delta f64, cfg Geometry2D_offset_polyline_Cfg) Array

Inflates or deflates [param polyline] by [param delta] units (pixels), producing polygons. If [param delta] is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If [param delta] is negative, returns an empty array. Each polygon's vertices will be rounded as determined by [param join_type]. Each polygon's endpoints will be rounded as determined by [param end_type]. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].

fn (Geometry2D) make_atlas #

fn (s &Geometry2D) make_atlas(sizes PackedVector2Array) Dictionary

Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: points is a [PackedVector2Array] that specifies the positions of each tile, size contains the overall size of the whole atlas as [Vector2i].

fn (Geometry2D) bresenham_line #

fn (s &Geometry2D) bresenham_line(from Vector2i, to Vector2i) Array

Returns the [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham line[/url] between the [param from] and [param to] points. A Bresenham line is a series of pixels that draws a line and is always 1-pixel thick on every row and column of the drawing (never more, never less). Example code to draw a line between two [Marker2D] nodes using a series of [method CanvasItem.draw_rect] calls:

func _draw():
for pixel in Geometry2D.bresenham_line($MarkerA.position, $MarkerB.position):
draw_rect(Rect2(pixel, Vector2.ONE), Color.WHITE)

struct Geometry2D_offset_polygon_Cfg #

@[params]
struct Geometry2D_offset_polygon_Cfg {
pub:
	join_type Geometry2DPolyJoinType = unsafe { Geometry2DPolyJoinType(0) }
}

Optional parameters for Geometry2D#offset_polygon

struct Geometry2D_offset_polyline_Cfg #

@[params]
struct Geometry2D_offset_polyline_Cfg {
pub:
	join_type Geometry2DPolyJoinType = unsafe { Geometry2DPolyJoinType(0) }
	end_type  Geometry2DPolyEndType  = unsafe { Geometry2DPolyEndType(3) }
}

Optional parameters for Geometry2D#offset_polyline

struct Geometry3D #

struct Geometry3D {
	Object
}

Provides methods for some common 3D geometric operations.

fn (Geometry3D) to_variant #

fn (s &Geometry3D) to_variant() Variant

fn (Geometry3D) from_variant #

fn (mut s Geometry3D) from_variant(variant &Variant)

fn (Geometry3D) compute_convex_mesh_points #

fn (s &Geometry3D) compute_convex_mesh_points(planes Array) PackedVector3Array

Calculates and returns all the vertex points of a convex shape defined by an array of [param planes].

fn (Geometry3D) build_box_planes #

fn (s &Geometry3D) build_box_planes(extents Vector3) Array

Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [param extents], which represents one (positive) corner of the box (i.e. half its actual size).

fn (Geometry3D) build_cylinder_planes #

fn (s &Geometry3D) build_cylinder_planes(radius f64, height f64, sides i64, cfg Geometry3D_build_cylinder_planes_Cfg) Array

Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [param radius] and height [param height]. The parameter [param sides] defines how many planes will be generated for the round part of the cylinder. The parameter [param axis] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z).

fn (Geometry3D) build_capsule_planes #

fn (s &Geometry3D) build_capsule_planes(radius f64, height f64, sides i64, lats i64, cfg Geometry3D_build_capsule_planes_Cfg) Array

Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [param radius] and height [param height]. The parameter [param sides] defines how many planes will be generated for the side part of the capsule, whereas [param lats] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [param axis] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z).

fn (Geometry3D) get_closest_points_between_segments #

fn (s &Geometry3D) get_closest_points_between_segments(p1 Vector3, p2 Vector3, q1 Vector3, q2 Vector3) PackedVector3Array

Given the two 3D segments ([param p1], [param p2]) and ([param q1], [param q2]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([param p1], [param p2]) as well the accompanying point on ([param q1], [param q2]).

fn (Geometry3D) get_closest_point_to_segment #

fn (s &Geometry3D) get_closest_point_to_segment(point Vector3, s1 Vector3, s2 Vector3) Vector3

Returns the 3D point on the 3D segment ([param s1], [param s2]) that is closest to [param point]. The returned point will always be inside the specified segment.

fn (Geometry3D) get_closest_point_to_segment_uncapped #

fn (s &Geometry3D) get_closest_point_to_segment_uncapped(point Vector3, s1 Vector3, s2 Vector3) Vector3

Returns the 3D point on the 3D line defined by ([param s1], [param s2]) that is closest to [param point]. The returned point can be inside the segment ([param s1], [param s2]) or outside of it, i.e. somewhere on the line extending from the segment.

fn (Geometry3D) get_triangle_barycentric_coords #

fn (s &Geometry3D) get_triangle_barycentric_coords(point Vector3, a Vector3, b Vector3, c Vector3) Vector3

Returns a [Vector3] containing weights based on how close a 3D position ([param point]) is to a triangle's different vertices ([param a], [param b] and [param c]). This is useful for interpolating between the data of different vertices in a triangle. One example use case is using this to smoothly rotate over a mesh instead of relying solely on face normals. [url=https://en.wikipedia.org/wiki/Barycentric_coordinate_system]Here is a more detailed explanation of barycentric coordinates.[/url]

fn (Geometry3D) ray_intersects_triangle #

fn (s &Geometry3D) ray_intersects_triangle(from Vector3, dir Vector3, a Vector3, b Vector3, c Vector3) Variant

Tests if the 3D ray starting at [param from] with the direction of [param dir] intersects the triangle specified by [param a], [param b] and [param c]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns null.

fn (Geometry3D) segment_intersects_triangle #

fn (s &Geometry3D) segment_intersects_triangle(from Vector3, to Vector3, a Vector3, b Vector3, c Vector3) Variant

Tests if the segment ([param from], [param to]) intersects the triangle [param a], [param b], [param c]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns null.

fn (Geometry3D) segment_intersects_sphere #

fn (s &Geometry3D) segment_intersects_sphere(from Vector3, to Vector3, sphere_position Vector3, sphere_radius f64) PackedVector3Array

Checks if the segment ([param from], [param to]) intersects the sphere that is located at [param sphere_position] and has radius [param sphere_radius]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.

fn (Geometry3D) segment_intersects_cylinder #

fn (s &Geometry3D) segment_intersects_cylinder(from Vector3, to Vector3, height f64, radius f64) PackedVector3Array

Checks if the segment ([param from], [param to]) intersects the cylinder with height [param height] that is centered at the origin and has radius [param radius]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.

fn (Geometry3D) segment_intersects_convex #

fn (s &Geometry3D) segment_intersects_convex(from Vector3, to Vector3, planes Array) PackedVector3Array

Given a convex hull defined though the [Plane]s in the array [param planes], tests if the segment ([param from], [param to]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. Otherwise, returns an empty array.

fn (Geometry3D) clip_polygon #

fn (s &Geometry3D) clip_polygon(points PackedVector3Array, plane Plane) PackedVector3Array

Clips the polygon defined by the points in [param points] against the [param plane] and returns the points of the clipped polygon.

fn (Geometry3D) tetrahedralize_delaunay #

fn (s &Geometry3D) tetrahedralize_delaunay(points PackedVector3Array) PackedInt32Array

Tetrahedralizes the volume specified by a discrete set of [param points] in 3D space, ensuring that no point lies within the circumsphere of any resulting tetrahedron. The method returns a [PackedInt32Array] where each tetrahedron consists of four consecutive point indices into the [param points] array (resulting in an array with n * 4 elements, where n is the number of tetrahedra found). If the tetrahedralization is unsuccessful, an empty [PackedInt32Array] is returned.

struct Geometry3D_build_capsule_planes_Cfg #

@[params]
struct Geometry3D_build_capsule_planes_Cfg {
pub:
	axis Vector3Axis = unsafe { Vector3Axis(2) }
}

Optional parameters for Geometry3D#build_capsule_planes

struct Geometry3D_build_cylinder_planes_Cfg #

@[params]
struct Geometry3D_build_cylinder_planes_Cfg {
pub:
	axis Vector3Axis = unsafe { Vector3Axis(2) }
}

Optional parameters for Geometry3D#build_cylinder_planes

struct GeometryInstance3D #

struct GeometryInstance3D {
	VisualInstance3D
}

Base node for geometry-based visual instances.

fn (GeometryInstance3D) to_variant #

fn (s &GeometryInstance3D) to_variant() Variant

fn (GeometryInstance3D) from_variant #

fn (mut s GeometryInstance3D) from_variant(variant &Variant)

fn (GeometryInstance3D) set_material_override #

fn (s &GeometryInstance3D) set_material_override(material Material)

fn (GeometryInstance3D) get_material_override #

fn (s &GeometryInstance3D) get_material_override() Material

fn (GeometryInstance3D) set_material_overlay #

fn (s &GeometryInstance3D) set_material_overlay(material Material)

fn (GeometryInstance3D) get_material_overlay #

fn (s &GeometryInstance3D) get_material_overlay() Material

fn (GeometryInstance3D) set_cast_shadows_setting #

fn (s &GeometryInstance3D) set_cast_shadows_setting(shadow_casting_setting GeometryInstance3DShadowCastingSetting)

fn (GeometryInstance3D) get_cast_shadows_setting #

fn (s &GeometryInstance3D) get_cast_shadows_setting() GeometryInstance3DShadowCastingSetting

fn (GeometryInstance3D) set_lod_bias #

fn (s &GeometryInstance3D) set_lod_bias(bias f64)

fn (GeometryInstance3D) get_lod_bias #

fn (s &GeometryInstance3D) get_lod_bias() f64

fn (GeometryInstance3D) set_transparency #

fn (s &GeometryInstance3D) set_transparency(transparency f64)

fn (GeometryInstance3D) get_transparency #

fn (s &GeometryInstance3D) get_transparency() f64

fn (GeometryInstance3D) set_visibility_range_end_margin #

fn (s &GeometryInstance3D) set_visibility_range_end_margin(distance f64)

fn (GeometryInstance3D) get_visibility_range_end_margin #

fn (s &GeometryInstance3D) get_visibility_range_end_margin() f64

fn (GeometryInstance3D) set_visibility_range_end #

fn (s &GeometryInstance3D) set_visibility_range_end(distance f64)

fn (GeometryInstance3D) get_visibility_range_end #

fn (s &GeometryInstance3D) get_visibility_range_end() f64

fn (GeometryInstance3D) set_visibility_range_begin_margin #

fn (s &GeometryInstance3D) set_visibility_range_begin_margin(distance f64)

fn (GeometryInstance3D) get_visibility_range_begin_margin #

fn (s &GeometryInstance3D) get_visibility_range_begin_margin() f64

fn (GeometryInstance3D) set_visibility_range_begin #

fn (s &GeometryInstance3D) set_visibility_range_begin(distance f64)

fn (GeometryInstance3D) get_visibility_range_begin #

fn (s &GeometryInstance3D) get_visibility_range_begin() f64

fn (GeometryInstance3D) set_visibility_range_fade_mode #

fn (s &GeometryInstance3D) set_visibility_range_fade_mode(mode GeometryInstance3DVisibilityRangeFadeMode)

fn (GeometryInstance3D) get_visibility_range_fade_mode #

fn (s &GeometryInstance3D) get_visibility_range_fade_mode() GeometryInstance3DVisibilityRangeFadeMode

fn (GeometryInstance3D) set_instance_shader_parameter #

fn (s &GeometryInstance3D) set_instance_shader_parameter(name string, value_ ToVariant)

Set the value of a shader uniform for this instance only ([url=$DOCS_URL/tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms]per-instance uniform[/url]). See also [method ShaderMaterial.set_shader_parameter] to assign a uniform on all instances using the same [ShaderMaterial]. [b]Note:[/b] For a shader uniform to be assignable on a per-instance basis, it [i]must[/i] be defined with instance uniform ... rather than uniform ... in the shader code. [b]Note:[/b] [param name] is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). [b]Note:[/b] Per-instance shader uniforms are only available in Spatial and CanvasItem shaders, but not for Fog, Sky, or Particles shaders.

fn (GeometryInstance3D) get_instance_shader_parameter #

fn (s &GeometryInstance3D) get_instance_shader_parameter(name string) Variant

Get the value of a shader parameter as set on this instance.

fn (GeometryInstance3D) set_extra_cull_margin #

fn (s &GeometryInstance3D) set_extra_cull_margin(margin f64)

fn (GeometryInstance3D) get_extra_cull_margin #

fn (s &GeometryInstance3D) get_extra_cull_margin() f64

fn (GeometryInstance3D) set_lightmap_texel_scale #

fn (s &GeometryInstance3D) set_lightmap_texel_scale(scale f64)

fn (GeometryInstance3D) get_lightmap_texel_scale #

fn (s &GeometryInstance3D) get_lightmap_texel_scale() f64

fn (GeometryInstance3D) set_lightmap_scale #

fn (s &GeometryInstance3D) set_lightmap_scale(scale GeometryInstance3DLightmapScale)

fn (GeometryInstance3D) get_lightmap_scale #

fn (s &GeometryInstance3D) get_lightmap_scale() GeometryInstance3DLightmapScale

fn (GeometryInstance3D) set_gi_mode #

fn (s &GeometryInstance3D) set_gi_mode(mode GeometryInstance3DGIMode)

fn (GeometryInstance3D) get_gi_mode #

fn (s &GeometryInstance3D) get_gi_mode() GeometryInstance3DGIMode

fn (GeometryInstance3D) set_ignore_occlusion_culling #

fn (s &GeometryInstance3D) set_ignore_occlusion_culling(ignore_culling bool)

fn (GeometryInstance3D) is_ignoring_occlusion_culling #

fn (s &GeometryInstance3D) is_ignoring_occlusion_culling() bool

fn (GeometryInstance3D) set_custom_aabb #

fn (s &GeometryInstance3D) set_custom_aabb(aabb AABB)

fn (GeometryInstance3D) get_custom_aabb #

fn (s &GeometryInstance3D) get_custom_aabb() AABB

struct Glyph #

struct Glyph {
pub mut:
	start     i64 = -1
	end       i64 = -1
	count     u8
	repeat    u8 = 1
	flags     u16
	x_off     f64
	y_off     f64
	advance   f64
	font_rid  RID
	font_size i64
	index     i32
}

struct Gradient #

struct Gradient {
	Resource
}

A color transition.

fn (Gradient) to_variant #

fn (s &Gradient) to_variant() Variant

fn (Gradient) from_variant #

fn (mut s Gradient) from_variant(variant &Variant)

fn (Gradient) add_point #

fn (s &Gradient) add_point(offset f64, color Color)

Adds the specified color to the gradient, with the specified offset.

fn (Gradient) remove_point #

fn (s &Gradient) remove_point(point i64)

Removes the color at index [param point].

fn (Gradient) set_offset #

fn (s &Gradient) set_offset(point i64, offset f64)

Sets the offset for the gradient color at index [param point].

fn (Gradient) get_offset #

fn (s &Gradient) get_offset(point i64) f64

Returns the offset of the gradient color at index [param point].

fn (Gradient) reverse #

fn (s &Gradient) reverse()

Reverses/mirrors the gradient. [b]Note:[/b] This method mirrors all points around the middle of the gradient, which may produce unexpected results when [member interpolation_mode] is set to [constant GRADIENT_INTERPOLATE_CONSTANT].

fn (Gradient) set_color #

fn (s &Gradient) set_color(point i64, color Color)

Sets the color of the gradient color at index [param point].

fn (Gradient) get_color #

fn (s &Gradient) get_color(point i64) Color

Returns the color of the gradient color at index [param point].

fn (Gradient) sample #

fn (s &Gradient) sample(offset f64) Color

Returns the interpolated color specified by [param offset].

fn (Gradient) get_point_count #

fn (s &Gradient) get_point_count() i64

Returns the number of colors in the gradient.

fn (Gradient) set_offsets #

fn (s &Gradient) set_offsets(offsets PackedFloat32Array)

fn (Gradient) get_offsets #

fn (s &Gradient) get_offsets() PackedFloat32Array

fn (Gradient) set_colors #

fn (s &Gradient) set_colors(colors PackedColorArray)

fn (Gradient) get_colors #

fn (s &Gradient) get_colors() PackedColorArray

fn (Gradient) set_interpolation_mode #

fn (s &Gradient) set_interpolation_mode(interpolation_mode GradientInterpolationMode)

fn (Gradient) get_interpolation_mode #

fn (s &Gradient) get_interpolation_mode() GradientInterpolationMode

fn (Gradient) set_interpolation_color_space #

fn (s &Gradient) set_interpolation_color_space(interpolation_color_space GradientColorSpace)

fn (Gradient) get_interpolation_color_space #

fn (s &Gradient) get_interpolation_color_space() GradientColorSpace

struct GradientTexture1D #

struct GradientTexture1D {
	Texture2D
}

A 1D texture that uses colors obtained from a [Gradient].

fn (GradientTexture1D) to_variant #

fn (s &GradientTexture1D) to_variant() Variant

fn (GradientTexture1D) from_variant #

fn (mut s GradientTexture1D) from_variant(variant &Variant)

fn (GradientTexture1D) set_gradient #

fn (s &GradientTexture1D) set_gradient(gradient Gradient)

fn (GradientTexture1D) get_gradient #

fn (s &GradientTexture1D) get_gradient() Gradient

fn (GradientTexture1D) set_width #

fn (s &GradientTexture1D) set_width(width i64)

fn (GradientTexture1D) set_use_hdr #

fn (s &GradientTexture1D) set_use_hdr(enabled bool)

fn (GradientTexture1D) is_using_hdr #

fn (s &GradientTexture1D) is_using_hdr() bool

struct GradientTexture2D #

struct GradientTexture2D {
	Texture2D
}

A 2D texture that creates a pattern with colors obtained from a [Gradient].

fn (GradientTexture2D) to_variant #

fn (s &GradientTexture2D) to_variant() Variant

fn (GradientTexture2D) from_variant #

fn (mut s GradientTexture2D) from_variant(variant &Variant)

fn (GradientTexture2D) set_gradient #

fn (s &GradientTexture2D) set_gradient(gradient Gradient)

fn (GradientTexture2D) get_gradient #

fn (s &GradientTexture2D) get_gradient() Gradient

fn (GradientTexture2D) set_width #

fn (s &GradientTexture2D) set_width(width i64)

fn (GradientTexture2D) set_height #

fn (s &GradientTexture2D) set_height(height i64)

fn (GradientTexture2D) set_use_hdr #

fn (s &GradientTexture2D) set_use_hdr(enabled bool)

fn (GradientTexture2D) is_using_hdr #

fn (s &GradientTexture2D) is_using_hdr() bool

fn (GradientTexture2D) set_fill #

fn (s &GradientTexture2D) set_fill(fill GradientTexture2DFill)

fn (GradientTexture2D) get_fill #

fn (s &GradientTexture2D) get_fill() GradientTexture2DFill

fn (GradientTexture2D) set_fill_from #

fn (s &GradientTexture2D) set_fill_from(fill_from Vector2)

fn (GradientTexture2D) get_fill_from #

fn (s &GradientTexture2D) get_fill_from() Vector2

fn (GradientTexture2D) set_fill_to #

fn (s &GradientTexture2D) set_fill_to(fill_to Vector2)

fn (GradientTexture2D) get_fill_to #

fn (s &GradientTexture2D) get_fill_to() Vector2

fn (GradientTexture2D) set_repeat #

fn (s &GradientTexture2D) set_repeat(repeat GradientTexture2DRepeat)

fn (GradientTexture2D) get_repeat #

fn (s &GradientTexture2D) get_repeat() GradientTexture2DRepeat

struct GraphEdit #

struct GraphEdit {
	Control
}

An editor for graph-like structures, using [GraphNode]s.

fn (GraphEdit) to_variant #

fn (s &GraphEdit) to_variant() Variant

fn (GraphEdit) from_variant #

fn (mut s GraphEdit) from_variant(variant &Variant)

fn (GraphEdit) gd_is_in_input_hotzone #

fn (s &GraphEdit) gd_is_in_input_hotzone(in_node Object, in_port i64, mouse_position Vector2) bool

Returns whether the [param mouse_position] is in the input hot zone. By default, a hot zone is a [Rect2] positioned such that its center is at [param in_node].[method GraphNode.get_input_port_position]([param in_port]) (For output's case, call [method GraphNode.get_output_port_position] instead). The hot zone's width is twice the Theme Property port_grab_distance_horizontal, and its height is twice the port_grab_distance_vertical. Below is a sample code to help get started:

func _is_in_input_hotzone(in_node, in_port, mouse_position):
var port_size = Vector2(get_theme_constant('port_grab_distance_horizontal'), get_theme_constant('port_grab_distance_vertical'))
var port_pos = in_node.get_position() + in_node.get_input_port_position(in_port) - port_size / 2
var rect = Rect2(port_pos, port_size)

return rect.has_point(mouse_position)

fn (GraphEdit) gd_is_in_output_hotzone #

fn (s &GraphEdit) gd_is_in_output_hotzone(in_node Object, in_port i64, mouse_position Vector2) bool

Returns whether the [param mouse_position] is in the output hot zone. For more information on hot zones, see [method _is_in_input_hotzone]. Below is a sample code to help get started:

func _is_in_output_hotzone(in_node, in_port, mouse_position):
var port_size = Vector2(get_theme_constant('port_grab_distance_horizontal'), get_theme_constant('port_grab_distance_vertical'))
var port_pos = in_node.get_position() + in_node.get_output_port_position(in_port) - port_size / 2
var rect = Rect2(port_pos, port_size)

return rect.has_point(mouse_position)

fn (GraphEdit) gd_get_connection_line #

fn (s &GraphEdit) gd_get_connection_line(from_position Vector2, to_position Vector2) PackedVector2Array

Virtual method which can be overridden to customize how connections are drawn.

fn (GraphEdit) gd_is_node_hover_valid #

fn (s &GraphEdit) gd_is_node_hover_valid(from_node string, from_port i64, to_node string, to_port i64) bool

This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port. Return true if the connection is indeed valid or return false if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen. In this example a connection to same node is suppressed: [codeblocks] [gdscript] func _is_node_hover_valid(from, from_port, to, to_port): return from != to [/gdscript] [csharp] public override bool _IsNodeHoverValid(StringName fromNode, int fromPort, StringName toNode, int toPort) { return fromNode != toNode; } [/csharp] [/codeblocks]

fn (GraphEdit) connect_node #

fn (s &GraphEdit) connect_node(from_node string, from_port i64, to_node string, to_port i64, cfg GraphEdit_connect_node_Cfg) GDError

Create a connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode]. If the connection already exists, no connection is created. Connections with [param keep_alive] set to false may be deleted automatically if invalid during a redraw.

fn (GraphEdit) is_node_connected #

fn (s &GraphEdit) is_node_connected(from_node string, from_port i64, to_node string, to_port i64) bool

Returns true if the [param from_port] of the [param from_node] [GraphNode] is connected to the [param to_port] of the [param to_node] [GraphNode].

fn (GraphEdit) disconnect_node #

fn (s &GraphEdit) disconnect_node(from_node string, from_port i64, to_node string, to_port i64)

Removes the connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode]. If the connection does not exist, no connection is removed.

fn (GraphEdit) set_connection_activity #

fn (s &GraphEdit) set_connection_activity(from_node string, from_port i64, to_node string, to_port i64, amount f64)

Sets the coloration of the connection between [param from_node]'s [param from_port] and [param to_node]'s [param to_port] with the color provided in the [theme_item activity] theme property. The color is linearly interpolated between the connection color and the activity color using [param amount] as weight.

fn (GraphEdit) set_connections #

fn (s &GraphEdit) set_connections(connections Array)

fn (GraphEdit) get_connection_list #

fn (s &GraphEdit) get_connection_list() Array

fn (GraphEdit) get_connection_count #

fn (s &GraphEdit) get_connection_count(from_node string, from_port i64) i64

Returns the number of connections from [param from_port] of [param from_node].

fn (GraphEdit) get_closest_connection_at_point #

fn (s &GraphEdit) get_closest_connection_at_point(point Vector2, cfg GraphEdit_get_closest_connection_at_point_Cfg) Dictionary

Returns the closest connection to the given point in screen space. If no connection is found within [param max_distance] pixels, an empty [Dictionary] is returned. A connection is represented as a [Dictionary] in the form of:

{
from_node: StringName,
from_port: int,
to_node: StringName,
to_port: int,
keep_alive: bool
}

For example, getting a connection at a given mouse position can be achieved like this: [codeblocks] [gdscript] var connection = get_closest_connection_at_point(mouse_event.get_position()) [/gdscript] [/codeblocks]

fn (GraphEdit) get_connection_list_from_node #

fn (s &GraphEdit) get_connection_list_from_node(node string) Array

Returns an [Array] containing a list of all connections for [param node]. A connection is represented as a [Dictionary] in the form of:

{
from_node: StringName,
from_port: int,
to_node: StringName,
to_port: int,
keep_alive: bool
}

fn (GraphEdit) get_connections_intersecting_with_rect #

fn (s &GraphEdit) get_connections_intersecting_with_rect(rect Rect2) Array

Returns an [Array] containing the list of connections that intersect with the given [Rect2]. A connection is represented as a [Dictionary] in the form of:

{
from_node: StringName,
from_port: int,
to_node: StringName,
to_port: int,
keep_alive: bool
}

fn (GraphEdit) clear_connections #

fn (s &GraphEdit) clear_connections()

Removes all connections between nodes.

fn (GraphEdit) force_connection_drag_end #

fn (s &GraphEdit) force_connection_drag_end()

Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor. This is best used together with [signal connection_drag_started] and [signal connection_drag_ended] to add custom behavior like node addition through shortcuts. [b]Note:[/b] This method suppresses any other connection request signals apart from [signal connection_drag_ended].

fn (GraphEdit) get_scroll_offset #

fn (s &GraphEdit) get_scroll_offset() Vector2

fn (GraphEdit) set_scroll_offset #

fn (s &GraphEdit) set_scroll_offset(offset Vector2)

fn (GraphEdit) add_valid_right_disconnect_type #

fn (s &GraphEdit) add_valid_right_disconnect_type(gd_type i64)

Allows to disconnect nodes when dragging from the right port of the [GraphNode]'s slot if it has the specified type. See also [method remove_valid_right_disconnect_type].

fn (GraphEdit) remove_valid_right_disconnect_type #

fn (s &GraphEdit) remove_valid_right_disconnect_type(gd_type i64)

Disallows to disconnect nodes when dragging from the right port of the [GraphNode]'s slot if it has the specified type. Use this to disable disconnection previously allowed with [method add_valid_right_disconnect_type].

fn (GraphEdit) add_valid_left_disconnect_type #

fn (s &GraphEdit) add_valid_left_disconnect_type(gd_type i64)

Allows to disconnect nodes when dragging from the left port of the [GraphNode]'s slot if it has the specified type. See also [method remove_valid_left_disconnect_type].

fn (GraphEdit) remove_valid_left_disconnect_type #

fn (s &GraphEdit) remove_valid_left_disconnect_type(gd_type i64)

Disallows to disconnect nodes when dragging from the left port of the [GraphNode]'s slot if it has the specified type. Use this to disable disconnection previously allowed with [method add_valid_left_disconnect_type].

fn (GraphEdit) add_valid_connection_type #

fn (s &GraphEdit) add_valid_connection_type(from_type i64, to_type i64)

Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method. See also [method is_valid_connection_type] and [method remove_valid_connection_type].

fn (GraphEdit) remove_valid_connection_type #

fn (s &GraphEdit) remove_valid_connection_type(from_type i64, to_type i64)

Disallows the connection between two different port types previously allowed by [method add_valid_connection_type]. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method. See also [method is_valid_connection_type].

fn (GraphEdit) is_valid_connection_type #

fn (s &GraphEdit) is_valid_connection_type(from_type i64, to_type i64) bool

Returns whether it's possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method. See also [method add_valid_connection_type] and [method remove_valid_connection_type].

fn (GraphEdit) get_connection_line #

fn (s &GraphEdit) get_connection_line(from_node Vector2, to_node Vector2) PackedVector2Array

Returns the points which would make up a connection between [param from_node] and [param to_node].

fn (GraphEdit) attach_graph_element_to_frame #

fn (s &GraphEdit) attach_graph_element_to_frame(element string, frame string)

Attaches the [param element] [GraphElement] to the [param frame] [GraphFrame].

fn (GraphEdit) detach_graph_element_from_frame #

fn (s &GraphEdit) detach_graph_element_from_frame(element string)

Detaches the [param element] [GraphElement] from the [GraphFrame] it is currently attached to.

fn (GraphEdit) get_element_frame #

fn (s &GraphEdit) get_element_frame(element string) GraphFrame

Returns the [GraphFrame] that contains the [GraphElement] with the given name.

fn (GraphEdit) get_attached_nodes_of_frame #

fn (s &GraphEdit) get_attached_nodes_of_frame(frame string) Array

Returns an array of node names that are attached to the [GraphFrame] with the given name.

fn (GraphEdit) set_panning_scheme #

fn (s &GraphEdit) set_panning_scheme(scheme GraphEditPanningScheme)

fn (GraphEdit) get_panning_scheme #

fn (s &GraphEdit) get_panning_scheme() GraphEditPanningScheme

fn (GraphEdit) set_zoom #

fn (s &GraphEdit) set_zoom(zoom f64)

fn (GraphEdit) get_zoom #

fn (s &GraphEdit) get_zoom() f64

fn (GraphEdit) set_zoom_min #

fn (s &GraphEdit) set_zoom_min(zoom_min f64)

fn (GraphEdit) get_zoom_min #

fn (s &GraphEdit) get_zoom_min() f64

fn (GraphEdit) set_zoom_max #

fn (s &GraphEdit) set_zoom_max(zoom_max f64)

fn (GraphEdit) get_zoom_max #

fn (s &GraphEdit) get_zoom_max() f64

fn (GraphEdit) set_zoom_step #

fn (s &GraphEdit) set_zoom_step(zoom_step f64)

fn (GraphEdit) get_zoom_step #

fn (s &GraphEdit) get_zoom_step() f64

fn (GraphEdit) set_show_grid #

fn (s &GraphEdit) set_show_grid(enable bool)

fn (GraphEdit) is_showing_grid #

fn (s &GraphEdit) is_showing_grid() bool

fn (GraphEdit) set_grid_pattern #

fn (s &GraphEdit) set_grid_pattern(pattern GraphEditGridPattern)

fn (GraphEdit) get_grid_pattern #

fn (s &GraphEdit) get_grid_pattern() GraphEditGridPattern

fn (GraphEdit) set_snapping_enabled #

fn (s &GraphEdit) set_snapping_enabled(enable bool)

fn (GraphEdit) is_snapping_enabled #

fn (s &GraphEdit) is_snapping_enabled() bool

fn (GraphEdit) set_snapping_distance #

fn (s &GraphEdit) set_snapping_distance(pixels i64)

fn (GraphEdit) get_snapping_distance #

fn (s &GraphEdit) get_snapping_distance() i64

fn (GraphEdit) set_connection_lines_curvature #

fn (s &GraphEdit) set_connection_lines_curvature(curvature f64)

fn (GraphEdit) get_connection_lines_curvature #

fn (s &GraphEdit) get_connection_lines_curvature() f64

fn (GraphEdit) set_connection_lines_thickness #

fn (s &GraphEdit) set_connection_lines_thickness(pixels f64)

fn (GraphEdit) get_connection_lines_thickness #

fn (s &GraphEdit) get_connection_lines_thickness() f64

fn (GraphEdit) set_connection_lines_antialiased #

fn (s &GraphEdit) set_connection_lines_antialiased(pixels bool)

fn (GraphEdit) is_connection_lines_antialiased #

fn (s &GraphEdit) is_connection_lines_antialiased() bool

fn (GraphEdit) set_minimap_size #

fn (s &GraphEdit) set_minimap_size(size Vector2)

fn (GraphEdit) get_minimap_size #

fn (s &GraphEdit) get_minimap_size() Vector2

fn (GraphEdit) set_minimap_opacity #

fn (s &GraphEdit) set_minimap_opacity(opacity f64)

fn (GraphEdit) get_minimap_opacity #

fn (s &GraphEdit) get_minimap_opacity() f64

fn (GraphEdit) set_minimap_enabled #

fn (s &GraphEdit) set_minimap_enabled(enable bool)

fn (GraphEdit) is_minimap_enabled #

fn (s &GraphEdit) is_minimap_enabled() bool

fn (GraphEdit) set_show_menu #

fn (s &GraphEdit) set_show_menu(hidden bool)

fn (GraphEdit) is_showing_menu #

fn (s &GraphEdit) is_showing_menu() bool

fn (GraphEdit) set_show_zoom_label #

fn (s &GraphEdit) set_show_zoom_label(enable bool)

fn (GraphEdit) is_showing_zoom_label #

fn (s &GraphEdit) is_showing_zoom_label() bool

fn (GraphEdit) set_show_grid_buttons #

fn (s &GraphEdit) set_show_grid_buttons(hidden bool)

fn (GraphEdit) is_showing_grid_buttons #

fn (s &GraphEdit) is_showing_grid_buttons() bool

fn (GraphEdit) set_show_zoom_buttons #

fn (s &GraphEdit) set_show_zoom_buttons(hidden bool)

fn (GraphEdit) is_showing_zoom_buttons #

fn (s &GraphEdit) is_showing_zoom_buttons() bool

fn (GraphEdit) set_show_minimap_button #

fn (s &GraphEdit) set_show_minimap_button(hidden bool)

fn (GraphEdit) is_showing_minimap_button #

fn (s &GraphEdit) is_showing_minimap_button() bool

fn (GraphEdit) set_show_arrange_button #

fn (s &GraphEdit) set_show_arrange_button(hidden bool)

fn (GraphEdit) is_showing_arrange_button #

fn (s &GraphEdit) is_showing_arrange_button() bool

fn (GraphEdit) set_right_disconnects #

fn (s &GraphEdit) set_right_disconnects(enable bool)

fn (GraphEdit) is_right_disconnects_enabled #

fn (s &GraphEdit) is_right_disconnects_enabled() bool

fn (GraphEdit) set_type_names #

fn (s &GraphEdit) set_type_names(type_names Dictionary)

fn (GraphEdit) get_type_names #

fn (s &GraphEdit) get_type_names() Dictionary

fn (GraphEdit) get_menu_hbox #

fn (s &GraphEdit) get_menu_hbox() HBoxContainer

Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. You can use this method to reposition the toolbar or to add your own custom controls to it. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (GraphEdit) arrange_nodes #

fn (s &GraphEdit) arrange_nodes()

Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes.

fn (GraphEdit) set_selected #

fn (s &GraphEdit) set_selected(node Node)

Sets the specified [param node] as the one selected.

struct GraphEdit_connect_node_Cfg #

@[params]
struct GraphEdit_connect_node_Cfg {
pub:
	keep_alive bool
}

Optional parameters for GraphEdit#connect_node

struct GraphEdit_get_closest_connection_at_point_Cfg #

@[params]
struct GraphEdit_get_closest_connection_at_point_Cfg {
pub:
	max_distance f64 = 4.0
}

Optional parameters for GraphEdit#get_closest_connection_at_point

struct GraphElement #

struct GraphElement {
	Container
}

A container that represents a basic element that can be placed inside a [GraphEdit] control.

fn (GraphElement) to_variant #

fn (s &GraphElement) to_variant() Variant

fn (GraphElement) from_variant #

fn (mut s GraphElement) from_variant(variant &Variant)

fn (GraphElement) set_resizable #

fn (s &GraphElement) set_resizable(resizable bool)

fn (GraphElement) is_resizable #

fn (s &GraphElement) is_resizable() bool

fn (GraphElement) set_draggable #

fn (s &GraphElement) set_draggable(draggable bool)

fn (GraphElement) is_draggable #

fn (s &GraphElement) is_draggable() bool

fn (GraphElement) set_selectable #

fn (s &GraphElement) set_selectable(selectable bool)

fn (GraphElement) is_selectable #

fn (s &GraphElement) is_selectable() bool

fn (GraphElement) set_selected #

fn (s &GraphElement) set_selected(selected bool)

fn (GraphElement) is_selected #

fn (s &GraphElement) is_selected() bool

fn (GraphElement) set_position_offset #

fn (s &GraphElement) set_position_offset(offset Vector2)

fn (GraphElement) get_position_offset #

fn (s &GraphElement) get_position_offset() Vector2

struct GraphFrame #

struct GraphFrame {
	GraphElement
}

GraphFrame is a special [GraphElement] that can be used to organize other [GraphElement]s inside a [GraphEdit].

fn (GraphFrame) to_variant #

fn (s &GraphFrame) to_variant() Variant

fn (GraphFrame) from_variant #

fn (mut s GraphFrame) from_variant(variant &Variant)

fn (GraphFrame) set_title #

fn (s &GraphFrame) set_title(title string)

fn (GraphFrame) get_title #

fn (s &GraphFrame) get_title() string

fn (GraphFrame) get_titlebar_hbox #

fn (s &GraphFrame) get_titlebar_hbox() HBoxContainer

Returns the [HBoxContainer] used for the title bar, only containing a [Label] for displaying the title by default. This can be used to add custom controls to the title bar such as option or close buttons.

fn (GraphFrame) set_autoshrink_enabled #

fn (s &GraphFrame) set_autoshrink_enabled(shrink bool)

fn (GraphFrame) is_autoshrink_enabled #

fn (s &GraphFrame) is_autoshrink_enabled() bool

fn (GraphFrame) set_autoshrink_margin #

fn (s &GraphFrame) set_autoshrink_margin(autoshrink_margin i64)

fn (GraphFrame) get_autoshrink_margin #

fn (s &GraphFrame) get_autoshrink_margin() i64

fn (GraphFrame) set_drag_margin #

fn (s &GraphFrame) set_drag_margin(drag_margin i64)

fn (GraphFrame) get_drag_margin #

fn (s &GraphFrame) get_drag_margin() i64

fn (GraphFrame) set_tint_color_enabled #

fn (s &GraphFrame) set_tint_color_enabled(enable bool)

fn (GraphFrame) is_tint_color_enabled #

fn (s &GraphFrame) is_tint_color_enabled() bool

fn (GraphFrame) set_tint_color #

fn (s &GraphFrame) set_tint_color(color Color)

fn (GraphFrame) get_tint_color #

fn (s &GraphFrame) get_tint_color() Color

struct GraphNode #

struct GraphNode {
	GraphElement
}

A container with connection ports, representing a node in a [GraphEdit].

fn (GraphNode) to_variant #

fn (s &GraphNode) to_variant() Variant

fn (GraphNode) from_variant #

fn (mut s GraphNode) from_variant(variant &Variant)

fn (GraphNode) gd_draw_port #

fn (s &GraphNode) gd_draw_port(slot_index i64, position Vector2i, left bool, color Color)

fn (GraphNode) set_title #

fn (s &GraphNode) set_title(title string)

fn (GraphNode) get_title #

fn (s &GraphNode) get_title() string

fn (GraphNode) get_titlebar_hbox #

fn (s &GraphNode) get_titlebar_hbox() HBoxContainer

Returns the [HBoxContainer] used for the title bar, only containing a [Label] for displaying the title by default. This can be used to add custom controls to the title bar such as option or close buttons.

fn (GraphNode) set_slot #

fn (s &GraphNode) set_slot(slot_index i64, enable_left_port bool, type_left i64, color_left Color, enable_right_port bool, type_right i64, color_right Color, cfg GraphNode_set_slot_Cfg)

Sets properties of the slot with the given [param slot_index]. If [param enable_left_port]/[param enable_right_port] is true, a port will appear and the slot will be able to be connected from this side. With [param type_left]/[param type_right] an arbitrary type can be assigned to each port. Two ports can be connected if they share the same type, or if the connection between their types is allowed in the parent [GraphEdit] (see [method GraphEdit.add_valid_connection_type]). Keep in mind that the [GraphEdit] has the final say in accepting the connection. Type compatibility simply allows the [signal GraphEdit.connection_request] signal to be emitted. Ports can be further customized using [param color_left]/[param color_right] and [param custom_icon_left]/[param custom_icon_right]. The color parameter adds a tint to the icon. The custom icon can be used to override the default port dot. Additionally, [param draw_stylebox] can be used to enable or disable drawing of the background stylebox for each slot. See [theme_item slot]. Individual properties can also be set using one of the set_slot_* methods. [b]Note:[/b] This method only sets properties of the slot. To create the slot itself, add a [Control]-derived child to the GraphNode.

fn (GraphNode) clear_slot #

fn (s &GraphNode) clear_slot(slot_index i64)

Disables the slot with the given [param slot_index]. This will remove the corresponding input and output port from the GraphNode.

fn (GraphNode) clear_all_slots #

fn (s &GraphNode) clear_all_slots()

Disables all slots of the GraphNode. This will remove all input/output ports from the GraphNode.

fn (GraphNode) is_slot_enabled_left #

fn (s &GraphNode) is_slot_enabled_left(slot_index i64) bool

Returns true if left (input) side of the slot with the given [param slot_index] is enabled.

fn (GraphNode) set_slot_enabled_left #

fn (s &GraphNode) set_slot_enabled_left(slot_index i64, enable bool)

Toggles the left (input) side of the slot with the given [param slot_index]. If [param enable] is true, a port will appear on the left side and the slot will be able to be connected from this side.

fn (GraphNode) set_slot_type_left #

fn (s &GraphNode) set_slot_type_left(slot_index i64, gd_type i64)

Sets the left (input) type of the slot with the given [param slot_index] to [param type]. If the value is negative, all connections will be disallowed to be created via user inputs.

fn (GraphNode) get_slot_type_left #

fn (s &GraphNode) get_slot_type_left(slot_index i64) i64

Returns the left (input) type of the slot with the given [param slot_index].

fn (GraphNode) set_slot_color_left #

fn (s &GraphNode) set_slot_color_left(slot_index i64, color Color)

Sets the [Color] of the left (input) side of the slot with the given [param slot_index] to [param color].

fn (GraphNode) get_slot_color_left #

fn (s &GraphNode) get_slot_color_left(slot_index i64) Color

Returns the left (input) [Color] of the slot with the given [param slot_index].

fn (GraphNode) set_slot_custom_icon_left #

fn (s &GraphNode) set_slot_custom_icon_left(slot_index i64, custom_icon Texture2D)

Sets the custom [Texture2D] of the left (input) side of the slot with the given [param slot_index] to [param custom_icon].

fn (GraphNode) get_slot_custom_icon_left #

fn (s &GraphNode) get_slot_custom_icon_left(slot_index i64) Texture2D

Returns the left (input) custom [Texture2D] of the slot with the given [param slot_index].

fn (GraphNode) is_slot_enabled_right #

fn (s &GraphNode) is_slot_enabled_right(slot_index i64) bool

Returns true if right (output) side of the slot with the given [param slot_index] is enabled.

fn (GraphNode) set_slot_enabled_right #

fn (s &GraphNode) set_slot_enabled_right(slot_index i64, enable bool)

Toggles the right (output) side of the slot with the given [param slot_index]. If [param enable] is true, a port will appear on the right side and the slot will be able to be connected from this side.

fn (GraphNode) set_slot_type_right #

fn (s &GraphNode) set_slot_type_right(slot_index i64, gd_type i64)

Sets the right (output) type of the slot with the given [param slot_index] to [param type]. If the value is negative, all connections will be disallowed to be created via user inputs.

fn (GraphNode) get_slot_type_right #

fn (s &GraphNode) get_slot_type_right(slot_index i64) i64

Returns the right (output) type of the slot with the given [param slot_index].

fn (GraphNode) set_slot_color_right #

fn (s &GraphNode) set_slot_color_right(slot_index i64, color Color)

Sets the [Color] of the right (output) side of the slot with the given [param slot_index] to [param color].

fn (GraphNode) get_slot_color_right #

fn (s &GraphNode) get_slot_color_right(slot_index i64) Color

Returns the right (output) [Color] of the slot with the given [param slot_index].

fn (GraphNode) set_slot_custom_icon_right #

fn (s &GraphNode) set_slot_custom_icon_right(slot_index i64, custom_icon Texture2D)

Sets the custom [Texture2D] of the right (output) side of the slot with the given [param slot_index] to [param custom_icon].

fn (GraphNode) get_slot_custom_icon_right #

fn (s &GraphNode) get_slot_custom_icon_right(slot_index i64) Texture2D

Returns the right (output) custom [Texture2D] of the slot with the given [param slot_index].

fn (GraphNode) is_slot_draw_stylebox #

fn (s &GraphNode) is_slot_draw_stylebox(slot_index i64) bool

Returns true if the background [StyleBox] of the slot with the given [param slot_index] is drawn.

fn (GraphNode) set_slot_draw_stylebox #

fn (s &GraphNode) set_slot_draw_stylebox(slot_index i64, enable bool)

Toggles the background [StyleBox] of the slot with the given [param slot_index].

fn (GraphNode) set_ignore_invalid_connection_type #

fn (s &GraphNode) set_ignore_invalid_connection_type(ignore bool)

fn (GraphNode) is_ignoring_valid_connection_type #

fn (s &GraphNode) is_ignoring_valid_connection_type() bool

fn (GraphNode) get_input_port_count #

fn (s &GraphNode) get_input_port_count() i64

Returns the number of slots with an enabled input port.

fn (GraphNode) get_input_port_position #

fn (s &GraphNode) get_input_port_position(port_idx i64) Vector2

Returns the position of the input port with the given [param port_idx].

fn (GraphNode) get_input_port_type #

fn (s &GraphNode) get_input_port_type(port_idx i64) i64

Returns the type of the input port with the given [param port_idx].

fn (GraphNode) get_input_port_color #

fn (s &GraphNode) get_input_port_color(port_idx i64) Color

Returns the [Color] of the input port with the given [param port_idx].

fn (GraphNode) get_input_port_slot #

fn (s &GraphNode) get_input_port_slot(port_idx i64) i64

Returns the corresponding slot index of the input port with the given [param port_idx].

fn (GraphNode) get_output_port_count #

fn (s &GraphNode) get_output_port_count() i64

Returns the number of slots with an enabled output port.

fn (GraphNode) get_output_port_position #

fn (s &GraphNode) get_output_port_position(port_idx i64) Vector2

Returns the position of the output port with the given [param port_idx].

fn (GraphNode) get_output_port_type #

fn (s &GraphNode) get_output_port_type(port_idx i64) i64

Returns the type of the output port with the given [param port_idx].

fn (GraphNode) get_output_port_color #

fn (s &GraphNode) get_output_port_color(port_idx i64) Color

Returns the [Color] of the output port with the given [param port_idx].

fn (GraphNode) get_output_port_slot #

fn (s &GraphNode) get_output_port_slot(port_idx i64) i64

Returns the corresponding slot index of the output port with the given [param port_idx].

struct GraphNode_set_slot_Cfg #

@[params]
struct GraphNode_set_slot_Cfg {
pub:
	custom_icon_left  Texture2D
	custom_icon_right Texture2D
	draw_stylebox     bool
}

Optional parameters for GraphNode#set_slot

struct GridContainer #

struct GridContainer {
	Container
}

A container that arranges its child controls in a grid layout.

fn (GridContainer) to_variant #

fn (s &GridContainer) to_variant() Variant

fn (GridContainer) from_variant #

fn (mut s GridContainer) from_variant(variant &Variant)

fn (GridContainer) set_columns #

fn (s &GridContainer) set_columns(columns i64)

fn (GridContainer) get_columns #

fn (s &GridContainer) get_columns() i64

struct GridMap #

struct GridMap {
	Node3D
}

Node for 3D tile-based maps.

fn (GridMap) to_variant #

fn (s &GridMap) to_variant() Variant

fn (GridMap) from_variant #

fn (mut s GridMap) from_variant(variant &Variant)

fn (GridMap) set_collision_layer #

fn (s &GridMap) set_collision_layer(layer i64)

fn (GridMap) get_collision_layer #

fn (s &GridMap) get_collision_layer() i64

fn (GridMap) set_collision_mask #

fn (s &GridMap) set_collision_mask(mask i64)

fn (GridMap) get_collision_mask #

fn (s &GridMap) get_collision_mask() i64

fn (GridMap) set_collision_mask_value #

fn (s &GridMap) set_collision_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.

fn (GridMap) get_collision_mask_value #

fn (s &GridMap) get_collision_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (GridMap) set_collision_layer_value #

fn (s &GridMap) set_collision_layer_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.

fn (GridMap) get_collision_layer_value #

fn (s &GridMap) get_collision_layer_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.

fn (GridMap) set_collision_priority #

fn (s &GridMap) set_collision_priority(priority f64)

fn (GridMap) get_collision_priority #

fn (s &GridMap) get_collision_priority() f64

fn (GridMap) set_physics_material #

fn (s &GridMap) set_physics_material(material PhysicsMaterial)

fn (GridMap) get_physics_material #

fn (s &GridMap) get_physics_material() PhysicsMaterial

fn (GridMap) set_bake_navigation #

fn (s &GridMap) set_bake_navigation(bake_navigation bool)

fn (GridMap) is_baking_navigation #

fn (s &GridMap) is_baking_navigation() bool

fn (GridMap) set_navigation_map #

fn (s &GridMap) set_navigation_map(navigation_map RID)

Sets the [RID] of the navigation map this GridMap node should use for its cell baked navigation meshes.

fn (GridMap) get_navigation_map #

fn (s &GridMap) get_navigation_map() RID

Returns the [RID] of the navigation map this GridMap node uses for its cell baked navigation meshes. This function returns always the map set on the GridMap node and not the map on the NavigationServer. If the map is changed directly with the NavigationServer API the GridMap node will not be aware of the map change.

fn (GridMap) set_mesh_library #

fn (s &GridMap) set_mesh_library(mesh_library MeshLibrary)

fn (GridMap) get_mesh_library #

fn (s &GridMap) get_mesh_library() MeshLibrary

fn (GridMap) set_cell_size #

fn (s &GridMap) set_cell_size(size Vector3)

fn (GridMap) get_cell_size #

fn (s &GridMap) get_cell_size() Vector3

fn (GridMap) set_cell_scale #

fn (s &GridMap) set_cell_scale(scale f64)

fn (GridMap) get_cell_scale #

fn (s &GridMap) get_cell_scale() f64

fn (GridMap) set_octant_size #

fn (s &GridMap) set_octant_size(size i64)

fn (GridMap) get_octant_size #

fn (s &GridMap) get_octant_size() i64

fn (GridMap) set_cell_item #

fn (s &GridMap) set_cell_item(position Vector3i, item i64, cfg GridMap_set_cell_item_Cfg)

Sets the mesh index for the cell referenced by its grid coordinates. A negative item index such as [constant INVALID_CELL_ITEM] will clear the cell. Optionally, the item's orientation can be passed. For valid orientation values, see [method get_orthogonal_index_from_basis].

fn (GridMap) get_cell_item #

fn (s &GridMap) get_cell_item(position Vector3i) i64

The [MeshLibrary] item index located at the given grid coordinates. If the cell is empty, [constant INVALID_CELL_ITEM] will be returned.

fn (GridMap) get_cell_item_orientation #

fn (s &GridMap) get_cell_item_orientation(position Vector3i) i64

The orientation of the cell at the given grid coordinates. -1 is returned if the cell is empty.

fn (GridMap) get_cell_item_basis #

fn (s &GridMap) get_cell_item_basis(position Vector3i) Basis

Returns the basis that gives the specified cell its orientation.

fn (GridMap) get_basis_with_orthogonal_index #

fn (s &GridMap) get_basis_with_orthogonal_index(index i64) Basis

Returns one of 24 possible rotations that lie along the vectors (x,y,z) with each component being either -1, 0, or 1. For further details, refer to the Godot source code.

fn (GridMap) get_orthogonal_index_from_basis #

fn (s &GridMap) get_orthogonal_index_from_basis(basis Basis) i64

This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index (in the range from 0 to 23) of the point best representing the orientation of the object. For further details, refer to the Godot source code.

fn (GridMap) local_to_map #

fn (s &GridMap) local_to_map(local_position Vector3) Vector3i

Returns the map coordinates of the cell containing the given [param local_position]. If [param local_position] is in global coordinates, consider using [method Node3D.to_local] before passing it to this method. See also [method map_to_local].

fn (GridMap) map_to_local #

fn (s &GridMap) map_to_local(map_position Vector3i) Vector3

Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use [method Node3D.to_global]. See also [method local_to_map].

fn (GridMap) resource_changed #

fn (s &GridMap) resource_changed(resource Resource)

This method does nothing.

fn (GridMap) set_center_x #

fn (s &GridMap) set_center_x(enable bool)

fn (GridMap) get_center_x #

fn (s &GridMap) get_center_x() bool

fn (GridMap) set_center_y #

fn (s &GridMap) set_center_y(enable bool)

fn (GridMap) get_center_y #

fn (s &GridMap) get_center_y() bool

fn (GridMap) set_center_z #

fn (s &GridMap) set_center_z(enable bool)

fn (GridMap) get_center_z #

fn (s &GridMap) get_center_z() bool

fn (GridMap) clear #

fn (s &GridMap) clear()

Clear all cells.

fn (GridMap) get_used_cells #

fn (s &GridMap) get_used_cells() Array

Returns an array of [Vector3] with the non-empty cell coordinates in the grid map.

fn (GridMap) get_used_cells_by_item #

fn (s &GridMap) get_used_cells_by_item(item i64) Array

Returns an array of all cells with the given item index specified in [param item].

fn (GridMap) get_meshes #

fn (s &GridMap) get_meshes() Array

Returns an array of [Transform3D] and [Mesh] references corresponding to the non-empty cells in the grid. The transforms are specified in local space.

fn (GridMap) get_bake_meshes #

fn (s &GridMap) get_bake_meshes() Array

Returns an array of [ArrayMesh]es and [Transform3D] references of all bake meshes that exist within the current GridMap.

fn (GridMap) get_bake_mesh_instance #

fn (s &GridMap) get_bake_mesh_instance(idx i64) RID

Returns [RID] of a baked mesh with the given [param idx].

fn (GridMap) clear_baked_meshes #

fn (s &GridMap) clear_baked_meshes()

Clears all baked meshes. See [method make_baked_meshes].

fn (GridMap) make_baked_meshes #

fn (s &GridMap) make_baked_meshes(cfg GridMap_make_baked_meshes_Cfg)

Bakes lightmap data for all meshes in the assigned [MeshLibrary].

struct GridMapEditorPlugin #

struct GridMapEditorPlugin {
	EditorPlugin
}

Editor for [GridMap] nodes.

fn (GridMapEditorPlugin) to_variant #

fn (s &GridMapEditorPlugin) to_variant() Variant

fn (GridMapEditorPlugin) from_variant #

fn (mut s GridMapEditorPlugin) from_variant(variant &Variant)

fn (GridMapEditorPlugin) get_current_grid_map #

fn (s &GridMapEditorPlugin) get_current_grid_map() GridMap

Returns the [GridMap] node currently edited by the grid map editor.

fn (GridMapEditorPlugin) set_selection #

fn (s &GridMapEditorPlugin) set_selection(begin Vector3i, end Vector3i)

Selects the cells inside the given bounds from [param begin] to [param end].

fn (GridMapEditorPlugin) clear_selection #

fn (s &GridMapEditorPlugin) clear_selection()

Deselects any currently selected cells.

fn (GridMapEditorPlugin) get_selection #

fn (s &GridMapEditorPlugin) get_selection() AABB

Returns the cell coordinate bounds of the current selection. Use [method has_selection] to check if there is an active selection.

fn (GridMapEditorPlugin) has_selection #

fn (s &GridMapEditorPlugin) has_selection() bool

Returns true if there are selected cells.

fn (GridMapEditorPlugin) get_selected_cells #

fn (s &GridMapEditorPlugin) get_selected_cells() Array

Returns an array of [Vector3i]s with the selected cells' coordinates.

fn (GridMapEditorPlugin) set_selected_palette_item #

fn (s &GridMapEditorPlugin) set_selected_palette_item(item i64)

Selects the [MeshLibrary] item with the given index in the grid map editor's palette. If a negative index is given, no item will be selected. If a value greater than the last index is given, the last item will be selected. [b]Note:[/b] The indices might not be in the same order as they appear in the editor's interface.

fn (GridMapEditorPlugin) get_selected_palette_item #

fn (s &GridMapEditorPlugin) get_selected_palette_item() i64

Returns the index of the selected [MeshLibrary] item in the grid map editor's palette or -1 if no item is selected. [b]Note:[/b] The indices might not be in the same order as they appear in the editor's interface.

struct GridMap_make_baked_meshes_Cfg #

@[params]
struct GridMap_make_baked_meshes_Cfg {
pub:
	gen_lightmap_uv        bool
	lightmap_uv_texel_size f64 = 0.1
}

Optional parameters for GridMap#make_baked_meshes

struct GridMap_set_cell_item_Cfg #

@[params]
struct GridMap_set_cell_item_Cfg {
pub:
	orientation i64
}

Optional parameters for GridMap#set_cell_item

struct GrooveJoint2D #

struct GrooveJoint2D {
	Joint2D
}

A physics joint that restricts the movement of two 2D physics bodies to a fixed axis.

fn (GrooveJoint2D) to_variant #

fn (s &GrooveJoint2D) to_variant() Variant

fn (GrooveJoint2D) from_variant #

fn (mut s GrooveJoint2D) from_variant(variant &Variant)

fn (GrooveJoint2D) set_length #

fn (s &GrooveJoint2D) set_length(length f64)

fn (GrooveJoint2D) get_length #

fn (s &GrooveJoint2D) get_length() f64

fn (GrooveJoint2D) set_initial_offset #

fn (s &GrooveJoint2D) set_initial_offset(offset f64)

fn (GrooveJoint2D) get_initial_offset #

fn (s &GrooveJoint2D) get_initial_offset() f64

struct HBoxContainer #

struct HBoxContainer {
	BoxContainer
}

A container that arranges its child controls horizontally.

fn (HBoxContainer) to_variant #

fn (s &HBoxContainer) to_variant() Variant

fn (HBoxContainer) from_variant #

fn (mut s HBoxContainer) from_variant(variant &Variant)

struct HFlowContainer #

struct HFlowContainer {
	FlowContainer
}

A container that arranges its child controls horizontally and wraps them around at the borders.

fn (HFlowContainer) to_variant #

fn (s &HFlowContainer) to_variant() Variant

fn (HFlowContainer) from_variant #

fn (mut s HFlowContainer) from_variant(variant &Variant)

struct HMACContext #

struct HMACContext {
	RefCounted
}

Used to create an HMAC for a message using a key.

fn (HMACContext) to_variant #

fn (s &HMACContext) to_variant() Variant

fn (HMACContext) from_variant #

fn (mut s HMACContext) from_variant(variant &Variant)

fn (HMACContext) start #

fn (s &HMACContext) start(hash_type HashingContextHashType, key PackedByteArray) GDError

Initializes the HMACContext. This method cannot be called again on the same HMACContext until [method finish] has been called.

fn (HMACContext) update #

fn (s &HMACContext) update(data PackedByteArray) GDError

Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [param data] to the message, but cannot be called until [method start] has been called.

fn (HMACContext) finish #

fn (s &HMACContext) finish() PackedByteArray

Returns the resulting HMAC. If the HMAC failed, an empty [PackedByteArray] is returned.

struct HScrollBar #

struct HScrollBar {
	ScrollBar
}

A horizontal scrollbar that goes from left (min) to right (max).

fn (HScrollBar) to_variant #

fn (s &HScrollBar) to_variant() Variant

fn (HScrollBar) from_variant #

fn (mut s HScrollBar) from_variant(variant &Variant)

struct HSeparator #

struct HSeparator {
	Separator
}

A horizontal line used for separating other controls.

fn (HSeparator) to_variant #

fn (s &HSeparator) to_variant() Variant

fn (HSeparator) from_variant #

fn (mut s HSeparator) from_variant(variant &Variant)

struct HSlider #

struct HSlider {
	Slider
}

A horizontal slider that goes from left (min) to right (max).

fn (HSlider) to_variant #

fn (s &HSlider) to_variant() Variant

fn (HSlider) from_variant #

fn (mut s HSlider) from_variant(variant &Variant)

struct HSplitContainer #

struct HSplitContainer {
	SplitContainer
}

A container that splits two child controls horizontally and provides a grabber for adjusting the split ratio.

fn (HSplitContainer) to_variant #

fn (s &HSplitContainer) to_variant() Variant

fn (HSplitContainer) from_variant #

fn (mut s HSplitContainer) from_variant(variant &Variant)

struct HTTPClient #

struct HTTPClient {
	RefCounted
}

Low-level hyper-text transfer protocol client.

fn (HTTPClient) to_variant #

fn (s &HTTPClient) to_variant() Variant

fn (HTTPClient) from_variant #

fn (mut s HTTPClient) from_variant(variant &Variant)

fn (HTTPClient) connect_to_host #

fn (s &HTTPClient) connect_to_host(host string, cfg HTTPClient_connect_to_host_Cfg) GDError

Connects to a host. This needs to be done before any requests are sent. If no [param port] is specified (or -1 is used), it is automatically set to 80 for HTTP and 443 for HTTPS. You can pass the optional [param tls_options] parameter to customize the trusted certification authorities, or the common name verification when using HTTPS. See [method TLSOptions.client] and [method TLSOptions.client_unsafe].

fn (HTTPClient) set_connection #

fn (s &HTTPClient) set_connection(connection StreamPeer)

fn (HTTPClient) get_connection #

fn (s &HTTPClient) get_connection() StreamPeer

fn (HTTPClient) request_raw #

fn (s &HTTPClient) request_raw(method HTTPClientMethod, url string, headers PackedStringArray, body PackedByteArray) GDError

Sends a raw HTTP request to the connected host with the given [param method]. The URL parameter is usually just the part after the host, so for https://example.com/index.php, it is /index.php. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, * is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component (host:port). [param headers] are HTTP request headers. Sends the body data raw, as a byte array and does not encode it in any way.

fn (HTTPClient) request #

fn (s &HTTPClient) request(method HTTPClientMethod, url string, headers PackedStringArray, cfg HTTPClient_request_Cfg) GDError

Sends an HTTP request to the connected host with the given [param method]. The URL parameter is usually just the part after the host, so for https://example.com/index.php, it is /index.php. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, * is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component (host:port). [param headers] are HTTP request headers. To create a POST request with query strings to push to the server, do: [codeblocks] [gdscript] var fields = { "username": "user", "password": "pass" } var query_string = http_client.query_string_from_dict(fields) var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(query_string.length())] var result = http_client.request(http_client.METHOD_POST, "/index.php", headers, query_string) [/gdscript] [csharp] var fields = new Godot.Collections.Dictionary { { "username", "user" }, { "password", "pass" } }; string queryString = new HttpClient().QueryStringFromDict(fields); string[] headers = ["Content-Type: application/x-www-form-urlencoded", $"Content-Length: {queryString.Length}"]; var result = new HttpClient().Request(HttpClient.Method.Post, "index.php", headers, queryString); [/csharp] [/codeblocks] [b]Note:[/b] The [param body] parameter is ignored if [param method] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.

fn (HTTPClient) close #

fn (s &HTTPClient) close()

Closes the current connection, allowing reuse of this [HTTPClient].

fn (HTTPClient) has_response #

fn (s &HTTPClient) has_response() bool

If true, this [HTTPClient] has a response available.

fn (HTTPClient) is_response_chunked #

fn (s &HTTPClient) is_response_chunked() bool

If true, this [HTTPClient] has a response that is chunked.

fn (HTTPClient) get_response_code #

fn (s &HTTPClient) get_response_code() i64

Returns the response's HTTP status code.

fn (HTTPClient) get_response_headers #

fn (s &HTTPClient) get_response_headers() PackedStringArray

Returns the response headers.

fn (HTTPClient) get_response_headers_as_dictionary #

fn (s &HTTPClient) get_response_headers_as_dictionary() Dictionary

Returns all response headers as a [Dictionary]. Each entry is composed by the header name, and a [String] containing the values separated by "; ". The casing is kept the same as the headers were received.

{
'content-length': 12,
'Content-Type': 'application/json; charset=UTF-8',
}

fn (HTTPClient) get_response_body_length #

fn (s &HTTPClient) get_response_body_length() i64

Returns the response's body length. [b]Note:[/b] Some Web servers may not send a body length. In this case, the value returned will be -1. If using chunked transfer encoding, the body length will also be -1. [b]Note:[/b] This function always returns -1 on the Web platform due to browsers limitations.

fn (HTTPClient) read_response_body_chunk #

fn (s &HTTPClient) read_response_body_chunk() PackedByteArray

Reads one chunk from the response.

fn (HTTPClient) set_read_chunk_size #

fn (s &HTTPClient) set_read_chunk_size(bytes i64)

fn (HTTPClient) get_read_chunk_size #

fn (s &HTTPClient) get_read_chunk_size() i64

fn (HTTPClient) set_blocking_mode #

fn (s &HTTPClient) set_blocking_mode(enabled bool)

fn (HTTPClient) is_blocking_mode_enabled #

fn (s &HTTPClient) is_blocking_mode_enabled() bool

fn (HTTPClient) get_status #

fn (s &HTTPClient) get_status() HTTPClientStatus

Returns a [enum Status] constant. Need to call [method poll] in order to get status updates.

fn (HTTPClient) poll #

fn (s &HTTPClient) poll() GDError

This needs to be called in order to have any request processed. Check results with [method get_status].

fn (HTTPClient) set_http_proxy #

fn (s &HTTPClient) set_http_proxy(host string, port i64)

Sets the proxy server for HTTP requests. The proxy server is unset if [param host] is empty or [param port] is -1.

fn (HTTPClient) set_https_proxy #

fn (s &HTTPClient) set_https_proxy(host string, port i64)

Sets the proxy server for HTTPS requests. The proxy server is unset if [param host] is empty or [param port] is -1.

fn (HTTPClient) query_string_from_dict #

fn (s &HTTPClient) query_string_from_dict(fields Dictionary) string

Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: [codeblocks] [gdscript] var fields = { "username": "user", "password": "pass" } var query_string = http_client.query_string_from_dict(fields)# Returns "username=user&password=pass"[/gdscript] [csharp] var fields = new Godot.Collections.Dictionary { { "username", "user" }, { "password", "pass" } }; string queryString = httpClient.QueryStringFromDict(fields); // Returns "username=user&password=pass" [/csharp] [/codeblocks] Furthermore, if a key has a null value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. [codeblocks] [gdscript] var fields = { "single": 123, "not_valued": null, "multiple": [22, 33, 44] } var query_string = http_client.query_string_from_dict(fields)# Returns "single=123&not_valued&multiple=22&multiple=33&multiple=44"[/gdscript] [csharp] var fields = new Godot.Collections.Dictionary { { "single", 123 }, { "notValued", default }, { "multiple", new Godot.Collections.Array { 22, 33, 44 } }, }; string queryString = httpClient.QueryStringFromDict(fields); // Returns "single=123&not_valued&multiple=22&multiple=33&multiple=44" [/csharp] [/codeblocks]

struct HTTPClient_connect_to_host_Cfg #

@[params]
struct HTTPClient_connect_to_host_Cfg {
pub:
	port        i64 = -1
	tls_options TLSOptions
}

Optional parameters for HTTPClient#connect_to_host

struct HTTPClient_request_Cfg #

@[params]
struct HTTPClient_request_Cfg {
pub:
	body string
}

Optional parameters for HTTPClient#request

struct HTTPRequest #

struct HTTPRequest {
	Node
}

A node with the ability to send HTTP(S) requests.

fn (HTTPRequest) to_variant #

fn (s &HTTPRequest) to_variant() Variant

fn (HTTPRequest) from_variant #

fn (mut s HTTPRequest) from_variant(variant &Variant)

fn (HTTPRequest) request #

fn (s &HTTPRequest) request(url string, cfg HTTPRequest_request_Cfg) GDError

Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host. [b]Note:[/b] When [param method] is [constant HTTPClient.METHOD_GET], the payload sent via [param request_data] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example). [b]Note:[/b] It's recommended to use transport encryption (TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead.

fn (HTTPRequest) request_raw #

fn (s &HTTPRequest) request_raw(url string, cfg HTTPRequest_request_raw_Cfg) GDError

Creates request on the underlying [HTTPClient] using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host.

fn (HTTPRequest) cancel_request #

fn (s &HTTPRequest) cancel_request()

Cancels the current request.

fn (HTTPRequest) set_tls_options #

fn (s &HTTPRequest) set_tls_options(client_options TLSOptions)

Sets the [TLSOptions] to be used when connecting to an HTTPS server. See [method TLSOptions.client].

fn (HTTPRequest) get_http_client_status #

fn (s &HTTPRequest) get_http_client_status() HTTPClientStatus

Returns the current status of the underlying [HTTPClient].

fn (HTTPRequest) set_use_threads #

fn (s &HTTPRequest) set_use_threads(enable bool)

fn (HTTPRequest) is_using_threads #

fn (s &HTTPRequest) is_using_threads() bool

fn (HTTPRequest) set_accept_gzip #

fn (s &HTTPRequest) set_accept_gzip(enable bool)

fn (HTTPRequest) is_accepting_gzip #

fn (s &HTTPRequest) is_accepting_gzip() bool

fn (HTTPRequest) set_body_size_limit #

fn (s &HTTPRequest) set_body_size_limit(bytes i64)

fn (HTTPRequest) get_body_size_limit #

fn (s &HTTPRequest) get_body_size_limit() i64

fn (HTTPRequest) set_max_redirects #

fn (s &HTTPRequest) set_max_redirects(amount i64)

fn (HTTPRequest) get_max_redirects #

fn (s &HTTPRequest) get_max_redirects() i64

fn (HTTPRequest) set_download_file #

fn (s &HTTPRequest) set_download_file(path string)

fn (HTTPRequest) get_download_file #

fn (s &HTTPRequest) get_download_file() string

fn (HTTPRequest) get_downloaded_bytes #

fn (s &HTTPRequest) get_downloaded_bytes() i64

Returns the number of bytes this HTTPRequest downloaded.

fn (HTTPRequest) get_body_size #

fn (s &HTTPRequest) get_body_size() i64

Returns the response body length. [b]Note:[/b] Some Web servers may not send a body length. In this case, the value returned will be -1. If using chunked transfer encoding, the body length will also be -1.

fn (HTTPRequest) set_timeout #

fn (s &HTTPRequest) set_timeout(timeout f64)

fn (HTTPRequest) get_timeout #

fn (s &HTTPRequest) get_timeout() f64

fn (HTTPRequest) set_download_chunk_size #

fn (s &HTTPRequest) set_download_chunk_size(chunk_size i64)

fn (HTTPRequest) get_download_chunk_size #

fn (s &HTTPRequest) get_download_chunk_size() i64

fn (HTTPRequest) set_http_proxy #

fn (s &HTTPRequest) set_http_proxy(host string, port i64)

Sets the proxy server for HTTP requests. The proxy server is unset if [param host] is empty or [param port] is -1.

fn (HTTPRequest) set_https_proxy #

fn (s &HTTPRequest) set_https_proxy(host string, port i64)

Sets the proxy server for HTTPS requests. The proxy server is unset if [param host] is empty or [param port] is -1.

struct HTTPRequest_request_Cfg #

@[params]
struct HTTPRequest_request_Cfg {
pub:
	custom_headers PackedStringArray = PackedStringArray{}
	method         HTTPClientMethod  = unsafe { HTTPClientMethod(0) }
	request_data   string
}

Optional parameters for HTTPRequest#request

struct HTTPRequest_request_raw_Cfg #

@[params]
struct HTTPRequest_request_raw_Cfg {
pub:
	custom_headers   PackedStringArray = PackedStringArray{}
	method           HTTPClientMethod  = unsafe { HTTPClientMethod(0) }
	request_data_raw PackedByteArray   = PackedByteArray{}
}

Optional parameters for HTTPRequest#request_raw

struct HashingContext #

struct HashingContext {
	RefCounted
}

Provides functionality for computing cryptographic hashes chunk by chunk.

fn (HashingContext) to_variant #

fn (s &HashingContext) to_variant() Variant

fn (HashingContext) from_variant #

fn (mut s HashingContext) from_variant(variant &Variant)

fn (HashingContext) start #

fn (s &HashingContext) start(gd_type HashingContextHashType) GDError

Starts a new hash computation of the given [param type] (e.g. [constant HASH_SHA256] to start computation of an SHA-256).

fn (HashingContext) update #

fn (s &HashingContext) update(chunk PackedByteArray) GDError

Updates the computation with the given [param chunk] of data.

fn (HashingContext) finish #

fn (s &HashingContext) finish() PackedByteArray

Closes the current context, and return the computed hash.

struct HeightMapShape3D #

struct HeightMapShape3D {
	Shape3D
}

A 3D height map shape used for physics collision.

fn (HeightMapShape3D) to_variant #

fn (s &HeightMapShape3D) to_variant() Variant

fn (HeightMapShape3D) from_variant #

fn (mut s HeightMapShape3D) from_variant(variant &Variant)

fn (HeightMapShape3D) set_map_width #

fn (s &HeightMapShape3D) set_map_width(width i64)

fn (HeightMapShape3D) get_map_width #

fn (s &HeightMapShape3D) get_map_width() i64

fn (HeightMapShape3D) set_map_depth #

fn (s &HeightMapShape3D) set_map_depth(height i64)

fn (HeightMapShape3D) get_map_depth #

fn (s &HeightMapShape3D) get_map_depth() i64

fn (HeightMapShape3D) set_map_data #

fn (s &HeightMapShape3D) set_map_data(data PackedFloat32Array)

fn (HeightMapShape3D) get_map_data #

fn (s &HeightMapShape3D) get_map_data() PackedFloat32Array

fn (HeightMapShape3D) get_min_height #

fn (s &HeightMapShape3D) get_min_height() f64

Returns the smallest height value found in [member map_data]. Recalculates only when [member map_data] changes.

fn (HeightMapShape3D) get_max_height #

fn (s &HeightMapShape3D) get_max_height() f64

Returns the largest height value found in [member map_data]. Recalculates only when [member map_data] changes.

fn (HeightMapShape3D) update_map_data_from_image #

fn (s &HeightMapShape3D) update_map_data_from_image(image Image, height_min f64, height_max f64)

Updates [member map_data] with data read from an [Image] reference. Automatically resizes heightmap [member map_width] and [member map_depth] to fit the full image width and height. The image needs to be in either [constant Image.FORMAT_RF] (32 bit), [constant Image.FORMAT_RH] (16 bit), or [constant Image.FORMAT_R8] (8 bit). Each image pixel is read in as a float on the range from 0.0 (black pixel) to 1.0 (white pixel). This range value gets remapped to [param height_min] and [param height_max] to form the final height value. [b]Note:[/b] Using a heightmap with 16-bit or 32-bit data, stored in EXR or HDR format is recommended. Using 8-bit height data, or a format like PNG that Godot imports as 8-bit, will result in a terraced terrain.

struct HingeJoint3D #

struct HingeJoint3D {
	Joint3D
}

A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body.

fn (HingeJoint3D) to_variant #

fn (s &HingeJoint3D) to_variant() Variant

fn (HingeJoint3D) from_variant #

fn (mut s HingeJoint3D) from_variant(variant &Variant)

fn (HingeJoint3D) set_param #

fn (s &HingeJoint3D) set_param(param HingeJoint3DParam, value f64)

Sets the value of the specified parameter.

fn (HingeJoint3D) get_param #

fn (s &HingeJoint3D) get_param(param HingeJoint3DParam) f64

Returns the value of the specified parameter.

fn (HingeJoint3D) set_flag #

fn (s &HingeJoint3D) set_flag(flag HingeJoint3DFlag, enabled bool)

If true, enables the specified flag.

fn (HingeJoint3D) get_flag #

fn (s &HingeJoint3D) get_flag(flag HingeJoint3DFlag) bool

Returns the value of the specified flag.

struct IP #

struct IP {
	Object
}

Internet protocol (IP) support functions such as DNS resolution.

fn (IP) to_variant #

fn (s &IP) to_variant() Variant

fn (IP) from_variant #

fn (mut s IP) from_variant(variant &Variant)

fn (IP) resolve_hostname #

fn (s &IP) resolve_hostname(host string, cfg IP_resolve_hostname_Cfg) string

Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [param ip_type].

fn (IP) resolve_hostname_addresses #

fn (s &IP) resolve_hostname_addresses(host string, cfg IP_resolve_hostname_addresses_Cfg) PackedStringArray

Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [param ip_type].

fn (IP) resolve_hostname_queue_item #

fn (s &IP) resolve_hostname_queue_item(host string, cfg IP_resolve_hostname_queue_item_Cfg) i64

Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [param ip_type]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.

fn (IP) get_resolve_item_status #

fn (s &IP) get_resolve_item_status(id i64) IPResolverStatus

Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [param id].

fn (IP) get_resolve_item_address #

fn (s &IP) get_resolve_item_address(id i64) string

Returns a queued hostname's IP address, given its queue [param id]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]).

fn (IP) get_resolve_item_addresses #

fn (s &IP) get_resolve_item_addresses(id i64) Array

Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]).

fn (IP) erase_resolve_item #

fn (s &IP) erase_resolve_item(id i64)

Removes a given item [param id] from the queue. This should be used to free a queue after it has completed to enable more queries to happen.

fn (IP) get_local_addresses #

fn (s &IP) get_local_addresses() PackedStringArray

Returns all the user's current IPv4 and IPv6 addresses as an array.

fn (IP) get_local_interfaces #

fn (s &IP) get_local_interfaces() Array

Returns all network adapters as an array. Each adapter is a dictionary of the form:

{
'index': '1', ##'name': 'eth0', ##'friendly': 'Ethernet One', ##'addresses': ['192.168.1.101'], ##}

fn (IP) clear_cache #

fn (s &IP) clear_cache(cfg IP_clear_cache_Cfg)

Removes all of a [param hostname]'s cached references. If no [param hostname] is given, all cached IP addresses are removed.

struct IP_clear_cache_Cfg #

@[params]
struct IP_clear_cache_Cfg {
pub:
	hostname string
}

Optional parameters for IP#clear_cache

struct IP_resolve_hostname_Cfg #

@[params]
struct IP_resolve_hostname_Cfg {
pub:
	ip_type IPType = unsafe { IPType(3) }
}

Optional parameters for IP#resolve_hostname

struct IP_resolve_hostname_addresses_Cfg #

@[params]
struct IP_resolve_hostname_addresses_Cfg {
pub:
	ip_type IPType = unsafe { IPType(3) }
}

Optional parameters for IP#resolve_hostname_addresses

struct IP_resolve_hostname_queue_item_Cfg #

@[params]
struct IP_resolve_hostname_queue_item_Cfg {
pub:
	ip_type IPType = unsafe { IPType(3) }
}

Optional parameters for IP#resolve_hostname_queue_item

struct Image #

struct Image {
	Resource
}

Image datatype.

fn (Image) to_variant #

fn (s &Image) to_variant() Variant

fn (Image) from_variant #

fn (mut s Image) from_variant(variant &Variant)

fn (Image) get_width #

fn (s &Image) get_width() i64

Returns the image's width.

fn (Image) get_height #

fn (s &Image) get_height() i64

Returns the image's height.

fn (Image) get_size #

fn (s &Image) get_size() Vector2i

Returns the image's size (width and height).

fn (Image) has_mipmaps #

fn (s &Image) has_mipmaps() bool

Returns true if the image has generated mipmaps.

fn (Image) get_format #

fn (s &Image) get_format() ImageFormat

Returns this image's format.

fn (Image) get_data #

fn (s &Image) get_data() PackedByteArray

Returns a copy of the image's raw data.

fn (Image) get_data_size #

fn (s &Image) get_data_size() i64

Returns size (in bytes) of the image's raw data.

fn (Image) convert #

fn (s &Image) convert(format ImageFormat)

Converts this image's format to the given [param format].

fn (Image) get_mipmap_count #

fn (s &Image) get_mipmap_count() i64

Returns the number of mipmap levels or 0 if the image has no mipmaps. The largest main level image is not counted as a mipmap level by this method, so if you want to include it you can add 1 to this count.

fn (Image) get_mipmap_offset #

fn (s &Image) get_mipmap_offset(mipmap i64) i64

Returns the offset where the image's mipmap with index [param mipmap] is stored in the [member data] dictionary.

fn (Image) resize_to_po2 #

fn (s &Image) resize_to_po2(cfg Image_resize_to_po2_Cfg)

Resizes the image to the nearest power of 2 for the width and height. If [param square] is true, sets width and height to be the same. New pixels are calculated using the [param interpolation] mode defined via [enum Interpolation] constants.

fn (Image) resize #

fn (s &Image) resize(width i64, height i64, cfg Image_resize_Cfg)

Resizes the image to the given [param width] and [param height]. New pixels are calculated using the [param interpolation] mode defined via [enum Interpolation] constants.

fn (Image) shrink_x2 #

fn (s &Image) shrink_x2()

Shrinks the image by a factor of 2 on each axis (this divides the pixel count by 4).

fn (Image) crop #

fn (s &Image) crop(width i64, height i64)

Crops the image to the given [param width] and [param height]. If the specified size is larger than the current size, the extra area is filled with black pixels.

fn (Image) flip_x #

fn (s &Image) flip_x()

Flips the image horizontally.

fn (Image) flip_y #

fn (s &Image) flip_y()

Flips the image vertically.

fn (Image) generate_mipmaps #

fn (s &Image) generate_mipmaps(cfg Image_generate_mipmaps_Cfg) GDError

Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is 0. Enabling [param renormalize] when generating mipmaps for normal map textures will make sure all resulting vector values are normalized. It is possible to check if the image has mipmaps by calling [method has_mipmaps] or [method get_mipmap_count]. Calling [method generate_mipmaps] on an image that already has mipmaps will replace existing mipmaps in the image.

fn (Image) clear_mipmaps #

fn (s &Image) clear_mipmaps()

Removes the image's mipmaps.

fn (Image) set_data #

fn (s &Image) set_data(width i64, height i64, use_mipmaps bool, format ImageFormat, data PackedByteArray)

Overwrites data of an existing [Image]. Non-static equivalent of [method create_from_data].

fn (Image) is_empty #

fn (s &Image) is_empty() bool

Returns true if the image has no data.

fn (Image) load #

fn (s &Image) load(path string) GDError

Loads an image from file [param path]. See [url=$DOCS_URL/tutorials/assets_pipeline/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations. [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the user:// directory, and may not work in exported projects. See also [ImageTexture] description for usage examples.

fn (Image) save_png #

fn (s &Image) save_png(path string) GDError

Saves the image as a PNG file to the file at [param path].

fn (Image) save_png_to_buffer #

fn (s &Image) save_png_to_buffer() PackedByteArray

Saves the image as a PNG file to a byte array.

fn (Image) save_jpg #

fn (s &Image) save_jpg(path string, cfg Image_save_jpg_Cfg) GDError

Saves the image as a JPEG file to [param path] with the specified [param quality] between 0.01 and 1.0 (inclusive). Higher [param quality] values result in better-looking output at the cost of larger file sizes. Recommended [param quality] values are between 0.75 and 0.90. Even at quality 1.00, JPEG compression remains lossy. [b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel.

fn (Image) save_jpg_to_buffer #

fn (s &Image) save_jpg_to_buffer(cfg Image_save_jpg_to_buffer_Cfg) PackedByteArray

Saves the image as a JPEG file to a byte array with the specified [param quality] between 0.01 and 1.0 (inclusive). Higher [param quality] values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended [param quality] values are between 0.75 and 0.90. Even at quality 1.00, JPEG compression remains lossy. [b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting byte array won't contain the alpha channel.

fn (Image) save_exr #

fn (s &Image) save_exr(path string, cfg Image_save_exr_Cfg) GDError

Saves the image as an EXR file to [param path]. If [param grayscale] is true and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module. [b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return [constant ERR_UNAVAILABLE] when it is called from an exported project.

fn (Image) save_exr_to_buffer #

fn (s &Image) save_exr_to_buffer(cfg Image_save_exr_to_buffer_Cfg) PackedByteArray

Saves the image as an EXR file to a byte array. If [param grayscale] is true and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module. [b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr_to_buffer] will return an empty byte array when it is called from an exported project.

fn (Image) save_dds #

fn (s &Image) save_dds(path string) GDError

Saves the image as a DDS (DirectDraw Surface) file to [param path]. DDS is a container format that can store textures in various compression formats, such as DXT1, DXT5, or BC7. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the DDS module. [b]Note:[/b] The DDS module may be disabled in certain builds, which means [method save_dds] will return [constant ERR_UNAVAILABLE] when it is called from an exported project.

fn (Image) save_dds_to_buffer #

fn (s &Image) save_dds_to_buffer() PackedByteArray

Saves the image as a DDS (DirectDraw Surface) file to a byte array. DDS is a container format that can store textures in various compression formats, such as DXT1, DXT5, or BC7. This function will return an empty byte array if Godot was compiled without the DDS module. [b]Note:[/b] The DDS module may be disabled in certain builds, which means [method save_dds_to_buffer] will return an empty byte array when it is called from an exported project.

fn (Image) save_webp #

fn (s &Image) save_webp(path string, cfg Image_save_webp_Cfg) GDError

Saves the image as a WebP (Web Picture) file to the file at [param path]. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. [b]Note:[/b] The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images.

fn (Image) save_webp_to_buffer #

fn (s &Image) save_webp_to_buffer(cfg Image_save_webp_to_buffer_Cfg) PackedByteArray

Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. [b]Note:[/b] The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images.

fn (Image) detect_alpha #

fn (s &Image) detect_alpha() ImageAlphaMode

Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found.

fn (Image) is_invisible #

fn (s &Image) is_invisible() bool

Returns true if all the image's pixels have an alpha value of 0. Returns false if any pixel has an alpha value higher than 0.

fn (Image) detect_used_channels #

fn (s &Image) detect_used_channels(cfg Image_detect_used_channels_Cfg) ImageUsedChannels

Returns the color channels used by this image. If the image is compressed, the original [param source] must be specified.

fn (Image) compress #

fn (s &Image) compress(mode ImageCompressMode, cfg Image_compress_Cfg) GDError

Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. The [param source] parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. For ASTC compression, the [param astc_format] parameter must be supplied.

fn (Image) compress_from_channels #

fn (s &Image) compress_from_channels(mode ImageCompressMode, channels ImageUsedChannels, cfg Image_compress_from_channels_Cfg) GDError

Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. This is an alternative to [method compress] that lets the user supply the channels used in order for the compressor to pick the best DXT and ETC2 formats. For other formats (non DXT or ETC2), this argument is ignored. For ASTC compression, the [param astc_format] parameter must be supplied.

fn (Image) decompress #

fn (s &Image) decompress() GDError

Decompresses the image if it is VRAM compressed in a supported format. Returns [constant OK] if the format is supported, otherwise [constant ERR_UNAVAILABLE]. [b]Note:[/b] The following formats can be decompressed: DXT, RGTC, BPTC. The formats ETC1 and ETC2 are not supported.

fn (Image) is_compressed #

fn (s &Image) is_compressed() bool

Returns true if the image is compressed.

fn (Image) rotate_90 #

fn (s &Image) rotate_90(direction ClockDirection)

Rotates the image in the specified [param direction] by 90 degrees. The width and height of the image must be greater than 1. If the width and height are not equal, the image will be resized.

fn (Image) rotate_180 #

fn (s &Image) rotate_180()

Rotates the image by 180 degrees. The width and height of the image must be greater than 1.

fn (Image) fix_alpha_edges #

fn (s &Image) fix_alpha_edges()

Blends low-alpha pixels with nearby pixels.

fn (Image) premultiply_alpha #

fn (s &Image) premultiply_alpha()

Multiplies color values with alpha values. Resulting color values for a pixel are (color * alpha)/256. See also [member CanvasItemMaterial.blend_mode].

fn (Image) srgb_to_linear #

fn (s &Image) srgb_to_linear()

Converts the raw data from the sRGB colorspace to a linear scale. Only works on images with [constant FORMAT_RGB8] or [constant FORMAT_RGBA8] formats.

fn (Image) linear_to_srgb #

fn (s &Image) linear_to_srgb()

Converts the entire image from the linear colorspace to the sRGB colorspace. Only works on images with [constant FORMAT_RGB8] or [constant FORMAT_RGBA8] formats.

fn (Image) normal_map_to_xy #

fn (s &Image) normal_map_to_xy()

Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normal map. A normal map can add lots of detail to a 3D surface without increasing the polygon count.

fn (Image) rgbe_to_srgb #

fn (s &Image) rgbe_to_srgb() Image

Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image.

fn (Image) bump_map_to_normal_map #

fn (s &Image) bump_map_to_normal_map(cfg Image_bump_map_to_normal_map_Cfg)

Converts a bump map to a normal map. A bump map provides a height offset per-pixel, while a normal map provides a normal direction per pixel.

fn (Image) compute_image_metrics #

fn (s &Image) compute_image_metrics(compared_image Image, use_luma bool) Dictionary

Compute image metrics on the current image and the compared image. The dictionary contains max, mean, mean_squared, root_mean_squared and peak_snr.

fn (Image) blit_rect #

fn (s &Image) blit_rect(src Image, src_rect Rect2i, dst Vector2i)

Copies [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with non-positive size is treated as empty. [b]Note:[/b] The alpha channel data in [param src] will overwrite the corresponding data in this image at the target position. To blend alpha channels, use [method blend_rect] instead.

fn (Image) blit_rect_mask #

fn (s &Image) blit_rect_mask(src Image, mask Image, src_rect Rect2i, dst Vector2i)

Blits [param src_rect] area from [param src] image to this image at the coordinates given by [param dst], clipped accordingly to both image bounds. [param src] pixel is copied onto [param dst] if the corresponding [param mask] pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with non-positive size is treated as empty.

fn (Image) blend_rect #

fn (s &Image) blend_rect(src Image, src_rect Rect2i, dst Vector2i)

Alpha-blends [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with non-positive size is treated as empty.

fn (Image) blend_rect_mask #

fn (s &Image) blend_rect_mask(src Image, mask Image, src_rect Rect2i, dst Vector2i)

Alpha-blends [param src_rect] from [param src] image to this image using [param mask] image at coordinates [param dst], clipped accordingly to both image bounds. Alpha channels are required for both [param src] and [param mask]. [param dst] pixels and [param src] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with non-positive size is treated as empty.

fn (Image) fill #

fn (s &Image) fill(color Color)

Fills the image with [param color].

fn (Image) fill_rect #

fn (s &Image) fill_rect(rect Rect2i, color Color)

Fills [param rect] with [param color].

fn (Image) get_used_rect #

fn (s &Image) get_used_rect() Rect2i

Returns a [Rect2i] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible.

fn (Image) get_region #

fn (s &Image) get_region(region Rect2i) Image

Returns a new [Image] that is a copy of this [Image]'s area specified with [param region].

fn (Image) copy_from #

fn (s &Image) copy_from(src Image)

Copies [param src] image to this image.

fn (Image) get_pixelv #

fn (s &Image) get_pixelv(point Vector2i) Color

Returns the color of the pixel at [param point]. This is the same as [method get_pixel], but with a [Vector2i] argument instead of two integer arguments.

fn (Image) get_pixel #

fn (s &Image) get_pixel(x i64, y i64) Color

Returns the color of the pixel at (x, y). This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2i] argument.

fn (Image) set_pixelv #

fn (s &Image) set_pixelv(point Vector2i, color Color)

Sets the [Color] of the pixel at [param point] to [param color]. [codeblocks] [gdscript] var img_width = 10 var img_height = 5 var img = Image.create(img_width, img_height, false, Image.FORMAT_RGBA8)

img.set_pixelv(Vector2i(1, 2), Color.RED) # Sets the color at (1, 2) to red. [/gdscript] [csharp] int imgWidth = 10; int imgHeight = 5; var img = Image.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);

img.SetPixelv(new Vector2I(1, 2), Colors.Red); // Sets the color at (1, 2) to red. [/csharp] [/codeblocks] This is the same as [method set_pixel], but with a [Vector2i] argument instead of two integer arguments.

fn (Image) set_pixel #

fn (s &Image) set_pixel(x i64, y i64, color Color)

Sets the [Color] of the pixel at (x, y) to [param color]. [codeblocks] [gdscript] var img_width = 10 var img_height = 5 var img = Image.create(img_width, img_height, false, Image.FORMAT_RGBA8)

img.set_pixel(1, 2, Color.RED) # Sets the color at (1, 2) to red. [/gdscript] [csharp] int imgWidth = 10; int imgHeight = 5; var img = Image.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);

img.SetPixel(1, 2, Colors.Red); // Sets the color at (1, 2) to red. [/csharp] [/codeblocks] This is the same as [method set_pixelv], but with a two integer arguments instead of a [Vector2i] argument.

fn (Image) adjust_bcs #

fn (s &Image) adjust_bcs(brightness f64, contrast f64, saturation f64)

Adjusts this image's [param brightness], [param contrast], and [param saturation] by the given values. Does not work if the image is compressed (see [method is_compressed]).

fn (Image) load_png_from_buffer #

fn (s &Image) load_png_from_buffer(buffer PackedByteArray) GDError

Loads an image from the binary contents of a PNG file.

fn (Image) load_jpg_from_buffer #

fn (s &Image) load_jpg_from_buffer(buffer PackedByteArray) GDError

Loads an image from the binary contents of a JPEG file.

fn (Image) load_webp_from_buffer #

fn (s &Image) load_webp_from_buffer(buffer PackedByteArray) GDError

Loads an image from the binary contents of a WebP file.

fn (Image) load_tga_from_buffer #

fn (s &Image) load_tga_from_buffer(buffer PackedByteArray) GDError

Loads an image from the binary contents of a TGA file. [b]Note:[/b] This method is only available in engine builds with the TGA module enabled. By default, the TGA module is enabled, but it can be disabled at build-time using the module_tga_enabled=no SCons option.

fn (Image) load_bmp_from_buffer #

fn (s &Image) load_bmp_from_buffer(buffer PackedByteArray) GDError

Loads an image from the binary contents of a BMP file. [b]Note:[/b] Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported. [b]Note:[/b] This method is only available in engine builds with the BMP module enabled. By default, the BMP module is enabled, but it can be disabled at build-time using the module_bmp_enabled=no SCons option.

fn (Image) load_ktx_from_buffer #

fn (s &Image) load_ktx_from_buffer(buffer PackedByteArray) GDError

Loads an image from the binary contents of a [url=https://github.com/KhronosGroup/KTX-Software]KTX[/url] file. Unlike most image formats, KTX can store VRAM-compressed data and embed mipmaps. [b]Note:[/b] Godot's libktx implementation only supports 2D images. Cubemaps, texture arrays, and de-padding are not supported. [b]Note:[/b] This method is only available in engine builds with the KTX module enabled. By default, the KTX module is enabled, but it can be disabled at build-time using the module_ktx_enabled=no SCons option.

fn (Image) load_dds_from_buffer #

fn (s &Image) load_dds_from_buffer(buffer PackedByteArray) GDError

Loads an image from the binary contents of a DDS file. [b]Note:[/b] This method is only available in engine builds with the DDS module enabled. By default, the DDS module is enabled, but it can be disabled at build-time using the module_dds_enabled=no SCons option.

fn (Image) load_svg_from_buffer #

fn (s &Image) load_svg_from_buffer(buffer PackedByteArray, cfg Image_load_svg_from_buffer_Cfg) GDError

Loads an image from the UTF-8 binary contents of an [b]uncompressed[/b] SVG file ([b].svg[/b]). [b]Note:[/b] Beware when using compressed SVG files (like [b].svgz[/b]), they need to be decompressed before loading. [b]Note:[/b] This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the module_svg_enabled=no SCons option.

fn (Image) load_svg_from_string #

fn (s &Image) load_svg_from_string(svg_str string, cfg Image_load_svg_from_string_Cfg) GDError

Loads an image from the string contents of an SVG file ([b].svg[/b]). [b]Note:[/b] This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the module_svg_enabled=no SCons option.

struct ImageFormatLoader #

struct ImageFormatLoader {
	RefCounted
}

Base class to add support for specific image formats.

fn (ImageFormatLoader) to_variant #

fn (s &ImageFormatLoader) to_variant() Variant

fn (ImageFormatLoader) from_variant #

fn (mut s ImageFormatLoader) from_variant(variant &Variant)

struct ImageFormatLoaderExtension #

struct ImageFormatLoaderExtension {
	ImageFormatLoader
}

Base class for creating [ImageFormatLoader] extensions (adding support for extra image formats).

fn (ImageFormatLoaderExtension) to_variant #

fn (s &ImageFormatLoaderExtension) to_variant() Variant

fn (ImageFormatLoaderExtension) from_variant #

fn (mut s ImageFormatLoaderExtension) from_variant(variant &Variant)

fn (ImageFormatLoaderExtension) gd_get_recognized_extensions #

fn (s &ImageFormatLoaderExtension) gd_get_recognized_extensions() PackedStringArray

Returns the list of file extensions for this image format. Files with the given extensions will be treated as image file and loaded using this class.

fn (ImageFormatLoaderExtension) gd_load_image #

fn (s &ImageFormatLoaderExtension) gd_load_image(image Image, fileaccess FileAccess, flags ImageFormatLoaderLoaderFlags, scale f64) GDError

Loads the content of [param fileaccess] into the provided [param image].

fn (ImageFormatLoaderExtension) add_format_loader #

fn (s &ImageFormatLoaderExtension) add_format_loader()

Add this format loader to the engine, allowing it to recognize the file extensions returned by [method _get_recognized_extensions].

fn (ImageFormatLoaderExtension) remove_format_loader #

fn (s &ImageFormatLoaderExtension) remove_format_loader()

Remove this format loader from the engine.

struct ImageTexture #

struct ImageTexture {
	Texture2D
}

A [Texture2D] based on an [Image].

fn (ImageTexture) to_variant #

fn (s &ImageTexture) to_variant() Variant

fn (ImageTexture) from_variant #

fn (mut s ImageTexture) from_variant(variant &Variant)

fn (ImageTexture) get_format #

fn (s &ImageTexture) get_format() ImageFormat

Returns the format of the texture.

fn (ImageTexture) set_image #

fn (s &ImageTexture) set_image(image Image)

Replaces the texture's data with a new [Image]. This will re-allocate new memory for the texture. If you want to update the image, but don't need to change its parameters (format, size), use [method update] instead for better performance.

fn (ImageTexture) update #

fn (s &ImageTexture) update(image Image)

Replaces the texture's data with a new [Image]. [b]Note:[/b] The texture has to be created using [method create_from_image] or initialized first with the [method set_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration. Use this method over [method set_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time.

fn (ImageTexture) set_size_override #

fn (s &ImageTexture) set_size_override(size Vector2i)

Resizes the texture to the specified dimensions.

struct ImageTexture3D #

struct ImageTexture3D {
	Texture3D
}

Texture with 3 dimensions.

fn (ImageTexture3D) to_variant #

fn (s &ImageTexture3D) to_variant() Variant

fn (ImageTexture3D) from_variant #

fn (mut s ImageTexture3D) from_variant(variant &Variant)

fn (ImageTexture3D) create #

fn (s &ImageTexture3D) create(format ImageFormat, width i64, height i64, depth i64, use_mipmaps bool, data Array) GDError

Creates the [ImageTexture3D] with specified [param format], [param width], [param height], and [param depth]. If [param use_mipmaps] is true, generates mipmaps for the [ImageTexture3D].

fn (ImageTexture3D) update #

fn (s &ImageTexture3D) update(data Array)

Replaces the texture's existing data with the layers specified in [param data]. The size of [param data] must match the parameters that were used for [method create]. In other words, the texture cannot be resized or have its format changed by calling [method update].

struct ImageTextureLayered #

struct ImageTextureLayered {
	TextureLayered
}

Base class for texture types which contain the data of multiple [ImageTexture]s. Each image is of the same size and format.

fn (ImageTextureLayered) to_variant #

fn (s &ImageTextureLayered) to_variant() Variant

fn (ImageTextureLayered) from_variant #

fn (mut s ImageTextureLayered) from_variant(variant &Variant)

fn (ImageTextureLayered) create_from_images #

fn (s &ImageTextureLayered) create_from_images(images Array) GDError

Creates an [ImageTextureLayered] from an array of [Image]s. See [method Image.create] for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images [i]must[/i] have the same width, height, image format and mipmapping setting. Each [Image] represents one layer.

##var images = []
const LAYERS = 6
for i in LAYERS:
var image = Image.create_empty(128, 128, false, Image.FORMAT_RGB8)
if i % 3 == 0:
image.fill(Color.RED)
elif i % 3 == 1:
image.fill(Color.GREEN)
else:
image.fill(Color.BLUE)
images.push_back(image)

##var texture_2d_array = Texture2DArray.new()
texture_2d_array.create_from_images(images)
ResourceSaver.save(texture_2d_array, 'res://texture_2d_array.res', ResourceSaver.FLAG_COMPRESS)

######var cubemap = Cubemap.new()
cubemap.create_from_images(images)
ResourceSaver.save(cubemap, 'res://cubemap.res', ResourceSaver.FLAG_COMPRESS)

######var cubemap_array = CubemapArray.new()
cubemap_array.create_from_images(images)
ResourceSaver.save(cubemap_array, 'res://cubemap_array.res', ResourceSaver.FLAG_COMPRESS)

fn (ImageTextureLayered) update_layer #

fn (s &ImageTextureLayered) update_layer(image Image, layer i64)

Replaces the existing [Image] data at the given [param layer] with this new image. The given [Image] must have the same width, height, image format, and mipmapping flag as the rest of the referenced images. If the image format is unsupported, it will be decompressed and converted to a similar and supported [enum Image.Format]. The update is immediate: it's synchronized with drawing.

struct Image_bump_map_to_normal_map_Cfg #

@[params]
struct Image_bump_map_to_normal_map_Cfg {
pub:
	bump_scale f64 = 1.0
}

Optional parameters for Image#bump_map_to_normal_map

struct Image_compress_Cfg #

@[params]
struct Image_compress_Cfg {
pub:
	source      ImageCompressSource = unsafe { ImageCompressSource(0) }
	astc_format ImageASTCFormat     = unsafe { ImageASTCFormat(0) }
}

Optional parameters for Image#compress

struct Image_compress_from_channels_Cfg #

@[params]
struct Image_compress_from_channels_Cfg {
pub:
	astc_format ImageASTCFormat = unsafe { ImageASTCFormat(0) }
}

Optional parameters for Image#compress_from_channels

struct Image_detect_used_channels_Cfg #

@[params]
struct Image_detect_used_channels_Cfg {
pub:
	source ImageCompressSource = unsafe { ImageCompressSource(0) }
}

Optional parameters for Image#detect_used_channels

struct Image_generate_mipmaps_Cfg #

@[params]
struct Image_generate_mipmaps_Cfg {
pub:
	renormalize bool
}

Optional parameters for Image#generate_mipmaps

struct Image_load_svg_from_buffer_Cfg #

@[params]
struct Image_load_svg_from_buffer_Cfg {
pub:
	scale f64 = 1.0
}

Optional parameters for Image#load_svg_from_buffer

struct Image_load_svg_from_string_Cfg #

@[params]
struct Image_load_svg_from_string_Cfg {
pub:
	scale f64 = 1.0
}

Optional parameters for Image#load_svg_from_string

struct Image_resize_Cfg #

@[params]
struct Image_resize_Cfg {
pub:
	interpolation ImageInterpolation = unsafe { ImageInterpolation(1) }
}

Optional parameters for Image#resize

struct Image_resize_to_po2_Cfg #

@[params]
struct Image_resize_to_po2_Cfg {
pub:
	square        bool
	interpolation ImageInterpolation = unsafe { ImageInterpolation(1) }
}

Optional parameters for Image#resize_to_po2

struct Image_save_exr_Cfg #

@[params]
struct Image_save_exr_Cfg {
pub:
	grayscale bool
}

Optional parameters for Image#save_exr

struct Image_save_exr_to_buffer_Cfg #

@[params]
struct Image_save_exr_to_buffer_Cfg {
pub:
	grayscale bool
}

Optional parameters for Image#save_exr_to_buffer

struct Image_save_jpg_Cfg #

@[params]
struct Image_save_jpg_Cfg {
pub:
	quality f64 = 0.75
}

Optional parameters for Image#save_jpg

struct Image_save_jpg_to_buffer_Cfg #

@[params]
struct Image_save_jpg_to_buffer_Cfg {
pub:
	quality f64 = 0.75
}

Optional parameters for Image#save_jpg_to_buffer

struct Image_save_webp_Cfg #

@[params]
struct Image_save_webp_Cfg {
pub:
	lossy   bool
	quality f64 = 0.75
}

Optional parameters for Image#save_webp

struct Image_save_webp_to_buffer_Cfg #

@[params]
struct Image_save_webp_to_buffer_Cfg {
pub:
	lossy   bool
	quality f64 = 0.75
}

Optional parameters for Image#save_webp_to_buffer

struct ImmediateMesh #

struct ImmediateMesh {
	Mesh
}

Mesh optimized for creating geometry manually.

fn (ImmediateMesh) to_variant #

fn (s &ImmediateMesh) to_variant() Variant

fn (ImmediateMesh) from_variant #

fn (mut s ImmediateMesh) from_variant(variant &Variant)

fn (ImmediateMesh) surface_begin #

fn (s &ImmediateMesh) surface_begin(primitive MeshPrimitiveType, cfg ImmediateMesh_surface_begin_Cfg)

Begin a new surface.

fn (ImmediateMesh) surface_set_color #

fn (s &ImmediateMesh) surface_set_color(color Color)

Set the color attribute that will be pushed with the next vertex.

fn (ImmediateMesh) surface_set_normal #

fn (s &ImmediateMesh) surface_set_normal(normal Vector3)

Set the normal attribute that will be pushed with the next vertex.

fn (ImmediateMesh) surface_set_tangent #

fn (s &ImmediateMesh) surface_set_tangent(tangent Plane)

Set the tangent attribute that will be pushed with the next vertex.

fn (ImmediateMesh) surface_set_uv #

fn (s &ImmediateMesh) surface_set_uv(uv Vector2)

Set the UV attribute that will be pushed with the next vertex.

fn (ImmediateMesh) surface_set_uv2 #

fn (s &ImmediateMesh) surface_set_uv2(uv2 Vector2)

Set the UV2 attribute that will be pushed with the next vertex.

fn (ImmediateMesh) surface_add_vertex #

fn (s &ImmediateMesh) surface_add_vertex(vertex Vector3)

Add a 3D vertex using the current attributes previously set.

fn (ImmediateMesh) surface_add_vertex_2d #

fn (s &ImmediateMesh) surface_add_vertex_2d(vertex Vector2)

Add a 2D vertex using the current attributes previously set.

fn (ImmediateMesh) surface_end #

fn (s &ImmediateMesh) surface_end()

End and commit current surface. Note that surface being created will not be visible until this function is called.

fn (ImmediateMesh) clear_surfaces #

fn (s &ImmediateMesh) clear_surfaces()

Clear all surfaces.

struct ImmediateMesh_surface_begin_Cfg #

@[params]
struct ImmediateMesh_surface_begin_Cfg {
pub:
	material Material
}

Optional parameters for ImmediateMesh#surface_begin

struct ImporterMesh #

struct ImporterMesh {
	Resource
}

A [Resource] that contains vertex array-based geometry during the import process.

fn (ImporterMesh) to_variant #

fn (s &ImporterMesh) to_variant() Variant

fn (ImporterMesh) from_variant #

fn (mut s ImporterMesh) from_variant(variant &Variant)

fn (ImporterMesh) add_blend_shape #

fn (s &ImporterMesh) add_blend_shape(name string)

Adds name for a blend shape that will be added with [method add_surface]. Must be called before surface is added.

fn (ImporterMesh) get_blend_shape_count #

fn (s &ImporterMesh) get_blend_shape_count() i64

Returns the number of blend shapes that the mesh holds.

fn (ImporterMesh) get_blend_shape_name #

fn (s &ImporterMesh) get_blend_shape_name(blend_shape_idx i64) string

Returns the name of the blend shape at this index.

fn (ImporterMesh) set_blend_shape_mode #

fn (s &ImporterMesh) set_blend_shape_mode(mode MeshBlendShapeMode)

Sets the blend shape mode.

fn (ImporterMesh) get_blend_shape_mode #

fn (s &ImporterMesh) get_blend_shape_mode() MeshBlendShapeMode

Returns the blend shape mode for this Mesh.

fn (ImporterMesh) add_surface #

fn (s &ImporterMesh) add_surface(primitive MeshPrimitiveType, arrays Array, cfg ImporterMesh_add_surface_Cfg)

Creates a new surface. [method Mesh.get_surface_count] will become the surf_idx for this new surface. Surfaces are created to be rendered using a [param primitive], which may be any of the values defined in [enum Mesh.PrimitiveType]. The [param arrays] argument is an array of arrays. Each of the [constant Mesh.ARRAY_MAX] elements contains an array with some of the mesh data for this surface as described by the corresponding member of [enum Mesh.ArrayType] or null if it is not used by the surface. For example, arrays[0] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this surface into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. The [param blend_shapes] argument is an array of vertex data for each blend shape. Each element is an array of the same structure as [param arrays], but [constant Mesh.ARRAY_VERTEX], [constant Mesh.ARRAY_NORMAL], and [constant Mesh.ARRAY_TANGENT] are set if and only if they are set in [param arrays] and all other entries are null. The [param lods] argument is a dictionary with [float] keys and [PackedInt32Array] values. Each entry in the dictionary represents an LOD level of the surface, where the value is the [constant Mesh.ARRAY_INDEX] array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. The [param flags] argument is the bitwise OR of, as required: One value of [enum Mesh.ArrayCustomFormat] left shifted by ARRAY_FORMAT_CUSTOMn_SHIFT for each custom channel in use, [constant Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE], [constant Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS], or [constant Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY]. [b]Note:[/b] When using indices, it is recommended to only use points, lines, or triangles.

fn (ImporterMesh) get_surface_count #

fn (s &ImporterMesh) get_surface_count() i64

Returns the number of surfaces that the mesh holds.

fn (ImporterMesh) get_surface_primitive_type #

fn (s &ImporterMesh) get_surface_primitive_type(surface_idx i64) MeshPrimitiveType

Returns the primitive type of the requested surface (see [method add_surface]).

fn (ImporterMesh) get_surface_name #

fn (s &ImporterMesh) get_surface_name(surface_idx i64) string

Gets the name assigned to this surface.

fn (ImporterMesh) get_surface_arrays #

fn (s &ImporterMesh) get_surface_arrays(surface_idx i64) Array

Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface. See [method add_surface].

fn (ImporterMesh) get_surface_blend_shape_arrays #

fn (s &ImporterMesh) get_surface_blend_shape_arrays(surface_idx i64, blend_shape_idx i64) Array

Returns a single set of blend shape arrays for the requested blend shape index for a surface.

fn (ImporterMesh) get_surface_lod_count #

fn (s &ImporterMesh) get_surface_lod_count(surface_idx i64) i64

Returns the number of lods that the mesh holds on a given surface.

fn (ImporterMesh) get_surface_lod_size #

fn (s &ImporterMesh) get_surface_lod_size(surface_idx i64, lod_idx i64) f64

Returns the screen ratio which activates a lod for a surface.

fn (ImporterMesh) get_surface_lod_indices #

fn (s &ImporterMesh) get_surface_lod_indices(surface_idx i64, lod_idx i64) PackedInt32Array

Returns the index buffer of a lod for a surface.

fn (ImporterMesh) get_surface_material #

fn (s &ImporterMesh) get_surface_material(surface_idx i64) Material

Returns a [Material] in a given surface. Surface is rendered using this material.

fn (ImporterMesh) get_surface_format #

fn (s &ImporterMesh) get_surface_format(surface_idx i64) i64

Returns the format of the surface that the mesh holds.

fn (ImporterMesh) set_surface_name #

fn (s &ImporterMesh) set_surface_name(surface_idx i64, name string)

Sets a name for a given surface.

fn (ImporterMesh) set_surface_material #

fn (s &ImporterMesh) set_surface_material(surface_idx i64, material Material)

Sets a [Material] for a given surface. Surface will be rendered using this material.

fn (ImporterMesh) generate_lods #

fn (s &ImporterMesh) generate_lods(normal_merge_angle f64, normal_split_angle f64, bone_transform_array Array)

Generates all lods for this ImporterMesh. [param normal_merge_angle] is in degrees and used in the same way as the importer settings in lods. [param normal_split_angle] is not used and only remains for compatibility with older versions of the API. The number of generated lods can be accessed using [method get_surface_lod_count], and each LOD is available in [method get_surface_lod_size] and [method get_surface_lod_indices]. [param bone_transform_array] is an [Array] which can be either empty or contain [Transform3D]s which, for each of the mesh's bone IDs, will apply mesh skinning when generating the LOD mesh variations. This is usually used to account for discrepancies in scale between the mesh itself and its skinning data.

fn (ImporterMesh) get_mesh #

fn (s &ImporterMesh) get_mesh(cfg ImporterMesh_get_mesh_Cfg) ArrayMesh

Returns the mesh data represented by this [ImporterMesh] as a usable [ArrayMesh]. This method caches the returned mesh, and subsequent calls will return the cached data until [method clear] is called. If not yet cached and [param base_mesh] is provided, [param base_mesh] will be used and mutated.

fn (ImporterMesh) clear #

fn (s &ImporterMesh) clear()

Removes all surfaces and blend shapes from this [ImporterMesh].

fn (ImporterMesh) set_lightmap_size_hint #

fn (s &ImporterMesh) set_lightmap_size_hint(size Vector2i)

Sets the size hint of this mesh for lightmap-unwrapping in UV-space.

fn (ImporterMesh) get_lightmap_size_hint #

fn (s &ImporterMesh) get_lightmap_size_hint() Vector2i

Returns the size hint of this mesh for lightmap-unwrapping in UV-space.

struct ImporterMeshInstance3D #

struct ImporterMeshInstance3D {
	Node3D
}

fn (ImporterMeshInstance3D) to_variant #

fn (s &ImporterMeshInstance3D) to_variant() Variant

fn (ImporterMeshInstance3D) from_variant #

fn (mut s ImporterMeshInstance3D) from_variant(variant &Variant)

fn (ImporterMeshInstance3D) set_mesh #

fn (s &ImporterMeshInstance3D) set_mesh(mesh ImporterMesh)

fn (ImporterMeshInstance3D) get_mesh #

fn (s &ImporterMeshInstance3D) get_mesh() ImporterMesh

fn (ImporterMeshInstance3D) set_skin #

fn (s &ImporterMeshInstance3D) set_skin(skin Skin)

fn (ImporterMeshInstance3D) get_skin #

fn (s &ImporterMeshInstance3D) get_skin() Skin

fn (ImporterMeshInstance3D) set_skeleton_path #

fn (s &ImporterMeshInstance3D) set_skeleton_path(skeleton_path NodePath)

fn (ImporterMeshInstance3D) get_skeleton_path #

fn (s &ImporterMeshInstance3D) get_skeleton_path() NodePath

fn (ImporterMeshInstance3D) set_layer_mask #

fn (s &ImporterMeshInstance3D) set_layer_mask(layer_mask i64)

fn (ImporterMeshInstance3D) get_layer_mask #

fn (s &ImporterMeshInstance3D) get_layer_mask() i64

fn (ImporterMeshInstance3D) set_cast_shadows_setting #

fn (s &ImporterMeshInstance3D) set_cast_shadows_setting(shadow_casting_setting GeometryInstance3DShadowCastingSetting)

fn (ImporterMeshInstance3D) get_cast_shadows_setting #

fn (s &ImporterMeshInstance3D) get_cast_shadows_setting() GeometryInstance3DShadowCastingSetting

fn (ImporterMeshInstance3D) set_visibility_range_end_margin #

fn (s &ImporterMeshInstance3D) set_visibility_range_end_margin(distance f64)

fn (ImporterMeshInstance3D) get_visibility_range_end_margin #

fn (s &ImporterMeshInstance3D) get_visibility_range_end_margin() f64

fn (ImporterMeshInstance3D) set_visibility_range_end #

fn (s &ImporterMeshInstance3D) set_visibility_range_end(distance f64)

fn (ImporterMeshInstance3D) get_visibility_range_end #

fn (s &ImporterMeshInstance3D) get_visibility_range_end() f64

fn (ImporterMeshInstance3D) set_visibility_range_begin_margin #

fn (s &ImporterMeshInstance3D) set_visibility_range_begin_margin(distance f64)

fn (ImporterMeshInstance3D) get_visibility_range_begin_margin #

fn (s &ImporterMeshInstance3D) get_visibility_range_begin_margin() f64

fn (ImporterMeshInstance3D) set_visibility_range_begin #

fn (s &ImporterMeshInstance3D) set_visibility_range_begin(distance f64)

fn (ImporterMeshInstance3D) get_visibility_range_begin #

fn (s &ImporterMeshInstance3D) get_visibility_range_begin() f64

fn (ImporterMeshInstance3D) set_visibility_range_fade_mode #

fn (s &ImporterMeshInstance3D) set_visibility_range_fade_mode(mode GeometryInstance3DVisibilityRangeFadeMode)

fn (ImporterMeshInstance3D) get_visibility_range_fade_mode #

fn (s &ImporterMeshInstance3D) get_visibility_range_fade_mode() GeometryInstance3DVisibilityRangeFadeMode

struct ImporterMesh_add_surface_Cfg #

@[params]
struct ImporterMesh_add_surface_Cfg {
pub:
	blend_shapes Array
	lods         Dictionary
	material     Material
	name         string
	flags        i64
}

Optional parameters for ImporterMesh#add_surface

struct ImporterMesh_get_mesh_Cfg #

@[params]
struct ImporterMesh_get_mesh_Cfg {
pub:
	base_mesh ArrayMesh
}

Optional parameters for ImporterMesh#get_mesh

struct Input #

struct Input {
	Object
}

A singleton for handling inputs.

fn (Input) to_variant #

fn (s &Input) to_variant() Variant

fn (Input) from_variant #

fn (mut s Input) from_variant(variant &Variant)

fn (Input) is_anything_pressed #

fn (s &Input) is_anything_pressed() bool

Returns true if any action, key, joypad button, or mouse button is being pressed. This will also return true if any action is simulated via code by calling [method action_press].

fn (Input) is_key_pressed #

fn (s &Input) is_key_pressed(keycode Key) bool

Returns true if you are pressing the Latin key in the current keyboard layout. You can pass a [enum Key] constant. [method is_key_pressed] is only recommended over [method is_physical_key_pressed] in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use [method is_physical_key_pressed]. [b]Note:[/b] Due to keyboard ghosting, [method is_key_pressed] may return false even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.

fn (Input) is_physical_key_pressed #

fn (s &Input) is_physical_key_pressed(keycode Key) bool

Returns true if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a [enum Key] constant. [method is_physical_key_pressed] is recommended over [method is_key_pressed] for in-game actions, as it will make [kbd]W[/kbd]/[kbd]A[/kbd]/[kbd]S[/kbd]/[kbd]D[/kbd] layouts work regardless of the user's keyboard layout. [method is_physical_key_pressed] will also ensure that the top row number keys work on any keyboard layout. If in doubt, use [method is_physical_key_pressed]. [b]Note:[/b] Due to keyboard ghosting, [method is_physical_key_pressed] may return false even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.

fn (Input) is_key_label_pressed #

fn (s &Input) is_key_label_pressed(keycode Key) bool

Returns true if you are pressing the key with the [param keycode] printed on it. You can pass a [enum Key] constant or any Unicode character code.

fn (Input) is_mouse_button_pressed #

fn (s &Input) is_mouse_button_pressed(button MouseButton) bool

Returns true if you are pressing the mouse button specified with [enum MouseButton].

fn (Input) is_joy_button_pressed #

fn (s &Input) is_joy_button_pressed(device i64, button JoyButton) bool

Returns true if you are pressing the joypad button at index [param button].

fn (Input) is_action_pressed #

fn (s &Input) is_action_pressed(action string, cfg Input_is_action_pressed_Cfg) bool

Returns true if you are pressing the action event. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. [b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return false even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.

fn (Input) is_action_just_pressed #

fn (s &Input) is_action_just_pressed(action string, cfg Input_is_action_just_pressed_Cfg) bool

Returns true when the user has [i]started[/i] pressing the action event in the current frame or physics tick. It will only return true on the frame or tick that the user pressed down the button. This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. [b]Note:[/b] Returning true does not imply that the action is [i]still[/i] pressed. An action can be pressed and released again rapidly, and true will still be returned so as not to miss input. [b]Note:[/b] Due to keyboard ghosting, [method is_action_just_pressed] may return false even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. [b]Note:[/b] During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_pressed] instead to query the action state of the current event.

fn (Input) is_action_just_released #

fn (s &Input) is_action_just_released(action string, cfg Input_is_action_just_released_Cfg) bool

Returns true when the user [i]stops[/i] pressing the action event in the current frame or physics tick. It will only return true on the frame or tick that the user releases the button. [b]Note:[/b] Returning true does not imply that the action is [i]still[/i] not pressed. An action can be released and pressed again rapidly, and true will still be returned so as not to miss input. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. [b]Note:[/b] During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_released] instead to query the action state of the current event.

fn (Input) get_action_strength #

fn (s &Input) get_action_strength(action string, cfg Input_get_action_strength_Cfg) f64

Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis such as the keyboard, the value returned will be 0 or 1. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.

fn (Input) get_action_raw_strength #

fn (s &Input) get_action_raw_strength(action string, cfg Input_get_action_raw_strength_Cfg) f64

Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [method get_action_strength] instead. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.

fn (Input) get_axis #

fn (s &Input) get_axis(negative_action string, positive_action string) f64

Get axis input by specifying two actions, one negative and one positive. This is a shorthand for writing Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action").

fn (Input) get_vector #

fn (s &Input) get_vector(negative_x string, positive_x string, negative_y string, positive_y string, cfg Input_get_vector_Cfg) Vector2

Gets an input vector by specifying four actions for the positive and negative X and Y axes. This method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to 1 and has a circular deadzone, which is useful for using vector input as movement. By default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of 0 to 1).

fn (Input) add_joy_mapping #

fn (s &Input) add_joy_mapping(mapping string, cfg Input_add_joy_mapping_Cfg)

Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.

fn (Input) remove_joy_mapping #

fn (s &Input) remove_joy_mapping(guid string)

Removes all mappings from the internal database that match the given GUID. All currently connected joypads that use this GUID will become unmapped. On Android, Godot will map to an internal fallback mapping.

fn (Input) is_joy_known #

fn (s &Input) is_joy_known(device i64) bool

Returns true if the system knows the specified device. This means that it sets all button and axis indices. Unknown joypads are not expected to match these constants, but you can still retrieve events from them.

fn (Input) get_joy_axis #

fn (s &Input) get_joy_axis(device i64, axis JoyAxis) f64

Returns the current value of the joypad axis at index [param axis].

fn (Input) get_joy_name #

fn (s &Input) get_joy_name(device i64) string

Returns the name of the joypad at the specified device index, e.g. PS4 Controller. Godot uses the [url=https://github.com/gabomdq/SDL_GameControllerDB]SDL2 game controller database[/url] to determine gamepad names.

fn (Input) get_joy_guid #

fn (s &Input) get_joy_guid(device i64) string

Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. 030000004c050000c405000000010000. Returns an empty string if it cannot be found. Godot uses the [url=https://github.com/gabomdq/SDL_GameControllerDB]SDL2 game controller database[/url] to determine gamepad names and mappings based on this GUID. On Windows, all XInput joypad GUIDs will be overridden by Godot to __XINPUT_DEVICE__, because their mappings are the same.

fn (Input) get_joy_info #

fn (s &Input) get_joy_info(device i64) Dictionary

Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index. On Windows, the dictionary contains the following fields: xinput_index: The index of the controller in the XInput system. Undefined for DirectInput devices. vendor_id: The USB vendor ID of the device. product_id: The USB product ID of the device. On Linux: raw_name: The name of the controller as it came from the OS, before getting renamed by the godot controller database. vendor_id: The USB vendor ID of the device. product_id: The USB product ID of the device. steam_input_index: The Steam Input gamepad index, if the device is not a Steam Input device this key won't be present. [b]Note:[/b] The returned dictionary is always empty on Web, iOS, Android, and macOS.

fn (Input) should_ignore_device #

fn (s &Input) should_ignore_device(vendor_id i64, product_id i64) bool

Queries whether an input device should be ignored or not. Devices can be ignored by setting the environment variable SDL_GAMECONTROLLER_IGNORE_DEVICES. Read the [url=https://wiki.libsdl.org/SDL2]SDL documentation[/url] for more information. [b]Note:[/b] Some 3rd party tools can contribute to the list of ignored devices. For example, [i]SteamInput[/i] creates virtual devices from physical devices for remapping purposes. To avoid handling the same input device twice, the original device is added to the ignore list.

fn (Input) get_connected_joypads #

fn (s &Input) get_connected_joypads() Array

Returns an [Array] containing the device IDs of all currently connected joypads.

fn (Input) get_joy_vibration_strength #

fn (s &Input) get_joy_vibration_strength(device i64) Vector2

Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor.

fn (Input) get_joy_vibration_duration #

fn (s &Input) get_joy_vibration_duration(device i64) f64

Returns the duration of the current vibration effect in seconds.

fn (Input) start_joy_vibration #

fn (s &Input) start_joy_vibration(device i64, weak_magnitude f64, strong_magnitude f64, cfg Input_start_joy_vibration_Cfg)

Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [param weak_magnitude] is the strength of the weak motor (between 0 and 1) and [param strong_magnitude] is the strength of the strong motor (between 0 and 1). [param duration] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). The vibration can be stopped early by calling [method stop_joy_vibration]. [b]Note:[/b] Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. [b]Note:[/b] For macOS, vibration is only supported in macOS 11 and later.

fn (Input) stop_joy_vibration #

fn (s &Input) stop_joy_vibration(device i64)

Stops the vibration of the joypad started with [method start_joy_vibration].

fn (Input) vibrate_handheld #

fn (s &Input) vibrate_handheld(cfg Input_vibrate_handheld_Cfg)

Vibrate the handheld device for the specified duration in milliseconds. [param amplitude] is the strength of the vibration, as a value between 0.0 and 1.0. If set to -1.0, the default vibration strength of the device is used. [b]Note:[/b] This method is implemented on Android, iOS, and Web. It has no effect on other platforms. [b]Note:[/b] For Android, [method vibrate_handheld] requires enabling the VIBRATE permission in the export preset. Otherwise, [method vibrate_handheld] will have no effect. [b]Note:[/b] For iOS, specifying the duration is only supported in iOS 13 and later. [b]Note:[/b] For Web, the amplitude cannot be changed. [b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support [method vibrate_handheld].

fn (Input) get_gravity #

fn (s &Input) get_gravity() Vector3

Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. [b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. [b]Note:[/b] For Android, [member ProjectSettings.input_devices/sensors/enable_gravity] must be enabled.

fn (Input) get_accelerometer #

fn (s &Input) get_accelerometer() Vector3

Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. Note this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. [b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. [b]Note:[/b] For Android, [member ProjectSettings.input_devices/sensors/enable_accelerometer] must be enabled.

fn (Input) get_magnetometer #

fn (s &Input) get_magnetometer() Vector3

Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. [b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. [b]Note:[/b] For Android, [member ProjectSettings.input_devices/sensors/enable_magnetometer] must be enabled.

fn (Input) get_gyroscope #

fn (s &Input) get_gyroscope() Vector3

Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. [b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. [b]Note:[/b] For Android, [member ProjectSettings.input_devices/sensors/enable_gyroscope] must be enabled.

fn (Input) set_gravity #

fn (s &Input) set_gravity(value Vector3)

Sets the gravity value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. [b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.

fn (Input) set_accelerometer #

fn (s &Input) set_accelerometer(value Vector3)

Sets the acceleration value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. [b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.

fn (Input) set_magnetometer #

fn (s &Input) set_magnetometer(value Vector3)

Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. [b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.

fn (Input) set_gyroscope #

fn (s &Input) set_gyroscope(value Vector3)

Sets the value of the rotation rate of the gyroscope sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. [b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.

fn (Input) get_last_mouse_velocity #

fn (s &Input) get_last_mouse_velocity() Vector2

Returns the last mouse velocity. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements.

fn (Input) get_last_mouse_screen_velocity #

fn (s &Input) get_last_mouse_screen_velocity() Vector2

Returns the last mouse velocity in screen coordinates. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements.

fn (Input) get_mouse_button_mask #

fn (s &Input) get_mouse_button_mask() MouseButtonMask

Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method DisplayServer.mouse_get_button_state].

fn (Input) set_mouse_mode #

fn (s &Input) set_mouse_mode(mode InputMouseMode)

fn (Input) get_mouse_mode #

fn (s &Input) get_mouse_mode() InputMouseMode

fn (Input) warp_mouse #

fn (s &Input) warp_mouse(position Vector2)

Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window. Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [constant MOUSE_MODE_CONFINED] or [constant MOUSE_MODE_CONFINED_HIDDEN]. [b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.

fn (Input) action_press #

fn (s &Input) action_press(action string, cfg Input_action_press_Cfg)

This will simulate pressing the specified action. The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action. [b]Note:[/b] This method will not cause any [method Node._input] calls. It is intended to be used with [method is_action_pressed] and [method is_action_just_pressed]. If you want to simulate _input, use [method parse_input_event] instead.

fn (Input) action_release #

fn (s &Input) action_release(action string)

If the specified action is already pressed, this will release it.

fn (Input) set_default_cursor_shape #

fn (s &Input) set_default_cursor_shape(cfg Input_set_default_cursor_shape_Cfg)

Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW]. [b]Note:[/b] If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead. [b]Note:[/b] This method generates an [InputEventMouseMotion] to update cursor immediately.

fn (Input) get_current_cursor_shape #

fn (s &Input) get_current_cursor_shape() InputCursorShape

Returns the currently assigned cursor shape.

fn (Input) set_custom_mouse_cursor #

fn (s &Input) set_custom_mouse_cursor(image Resource, cfg Input_set_custom_mouse_cursor_Cfg)

Sets a custom mouse cursor image, which is only visible inside the game window, for the given mouse [param shape]. The hotspot can also be specified. Passing null to the image parameter resets to the system cursor. [param image] can be either [Texture2D] or [Image] and its size must be lower than or equal to 256×256. To avoid rendering issues, sizes lower than or equal to 128×128 are recommended. [param hotspot] must be within [param image]'s size. [b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed. [b]Note:[/b] The [b]Lossless[/b], [b]Lossy[/b] or [b]Uncompressed[/b] compression modes are recommended. The [b]Video RAM[/b] compression mode can be used, but it will be decompressed on the CPU, which means loading times are slowed down and no memory is saved compared to lossless modes. [b]Note:[/b] On the web platform, the maximum allowed cursor image size is 128×128. Cursor images larger than 32×32 will also only be displayed if the mouse cursor image is entirely located within the page for [url=https://chromestatus.com/feature/5825971391299584]security reasons[/url].

fn (Input) parse_input_event #

fn (s &Input) parse_input_event(event InputEvent)

Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls. [codeblocks] [gdscript] var cancel_event = InputEventAction.new() cancel_event.action = "ui_cancel" cancel_event.pressed = true Input.parse_input_event(cancel_event) [/gdscript] [csharp] var cancelEvent = new InputEventAction(); cancelEvent.Action = "ui_cancel"; cancelEvent.Pressed = true; Input.ParseInputEvent(cancelEvent); [/csharp] [/codeblocks] [b]Note:[/b] Calling this function has no influence on the operating system. So for example sending an [InputEventMouseMotion] will not move the OS mouse cursor to the specified position (use [method warp_mouse] instead) and sending [kbd]Alt/Cmd + Tab[/kbd] as [InputEventKey] won't toggle between active windows.

fn (Input) set_use_accumulated_input #

fn (s &Input) set_use_accumulated_input(enable bool)

fn (Input) is_using_accumulated_input #

fn (s &Input) is_using_accumulated_input() bool

fn (Input) flush_buffered_events #

fn (s &Input) flush_buffered_events()

Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([member use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]). The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling.

fn (Input) set_emulate_mouse_from_touch #

fn (s &Input) set_emulate_mouse_from_touch(enable bool)

fn (Input) is_emulating_mouse_from_touch #

fn (s &Input) is_emulating_mouse_from_touch() bool

fn (Input) set_emulate_touch_from_mouse #

fn (s &Input) set_emulate_touch_from_mouse(enable bool)

fn (Input) is_emulating_touch_from_mouse #

fn (s &Input) is_emulating_touch_from_mouse() bool

struct InputEvent #

struct InputEvent {
	Resource
}

Abstract base class for input events.

fn (InputEvent) to_variant #

fn (s &InputEvent) to_variant() Variant

fn (InputEvent) from_variant #

fn (mut s InputEvent) from_variant(variant &Variant)

fn (InputEvent) set_device #

fn (s &InputEvent) set_device(device i64)

fn (InputEvent) get_device #

fn (s &InputEvent) get_device() i64

fn (InputEvent) is_action #

fn (s &InputEvent) is_action(action string, cfg InputEvent_is_action_Cfg) bool

Returns true if this input event matches a pre-defined action of any type. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.

fn (InputEvent) is_action_pressed #

fn (s &InputEvent) is_action_pressed(action string, cfg InputEvent_is_action_pressed_Cfg) bool

Returns true if the given action matches this event and is being pressed (and is not an echo event for [InputEventKey] events, unless [param allow_echo] is true). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. [b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return false even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.

fn (InputEvent) is_action_released #

fn (s &InputEvent) is_action_released(action string, cfg InputEvent_is_action_released_Cfg) bool

Returns true if the given action matches this event and is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.

fn (InputEvent) get_action_strength #

fn (s &InputEvent) get_action_strength(action string, cfg InputEvent_get_action_strength_Cfg) f64

Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion]. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.

fn (InputEvent) is_canceled #

fn (s &InputEvent) is_canceled() bool

Returns true if this input event has been canceled.

fn (InputEvent) is_pressed #

fn (s &InputEvent) is_pressed() bool

Returns true if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. [b]Note:[/b] Due to keyboard ghosting, [method is_pressed] may return false even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.

fn (InputEvent) is_released #

fn (s &InputEvent) is_released() bool

Returns true if this input event is released. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].

fn (InputEvent) is_echo #

fn (s &InputEvent) is_echo() bool

Returns true if this input event is an echo event (only for events of type [InputEventKey]). An echo event is a repeated key event sent when the user is holding down the key. Any other event type returns false. [b]Note:[/b] The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior.

fn (InputEvent) as_text #

fn (s &InputEvent) as_text() string

Returns a [String] representation of the event.

fn (InputEvent) is_match #

fn (s &InputEvent) is_match(event InputEvent, cfg InputEvent_is_match_Cfg) bool

Returns true if the specified [param event] matches this event. Only valid for action events, which include key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion], and action ([InputEventAction]) events. If [param exact_match] is false, the check ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. [b]Note:[/b] This method only considers the event configuration (such as the keyboard key or the joypad axis), not state information like [method is_pressed], [method is_released], [method is_echo], or [method is_canceled].

fn (InputEvent) is_action_type #

fn (s &InputEvent) is_action_type() bool

Returns true if this input event's type is one that can be assigned to an input action.

fn (InputEvent) accumulate #

fn (s &InputEvent) accumulate(with_event InputEvent) bool

Returns true if the given input event and this input event can be added together (only for events of type [InputEventMouseMotion]). The given input event's position, global position and speed will be copied. The resulting relative is a sum of both events. Both events' modifiers have to be identical.

fn (InputEvent) xformed_by #

fn (s &InputEvent) xformed_by(xform Transform2D, cfg InputEvent_xformed_by_Cfg) InputEvent

Returns a copy of the given input event which has been offset by [param local_ofs] and transformed by [param xform]. Relevant for events of type [InputEventMouseButton], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [InputEventPanGesture].

struct InputEventAction #

struct InputEventAction {
	InputEvent
}

An input event type for actions.

fn (InputEventAction) to_variant #

fn (s &InputEventAction) to_variant() Variant

fn (InputEventAction) from_variant #

fn (mut s InputEventAction) from_variant(variant &Variant)

fn (InputEventAction) set_action #

fn (s &InputEventAction) set_action(action string)

fn (InputEventAction) get_action #

fn (s &InputEventAction) get_action() string

fn (InputEventAction) set_pressed #

fn (s &InputEventAction) set_pressed(pressed bool)

fn (InputEventAction) set_strength #

fn (s &InputEventAction) set_strength(strength f64)

fn (InputEventAction) get_strength #

fn (s &InputEventAction) get_strength() f64

fn (InputEventAction) set_event_index #

fn (s &InputEventAction) set_event_index(index i64)

fn (InputEventAction) get_event_index #

fn (s &InputEventAction) get_event_index() i64

struct InputEventFromWindow #

struct InputEventFromWindow {
	InputEvent
}

Abstract base class for [Viewport]-based input events.

fn (InputEventFromWindow) to_variant #

fn (s &InputEventFromWindow) to_variant() Variant

fn (InputEventFromWindow) from_variant #

fn (mut s InputEventFromWindow) from_variant(variant &Variant)

fn (InputEventFromWindow) set_window_id #

fn (s &InputEventFromWindow) set_window_id(id i64)

fn (InputEventFromWindow) get_window_id #

fn (s &InputEventFromWindow) get_window_id() i64

struct InputEventGesture #

struct InputEventGesture {
	InputEventWithModifiers
}

Abstract base class for touch gestures.

fn (InputEventGesture) to_variant #

fn (s &InputEventGesture) to_variant() Variant

fn (InputEventGesture) from_variant #

fn (mut s InputEventGesture) from_variant(variant &Variant)

fn (InputEventGesture) set_position #

fn (s &InputEventGesture) set_position(position Vector2)

fn (InputEventGesture) get_position #

fn (s &InputEventGesture) get_position() Vector2

struct InputEventJoypadButton #

struct InputEventJoypadButton {
	InputEvent
}

Represents a gamepad button being pressed or released.

fn (InputEventJoypadButton) to_variant #

fn (s &InputEventJoypadButton) to_variant() Variant

fn (InputEventJoypadButton) from_variant #

fn (mut s InputEventJoypadButton) from_variant(variant &Variant)

fn (InputEventJoypadButton) set_button_index #

fn (s &InputEventJoypadButton) set_button_index(button_index JoyButton)

fn (InputEventJoypadButton) get_button_index #

fn (s &InputEventJoypadButton) get_button_index() JoyButton

fn (InputEventJoypadButton) set_pressure #

fn (s &InputEventJoypadButton) set_pressure(pressure f64)

fn (InputEventJoypadButton) get_pressure #

fn (s &InputEventJoypadButton) get_pressure() f64

fn (InputEventJoypadButton) set_pressed #

fn (s &InputEventJoypadButton) set_pressed(pressed bool)

struct InputEventJoypadMotion #

struct InputEventJoypadMotion {
	InputEvent
}

Represents axis motions (such as joystick or analog triggers) from a gamepad.

fn (InputEventJoypadMotion) to_variant #

fn (s &InputEventJoypadMotion) to_variant() Variant

fn (InputEventJoypadMotion) from_variant #

fn (mut s InputEventJoypadMotion) from_variant(variant &Variant)

fn (InputEventJoypadMotion) set_axis #

fn (s &InputEventJoypadMotion) set_axis(axis JoyAxis)

fn (InputEventJoypadMotion) get_axis #

fn (s &InputEventJoypadMotion) get_axis() JoyAxis

fn (InputEventJoypadMotion) set_axis_value #

fn (s &InputEventJoypadMotion) set_axis_value(axis_value f64)

fn (InputEventJoypadMotion) get_axis_value #

fn (s &InputEventJoypadMotion) get_axis_value() f64

struct InputEventKey #

struct InputEventKey {
	InputEventWithModifiers
}

Represents a key on a keyboard being pressed or released.

fn (InputEventKey) to_variant #

fn (s &InputEventKey) to_variant() Variant

fn (InputEventKey) from_variant #

fn (mut s InputEventKey) from_variant(variant &Variant)

fn (InputEventKey) set_pressed #

fn (s &InputEventKey) set_pressed(pressed bool)

fn (InputEventKey) set_keycode #

fn (s &InputEventKey) set_keycode(keycode Key)

fn (InputEventKey) get_keycode #

fn (s &InputEventKey) get_keycode() Key

fn (InputEventKey) set_physical_keycode #

fn (s &InputEventKey) set_physical_keycode(physical_keycode Key)

fn (InputEventKey) get_physical_keycode #

fn (s &InputEventKey) get_physical_keycode() Key

fn (InputEventKey) set_key_label #

fn (s &InputEventKey) set_key_label(key_label Key)

fn (InputEventKey) get_key_label #

fn (s &InputEventKey) get_key_label() Key

fn (InputEventKey) set_unicode #

fn (s &InputEventKey) set_unicode(unicode i64)

fn (InputEventKey) get_unicode #

fn (s &InputEventKey) get_unicode() i64

fn (InputEventKey) set_location #

fn (s &InputEventKey) set_location(location KeyLocation)

fn (InputEventKey) get_location #

fn (s &InputEventKey) get_location() KeyLocation

fn (InputEventKey) set_echo #

fn (s &InputEventKey) set_echo(echo bool)

fn (InputEventKey) get_keycode_with_modifiers #

fn (s &InputEventKey) get_keycode_with_modifiers() Key

Returns the Latin keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use OS.get_keycode_string(event.get_keycode_with_modifiers()) where event is the [InputEventKey].

fn (InputEventKey) get_physical_keycode_with_modifiers #

fn (s &InputEventKey) get_physical_keycode_with_modifiers() Key

Returns the physical keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use OS.get_keycode_string(event.get_physical_keycode_with_modifiers()) where event is the [InputEventKey].

fn (InputEventKey) get_key_label_with_modifiers #

fn (s &InputEventKey) get_key_label_with_modifiers() Key

Returns the localized key label combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use OS.get_keycode_string(event.get_key_label_with_modifiers()) where event is the [InputEventKey].

fn (InputEventKey) as_text_keycode #

fn (s &InputEventKey) as_text_keycode() string

Returns a [String] representation of the event's [member keycode] and modifiers.

fn (InputEventKey) as_text_physical_keycode #

fn (s &InputEventKey) as_text_physical_keycode() string

Returns a [String] representation of the event's [member physical_keycode] and modifiers.

fn (InputEventKey) as_text_key_label #

fn (s &InputEventKey) as_text_key_label() string

Returns a [String] representation of the event's [member key_label] and modifiers.

fn (InputEventKey) as_text_location #

fn (s &InputEventKey) as_text_location() string

Returns a [String] representation of the event's [member location]. This will be a blank string if the event is not specific to a location.

struct InputEventMIDI #

struct InputEventMIDI {
	InputEvent
}

Represents a MIDI message from a MIDI device, such as a musical keyboard.

fn (InputEventMIDI) to_variant #

fn (s &InputEventMIDI) to_variant() Variant

fn (InputEventMIDI) from_variant #

fn (mut s InputEventMIDI) from_variant(variant &Variant)

fn (InputEventMIDI) set_channel #

fn (s &InputEventMIDI) set_channel(channel i64)

fn (InputEventMIDI) get_channel #

fn (s &InputEventMIDI) get_channel() i64

fn (InputEventMIDI) set_message #

fn (s &InputEventMIDI) set_message(message MIDIMessage)

fn (InputEventMIDI) get_message #

fn (s &InputEventMIDI) get_message() MIDIMessage

fn (InputEventMIDI) set_pitch #

fn (s &InputEventMIDI) set_pitch(pitch i64)

fn (InputEventMIDI) get_pitch #

fn (s &InputEventMIDI) get_pitch() i64

fn (InputEventMIDI) set_velocity #

fn (s &InputEventMIDI) set_velocity(velocity i64)

fn (InputEventMIDI) get_velocity #

fn (s &InputEventMIDI) get_velocity() i64

fn (InputEventMIDI) set_instrument #

fn (s &InputEventMIDI) set_instrument(instrument i64)

fn (InputEventMIDI) get_instrument #

fn (s &InputEventMIDI) get_instrument() i64

fn (InputEventMIDI) set_pressure #

fn (s &InputEventMIDI) set_pressure(pressure i64)

fn (InputEventMIDI) get_pressure #

fn (s &InputEventMIDI) get_pressure() i64

fn (InputEventMIDI) set_controller_number #

fn (s &InputEventMIDI) set_controller_number(controller_number i64)

fn (InputEventMIDI) get_controller_number #

fn (s &InputEventMIDI) get_controller_number() i64

fn (InputEventMIDI) set_controller_value #

fn (s &InputEventMIDI) set_controller_value(controller_value i64)

fn (InputEventMIDI) get_controller_value #

fn (s &InputEventMIDI) get_controller_value() i64

struct InputEventMagnifyGesture #

struct InputEventMagnifyGesture {
	InputEventGesture
}

Represents a magnifying touch gesture.

fn (InputEventMagnifyGesture) to_variant #

fn (s &InputEventMagnifyGesture) to_variant() Variant

fn (InputEventMagnifyGesture) from_variant #

fn (mut s InputEventMagnifyGesture) from_variant(variant &Variant)

fn (InputEventMagnifyGesture) set_factor #

fn (s &InputEventMagnifyGesture) set_factor(factor f64)

fn (InputEventMagnifyGesture) get_factor #

fn (s &InputEventMagnifyGesture) get_factor() f64

struct InputEventMouse #

struct InputEventMouse {
	InputEventWithModifiers
}

Base input event type for mouse events.

fn (InputEventMouse) to_variant #

fn (s &InputEventMouse) to_variant() Variant

fn (InputEventMouse) from_variant #

fn (mut s InputEventMouse) from_variant(variant &Variant)

fn (InputEventMouse) set_button_mask #

fn (s &InputEventMouse) set_button_mask(button_mask MouseButtonMask)

fn (InputEventMouse) get_button_mask #

fn (s &InputEventMouse) get_button_mask() MouseButtonMask

fn (InputEventMouse) set_position #

fn (s &InputEventMouse) set_position(position Vector2)

fn (InputEventMouse) get_position #

fn (s &InputEventMouse) get_position() Vector2

fn (InputEventMouse) set_global_position #

fn (s &InputEventMouse) set_global_position(global_position Vector2)

fn (InputEventMouse) get_global_position #

fn (s &InputEventMouse) get_global_position() Vector2

struct InputEventMouseButton #

struct InputEventMouseButton {
	InputEventMouse
}

Represents a mouse button being pressed or released.

fn (InputEventMouseButton) to_variant #

fn (s &InputEventMouseButton) to_variant() Variant

fn (InputEventMouseButton) from_variant #

fn (mut s InputEventMouseButton) from_variant(variant &Variant)

fn (InputEventMouseButton) set_factor #

fn (s &InputEventMouseButton) set_factor(factor f64)

fn (InputEventMouseButton) get_factor #

fn (s &InputEventMouseButton) get_factor() f64

fn (InputEventMouseButton) set_button_index #

fn (s &InputEventMouseButton) set_button_index(button_index MouseButton)

fn (InputEventMouseButton) get_button_index #

fn (s &InputEventMouseButton) get_button_index() MouseButton

fn (InputEventMouseButton) set_pressed #

fn (s &InputEventMouseButton) set_pressed(pressed bool)

fn (InputEventMouseButton) set_canceled #

fn (s &InputEventMouseButton) set_canceled(canceled bool)

fn (InputEventMouseButton) set_double_click #

fn (s &InputEventMouseButton) set_double_click(double_click bool)

fn (InputEventMouseButton) is_double_click #

fn (s &InputEventMouseButton) is_double_click() bool

struct InputEventMouseMotion #

struct InputEventMouseMotion {
	InputEventMouse
}

Represents a mouse or a pen movement.

fn (InputEventMouseMotion) to_variant #

fn (s &InputEventMouseMotion) to_variant() Variant

fn (InputEventMouseMotion) from_variant #

fn (mut s InputEventMouseMotion) from_variant(variant &Variant)

fn (InputEventMouseMotion) set_tilt #

fn (s &InputEventMouseMotion) set_tilt(tilt Vector2)

fn (InputEventMouseMotion) get_tilt #

fn (s &InputEventMouseMotion) get_tilt() Vector2

fn (InputEventMouseMotion) set_pressure #

fn (s &InputEventMouseMotion) set_pressure(pressure f64)

fn (InputEventMouseMotion) get_pressure #

fn (s &InputEventMouseMotion) get_pressure() f64

fn (InputEventMouseMotion) set_pen_inverted #

fn (s &InputEventMouseMotion) set_pen_inverted(pen_inverted bool)

fn (InputEventMouseMotion) get_pen_inverted #

fn (s &InputEventMouseMotion) get_pen_inverted() bool

fn (InputEventMouseMotion) set_relative #

fn (s &InputEventMouseMotion) set_relative(relative Vector2)

fn (InputEventMouseMotion) get_relative #

fn (s &InputEventMouseMotion) get_relative() Vector2

fn (InputEventMouseMotion) set_screen_relative #

fn (s &InputEventMouseMotion) set_screen_relative(relative Vector2)

fn (InputEventMouseMotion) get_screen_relative #

fn (s &InputEventMouseMotion) get_screen_relative() Vector2

fn (InputEventMouseMotion) set_velocity #

fn (s &InputEventMouseMotion) set_velocity(velocity Vector2)

fn (InputEventMouseMotion) get_velocity #

fn (s &InputEventMouseMotion) get_velocity() Vector2

fn (InputEventMouseMotion) set_screen_velocity #

fn (s &InputEventMouseMotion) set_screen_velocity(velocity Vector2)

fn (InputEventMouseMotion) get_screen_velocity #

fn (s &InputEventMouseMotion) get_screen_velocity() Vector2

struct InputEventPanGesture #

struct InputEventPanGesture {
	InputEventGesture
}

Represents a panning touch gesture.

fn (InputEventPanGesture) to_variant #

fn (s &InputEventPanGesture) to_variant() Variant

fn (InputEventPanGesture) from_variant #

fn (mut s InputEventPanGesture) from_variant(variant &Variant)

fn (InputEventPanGesture) set_delta #

fn (s &InputEventPanGesture) set_delta(delta Vector2)

fn (InputEventPanGesture) get_delta #

fn (s &InputEventPanGesture) get_delta() Vector2

struct InputEventScreenDrag #

struct InputEventScreenDrag {
	InputEventFromWindow
}

Represents a screen drag event.

fn (InputEventScreenDrag) to_variant #

fn (s &InputEventScreenDrag) to_variant() Variant

fn (InputEventScreenDrag) from_variant #

fn (mut s InputEventScreenDrag) from_variant(variant &Variant)

fn (InputEventScreenDrag) set_index #

fn (s &InputEventScreenDrag) set_index(index i64)

fn (InputEventScreenDrag) get_index #

fn (s &InputEventScreenDrag) get_index() i64

fn (InputEventScreenDrag) set_tilt #

fn (s &InputEventScreenDrag) set_tilt(tilt Vector2)

fn (InputEventScreenDrag) get_tilt #

fn (s &InputEventScreenDrag) get_tilt() Vector2

fn (InputEventScreenDrag) set_pressure #

fn (s &InputEventScreenDrag) set_pressure(pressure f64)

fn (InputEventScreenDrag) get_pressure #

fn (s &InputEventScreenDrag) get_pressure() f64

fn (InputEventScreenDrag) set_pen_inverted #

fn (s &InputEventScreenDrag) set_pen_inverted(pen_inverted bool)

fn (InputEventScreenDrag) get_pen_inverted #

fn (s &InputEventScreenDrag) get_pen_inverted() bool

fn (InputEventScreenDrag) set_position #

fn (s &InputEventScreenDrag) set_position(position Vector2)

fn (InputEventScreenDrag) get_position #

fn (s &InputEventScreenDrag) get_position() Vector2

fn (InputEventScreenDrag) set_relative #

fn (s &InputEventScreenDrag) set_relative(relative Vector2)

fn (InputEventScreenDrag) get_relative #

fn (s &InputEventScreenDrag) get_relative() Vector2

fn (InputEventScreenDrag) set_screen_relative #

fn (s &InputEventScreenDrag) set_screen_relative(relative Vector2)

fn (InputEventScreenDrag) get_screen_relative #

fn (s &InputEventScreenDrag) get_screen_relative() Vector2

fn (InputEventScreenDrag) set_velocity #

fn (s &InputEventScreenDrag) set_velocity(velocity Vector2)

fn (InputEventScreenDrag) get_velocity #

fn (s &InputEventScreenDrag) get_velocity() Vector2

fn (InputEventScreenDrag) set_screen_velocity #

fn (s &InputEventScreenDrag) set_screen_velocity(velocity Vector2)

fn (InputEventScreenDrag) get_screen_velocity #

fn (s &InputEventScreenDrag) get_screen_velocity() Vector2

struct InputEventScreenTouch #

struct InputEventScreenTouch {
	InputEventFromWindow
}

Represents a screen touch event.

fn (InputEventScreenTouch) to_variant #

fn (s &InputEventScreenTouch) to_variant() Variant

fn (InputEventScreenTouch) from_variant #

fn (mut s InputEventScreenTouch) from_variant(variant &Variant)

fn (InputEventScreenTouch) set_index #

fn (s &InputEventScreenTouch) set_index(index i64)

fn (InputEventScreenTouch) get_index #

fn (s &InputEventScreenTouch) get_index() i64

fn (InputEventScreenTouch) set_position #

fn (s &InputEventScreenTouch) set_position(position Vector2)

fn (InputEventScreenTouch) get_position #

fn (s &InputEventScreenTouch) get_position() Vector2

fn (InputEventScreenTouch) set_pressed #

fn (s &InputEventScreenTouch) set_pressed(pressed bool)

fn (InputEventScreenTouch) set_canceled #

fn (s &InputEventScreenTouch) set_canceled(canceled bool)

fn (InputEventScreenTouch) set_double_tap #

fn (s &InputEventScreenTouch) set_double_tap(double_tap bool)

fn (InputEventScreenTouch) is_double_tap #

fn (s &InputEventScreenTouch) is_double_tap() bool

struct InputEventShortcut #

struct InputEventShortcut {
	InputEvent
}

Represents a triggered keyboard [Shortcut].

fn (InputEventShortcut) to_variant #

fn (s &InputEventShortcut) to_variant() Variant

fn (InputEventShortcut) from_variant #

fn (mut s InputEventShortcut) from_variant(variant &Variant)

fn (InputEventShortcut) set_shortcut #

fn (s &InputEventShortcut) set_shortcut(shortcut Shortcut)

fn (InputEventShortcut) get_shortcut #

fn (s &InputEventShortcut) get_shortcut() Shortcut

struct InputEventWithModifiers #

struct InputEventWithModifiers {
	InputEventFromWindow
}

Abstract base class for input events affected by modifier keys like [kbd]Shift[/kbd] and [kbd]Alt[/kbd].

fn (InputEventWithModifiers) to_variant #

fn (s &InputEventWithModifiers) to_variant() Variant

fn (InputEventWithModifiers) from_variant #

fn (mut s InputEventWithModifiers) from_variant(variant &Variant)

fn (InputEventWithModifiers) set_command_or_control_autoremap #

fn (s &InputEventWithModifiers) set_command_or_control_autoremap(enable bool)

fn (InputEventWithModifiers) is_command_or_control_autoremap #

fn (s &InputEventWithModifiers) is_command_or_control_autoremap() bool

fn (InputEventWithModifiers) is_command_or_control_pressed #

fn (s &InputEventWithModifiers) is_command_or_control_pressed() bool

On macOS, returns true if [kbd]Meta[/kbd] ([kbd]Cmd[/kbd]) is pressed. On other platforms, returns true if [kbd]Ctrl[/kbd] is pressed.

fn (InputEventWithModifiers) set_alt_pressed #

fn (s &InputEventWithModifiers) set_alt_pressed(pressed bool)

fn (InputEventWithModifiers) is_alt_pressed #

fn (s &InputEventWithModifiers) is_alt_pressed() bool

fn (InputEventWithModifiers) set_shift_pressed #

fn (s &InputEventWithModifiers) set_shift_pressed(pressed bool)

fn (InputEventWithModifiers) is_shift_pressed #

fn (s &InputEventWithModifiers) is_shift_pressed() bool

fn (InputEventWithModifiers) set_ctrl_pressed #

fn (s &InputEventWithModifiers) set_ctrl_pressed(pressed bool)

fn (InputEventWithModifiers) is_ctrl_pressed #

fn (s &InputEventWithModifiers) is_ctrl_pressed() bool

fn (InputEventWithModifiers) set_meta_pressed #

fn (s &InputEventWithModifiers) set_meta_pressed(pressed bool)

fn (InputEventWithModifiers) is_meta_pressed #

fn (s &InputEventWithModifiers) is_meta_pressed() bool

fn (InputEventWithModifiers) get_modifiers_mask #

fn (s &InputEventWithModifiers) get_modifiers_mask() KeyModifierMask

Returns the keycode combination of modifier keys.

struct InputEvent_get_action_strength_Cfg #

@[params]
struct InputEvent_get_action_strength_Cfg {
pub:
	exact_match bool
}

Optional parameters for InputEvent#get_action_strength

struct InputEvent_is_action_Cfg #

@[params]
struct InputEvent_is_action_Cfg {
pub:
	exact_match bool
}

Optional parameters for InputEvent#is_action

struct InputEvent_is_action_pressed_Cfg #

@[params]
struct InputEvent_is_action_pressed_Cfg {
pub:
	allow_echo  bool
	exact_match bool
}

Optional parameters for InputEvent#is_action_pressed

struct InputEvent_is_action_released_Cfg #

@[params]
struct InputEvent_is_action_released_Cfg {
pub:
	exact_match bool
}

Optional parameters for InputEvent#is_action_released

struct InputEvent_is_match_Cfg #

@[params]
struct InputEvent_is_match_Cfg {
pub:
	exact_match bool
}

Optional parameters for InputEvent#is_match

struct InputEvent_xformed_by_Cfg #

@[params]
struct InputEvent_xformed_by_Cfg {
pub:
	local_ofs Vector2 = Vector2{0, 0}
}

Optional parameters for InputEvent#xformed_by

struct InputMap #

struct InputMap {
	Object
}

A singleton that manages all [InputEventAction]s.

fn (InputMap) to_variant #

fn (s &InputMap) to_variant() Variant

fn (InputMap) from_variant #

fn (mut s InputMap) from_variant(variant &Variant)

fn (InputMap) has_action #

fn (s &InputMap) has_action(action string) bool

Returns true if the [InputMap] has a registered action with the given name.

fn (InputMap) get_actions #

fn (s &InputMap) get_actions() Array

Returns an array of all actions in the [InputMap].

fn (InputMap) add_action #

fn (s &InputMap) add_action(action string, cfg InputMap_add_action_Cfg)

Adds an empty action to the [InputMap] with a configurable [param deadzone]. An [InputEvent] can then be added to this action with [method action_add_event].

fn (InputMap) erase_action #

fn (s &InputMap) erase_action(action string)

Removes an action from the [InputMap].

fn (InputMap) get_action_description #

fn (s &InputMap) get_action_description(action string) string

Returns the human-readable description of the given action.

fn (InputMap) action_set_deadzone #

fn (s &InputMap) action_set_deadzone(action string, deadzone f64)

Sets a deadzone value for the action.

fn (InputMap) action_get_deadzone #

fn (s &InputMap) action_get_deadzone(action string) f64

Returns a deadzone value for the action.

fn (InputMap) action_add_event #

fn (s &InputMap) action_add_event(action string, event InputEvent)

Adds an [InputEvent] to an action. This [InputEvent] will trigger the action.

fn (InputMap) action_has_event #

fn (s &InputMap) action_has_event(action string, event InputEvent) bool

Returns true if the action has the given [InputEvent] associated with it.

fn (InputMap) action_erase_event #

fn (s &InputMap) action_erase_event(action string, event InputEvent)

Removes an [InputEvent] from an action.

fn (InputMap) action_erase_events #

fn (s &InputMap) action_erase_events(action string)

Removes all events from an action.

fn (InputMap) action_get_events #

fn (s &InputMap) action_get_events(action string) Array

Returns an array of [InputEvent]s associated with a given action. [b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the input/* settings from [ProjectSettings].

fn (InputMap) event_is_action #

fn (s &InputMap) event_is_action(event InputEvent, action string, cfg InputMap_event_is_action_Cfg) bool

Returns true if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. If [param exact_match] is false, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.

fn (InputMap) load_from_project_settings #

fn (s &InputMap) load_from_project_settings()

Clears all [InputEventAction] in the [InputMap] and load it anew from [ProjectSettings].

struct InputMap_add_action_Cfg #

@[params]
struct InputMap_add_action_Cfg {
pub:
	deadzone f64 = 0.2
}

Optional parameters for InputMap#add_action

struct InputMap_event_is_action_Cfg #

@[params]
struct InputMap_event_is_action_Cfg {
pub:
	exact_match bool
}

Optional parameters for InputMap#event_is_action

struct Input_action_press_Cfg #

@[params]
struct Input_action_press_Cfg {
pub:
	strength f64 = 1.0
}

Optional parameters for Input#action_press

struct Input_add_joy_mapping_Cfg #

@[params]
struct Input_add_joy_mapping_Cfg {
pub:
	update_existing bool
}

Optional parameters for Input#add_joy_mapping

struct Input_get_action_raw_strength_Cfg #

@[params]
struct Input_get_action_raw_strength_Cfg {
pub:
	exact_match bool
}

Optional parameters for Input#get_action_raw_strength

struct Input_get_action_strength_Cfg #

@[params]
struct Input_get_action_strength_Cfg {
pub:
	exact_match bool
}

Optional parameters for Input#get_action_strength

struct Input_get_vector_Cfg #

@[params]
struct Input_get_vector_Cfg {
pub:
	deadzone f64 = -1.0
}

Optional parameters for Input#get_vector

struct Input_is_action_just_pressed_Cfg #

@[params]
struct Input_is_action_just_pressed_Cfg {
pub:
	exact_match bool
}

Optional parameters for Input#is_action_just_pressed

struct Input_is_action_just_released_Cfg #

@[params]
struct Input_is_action_just_released_Cfg {
pub:
	exact_match bool
}

Optional parameters for Input#is_action_just_released

struct Input_is_action_pressed_Cfg #

@[params]
struct Input_is_action_pressed_Cfg {
pub:
	exact_match bool
}

Optional parameters for Input#is_action_pressed

struct Input_set_custom_mouse_cursor_Cfg #

@[params]
struct Input_set_custom_mouse_cursor_Cfg {
pub:
	shape   InputCursorShape = unsafe { InputCursorShape(0) }
	hotspot Vector2          = Vector2{0, 0}
}

Optional parameters for Input#set_custom_mouse_cursor

struct Input_set_default_cursor_shape_Cfg #

@[params]
struct Input_set_default_cursor_shape_Cfg {
pub:
	shape InputCursorShape = unsafe { InputCursorShape(0) }
}

Optional parameters for Input#set_default_cursor_shape

struct Input_start_joy_vibration_Cfg #

@[params]
struct Input_start_joy_vibration_Cfg {
pub:
	duration f64
}

Optional parameters for Input#start_joy_vibration

struct Input_vibrate_handheld_Cfg #

@[params]
struct Input_vibrate_handheld_Cfg {
pub:
	duration_ms i64 = 500
	amplitude   f64 = -1.0
}

Optional parameters for Input#vibrate_handheld

struct InstancePlaceholder #

struct InstancePlaceholder {
	Node
}

Placeholder for the root [Node] of a [PackedScene].

fn (InstancePlaceholder) to_variant #

fn (s &InstancePlaceholder) to_variant() Variant

fn (InstancePlaceholder) from_variant #

fn (mut s InstancePlaceholder) from_variant(variant &Variant)

fn (InstancePlaceholder) get_stored_values #

fn (s &InstancePlaceholder) get_stored_values(cfg InstancePlaceholder_get_stored_values_Cfg) Dictionary

Returns the list of properties that will be applied to the node when [method create_instance] is called. If [param with_order] is true, a key named .order (note the leading period) is added to the dictionary. This .order key is an [Array] of [String] property names specifying the order in which properties will be applied (with index 0 being the first).

fn (InstancePlaceholder) create_instance #

fn (s &InstancePlaceholder) create_instance(cfg InstancePlaceholder_create_instance_Cfg) Node

Call this method to actually load in the node. The created node will be placed as a sibling [i]above[/i] the [InstancePlaceholder] in the scene tree. The [Node]'s reference is also returned for convenience. [b]Note:[/b] [method create_instance] is not thread-safe. Use [method Object.call_deferred] if calling from a thread.

fn (InstancePlaceholder) get_instance_path #

fn (s &InstancePlaceholder) get_instance_path() string

Gets the path to the [PackedScene] resource file that is loaded by default when calling [method create_instance]. Not thread-safe. Use [method Object.call_deferred] if calling from a thread.

struct InstancePlaceholder_create_instance_Cfg #

@[params]
struct InstancePlaceholder_create_instance_Cfg {
pub:
	replace      bool
	custom_scene PackedScene
}

Optional parameters for InstancePlaceholder#create_instance

struct InstancePlaceholder_get_stored_values_Cfg #

@[params]
struct InstancePlaceholder_get_stored_values_Cfg {
pub:
	with_order bool
}

Optional parameters for InstancePlaceholder#get_stored_values

struct IntervalTweener #

struct IntervalTweener {
	Tweener
}

Creates an idle interval in a [Tween] animation.

fn (IntervalTweener) to_variant #

fn (s &IntervalTweener) to_variant() Variant

fn (IntervalTweener) from_variant #

fn (mut s IntervalTweener) from_variant(variant &Variant)

struct ItemList #

struct ItemList {
	Control
}

A vertical list of selectable items with one or multiple columns.

fn (ItemList) to_variant #

fn (s &ItemList) to_variant() Variant

fn (ItemList) from_variant #

fn (mut s ItemList) from_variant(variant &Variant)

fn (ItemList) add_item #

fn (s &ItemList) add_item(text string, cfg ItemList_add_item_Cfg) i64

Adds an item to the item list with specified text. Returns the index of an added item. Specify an [param icon], or use null as the [param icon] for a list item with no icon. If [param selectable] is true, the list item will be selectable.

fn (ItemList) add_icon_item #

fn (s &ItemList) add_icon_item(icon Texture2D, cfg ItemList_add_icon_item_Cfg) i64

Adds an item to the item list with no text, only an icon. Returns the index of an added item.

fn (ItemList) set_item_text #

fn (s &ItemList) set_item_text(idx i64, text string)

Sets text of the item associated with the specified index.

fn (ItemList) get_item_text #

fn (s &ItemList) get_item_text(idx i64) string

Returns the text associated with the specified index.

fn (ItemList) set_item_icon #

fn (s &ItemList) set_item_icon(idx i64, icon Texture2D)

Sets (or replaces) the icon's [Texture2D] associated with the specified index.

fn (ItemList) get_item_icon #

fn (s &ItemList) get_item_icon(idx i64) Texture2D

Returns the icon associated with the specified index.

fn (ItemList) set_item_text_direction #

fn (s &ItemList) set_item_text_direction(idx i64, direction ControlTextDirection)

Sets item's text base writing direction.

fn (ItemList) get_item_text_direction #

fn (s &ItemList) get_item_text_direction(idx i64) ControlTextDirection

Returns item's text base writing direction.

fn (ItemList) set_item_language #

fn (s &ItemList) set_item_language(idx i64, language string)

Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.

fn (ItemList) get_item_language #

fn (s &ItemList) get_item_language(idx i64) string

Returns item's text language code.

fn (ItemList) set_item_auto_translate_mode #

fn (s &ItemList) set_item_auto_translate_mode(idx i64, mode NodeAutoTranslateMode)

Sets the auto translate mode of the item associated with the specified index. Items use [constant Node.AUTO_TRANSLATE_MODE_INHERIT] by default, which uses the same auto translate mode as the [ItemList] itself.

fn (ItemList) get_item_auto_translate_mode #

fn (s &ItemList) get_item_auto_translate_mode(idx i64) NodeAutoTranslateMode

Returns item's auto translate mode.

fn (ItemList) set_item_icon_transposed #

fn (s &ItemList) set_item_icon_transposed(idx i64, transposed bool)

Sets whether the item icon will be drawn transposed.

fn (ItemList) is_item_icon_transposed #

fn (s &ItemList) is_item_icon_transposed(idx i64) bool

Returns true if the item icon will be drawn transposed, i.e. the X and Y axes are swapped.

fn (ItemList) set_item_icon_region #

fn (s &ItemList) set_item_icon_region(idx i64, rect Rect2)

Sets the region of item's icon used. The whole icon will be used if the region has no area.

fn (ItemList) get_item_icon_region #

fn (s &ItemList) get_item_icon_region(idx i64) Rect2

Returns the region of item's icon used. The whole icon will be used if the region has no area.

fn (ItemList) set_item_icon_modulate #

fn (s &ItemList) set_item_icon_modulate(idx i64, modulate Color)

Sets a modulating [Color] of the item associated with the specified index.

fn (ItemList) get_item_icon_modulate #

fn (s &ItemList) get_item_icon_modulate(idx i64) Color

Returns a [Color] modulating item's icon at the specified index.

fn (ItemList) set_item_selectable #

fn (s &ItemList) set_item_selectable(idx i64, selectable bool)

Allows or disallows selection of the item associated with the specified index.

fn (ItemList) is_item_selectable #

fn (s &ItemList) is_item_selectable(idx i64) bool

Returns true if the item at the specified index is selectable.

fn (ItemList) set_item_disabled #

fn (s &ItemList) set_item_disabled(idx i64, disabled bool)

Disables (or enables) the item at the specified index. Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing [kbd]Enter[/kbd]).

fn (ItemList) is_item_disabled #

fn (s &ItemList) is_item_disabled(idx i64) bool

Returns true if the item at the specified index is disabled.

fn (ItemList) set_item_metadata #

fn (s &ItemList) set_item_metadata(idx i64, metadata_ ToVariant)

Sets a value (of any type) to be stored with the item associated with the specified index.

fn (ItemList) get_item_metadata #

fn (s &ItemList) get_item_metadata(idx i64) Variant

Returns the metadata value of the specified index.

fn (ItemList) set_item_custom_bg_color #

fn (s &ItemList) set_item_custom_bg_color(idx i64, custom_bg_color Color)

Sets the background color of the item specified by [param idx] index to the specified [Color].

fn (ItemList) get_item_custom_bg_color #

fn (s &ItemList) get_item_custom_bg_color(idx i64) Color

Returns the custom background color of the item specified by [param idx] index.

fn (ItemList) set_item_custom_fg_color #

fn (s &ItemList) set_item_custom_fg_color(idx i64, custom_fg_color Color)

Sets the foreground color of the item specified by [param idx] index to the specified [Color].

fn (ItemList) get_item_custom_fg_color #

fn (s &ItemList) get_item_custom_fg_color(idx i64) Color

Returns the custom foreground color of the item specified by [param idx] index.

fn (ItemList) get_item_rect #

fn (s &ItemList) get_item_rect(idx i64, cfg ItemList_get_item_rect_Cfg) Rect2

Returns the position and size of the item with the specified index, in the coordinate system of the [ItemList] node. If [param expand] is true the last column expands to fill the rest of the row. [b]Note:[/b] The returned value is unreliable if called right after modifying the [ItemList], before it redraws in the next frame.

fn (ItemList) set_item_tooltip_enabled #

fn (s &ItemList) set_item_tooltip_enabled(idx i64, enable bool)

Sets whether the tooltip hint is enabled for specified item index.

fn (ItemList) is_item_tooltip_enabled #

fn (s &ItemList) is_item_tooltip_enabled(idx i64) bool

Returns true if the tooltip is enabled for specified item index.

fn (ItemList) set_item_tooltip #

fn (s &ItemList) set_item_tooltip(idx i64, tooltip string)

Sets the tooltip hint for the item associated with the specified index.

fn (ItemList) get_item_tooltip #

fn (s &ItemList) get_item_tooltip(idx i64) string

Returns the tooltip hint associated with the specified index.

fn (ItemList) gd_select #

fn (s &ItemList) gd_select(idx i64, cfg ItemList_gd_select_Cfg)

Select the item at the specified index. [b]Note:[/b] This method does not trigger the item selection signal.

fn (ItemList) deselect #

fn (s &ItemList) deselect(idx i64)

Ensures the item associated with the specified index is not selected.

fn (ItemList) deselect_all #

fn (s &ItemList) deselect_all()

Ensures there are no items selected.

fn (ItemList) is_selected #

fn (s &ItemList) is_selected(idx i64) bool

Returns true if the item at the specified index is currently selected.

fn (ItemList) get_selected_items #

fn (s &ItemList) get_selected_items() PackedInt32Array

Returns an array with the indexes of the selected items.

fn (ItemList) move_item #

fn (s &ItemList) move_item(from_idx i64, to_idx i64)

Moves item from index [param from_idx] to [param to_idx].

fn (ItemList) set_item_count #

fn (s &ItemList) set_item_count(count i64)

fn (ItemList) get_item_count #

fn (s &ItemList) get_item_count() i64

fn (ItemList) remove_item #

fn (s &ItemList) remove_item(idx i64)

Removes the item specified by [param idx] index from the list.

fn (ItemList) clear #

fn (s &ItemList) clear()

Removes all items from the list.

fn (ItemList) sort_items_by_text #

fn (s &ItemList) sort_items_by_text()

Sorts items in the list by their text.

fn (ItemList) set_fixed_column_width #

fn (s &ItemList) set_fixed_column_width(width i64)

fn (ItemList) get_fixed_column_width #

fn (s &ItemList) get_fixed_column_width() i64

fn (ItemList) set_same_column_width #

fn (s &ItemList) set_same_column_width(enable bool)

fn (ItemList) is_same_column_width #

fn (s &ItemList) is_same_column_width() bool

fn (ItemList) set_max_text_lines #

fn (s &ItemList) set_max_text_lines(lines i64)

fn (ItemList) get_max_text_lines #

fn (s &ItemList) get_max_text_lines() i64

fn (ItemList) set_max_columns #

fn (s &ItemList) set_max_columns(amount i64)

fn (ItemList) get_max_columns #

fn (s &ItemList) get_max_columns() i64

fn (ItemList) set_select_mode #

fn (s &ItemList) set_select_mode(mode ItemListSelectMode)

fn (ItemList) get_select_mode #

fn (s &ItemList) get_select_mode() ItemListSelectMode

fn (ItemList) set_icon_mode #

fn (s &ItemList) set_icon_mode(mode ItemListIconMode)

fn (ItemList) get_icon_mode #

fn (s &ItemList) get_icon_mode() ItemListIconMode

fn (ItemList) set_fixed_icon_size #

fn (s &ItemList) set_fixed_icon_size(size Vector2i)

fn (ItemList) get_fixed_icon_size #

fn (s &ItemList) get_fixed_icon_size() Vector2i

fn (ItemList) set_icon_scale #

fn (s &ItemList) set_icon_scale(scale f64)

fn (ItemList) get_icon_scale #

fn (s &ItemList) get_icon_scale() f64

fn (ItemList) set_allow_rmb_select #

fn (s &ItemList) set_allow_rmb_select(allow bool)

fn (ItemList) get_allow_rmb_select #

fn (s &ItemList) get_allow_rmb_select() bool

fn (ItemList) set_allow_reselect #

fn (s &ItemList) set_allow_reselect(allow bool)

fn (ItemList) get_allow_reselect #

fn (s &ItemList) get_allow_reselect() bool

fn (ItemList) set_auto_width #

fn (s &ItemList) set_auto_width(enable bool)

fn (ItemList) has_auto_width #

fn (s &ItemList) has_auto_width() bool

fn (ItemList) set_auto_height #

fn (s &ItemList) set_auto_height(enable bool)

fn (ItemList) has_auto_height #

fn (s &ItemList) has_auto_height() bool

fn (ItemList) is_anything_selected #

fn (s &ItemList) is_anything_selected() bool

Returns true if one or more items are selected.

fn (ItemList) get_item_at_position #

fn (s &ItemList) get_item_at_position(position Vector2, cfg ItemList_get_item_at_position_Cfg) i64

Returns the item index at the given [param position]. When there is no item at that point, -1 will be returned if [param exact] is true, and the closest item index will be returned otherwise. [b]Note:[/b] The returned value is unreliable if called right after modifying the [ItemList], before it redraws in the next frame.

fn (ItemList) ensure_current_is_visible #

fn (s &ItemList) ensure_current_is_visible()

Ensure current selection is visible, adjusting the scroll position as necessary.

fn (ItemList) get_v_scroll_bar #

fn (s &ItemList) get_v_scroll_bar() VScrollBar

Returns the vertical scrollbar. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (ItemList) get_h_scroll_bar #

fn (s &ItemList) get_h_scroll_bar() HScrollBar

Returns the horizontal scrollbar. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (ItemList) set_text_overrun_behavior #

fn (s &ItemList) set_text_overrun_behavior(overrun_behavior TextServerOverrunBehavior)

fn (ItemList) get_text_overrun_behavior #

fn (s &ItemList) get_text_overrun_behavior() TextServerOverrunBehavior

fn (ItemList) set_wraparound_items #

fn (s &ItemList) set_wraparound_items(enable bool)

fn (ItemList) has_wraparound_items #

fn (s &ItemList) has_wraparound_items() bool

fn (ItemList) force_update_list_size #

fn (s &ItemList) force_update_list_size()

Forces an update to the list size based on its items. This happens automatically whenever size of the items, or other relevant settings like [member auto_height], change. The method can be used to trigger the update ahead of next drawing pass.

struct ItemList_add_icon_item_Cfg #

@[params]
struct ItemList_add_icon_item_Cfg {
pub:
	selectable bool
}

Optional parameters for ItemList#add_icon_item

struct ItemList_add_item_Cfg #

@[params]
struct ItemList_add_item_Cfg {
pub:
	icon       Texture2D
	selectable bool
}

Optional parameters for ItemList#add_item

struct ItemList_gd_select_Cfg #

@[params]
struct ItemList_gd_select_Cfg {
pub:
	single bool
}

Optional parameters for ItemList#gd_select

struct ItemList_get_item_at_position_Cfg #

@[params]
struct ItemList_get_item_at_position_Cfg {
pub:
	exact bool
}

Optional parameters for ItemList#get_item_at_position

struct ItemList_get_item_rect_Cfg #

@[params]
struct ItemList_get_item_rect_Cfg {
pub:
	expand bool
}

Optional parameters for ItemList#get_item_rect

struct JNISingleton #

struct JNISingleton {
	Object
}

Singleton that connects the engine with Android plugins to interface with native Android code.

fn (JNISingleton) to_variant #

fn (s &JNISingleton) to_variant() Variant

fn (JNISingleton) from_variant #

fn (mut s JNISingleton) from_variant(variant &Variant)

struct JSON #

struct JSON {
	Resource
}

Helper class for creating and parsing JSON data.

fn (JSON) to_variant #

fn (s &JSON) to_variant() Variant

fn (JSON) from_variant #

fn (mut s JSON) from_variant(variant &Variant)

fn (JSON) parse #

fn (s &JSON) parse(json_text string, cfg JSON_parse_Cfg) GDError

Attempts to parse the [param json_text] provided. Returns an [enum Error]. If the parse was successful, it returns [constant OK] and the result can be retrieved using [member data]. If unsuccessful, use [method get_error_line] and [method get_error_message] to identify the source of the failure. Non-static variant of [method parse_string], if you want custom error handling. The optional [param keep_text] argument instructs the parser to keep a copy of the original text. This text can be obtained later by using the [method get_parsed_text] function and is used when saving the resource (instead of generating new text from [member data]).

fn (JSON) get_data #

fn (s &JSON) get_data() Variant

fn (JSON) set_data #

fn (s &JSON) set_data(data_ ToVariant)

fn (JSON) get_parsed_text #

fn (s &JSON) get_parsed_text() string

Return the text parsed by [method parse] (requires passing keep_text to [method parse]).

fn (JSON) get_error_line #

fn (s &JSON) get_error_line() i64

Returns 0 if the last call to [method parse] was successful, or the line number where the parse failed.

fn (JSON) get_error_message #

fn (s &JSON) get_error_message() string

Returns an empty string if the last call to [method parse] was successful, or the error message if it failed.

struct JSONRPC #

struct JSONRPC {
	Object
}

A helper to handle dictionaries which look like JSONRPC documents.

fn (JSONRPC) to_variant #

fn (s &JSONRPC) to_variant() Variant

fn (JSONRPC) from_variant #

fn (mut s JSONRPC) from_variant(variant &Variant)

fn (JSONRPC) set_method #

fn (s &JSONRPC) set_method(name string, callback Callable)

Registers a callback for the given method name.- [param name] The name that clients can use to access the callback.

  • [param callback] The callback which will handle the specific method.

fn (JSONRPC) process_action #

fn (s &JSONRPC) process_action(action_ ToVariant, cfg JSONRPC_process_action_Cfg) Variant

Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called. To add new supported methods extend the JSONRPC class and call [method process_action] on your subclass. [param action]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification.

fn (JSONRPC) process_string #

fn (s &JSONRPC) process_string(action string) string

fn (JSONRPC) make_request #

fn (s &JSONRPC) make_request(method string, params_ ToVariant, id_ ToVariant) Dictionary

Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to.- [param method]: Name of the method being called.

  • [param params]: An array or dictionary of parameters being passed to the method.
  • [param id]: Uniquely identifies this request. The server is expected to send a response with the same ID.

fn (JSONRPC) make_response #

fn (s &JSONRPC) make_response(gd_result_ ToVariant, id_ ToVariant) Dictionary

When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead.- [param result]: The return value of the function which was called.

  • [param id]: The ID of the request this response is targeted to.

fn (JSONRPC) make_notification #

fn (s &JSONRPC) make_notification(method string, params_ ToVariant) Dictionary

Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response.- [param method]: Name of the method being called.

  • [param params]: An array or dictionary of parameters being passed to the method.

fn (JSONRPC) make_response_error #

fn (s &JSONRPC) make_response_error(code i64, message string, cfg JSONRPC_make_response_error_Cfg) Dictionary

Creates a response which indicates a previous reply has failed in some way.- [param code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants.

  • [param message]: A custom message about this error.
  • [param id]: The request this error is a response to.

struct JSONRPC_make_response_error_Cfg #

@[params]
struct JSONRPC_make_response_error_Cfg {
pub:
	id ToVariant
}

Optional parameters for JSONRPC#make_response_error

struct JSONRPC_process_action_Cfg #

@[params]
struct JSONRPC_process_action_Cfg {
pub:
	recurse bool
}

Optional parameters for JSONRPC#process_action

struct JSON_from_native_Cfg #

@[params]
struct JSON_from_native_Cfg {
pub:
	full_objects bool
}

Optional parameters for JSON#from_native

struct JSON_parse_Cfg #

@[params]
struct JSON_parse_Cfg {
pub:
	keep_text bool
}

Optional parameters for JSON#parse

struct JSON_stringify_Cfg #

@[params]
struct JSON_stringify_Cfg {
pub:
	indent         string
	sort_keys      bool
	full_precision bool
}

Optional parameters for JSON#stringify

struct JSON_to_native_Cfg #

@[params]
struct JSON_to_native_Cfg {
pub:
	allow_objects bool
}

Optional parameters for JSON#to_native

struct JavaClass #

struct JavaClass {
	RefCounted
}

Represents a class from the Java Native Interface.

fn (JavaClass) to_variant #

fn (s &JavaClass) to_variant() Variant

fn (JavaClass) from_variant #

fn (mut s JavaClass) from_variant(variant &Variant)

fn (JavaClass) get_java_class_name #

fn (s &JavaClass) get_java_class_name() string

Returns the Java class name.

fn (JavaClass) get_java_method_list #

fn (s &JavaClass) get_java_method_list() Array

Returns the object's Java methods and their signatures as an [Array] of dictionaries, in the same format as [method Object.get_method_list].

fn (JavaClass) get_java_parent_class #

fn (s &JavaClass) get_java_parent_class() JavaClass

Returns a [JavaClass] representing the Java parent class of this class.

struct JavaClassWrapper #

struct JavaClassWrapper {
	Object
}

Provides access to the Java Native Interface.

fn (JavaClassWrapper) to_variant #

fn (s &JavaClassWrapper) to_variant() Variant

fn (JavaClassWrapper) from_variant #

fn (mut s JavaClassWrapper) from_variant(variant &Variant)

fn (JavaClassWrapper) wrap #

fn (s &JavaClassWrapper) wrap(name string) JavaClass

Wraps a class defined in Java, and returns it as a [JavaClass] [Object] type that Godot can interact with. When wrapping inner (nested) classes, use $ instead of . to separate them. For example, JavaClassWrapper.wrap("android.view.WindowManager$LayoutParams") wraps the [b]WindowManager.LayoutParams[/b] class. [b]Note:[/b] This method only works on Android. On every other platform, this method does nothing and returns an empty [JavaClass].

fn (JavaClassWrapper) get_exception #

fn (s &JavaClassWrapper) get_exception() JavaObject

Returns the Java exception from the last call into a Java class. If there was no exception, it will return null. [b]Note:[/b] This method only works on Android. On every other platform, this method will always return null.

struct JavaObject #

struct JavaObject {
	RefCounted
}

Represents an object from the Java Native Interface.

fn (JavaObject) to_variant #

fn (s &JavaObject) to_variant() Variant

fn (JavaObject) from_variant #

fn (mut s JavaObject) from_variant(variant &Variant)

fn (JavaObject) get_java_class #

fn (s &JavaObject) get_java_class() JavaClass

Returns the [JavaClass] that this object is an instance of.

struct JavaScriptBridge #

struct JavaScriptBridge {
	Object
}

Singleton that connects the engine with the browser's JavaScript context in Web export.

fn (JavaScriptBridge) to_variant #

fn (s &JavaScriptBridge) to_variant() Variant

fn (JavaScriptBridge) from_variant #

fn (mut s JavaScriptBridge) from_variant(variant &Variant)

fn (JavaScriptBridge) eval #

fn (s &JavaScriptBridge) eval(code string, cfg JavaScriptBridge_eval_Cfg) Variant

Execute the string [param code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code skip-lint]eval(). If [param use_global_execution_context] is true`, the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment.

fn (JavaScriptBridge) get_interface #

fn (s &JavaScriptBridge) get_interface(gd_interface string) JavaScriptObject

Returns an interface to a JavaScript object that can be used by scripts. The [param interface] must be a valid property of the JavaScript window. The callback must accept a single [Array] argument, which will contain the JavaScript arguments. See [JavaScriptObject] for usage.

fn (JavaScriptBridge) create_callback #

fn (s &JavaScriptBridge) create_callback(callable Callable) JavaScriptObject

Creates a reference to a [Callable] that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See [JavaScriptObject] for usage. [b]Note:[/b] The callback function must take exactly one [Array] argument, which is going to be the JavaScript [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments]arguments object[/url] converted to an array.

fn (JavaScriptBridge) is_js_buffer #

fn (s &JavaScriptBridge) is_js_buffer(javascript_object JavaScriptObject) bool

Returns true if the given [param javascript_object] is of type [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer]ArrayBuffer[/url], [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView]DataView[/url], or one of the many [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray]typed array objects[/url].

fn (JavaScriptBridge) js_buffer_to_packed_byte_array #

fn (s &JavaScriptBridge) js_buffer_to_packed_byte_array(javascript_buffer JavaScriptObject) PackedByteArray

Returns a copy of [param javascript_buffer]'s contents as a [PackedByteArray]. See also [method is_js_buffer].

fn (JavaScriptBridge) create_object #

fn (s &JavaScriptBridge) create_object(object string, varargs ...ToVariant) Variant

Creates a new JavaScript object using the new constructor. The [param object] must a valid property of the JavaScript window. See [JavaScriptObject] for usage.

fn (JavaScriptBridge) download_buffer #

fn (s &JavaScriptBridge) download_buffer(buffer PackedByteArray, name string, cfg JavaScriptBridge_download_buffer_Cfg)

Prompts the user to download a file containing the specified [param buffer]. The file will have the given [param name] and [param mime] type. [b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [param name]'s extension. [b]Note:[/b] Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click). [b]Note:[/b] Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession.

fn (JavaScriptBridge) pwa_needs_update #

fn (s &JavaScriptBridge) pwa_needs_update() bool

Returns true if a new version of the progressive web app is waiting to be activated. [b]Note:[/b] Only relevant when exported as a Progressive Web App.

fn (JavaScriptBridge) pwa_update #

fn (s &JavaScriptBridge) pwa_update() GDError

Performs the live update of the progressive web app. Forcing the new version to be installed and the page to be reloaded. [b]Note:[/b] Your application will be [b]reloaded in all browser tabs[/b]. [b]Note:[/b] Only relevant when exported as a Progressive Web App and [method pwa_needs_update] returns true.

fn (JavaScriptBridge) force_fs_sync #

fn (s &JavaScriptBridge) force_fs_sync()

Force synchronization of the persistent file system (when enabled). [b]Note:[/b] This is only useful for modules or extensions that can't use [FileAccess] to write files.

struct JavaScriptBridge_download_buffer_Cfg #

@[params]
struct JavaScriptBridge_download_buffer_Cfg {
pub:
	mime string
}

Optional parameters for JavaScriptBridge#download_buffer

struct JavaScriptBridge_eval_Cfg #

@[params]
struct JavaScriptBridge_eval_Cfg {
pub:
	use_global_execution_context bool
}

Optional parameters for JavaScriptBridge#eval

struct JavaScriptObject #

struct JavaScriptObject {
	RefCounted
}

A wrapper class for web native JavaScript objects.

fn (JavaScriptObject) to_variant #

fn (s &JavaScriptObject) to_variant() Variant

fn (JavaScriptObject) from_variant #

fn (mut s JavaScriptObject) from_variant(variant &Variant)

struct Joint2D #

struct Joint2D {
	Node2D
}

Abstract base class for all 2D physics joints.

fn (Joint2D) to_variant #

fn (s &Joint2D) to_variant() Variant

fn (Joint2D) from_variant #

fn (mut s Joint2D) from_variant(variant &Variant)

fn (Joint2D) set_node_a #

fn (s &Joint2D) set_node_a(node NodePath)

fn (Joint2D) get_node_a #

fn (s &Joint2D) get_node_a() NodePath

fn (Joint2D) set_node_b #

fn (s &Joint2D) set_node_b(node NodePath)

fn (Joint2D) get_node_b #

fn (s &Joint2D) get_node_b() NodePath

fn (Joint2D) set_bias #

fn (s &Joint2D) set_bias(bias f64)

fn (Joint2D) get_bias #

fn (s &Joint2D) get_bias() f64

fn (Joint2D) set_exclude_nodes_from_collision #

fn (s &Joint2D) set_exclude_nodes_from_collision(enable bool)

fn (Joint2D) get_exclude_nodes_from_collision #

fn (s &Joint2D) get_exclude_nodes_from_collision() bool

fn (Joint2D) get_rid #

fn (s &Joint2D) get_rid() RID

Returns the joint's internal [RID] from the [PhysicsServer2D].

struct Joint3D #

struct Joint3D {
	Node3D
}

Abstract base class for all 3D physics joints.

fn (Joint3D) to_variant #

fn (s &Joint3D) to_variant() Variant

fn (Joint3D) from_variant #

fn (mut s Joint3D) from_variant(variant &Variant)

fn (Joint3D) set_node_a #

fn (s &Joint3D) set_node_a(node NodePath)

fn (Joint3D) get_node_a #

fn (s &Joint3D) get_node_a() NodePath

fn (Joint3D) set_node_b #

fn (s &Joint3D) set_node_b(node NodePath)

fn (Joint3D) get_node_b #

fn (s &Joint3D) get_node_b() NodePath

fn (Joint3D) set_solver_priority #

fn (s &Joint3D) set_solver_priority(priority i64)

fn (Joint3D) get_solver_priority #

fn (s &Joint3D) get_solver_priority() i64

fn (Joint3D) set_exclude_nodes_from_collision #

fn (s &Joint3D) set_exclude_nodes_from_collision(enable bool)

fn (Joint3D) get_exclude_nodes_from_collision #

fn (s &Joint3D) get_exclude_nodes_from_collision() bool

fn (Joint3D) get_rid #

fn (s &Joint3D) get_rid() RID

Returns the joint's internal [RID] from the [PhysicsServer3D].

struct KinematicCollision2D #

struct KinematicCollision2D {
	RefCounted
}

Holds collision data from the movement of a [PhysicsBody2D].

fn (KinematicCollision2D) to_variant #

fn (s &KinematicCollision2D) to_variant() Variant

fn (KinematicCollision2D) from_variant #

fn (mut s KinematicCollision2D) from_variant(variant &Variant)

fn (KinematicCollision2D) get_position #

fn (s &KinematicCollision2D) get_position() Vector2

Returns the point of collision in global coordinates.

fn (KinematicCollision2D) get_normal #

fn (s &KinematicCollision2D) get_normal() Vector2

Returns the colliding body's shape's normal at the point of collision.

fn (KinematicCollision2D) get_travel #

fn (s &KinematicCollision2D) get_travel() Vector2

Returns the moving object's travel before collision.

fn (KinematicCollision2D) get_remainder #

fn (s &KinematicCollision2D) get_remainder() Vector2

Returns the moving object's remaining movement vector.

fn (KinematicCollision2D) get_angle #

fn (s &KinematicCollision2D) get_angle(cfg KinematicCollision2D_get_angle_Cfg) f64

Returns the collision angle according to [param up_direction], which is [constant Vector2.UP] by default. This value is always positive.

fn (KinematicCollision2D) get_depth #

fn (s &KinematicCollision2D) get_depth() f64

Returns the colliding body's length of overlap along the collision normal.

fn (KinematicCollision2D) get_local_shape #

fn (s &KinematicCollision2D) get_local_shape() Object

Returns the moving object's colliding shape.

fn (KinematicCollision2D) get_collider #

fn (s &KinematicCollision2D) get_collider() Object

Returns the colliding body's attached [Object].

fn (KinematicCollision2D) get_collider_id #

fn (s &KinematicCollision2D) get_collider_id() i64

Returns the unique instance ID of the colliding body's attached [Object]. See [method Object.get_instance_id].

fn (KinematicCollision2D) get_collider_rid #

fn (s &KinematicCollision2D) get_collider_rid() RID

Returns the colliding body's [RID] used by the [PhysicsServer2D].

fn (KinematicCollision2D) get_collider_shape #

fn (s &KinematicCollision2D) get_collider_shape() Object

Returns the colliding body's shape.

fn (KinematicCollision2D) get_collider_shape_index #

fn (s &KinematicCollision2D) get_collider_shape_index() i64

Returns the colliding body's shape index. See [CollisionObject2D].

fn (KinematicCollision2D) get_collider_velocity #

fn (s &KinematicCollision2D) get_collider_velocity() Vector2

Returns the colliding body's velocity.

struct KinematicCollision2D_get_angle_Cfg #

@[params]
struct KinematicCollision2D_get_angle_Cfg {
pub:
	up_direction Vector2 = Vector2{0, -1}
}

Optional parameters for KinematicCollision2D#get_angle

struct KinematicCollision3D #

struct KinematicCollision3D {
	RefCounted
}

Holds collision data from the movement of a [PhysicsBody3D].

fn (KinematicCollision3D) to_variant #

fn (s &KinematicCollision3D) to_variant() Variant

fn (KinematicCollision3D) from_variant #

fn (mut s KinematicCollision3D) from_variant(variant &Variant)

fn (KinematicCollision3D) get_travel #

fn (s &KinematicCollision3D) get_travel() Vector3

Returns the moving object's travel before collision.

fn (KinematicCollision3D) get_remainder #

fn (s &KinematicCollision3D) get_remainder() Vector3

Returns the moving object's remaining movement vector.

fn (KinematicCollision3D) get_depth #

fn (s &KinematicCollision3D) get_depth() f64

Returns the colliding body's length of overlap along the collision normal.

fn (KinematicCollision3D) get_collision_count #

fn (s &KinematicCollision3D) get_collision_count() i64

Returns the number of detected collisions.

fn (KinematicCollision3D) get_position #

fn (s &KinematicCollision3D) get_position(cfg KinematicCollision3D_get_position_Cfg) Vector3

Returns the point of collision in global coordinates given a collision index (the deepest collision by default).

fn (KinematicCollision3D) get_normal #

fn (s &KinematicCollision3D) get_normal(cfg KinematicCollision3D_get_normal_Cfg) Vector3

Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default).

fn (KinematicCollision3D) get_angle #

fn (s &KinematicCollision3D) get_angle(cfg KinematicCollision3D_get_angle_Cfg) f64

Returns the collision angle according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive.

fn (KinematicCollision3D) get_local_shape #

fn (s &KinematicCollision3D) get_local_shape(cfg KinematicCollision3D_get_local_shape_Cfg) Object

Returns the moving object's colliding shape given a collision index (the deepest collision by default).

fn (KinematicCollision3D) get_collider #

fn (s &KinematicCollision3D) get_collider(cfg KinematicCollision3D_get_collider_Cfg) Object

Returns the colliding body's attached [Object] given a collision index (the deepest collision by default).

fn (KinematicCollision3D) get_collider_id #

fn (s &KinematicCollision3D) get_collider_id(cfg KinematicCollision3D_get_collider_id_Cfg) i64

Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default). See [method Object.get_instance_id].

fn (KinematicCollision3D) get_collider_rid #

fn (s &KinematicCollision3D) get_collider_rid(cfg KinematicCollision3D_get_collider_rid_Cfg) RID

Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default).

fn (KinematicCollision3D) get_collider_shape #

fn (s &KinematicCollision3D) get_collider_shape(cfg KinematicCollision3D_get_collider_shape_Cfg) Object

Returns the colliding body's shape given a collision index (the deepest collision by default).

fn (KinematicCollision3D) get_collider_shape_index #

fn (s &KinematicCollision3D) get_collider_shape_index(cfg KinematicCollision3D_get_collider_shape_index_Cfg) i64

Returns the colliding body's shape index given a collision index (the deepest collision by default). See [CollisionObject3D].

fn (KinematicCollision3D) get_collider_velocity #

fn (s &KinematicCollision3D) get_collider_velocity(cfg KinematicCollision3D_get_collider_velocity_Cfg) Vector3

Returns the colliding body's velocity given a collision index (the deepest collision by default).

struct KinematicCollision3D_get_angle_Cfg #

@[params]
struct KinematicCollision3D_get_angle_Cfg {
pub:
	collision_index i64
	up_direction    Vector3 = Vector3{0, 1, 0}
}

Optional parameters for KinematicCollision3D#get_angle

struct KinematicCollision3D_get_collider_Cfg #

@[params]
struct KinematicCollision3D_get_collider_Cfg {
pub:
	collision_index i64
}

Optional parameters for KinematicCollision3D#get_collider

struct KinematicCollision3D_get_collider_id_Cfg #

@[params]
struct KinematicCollision3D_get_collider_id_Cfg {
pub:
	collision_index i64
}

Optional parameters for KinematicCollision3D#get_collider_id

struct KinematicCollision3D_get_collider_rid_Cfg #

@[params]
struct KinematicCollision3D_get_collider_rid_Cfg {
pub:
	collision_index i64
}

Optional parameters for KinematicCollision3D#get_collider_rid

struct KinematicCollision3D_get_collider_shape_Cfg #

@[params]
struct KinematicCollision3D_get_collider_shape_Cfg {
pub:
	collision_index i64
}

Optional parameters for KinematicCollision3D#get_collider_shape

struct KinematicCollision3D_get_collider_shape_index_Cfg #

@[params]
struct KinematicCollision3D_get_collider_shape_index_Cfg {
pub:
	collision_index i64
}

Optional parameters for KinematicCollision3D#get_collider_shape_index

struct KinematicCollision3D_get_collider_velocity_Cfg #

@[params]
struct KinematicCollision3D_get_collider_velocity_Cfg {
pub:
	collision_index i64
}

Optional parameters for KinematicCollision3D#get_collider_velocity

struct KinematicCollision3D_get_local_shape_Cfg #

@[params]
struct KinematicCollision3D_get_local_shape_Cfg {
pub:
	collision_index i64
}

Optional parameters for KinematicCollision3D#get_local_shape

struct KinematicCollision3D_get_normal_Cfg #

@[params]
struct KinematicCollision3D_get_normal_Cfg {
pub:
	collision_index i64
}

Optional parameters for KinematicCollision3D#get_normal

struct KinematicCollision3D_get_position_Cfg #

@[params]
struct KinematicCollision3D_get_position_Cfg {
pub:
	collision_index i64
}

Optional parameters for KinematicCollision3D#get_position

struct Label #

struct Label {
	Control
}

A control for displaying plain text.

fn (Label) to_variant #

fn (s &Label) to_variant() Variant

fn (Label) from_variant #

fn (mut s Label) from_variant(variant &Variant)

fn (Label) set_horizontal_alignment #

fn (s &Label) set_horizontal_alignment(alignment HorizontalAlignment)

fn (Label) get_horizontal_alignment #

fn (s &Label) get_horizontal_alignment() HorizontalAlignment

fn (Label) set_vertical_alignment #

fn (s &Label) set_vertical_alignment(alignment VerticalAlignment)

fn (Label) get_vertical_alignment #

fn (s &Label) get_vertical_alignment() VerticalAlignment

fn (Label) set_text #

fn (s &Label) set_text(text string)

fn (Label) get_text #

fn (s &Label) get_text() string

fn (Label) set_label_settings #

fn (s &Label) set_label_settings(settings LabelSettings)

fn (Label) get_label_settings #

fn (s &Label) get_label_settings() LabelSettings

fn (Label) set_text_direction #

fn (s &Label) set_text_direction(direction ControlTextDirection)

fn (Label) get_text_direction #

fn (s &Label) get_text_direction() ControlTextDirection

fn (Label) set_language #

fn (s &Label) set_language(language string)

fn (Label) get_language #

fn (s &Label) get_language() string

fn (Label) set_paragraph_separator #

fn (s &Label) set_paragraph_separator(paragraph_separator string)

fn (Label) get_paragraph_separator #

fn (s &Label) get_paragraph_separator() string

fn (Label) set_autowrap_mode #

fn (s &Label) set_autowrap_mode(autowrap_mode TextServerAutowrapMode)

fn (Label) get_autowrap_mode #

fn (s &Label) get_autowrap_mode() TextServerAutowrapMode

fn (Label) set_autowrap_trim_flags #

fn (s &Label) set_autowrap_trim_flags(autowrap_trim_flags TextServerLineBreakFlag)

fn (Label) get_autowrap_trim_flags #

fn (s &Label) get_autowrap_trim_flags() TextServerLineBreakFlag

fn (Label) set_justification_flags #

fn (s &Label) set_justification_flags(justification_flags TextServerJustificationFlag)

fn (Label) get_justification_flags #

fn (s &Label) get_justification_flags() TextServerJustificationFlag

fn (Label) set_clip_text #

fn (s &Label) set_clip_text(enable bool)

fn (Label) is_clipping_text #

fn (s &Label) is_clipping_text() bool

fn (Label) set_tab_stops #

fn (s &Label) set_tab_stops(tab_stops PackedFloat32Array)

fn (Label) get_tab_stops #

fn (s &Label) get_tab_stops() PackedFloat32Array

fn (Label) set_text_overrun_behavior #

fn (s &Label) set_text_overrun_behavior(overrun_behavior TextServerOverrunBehavior)

fn (Label) get_text_overrun_behavior #

fn (s &Label) get_text_overrun_behavior() TextServerOverrunBehavior

fn (Label) set_ellipsis_char #

fn (s &Label) set_ellipsis_char(gd_char string)

fn (Label) get_ellipsis_char #

fn (s &Label) get_ellipsis_char() string

fn (Label) set_uppercase #

fn (s &Label) set_uppercase(enable bool)

fn (Label) is_uppercase #

fn (s &Label) is_uppercase() bool

fn (Label) get_line_height #

fn (s &Label) get_line_height(cfg Label_get_line_height_Cfg) i64

Returns the height of the line [param line]. If [param line] is set to -1, returns the biggest line height. If there are no lines, returns font size in pixels.

fn (Label) get_line_count #

fn (s &Label) get_line_count() i64

Returns the number of lines of text the Label has.

fn (Label) get_visible_line_count #

fn (s &Label) get_visible_line_count() i64

Returns the number of lines shown. Useful if the [Label]'s height cannot currently display all lines.

fn (Label) get_total_character_count #

fn (s &Label) get_total_character_count() i64

Returns the total number of printable characters in the text (excluding spaces and newlines).

fn (Label) set_visible_characters #

fn (s &Label) set_visible_characters(amount i64)

fn (Label) get_visible_characters #

fn (s &Label) get_visible_characters() i64

fn (Label) get_visible_characters_behavior #

fn (s &Label) get_visible_characters_behavior() TextServerVisibleCharactersBehavior

fn (Label) set_visible_characters_behavior #

fn (s &Label) set_visible_characters_behavior(behavior TextServerVisibleCharactersBehavior)

fn (Label) set_visible_ratio #

fn (s &Label) set_visible_ratio(ratio f64)

fn (Label) get_visible_ratio #

fn (s &Label) get_visible_ratio() f64

fn (Label) set_lines_skipped #

fn (s &Label) set_lines_skipped(lines_skipped i64)

fn (Label) get_lines_skipped #

fn (s &Label) get_lines_skipped() i64

fn (Label) set_max_lines_visible #

fn (s &Label) set_max_lines_visible(lines_visible i64)

fn (Label) get_max_lines_visible #

fn (s &Label) get_max_lines_visible() i64

fn (Label) set_structured_text_bidi_override #

fn (s &Label) set_structured_text_bidi_override(parser TextServerStructuredTextParser)

fn (Label) get_structured_text_bidi_override #

fn (s &Label) get_structured_text_bidi_override() TextServerStructuredTextParser

fn (Label) set_structured_text_bidi_override_options #

fn (s &Label) set_structured_text_bidi_override_options(gd_args Array)

fn (Label) get_structured_text_bidi_override_options #

fn (s &Label) get_structured_text_bidi_override_options() Array

fn (Label) get_character_bounds #

fn (s &Label) get_character_bounds(pos i64) Rect2

Returns the bounding rectangle of the character at position [param pos] in the label's local coordinate system. If the character is a non-visual character or [param pos] is outside the valid range, an empty [Rect2] is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned.

struct Label3D #

struct Label3D {
	GeometryInstance3D
}

A node for displaying plain text in 3D space.

fn (Label3D) to_variant #

fn (s &Label3D) to_variant() Variant

fn (Label3D) from_variant #

fn (mut s Label3D) from_variant(variant &Variant)

fn (Label3D) set_horizontal_alignment #

fn (s &Label3D) set_horizontal_alignment(alignment HorizontalAlignment)

fn (Label3D) get_horizontal_alignment #

fn (s &Label3D) get_horizontal_alignment() HorizontalAlignment

fn (Label3D) set_vertical_alignment #

fn (s &Label3D) set_vertical_alignment(alignment VerticalAlignment)

fn (Label3D) get_vertical_alignment #

fn (s &Label3D) get_vertical_alignment() VerticalAlignment

fn (Label3D) set_modulate #

fn (s &Label3D) set_modulate(modulate Color)

fn (Label3D) get_modulate #

fn (s &Label3D) get_modulate() Color

fn (Label3D) set_outline_modulate #

fn (s &Label3D) set_outline_modulate(modulate Color)

fn (Label3D) get_outline_modulate #

fn (s &Label3D) get_outline_modulate() Color

fn (Label3D) set_text #

fn (s &Label3D) set_text(text string)

fn (Label3D) get_text #

fn (s &Label3D) get_text() string

fn (Label3D) set_text_direction #

fn (s &Label3D) set_text_direction(direction TextServerDirection)

fn (Label3D) get_text_direction #

fn (s &Label3D) get_text_direction() TextServerDirection

fn (Label3D) set_language #

fn (s &Label3D) set_language(language string)

fn (Label3D) get_language #

fn (s &Label3D) get_language() string

fn (Label3D) set_structured_text_bidi_override #

fn (s &Label3D) set_structured_text_bidi_override(parser TextServerStructuredTextParser)

fn (Label3D) get_structured_text_bidi_override #

fn (s &Label3D) get_structured_text_bidi_override() TextServerStructuredTextParser

fn (Label3D) set_structured_text_bidi_override_options #

fn (s &Label3D) set_structured_text_bidi_override_options(gd_args Array)

fn (Label3D) get_structured_text_bidi_override_options #

fn (s &Label3D) get_structured_text_bidi_override_options() Array

fn (Label3D) set_uppercase #

fn (s &Label3D) set_uppercase(enable bool)

fn (Label3D) is_uppercase #

fn (s &Label3D) is_uppercase() bool

fn (Label3D) set_render_priority #

fn (s &Label3D) set_render_priority(priority i64)

fn (Label3D) get_render_priority #

fn (s &Label3D) get_render_priority() i64

fn (Label3D) set_outline_render_priority #

fn (s &Label3D) set_outline_render_priority(priority i64)

fn (Label3D) get_outline_render_priority #

fn (s &Label3D) get_outline_render_priority() i64

fn (Label3D) set_font #

fn (s &Label3D) set_font(font Font)

fn (Label3D) get_font #

fn (s &Label3D) get_font() Font

fn (Label3D) set_font_size #

fn (s &Label3D) set_font_size(size i64)

fn (Label3D) get_font_size #

fn (s &Label3D) get_font_size() i64

fn (Label3D) set_outline_size #

fn (s &Label3D) set_outline_size(outline_size i64)

fn (Label3D) get_outline_size #

fn (s &Label3D) get_outline_size() i64

fn (Label3D) set_line_spacing #

fn (s &Label3D) set_line_spacing(line_spacing f64)

fn (Label3D) get_line_spacing #

fn (s &Label3D) get_line_spacing() f64

fn (Label3D) set_autowrap_mode #

fn (s &Label3D) set_autowrap_mode(autowrap_mode TextServerAutowrapMode)

fn (Label3D) get_autowrap_mode #

fn (s &Label3D) get_autowrap_mode() TextServerAutowrapMode

fn (Label3D) set_autowrap_trim_flags #

fn (s &Label3D) set_autowrap_trim_flags(autowrap_trim_flags TextServerLineBreakFlag)

fn (Label3D) get_autowrap_trim_flags #

fn (s &Label3D) get_autowrap_trim_flags() TextServerLineBreakFlag

fn (Label3D) set_justification_flags #

fn (s &Label3D) set_justification_flags(justification_flags TextServerJustificationFlag)

fn (Label3D) get_justification_flags #

fn (s &Label3D) get_justification_flags() TextServerJustificationFlag

fn (Label3D) set_width #

fn (s &Label3D) set_width(width f64)

fn (Label3D) get_width #

fn (s &Label3D) get_width() f64

fn (Label3D) set_pixel_size #

fn (s &Label3D) set_pixel_size(pixel_size f64)

fn (Label3D) get_pixel_size #

fn (s &Label3D) get_pixel_size() f64

fn (Label3D) set_offset #

fn (s &Label3D) set_offset(offset Vector2)

fn (Label3D) get_offset #

fn (s &Label3D) get_offset() Vector2

fn (Label3D) set_draw_flag #

fn (s &Label3D) set_draw_flag(flag Label3DDrawFlags, enabled bool)

If true, the specified [param flag] will be enabled.

fn (Label3D) get_draw_flag #

fn (s &Label3D) get_draw_flag(flag Label3DDrawFlags) bool

Returns the value of the specified flag.

fn (Label3D) set_billboard_mode #

fn (s &Label3D) set_billboard_mode(mode BaseMaterial3DBillboardMode)

fn (Label3D) get_billboard_mode #

fn (s &Label3D) get_billboard_mode() BaseMaterial3DBillboardMode

fn (Label3D) set_alpha_cut_mode #

fn (s &Label3D) set_alpha_cut_mode(mode Label3DAlphaCutMode)

fn (Label3D) get_alpha_cut_mode #

fn (s &Label3D) get_alpha_cut_mode() Label3DAlphaCutMode

fn (Label3D) set_alpha_scissor_threshold #

fn (s &Label3D) set_alpha_scissor_threshold(threshold f64)

fn (Label3D) get_alpha_scissor_threshold #

fn (s &Label3D) get_alpha_scissor_threshold() f64

fn (Label3D) set_alpha_hash_scale #

fn (s &Label3D) set_alpha_hash_scale(threshold f64)

fn (Label3D) get_alpha_hash_scale #

fn (s &Label3D) get_alpha_hash_scale() f64

fn (Label3D) set_alpha_antialiasing #

fn (s &Label3D) set_alpha_antialiasing(alpha_aa BaseMaterial3DAlphaAntiAliasing)

fn (Label3D) get_alpha_antialiasing #

fn (s &Label3D) get_alpha_antialiasing() BaseMaterial3DAlphaAntiAliasing

fn (Label3D) set_alpha_antialiasing_edge #

fn (s &Label3D) set_alpha_antialiasing_edge(edge f64)

fn (Label3D) get_alpha_antialiasing_edge #

fn (s &Label3D) get_alpha_antialiasing_edge() f64

fn (Label3D) set_texture_filter #

fn (s &Label3D) set_texture_filter(mode BaseMaterial3DTextureFilter)

fn (Label3D) get_texture_filter #

fn (s &Label3D) get_texture_filter() BaseMaterial3DTextureFilter

fn (Label3D) generate_triangle_mesh #

fn (s &Label3D) generate_triangle_mesh() TriangleMesh

Returns a [TriangleMesh] with the label's vertices following its current configuration (such as its [member pixel_size]).

struct LabelSettings #

struct LabelSettings {
	Resource
}

Provides common settings to customize the text in a [Label].

fn (LabelSettings) to_variant #

fn (s &LabelSettings) to_variant() Variant

fn (LabelSettings) from_variant #

fn (mut s LabelSettings) from_variant(variant &Variant)

fn (LabelSettings) set_line_spacing #

fn (s &LabelSettings) set_line_spacing(spacing f64)

fn (LabelSettings) get_line_spacing #

fn (s &LabelSettings) get_line_spacing() f64

fn (LabelSettings) set_paragraph_spacing #

fn (s &LabelSettings) set_paragraph_spacing(spacing f64)

fn (LabelSettings) get_paragraph_spacing #

fn (s &LabelSettings) get_paragraph_spacing() f64

fn (LabelSettings) set_font #

fn (s &LabelSettings) set_font(font Font)

fn (LabelSettings) get_font #

fn (s &LabelSettings) get_font() Font

fn (LabelSettings) set_font_size #

fn (s &LabelSettings) set_font_size(size i64)

fn (LabelSettings) get_font_size #

fn (s &LabelSettings) get_font_size() i64

fn (LabelSettings) set_font_color #

fn (s &LabelSettings) set_font_color(color Color)

fn (LabelSettings) get_font_color #

fn (s &LabelSettings) get_font_color() Color

fn (LabelSettings) set_outline_size #

fn (s &LabelSettings) set_outline_size(size i64)

fn (LabelSettings) get_outline_size #

fn (s &LabelSettings) get_outline_size() i64

fn (LabelSettings) set_outline_color #

fn (s &LabelSettings) set_outline_color(color Color)

fn (LabelSettings) get_outline_color #

fn (s &LabelSettings) get_outline_color() Color

fn (LabelSettings) set_shadow_size #

fn (s &LabelSettings) set_shadow_size(size i64)

fn (LabelSettings) get_shadow_size #

fn (s &LabelSettings) get_shadow_size() i64

fn (LabelSettings) set_shadow_color #

fn (s &LabelSettings) set_shadow_color(color Color)

fn (LabelSettings) get_shadow_color #

fn (s &LabelSettings) get_shadow_color() Color

fn (LabelSettings) set_shadow_offset #

fn (s &LabelSettings) set_shadow_offset(offset Vector2)

fn (LabelSettings) get_shadow_offset #

fn (s &LabelSettings) get_shadow_offset() Vector2

fn (LabelSettings) get_stacked_outline_count #

fn (s &LabelSettings) get_stacked_outline_count() i64

fn (LabelSettings) set_stacked_outline_count #

fn (s &LabelSettings) set_stacked_outline_count(count i64)

fn (LabelSettings) add_stacked_outline #

fn (s &LabelSettings) add_stacked_outline(cfg LabelSettings_add_stacked_outline_Cfg)

Adds a new stacked outline to the label at the given [param index]. If [param index] is -1, the new stacked outline will be added at the end of the list.

fn (LabelSettings) move_stacked_outline #

fn (s &LabelSettings) move_stacked_outline(from_index i64, to_position i64)

Moves the stacked outline at index [param from_index] to the given position [param to_position] in the array.

fn (LabelSettings) remove_stacked_outline #

fn (s &LabelSettings) remove_stacked_outline(index i64)

Removes the stacked outline at index [param index].

fn (LabelSettings) set_stacked_outline_size #

fn (s &LabelSettings) set_stacked_outline_size(index i64, size i64)

Sets the size of the stacked outline identified by the given [param index] to [param size].

fn (LabelSettings) get_stacked_outline_size #

fn (s &LabelSettings) get_stacked_outline_size(index i64) i64

Returns the size of the stacked outline at [param index].

fn (LabelSettings) set_stacked_outline_color #

fn (s &LabelSettings) set_stacked_outline_color(index i64, color Color)

Sets the color of the stacked outline identified by the given [param index] to [param color].

fn (LabelSettings) get_stacked_outline_color #

fn (s &LabelSettings) get_stacked_outline_color(index i64) Color

Returns the color of the stacked outline at [param index].

fn (LabelSettings) get_stacked_shadow_count #

fn (s &LabelSettings) get_stacked_shadow_count() i64

fn (LabelSettings) set_stacked_shadow_count #

fn (s &LabelSettings) set_stacked_shadow_count(count i64)

fn (LabelSettings) add_stacked_shadow #

fn (s &LabelSettings) add_stacked_shadow(cfg LabelSettings_add_stacked_shadow_Cfg)

Adds a new stacked shadow to the label at the given [param index]. If [param index] is -1, the new stacked shadow will be added at the end of the list.

fn (LabelSettings) move_stacked_shadow #

fn (s &LabelSettings) move_stacked_shadow(from_index i64, to_position i64)

Moves the stacked shadow at index [param from_index] to the given position [param to_position] in the array.

fn (LabelSettings) remove_stacked_shadow #

fn (s &LabelSettings) remove_stacked_shadow(index i64)

Removes the stacked shadow at index [param index].

fn (LabelSettings) set_stacked_shadow_offset #

fn (s &LabelSettings) set_stacked_shadow_offset(index i64, offset Vector2)

Sets the offset of the stacked shadow identified by the given [param index] to [param offset].

fn (LabelSettings) get_stacked_shadow_offset #

fn (s &LabelSettings) get_stacked_shadow_offset(index i64) Vector2

Returns the offset of the stacked shadow at [param index].

fn (LabelSettings) set_stacked_shadow_color #

fn (s &LabelSettings) set_stacked_shadow_color(index i64, color Color)

Sets the color of the stacked shadow identified by the given [param index] to [param color].

fn (LabelSettings) get_stacked_shadow_color #

fn (s &LabelSettings) get_stacked_shadow_color(index i64) Color

Returns the color of the stacked shadow at [param index].

fn (LabelSettings) set_stacked_shadow_outline_size #

fn (s &LabelSettings) set_stacked_shadow_outline_size(index i64, size i64)

Sets the outline size of the stacked shadow identified by the given [param index] to [param size].

fn (LabelSettings) get_stacked_shadow_outline_size #

fn (s &LabelSettings) get_stacked_shadow_outline_size(index i64) i64

Returns the outline size of the stacked shadow at [param index].

struct LabelSettings_add_stacked_outline_Cfg #

@[params]
struct LabelSettings_add_stacked_outline_Cfg {
pub:
	index i64 = -1
}

Optional parameters for LabelSettings#add_stacked_outline

struct LabelSettings_add_stacked_shadow_Cfg #

@[params]
struct LabelSettings_add_stacked_shadow_Cfg {
pub:
	index i64 = -1
}

Optional parameters for LabelSettings#add_stacked_shadow

struct Label_get_line_height_Cfg #

@[params]
struct Label_get_line_height_Cfg {
pub:
	line i64 = -1
}

Optional parameters for Label#get_line_height

struct Light2D #

struct Light2D {
	Node2D
}

Casts light in a 2D environment.

fn (Light2D) to_variant #

fn (s &Light2D) to_variant() Variant

fn (Light2D) from_variant #

fn (mut s Light2D) from_variant(variant &Variant)

fn (Light2D) set_enabled #

fn (s &Light2D) set_enabled(enabled bool)

fn (Light2D) is_enabled #

fn (s &Light2D) is_enabled() bool

fn (Light2D) set_editor_only #

fn (s &Light2D) set_editor_only(editor_only bool)

fn (Light2D) is_editor_only #

fn (s &Light2D) is_editor_only() bool

fn (Light2D) set_color #

fn (s &Light2D) set_color(color Color)

fn (Light2D) get_color #

fn (s &Light2D) get_color() Color

fn (Light2D) set_energy #

fn (s &Light2D) set_energy(energy f64)

fn (Light2D) get_energy #

fn (s &Light2D) get_energy() f64

fn (Light2D) set_z_range_min #

fn (s &Light2D) set_z_range_min(z i64)

fn (Light2D) get_z_range_min #

fn (s &Light2D) get_z_range_min() i64

fn (Light2D) set_z_range_max #

fn (s &Light2D) set_z_range_max(z i64)

fn (Light2D) get_z_range_max #

fn (s &Light2D) get_z_range_max() i64

fn (Light2D) set_layer_range_min #

fn (s &Light2D) set_layer_range_min(layer i64)

fn (Light2D) get_layer_range_min #

fn (s &Light2D) get_layer_range_min() i64

fn (Light2D) set_layer_range_max #

fn (s &Light2D) set_layer_range_max(layer i64)

fn (Light2D) get_layer_range_max #

fn (s &Light2D) get_layer_range_max() i64

fn (Light2D) set_item_cull_mask #

fn (s &Light2D) set_item_cull_mask(item_cull_mask i64)

fn (Light2D) get_item_cull_mask #

fn (s &Light2D) get_item_cull_mask() i64

fn (Light2D) set_item_shadow_cull_mask #

fn (s &Light2D) set_item_shadow_cull_mask(item_shadow_cull_mask i64)

fn (Light2D) get_item_shadow_cull_mask #

fn (s &Light2D) get_item_shadow_cull_mask() i64

fn (Light2D) set_shadow_enabled #

fn (s &Light2D) set_shadow_enabled(enabled bool)

fn (Light2D) is_shadow_enabled #

fn (s &Light2D) is_shadow_enabled() bool

fn (Light2D) set_shadow_smooth #

fn (s &Light2D) set_shadow_smooth(smooth f64)

fn (Light2D) get_shadow_smooth #

fn (s &Light2D) get_shadow_smooth() f64

fn (Light2D) set_shadow_filter #

fn (s &Light2D) set_shadow_filter(filter Light2DShadowFilter)

fn (Light2D) get_shadow_filter #

fn (s &Light2D) get_shadow_filter() Light2DShadowFilter

fn (Light2D) set_shadow_color #

fn (s &Light2D) set_shadow_color(shadow_color Color)

fn (Light2D) get_shadow_color #

fn (s &Light2D) get_shadow_color() Color

fn (Light2D) set_blend_mode #

fn (s &Light2D) set_blend_mode(mode Light2DBlendMode)

fn (Light2D) get_blend_mode #

fn (s &Light2D) get_blend_mode() Light2DBlendMode

fn (Light2D) set_height #

fn (s &Light2D) set_height(height f64)

Sets the light's height, which is used in 2D normal mapping. See [member PointLight2D.height] and [member DirectionalLight2D.height].

fn (Light2D) get_height #

fn (s &Light2D) get_height() f64

Returns the light's height, which is used in 2D normal mapping. See [member PointLight2D.height] and [member DirectionalLight2D.height].

struct Light3D #

struct Light3D {
	VisualInstance3D
}

Provides a base class for different kinds of light nodes.

fn (Light3D) to_variant #

fn (s &Light3D) to_variant() Variant

fn (Light3D) from_variant #

fn (mut s Light3D) from_variant(variant &Variant)

fn (Light3D) set_editor_only #

fn (s &Light3D) set_editor_only(editor_only bool)

fn (Light3D) is_editor_only #

fn (s &Light3D) is_editor_only() bool

fn (Light3D) set_param #

fn (s &Light3D) set_param(param Light3DParam, value f64)

Sets the value of the specified [enum Light3D.Param] parameter.

fn (Light3D) get_param #

fn (s &Light3D) get_param(param Light3DParam) f64

Returns the value of the specified [enum Light3D.Param] parameter.

fn (Light3D) set_shadow #

fn (s &Light3D) set_shadow(enabled bool)

fn (Light3D) has_shadow #

fn (s &Light3D) has_shadow() bool

fn (Light3D) set_negative #

fn (s &Light3D) set_negative(enabled bool)

fn (Light3D) is_negative #

fn (s &Light3D) is_negative() bool

fn (Light3D) set_cull_mask #

fn (s &Light3D) set_cull_mask(cull_mask i64)

fn (Light3D) get_cull_mask #

fn (s &Light3D) get_cull_mask() i64

fn (Light3D) set_enable_distance_fade #

fn (s &Light3D) set_enable_distance_fade(enable bool)

fn (Light3D) is_distance_fade_enabled #

fn (s &Light3D) is_distance_fade_enabled() bool

fn (Light3D) set_distance_fade_begin #

fn (s &Light3D) set_distance_fade_begin(distance f64)

fn (Light3D) get_distance_fade_begin #

fn (s &Light3D) get_distance_fade_begin() f64

fn (Light3D) set_distance_fade_shadow #

fn (s &Light3D) set_distance_fade_shadow(distance f64)

fn (Light3D) get_distance_fade_shadow #

fn (s &Light3D) get_distance_fade_shadow() f64

fn (Light3D) set_distance_fade_length #

fn (s &Light3D) set_distance_fade_length(distance f64)

fn (Light3D) get_distance_fade_length #

fn (s &Light3D) get_distance_fade_length() f64

fn (Light3D) set_color #

fn (s &Light3D) set_color(color Color)

fn (Light3D) get_color #

fn (s &Light3D) get_color() Color

fn (Light3D) set_shadow_reverse_cull_face #

fn (s &Light3D) set_shadow_reverse_cull_face(enable bool)

fn (Light3D) get_shadow_reverse_cull_face #

fn (s &Light3D) get_shadow_reverse_cull_face() bool

fn (Light3D) set_shadow_caster_mask #

fn (s &Light3D) set_shadow_caster_mask(caster_mask i64)

fn (Light3D) get_shadow_caster_mask #

fn (s &Light3D) get_shadow_caster_mask() i64

fn (Light3D) set_bake_mode #

fn (s &Light3D) set_bake_mode(bake_mode Light3DBakeMode)

fn (Light3D) get_bake_mode #

fn (s &Light3D) get_bake_mode() Light3DBakeMode

fn (Light3D) set_projector #

fn (s &Light3D) set_projector(projector Texture2D)

fn (Light3D) get_projector #

fn (s &Light3D) get_projector() Texture2D

fn (Light3D) set_temperature #

fn (s &Light3D) set_temperature(temperature f64)

fn (Light3D) get_temperature #

fn (s &Light3D) get_temperature() f64

fn (Light3D) get_correlated_color #

fn (s &Light3D) get_correlated_color() Color

Returns the [Color] of an idealized blackbody at the given [member light_temperature]. This value is calculated internally based on the [member light_temperature]. This [Color] is multiplied by [member light_color] before being sent to the [RenderingServer].

struct LightOccluder2D #

struct LightOccluder2D {
	Node2D
}

Occludes light cast by a Light2D, casting shadows.

fn (LightOccluder2D) to_variant #

fn (s &LightOccluder2D) to_variant() Variant

fn (LightOccluder2D) from_variant #

fn (mut s LightOccluder2D) from_variant(variant &Variant)

fn (LightOccluder2D) set_occluder_polygon #

fn (s &LightOccluder2D) set_occluder_polygon(polygon OccluderPolygon2D)

fn (LightOccluder2D) get_occluder_polygon #

fn (s &LightOccluder2D) get_occluder_polygon() OccluderPolygon2D

fn (LightOccluder2D) set_occluder_light_mask #

fn (s &LightOccluder2D) set_occluder_light_mask(mask i64)

fn (LightOccluder2D) get_occluder_light_mask #

fn (s &LightOccluder2D) get_occluder_light_mask() i64

fn (LightOccluder2D) set_as_sdf_collision #

fn (s &LightOccluder2D) set_as_sdf_collision(enable bool)

fn (LightOccluder2D) is_set_as_sdf_collision #

fn (s &LightOccluder2D) is_set_as_sdf_collision() bool

struct LightmapGI #

struct LightmapGI {
	VisualInstance3D
}

Computes and stores baked lightmaps for fast global illumination.

fn (LightmapGI) to_variant #

fn (s &LightmapGI) to_variant() Variant

fn (LightmapGI) from_variant #

fn (mut s LightmapGI) from_variant(variant &Variant)

fn (LightmapGI) set_light_data #

fn (s &LightmapGI) set_light_data(data LightmapGIData)

fn (LightmapGI) get_light_data #

fn (s &LightmapGI) get_light_data() LightmapGIData

fn (LightmapGI) set_bake_quality #

fn (s &LightmapGI) set_bake_quality(bake_quality LightmapGIBakeQuality)

fn (LightmapGI) get_bake_quality #

fn (s &LightmapGI) get_bake_quality() LightmapGIBakeQuality

fn (LightmapGI) set_bounces #

fn (s &LightmapGI) set_bounces(bounces i64)

fn (LightmapGI) get_bounces #

fn (s &LightmapGI) get_bounces() i64

fn (LightmapGI) set_bounce_indirect_energy #

fn (s &LightmapGI) set_bounce_indirect_energy(bounce_indirect_energy f64)

fn (LightmapGI) get_bounce_indirect_energy #

fn (s &LightmapGI) get_bounce_indirect_energy() f64

fn (LightmapGI) set_generate_probes #

fn (s &LightmapGI) set_generate_probes(subdivision LightmapGIGenerateProbes)

fn (LightmapGI) get_generate_probes #

fn (s &LightmapGI) get_generate_probes() LightmapGIGenerateProbes

fn (LightmapGI) set_bias #

fn (s &LightmapGI) set_bias(bias f64)

fn (LightmapGI) get_bias #

fn (s &LightmapGI) get_bias() f64

fn (LightmapGI) set_environment_mode #

fn (s &LightmapGI) set_environment_mode(mode LightmapGIEnvironmentMode)

fn (LightmapGI) get_environment_mode #

fn (s &LightmapGI) get_environment_mode() LightmapGIEnvironmentMode

fn (LightmapGI) set_environment_custom_sky #

fn (s &LightmapGI) set_environment_custom_sky(sky Sky)

fn (LightmapGI) get_environment_custom_sky #

fn (s &LightmapGI) get_environment_custom_sky() Sky

fn (LightmapGI) set_environment_custom_color #

fn (s &LightmapGI) set_environment_custom_color(color Color)

fn (LightmapGI) get_environment_custom_color #

fn (s &LightmapGI) get_environment_custom_color() Color

fn (LightmapGI) set_environment_custom_energy #

fn (s &LightmapGI) set_environment_custom_energy(energy f64)

fn (LightmapGI) get_environment_custom_energy #

fn (s &LightmapGI) get_environment_custom_energy() f64

fn (LightmapGI) set_texel_scale #

fn (s &LightmapGI) set_texel_scale(texel_scale f64)

fn (LightmapGI) get_texel_scale #

fn (s &LightmapGI) get_texel_scale() f64

fn (LightmapGI) set_max_texture_size #

fn (s &LightmapGI) set_max_texture_size(max_texture_size i64)

fn (LightmapGI) get_max_texture_size #

fn (s &LightmapGI) get_max_texture_size() i64

fn (LightmapGI) set_supersampling_enabled #

fn (s &LightmapGI) set_supersampling_enabled(enable bool)

fn (LightmapGI) is_supersampling_enabled #

fn (s &LightmapGI) is_supersampling_enabled() bool

fn (LightmapGI) set_supersampling_factor #

fn (s &LightmapGI) set_supersampling_factor(factor f64)

fn (LightmapGI) get_supersampling_factor #

fn (s &LightmapGI) get_supersampling_factor() f64

fn (LightmapGI) set_use_denoiser #

fn (s &LightmapGI) set_use_denoiser(use_denoiser bool)

fn (LightmapGI) is_using_denoiser #

fn (s &LightmapGI) is_using_denoiser() bool

fn (LightmapGI) set_denoiser_strength #

fn (s &LightmapGI) set_denoiser_strength(denoiser_strength f64)

fn (LightmapGI) get_denoiser_strength #

fn (s &LightmapGI) get_denoiser_strength() f64

fn (LightmapGI) set_denoiser_range #

fn (s &LightmapGI) set_denoiser_range(denoiser_range i64)

fn (LightmapGI) get_denoiser_range #

fn (s &LightmapGI) get_denoiser_range() i64

fn (LightmapGI) set_interior #

fn (s &LightmapGI) set_interior(enable bool)

fn (LightmapGI) is_interior #

fn (s &LightmapGI) is_interior() bool

fn (LightmapGI) set_directional #

fn (s &LightmapGI) set_directional(directional bool)

fn (LightmapGI) is_directional #

fn (s &LightmapGI) is_directional() bool

fn (LightmapGI) set_shadowmask_mode #

fn (s &LightmapGI) set_shadowmask_mode(mode LightmapGIDataShadowmaskMode)

fn (LightmapGI) get_shadowmask_mode #

fn (s &LightmapGI) get_shadowmask_mode() LightmapGIDataShadowmaskMode

fn (LightmapGI) set_use_texture_for_bounces #

fn (s &LightmapGI) set_use_texture_for_bounces(use_texture_for_bounces bool)

fn (LightmapGI) is_using_texture_for_bounces #

fn (s &LightmapGI) is_using_texture_for_bounces() bool

fn (LightmapGI) set_camera_attributes #

fn (s &LightmapGI) set_camera_attributes(camera_attributes CameraAttributes)

fn (LightmapGI) get_camera_attributes #

fn (s &LightmapGI) get_camera_attributes() CameraAttributes

struct LightmapGIData #

struct LightmapGIData {
	Resource
}

Contains baked lightmap and dynamic object probe data for [LightmapGI].

fn (LightmapGIData) to_variant #

fn (s &LightmapGIData) to_variant() Variant

fn (LightmapGIData) from_variant #

fn (mut s LightmapGIData) from_variant(variant &Variant)

fn (LightmapGIData) set_lightmap_textures #

fn (s &LightmapGIData) set_lightmap_textures(light_textures Array)

fn (LightmapGIData) get_lightmap_textures #

fn (s &LightmapGIData) get_lightmap_textures() Array

fn (LightmapGIData) set_shadowmask_textures #

fn (s &LightmapGIData) set_shadowmask_textures(shadowmask_textures Array)

fn (LightmapGIData) get_shadowmask_textures #

fn (s &LightmapGIData) get_shadowmask_textures() Array

fn (LightmapGIData) set_uses_spherical_harmonics #

fn (s &LightmapGIData) set_uses_spherical_harmonics(uses_spherical_harmonics bool)

If [param uses_spherical_harmonics] is true, tells the engine to treat the lightmap data as if it was baked with directional information. [b]Note:[/b] Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire [LightmapGIData] resource is replaced by the lightmapper.

fn (LightmapGIData) is_using_spherical_harmonics #

fn (s &LightmapGIData) is_using_spherical_harmonics() bool

If true, lightmaps were baked with directional information. See also [member LightmapGI.directional].

fn (LightmapGIData) add_user #

fn (s &LightmapGIData) add_user(path NodePath, uv_scale Rect2, slice_index i64, sub_instance i64)

Adds an object that is considered baked within this [LightmapGIData].

fn (LightmapGIData) get_user_count #

fn (s &LightmapGIData) get_user_count() i64

Returns the number of objects that are considered baked within this [LightmapGIData].

fn (LightmapGIData) get_user_path #

fn (s &LightmapGIData) get_user_path(user_idx i64) NodePath

Returns the [NodePath] of the baked object at index [param user_idx].

fn (LightmapGIData) clear_users #

fn (s &LightmapGIData) clear_users()

Clear all objects that are considered baked within this [LightmapGIData].

fn (LightmapGIData) set_light_texture #

fn (s &LightmapGIData) set_light_texture(light_texture TextureLayered)

fn (LightmapGIData) get_light_texture #

fn (s &LightmapGIData) get_light_texture() TextureLayered

struct LightmapProbe #

struct LightmapProbe {
	Node3D
}

Represents a single manually placed probe for dynamic object lighting with [LightmapGI].

fn (LightmapProbe) to_variant #

fn (s &LightmapProbe) to_variant() Variant

fn (LightmapProbe) from_variant #

fn (mut s LightmapProbe) from_variant(variant &Variant)

struct Lightmapper #

struct Lightmapper {
	RefCounted
}

Abstract class extended by lightmappers, for use in [LightmapGI].

fn (Lightmapper) to_variant #

fn (s &Lightmapper) to_variant() Variant

fn (Lightmapper) from_variant #

fn (mut s Lightmapper) from_variant(variant &Variant)

struct LightmapperRD #

struct LightmapperRD {
	Lightmapper
}

The built-in GPU-based lightmapper for use with [LightmapGI].

fn (LightmapperRD) to_variant #

fn (s &LightmapperRD) to_variant() Variant

fn (LightmapperRD) from_variant #

fn (mut s LightmapperRD) from_variant(variant &Variant)

struct Line2D #

struct Line2D {
	Node2D
}

A 2D polyline that can optionally be textured.

fn (Line2D) to_variant #

fn (s &Line2D) to_variant() Variant

fn (Line2D) from_variant #

fn (mut s Line2D) from_variant(variant &Variant)

fn (Line2D) set_points #

fn (s &Line2D) set_points(points PackedVector2Array)

fn (Line2D) get_points #

fn (s &Line2D) get_points() PackedVector2Array

fn (Line2D) set_point_position #

fn (s &Line2D) set_point_position(index i64, position Vector2)

Overwrites the position of the point at the given [param index] with the supplied [param position].

fn (Line2D) get_point_position #

fn (s &Line2D) get_point_position(index i64) Vector2

Returns the position of the point at index [param index].

fn (Line2D) get_point_count #

fn (s &Line2D) get_point_count() i64

Returns the number of points in the polyline.

fn (Line2D) add_point #

fn (s &Line2D) add_point(position Vector2, cfg Line2D_add_point_Cfg)

Adds a point with the specified [param position] relative to the polyline's own position. If no [param index] is provided, the new point will be added to the end of the points array. If [param index] is given, the new point is inserted before the existing point identified by index [param index]. The indices of the points after the new point get increased by 1. The provided [param index] must not exceed the number of existing points in the polyline. See [method get_point_count].

fn (Line2D) remove_point #

fn (s &Line2D) remove_point(index i64)

Removes the point at index [param index] from the polyline.

fn (Line2D) clear_points #

fn (s &Line2D) clear_points()

Removes all points from the polyline, making it empty.

fn (Line2D) set_closed #

fn (s &Line2D) set_closed(closed bool)

fn (Line2D) is_closed #

fn (s &Line2D) is_closed() bool

fn (Line2D) set_width #

fn (s &Line2D) set_width(width f64)

fn (Line2D) get_width #

fn (s &Line2D) get_width() f64

fn (Line2D) set_curve #

fn (s &Line2D) set_curve(curve Curve)

fn (Line2D) get_curve #

fn (s &Line2D) get_curve() Curve

fn (Line2D) set_default_color #

fn (s &Line2D) set_default_color(color Color)

fn (Line2D) get_default_color #

fn (s &Line2D) get_default_color() Color

fn (Line2D) set_gradient #

fn (s &Line2D) set_gradient(color Gradient)

fn (Line2D) get_gradient #

fn (s &Line2D) get_gradient() Gradient

fn (Line2D) set_texture #

fn (s &Line2D) set_texture(texture Texture2D)

fn (Line2D) get_texture #

fn (s &Line2D) get_texture() Texture2D

fn (Line2D) set_texture_mode #

fn (s &Line2D) set_texture_mode(mode Line2DLineTextureMode)

fn (Line2D) get_texture_mode #

fn (s &Line2D) get_texture_mode() Line2DLineTextureMode

fn (Line2D) set_joint_mode #

fn (s &Line2D) set_joint_mode(mode Line2DLineJointMode)

fn (Line2D) get_joint_mode #

fn (s &Line2D) get_joint_mode() Line2DLineJointMode

fn (Line2D) set_begin_cap_mode #

fn (s &Line2D) set_begin_cap_mode(mode Line2DLineCapMode)

fn (Line2D) get_begin_cap_mode #

fn (s &Line2D) get_begin_cap_mode() Line2DLineCapMode

fn (Line2D) set_end_cap_mode #

fn (s &Line2D) set_end_cap_mode(mode Line2DLineCapMode)

fn (Line2D) get_end_cap_mode #

fn (s &Line2D) get_end_cap_mode() Line2DLineCapMode

fn (Line2D) set_sharp_limit #

fn (s &Line2D) set_sharp_limit(limit f64)

fn (Line2D) get_sharp_limit #

fn (s &Line2D) get_sharp_limit() f64

fn (Line2D) set_round_precision #

fn (s &Line2D) set_round_precision(precision i64)

fn (Line2D) get_round_precision #

fn (s &Line2D) get_round_precision() i64

fn (Line2D) set_antialiased #

fn (s &Line2D) set_antialiased(antialiased bool)

fn (Line2D) get_antialiased #

fn (s &Line2D) get_antialiased() bool

struct Line2D_add_point_Cfg #

@[params]
struct Line2D_add_point_Cfg {
pub:
	index i64 = -1
}

Optional parameters for Line2D#add_point

struct LineEdit #

struct LineEdit {
	Control
}

An input field for single-line text.

fn (LineEdit) to_variant #

fn (s &LineEdit) to_variant() Variant

fn (LineEdit) from_variant #

fn (mut s LineEdit) from_variant(variant &Variant)

fn (LineEdit) has_ime_text #

fn (s &LineEdit) has_ime_text() bool

Returns true if the user has text in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME).

fn (LineEdit) cancel_ime #

fn (s &LineEdit) cancel_ime()

Closes the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME) if it is open. Any text in the IME will be lost.

fn (LineEdit) apply_ime #

fn (s &LineEdit) apply_ime()

Applies text from the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME) and closes the IME if it is open.

fn (LineEdit) set_horizontal_alignment #

fn (s &LineEdit) set_horizontal_alignment(alignment HorizontalAlignment)

fn (LineEdit) get_horizontal_alignment #

fn (s &LineEdit) get_horizontal_alignment() HorizontalAlignment

fn (LineEdit) edit #

fn (s &LineEdit) edit()

Allows entering edit mode whether the [LineEdit] is focused or not. See also [member keep_editing_on_text_submit].

fn (LineEdit) unedit #

fn (s &LineEdit) unedit()

Allows exiting edit mode while preserving focus.

fn (LineEdit) is_editing #

fn (s &LineEdit) is_editing() bool

Returns whether the [LineEdit] is being edited.

fn (LineEdit) set_keep_editing_on_text_submit #

fn (s &LineEdit) set_keep_editing_on_text_submit(enable bool)

fn (LineEdit) is_editing_kept_on_text_submit #

fn (s &LineEdit) is_editing_kept_on_text_submit() bool

fn (LineEdit) clear #

fn (s &LineEdit) clear()

Erases the [LineEdit]'s [member text].

fn (LineEdit) gd_select #

fn (s &LineEdit) gd_select(cfg LineEdit_gd_select_Cfg)

Selects characters inside [LineEdit] between [param from] and [param to]. By default, [param from] is at the beginning and [param to] at the end. [codeblocks] [gdscript] text = "Welcome" select() # Will select "Welcome". select(4) # Will select "ome". select(2, 5) # Will select "lco". [/gdscript] [csharp] Text = "Welcome"; Select(); // Will select "Welcome". Select(4); // Will select "ome". Select(2, 5); // Will select "lco". [/csharp] [/codeblocks]

fn (LineEdit) select_all #

fn (s &LineEdit) select_all()

Selects the whole [String].

fn (LineEdit) deselect #

fn (s &LineEdit) deselect()

Clears the current selection.

fn (LineEdit) has_undo #

fn (s &LineEdit) has_undo() bool

Returns true if an "undo" action is available.

fn (LineEdit) has_redo #

fn (s &LineEdit) has_redo() bool

Returns true if a "redo" action is available.

fn (LineEdit) has_selection #

fn (s &LineEdit) has_selection() bool

Returns true if the user has selected text.

fn (LineEdit) get_selected_text #

fn (s &LineEdit) get_selected_text() string

Returns the text inside the selection.

fn (LineEdit) get_selection_from_column #

fn (s &LineEdit) get_selection_from_column() i64

Returns the selection begin column.

fn (LineEdit) get_selection_to_column #

fn (s &LineEdit) get_selection_to_column() i64

Returns the selection end column.

fn (LineEdit) set_text #

fn (s &LineEdit) set_text(text string)

fn (LineEdit) get_text #

fn (s &LineEdit) get_text() string

fn (LineEdit) get_draw_control_chars #

fn (s &LineEdit) get_draw_control_chars() bool

fn (LineEdit) set_draw_control_chars #

fn (s &LineEdit) set_draw_control_chars(enable bool)

fn (LineEdit) set_text_direction #

fn (s &LineEdit) set_text_direction(direction ControlTextDirection)

fn (LineEdit) get_text_direction #

fn (s &LineEdit) get_text_direction() ControlTextDirection

fn (LineEdit) set_language #

fn (s &LineEdit) set_language(language string)

fn (LineEdit) get_language #

fn (s &LineEdit) get_language() string

fn (LineEdit) set_structured_text_bidi_override #

fn (s &LineEdit) set_structured_text_bidi_override(parser TextServerStructuredTextParser)

fn (LineEdit) get_structured_text_bidi_override #

fn (s &LineEdit) get_structured_text_bidi_override() TextServerStructuredTextParser

fn (LineEdit) set_structured_text_bidi_override_options #

fn (s &LineEdit) set_structured_text_bidi_override_options(gd_args Array)

fn (LineEdit) get_structured_text_bidi_override_options #

fn (s &LineEdit) get_structured_text_bidi_override_options() Array

fn (LineEdit) set_placeholder #

fn (s &LineEdit) set_placeholder(text string)

fn (LineEdit) get_placeholder #

fn (s &LineEdit) get_placeholder() string

fn (LineEdit) set_caret_column #

fn (s &LineEdit) set_caret_column(position i64)

fn (LineEdit) get_caret_column #

fn (s &LineEdit) get_caret_column() i64

fn (LineEdit) get_next_composite_character_column #

fn (s &LineEdit) get_next_composite_character_column(column i64) i64

Returns the correct column at the end of a composite character like ❤️‍🩹 (mending heart; Unicode: U+2764 U+FE0F U+200D U+1FA79) which is comprised of more than one Unicode code point, if the caret is at the start of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters. [b]Note:[/b] To check at caret location use get_next_composite_character_column(get_caret_column())

fn (LineEdit) get_previous_composite_character_column #

fn (s &LineEdit) get_previous_composite_character_column(column i64) i64

Returns the correct column at the start of a composite character like ❤️‍🩹 (mending heart; Unicode: U+2764 U+FE0F U+200D U+1FA79) which is comprised of more than one Unicode code point, if the caret is at the end of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters. [b]Note:[/b] To check at caret location use get_previous_composite_character_column(get_caret_column())

fn (LineEdit) get_scroll_offset #

fn (s &LineEdit) get_scroll_offset() f64

Returns the scroll offset due to [member caret_column], as a number of characters.

fn (LineEdit) set_expand_to_text_length_enabled #

fn (s &LineEdit) set_expand_to_text_length_enabled(enabled bool)

fn (LineEdit) is_expand_to_text_length_enabled #

fn (s &LineEdit) is_expand_to_text_length_enabled() bool

fn (LineEdit) set_caret_mid_grapheme_enabled #

fn (s &LineEdit) set_caret_mid_grapheme_enabled(enabled bool)

fn (LineEdit) is_caret_mid_grapheme_enabled #

fn (s &LineEdit) is_caret_mid_grapheme_enabled() bool

fn (LineEdit) set_caret_force_displayed #

fn (s &LineEdit) set_caret_force_displayed(enabled bool)

fn (LineEdit) is_caret_force_displayed #

fn (s &LineEdit) is_caret_force_displayed() bool

fn (LineEdit) set_max_length #

fn (s &LineEdit) set_max_length(chars i64)

fn (LineEdit) get_max_length #

fn (s &LineEdit) get_max_length() i64

fn (LineEdit) insert_text_at_caret #

fn (s &LineEdit) insert_text_at_caret(text string)

Inserts [param text] at the caret. If the resulting value is longer than [member max_length], nothing happens.

fn (LineEdit) delete_char_at_caret #

fn (s &LineEdit) delete_char_at_caret()

Deletes one character at the caret's current position (equivalent to pressing [kbd]Delete[/kbd]).

fn (LineEdit) delete_text #

fn (s &LineEdit) delete_text(from_column i64, to_column i64)

Deletes a section of the [member text] going from position [param from_column] to [param to_column]. Both parameters should be within the text's length.

fn (LineEdit) set_editable #

fn (s &LineEdit) set_editable(enabled bool)

fn (LineEdit) is_editable #

fn (s &LineEdit) is_editable() bool

fn (LineEdit) set_secret #

fn (s &LineEdit) set_secret(enabled bool)

fn (LineEdit) is_secret #

fn (s &LineEdit) is_secret() bool

fn (LineEdit) set_secret_character #

fn (s &LineEdit) set_secret_character(character string)

fn (LineEdit) get_secret_character #

fn (s &LineEdit) get_secret_character() string

fn (LineEdit) menu_option #

fn (s &LineEdit) menu_option(option i64)

Executes a given action as defined in the [enum MenuItems] enum.

fn (LineEdit) get_menu #

fn (s &LineEdit) get_menu() PopupMenu

Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit]. You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see [enum MenuItems]). For example: [codeblocks] [gdscript] func _ready(): var menu = get_menu()# Remove all items after "Redo".menu.item_count = menu.get_item_index(MENU_REDO) + 1# Add custom items.menu.add_separator() menu.add_item("Insert Date", MENU_MAX + 1)# Connect callback.menu.id_pressed.connect(_on_item_pressed)

func _on_item_pressed(id): if id == MENU_MAX + 1: insert_text_at_caret(Time.get_date_string_from_system()) [/gdscript] [csharp] public override void _Ready() { var menu = GetMenu(); // Remove all items after "Redo". menu.ItemCount = menu.GetItemIndex(LineEdit.MenuItems.Redo) + 1; // Add custom items. menu.AddSeparator(); menu.AddItem("Insert Date", LineEdit.MenuItems.Max + 1); // Add event handler. menu.IdPressed += OnItemPressed; }

public void OnItemPressed(int id) { if (id == LineEdit.MenuItems.Max + 1) { InsertTextAtCaret(Time.GetDateStringFromSystem()); } } [/csharp] [/codeblocks] [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.

fn (LineEdit) is_menu_visible #

fn (s &LineEdit) is_menu_visible() bool

Returns whether the menu is visible. Use this instead of get_menu().visible to improve performance (so the creation of the menu is avoided).

fn (LineEdit) set_context_menu_enabled #

fn (s &LineEdit) set_context_menu_enabled(enable bool)

fn (LineEdit) is_context_menu_enabled #

fn (s &LineEdit) is_context_menu_enabled() bool

fn (LineEdit) set_emoji_menu_enabled #

fn (s &LineEdit) set_emoji_menu_enabled(enable bool)

fn (LineEdit) is_emoji_menu_enabled #

fn (s &LineEdit) is_emoji_menu_enabled() bool

fn (LineEdit) set_backspace_deletes_composite_character_enabled #

fn (s &LineEdit) set_backspace_deletes_composite_character_enabled(enable bool)

fn (LineEdit) is_backspace_deletes_composite_character_enabled #

fn (s &LineEdit) is_backspace_deletes_composite_character_enabled() bool

fn (LineEdit) set_virtual_keyboard_enabled #

fn (s &LineEdit) set_virtual_keyboard_enabled(enable bool)

fn (LineEdit) is_virtual_keyboard_enabled #

fn (s &LineEdit) is_virtual_keyboard_enabled() bool

fn (LineEdit) set_virtual_keyboard_show_on_focus #

fn (s &LineEdit) set_virtual_keyboard_show_on_focus(show_on_focus bool)

fn (LineEdit) get_virtual_keyboard_show_on_focus #

fn (s &LineEdit) get_virtual_keyboard_show_on_focus() bool

fn (LineEdit) set_virtual_keyboard_type #

fn (s &LineEdit) set_virtual_keyboard_type(gd_type LineEditVirtualKeyboardType)

fn (LineEdit) get_virtual_keyboard_type #

fn (s &LineEdit) get_virtual_keyboard_type() LineEditVirtualKeyboardType

fn (LineEdit) set_clear_button_enabled #

fn (s &LineEdit) set_clear_button_enabled(enable bool)

fn (LineEdit) is_clear_button_enabled #

fn (s &LineEdit) is_clear_button_enabled() bool

fn (LineEdit) set_shortcut_keys_enabled #

fn (s &LineEdit) set_shortcut_keys_enabled(enable bool)

fn (LineEdit) is_shortcut_keys_enabled #

fn (s &LineEdit) is_shortcut_keys_enabled() bool

fn (LineEdit) set_middle_mouse_paste_enabled #

fn (s &LineEdit) set_middle_mouse_paste_enabled(enable bool)

fn (LineEdit) is_middle_mouse_paste_enabled #

fn (s &LineEdit) is_middle_mouse_paste_enabled() bool

fn (LineEdit) set_selecting_enabled #

fn (s &LineEdit) set_selecting_enabled(enable bool)

fn (LineEdit) is_selecting_enabled #

fn (s &LineEdit) is_selecting_enabled() bool

fn (LineEdit) set_deselect_on_focus_loss_enabled #

fn (s &LineEdit) set_deselect_on_focus_loss_enabled(enable bool)

fn (LineEdit) is_deselect_on_focus_loss_enabled #

fn (s &LineEdit) is_deselect_on_focus_loss_enabled() bool

fn (LineEdit) set_drag_and_drop_selection_enabled #

fn (s &LineEdit) set_drag_and_drop_selection_enabled(enable bool)

fn (LineEdit) is_drag_and_drop_selection_enabled #

fn (s &LineEdit) is_drag_and_drop_selection_enabled() bool

fn (LineEdit) set_right_icon #

fn (s &LineEdit) set_right_icon(icon Texture2D)

fn (LineEdit) get_right_icon #

fn (s &LineEdit) get_right_icon() Texture2D

fn (LineEdit) set_flat #

fn (s &LineEdit) set_flat(enabled bool)

fn (LineEdit) is_flat #

fn (s &LineEdit) is_flat() bool

fn (LineEdit) set_select_all_on_focus #

fn (s &LineEdit) set_select_all_on_focus(enabled bool)

fn (LineEdit) is_select_all_on_focus #

fn (s &LineEdit) is_select_all_on_focus() bool

struct LineEdit_gd_select_Cfg #

@[params]
struct LineEdit_gd_select_Cfg {
pub:
	from i64
	to   i64 = -1
}

Optional parameters for LineEdit#gd_select

struct LinkButton #

struct LinkButton {
	BaseButton
}

A button that represents a link.

fn (LinkButton) to_variant #

fn (s &LinkButton) to_variant() Variant

fn (LinkButton) from_variant #

fn (mut s LinkButton) from_variant(variant &Variant)

fn (LinkButton) set_text #

fn (s &LinkButton) set_text(text string)

fn (LinkButton) get_text #

fn (s &LinkButton) get_text() string

fn (LinkButton) set_text_direction #

fn (s &LinkButton) set_text_direction(direction ControlTextDirection)

fn (LinkButton) get_text_direction #

fn (s &LinkButton) get_text_direction() ControlTextDirection

fn (LinkButton) set_language #

fn (s &LinkButton) set_language(language string)

fn (LinkButton) get_language #

fn (s &LinkButton) get_language() string

fn (LinkButton) set_uri #

fn (s &LinkButton) set_uri(uri string)

fn (LinkButton) get_uri #

fn (s &LinkButton) get_uri() string

fn (LinkButton) set_underline_mode #

fn (s &LinkButton) set_underline_mode(underline_mode LinkButtonUnderlineMode)

fn (LinkButton) get_underline_mode #

fn (s &LinkButton) get_underline_mode() LinkButtonUnderlineMode

fn (LinkButton) set_structured_text_bidi_override #

fn (s &LinkButton) set_structured_text_bidi_override(parser TextServerStructuredTextParser)

fn (LinkButton) get_structured_text_bidi_override #

fn (s &LinkButton) get_structured_text_bidi_override() TextServerStructuredTextParser

fn (LinkButton) set_structured_text_bidi_override_options #

fn (s &LinkButton) set_structured_text_bidi_override_options(gd_args Array)

fn (LinkButton) get_structured_text_bidi_override_options #

fn (s &LinkButton) get_structured_text_bidi_override_options() Array

struct Log #

struct Log {
	log.Log
}

fn (Log) fatal #

fn (mut l Log) fatal(s string)

fn (Log) error #

fn (mut l Log) error(s string)

fn (Log) warn #

fn (mut l Log) warn(s string)

fn (Log) info #

fn (mut l Log) info(s string)

fn (Log) debug #

fn (mut l Log) debug(s string)

struct Logger #

struct Logger {
	RefCounted
}

Custom logger to receive messages from the internal error/warning stream.

fn (Logger) to_variant #

fn (s &Logger) to_variant() Variant

fn (Logger) from_variant #

fn (mut s Logger) from_variant(variant &Variant)

fn (Logger) gd_log_error #

fn (s &Logger) gd_log_error(function string, file string, line i64, code string, rationale string, editor_notify bool, error_type i64, script_backtraces Array)

Called when an error is logged. The error provides the [param function], [param file], and [param line] that it originated from, as well as either the [param code] that generated the error or a [param rationale]. The type of error provided by [param error_type] is described in the [enum ErrorType] enumeration. Additionally, [param script_backtraces] provides backtraces for each of the script languages. These will only contain stack frames in editor builds and debug builds by default. To enable them for release builds as well, you need to enable [member ProjectSettings.debug/settings/gdscript/always_track_call_stacks]. [b]Warning:[/b] This function may be called from multiple different threads, so you may need to do your own locking. [b]Note:[/b] [param script_backtraces] will not contain any captured variables, due to its prohibitively high cost. To get those you will need to capture the backtraces yourself, from within the [Logger] virtual methods, using [method Engine.capture_script_backtraces].

fn (Logger) gd_log_message #

fn (s &Logger) gd_log_message(message string, error bool)

Called when a message is logged. If [param error] is true, then this message was meant to be sent to stderr. [b]Warning:[/b] This function may be called from multiple different threads, so you may need to do your own locking.

struct LookAtModifier3D #

struct LookAtModifier3D {
	SkeletonModifier3D
}

The [LookAtModifier3D] rotates a bone to look at a target.

fn (LookAtModifier3D) to_variant #

fn (s &LookAtModifier3D) to_variant() Variant

fn (LookAtModifier3D) from_variant #

fn (mut s LookAtModifier3D) from_variant(variant &Variant)

fn (LookAtModifier3D) set_target_node #

fn (s &LookAtModifier3D) set_target_node(target_node NodePath)

fn (LookAtModifier3D) get_target_node #

fn (s &LookAtModifier3D) get_target_node() NodePath

fn (LookAtModifier3D) set_bone_name #

fn (s &LookAtModifier3D) set_bone_name(bone_name string)

fn (LookAtModifier3D) get_bone_name #

fn (s &LookAtModifier3D) get_bone_name() string

fn (LookAtModifier3D) set_bone #

fn (s &LookAtModifier3D) set_bone(bone i64)

fn (LookAtModifier3D) get_bone #

fn (s &LookAtModifier3D) get_bone() i64

fn (LookAtModifier3D) set_forward_axis #

fn (s &LookAtModifier3D) set_forward_axis(forward_axis SkeletonModifier3DBoneAxis)

fn (LookAtModifier3D) get_forward_axis #

fn (s &LookAtModifier3D) get_forward_axis() SkeletonModifier3DBoneAxis

fn (LookAtModifier3D) set_primary_rotation_axis #

fn (s &LookAtModifier3D) set_primary_rotation_axis(axis Vector3Axis)

fn (LookAtModifier3D) get_primary_rotation_axis #

fn (s &LookAtModifier3D) get_primary_rotation_axis() Vector3Axis

fn (LookAtModifier3D) set_use_secondary_rotation #

fn (s &LookAtModifier3D) set_use_secondary_rotation(enabled bool)

fn (LookAtModifier3D) is_using_secondary_rotation #

fn (s &LookAtModifier3D) is_using_secondary_rotation() bool

fn (LookAtModifier3D) set_origin_safe_margin #

fn (s &LookAtModifier3D) set_origin_safe_margin(margin f64)

fn (LookAtModifier3D) get_origin_safe_margin #

fn (s &LookAtModifier3D) get_origin_safe_margin() f64

fn (LookAtModifier3D) set_origin_from #

fn (s &LookAtModifier3D) set_origin_from(origin_from LookAtModifier3DOriginFrom)

fn (LookAtModifier3D) get_origin_from #

fn (s &LookAtModifier3D) get_origin_from() LookAtModifier3DOriginFrom

fn (LookAtModifier3D) set_origin_bone_name #

fn (s &LookAtModifier3D) set_origin_bone_name(bone_name string)

fn (LookAtModifier3D) get_origin_bone_name #

fn (s &LookAtModifier3D) get_origin_bone_name() string

fn (LookAtModifier3D) set_origin_bone #

fn (s &LookAtModifier3D) set_origin_bone(bone i64)

fn (LookAtModifier3D) get_origin_bone #

fn (s &LookAtModifier3D) get_origin_bone() i64

fn (LookAtModifier3D) set_origin_external_node #

fn (s &LookAtModifier3D) set_origin_external_node(external_node NodePath)

fn (LookAtModifier3D) get_origin_external_node #

fn (s &LookAtModifier3D) get_origin_external_node() NodePath

fn (LookAtModifier3D) set_origin_offset #

fn (s &LookAtModifier3D) set_origin_offset(offset Vector3)

fn (LookAtModifier3D) get_origin_offset #

fn (s &LookAtModifier3D) get_origin_offset() Vector3

fn (LookAtModifier3D) set_duration #

fn (s &LookAtModifier3D) set_duration(duration f64)

fn (LookAtModifier3D) get_duration #

fn (s &LookAtModifier3D) get_duration() f64

fn (LookAtModifier3D) set_transition_type #

fn (s &LookAtModifier3D) set_transition_type(transition_type TweenTransitionType)

fn (LookAtModifier3D) get_transition_type #

fn (s &LookAtModifier3D) get_transition_type() TweenTransitionType

fn (LookAtModifier3D) set_ease_type #

fn (s &LookAtModifier3D) set_ease_type(ease_type TweenEaseType)

fn (LookAtModifier3D) get_ease_type #

fn (s &LookAtModifier3D) get_ease_type() TweenEaseType

fn (LookAtModifier3D) set_use_angle_limitation #

fn (s &LookAtModifier3D) set_use_angle_limitation(enabled bool)

fn (LookAtModifier3D) is_using_angle_limitation #

fn (s &LookAtModifier3D) is_using_angle_limitation() bool

fn (LookAtModifier3D) set_symmetry_limitation #

fn (s &LookAtModifier3D) set_symmetry_limitation(enabled bool)

fn (LookAtModifier3D) is_limitation_symmetry #

fn (s &LookAtModifier3D) is_limitation_symmetry() bool

fn (LookAtModifier3D) set_primary_limit_angle #

fn (s &LookAtModifier3D) set_primary_limit_angle(angle f64)

fn (LookAtModifier3D) get_primary_limit_angle #

fn (s &LookAtModifier3D) get_primary_limit_angle() f64

fn (LookAtModifier3D) set_primary_damp_threshold #

fn (s &LookAtModifier3D) set_primary_damp_threshold(power f64)

fn (LookAtModifier3D) get_primary_damp_threshold #

fn (s &LookAtModifier3D) get_primary_damp_threshold() f64

fn (LookAtModifier3D) set_primary_positive_limit_angle #

fn (s &LookAtModifier3D) set_primary_positive_limit_angle(angle f64)

fn (LookAtModifier3D) get_primary_positive_limit_angle #

fn (s &LookAtModifier3D) get_primary_positive_limit_angle() f64

fn (LookAtModifier3D) set_primary_positive_damp_threshold #

fn (s &LookAtModifier3D) set_primary_positive_damp_threshold(power f64)

fn (LookAtModifier3D) get_primary_positive_damp_threshold #

fn (s &LookAtModifier3D) get_primary_positive_damp_threshold() f64

fn (LookAtModifier3D) set_primary_negative_limit_angle #

fn (s &LookAtModifier3D) set_primary_negative_limit_angle(angle f64)

fn (LookAtModifier3D) get_primary_negative_limit_angle #

fn (s &LookAtModifier3D) get_primary_negative_limit_angle() f64

fn (LookAtModifier3D) set_primary_negative_damp_threshold #

fn (s &LookAtModifier3D) set_primary_negative_damp_threshold(power f64)

fn (LookAtModifier3D) get_primary_negative_damp_threshold #

fn (s &LookAtModifier3D) get_primary_negative_damp_threshold() f64

fn (LookAtModifier3D) set_secondary_limit_angle #

fn (s &LookAtModifier3D) set_secondary_limit_angle(angle f64)

fn (LookAtModifier3D) get_secondary_limit_angle #

fn (s &LookAtModifier3D) get_secondary_limit_angle() f64

fn (LookAtModifier3D) set_secondary_damp_threshold #

fn (s &LookAtModifier3D) set_secondary_damp_threshold(power f64)

fn (LookAtModifier3D) get_secondary_damp_threshold #

fn (s &LookAtModifier3D) get_secondary_damp_threshold() f64

fn (LookAtModifier3D) set_secondary_positive_limit_angle #

fn (s &LookAtModifier3D) set_secondary_positive_limit_angle(angle f64)

fn (LookAtModifier3D) get_secondary_positive_limit_angle #

fn (s &LookAtModifier3D) get_secondary_positive_limit_angle() f64

fn (LookAtModifier3D) set_secondary_positive_damp_threshold #

fn (s &LookAtModifier3D) set_secondary_positive_damp_threshold(power f64)

fn (LookAtModifier3D) get_secondary_positive_damp_threshold #

fn (s &LookAtModifier3D) get_secondary_positive_damp_threshold() f64

fn (LookAtModifier3D) set_secondary_negative_limit_angle #

fn (s &LookAtModifier3D) set_secondary_negative_limit_angle(angle f64)

fn (LookAtModifier3D) get_secondary_negative_limit_angle #

fn (s &LookAtModifier3D) get_secondary_negative_limit_angle() f64

fn (LookAtModifier3D) set_secondary_negative_damp_threshold #

fn (s &LookAtModifier3D) set_secondary_negative_damp_threshold(power f64)

fn (LookAtModifier3D) get_secondary_negative_damp_threshold #

fn (s &LookAtModifier3D) get_secondary_negative_damp_threshold() f64

fn (LookAtModifier3D) get_interpolation_remaining #

fn (s &LookAtModifier3D) get_interpolation_remaining() f64

Returns the remaining seconds of the time-based interpolation.

fn (LookAtModifier3D) is_interpolating #

fn (s &LookAtModifier3D) is_interpolating() bool

Returns true if time-based interpolation is running. If true, it is equivalent to [method get_interpolation_remaining] returning 0.0. This is useful to determine whether a [LookAtModifier3D] can be removed safely.

fn (LookAtModifier3D) is_target_within_limitation #

fn (s &LookAtModifier3D) is_target_within_limitation() bool

Returns whether the target is within the angle limitations. It is useful for unsetting the [member target_node] when the target is outside of the angle limitations. [b]Note:[/b] The value is updated after [method SkeletonModifier3D._process_modification]. To retrieve this value correctly, we recommend using the signal [signal SkeletonModifier3D.modification_processed].

struct MainLoop #

struct MainLoop {
	Object
}

Abstract base class for the game's main loop.

fn (MainLoop) to_variant #

fn (s &MainLoop) to_variant() Variant

fn (MainLoop) from_variant #

fn (mut s MainLoop) from_variant(variant &Variant)

fn (MainLoop) gd_initialize #

fn (s &MainLoop) gd_initialize()

Called once during initialization.

fn (MainLoop) gd_physics_process #

fn (s &MainLoop) gd_physics_process(delta f64) bool

Called each physics frame with the time since the last physics frame as argument ([param delta], in seconds). Equivalent to [method Node._physics_process]. If implemented, the method must return a boolean value. true ends the main loop, while false lets it proceed to the next frame. [b]Note:[/b] [param delta] will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [param delta] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].

fn (MainLoop) gd_process #

fn (s &MainLoop) gd_process(delta f64) bool

Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to [method Node._process]. If implemented, the method must return a boolean value. true ends the main loop, while false lets it proceed to the next frame. [b]Note:[/b] [param delta] will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [param delta] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].

fn (MainLoop) gd_finalize #

fn (s &MainLoop) gd_finalize()

Called before the program exits.

struct MarginContainer #

struct MarginContainer {
	Container
}

A container that keeps a margin around its child controls.

fn (MarginContainer) to_variant #

fn (s &MarginContainer) to_variant() Variant

fn (MarginContainer) from_variant #

fn (mut s MarginContainer) from_variant(variant &Variant)

struct Marker2D #

struct Marker2D {
	Node2D
}

Generic 2D position hint for editing.

fn (Marker2D) to_variant #

fn (s &Marker2D) to_variant() Variant

fn (Marker2D) from_variant #

fn (mut s Marker2D) from_variant(variant &Variant)

fn (Marker2D) set_gizmo_extents #

fn (s &Marker2D) set_gizmo_extents(extents f64)

fn (Marker2D) get_gizmo_extents #

fn (s &Marker2D) get_gizmo_extents() f64

struct Marker3D #

struct Marker3D {
	Node3D
}

Generic 3D position hint for editing.

fn (Marker3D) to_variant #

fn (s &Marker3D) to_variant() Variant

fn (Marker3D) from_variant #

fn (mut s Marker3D) from_variant(variant &Variant)

fn (Marker3D) set_gizmo_extents #

fn (s &Marker3D) set_gizmo_extents(extents f64)

fn (Marker3D) get_gizmo_extents #

fn (s &Marker3D) get_gizmo_extents() f64

struct Marshalls #

struct Marshalls {
	Object
}

Data transformation (marshaling) and encoding helpers.

fn (Marshalls) to_variant #

fn (s &Marshalls) to_variant() Variant

fn (Marshalls) from_variant #

fn (mut s Marshalls) from_variant(variant &Variant)

fn (Marshalls) variant_to_base64 #

fn (s &Marshalls) variant_to_base64(variant_ ToVariant, cfg Marshalls_variant_to_base64_Cfg) string

Returns a Base64-encoded string of the [Variant] [param variant]. If [param full_objects] is true, encoding objects is allowed (and can potentially include code). Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.

fn (Marshalls) base64_to_variant #

fn (s &Marshalls) base64_to_variant(base64_str string, cfg Marshalls_base64_to_variant_Cfg) Variant

Returns a decoded [Variant] corresponding to the Base64-encoded string [param base64_str]. If [param allow_objects] is true, decoding objects is allowed. Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.

fn (Marshalls) raw_to_base64 #

fn (s &Marshalls) raw_to_base64(array PackedByteArray) string

Returns a Base64-encoded string of a given [PackedByteArray].

fn (Marshalls) base64_to_raw #

fn (s &Marshalls) base64_to_raw(base64_str string) PackedByteArray

Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [param base64_str].

fn (Marshalls) utf8_to_base64 #

fn (s &Marshalls) utf8_to_base64(utf8_str string) string

Returns a Base64-encoded string of the UTF-8 string [param utf8_str].

fn (Marshalls) base64_to_utf8 #

fn (s &Marshalls) base64_to_utf8(base64_str string) string

Returns a decoded string corresponding to the Base64-encoded string [param base64_str].

struct Marshalls_base64_to_variant_Cfg #

@[params]
struct Marshalls_base64_to_variant_Cfg {
pub:
	allow_objects bool
}

Optional parameters for Marshalls#base64_to_variant

struct Marshalls_variant_to_base64_Cfg #

@[params]
struct Marshalls_variant_to_base64_Cfg {
pub:
	full_objects bool
}

Optional parameters for Marshalls#variant_to_base64

struct Material #

struct Material {
	Resource
}

Virtual base class for applying visual properties to an object, such as color and roughness.

fn (Material) to_variant #

fn (s &Material) to_variant() Variant

fn (Material) from_variant #

fn (mut s Material) from_variant(variant &Variant)

fn (Material) gd_get_shader_rid #

fn (s &Material) gd_get_shader_rid() RID

Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. Used to access the RID of the [Material]'s [Shader].

fn (Material) gd_get_shader_mode #

fn (s &Material) gd_get_shader_mode() ShaderMode

Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools.

fn (Material) gd_can_do_next_pass #

fn (s &Material) gd_can_do_next_pass() bool

Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if [member next_pass] should be shown in the editor or not.

fn (Material) gd_can_use_render_priority #

fn (s &Material) gd_can_use_render_priority() bool

Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if [member render_priority] should be shown in the editor or not.

fn (Material) set_next_pass #

fn (s &Material) set_next_pass(next_pass Material)

fn (Material) get_next_pass #

fn (s &Material) get_next_pass() Material

fn (Material) set_render_priority #

fn (s &Material) set_render_priority(priority i64)

fn (Material) get_render_priority #

fn (s &Material) get_render_priority() i64

fn (Material) inspect_native_shader_code #

fn (s &Material) inspect_native_shader_code()

Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also [method Shader.inspect_native_shader_code].

fn (Material) create_placeholder #

fn (s &Material) create_placeholder() Resource

Creates a placeholder version of this resource ([PlaceholderMaterial]).

struct Mesh #

struct Mesh {
	Resource
}

A [Resource] that contains vertex array-based geometry.

fn (Mesh) to_variant #

fn (s &Mesh) to_variant() Variant

fn (Mesh) from_variant #

fn (mut s Mesh) from_variant(variant &Variant)

fn (Mesh) gd_get_surface_count #

fn (s &Mesh) gd_get_surface_count() i64

Virtual method to override the surface count for a custom class extending [Mesh].

fn (Mesh) gd_surface_get_array_len #

fn (s &Mesh) gd_surface_get_array_len(index i64) i64

Virtual method to override the surface array length for a custom class extending [Mesh].

fn (Mesh) gd_surface_get_array_index_len #

fn (s &Mesh) gd_surface_get_array_index_len(index i64) i64

Virtual method to override the surface array index length for a custom class extending [Mesh].

fn (Mesh) gd_surface_get_arrays #

fn (s &Mesh) gd_surface_get_arrays(index i64) Array

Virtual method to override the surface arrays for a custom class extending [Mesh].

fn (Mesh) gd_surface_get_blend_shape_arrays #

fn (s &Mesh) gd_surface_get_blend_shape_arrays(index i64) Array

Virtual method to override the blend shape arrays for a custom class extending [Mesh].

fn (Mesh) gd_surface_get_lods #

fn (s &Mesh) gd_surface_get_lods(index i64) Dictionary

Virtual method to override the surface LODs for a custom class extending [Mesh].

fn (Mesh) gd_surface_get_format #

fn (s &Mesh) gd_surface_get_format(index i64) i64

Virtual method to override the surface format for a custom class extending [Mesh].

fn (Mesh) gd_surface_get_primitive_type #

fn (s &Mesh) gd_surface_get_primitive_type(index i64) i64

Virtual method to override the surface primitive type for a custom class extending [Mesh].

fn (Mesh) gd_surface_set_material #

fn (s &Mesh) gd_surface_set_material(index i64, material Material)

Virtual method to override the setting of a [param material] at the given [param index] for a custom class extending [Mesh].

fn (Mesh) gd_surface_get_material #

fn (s &Mesh) gd_surface_get_material(index i64) Material

Virtual method to override the surface material for a custom class extending [Mesh].

fn (Mesh) gd_get_blend_shape_count #

fn (s &Mesh) gd_get_blend_shape_count() i64

Virtual method to override the number of blend shapes for a custom class extending [Mesh].

fn (Mesh) gd_get_blend_shape_name #

fn (s &Mesh) gd_get_blend_shape_name(index i64) string

Virtual method to override the retrieval of blend shape names for a custom class extending [Mesh].

fn (Mesh) gd_set_blend_shape_name #

fn (s &Mesh) gd_set_blend_shape_name(index i64, name string)

Virtual method to override the names of blend shapes for a custom class extending [Mesh].

fn (Mesh) gd_get_aabb #

fn (s &Mesh) gd_get_aabb() AABB

Virtual method to override the [AABB] for a custom class extending [Mesh].

fn (Mesh) set_lightmap_size_hint #

fn (s &Mesh) set_lightmap_size_hint(size Vector2i)

fn (Mesh) get_lightmap_size_hint #

fn (s &Mesh) get_lightmap_size_hint() Vector2i

fn (Mesh) get_aabb #

fn (s &Mesh) get_aabb() AABB

Returns the smallest [AABB] enclosing this mesh in local space. Not affected by custom_aabb. [b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh].

fn (Mesh) get_faces #

fn (s &Mesh) get_faces() PackedVector3Array

Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle.

fn (Mesh) get_surface_count #

fn (s &Mesh) get_surface_count() i64

Returns the number of surfaces that the [Mesh] holds. This is equivalent to [method MeshInstance3D.get_surface_override_material_count].

fn (Mesh) surface_get_arrays #

fn (s &Mesh) surface_get_arrays(surf_idx i64) Array

Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays]).

fn (Mesh) surface_get_blend_shape_arrays #

fn (s &Mesh) surface_get_blend_shape_arrays(surf_idx i64) Array

Returns the blend shape arrays for the requested surface.

fn (Mesh) surface_set_material #

fn (s &Mesh) surface_set_material(surf_idx i64, material Material)

Sets a [Material] for a given surface. Surface will be rendered using this material. [b]Note:[/b] This assigns the material within the [Mesh] resource, not the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties. To set the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, use [method MeshInstance3D.set_surface_override_material] instead.

fn (Mesh) surface_get_material #

fn (s &Mesh) surface_get_material(surf_idx i64) Material

Returns a [Material] in a given surface. Surface is rendered using this material. [b]Note:[/b] This returns the material within the [Mesh] resource, not the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties. To get the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, use [method MeshInstance3D.get_surface_override_material] instead.

fn (Mesh) create_placeholder #

fn (s &Mesh) create_placeholder() Resource

Creates a placeholder version of this resource ([PlaceholderMesh]).

fn (Mesh) create_trimesh_shape #

fn (s &Mesh) create_trimesh_shape() ConcavePolygonShape3D

Calculate a [ConcavePolygonShape3D] from the mesh.

fn (Mesh) create_convex_shape #

fn (s &Mesh) create_convex_shape(cfg Mesh_create_convex_shape_Cfg) ConvexPolygonShape3D

Calculate a [ConvexPolygonShape3D] from the mesh. If [param clean] is true (default), duplicate and interior vertices are removed automatically. You can set it to false to make the process faster if not needed. If [param simplify] is true, the geometry can be further simplified to reduce the number of vertices. Disabled by default.

fn (Mesh) create_outline #

fn (s &Mesh) create_outline(margin f64) Mesh

Calculate an outline mesh at a defined offset (margin) from the original mesh. [b]Note:[/b] This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise).

fn (Mesh) generate_triangle_mesh #

fn (s &Mesh) generate_triangle_mesh() TriangleMesh

Generate a [TriangleMesh] from the mesh. Considers only surfaces using one of these primitive types: [constant PRIMITIVE_TRIANGLES], [constant PRIMITIVE_TRIANGLE_STRIP].

struct MeshConvexDecompositionSettings #

struct MeshConvexDecompositionSettings {
	RefCounted
}

Parameters to be used with a [Mesh] convex decomposition operation.

fn (MeshConvexDecompositionSettings) to_variant #

fn (s &MeshConvexDecompositionSettings) to_variant() Variant

fn (MeshConvexDecompositionSettings) from_variant #

fn (mut s MeshConvexDecompositionSettings) from_variant(variant &Variant)

fn (MeshConvexDecompositionSettings) set_max_concavity #

fn (s &MeshConvexDecompositionSettings) set_max_concavity(max_concavity f64)

fn (MeshConvexDecompositionSettings) get_max_concavity #

fn (s &MeshConvexDecompositionSettings) get_max_concavity() f64

fn (MeshConvexDecompositionSettings) set_symmetry_planes_clipping_bias #

fn (s &MeshConvexDecompositionSettings) set_symmetry_planes_clipping_bias(symmetry_planes_clipping_bias f64)

fn (MeshConvexDecompositionSettings) get_symmetry_planes_clipping_bias #

fn (s &MeshConvexDecompositionSettings) get_symmetry_planes_clipping_bias() f64

fn (MeshConvexDecompositionSettings) set_revolution_axes_clipping_bias #

fn (s &MeshConvexDecompositionSettings) set_revolution_axes_clipping_bias(revolution_axes_clipping_bias f64)

fn (MeshConvexDecompositionSettings) get_revolution_axes_clipping_bias #

fn (s &MeshConvexDecompositionSettings) get_revolution_axes_clipping_bias() f64

fn (MeshConvexDecompositionSettings) set_min_volume_per_convex_hull #

fn (s &MeshConvexDecompositionSettings) set_min_volume_per_convex_hull(min_volume_per_convex_hull f64)

fn (MeshConvexDecompositionSettings) get_min_volume_per_convex_hull #

fn (s &MeshConvexDecompositionSettings) get_min_volume_per_convex_hull() f64

fn (MeshConvexDecompositionSettings) set_resolution #

fn (s &MeshConvexDecompositionSettings) set_resolution(min_volume_per_convex_hull i64)

fn (MeshConvexDecompositionSettings) get_resolution #

fn (s &MeshConvexDecompositionSettings) get_resolution() i64

fn (MeshConvexDecompositionSettings) set_max_num_vertices_per_convex_hull #

fn (s &MeshConvexDecompositionSettings) set_max_num_vertices_per_convex_hull(max_num_vertices_per_convex_hull i64)

fn (MeshConvexDecompositionSettings) get_max_num_vertices_per_convex_hull #

fn (s &MeshConvexDecompositionSettings) get_max_num_vertices_per_convex_hull() i64

fn (MeshConvexDecompositionSettings) set_plane_downsampling #

fn (s &MeshConvexDecompositionSettings) set_plane_downsampling(plane_downsampling i64)

fn (MeshConvexDecompositionSettings) get_plane_downsampling #

fn (s &MeshConvexDecompositionSettings) get_plane_downsampling() i64

fn (MeshConvexDecompositionSettings) set_convex_hull_downsampling #

fn (s &MeshConvexDecompositionSettings) set_convex_hull_downsampling(convex_hull_downsampling i64)

fn (MeshConvexDecompositionSettings) get_convex_hull_downsampling #

fn (s &MeshConvexDecompositionSettings) get_convex_hull_downsampling() i64

fn (MeshConvexDecompositionSettings) set_normalize_mesh #

fn (s &MeshConvexDecompositionSettings) set_normalize_mesh(normalize_mesh bool)

fn (MeshConvexDecompositionSettings) get_normalize_mesh #

fn (s &MeshConvexDecompositionSettings) get_normalize_mesh() bool

fn (MeshConvexDecompositionSettings) set_mode #

fn (s &MeshConvexDecompositionSettings) set_mode(mode MeshConvexDecompositionSettingsMode)

fn (MeshConvexDecompositionSettings) get_mode #

fn (s &MeshConvexDecompositionSettings) get_mode() MeshConvexDecompositionSettingsMode

fn (MeshConvexDecompositionSettings) set_convex_hull_approximation #

fn (s &MeshConvexDecompositionSettings) set_convex_hull_approximation(convex_hull_approximation bool)

fn (MeshConvexDecompositionSettings) get_convex_hull_approximation #

fn (s &MeshConvexDecompositionSettings) get_convex_hull_approximation() bool

fn (MeshConvexDecompositionSettings) set_max_convex_hulls #

fn (s &MeshConvexDecompositionSettings) set_max_convex_hulls(max_convex_hulls i64)

fn (MeshConvexDecompositionSettings) get_max_convex_hulls #

fn (s &MeshConvexDecompositionSettings) get_max_convex_hulls() i64

fn (MeshConvexDecompositionSettings) set_project_hull_vertices #

fn (s &MeshConvexDecompositionSettings) set_project_hull_vertices(project_hull_vertices bool)

fn (MeshConvexDecompositionSettings) get_project_hull_vertices #

fn (s &MeshConvexDecompositionSettings) get_project_hull_vertices() bool

struct MeshDataTool #

struct MeshDataTool {
	RefCounted
}

Helper tool to access and edit [Mesh] data.

fn (MeshDataTool) to_variant #

fn (s &MeshDataTool) to_variant() Variant

fn (MeshDataTool) from_variant #

fn (mut s MeshDataTool) from_variant(variant &Variant)

fn (MeshDataTool) clear #

fn (s &MeshDataTool) clear()

Clears all data currently in MeshDataTool.

fn (MeshDataTool) create_from_surface #

fn (s &MeshDataTool) create_from_surface(mesh ArrayMesh, surface i64) GDError

Uses specified surface of given [Mesh] to populate data for MeshDataTool. Requires [Mesh] with primitive type [constant Mesh.PRIMITIVE_TRIANGLES].

fn (MeshDataTool) commit_to_surface #

fn (s &MeshDataTool) commit_to_surface(mesh ArrayMesh, cfg MeshDataTool_commit_to_surface_Cfg) GDError

Adds a new surface to specified [Mesh] with edited data.

fn (MeshDataTool) get_format #

fn (s &MeshDataTool) get_format() i64

Returns the [Mesh]'s format as a combination of the [enum Mesh.ArrayFormat] flags. For example, a mesh containing both vertices and normals would return a format of 3 because [constant Mesh.ARRAY_FORMAT_VERTEX] is 1 and [constant Mesh.ARRAY_FORMAT_NORMAL] is 2.

fn (MeshDataTool) get_vertex_count #

fn (s &MeshDataTool) get_vertex_count() i64

Returns the total number of vertices in [Mesh].

fn (MeshDataTool) get_edge_count #

fn (s &MeshDataTool) get_edge_count() i64

Returns the number of edges in this [Mesh].

fn (MeshDataTool) get_face_count #

fn (s &MeshDataTool) get_face_count() i64

Returns the number of faces in this [Mesh].

fn (MeshDataTool) set_vertex #

fn (s &MeshDataTool) set_vertex(idx i64, vertex Vector3)

Sets the position of the given vertex.

fn (MeshDataTool) get_vertex #

fn (s &MeshDataTool) get_vertex(idx i64) Vector3

Returns the position of the given vertex.

fn (MeshDataTool) set_vertex_normal #

fn (s &MeshDataTool) set_vertex_normal(idx i64, normal Vector3)

Sets the normal of the given vertex.

fn (MeshDataTool) get_vertex_normal #

fn (s &MeshDataTool) get_vertex_normal(idx i64) Vector3

Returns the normal of the given vertex.

fn (MeshDataTool) set_vertex_tangent #

fn (s &MeshDataTool) set_vertex_tangent(idx i64, tangent Plane)

Sets the tangent of the given vertex.

fn (MeshDataTool) get_vertex_tangent #

fn (s &MeshDataTool) get_vertex_tangent(idx i64) Plane

Returns the tangent of the given vertex.

fn (MeshDataTool) set_vertex_uv #

fn (s &MeshDataTool) set_vertex_uv(idx i64, uv Vector2)

Sets the UV of the given vertex.

fn (MeshDataTool) get_vertex_uv #

fn (s &MeshDataTool) get_vertex_uv(idx i64) Vector2

Returns the UV of the given vertex.

fn (MeshDataTool) set_vertex_uv2 #

fn (s &MeshDataTool) set_vertex_uv2(idx i64, uv2 Vector2)

Sets the UV2 of the given vertex.

fn (MeshDataTool) get_vertex_uv2 #

fn (s &MeshDataTool) get_vertex_uv2(idx i64) Vector2

Returns the UV2 of the given vertex.

fn (MeshDataTool) set_vertex_color #

fn (s &MeshDataTool) set_vertex_color(idx i64, color Color)

Sets the color of the given vertex.

fn (MeshDataTool) get_vertex_color #

fn (s &MeshDataTool) get_vertex_color(idx i64) Color

Returns the color of the given vertex.

fn (MeshDataTool) set_vertex_bones #

fn (s &MeshDataTool) set_vertex_bones(idx i64, bones PackedInt32Array)

Sets the bones of the given vertex.

fn (MeshDataTool) get_vertex_bones #

fn (s &MeshDataTool) get_vertex_bones(idx i64) PackedInt32Array

Returns the bones of the given vertex.

fn (MeshDataTool) set_vertex_weights #

fn (s &MeshDataTool) set_vertex_weights(idx i64, weights PackedFloat32Array)

Sets the bone weights of the given vertex.

fn (MeshDataTool) get_vertex_weights #

fn (s &MeshDataTool) get_vertex_weights(idx i64) PackedFloat32Array

Returns bone weights of the given vertex.

fn (MeshDataTool) set_vertex_meta #

fn (s &MeshDataTool) set_vertex_meta(idx i64, meta_ ToVariant)

Sets the metadata associated with the given vertex.

fn (MeshDataTool) get_vertex_meta #

fn (s &MeshDataTool) get_vertex_meta(idx i64) Variant

Returns the metadata associated with the given vertex.

fn (MeshDataTool) get_vertex_edges #

fn (s &MeshDataTool) get_vertex_edges(idx i64) PackedInt32Array

Returns an array of edges that share the given vertex.

fn (MeshDataTool) get_vertex_faces #

fn (s &MeshDataTool) get_vertex_faces(idx i64) PackedInt32Array

Returns an array of faces that share the given vertex.

fn (MeshDataTool) get_edge_vertex #

fn (s &MeshDataTool) get_edge_vertex(idx i64, vertex i64) i64

Returns the index of the specified [param vertex] connected to the edge at index [param idx]. [param vertex] can only be 0 or 1, as edges are composed of two vertices.

fn (MeshDataTool) get_edge_faces #

fn (s &MeshDataTool) get_edge_faces(idx i64) PackedInt32Array

Returns array of faces that touch given edge.

fn (MeshDataTool) set_edge_meta #

fn (s &MeshDataTool) set_edge_meta(idx i64, meta_ ToVariant)

Sets the metadata of the given edge.

fn (MeshDataTool) get_edge_meta #

fn (s &MeshDataTool) get_edge_meta(idx i64) Variant

Returns meta information assigned to given edge.

fn (MeshDataTool) get_face_vertex #

fn (s &MeshDataTool) get_face_vertex(idx i64, vertex i64) i64

Returns the specified vertex index of the given face. [param vertex] must be either 0, 1, or 2 because faces contain three vertices. [codeblocks] [gdscript] var index = mesh_data_tool.get_face_vertex(0, 1) # Gets the index of the second vertex of the first face. var position = mesh_data_tool.get_vertex(index) var normal = mesh_data_tool.get_vertex_normal(index) [/gdscript] [csharp] int index = meshDataTool.GetFaceVertex(0, 1); // Gets the index of the second vertex of the first face. Vector3 position = meshDataTool.GetVertex(index); Vector3 normal = meshDataTool.GetVertexNormal(index); [/csharp] [/codeblocks]

fn (MeshDataTool) get_face_edge #

fn (s &MeshDataTool) get_face_edge(idx i64, edge i64) i64

Returns the edge associated with the face at index [param idx]. [param edge] argument must be either 0, 1, or 2 because a face only has three edges.

fn (MeshDataTool) set_face_meta #

fn (s &MeshDataTool) set_face_meta(idx i64, meta_ ToVariant)

Sets the metadata of the given face.

fn (MeshDataTool) get_face_meta #

fn (s &MeshDataTool) get_face_meta(idx i64) Variant

Returns the metadata associated with the given face.

fn (MeshDataTool) get_face_normal #

fn (s &MeshDataTool) get_face_normal(idx i64) Vector3

Calculates and returns the face normal of the given face.

fn (MeshDataTool) set_material #

fn (s &MeshDataTool) set_material(material Material)

Sets the material to be used by newly-constructed [Mesh].

fn (MeshDataTool) get_material #

fn (s &MeshDataTool) get_material() Material

Returns the material assigned to the [Mesh].

struct MeshDataTool_commit_to_surface_Cfg #

@[params]
struct MeshDataTool_commit_to_surface_Cfg {
pub:
	compression_flags i64
}

Optional parameters for MeshDataTool#commit_to_surface

struct MeshInstance2D #

struct MeshInstance2D {
	Node2D
}

Node used for displaying a [Mesh] in 2D.

fn (MeshInstance2D) to_variant #

fn (s &MeshInstance2D) to_variant() Variant

fn (MeshInstance2D) from_variant #

fn (mut s MeshInstance2D) from_variant(variant &Variant)

fn (MeshInstance2D) set_mesh #

fn (s &MeshInstance2D) set_mesh(mesh Mesh)

fn (MeshInstance2D) get_mesh #

fn (s &MeshInstance2D) get_mesh() Mesh

fn (MeshInstance2D) set_texture #

fn (s &MeshInstance2D) set_texture(texture Texture2D)

fn (MeshInstance2D) get_texture #

fn (s &MeshInstance2D) get_texture() Texture2D

struct MeshInstance3D #

struct MeshInstance3D {
	GeometryInstance3D
}

Node that instances meshes into a scenario.

fn (MeshInstance3D) to_variant #

fn (s &MeshInstance3D) to_variant() Variant

fn (MeshInstance3D) from_variant #

fn (mut s MeshInstance3D) from_variant(variant &Variant)

fn (MeshInstance3D) set_mesh #

fn (s &MeshInstance3D) set_mesh(mesh Mesh)

fn (MeshInstance3D) get_mesh #

fn (s &MeshInstance3D) get_mesh() Mesh

fn (MeshInstance3D) set_skeleton_path #

fn (s &MeshInstance3D) set_skeleton_path(skeleton_path NodePath)

fn (MeshInstance3D) get_skeleton_path #

fn (s &MeshInstance3D) get_skeleton_path() NodePath

fn (MeshInstance3D) set_skin #

fn (s &MeshInstance3D) set_skin(skin Skin)

fn (MeshInstance3D) get_skin #

fn (s &MeshInstance3D) get_skin() Skin

fn (MeshInstance3D) get_skin_reference #

fn (s &MeshInstance3D) get_skin_reference() SkinReference

Returns the internal [SkinReference] containing the skeleton's [RID] attached to this RID. See also [method Resource.get_rid], [method SkinReference.get_skeleton], and [method RenderingServer.instance_attach_skeleton].

fn (MeshInstance3D) get_surface_override_material_count #

fn (s &MeshInstance3D) get_surface_override_material_count() i64

Returns the number of surface override materials. This is equivalent to [method Mesh.get_surface_count]. See also [method get_surface_override_material].

fn (MeshInstance3D) set_surface_override_material #

fn (s &MeshInstance3D) set_surface_override_material(surface i64, material Material)

Sets the override [param material] for the specified [param surface] of the [Mesh] resource. This material is associated with this [MeshInstance3D] rather than with [member mesh]. [b]Note:[/b] This assigns the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, not the material within the [Mesh] resource. To set the material within the [Mesh] resource, use [method Mesh.surface_set_material] instead.

fn (MeshInstance3D) get_surface_override_material #

fn (s &MeshInstance3D) get_surface_override_material(surface i64) Material

Returns the override [Material] for the specified [param surface] of the [Mesh] resource. See also [method get_surface_override_material_count]. [b]Note:[/b] This returns the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, not the material within the [Mesh] resource. To get the material within the [Mesh] resource, use [method Mesh.surface_get_material] instead.

fn (MeshInstance3D) get_active_material #

fn (s &MeshInstance3D) get_active_material(surface i64) Material

Returns the [Material] that will be used by the [Mesh] when drawing. This can return the [member GeometryInstance3D.material_override], the surface override [Material] defined in this [MeshInstance3D], or the surface [Material] defined in the [member mesh]. For example, if [member GeometryInstance3D.material_override] is used, all surfaces will return the override material. Returns null if no material is active, including when [member mesh] is null.

fn (MeshInstance3D) create_trimesh_collision #

fn (s &MeshInstance3D) create_trimesh_collision()

This helper creates a [StaticBody3D] child node with a [ConcavePolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing.

fn (MeshInstance3D) create_convex_collision #

fn (s &MeshInstance3D) create_convex_collision(cfg MeshInstance3D_create_convex_collision_Cfg)

This helper creates a [StaticBody3D] child node with a [ConvexPolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing. If [param clean] is true (default), duplicate and interior vertices are removed automatically. You can set it to false to make the process faster if not needed. If [param simplify] is true, the geometry can be further simplified to reduce the number of vertices. Disabled by default.

fn (MeshInstance3D) create_multiple_convex_collisions #

fn (s &MeshInstance3D) create_multiple_convex_collisions(cfg MeshInstance3D_create_multiple_convex_collisions_Cfg)

This helper creates a [StaticBody3D] child node with multiple [ConvexPolygonShape3D] collision shapes calculated from the mesh geometry via convex decomposition. The convex decomposition operation can be controlled with parameters from the optional [param settings].

fn (MeshInstance3D) get_blend_shape_count #

fn (s &MeshInstance3D) get_blend_shape_count() i64

Returns the number of blend shapes available. Produces an error if [member mesh] is null.

fn (MeshInstance3D) find_blend_shape_by_name #

fn (s &MeshInstance3D) find_blend_shape_by_name(name string) i64

Returns the index of the blend shape with the given [param name]. Returns -1 if no blend shape with this name exists, including when [member mesh] is null.

fn (MeshInstance3D) get_blend_shape_value #

fn (s &MeshInstance3D) get_blend_shape_value(blend_shape_idx i64) f64

Returns the value of the blend shape at the given [param blend_shape_idx]. Returns 0.0 and produces an error if [member mesh] is null or doesn't have a blend shape at that index.

fn (MeshInstance3D) set_blend_shape_value #

fn (s &MeshInstance3D) set_blend_shape_value(blend_shape_idx i64, value f64)

Sets the value of the blend shape at [param blend_shape_idx] to [param value]. Produces an error if [member mesh] is null or doesn't have a blend shape at that index.

fn (MeshInstance3D) create_debug_tangents #

fn (s &MeshInstance3D) create_debug_tangents()

This helper creates a [MeshInstance3D] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing.

fn (MeshInstance3D) bake_mesh_from_current_blend_shape_mix #

fn (s &MeshInstance3D) bake_mesh_from_current_blend_shape_mix(cfg MeshInstance3D_bake_mesh_from_current_blend_shape_mix_Cfg) ArrayMesh

Takes a snapshot from the current [ArrayMesh] with all blend shapes applied according to their current weights and bakes it to the provided [param existing] mesh. If no [param existing] mesh is provided a new [ArrayMesh] is created, baked and returned. Mesh surface materials are not copied. [b]Performance:[/b] [Mesh] data needs to be received from the GPU, stalling the [RenderingServer] in the process.

fn (MeshInstance3D) bake_mesh_from_current_skeleton_pose #

fn (s &MeshInstance3D) bake_mesh_from_current_skeleton_pose(cfg MeshInstance3D_bake_mesh_from_current_skeleton_pose_Cfg) ArrayMesh

Takes a snapshot of the current animated skeleton pose of the skinned mesh and bakes it to the provided [param existing] mesh. If no [param existing] mesh is provided a new [ArrayMesh] is created, baked, and returned. Requires a skeleton with a registered skin to work. Blendshapes are ignored. Mesh surface materials are not copied. [b]Performance:[/b] [Mesh] data needs to be retrieved from the GPU, stalling the [RenderingServer] in the process.

struct MeshInstance3D_bake_mesh_from_current_blend_shape_mix_Cfg #

@[params]
struct MeshInstance3D_bake_mesh_from_current_blend_shape_mix_Cfg {
pub:
	existing ArrayMesh
}

Optional parameters for MeshInstance3D#bake_mesh_from_current_blend_shape_mix

struct MeshInstance3D_bake_mesh_from_current_skeleton_pose_Cfg #

@[params]
struct MeshInstance3D_bake_mesh_from_current_skeleton_pose_Cfg {
pub:
	existing ArrayMesh
}

Optional parameters for MeshInstance3D#bake_mesh_from_current_skeleton_pose

struct MeshInstance3D_create_convex_collision_Cfg #

@[params]
struct MeshInstance3D_create_convex_collision_Cfg {
pub:
	clean    bool
	simplify bool
}

Optional parameters for MeshInstance3D#create_convex_collision

struct MeshInstance3D_create_multiple_convex_collisions_Cfg #

@[params]
struct MeshInstance3D_create_multiple_convex_collisions_Cfg {
pub:
	settings MeshConvexDecompositionSettings
}

Optional parameters for MeshInstance3D#create_multiple_convex_collisions

struct MeshLibrary #

struct MeshLibrary {
	Resource
}

Library of meshes.

fn (MeshLibrary) to_variant #

fn (s &MeshLibrary) to_variant() Variant

fn (MeshLibrary) from_variant #

fn (mut s MeshLibrary) from_variant(variant &Variant)

fn (MeshLibrary) create_item #

fn (s &MeshLibrary) create_item(id i64)

Creates a new item in the library with the given ID. You can get an unused ID from [method get_last_unused_item_id].

fn (MeshLibrary) set_item_name #

fn (s &MeshLibrary) set_item_name(id i64, name string)

Sets the item's name. This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name].

fn (MeshLibrary) set_item_mesh #

fn (s &MeshLibrary) set_item_mesh(id i64, mesh Mesh)

Sets the item's mesh.

fn (MeshLibrary) set_item_mesh_transform #

fn (s &MeshLibrary) set_item_mesh_transform(id i64, mesh_transform Transform3D)

Sets the transform to apply to the item's mesh.

fn (MeshLibrary) set_item_mesh_cast_shadow #

fn (s &MeshLibrary) set_item_mesh_cast_shadow(id i64, shadow_casting_setting RenderingServerShadowCastingSetting)

Sets the item's shadow casting mode to [param shadow_casting_setting].

fn (MeshLibrary) set_item_navigation_mesh #

fn (s &MeshLibrary) set_item_navigation_mesh(id i64, navigation_mesh NavigationMesh)

Sets the item's navigation mesh.

fn (MeshLibrary) set_item_navigation_mesh_transform #

fn (s &MeshLibrary) set_item_navigation_mesh_transform(id i64, navigation_mesh Transform3D)

Sets the transform to apply to the item's navigation mesh.

fn (MeshLibrary) set_item_navigation_layers #

fn (s &MeshLibrary) set_item_navigation_layers(id i64, navigation_layers i64)

Sets the item's navigation layers bitmask.

fn (MeshLibrary) set_item_shapes #

fn (s &MeshLibrary) set_item_shapes(id i64, shapes Array)

Sets an item's collision shapes. The array should consist of [Shape3D] objects, each followed by a [Transform3D] that will be applied to it. For shapes that should not have a transform, use [constant Transform3D.IDENTITY].

fn (MeshLibrary) set_item_preview #

fn (s &MeshLibrary) set_item_preview(id i64, texture Texture2D)

Sets a texture to use as the item's preview icon in the editor.

fn (MeshLibrary) get_item_name #

fn (s &MeshLibrary) get_item_name(id i64) string

Returns the item's name.

fn (MeshLibrary) get_item_mesh #

fn (s &MeshLibrary) get_item_mesh(id i64) Mesh

Returns the item's mesh.

fn (MeshLibrary) get_item_mesh_transform #

fn (s &MeshLibrary) get_item_mesh_transform(id i64) Transform3D

Returns the transform applied to the item's mesh.

fn (MeshLibrary) get_item_mesh_cast_shadow #

fn (s &MeshLibrary) get_item_mesh_cast_shadow(id i64) RenderingServerShadowCastingSetting

Returns the item's shadow casting mode.

fn (MeshLibrary) get_item_navigation_mesh #

fn (s &MeshLibrary) get_item_navigation_mesh(id i64) NavigationMesh

Returns the item's navigation mesh.

fn (MeshLibrary) get_item_navigation_mesh_transform #

fn (s &MeshLibrary) get_item_navigation_mesh_transform(id i64) Transform3D

Returns the transform applied to the item's navigation mesh.

fn (MeshLibrary) get_item_navigation_layers #

fn (s &MeshLibrary) get_item_navigation_layers(id i64) i64

Returns the item's navigation layers bitmask.

fn (MeshLibrary) get_item_shapes #

fn (s &MeshLibrary) get_item_shapes(id i64) Array

Returns an item's collision shapes. The array consists of each [Shape3D] followed by its [Transform3D].

fn (MeshLibrary) get_item_preview #

fn (s &MeshLibrary) get_item_preview(id i64) Texture2D

When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project.

fn (MeshLibrary) remove_item #

fn (s &MeshLibrary) remove_item(id i64)

Removes the item.

fn (MeshLibrary) find_item_by_name #

fn (s &MeshLibrary) find_item_by_name(name string) i64

Returns the first item with the given name, or -1 if no item is found.

fn (MeshLibrary) clear #

fn (s &MeshLibrary) clear()

Clears the library.

fn (MeshLibrary) get_item_list #

fn (s &MeshLibrary) get_item_list() PackedInt32Array

Returns the list of item IDs in use.

fn (MeshLibrary) get_last_unused_item_id #

fn (s &MeshLibrary) get_last_unused_item_id() i64

Gets an unused ID for a new item.

struct MeshTexture #

struct MeshTexture {
	Texture2D
}

Simple texture that uses a mesh to draw itself.

fn (MeshTexture) to_variant #

fn (s &MeshTexture) to_variant() Variant

fn (MeshTexture) from_variant #

fn (mut s MeshTexture) from_variant(variant &Variant)

fn (MeshTexture) set_mesh #

fn (s &MeshTexture) set_mesh(mesh Mesh)

fn (MeshTexture) get_mesh #

fn (s &MeshTexture) get_mesh() Mesh

fn (MeshTexture) set_image_size #

fn (s &MeshTexture) set_image_size(size Vector2)

fn (MeshTexture) get_image_size #

fn (s &MeshTexture) get_image_size() Vector2

fn (MeshTexture) set_base_texture #

fn (s &MeshTexture) set_base_texture(texture Texture2D)

fn (MeshTexture) get_base_texture #

fn (s &MeshTexture) get_base_texture() Texture2D

struct Mesh_create_convex_shape_Cfg #

@[params]
struct Mesh_create_convex_shape_Cfg {
pub:
	clean    bool
	simplify bool
}

Optional parameters for Mesh#create_convex_shape

struct MethodTweener #

struct MethodTweener {
	Tweener
}

Interpolates an abstract value and supplies it to a method called over time.

fn (MethodTweener) to_variant #

fn (s &MethodTweener) to_variant() Variant

fn (MethodTweener) from_variant #

fn (mut s MethodTweener) from_variant(variant &Variant)

fn (MethodTweener) set_delay #

fn (s &MethodTweener) set_delay(delay f64) MethodTweener

Sets the time in seconds after which the [MethodTweener] will start interpolating. By default there's no delay.

fn (MethodTweener) set_trans #

fn (s &MethodTweener) set_trans(trans TweenTransitionType) MethodTweener

Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener.

fn (MethodTweener) set_ease #

fn (s &MethodTweener) set_ease(ease TweenEaseType) MethodTweener

Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener.

struct MissingNode #

struct MissingNode {
	Node
}

An internal editor class intended for keeping the data of unrecognized nodes.

fn (MissingNode) to_variant #

fn (s &MissingNode) to_variant() Variant

fn (MissingNode) from_variant #

fn (mut s MissingNode) from_variant(variant &Variant)

fn (MissingNode) set_original_class #

fn (s &MissingNode) set_original_class(name string)

fn (MissingNode) get_original_class #

fn (s &MissingNode) get_original_class() string

fn (MissingNode) set_original_scene #

fn (s &MissingNode) set_original_scene(name string)

fn (MissingNode) get_original_scene #

fn (s &MissingNode) get_original_scene() string

fn (MissingNode) set_recording_properties #

fn (s &MissingNode) set_recording_properties(enable bool)

fn (MissingNode) is_recording_properties #

fn (s &MissingNode) is_recording_properties() bool

struct MissingResource #

struct MissingResource {
	Resource
}

An internal editor class intended for keeping the data of unrecognized resources.

fn (MissingResource) to_variant #

fn (s &MissingResource) to_variant() Variant

fn (MissingResource) from_variant #

fn (mut s MissingResource) from_variant(variant &Variant)

fn (MissingResource) set_original_class #

fn (s &MissingResource) set_original_class(name string)

fn (MissingResource) get_original_class #

fn (s &MissingResource) get_original_class() string

fn (MissingResource) set_recording_properties #

fn (s &MissingResource) set_recording_properties(enable bool)

fn (MissingResource) is_recording_properties #

fn (s &MissingResource) is_recording_properties() bool

struct MobileVRInterface #

struct MobileVRInterface {
	XRInterface
}

Generic mobile VR implementation.

fn (MobileVRInterface) to_variant #

fn (s &MobileVRInterface) to_variant() Variant

fn (MobileVRInterface) from_variant #

fn (mut s MobileVRInterface) from_variant(variant &Variant)

fn (MobileVRInterface) set_eye_height #

fn (s &MobileVRInterface) set_eye_height(eye_height f64)

fn (MobileVRInterface) get_eye_height #

fn (s &MobileVRInterface) get_eye_height() f64

fn (MobileVRInterface) set_iod #

fn (s &MobileVRInterface) set_iod(iod f64)

fn (MobileVRInterface) get_iod #

fn (s &MobileVRInterface) get_iod() f64

fn (MobileVRInterface) set_display_width #

fn (s &MobileVRInterface) set_display_width(display_width f64)

fn (MobileVRInterface) get_display_width #

fn (s &MobileVRInterface) get_display_width() f64

fn (MobileVRInterface) set_display_to_lens #

fn (s &MobileVRInterface) set_display_to_lens(display_to_lens f64)

fn (MobileVRInterface) get_display_to_lens #

fn (s &MobileVRInterface) get_display_to_lens() f64

fn (MobileVRInterface) set_offset_rect #

fn (s &MobileVRInterface) set_offset_rect(offset_rect Rect2)

fn (MobileVRInterface) get_offset_rect #

fn (s &MobileVRInterface) get_offset_rect() Rect2

fn (MobileVRInterface) set_oversample #

fn (s &MobileVRInterface) set_oversample(oversample f64)

fn (MobileVRInterface) get_oversample #

fn (s &MobileVRInterface) get_oversample() f64

fn (MobileVRInterface) set_k1 #

fn (s &MobileVRInterface) set_k1(k f64)

fn (MobileVRInterface) get_k1 #

fn (s &MobileVRInterface) get_k1() f64

fn (MobileVRInterface) set_k2 #

fn (s &MobileVRInterface) set_k2(k f64)

fn (MobileVRInterface) get_k2 #

fn (s &MobileVRInterface) get_k2() f64

fn (MobileVRInterface) get_vrs_min_radius #

fn (s &MobileVRInterface) get_vrs_min_radius() f64

fn (MobileVRInterface) set_vrs_min_radius #

fn (s &MobileVRInterface) set_vrs_min_radius(radius f64)

fn (MobileVRInterface) get_vrs_strength #

fn (s &MobileVRInterface) get_vrs_strength() f64

fn (MobileVRInterface) set_vrs_strength #

fn (s &MobileVRInterface) set_vrs_strength(strength f64)

struct ModifierBoneTarget3D #

struct ModifierBoneTarget3D {
	SkeletonModifier3D
}

А node that dynamically copies the 3D transform of a bone in its parent [Skeleton3D].

fn (ModifierBoneTarget3D) to_variant #

fn (s &ModifierBoneTarget3D) to_variant() Variant

fn (ModifierBoneTarget3D) from_variant #

fn (mut s ModifierBoneTarget3D) from_variant(variant &Variant)

fn (ModifierBoneTarget3D) set_bone_name #

fn (s &ModifierBoneTarget3D) set_bone_name(bone_name string)

fn (ModifierBoneTarget3D) get_bone_name #

fn (s &ModifierBoneTarget3D) get_bone_name() string

fn (ModifierBoneTarget3D) set_bone #

fn (s &ModifierBoneTarget3D) set_bone(bone i64)

fn (ModifierBoneTarget3D) get_bone #

fn (s &ModifierBoneTarget3D) get_bone() i64

struct MovieWriter #

struct MovieWriter {
	Object
}

Abstract class for non-real-time video recording encoders.

fn (MovieWriter) to_variant #

fn (s &MovieWriter) to_variant() Variant

fn (MovieWriter) from_variant #

fn (mut s MovieWriter) from_variant(variant &Variant)

fn (MovieWriter) gd_get_audio_mix_rate #

fn (s &MovieWriter) gd_get_audio_mix_rate() i64

Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if [method _get_audio_mix_rate] is not overridden.

fn (MovieWriter) gd_get_audio_speaker_mode #

fn (s &MovieWriter) gd_get_audio_speaker_mode() AudioServerSpeakerMode

Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to [constant AudioServer.SPEAKER_MODE_STEREO] if [method _get_audio_speaker_mode] is not overridden.

fn (MovieWriter) gd_handles_file #

fn (s &MovieWriter) gd_handles_file(path string) bool

Called when the engine determines whether this [MovieWriter] is able to handle the file at [param path]. Must return true if this [MovieWriter] is able to handle the given file path, false otherwise. Typically, [method _handles_file] is overridden as follows to allow the user to record a file at any path with a given file extension:

func _handles_file(path):
####return path.get_extension().to_lower() == 'mkv'

fn (MovieWriter) gd_write_begin #

fn (s &MovieWriter) gd_write_begin(movie_size Vector2i, fps i64, base_path string) GDError

Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the --fixed-fps <fps> [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].

fn (MovieWriter) gd_write_frame #

fn (s &MovieWriter) gd_write_frame(frame_image Image, audio_frame_block voidptr) GDError

Called at the end of every rendered frame. The [param frame_image] and [param audio_frame_block] function arguments should be written to.

fn (MovieWriter) gd_write_end #

fn (s &MovieWriter) gd_write_end()

Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when [method SceneTree.quit] is called. [b]Note:[/b] Pressing [kbd]Ctrl + C[/kbd] on the terminal running the editor/project does [i]not[/i] result in [method _write_end] being called.

struct MultiMesh #

struct MultiMesh {
	Resource
}

Provides high-performance drawing of a mesh multiple times using GPU instancing.

fn (MultiMesh) to_variant #

fn (s &MultiMesh) to_variant() Variant

fn (MultiMesh) from_variant #

fn (mut s MultiMesh) from_variant(variant &Variant)

fn (MultiMesh) set_mesh #

fn (s &MultiMesh) set_mesh(mesh Mesh)

fn (MultiMesh) get_mesh #

fn (s &MultiMesh) get_mesh() Mesh

fn (MultiMesh) set_use_colors #

fn (s &MultiMesh) set_use_colors(enable bool)

fn (MultiMesh) is_using_colors #

fn (s &MultiMesh) is_using_colors() bool

fn (MultiMesh) set_use_custom_data #

fn (s &MultiMesh) set_use_custom_data(enable bool)

fn (MultiMesh) is_using_custom_data #

fn (s &MultiMesh) is_using_custom_data() bool

fn (MultiMesh) set_transform_format #

fn (s &MultiMesh) set_transform_format(format MultiMeshTransformFormat)

fn (MultiMesh) get_transform_format #

fn (s &MultiMesh) get_transform_format() MultiMeshTransformFormat

fn (MultiMesh) set_instance_count #

fn (s &MultiMesh) set_instance_count(count i64)

fn (MultiMesh) get_instance_count #

fn (s &MultiMesh) get_instance_count() i64

fn (MultiMesh) set_visible_instance_count #

fn (s &MultiMesh) set_visible_instance_count(count i64)

fn (MultiMesh) get_visible_instance_count #

fn (s &MultiMesh) get_visible_instance_count() i64

fn (MultiMesh) set_physics_interpolation_quality #

fn (s &MultiMesh) set_physics_interpolation_quality(quality MultiMeshPhysicsInterpolationQuality)

fn (MultiMesh) get_physics_interpolation_quality #

fn (s &MultiMesh) get_physics_interpolation_quality() MultiMeshPhysicsInterpolationQuality

fn (MultiMesh) set_instance_transform #

fn (s &MultiMesh) set_instance_transform(instance i64, transform Transform3D)

Sets the [Transform3D] for a specific instance.

fn (MultiMesh) set_instance_transform_2d #

fn (s &MultiMesh) set_instance_transform_2d(instance i64, transform Transform2D)

Sets the [Transform2D] for a specific instance.

fn (MultiMesh) get_instance_transform #

fn (s &MultiMesh) get_instance_transform(instance i64) Transform3D

Returns the [Transform3D] of a specific instance.

fn (MultiMesh) get_instance_transform_2d #

fn (s &MultiMesh) get_instance_transform_2d(instance i64) Transform2D

Returns the [Transform2D] of a specific instance.

fn (MultiMesh) set_instance_color #

fn (s &MultiMesh) set_instance_color(instance i64, color Color)

Sets the color of a specific instance by [i]multiplying[/i] the mesh's existing vertex colors. This allows for different color tinting per instance. [b]Note:[/b] Each component is stored in 32 bits in the Forward+ and Mobile rendering methods, but is packed into 16 bits in the Compatibility rendering method. For the color to take effect, ensure that [member use_colors] is true on the [MultiMesh] and [member BaseMaterial3D.vertex_color_use_as_albedo] is true on the material. If you intend to set an absolute color instead of tinting, make sure the material's albedo color is set to pure white (Color(1, 1, 1)).

fn (MultiMesh) get_instance_color #

fn (s &MultiMesh) get_instance_color(instance i64) Color

Gets a specific instance's color multiplier.

fn (MultiMesh) set_instance_custom_data #

fn (s &MultiMesh) set_instance_custom_data(instance i64, custom_data Color)

Sets custom data for a specific instance. [param custom_data] is a [Color] type only to contain 4 floating-point numbers. [b]Note:[/b] Each number is stored in 32 bits in the Forward+ and Mobile rendering methods, but is packed into 16 bits in the Compatibility rendering method. For the custom data to be used, ensure that [member use_custom_data] is true. This custom instance data has to be manually accessed in your custom shader using INSTANCE_CUSTOM.

fn (MultiMesh) get_instance_custom_data #

fn (s &MultiMesh) get_instance_custom_data(instance i64) Color

Returns the custom data that has been set for a specific instance.

fn (MultiMesh) reset_instance_physics_interpolation #

fn (s &MultiMesh) reset_instance_physics_interpolation(instance i64)

When using [i]physics interpolation[/i], this function allows you to prevent interpolation on an instance in the current physics tick. This allows you to move instances instantaneously, and should usually be used when initially placing an instance such as a bullet to prevent graphical glitches.

fn (MultiMesh) set_custom_aabb #

fn (s &MultiMesh) set_custom_aabb(aabb AABB)

fn (MultiMesh) get_custom_aabb #

fn (s &MultiMesh) get_custom_aabb() AABB

fn (MultiMesh) get_aabb #

fn (s &MultiMesh) get_aabb() AABB

Returns the visibility axis-aligned bounding box in local space.

fn (MultiMesh) get_buffer #

fn (s &MultiMesh) get_buffer() PackedFloat32Array

fn (MultiMesh) set_buffer #

fn (s &MultiMesh) set_buffer(buffer PackedFloat32Array)

fn (MultiMesh) set_buffer_interpolated #

fn (s &MultiMesh) set_buffer_interpolated(buffer_curr PackedFloat32Array, buffer_prev PackedFloat32Array)

An alternative to setting the [member buffer] property, which can be used with [i]physics interpolation[/i]. This method takes two arrays, and can set the data for the current and previous tick in one go. The renderer will automatically interpolate the data at each frame. This is useful for situations where the order of instances may change from physics tick to tick, such as particle systems. When the order of instances is coherent, the simpler alternative of setting [member buffer] can still be used with interpolation.

struct MultiMeshInstance2D #

struct MultiMeshInstance2D {
	Node2D
}

Node that instances a [MultiMesh] in 2D.

fn (MultiMeshInstance2D) to_variant #

fn (s &MultiMeshInstance2D) to_variant() Variant

fn (MultiMeshInstance2D) from_variant #

fn (mut s MultiMeshInstance2D) from_variant(variant &Variant)

fn (MultiMeshInstance2D) set_multimesh #

fn (s &MultiMeshInstance2D) set_multimesh(multimesh MultiMesh)

fn (MultiMeshInstance2D) get_multimesh #

fn (s &MultiMeshInstance2D) get_multimesh() MultiMesh

fn (MultiMeshInstance2D) set_texture #

fn (s &MultiMeshInstance2D) set_texture(texture Texture2D)

fn (MultiMeshInstance2D) get_texture #

fn (s &MultiMeshInstance2D) get_texture() Texture2D

struct MultiMeshInstance3D #

struct MultiMeshInstance3D {
	GeometryInstance3D
}

Node that instances a [MultiMesh].

fn (MultiMeshInstance3D) to_variant #

fn (s &MultiMeshInstance3D) to_variant() Variant

fn (MultiMeshInstance3D) from_variant #

fn (mut s MultiMeshInstance3D) from_variant(variant &Variant)

fn (MultiMeshInstance3D) set_multimesh #

fn (s &MultiMeshInstance3D) set_multimesh(multimesh MultiMesh)

fn (MultiMeshInstance3D) get_multimesh #

fn (s &MultiMeshInstance3D) get_multimesh() MultiMesh

struct MultiplayerAPI #

struct MultiplayerAPI {
	RefCounted
}

High-level multiplayer API interface.

fn (MultiplayerAPI) to_variant #

fn (s &MultiplayerAPI) to_variant() Variant

fn (MultiplayerAPI) from_variant #

fn (mut s MultiplayerAPI) from_variant(variant &Variant)

fn (MultiplayerAPI) has_multiplayer_peer #

fn (s &MultiplayerAPI) has_multiplayer_peer() bool

Returns true if there is a [member multiplayer_peer] set.

fn (MultiplayerAPI) get_multiplayer_peer #

fn (s &MultiplayerAPI) get_multiplayer_peer() MultiplayerPeer

fn (MultiplayerAPI) set_multiplayer_peer #

fn (s &MultiplayerAPI) set_multiplayer_peer(peer MultiplayerPeer)

fn (MultiplayerAPI) get_unique_id #

fn (s &MultiplayerAPI) get_unique_id() i64

Returns the unique peer ID of this MultiplayerAPI's [member multiplayer_peer].

fn (MultiplayerAPI) is_server #

fn (s &MultiplayerAPI) is_server() bool

Returns true if this MultiplayerAPI's [member multiplayer_peer] is valid and in server mode (listening for connections).

fn (MultiplayerAPI) get_remote_sender_id #

fn (s &MultiplayerAPI) get_remote_sender_id() i64

Returns the sender's peer ID for the RPC currently being executed. [b]Note:[/b] This method returns 0 when called outside of an RPC. As such, the original peer ID may be lost when code execution is delayed (such as with GDScript's await keyword).

fn (MultiplayerAPI) poll #

fn (s &MultiplayerAPI) poll() GDError

Method used for polling the MultiplayerAPI. You only need to worry about this if you set [member SceneTree.multiplayer_poll] to false. By default, [SceneTree] will poll its MultiplayerAPI(s) for you. [b]Note:[/b] This method results in RPCs being called, so they will be executed in the same context of this function (e.g. _process, physics, [Thread]).

fn (MultiplayerAPI) rpc #

fn (s &MultiplayerAPI) rpc(peer i64, object Object, method string, cfg MultiplayerAPI_rpc_Cfg) GDError

Sends an RPC to the target [param peer]. The given [param method] will be called on the remote [param object] with the provided [param arguments]. The RPC may also be called locally depending on the implementation and RPC configuration. See [method Node.rpc] and [method Node.rpc_config]. [b]Note:[/b] Prefer using [method Node.rpc], [method Node.rpc_id], or my_method.rpc(peer, arg1, arg2, ...) (in GDScript), since they are faster. This method is mostly useful in conjunction with [MultiplayerAPIExtension] when extending or replacing the multiplayer capabilities.

fn (MultiplayerAPI) object_configuration_add #

fn (s &MultiplayerAPI) object_configuration_add(object Object, configuration_ ToVariant) GDError

Notifies the MultiplayerAPI of a new [param configuration] for the given [param object]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing null and a valid [NodePath] as [param configuration]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it. [b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension].

fn (MultiplayerAPI) object_configuration_remove #

fn (s &MultiplayerAPI) object_configuration_remove(object Object, configuration_ ToVariant) GDError

Notifies the MultiplayerAPI to remove a [param configuration] for the given [param object]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing null and an empty [NodePath] as [param configuration]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it. [b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension].

fn (MultiplayerAPI) get_peers #

fn (s &MultiplayerAPI) get_peers() PackedInt32Array

Returns the peer IDs of all connected peers of this MultiplayerAPI's [member multiplayer_peer].

struct MultiplayerAPIExtension #

struct MultiplayerAPIExtension {
	MultiplayerAPI
}

Base class used for extending the [MultiplayerAPI].

fn (MultiplayerAPIExtension) to_variant #

fn (s &MultiplayerAPIExtension) to_variant() Variant

fn (MultiplayerAPIExtension) from_variant #

fn (mut s MultiplayerAPIExtension) from_variant(variant &Variant)

fn (MultiplayerAPIExtension) gd_poll #

fn (s &MultiplayerAPIExtension) gd_poll() GDError

Callback for [method MultiplayerAPI.poll].

fn (MultiplayerAPIExtension) gd_set_multiplayer_peer #

fn (s &MultiplayerAPIExtension) gd_set_multiplayer_peer(multiplayer_peer MultiplayerPeer)

Called when the [member MultiplayerAPI.multiplayer_peer] is set.

fn (MultiplayerAPIExtension) gd_get_multiplayer_peer #

fn (s &MultiplayerAPIExtension) gd_get_multiplayer_peer() MultiplayerPeer

Called when the [member MultiplayerAPI.multiplayer_peer] is retrieved.

fn (MultiplayerAPIExtension) gd_get_unique_id #

fn (s &MultiplayerAPIExtension) gd_get_unique_id() i64

Callback for [method MultiplayerAPI.get_unique_id].

fn (MultiplayerAPIExtension) gd_get_peer_ids #

fn (s &MultiplayerAPIExtension) gd_get_peer_ids() PackedInt32Array

Callback for [method MultiplayerAPI.get_peers].

fn (MultiplayerAPIExtension) gd_rpc #

fn (s &MultiplayerAPIExtension) gd_rpc(peer i64, object Object, method string, gd_args Array) GDError

Callback for [method MultiplayerAPI.rpc].

fn (MultiplayerAPIExtension) gd_get_remote_sender_id #

fn (s &MultiplayerAPIExtension) gd_get_remote_sender_id() i64

Callback for [method MultiplayerAPI.get_remote_sender_id].

fn (MultiplayerAPIExtension) gd_object_configuration_add #

fn (s &MultiplayerAPIExtension) gd_object_configuration_add(object Object, configuration_ ToVariant) GDError

Callback for [method MultiplayerAPI.object_configuration_add].

fn (MultiplayerAPIExtension) gd_object_configuration_remove #

fn (s &MultiplayerAPIExtension) gd_object_configuration_remove(object Object, configuration_ ToVariant) GDError

Callback for [method MultiplayerAPI.object_configuration_remove].

struct MultiplayerAPI_rpc_Cfg #

@[params]
struct MultiplayerAPI_rpc_Cfg {
pub:
	arguments Array = Array.new0()
}

Optional parameters for MultiplayerAPI#rpc

struct MultiplayerPeer #

struct MultiplayerPeer {
	PacketPeer
}

Abstract class for specialized [PacketPeer]s used by the [MultiplayerAPI].

fn (MultiplayerPeer) to_variant #

fn (s &MultiplayerPeer) to_variant() Variant

fn (MultiplayerPeer) from_variant #

fn (mut s MultiplayerPeer) from_variant(variant &Variant)

fn (MultiplayerPeer) set_transfer_channel #

fn (s &MultiplayerPeer) set_transfer_channel(channel i64)

fn (MultiplayerPeer) get_transfer_channel #

fn (s &MultiplayerPeer) get_transfer_channel() i64

fn (MultiplayerPeer) set_transfer_mode #

fn (s &MultiplayerPeer) set_transfer_mode(mode MultiplayerPeerTransferMode)

fn (MultiplayerPeer) get_transfer_mode #

fn (s &MultiplayerPeer) get_transfer_mode() MultiplayerPeerTransferMode

fn (MultiplayerPeer) set_target_peer #

fn (s &MultiplayerPeer) set_target_peer(id i64)

Sets the peer to which packets will be sent. The [param id] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST].

fn (MultiplayerPeer) get_packet_peer #

fn (s &MultiplayerPeer) get_packet_peer() i64

Returns the ID of the [MultiplayerPeer] who sent the next available packet. See [method PacketPeer.get_available_packet_count].

fn (MultiplayerPeer) get_packet_channel #

fn (s &MultiplayerPeer) get_packet_channel() i64

Returns the channel over which the next available packet was received. See [method PacketPeer.get_available_packet_count].

fn (MultiplayerPeer) get_packet_mode #

fn (s &MultiplayerPeer) get_packet_mode() MultiplayerPeerTransferMode

Returns the transfer mode the remote peer used to send the next available packet. See [method PacketPeer.get_available_packet_count].

fn (MultiplayerPeer) poll #

fn (s &MultiplayerPeer) poll()

Waits up to 1 second to receive a new network event.

fn (MultiplayerPeer) close #

fn (s &MultiplayerPeer) close()

Immediately close the multiplayer peer returning to the state [constant CONNECTION_DISCONNECTED]. Connected peers will be dropped without emitting [signal peer_disconnected].

fn (MultiplayerPeer) disconnect_peer #

fn (s &MultiplayerPeer) disconnect_peer(peer i64, cfg MultiplayerPeer_disconnect_peer_Cfg)

Disconnects the given [param peer] from this host. If [param force] is true the [signal peer_disconnected] signal will not be emitted for this peer.

fn (MultiplayerPeer) get_connection_status #

fn (s &MultiplayerPeer) get_connection_status() MultiplayerPeerConnectionStatus

Returns the current state of the connection.

fn (MultiplayerPeer) get_unique_id #

fn (s &MultiplayerPeer) get_unique_id() i64

Returns the ID of this [MultiplayerPeer].

fn (MultiplayerPeer) generate_unique_id #

fn (s &MultiplayerPeer) generate_unique_id() i64

Returns a randomly generated integer that can be used as a network unique ID.

fn (MultiplayerPeer) set_refuse_new_connections #

fn (s &MultiplayerPeer) set_refuse_new_connections(enable bool)

fn (MultiplayerPeer) is_refusing_new_connections #

fn (s &MultiplayerPeer) is_refusing_new_connections() bool

fn (MultiplayerPeer) is_server_relay_supported #

fn (s &MultiplayerPeer) is_server_relay_supported() bool

Returns true if the server can act as a relay in the current configuration. That is, if the higher level [MultiplayerAPI] should notify connected clients of other peers, and implement a relay protocol to allow communication between them.

struct MultiplayerPeerExtension #

struct MultiplayerPeerExtension {
	MultiplayerPeer
}

Class that can be inherited to implement custom multiplayer API networking layers via GDExtension.

fn (MultiplayerPeerExtension) to_variant #

fn (s &MultiplayerPeerExtension) to_variant() Variant

fn (MultiplayerPeerExtension) from_variant #

fn (mut s MultiplayerPeerExtension) from_variant(variant &Variant)

fn (MultiplayerPeerExtension) gd_get_packet #

fn (s &MultiplayerPeerExtension) gd_get_packet(r_buffer &&u8, r_buffer_size &i32) GDError

Called when a packet needs to be received by the [MultiplayerAPI], with [param r_buffer_size] being the size of the binary [param r_buffer] in bytes.

fn (MultiplayerPeerExtension) gd_put_packet #

fn (s &MultiplayerPeerExtension) gd_put_packet(p_buffer &u8, p_buffer_size i64) GDError

Called when a packet needs to be sent by the [MultiplayerAPI], with [param p_buffer_size] being the size of the binary [param p_buffer] in bytes.

fn (MultiplayerPeerExtension) gd_get_available_packet_count #

fn (s &MultiplayerPeerExtension) gd_get_available_packet_count() i64

Called when the available packet count is internally requested by the [MultiplayerAPI].

fn (MultiplayerPeerExtension) gd_get_max_packet_size #

fn (s &MultiplayerPeerExtension) gd_get_max_packet_size() i64

Called when the maximum allowed packet size (in bytes) is requested by the [MultiplayerAPI].

fn (MultiplayerPeerExtension) gd_get_packet_script #

fn (s &MultiplayerPeerExtension) gd_get_packet_script() PackedByteArray

Called when a packet needs to be received by the [MultiplayerAPI], if [method _get_packet] isn't implemented. Use this when extending this class via GDScript.

fn (MultiplayerPeerExtension) gd_put_packet_script #

fn (s &MultiplayerPeerExtension) gd_put_packet_script(p_buffer PackedByteArray) GDError

Called when a packet needs to be sent by the [MultiplayerAPI], if [method _put_packet] isn't implemented. Use this when extending this class via GDScript.

fn (MultiplayerPeerExtension) gd_get_packet_channel #

fn (s &MultiplayerPeerExtension) gd_get_packet_channel() i64

Called to get the channel over which the next available packet was received. See [method MultiplayerPeer.get_packet_channel].

fn (MultiplayerPeerExtension) gd_get_packet_mode #

fn (s &MultiplayerPeerExtension) gd_get_packet_mode() MultiplayerPeerTransferMode

Called to get the transfer mode the remote peer used to send the next available packet. See [method MultiplayerPeer.get_packet_mode].

fn (MultiplayerPeerExtension) gd_set_transfer_channel #

fn (s &MultiplayerPeerExtension) gd_set_transfer_channel(p_channel i64)

Called when the channel to use is set for this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_channel]).

fn (MultiplayerPeerExtension) gd_get_transfer_channel #

fn (s &MultiplayerPeerExtension) gd_get_transfer_channel() i64

Called when the transfer channel to use is read on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_channel]).

fn (MultiplayerPeerExtension) gd_set_transfer_mode #

fn (s &MultiplayerPeerExtension) gd_set_transfer_mode(p_mode MultiplayerPeerTransferMode)

Called when the transfer mode is set on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]).

fn (MultiplayerPeerExtension) gd_get_transfer_mode #

fn (s &MultiplayerPeerExtension) gd_get_transfer_mode() MultiplayerPeerTransferMode

Called when the transfer mode to use is read on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]).

fn (MultiplayerPeerExtension) gd_set_target_peer #

fn (s &MultiplayerPeerExtension) gd_set_target_peer(p_peer i64)

Called when the target peer to use is set for this [MultiplayerPeer] (see [method MultiplayerPeer.set_target_peer]).

fn (MultiplayerPeerExtension) gd_get_packet_peer #

fn (s &MultiplayerPeerExtension) gd_get_packet_peer() i64

Called when the ID of the [MultiplayerPeer] who sent the most recent packet is requested (see [method MultiplayerPeer.get_packet_peer]).

fn (MultiplayerPeerExtension) gd_is_server #

fn (s &MultiplayerPeerExtension) gd_is_server() bool

Called when the "is server" status is requested on the [MultiplayerAPI]. See [method MultiplayerAPI.is_server].

fn (MultiplayerPeerExtension) gd_poll #

fn (s &MultiplayerPeerExtension) gd_poll()

Called when the [MultiplayerAPI] is polled. See [method MultiplayerAPI.poll].

fn (MultiplayerPeerExtension) gd_close #

fn (s &MultiplayerPeerExtension) gd_close()

Called when the multiplayer peer should be immediately closed (see [method MultiplayerPeer.close]).

fn (MultiplayerPeerExtension) gd_disconnect_peer #

fn (s &MultiplayerPeerExtension) gd_disconnect_peer(p_peer i64, p_force bool)

Called when the connected [param p_peer] should be forcibly disconnected (see [method MultiplayerPeer.disconnect_peer]).

fn (MultiplayerPeerExtension) gd_get_unique_id #

fn (s &MultiplayerPeerExtension) gd_get_unique_id() i64

Called when the unique ID of this [MultiplayerPeer] is requested (see [method MultiplayerPeer.get_unique_id]). The value must be between 1 and 2147483647.

fn (MultiplayerPeerExtension) gd_set_refuse_new_connections #

fn (s &MultiplayerPeerExtension) gd_set_refuse_new_connections(p_enable bool)

Called when the "refuse new connections" status is set on this [MultiplayerPeer] (see [member MultiplayerPeer.refuse_new_connections]).

fn (MultiplayerPeerExtension) gd_is_refusing_new_connections #

fn (s &MultiplayerPeerExtension) gd_is_refusing_new_connections() bool

Called when the "refuse new connections" status is requested on this [MultiplayerPeer] (see [member MultiplayerPeer.refuse_new_connections]).

fn (MultiplayerPeerExtension) gd_is_server_relay_supported #

fn (s &MultiplayerPeerExtension) gd_is_server_relay_supported() bool

Called to check if the server can act as a relay in the current configuration. See [method MultiplayerPeer.is_server_relay_supported].

fn (MultiplayerPeerExtension) gd_get_connection_status #

fn (s &MultiplayerPeerExtension) gd_get_connection_status() MultiplayerPeerConnectionStatus

Called when the connection status is requested on the [MultiplayerPeer] (see [method MultiplayerPeer.get_connection_status]).

struct MultiplayerPeer_disconnect_peer_Cfg #

@[params]
struct MultiplayerPeer_disconnect_peer_Cfg {
pub:
	force bool
}

Optional parameters for MultiplayerPeer#disconnect_peer

struct MultiplayerSpawner #

struct MultiplayerSpawner {
	Node
}

Automatically replicates spawnable nodes from the authority to other multiplayer peers.

fn (MultiplayerSpawner) to_variant #

fn (s &MultiplayerSpawner) to_variant() Variant

fn (MultiplayerSpawner) from_variant #

fn (mut s MultiplayerSpawner) from_variant(variant &Variant)

fn (MultiplayerSpawner) add_spawnable_scene #

fn (s &MultiplayerSpawner) add_spawnable_scene(path string)

Adds a scene path to spawnable scenes, making it automatically replicated from the multiplayer authority to other peers when added as children of the node pointed by [member spawn_path].

fn (MultiplayerSpawner) get_spawnable_scene_count #

fn (s &MultiplayerSpawner) get_spawnable_scene_count() i64

Returns the count of spawnable scene paths.

fn (MultiplayerSpawner) get_spawnable_scene #

fn (s &MultiplayerSpawner) get_spawnable_scene(index i64) string

Returns the spawnable scene path by index.

fn (MultiplayerSpawner) clear_spawnable_scenes #

fn (s &MultiplayerSpawner) clear_spawnable_scenes()

Clears all spawnable scenes. Does not despawn existing instances on remote peers.

fn (MultiplayerSpawner) gd_spawn #

fn (s &MultiplayerSpawner) gd_spawn(cfg MultiplayerSpawner_gd_spawn_Cfg) Node

Requests a custom spawn, with [param data] passed to [member spawn_function] on all peers. Returns the locally spawned node instance already inside the scene tree, and added as a child of the node pointed by [member spawn_path]. [b]Note:[/b] Spawnable scenes are spawned automatically. [method spawn] is only needed for custom spawns.

fn (MultiplayerSpawner) get_spawn_path #

fn (s &MultiplayerSpawner) get_spawn_path() NodePath

fn (MultiplayerSpawner) set_spawn_path #

fn (s &MultiplayerSpawner) set_spawn_path(path NodePath)

fn (MultiplayerSpawner) get_spawn_limit #

fn (s &MultiplayerSpawner) get_spawn_limit() i64

fn (MultiplayerSpawner) set_spawn_limit #

fn (s &MultiplayerSpawner) set_spawn_limit(limit i64)

fn (MultiplayerSpawner) get_spawn_function #

fn (s &MultiplayerSpawner) get_spawn_function() Callable

fn (MultiplayerSpawner) set_spawn_function #

fn (s &MultiplayerSpawner) set_spawn_function(spawn_function Callable)

struct MultiplayerSpawner_gd_spawn_Cfg #

@[params]
struct MultiplayerSpawner_gd_spawn_Cfg {
pub:
	data ToVariant
}

Optional parameters for MultiplayerSpawner#gd_spawn

struct MultiplayerSynchronizer #

struct MultiplayerSynchronizer {
	Node
}

Synchronizes properties from the multiplayer authority to the remote peers.

fn (MultiplayerSynchronizer) to_variant #

fn (s &MultiplayerSynchronizer) to_variant() Variant

fn (MultiplayerSynchronizer) from_variant #

fn (mut s MultiplayerSynchronizer) from_variant(variant &Variant)

fn (MultiplayerSynchronizer) set_root_path #

fn (s &MultiplayerSynchronizer) set_root_path(path NodePath)

fn (MultiplayerSynchronizer) get_root_path #

fn (s &MultiplayerSynchronizer) get_root_path() NodePath

fn (MultiplayerSynchronizer) set_replication_interval #

fn (s &MultiplayerSynchronizer) set_replication_interval(milliseconds f64)

fn (MultiplayerSynchronizer) get_replication_interval #

fn (s &MultiplayerSynchronizer) get_replication_interval() f64

fn (MultiplayerSynchronizer) set_delta_interval #

fn (s &MultiplayerSynchronizer) set_delta_interval(milliseconds f64)

fn (MultiplayerSynchronizer) get_delta_interval #

fn (s &MultiplayerSynchronizer) get_delta_interval() f64

fn (MultiplayerSynchronizer) set_replication_config #

fn (s &MultiplayerSynchronizer) set_replication_config(config SceneReplicationConfig)

fn (MultiplayerSynchronizer) get_replication_config #

fn (s &MultiplayerSynchronizer) get_replication_config() SceneReplicationConfig

fn (MultiplayerSynchronizer) set_visibility_update_mode #

fn (s &MultiplayerSynchronizer) set_visibility_update_mode(mode MultiplayerSynchronizerVisibilityUpdateMode)

fn (MultiplayerSynchronizer) get_visibility_update_mode #

fn (s &MultiplayerSynchronizer) get_visibility_update_mode() MultiplayerSynchronizerVisibilityUpdateMode

fn (MultiplayerSynchronizer) update_visibility #

fn (s &MultiplayerSynchronizer) update_visibility(cfg MultiplayerSynchronizer_update_visibility_Cfg)

Updates the visibility of [param for_peer] according to visibility filters. If [param for_peer] is 0 (the default), all peers' visibilties are updated.

fn (MultiplayerSynchronizer) set_visibility_public #

fn (s &MultiplayerSynchronizer) set_visibility_public(visible bool)

fn (MultiplayerSynchronizer) is_visibility_public #

fn (s &MultiplayerSynchronizer) is_visibility_public() bool

fn (MultiplayerSynchronizer) add_visibility_filter #

fn (s &MultiplayerSynchronizer) add_visibility_filter(filter Callable)

Adds a peer visibility filter for this synchronizer. [param filter] should take a peer ID [int] and return a [bool].

fn (MultiplayerSynchronizer) remove_visibility_filter #

fn (s &MultiplayerSynchronizer) remove_visibility_filter(filter Callable)

Removes a peer visibility filter from this synchronizer.

fn (MultiplayerSynchronizer) set_visibility_for #

fn (s &MultiplayerSynchronizer) set_visibility_for(peer i64, visible bool)

Sets the visibility of [param peer] to [param visible]. If [param peer] is 0, the value of [member public_visibility] will be updated instead.

fn (MultiplayerSynchronizer) get_visibility_for #

fn (s &MultiplayerSynchronizer) get_visibility_for(peer i64) bool

Queries the current visibility for peer [param peer].

struct MultiplayerSynchronizer_update_visibility_Cfg #

@[params]
struct MultiplayerSynchronizer_update_visibility_Cfg {
pub:
	for_peer i64
}

Optional parameters for MultiplayerSynchronizer#update_visibility

struct Mutex #

struct Mutex {
	RefCounted
}

A binary [Semaphore] for synchronization of multiple [Thread]s.

fn (Mutex) to_variant #

fn (s &Mutex) to_variant() Variant

fn (Mutex) from_variant #

fn (mut s Mutex) from_variant(variant &Variant)

fn (Mutex) gd_lock #

fn (s &Mutex) gd_lock()

Locks this [Mutex], blocks until it is unlocked by the current owner. [b]Note:[/b] This function returns without blocking if the thread already has ownership of the mutex.

fn (Mutex) try_lock #

fn (s &Mutex) try_lock() bool

Tries locking this [Mutex], but does not block. Returns true on success, false otherwise. [b]Note:[/b] This function returns true if the thread already has ownership of the mutex.

fn (Mutex) unlock #

fn (s &Mutex) unlock()

Unlocks this [Mutex], leaving it to other threads. [b]Note:[/b] If a thread called [method lock] or [method try_lock] multiple times while already having ownership of the mutex, it must also call [method unlock] the same number of times in order to unlock it correctly. [b]Warning:[/b] Calling [method unlock] more times that [method lock] on a given thread, thus ending up trying to unlock a non-locked mutex, is wrong and may causes crashes or deadlocks.

struct NativeMenu #

struct NativeMenu {
	Object
}

A server interface for OS native menus.

fn (NativeMenu) to_variant #

fn (s &NativeMenu) to_variant() Variant

fn (NativeMenu) from_variant #

fn (mut s NativeMenu) from_variant(variant &Variant)

fn (NativeMenu) has_feature #

fn (s &NativeMenu) has_feature(feature NativeMenuFeature) bool

Returns true if the specified [param feature] is supported by the current [NativeMenu], false otherwise. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) has_system_menu #

fn (s &NativeMenu) has_system_menu(menu_id NativeMenuSystemMenus) bool

Returns true if a special system menu is supported. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) get_system_menu #

fn (s &NativeMenu) get_system_menu(menu_id NativeMenuSystemMenus) RID

Returns RID of a special system menu. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) get_system_menu_name #

fn (s &NativeMenu) get_system_menu_name(menu_id NativeMenuSystemMenus) string

Returns readable name of a special system menu. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) create_menu #

fn (s &NativeMenu) create_menu() RID

Creates a new global menu object. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) has_menu #

fn (s &NativeMenu) has_menu(rid RID) bool

Returns true if [param rid] is valid global menu. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) free_menu #

fn (s &NativeMenu) free_menu(rid RID)

Frees a global menu object created by this [NativeMenu]. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_size #

fn (s &NativeMenu) get_size(rid RID) Vector2

Returns global menu size. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) popup #

fn (s &NativeMenu) popup(rid RID, position Vector2i)

Shows the global menu at [param position] in the screen coordinates. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_interface_direction #

fn (s &NativeMenu) set_interface_direction(rid RID, is_rtl bool)

Sets the menu text layout direction from right-to-left if [param is_rtl] is true. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_popup_open_callback #

fn (s &NativeMenu) set_popup_open_callback(rid RID, callback Callable)

Registers callable to emit after the menu is closed. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) get_popup_open_callback #

fn (s &NativeMenu) get_popup_open_callback(rid RID) Callable

Returns global menu open callback. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) set_popup_close_callback #

fn (s &NativeMenu) set_popup_close_callback(rid RID, callback Callable)

Registers callable to emit when the menu is about to show. [b]Note:[/b] The OS can simulate menu opening to track menu item changes and global shortcuts, in which case the corresponding close callback is not triggered. Use [method is_opened] to check if the menu is currently opened. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_popup_close_callback #

fn (s &NativeMenu) get_popup_close_callback(rid RID) Callable

Returns global menu close callback. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_minimum_width #

fn (s &NativeMenu) set_minimum_width(rid RID, width f64)

Sets the minimum width of the global menu. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) get_minimum_width #

fn (s &NativeMenu) get_minimum_width(rid RID) f64

Returns global menu minimum width. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) is_opened #

fn (s &NativeMenu) is_opened(rid RID) bool

Returns true if the menu is currently opened. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) add_submenu_item #

fn (s &NativeMenu) add_submenu_item(rid RID, label string, submenu_rid RID, cfg NativeMenu_add_submenu_item_Cfg) i64

Adds an item that will act as a submenu of the global menu [param rid]. The [param submenu_rid] argument is the RID of the global menu that will be shown when the item is clicked. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) add_item #

fn (s &NativeMenu) add_item(rid RID, label string, cfg NativeMenu_add_item_Cfg) i64

Adds a new item with text [param label] to the global menu [param rid]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented on macOS and Windows. [b]Note:[/b] On Windows, [param accelerator] and [param key_callback] are ignored.

fn (NativeMenu) add_check_item #

fn (s &NativeMenu) add_check_item(rid RID, label string, cfg NativeMenu_add_check_item_Cfg) i64

Adds a new checkable item with text [param label] to the global menu [param rid]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented on macOS and Windows. [b]Note:[/b] On Windows, [param accelerator] and [param key_callback] are ignored.

fn (NativeMenu) add_icon_item #

fn (s &NativeMenu) add_icon_item(rid RID, icon Texture2D, label string, cfg NativeMenu_add_icon_item_Cfg) i64

Adds a new item with text [param label] and icon [param icon] to the global menu [param rid]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented on macOS and Windows. [b]Note:[/b] On Windows, [param accelerator] and [param key_callback] are ignored.

fn (NativeMenu) add_icon_check_item #

fn (s &NativeMenu) add_icon_check_item(rid RID, icon Texture2D, label string, cfg NativeMenu_add_icon_check_item_Cfg) i64

Adds a new checkable item with text [param label] and icon [param icon] to the global menu [param rid]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented on macOS and Windows. [b]Note:[/b] On Windows, [param accelerator] and [param key_callback] are ignored.

fn (NativeMenu) add_radio_check_item #

fn (s &NativeMenu) add_radio_check_item(rid RID, label string, cfg NativeMenu_add_radio_check_item_Cfg) i64

Adds a new radio-checkable item with text [param label] to the global menu [param rid]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented on macOS and Windows. [b]Note:[/b] On Windows, [param accelerator] and [param key_callback] are ignored.

fn (NativeMenu) add_icon_radio_check_item #

fn (s &NativeMenu) add_icon_radio_check_item(rid RID, icon Texture2D, label string, cfg NativeMenu_add_icon_radio_check_item_Cfg) i64

Adds a new radio-checkable item with text [param label] and icon [param icon] to the global menu [param rid]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented on macOS and Windows. [b]Note:[/b] On Windows, [param accelerator] and [param key_callback] are ignored.

fn (NativeMenu) add_multistate_item #

fn (s &NativeMenu) add_multistate_item(rid RID, label string, max_states i64, default_state i64, cfg NativeMenu_add_multistate_item_Cfg) i64

Adds a new item with text [param label] to the global menu [param rid]. Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state]. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] By default, there's no indication of the current item state, it should be changed manually. [b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. [b]Note:[/b] This method is implemented on macOS and Windows. [b]Note:[/b] On Windows, [param accelerator] and [param key_callback] are ignored.

fn (NativeMenu) add_separator #

fn (s &NativeMenu) add_separator(rid RID, cfg NativeMenu_add_separator_Cfg) i64

Adds a separator between items to the global menu [param rid]. Separators also occupy an index. Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) find_item_index_with_text #

fn (s &NativeMenu) find_item_index_with_text(rid RID, text string) i64

Returns the index of the item with the specified [param text]. Indices are automatically assigned to each item by the engine, and cannot be set manually. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) find_item_index_with_tag #

fn (s &NativeMenu) find_item_index_with_tag(rid RID, tag_ ToVariant) i64

Returns the index of the item with the specified [param tag]. Indices are automatically assigned to each item by the engine, and cannot be set manually. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) find_item_index_with_submenu #

fn (s &NativeMenu) find_item_index_with_submenu(rid RID, submenu_rid RID) i64

Returns the index of the item with the submenu specified by [param submenu_rid]. Indices are automatically assigned to each item by the engine, and cannot be set manually. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) is_item_checked #

fn (s &NativeMenu) is_item_checked(rid RID, idx i64) bool

Returns true if the item at index [param idx] is checked. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) is_item_checkable #

fn (s &NativeMenu) is_item_checkable(rid RID, idx i64) bool

Returns true if the item at index [param idx] is checkable in some way, i.e. if it has a checkbox or radio button. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) is_item_radio_checkable #

fn (s &NativeMenu) is_item_radio_checkable(rid RID, idx i64) bool

Returns true if the item at index [param idx] has radio button-style checkability. [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_item_callback #

fn (s &NativeMenu) get_item_callback(rid RID, idx i64) Callable

Returns the callback of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_item_key_callback #

fn (s &NativeMenu) get_item_key_callback(rid RID, idx i64) Callable

Returns the callback of the item accelerator at index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) get_item_tag #

fn (s &NativeMenu) get_item_tag(rid RID, idx i64) Variant

Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_tag], which provides a simple way of assigning context data to items. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_item_text #

fn (s &NativeMenu) get_item_text(rid RID, idx i64) string

Returns the text of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_item_submenu #

fn (s &NativeMenu) get_item_submenu(rid RID, idx i64) RID

Returns the submenu ID of the item at index [param idx]. See [method add_submenu_item] for more info on how to add a submenu. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_item_accelerator #

fn (s &NativeMenu) get_item_accelerator(rid RID, idx i64) Key

Returns the accelerator of the item at index [param idx]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) is_item_disabled #

fn (s &NativeMenu) is_item_disabled(rid RID, idx i64) bool

Returns true if the item at index [param idx] is disabled. When it is disabled it can't be selected, or its action invoked. See [method set_item_disabled] for more info on how to disable an item. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) is_item_hidden #

fn (s &NativeMenu) is_item_hidden(rid RID, idx i64) bool

Returns true if the item at index [param idx] is hidden. See [method set_item_hidden] for more info on how to hide an item. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) get_item_tooltip #

fn (s &NativeMenu) get_item_tooltip(rid RID, idx i64) string

Returns the tooltip associated with the specified index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) get_item_state #

fn (s &NativeMenu) get_item_state(rid RID, idx i64) i64

Returns the state of a multistate item. See [method add_multistate_item] for details. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_item_max_states #

fn (s &NativeMenu) get_item_max_states(rid RID, idx i64) i64

Returns number of states of a multistate item. See [method add_multistate_item] for details. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_item_icon #

fn (s &NativeMenu) get_item_icon(rid RID, idx i64) Texture2D

Returns the icon of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) get_item_indentation_level #

fn (s &NativeMenu) get_item_indentation_level(rid RID, idx i64) i64

Returns the horizontal offset of the item at the given [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) set_item_checked #

fn (s &NativeMenu) set_item_checked(rid RID, idx i64, checked bool)

Sets the checkstate status of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_checkable #

fn (s &NativeMenu) set_item_checkable(rid RID, idx i64, checkable bool)

Sets whether the item at index [param idx] has a checkbox. If false, sets the type of the item to plain text. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_radio_checkable #

fn (s &NativeMenu) set_item_radio_checkable(rid RID, idx i64, checkable bool)

Sets the type of the item at the specified index [param idx] to radio button. If false, sets the type of the item to plain text. [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_callback #

fn (s &NativeMenu) set_item_callback(rid RID, idx i64, callback Callable)

Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed. [b]Note:[/b] The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_hover_callbacks #

fn (s &NativeMenu) set_item_hover_callbacks(rid RID, idx i64, callback Callable)

Sets the callback of the item at index [param idx]. The callback is emitted when an item is hovered. [b]Note:[/b] The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) set_item_key_callback #

fn (s &NativeMenu) set_item_key_callback(rid RID, idx i64, key_callback Callable)

Sets the callback of the item at index [param idx]. Callback is emitted when its accelerator is activated. [b]Note:[/b] The [param key_callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) set_item_tag #

fn (s &NativeMenu) set_item_tag(rid RID, idx i64, tag_ ToVariant)

Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_tag], which provides a simple way of assigning context data to items. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_text #

fn (s &NativeMenu) set_item_text(rid RID, idx i64, text string)

Sets the text of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_submenu #

fn (s &NativeMenu) set_item_submenu(rid RID, idx i64, submenu_rid RID)

Sets the submenu RID of the item at index [param idx]. The submenu is a global menu that would be shown when the item is clicked. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_accelerator #

fn (s &NativeMenu) set_item_accelerator(rid RID, idx i64, keycode Key)

Sets the accelerator of the item at index [param idx]. [param keycode] can be a single [enum Key], or a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) set_item_disabled #

fn (s &NativeMenu) set_item_disabled(rid RID, idx i64, disabled bool)

Enables/disables the item at index [param idx]. When it is disabled, it can't be selected and its action can't be invoked. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_hidden #

fn (s &NativeMenu) set_item_hidden(rid RID, idx i64, hidden bool)

Hides/shows the item at index [param idx]. When it is hidden, an item does not appear in a menu and its action cannot be invoked. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) set_item_tooltip #

fn (s &NativeMenu) set_item_tooltip(rid RID, idx i64, tooltip string)

Sets the [String] tooltip of the item at the specified index [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) set_item_state #

fn (s &NativeMenu) set_item_state(rid RID, idx i64, state i64)

Sets the state of a multistate item. See [method add_multistate_item] for details. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_max_states #

fn (s &NativeMenu) set_item_max_states(rid RID, idx i64, max_states i64)

Sets number of state of a multistate item. See [method add_multistate_item] for details. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) set_item_icon #

fn (s &NativeMenu) set_item_icon(rid RID, idx i64, icon Texture2D)

Replaces the [Texture2D] icon of the specified [param idx]. [b]Note:[/b] This method is implemented on macOS and Windows. [b]Note:[/b] This method is not supported by macOS Dock menu items.

fn (NativeMenu) set_item_indentation_level #

fn (s &NativeMenu) set_item_indentation_level(rid RID, idx i64, level i64)

Sets the horizontal offset of the item at the given [param idx]. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) get_item_count #

fn (s &NativeMenu) get_item_count(rid RID) i64

Returns number of items in the global menu [param rid]. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) is_system_menu #

fn (s &NativeMenu) is_system_menu(rid RID) bool

Return true is global menu is a special system menu. [b]Note:[/b] This method is implemented only on macOS.

fn (NativeMenu) remove_item #

fn (s &NativeMenu) remove_item(rid RID, idx i64)

Removes the item at index [param idx] from the global menu [param rid]. [b]Note:[/b] The indices of items after the removed item will be shifted by one. [b]Note:[/b] This method is implemented on macOS and Windows.

fn (NativeMenu) clear #

fn (s &NativeMenu) clear(rid RID)

Removes all items from the global menu [param rid]. [b]Note:[/b] This method is implemented on macOS and Windows.

struct NativeMenu_add_check_item_Cfg #

@[params]
struct NativeMenu_add_check_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for NativeMenu#add_check_item

struct NativeMenu_add_icon_check_item_Cfg #

@[params]
struct NativeMenu_add_icon_check_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for NativeMenu#add_icon_check_item

struct NativeMenu_add_icon_item_Cfg #

@[params]
struct NativeMenu_add_icon_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for NativeMenu#add_icon_item

struct NativeMenu_add_icon_radio_check_item_Cfg #

@[params]
struct NativeMenu_add_icon_radio_check_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for NativeMenu#add_icon_radio_check_item

struct NativeMenu_add_item_Cfg #

@[params]
struct NativeMenu_add_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for NativeMenu#add_item

struct NativeMenu_add_multistate_item_Cfg #

@[params]
struct NativeMenu_add_multistate_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for NativeMenu#add_multistate_item

struct NativeMenu_add_radio_check_item_Cfg #

@[params]
struct NativeMenu_add_radio_check_item_Cfg {
pub:
	callback     Callable = Callable{}
	key_callback Callable = Callable{}
	tag          ToVariant
	accelerator  Key = unsafe { Key(0) }
	index        i64 = -1
}

Optional parameters for NativeMenu#add_radio_check_item

struct NativeMenu_add_separator_Cfg #

@[params]
struct NativeMenu_add_separator_Cfg {
pub:
	index i64 = -1
}

Optional parameters for NativeMenu#add_separator

struct NativeMenu_add_submenu_item_Cfg #

@[params]
struct NativeMenu_add_submenu_item_Cfg {
pub:
	tag   ToVariant
	index i64 = -1
}

Optional parameters for NativeMenu#add_submenu_item

struct Nil #

@[packed]
struct Nil {
}

fn (Nil) to_variant #

fn (s &Nil) to_variant() Variant

fn (Nil) from_variant #

fn (mut s Nil) from_variant(variant &Variant)

fn (Nil) eq_bool #

fn (a Nil) eq_bool(b bool) bool

fn (Nil) ne_bool #

fn (a Nil) ne_bool(b bool) bool

fn (Nil) eq_i64 #

fn (a Nil) eq_i64(b i64) bool

fn (Nil) ne_i64 #

fn (a Nil) ne_i64(b i64) bool

fn (Nil) eq_f64 #

fn (a Nil) eq_f64(b f64) bool

fn (Nil) ne_f64 #

fn (a Nil) ne_f64(b f64) bool

fn (Nil) eq_string #

fn (a Nil) eq_string(b String) bool

fn (Nil) ne_string #

fn (a Nil) ne_string(b String) bool

fn (Nil) eq_vector2 #

fn (a Nil) eq_vector2(b Vector2) bool

fn (Nil) ne_vector2 #

fn (a Nil) ne_vector2(b Vector2) bool

fn (Nil) eq_vector2i #

fn (a Nil) eq_vector2i(b Vector2i) bool

fn (Nil) ne_vector2i #

fn (a Nil) ne_vector2i(b Vector2i) bool

fn (Nil) eq_rect2 #

fn (a Nil) eq_rect2(b Rect2) bool

fn (Nil) ne_rect2 #

fn (a Nil) ne_rect2(b Rect2) bool

fn (Nil) eq_rect2i #

fn (a Nil) eq_rect2i(b Rect2i) bool

fn (Nil) ne_rect2i #

fn (a Nil) ne_rect2i(b Rect2i) bool

fn (Nil) eq_vector3 #

fn (a Nil) eq_vector3(b Vector3) bool

fn (Nil) ne_vector3 #

fn (a Nil) ne_vector3(b Vector3) bool

fn (Nil) eq_vector3i #

fn (a Nil) eq_vector3i(b Vector3i) bool

fn (Nil) ne_vector3i #

fn (a Nil) ne_vector3i(b Vector3i) bool

fn (Nil) eq_transform2d #

fn (a Nil) eq_transform2d(b Transform2D) bool

fn (Nil) ne_transform2d #

fn (a Nil) ne_transform2d(b Transform2D) bool

fn (Nil) eq_vector4 #

fn (a Nil) eq_vector4(b Vector4) bool

fn (Nil) ne_vector4 #

fn (a Nil) ne_vector4(b Vector4) bool

fn (Nil) eq_vector4i #

fn (a Nil) eq_vector4i(b Vector4i) bool

fn (Nil) ne_vector4i #

fn (a Nil) ne_vector4i(b Vector4i) bool

fn (Nil) eq_plane #

fn (a Nil) eq_plane(b Plane) bool

fn (Nil) ne_plane #

fn (a Nil) ne_plane(b Plane) bool

fn (Nil) eq_quaternion #

fn (a Nil) eq_quaternion(b Quaternion) bool

fn (Nil) ne_quaternion #

fn (a Nil) ne_quaternion(b Quaternion) bool

fn (Nil) eq_aabb #

fn (a Nil) eq_aabb(b AABB) bool

fn (Nil) ne_aabb #

fn (a Nil) ne_aabb(b AABB) bool

fn (Nil) eq_basis #

fn (a Nil) eq_basis(b Basis) bool

fn (Nil) ne_basis #

fn (a Nil) ne_basis(b Basis) bool

fn (Nil) eq_transform3d #

fn (a Nil) eq_transform3d(b Transform3D) bool

fn (Nil) ne_transform3d #

fn (a Nil) ne_transform3d(b Transform3D) bool

fn (Nil) eq_projection #

fn (a Nil) eq_projection(b Projection) bool

fn (Nil) ne_projection #

fn (a Nil) ne_projection(b Projection) bool

fn (Nil) eq_color #

fn (a Nil) eq_color(b Color) bool

fn (Nil) ne_color #

fn (a Nil) ne_color(b Color) bool

fn (Nil) eq_stringname #

fn (a Nil) eq_stringname(b StringName) bool

fn (Nil) ne_stringname #

fn (a Nil) ne_stringname(b StringName) bool

fn (Nil) eq_nodepath #

fn (a Nil) eq_nodepath(b NodePath) bool

fn (Nil) ne_nodepath #

fn (a Nil) ne_nodepath(b NodePath) bool

fn (Nil) eq_rid #

fn (a Nil) eq_rid(b RID) bool

fn (Nil) ne_rid #

fn (a Nil) ne_rid(b RID) bool

fn (Nil) eq_object #

fn (a Nil) eq_object(b Object) bool

fn (Nil) ne_object #

fn (a Nil) ne_object(b Object) bool

fn (Nil) eq_callable #

fn (a Nil) eq_callable(b Callable) bool

fn (Nil) ne_callable #

fn (a Nil) ne_callable(b Callable) bool

fn (Nil) eq_signal #

fn (a Nil) eq_signal(b Signal) bool

fn (Nil) ne_signal #

fn (a Nil) ne_signal(b Signal) bool

fn (Nil) eq_dictionary #

fn (a Nil) eq_dictionary(b Dictionary) bool

fn (Nil) ne_dictionary #

fn (a Nil) ne_dictionary(b Dictionary) bool

fn (Nil) in_dictionary #

fn (a Nil) in_dictionary(b Dictionary) bool

fn (Nil) eq_array #

fn (a Nil) eq_array(b Array) bool

fn (Nil) ne_array #

fn (a Nil) ne_array(b Array) bool

fn (Nil) in_array #

fn (a Nil) in_array(b Array) bool

fn (Nil) eq_packedbytearray #

fn (a Nil) eq_packedbytearray(b PackedByteArray) bool

fn (Nil) ne_packedbytearray #

fn (a Nil) ne_packedbytearray(b PackedByteArray) bool

fn (Nil) eq_packedint32array #

fn (a Nil) eq_packedint32array(b PackedInt32Array) bool

fn (Nil) ne_packedint32array #

fn (a Nil) ne_packedint32array(b PackedInt32Array) bool

fn (Nil) eq_packedint64array #

fn (a Nil) eq_packedint64array(b PackedInt64Array) bool

fn (Nil) ne_packedint64array #

fn (a Nil) ne_packedint64array(b PackedInt64Array) bool

fn (Nil) eq_packedfloat32array #

fn (a Nil) eq_packedfloat32array(b PackedFloat32Array) bool

fn (Nil) ne_packedfloat32array #

fn (a Nil) ne_packedfloat32array(b PackedFloat32Array) bool

fn (Nil) eq_packedfloat64array #

fn (a Nil) eq_packedfloat64array(b PackedFloat64Array) bool

fn (Nil) ne_packedfloat64array #

fn (a Nil) ne_packedfloat64array(b PackedFloat64Array) bool

fn (Nil) eq_packedstringarray #

fn (a Nil) eq_packedstringarray(b PackedStringArray) bool

fn (Nil) ne_packedstringarray #

fn (a Nil) ne_packedstringarray(b PackedStringArray) bool

fn (Nil) eq_packedvector2array #

fn (a Nil) eq_packedvector2array(b PackedVector2Array) bool

fn (Nil) ne_packedvector2array #

fn (a Nil) ne_packedvector2array(b PackedVector2Array) bool

fn (Nil) eq_packedvector3array #

fn (a Nil) eq_packedvector3array(b PackedVector3Array) bool

fn (Nil) ne_packedvector3array #

fn (a Nil) ne_packedvector3array(b PackedVector3Array) bool

fn (Nil) eq_packedcolorarray #

fn (a Nil) eq_packedcolorarray(b PackedColorArray) bool

fn (Nil) ne_packedcolorarray #

fn (a Nil) ne_packedcolorarray(b PackedColorArray) bool

fn (Nil) eq_packedvector4array #

fn (a Nil) eq_packedvector4array(b PackedVector4Array) bool

fn (Nil) ne_packedvector4array #

fn (a Nil) ne_packedvector4array(b PackedVector4Array) bool

struct NinePatchRect #

struct NinePatchRect {
	Control
}

A control that displays a texture by keeping its corners intact, but tiling its edges and center.

fn (NinePatchRect) to_variant #

fn (s &NinePatchRect) to_variant() Variant

fn (NinePatchRect) from_variant #

fn (mut s NinePatchRect) from_variant(variant &Variant)

fn (NinePatchRect) set_texture #

fn (s &NinePatchRect) set_texture(texture Texture2D)

fn (NinePatchRect) get_texture #

fn (s &NinePatchRect) get_texture() Texture2D

fn (NinePatchRect) set_patch_margin #

fn (s &NinePatchRect) set_patch_margin(margin Side, value i64)

Sets the size of the margin on the specified [enum Side] to [param value] pixels.

fn (NinePatchRect) get_patch_margin #

fn (s &NinePatchRect) get_patch_margin(margin Side) i64

Returns the size of the margin on the specified [enum Side].

fn (NinePatchRect) set_region_rect #

fn (s &NinePatchRect) set_region_rect(rect Rect2)

fn (NinePatchRect) get_region_rect #

fn (s &NinePatchRect) get_region_rect() Rect2

fn (NinePatchRect) set_draw_center #

fn (s &NinePatchRect) set_draw_center(draw_center bool)

fn (NinePatchRect) is_draw_center_enabled #

fn (s &NinePatchRect) is_draw_center_enabled() bool

fn (NinePatchRect) set_h_axis_stretch_mode #

fn (s &NinePatchRect) set_h_axis_stretch_mode(mode NinePatchRectAxisStretchMode)

fn (NinePatchRect) get_h_axis_stretch_mode #

fn (s &NinePatchRect) get_h_axis_stretch_mode() NinePatchRectAxisStretchMode

fn (NinePatchRect) set_v_axis_stretch_mode #

fn (s &NinePatchRect) set_v_axis_stretch_mode(mode NinePatchRectAxisStretchMode)

fn (NinePatchRect) get_v_axis_stretch_mode #

fn (s &NinePatchRect) get_v_axis_stretch_mode() NinePatchRectAxisStretchMode

struct Node #

struct Node {
	Object
}

Base class for all scene objects.

fn (Node) add_child #

fn (s &Node) add_child(node Node, cfg Node_add_child_Cfg)

Adds a child [param 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. If [param force_readable_name] is true, improves the readability of the added [param node]. If not named, the [param node] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to false, which assigns a dummy name featuring @ in both situations. If [param internal] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. These nodes are ignored by methods like [method get_children], unless their parameter include_internal is true. It also prevents these nodes being duplicated with their parent. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. [b]Note:[/b] If [param node] already has a parent, this method will fail. Use [method remove_child] first to remove [param node] from its current parent. For example: [codeblocks] [gdscript] var child_node = get_child(0) if child_node.get_parent(): child_node.get_parent().remove_child(child_node) add_child(child_node) [/gdscript] [csharp] Node childNode = GetChild(0); if (childNode.GetParent() != null) { childNode.GetParent().RemoveChild(childNode); } AddChild(childNode); [/csharp] [/codeblocks] If you need the child node to be added below a specific node in the list of children, use [method add_sibling] instead of this method. [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view.

fn (Node) add_sibling #

fn (s &Node) add_sibling(sibling Node, cfg Node_add_sibling_Cfg)

Adds a [param sibling] node to this node's parent, and moves the added sibling right below this node. If [param force_readable_name] is true, improves the readability of the added [param sibling]. If not named, the [param sibling] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to false, which assigns a dummy name featuring @ in both situations. Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children. [b]Note:[/b] If this node is internal, the added sibling will be internal too (see [method add_child]'s internal parameter).

fn (Node) add_to_group #

fn (s &Node) add_to_group(group string, cfg Node_add_to_group_Cfg)

Adds the node to the [param group]. Groups can be helpful to organize a subset of nodes, for example "enemies" or "collectables". See notes in the description, and the group methods in [SceneTree]. If [param persistent] is true, the group will be stored when saved inside a [PackedScene]. All groups created and displayed in the Node dock are persistent. [b]Note:[/b] To improve performance, the order of group names is [i]not[/i] guaranteed and may vary between project runs. Therefore, do not rely on the group order. [b]Note:[/b] [SceneTree]'s group methods will [i]not[/i] work on this node if not inside the tree (see [method is_inside_tree]).

fn (Node) atr #

fn (s &Node) atr(message string, cfg Node_atr_Cfg) string

Translates a [param message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. Note that most [Control] nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. This method works the same as [method Object.tr], with the addition of respecting the [member auto_translate_mode] state. If [method Object.can_translate_messages] is false, or no translation is available, this method returns the [param message] without changes. See [method Object.set_message_translation]. For detailed examples, see [url=$DOCS_URL/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url].

fn (Node) atr_n #

fn (s &Node) atr_n(message string, plural_message string, n i64, cfg Node_atr_n_Cfg) string

Translates a [param message] or [param plural_message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. This method works the same as [method Object.tr_n], with the addition of respecting the [member auto_translate_mode] state. If [method Object.can_translate_messages] is false, or no translation is available, this method returns [param message] or [param plural_message], without changes. See [method Object.set_message_translation]. The [param n] is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. For detailed examples, see [url=$DOCS_URL/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url]. [b]Note:[/b] Negative and [float] numbers may not properly apply to some countable subjects. It's recommended to handle these cases with [method atr].

fn (Node) call_deferred_thread_group #

fn (s &Node) call_deferred_thread_group(method string, varargs ...ToVariant) Variant

This function is similar to [method Object.call_deferred] 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 before [constant NOTIFICATION_PROCESS] or [constant NOTIFICATION_PHYSICS_PROCESS], the [method _process] or [method _physics_process] or their internal versions are called.

fn (Node) call_thread_safe #

fn (s &Node) call_thread_safe(method string, varargs ...ToVariant) 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.

fn (Node) can_auto_translate #

fn (s &Node) can_auto_translate() bool

Returns true if this node can automatically translate messages depending on the current locale. See [member auto_translate_mode], [method atr], and [method atr_n].

fn (Node) can_process #

fn (s &Node) can_process() bool

Returns true if the node can receive processing notifications and input callbacks ([constant NOTIFICATION_PROCESS], [method _input], etc.) from the [SceneTree] and [Viewport]. The returned value depends on [member process_mode]:- If set to [constant PROCESS_MODE_PAUSABLE], returns true when the game is processing, i.e. [member SceneTree.paused] is false;

  • If set to [constant PROCESS_MODE_WHEN_PAUSED], returns true when the game is paused, i.e. [member SceneTree.paused] is true;
  • If set to [constant PROCESS_MODE_ALWAYS], always returns true;
  • If set to [constant PROCESS_MODE_DISABLED], always returns false;
  • If set to [constant PROCESS_MODE_INHERIT], use the parent node's [member process_mode] to determine the result.If the node is not inside the tree, returns false no matter the value of [member process_mode].

fn (Node) create_tween #

fn (s &Node) create_tween() Tween

Creates a new [Tween] and binds it to this node. This is the equivalent of doing: [codeblocks] [gdscript] get_tree().create_tween().bind_node(self) [/gdscript] [csharp] GetTree().CreateTween().BindNode(this); [/csharp] [/codeblocks] The Tween will start automatically on the next process frame or physics frame (depending on [enum Tween.TweenProcessMode]). See [method Tween.bind_node] for more info on Tweens bound to nodes. [b]Note:[/b] The method can still be used when the node is not inside [SceneTree]. It can fail in an unlikely case of using a custom [MainLoop].

fn (Node) duplicate #

fn (s &Node) duplicate(cfg Node_duplicate_Cfg) Node

Duplicates the node, returning a new node with all of its properties, signals, groups, and children copied from the original. The behavior can be tweaked through the [param flags] (see [enum DuplicateFlags]). Internal nodes are not duplicated. [b]Note:[/b] For nodes with a [Script] attached, if [method Object._init] has been defined with required parameters, the duplicated node will not have a [Script].

fn (Node) find_child #

fn (s &Node) find_child(pattern string, cfg Node_find_child_Cfg) Node

Finds the first descendant of this node whose [member name] matches [param pattern], returning null if no match is found. The matching is done against node names, [i]not[/i] their paths, through [method String.match]. As such, it is case-sensitive, "*" matches zero or more characters, and "?" matches any single character. If [param recursive] is false, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see internal parameter in [method add_child]). If [param owned] is true, only descendants with a valid [member owner] node are checked. [b]Note:[/b] This method can be very slow. Consider storing a reference to the found node in a variable. Alternatively, use [method get_node] with unique names (see [member unique_name_in_owner]). [b]Note:[/b] To find all descendant nodes matching a pattern or a class type, see [method find_children].

fn (Node) find_children #

fn (s &Node) find_children(pattern string, cfg Node_find_children_Cfg) Array

Finds all descendants of this node whose names match [param pattern], returning an empty [Array] if no match is found. The matching is done against node names, [i]not[/i] their paths, through [method String.match]. As such, it is case-sensitive, "*" matches zero or more characters, and "?" matches any single character. If [param type] is not empty, only ancestors inheriting from [param type] are included (see [method Object.is_class]). If [param recursive] is false, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see internal parameter in [method add_child]). If [param owned] is true, only descendants with a valid [member owner] node are checked. [b]Note:[/b] This method can be very slow. Consider storing references to the found nodes in a variable. [b]Note:[/b] To find a single descendant node matching a pattern, see [method find_child].

fn (Node) find_parent #

fn (s &Node) find_parent(pattern string) Node

Finds the first ancestor of this node whose [member name] matches [param pattern], returning null if no match is found. The matching is done through [method String.match]. As such, it is case-sensitive, "*" matches zero or more characters, and "?" matches any single character. See also [method find_child] and [method find_children]. [b]Note:[/b] As this method walks upwards in the scene tree, it can be slow in large, deeply nested nodes. Consider storing a reference to the found node in a variable. Alternatively, use [method get_node] with unique names (see [member unique_name_in_owner]).

fn (Node) from_variant #

fn (mut s Node) from_variant(variant &Variant)

fn (Node) gd_enter_tree #

fn (s &Node) gd_enter_tree()

Called when the node enters the [SceneTree] (e.g. upon instantiating, scene changing, or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children. Corresponds to the [constant NOTIFICATION_ENTER_TREE] notification in [method Object._notification].

fn (Node) gd_exit_tree #

fn (s &Node) gd_exit_tree()

Called when the node is about to leave the [SceneTree] (e.g. upon freeing, scene changing, or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree. Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited].

fn (Node) gd_get_accessibility_configuration_warnings #

fn (s &Node) gd_get_accessibility_configuration_warnings() 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, and accessibility warnings are enabled in the editor settings. Returning an empty array produces no warnings.

fn (Node) gd_get_configuration_warnings #

fn (s &Node) gd_get_configuration_warnings() 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. Returning an empty array produces no warnings. Call [method update_configuration_warnings] when the warnings need to be updated for this node.

@export var energy = 0:
set(value):
energy = value
update_configuration_warnings()

func _get_configuration_warnings():
if energy < 0:
return ['Energy must be 0 or greater.']
else:
return []

fn (Node) gd_get_focused_accessibility_element #

fn (s &Node) gd_get_focused_accessibility_element() RID

Called during accessibility information updates to determine the currently focused sub-element, should return a sub-element RID or the value returned by [method get_accessibility_element].

fn (Node) gd_input #

fn (s &Node) gd_input(event InputEvent)

Called when there is an input event. The input event propagates up through the node tree until a node consumes it. It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input]. To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. For gameplay input, [method _unhandled_input] and [method _unhandled_key_input] are usually a better fit as they allow the GUI to intercept the events first. [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).

fn (Node) gd_physics_process #

fn (s &Node) gd_physics_process(delta f64)

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 [param delta] parameter will [i]generally[/i] be constant (see exceptions below). [param delta] is in seconds. It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process]. Processing happens in order of [member process_physics_priority], lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal). Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification]. [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). [b]Note:[/b] [param delta] will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [param delta] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].

fn (Node) gd_process #

fn (s &Node) gd_process(delta f64)

Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [param delta] time since the previous frame is not constant. [param delta] is in seconds. It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process]. Processing happens in order of [member process_priority], lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal). Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification]. [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). [b]Note:[/b] [param delta] will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [param delta] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].

fn (Node) gd_ready #

fn (s &Node) gd_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 [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards. Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the @onready annotation for variables. Usually used for initialization. For even earlier initialization, [method Object._init] may be used. See also [method _enter_tree]. [b]Note:[/b] This method may be called only once for each node. After removing a node from the scene tree and adding it again, [method _ready] will [b]not[/b] be called a second time. This can be bypassed by requesting another call with [method request_ready], which may be called anywhere before adding the node again.

fn (Node) gd_shortcut_input #

fn (s &Node) gd_shortcut_input(event InputEvent)

Called when an [InputEventKey], [InputEventShortcut], or [InputEventJoypadButton] hasn't been consumed by [method _input] or any GUI [Control] item. It is called before [method _unhandled_key_input] and [method _unhandled_input]. The input event propagates up through the node tree until a node consumes it. It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_shortcut_input]. To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. This method can be used to handle shortcuts. For generic GUI events, use [method _input] instead. Gameplay events should usually be handled with either [method _unhandled_input] or [method _unhandled_key_input]. [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan).

fn (Node) gd_unhandled_input #

fn (s &Node) gd_unhandled_input(event InputEvent)

Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI [Control] item. It is called after [method _shortcut_input] and after [method _unhandled_key_input]. The input event propagates up through the node tree until a node consumes it. It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input]. To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. For gameplay input, this method is usually a better fit than [method _input], as GUI events need a higher priority. For keyboard shortcuts, consider using [method _shortcut_input] instead, as it is called before this method. Finally, to handle keyboard events, consider using [method _unhandled_key_input] for performance reasons. [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).

fn (Node) gd_unhandled_key_input #

fn (s &Node) gd_unhandled_key_input(event InputEvent)

Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI [Control] item. It is called after [method _shortcut_input] but before [method _unhandled_input]. The input event propagates up through the node tree until a node consumes it. It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input]. To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. This method can be used to handle Unicode character input with [kbd]Alt[/kbd], [kbd]Alt + Ctrl[/kbd], and [kbd]Alt + Shift[/kbd] modifiers, after shortcuts were handled. For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input], as GUI events should be handled first. This method also performs better than [method _unhandled_input], since unrelated events such as [InputEventMouseMotion] are automatically filtered. For shortcuts, consider using [method _shortcut_input] instead. [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).

fn (Node) get_accessibility_element #

fn (s &Node) get_accessibility_element() RID

Returns main accessibility element RID. [b]Note:[/b] This method should be called only during accessibility information updates ([constant NOTIFICATION_ACCESSIBILITY_UPDATE]).

fn (Node) get_auto_translate_mode #

fn (s &Node) get_auto_translate_mode() NodeAutoTranslateMode

fn (Node) get_child #

fn (s &Node) get_child(idx i64, cfg Node_get_child_Cfg) Node

Fetches a child node by its index. Each child node has an index relative to its siblings (see [method get_index]). The first child is at index 0. Negative values can also be used to start from the end of the list. This method can be used in combination with [method get_child_count] to iterate over this node's children. If no child exists at the given index, this method returns null and an error is generated. If [param include_internal] is false, internal children are ignored (see [method add_child]'s internal parameter).

####
var a = get_child(0).name  ##var b = get_child(1).name  ##var b = get_child(2).name  ##var c = get_child(-1).name ##

[b]Note:[/b] To fetch a node by [NodePath], use [method get_node].

fn (Node) get_child_count #

fn (s &Node) get_child_count(cfg Node_get_child_count_Cfg) i64

Returns the number of children of this node. If [param include_internal] is false, internal children are not counted (see [method add_child]'s internal parameter).

fn (Node) get_children #

fn (s &Node) get_children(cfg Node_get_children_Cfg) Array

Returns all children of this node inside an [Array]. If [param include_internal] is false, excludes internal children from the returned array (see [method add_child]'s internal parameter).

fn (Node) get_editor_description #

fn (s &Node) get_editor_description() string

fn (Node) get_groups #

fn (s &Node) get_groups() Array

Returns an [Array] of group names that the node has been added to. [b]Note:[/b] To improve performance, the order of group names is [i]not[/i] guaranteed and may vary between project runs. Therefore, do not rely on the group order. [b]Note:[/b] This method may also return some group names starting with an underscore (_). These are internally used by the engine. To avoid conflicts, do not use custom groups starting with underscores. To exclude internal groups, see the following code snippet: [codeblocks] [gdscript]# Stores the node's non-internal groups only (as an array of StringNames).var non_internal_groups = [] for group in get_groups(): if not str(group).begins_with(""): non_internal_groups.push_back(group) [/gdscript] [csharp] // Stores the node's non-internal groups only (as a List of StringNames). List nonInternalGroups = new List(); foreach (string group in GetGroups()) { if (!group.BeginsWith("")) nonInternalGroups.Add(group); } [/csharp] [/codeblocks]

fn (Node) get_index #

fn (s &Node) get_index(cfg Node_get_index_Cfg) i64

Returns this node's order among its siblings. The first node's index is 0. See also [method get_child]. If [param include_internal] is false, returns the index ignoring internal children. The first, non-internal child will have an index of 0 (see [method add_child]'s internal parameter).

fn (Node) get_last_exclusive_window #

fn (s &Node) get_last_exclusive_window() 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.

fn (Node) get_multiplayer #

fn (s &Node) get_multiplayer() MultiplayerAPI

fn (Node) get_multiplayer_authority #

fn (s &Node) get_multiplayer_authority() i64

Returns the peer ID of the multiplayer authority for this node. See [method set_multiplayer_authority].

fn (Node) get_name #

fn (s &Node) get_name() string

fn (Node) get_node #

fn (s &Node) get_node(path NodePath) Node

Fetches a node. The [NodePath] can either be a relative path (from this node), or an absolute path (from the [member SceneTree.root]) to a node. If [param path] does not point to a valid node, generates an error and returns null. Attempts to access methods on the return value will result in an [i]"Attempt to call on a null instance."[/i] error. [b]Note:[/b] Fetching by absolute path only works when the node is inside the scene tree (see [method is_inside_tree]). [b]Example:[/b] Assume this method is called from the Character node, inside the following tree: [codeblock lang=text] ┖╴root ┠╴Character (you are here!) ┃ ┠╴Sword ┃ ┖╴Backpack ┃ ┖╴Dagger ┠╴MyGame ┖╴Swamp ┠╴Alligator ┠╴Mosquito ┖╴Goblin

The following calls will return a valid node:
[codeblocks]
[gdscript]
get_node("Sword")
get_node("Backpack/Dagger")
get_node("../Swamp/Alligator")
get_node("/root/MyGame")
[/gdscript]
[csharp]
GetNode("Sword");
GetNode("Backpack/Dagger");
GetNode("../Swamp/Alligator");
GetNode("/root/MyGame");
[/csharp]
[/codeblocks]

fn (Node) get_node_and_resource #

fn (s &Node) get_node_and_resource(path NodePath) Array

Fetches a node and its most nested resource as specified by the [NodePath]'s subname. Returns an [Array] of size 3 where:- Element 0 is the [Node], or null if not found;

  • Element 1 is the subname's last nested [Resource], or null if not found;
  • Element 2 is the remaining [NodePath], referring to an existing, non-[Resource] property (see [method Object.get_indexed]).[b]Example:[/b] Assume that the child's [member Sprite2D.texture] has been assigned a [AtlasTexture]: [codeblocks] [gdscript] var a = get_node_and_resource("Area2D/Sprite2D") print(a[0].name) # Prints Sprite2D print(a[1]) # Prints print(a[2]) # Prints ^""

var b = get_node_and_resource("Area2D/Sprite2D:texture:atlas") print(b[0].name) # Prints Sprite2D print(b[1].get_class()) # Prints AtlasTexture print(b[2]) # Prints ^""

var c = get_node_and_resource("Area2D/Sprite2D:texture:atlas:region") print(c[0].name) # Prints Sprite2D print(c[1].get_class()) # Prints AtlasTexture print(c[2]) # Prints ^":region" [/gdscript] [csharp] var a = GetNodeAndResource(NodePath("Area2D/Sprite2D")); GD.Print(a[0].Name); // Prints Sprite2D GD.Print(a[1]); // Prints GD.Print(a[2]); // Prints ^"

var b = GetNodeAndResource(NodePath("Area2D/Sprite2D:texture:atlas")); GD.Print(b[0].name); // Prints Sprite2D GD.Print(b[1].get_class()); // Prints AtlasTexture GD.Print(b[2]); // Prints ^""

var c = GetNodeAndResource(NodePath("Area2D/Sprite2D:texture:atlas:region")); GD.Print(c[0].name); // Prints Sprite2D GD.Print(c[1].get_class()); // Prints AtlasTexture GD.Print(c[2]); // Prints ^":region" [/csharp] [/codeblocks]

fn (Node) get_node_as #

fn (s &Node) get_node_as[T](path string) T

fn (Node) get_node_or_null #

fn (s &Node) get_node_or_null(path NodePath) Node

Fetches a node by [NodePath]. Similar to [method get_node], but does not generate an error if [param path] does not point to a valid node.

fn (Node) get_node_rpc_config #

fn (s &Node) get_node_rpc_config() Variant

Returns a [Dictionary] mapping method names to their RPC configuration defined for this node using [method rpc_config]. [b]Note:[/b] This method only returns the RPC configuration assigned via [method rpc_config]. See [method Script.get_rpc_config] to retrieve the RPCs defined by the [Script].

fn (Node) get_node_v #

fn (s &Node) get_node_v(path string) Node

fn (Node) get_owner #

fn (s &Node) get_owner() Node

fn (Node) get_parent #

fn (s &Node) get_parent() Node

Returns this node's parent node, or null if the node doesn't have a parent.

fn (Node) get_path #

fn (s &Node) get_path() NodePath

Returns the node's absolute path, relative to the [member SceneTree.root]. If the node is not inside the scene tree, this method fails and returns an empty [NodePath].

fn (Node) get_path_to #

fn (s &Node) get_path_to(node Node, cfg Node_get_path_to_Cfg) NodePath

Returns the relative [NodePath] from this node to the specified [param node]. Both nodes must be in the same [SceneTree] or scene hierarchy, otherwise this method fails and returns an empty [NodePath]. If [param use_unique_path] is true, returns the shortest path accounting for this node's unique name (see [member unique_name_in_owner]). [b]Note:[/b] If you get a relative path which starts from a unique node, the path may be longer than a normal relative path, due to the addition of the unique node's name.

fn (Node) get_physics_interpolation_mode #

fn (s &Node) get_physics_interpolation_mode() NodePhysicsInterpolationMode

fn (Node) get_physics_process_delta_time #

fn (s &Node) get_physics_process_delta_time() f64

Returns the time elapsed (in seconds) since the last physics callback. This value is identical to [method _physics_process]'s delta parameter, and is often consistent at run-time, unless [member Engine.physics_ticks_per_second] is changed. See also [constant NOTIFICATION_PHYSICS_PROCESS]. [b]Note:[/b] The returned value will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using delta for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].

fn (Node) get_physics_process_priority #

fn (s &Node) get_physics_process_priority() i64

fn (Node) get_process_delta_time #

fn (s &Node) get_process_delta_time() f64

Returns the time elapsed (in seconds) since the last process callback. This value is identical to [method _process]'s delta parameter, and may vary from frame to frame. See also [constant NOTIFICATION_PROCESS]. [b]Note:[/b] The returned value will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using delta for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].

fn (Node) get_process_mode #

fn (s &Node) get_process_mode() NodeProcessMode

fn (Node) get_process_priority #

fn (s &Node) get_process_priority() i64

fn (Node) get_process_thread_group #

fn (s &Node) get_process_thread_group() NodeProcessThreadGroup

fn (Node) get_process_thread_group_order #

fn (s &Node) get_process_thread_group_order() i64

fn (Node) get_process_thread_messages #

fn (s &Node) get_process_thread_messages() NodeProcessThreadMessages

fn (Node) get_scene_file_path #

fn (s &Node) get_scene_file_path() string

fn (Node) get_scene_instance_load_placeholder #

fn (s &Node) get_scene_instance_load_placeholder() bool

Returns true if this node is an instance load placeholder. See [InstancePlaceholder] and [method set_scene_instance_load_placeholder].

fn (Node) get_tree #

fn (s &Node) get_tree() SceneTree

Returns the [SceneTree] that contains this node. If this node is not inside the tree, generates an error and returns null. See also [method is_inside_tree].

fn (Node) get_tree_string #

fn (s &Node) get_tree_string() 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 the [method get_node] function. It also can be used in game UI/UX. May print, for example: [codeblock lang=text] TheGame TheGame/Menu TheGame/Menu/Label TheGame/Menu/Camera2D TheGame/SplashScreen TheGame/SplashScreen/Camera2D

fn (Node) get_tree_string_pretty #

fn (s &Node) get_tree_string_pretty() string

Similar to [method get_tree_string], this returns the tree as a [String]. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees. May print, for example: [codeblock lang=text] ┖╴TheGame ┠╴Menu ┃ ┠╴Label ┃ ┖╴Camera2D ┖╴SplashScreen ┖╴Camera2D

fn (Node) get_viewport #

fn (s &Node) get_viewport() Viewport

Returns the node's closest [Viewport] ancestor, if the node is inside the tree. Otherwise, returns null.

fn (Node) get_window #

fn (s &Node) get_window() 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()).

fn (Node) has_node #

fn (s &Node) has_node(path NodePath) bool

Returns true if the [param path] points to a valid node. See also [method get_node].

fn (Node) has_node_and_resource #

fn (s &Node) has_node_and_resource(path NodePath) bool

Returns true if [param path] points to a valid node and its subnames point to a valid [Resource], e.g. Area2D/CollisionShape2D:shape. Properties that are not [Resource] types (such as nodes or other [Variant] types) are not considered. See also [method get_node_and_resource].

fn (Node) is_ancestor_of #

fn (s &Node) is_ancestor_of(node Node) bool

Returns true if the given [param node] is a direct or indirect child of this node.

fn (Node) is_displayed_folded #

fn (s &Node) is_displayed_folded() bool

Returns true if the node is folded (collapsed) in the Scene dock. This method is intended to be used in editor plugins and tools. See also [method set_display_folded].

fn (Node) is_editable_instance #

fn (s &Node) is_editable_instance(node Node) bool

Returns true if [param node] has editable children enabled relative to this node. This method is intended to be used in editor plugins and tools. See also [method set_editable_instance].

fn (Node) is_greater_than #

fn (s &Node) is_greater_than(node Node) bool

Returns true if the given [param node] occurs later in the scene hierarchy than this node. A node occurring later is usually processed last.

fn (Node) is_in_group #

fn (s &Node) is_in_group(group string) bool

Returns true if this node has been added to the given [param group]. See [method add_to_group] and [method remove_from_group]. See also notes in the description, and the [SceneTree]'s group methods.

fn (Node) is_inside_tree #

fn (s &Node) is_inside_tree() bool

Returns true if this node is currently inside a [SceneTree]. See also [method get_tree].

fn (Node) is_multiplayer_authority #

fn (s &Node) is_multiplayer_authority() bool

Returns true if the local system is the multiplayer authority of this node.

fn (Node) is_node_ready #

fn (s &Node) is_node_ready() bool

Returns true if the node is ready, i.e. it's inside scene tree and all its children are initialized. [method request_ready] resets it back to false.

fn (Node) is_part_of_edited_scene #

fn (s &Node) is_part_of_edited_scene() bool

Returns true if the node is part of the scene currently opened in the editor.

fn (Node) is_physics_interpolated #

fn (s &Node) is_physics_interpolated() bool

Returns true if physics interpolation is enabled for this node (see [member physics_interpolation_mode]). [b]Note:[/b] Interpolation will only be active if both the flag is set [b]and[/b] physics interpolation is enabled within the [SceneTree]. This can be tested using [method is_physics_interpolated_and_enabled].

fn (Node) is_physics_interpolated_and_enabled #

fn (s &Node) is_physics_interpolated_and_enabled() bool

Returns true if physics interpolation is enabled (see [member physics_interpolation_mode]) [b]and[/b] enabled in the [SceneTree]. This is a convenience version of [method is_physics_interpolated] that also checks whether physics interpolation is enabled globally. See [member SceneTree.physics_interpolation] and [member ProjectSettings.physics/common/physics_interpolation].

fn (Node) is_physics_processing #

fn (s &Node) is_physics_processing() bool

Returns true if physics processing is enabled (see [method set_physics_process]).

fn (Node) is_physics_processing_internal #

fn (s &Node) is_physics_processing_internal() bool

Returns true if internal physics processing is enabled (see [method set_physics_process_internal]).

fn (Node) is_processing #

fn (s &Node) is_processing() bool

Returns true if processing is enabled (see [method set_process]).

fn (Node) is_processing_input #

fn (s &Node) is_processing_input() bool

Returns true if the node is processing input (see [method set_process_input]).

fn (Node) is_processing_internal #

fn (s &Node) is_processing_internal() bool

Returns true if internal processing is enabled (see [method set_process_internal]).

fn (Node) is_processing_shortcut_input #

fn (s &Node) is_processing_shortcut_input() bool

Returns true if the node is processing shortcuts (see [method set_process_shortcut_input]).

fn (Node) is_processing_unhandled_input #

fn (s &Node) is_processing_unhandled_input() bool

Returns true if the node is processing unhandled input (see [method set_process_unhandled_input]).

fn (Node) is_processing_unhandled_key_input #

fn (s &Node) is_processing_unhandled_key_input() bool

Returns true if the node is processing unhandled key input (see [method set_process_unhandled_key_input]).

fn (Node) is_unique_name_in_owner #

fn (s &Node) is_unique_name_in_owner() bool

fn (Node) move_child #

fn (s &Node) move_child(child_node Node, to_index i64)

Moves [param child_node] to the given index. A node's index is the order among its siblings. If [param to_index] is negative, the index is counted from the end of the list. See also [method get_child] and [method get_index]. [b]Note:[/b] The processing order of several engine callbacks ([method _ready], [method _process], etc.) and notifications sent through [method propagate_notification] is affected by tree order. [CanvasItem] nodes are also rendered in tree order. See also [member process_priority].

fn (Node) notify_deferred_thread_group #

fn (s &Node) notify_deferred_thread_group(what i64)

Similar to [method call_deferred_thread_group], but for notifications.

fn (Node) notify_thread_safe #

fn (s &Node) notify_thread_safe(what i64)

Similar to [method call_thread_safe], but for notifications.

fn (Node) print_tree #

fn (s &Node) print_tree()

Prints the node and its children to the console, recursively. The node does not have to be inside the tree. This method outputs [NodePath]s relative to this node, and is good for copy/pasting into [method get_node]. See also [method print_tree_pretty]. May print, for example: [codeblock lang=text] . Menu Menu/Label Menu/Camera2D SplashScreen SplashScreen/Camera2D

fn (Node) print_tree_pretty #

fn (s &Node) print_tree_pretty()

Prints the node and its children to the console, recursively. The node does not have to be inside the tree. Similar to [method print_tree], but the graphical representation looks like what is displayed in the editor's Scene dock. It is useful for inspecting larger trees. May print, for example: [codeblock lang=text] ┖╴TheGame ┠╴Menu ┃ ┠╴Label ┃ ┖╴Camera2D ┖╴SplashScreen ┖╴Camera2D

fn (Node) propagate_call #

fn (s &Node) propagate_call(method string, cfg Node_propagate_call_Cfg)

Calls the given [param method] name, passing [param args] as arguments, on this node and all of its children, recursively. If [param parent_first] is true, the method is called on this node first, then on all of its children. If false, the children's methods are called first.

fn (Node) propagate_notification #

fn (s &Node) propagate_notification(what i64)

Calls [method Object.notification] with [param what] on this node and all of its children, recursively.

fn (Node) queue_accessibility_update #

fn (s &Node) queue_accessibility_update()

Queues an accessibility information update for this node.

fn (Node) queue_free #

fn (s &Node) queue_free()

Queues this node to be deleted at the end of the current frame. When deleted, all of its children are deleted as well, and all references to the node and its children become invalid. Unlike with [method Object.free], the node is not deleted instantly, and it can still be accessed before deletion. It is also safe to call [method queue_free] multiple times. Use [method Object.is_queued_for_deletion] to check if the node will be deleted at the end of the frame. [b]Note:[/b] The node will only be freed after all other deferred calls are finished. Using this method is not always the same as calling [method Object.free] through [method Object.call_deferred].

fn (Node) remove_child #

fn (s &Node) remove_child(node Node)

Removes a child [param node]. The [param node], along with its children, are [b]not[/b] deleted. To delete a node, see [method queue_free]. [b]Note:[/b] When this node is inside the tree, this method sets the [member owner] of the removed [param node] (or its descendants) to null, if their [member owner] is no longer an ancestor (see [method is_ancestor_of]).

fn (Node) remove_from_group #

fn (s &Node) remove_from_group(group string)

Removes the node from the given [param group]. Does nothing if the node is not in the [param group]. See also notes in the description, and the [SceneTree]'s group methods.

fn (Node) reparent #

fn (s &Node) reparent(new_parent Node, cfg Node_reparent_Cfg)

Changes the parent of this [Node] to the [param new_parent]. The node needs to already have a parent. The node's [member owner] is preserved if its owner is still reachable from the new location (i.e., the node is still a descendant of the new parent after the operation). If [param keep_global_transform] is true, the node's global transform will be preserved if supported. [Node2D], [Node3D] and [Control] support this argument (but [Control] keeps only position).

fn (Node) replace_by #

fn (s &Node) replace_by(node Node, cfg Node_replace_by_Cfg)

Replaces this node by the given [param node]. All children of this node are moved to [param node]. If [param keep_groups] is true, the [param node] is added to the same groups that the replaced node is in (see [method add_to_group]). [b]Warning:[/b] The replaced node is removed from the tree, but it is [b]not[/b] deleted. To prevent memory leaks, store a reference to the node in a variable, or use [method Object.free].

fn (Node) request_ready #

fn (s &Node) request_ready()

Requests [method _ready] to be called again the next time the node enters the tree. Does [b]not[/b] immediately call [method _ready]. [b]Note:[/b] This method only affects the current node. If the node's children also need to request ready, this method needs to be called for each one of them. When the node and its children enter the tree again, the order of [method _ready] callbacks will be the same as normal.

fn (Node) reset_physics_interpolation #

fn (s &Node) reset_physics_interpolation()

When physics interpolation is active, moving a node to a radically different transform (such as placement within a level) can result in a visible glitch as the object is rendered moving from the old to new position over the physics tick. That glitch can be prevented by calling this method, which temporarily disables interpolation until the physics tick is complete. The notification [constant NOTIFICATION_RESET_PHYSICS_INTERPOLATION] will be received by the node and all children recursively. [b]Note:[/b] This function should be called [b]after[/b] moving the node, rather than before.

fn (Node) rpc #

fn (s &Node) rpc(method string, varargs ...ToVariant) GDError

Sends a remote procedure call request for the given [param method] to peers on the network (and locally), sending additional arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same [member name]. Behavior depends on the RPC configuration for the given [param method] (see [method rpc_config] and [annotation @GDScript.@rpc]). By default, methods are not exposed to RPCs. May return [constant OK] if the call is successful, [constant ERR_INVALID_PARAMETER] if the arguments passed in the [param method] do not match, [constant ERR_UNCONFIGURED] if the node's [member multiplayer] cannot be fetched (such as when the node is not inside the tree), [constant ERR_CONNECTION_ERROR] if [member multiplayer]'s connection is not available. [b]Note:[/b] You can only safely use RPCs on clients after you received the [signal MultiplayerAPI.connected_to_server] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [signal MultiplayerAPI.server_disconnected] or by checking (get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED).

fn (Node) rpc_config #

fn (s &Node) rpc_config(method string, config_ ToVariant)

Changes the RPC configuration for the given [param method]. [param config] should either be null to disable the feature (as by default), or a [Dictionary] containing the following entries:- rpc_mode: see [enum MultiplayerAPI.RPCMode];

  • transfer_mode: see [enum MultiplayerPeer.TransferMode];
  • call_local: if true, the method will also be called locally;
  • channel: an [int] representing the channel to send the RPC on.[b]Note:[/b] In GDScript, this method corresponds to the [annotation @GDScript.@rpc] annotation, with various parameters passed (@rpc(any), @rpc(authority)...). See also the [url=$DOCS_URL/tutorials/networking/high_level_multiplayer.html]high-level multiplayer[/url] tutorial.

fn (Node) rpc_id #

fn (s &Node) rpc_id(peer_id i64, method string, varargs ...ToVariant) GDError

Sends a [method rpc] to a specific peer identified by [param peer_id] (see [method MultiplayerPeer.set_target_peer]). May return [constant OK] if the call is successful, [constant ERR_INVALID_PARAMETER] if the arguments passed in the [param method] do not match, [constant ERR_UNCONFIGURED] if the node's [member multiplayer] cannot be fetched (such as when the node is not inside the tree), [constant ERR_CONNECTION_ERROR] if [member multiplayer]'s connection is not available.

fn (Node) set_auto_translate_mode #

fn (s &Node) set_auto_translate_mode(mode NodeAutoTranslateMode)

fn (Node) set_deferred_thread_group #

fn (s &Node) set_deferred_thread_group(property string, value_ ToVariant)

Similar to [method call_deferred_thread_group], but for setting properties.

fn (Node) set_display_folded #

fn (s &Node) set_display_folded(fold bool)

If set to true, the node appears folded in the Scene dock. As a result, all of its children are hidden. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also [method is_displayed_folded].

fn (Node) set_editable_instance #

fn (s &Node) set_editable_instance(node Node, is_editable bool)

Set to true to allow all nodes owned by [param node] to be available, and editable, in the Scene dock, even if their [member owner] is not the scene root. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also [method is_editable_instance].

fn (Node) set_editor_description #

fn (s &Node) set_editor_description(editor_description string)

fn (Node) set_multiplayer_authority #

fn (s &Node) set_multiplayer_authority(id i64, cfg Node_set_multiplayer_authority_Cfg)

Sets the node's multiplayer authority to the peer with the given peer [param id]. The multiplayer authority is the peer that has authority over the node on the network. Defaults to peer ID 1 (the server). Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. If [param recursive] is true, the given peer is recursively set as the authority for all children of this node. [b]Warning:[/b] This does [b]not[/b] automatically replicate the new authority to other peers. It is the developer's responsibility to do so. You may replicate the new authority's information using [member MultiplayerSpawner.spawn_function], an RPC, or a [MultiplayerSynchronizer]. Furthermore, the parent's authority does [b]not[/b] propagate to newly added children.

fn (Node) set_name #

fn (s &Node) set_name(name string)

fn (Node) set_owner #

fn (s &Node) set_owner(owner Node)

fn (Node) set_physics_interpolation_mode #

fn (s &Node) set_physics_interpolation_mode(mode NodePhysicsInterpolationMode)

fn (Node) set_physics_process #

fn (s &Node) set_physics_process(enable bool)

If set to true, enables physics (fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.physics_ticks_per_second] to change) interval (and the [method _physics_process] callback will be called if it exists). [b]Note:[/b] If [method _physics_process] is overridden, this will be automatically enabled before [method _ready] is called.

fn (Node) set_physics_process_internal #

fn (s &Node) set_physics_process_internal(enable bool)

If set to true, enables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] 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 ([method set_physics_process]). [b]Warning:[/b] Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing.

fn (Node) set_physics_process_priority #

fn (s &Node) set_physics_process_priority(priority i64)

fn (Node) set_process #

fn (s &Node) set_process(enable bool)

If set to true, enables processing. When a node is being processed, it will receive a [constant NOTIFICATION_PROCESS] on every drawn frame (and the [method _process] callback will be called if it exists). [b]Note:[/b] If [method _process] is overridden, this will be automatically enabled before [method _ready] is called. [b]Note:[/b] This method only affects the [method _process] callback, i.e. it has no effect on other callbacks like [method _physics_process]. If you want to disable all processing for the node, set [member process_mode] to [constant PROCESS_MODE_DISABLED].

fn (Node) set_process_input #

fn (s &Node) set_process_input(enable bool)

If set to true, enables input processing. [b]Note:[/b] If [method _input] is overridden, this will be automatically enabled before [method _ready] is called. Input processing is also already enabled for GUI controls, such as [Button] and [TextEdit].

fn (Node) set_process_internal #

fn (s &Node) set_process_internal(enable bool)

If set to true, enables internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). [b]Warning:[/b] Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing.

fn (Node) set_process_mode #

fn (s &Node) set_process_mode(mode NodeProcessMode)

fn (Node) set_process_priority #

fn (s &Node) set_process_priority(priority i64)

fn (Node) set_process_shortcut_input #

fn (s &Node) set_process_shortcut_input(enable bool)

If set to true, enables shortcut processing for this node. [b]Note:[/b] If [method _shortcut_input] is overridden, this will be automatically enabled before [method _ready] is called.

fn (Node) set_process_thread_group #

fn (s &Node) set_process_thread_group(mode NodeProcessThreadGroup)

fn (Node) set_process_thread_group_order #

fn (s &Node) set_process_thread_group_order(order i64)

fn (Node) set_process_thread_messages #

fn (s &Node) set_process_thread_messages(flags NodeProcessThreadMessages)

fn (Node) set_process_unhandled_input #

fn (s &Node) set_process_unhandled_input(enable bool)

If set to true, enables unhandled input processing. It enables the node to receive all input that was not previously handled (usually by a [Control]). [b]Note:[/b] If [method _unhandled_input] is overridden, this will be automatically enabled before [method _ready] is called. Unhandled input processing is also already enabled for GUI controls, such as [Button] and [TextEdit].

fn (Node) set_process_unhandled_key_input #

fn (s &Node) set_process_unhandled_key_input(enable bool)

If set to true, enables unhandled key input processing. [b]Note:[/b] If [method _unhandled_key_input] is overridden, this will be automatically enabled before [method _ready] is called.

fn (Node) set_scene_file_path #

fn (s &Node) set_scene_file_path(scene_file_path string)

fn (Node) set_scene_instance_load_placeholder #

fn (s &Node) set_scene_instance_load_placeholder(load_placeholder bool)

If set to true, the node becomes a [InstancePlaceholder] when packed and instantiated from a [PackedScene]. See also [method get_scene_instance_load_placeholder].

fn (Node) set_thread_safe #

fn (s &Node) set_thread_safe(property string, value_ ToVariant)

Similar to [method call_thread_safe], but for setting properties.

fn (Node) set_translation_domain_inherited #

fn (s &Node) set_translation_domain_inherited()

Makes this node inherit the translation domain from its parent node. If this node has no parent, the main translation domain will be used. This is the default behavior for all nodes. Calling [method Object.set_translation_domain] disables this behavior.

fn (Node) set_unique_name_in_owner #

fn (s &Node) set_unique_name_in_owner(enable bool)

fn (Node) to_variant #

fn (s &Node) to_variant() Variant

fn (Node) update_configuration_warnings #

fn (s &Node) update_configuration_warnings()

Refreshes the warnings displayed for this node in the Scene dock. Use [method _get_configuration_warnings] to customize the warning messages to display.

struct Node2D #

struct Node2D {
	CanvasItem
}

A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and skew.

fn (Node2D) to_variant #

fn (s &Node2D) to_variant() Variant

fn (Node2D) from_variant #

fn (mut s Node2D) from_variant(variant &Variant)

fn (Node2D) set_position #

fn (s &Node2D) set_position(position Vector2)

fn (Node2D) set_rotation #

fn (s &Node2D) set_rotation(radians f64)

fn (Node2D) set_rotation_degrees #

fn (s &Node2D) set_rotation_degrees(degrees f64)

fn (Node2D) set_skew #

fn (s &Node2D) set_skew(radians f64)

fn (Node2D) set_scale #

fn (s &Node2D) set_scale(scale Vector2)

fn (Node2D) get_position #

fn (s &Node2D) get_position() Vector2

fn (Node2D) get_rotation #

fn (s &Node2D) get_rotation() f64

fn (Node2D) get_rotation_degrees #

fn (s &Node2D) get_rotation_degrees() f64

fn (Node2D) get_skew #

fn (s &Node2D) get_skew() f64

fn (Node2D) get_scale #

fn (s &Node2D) get_scale() Vector2

fn (Node2D) rotate #

fn (s &Node2D) rotate(radians f64)

Applies a rotation to the node, in radians, starting from its current rotation.

fn (Node2D) move_local_x #

fn (s &Node2D) move_local_x(delta f64, cfg Node2D_move_local_x_Cfg)

Applies a local translation on the node's X axis based on the [method Node._process]'s [param delta]. If [param scaled] is false, normalizes the movement.

fn (Node2D) move_local_y #

fn (s &Node2D) move_local_y(delta f64, cfg Node2D_move_local_y_Cfg)

Applies a local translation on the node's Y axis based on the [method Node._process]'s [param delta]. If [param scaled] is false, normalizes the movement.

fn (Node2D) translate #

fn (s &Node2D) translate(offset Vector2)

Translates the node by the given [param offset] in local coordinates.

fn (Node2D) global_translate #

fn (s &Node2D) global_translate(offset Vector2)

Adds the [param offset] vector to the node's global position.

fn (Node2D) apply_scale #

fn (s &Node2D) apply_scale(ratio Vector2)

Multiplies the current scale by the [param ratio] vector.

fn (Node2D) set_global_position #

fn (s &Node2D) set_global_position(position Vector2)

fn (Node2D) get_global_position #

fn (s &Node2D) get_global_position() Vector2

fn (Node2D) set_global_rotation #

fn (s &Node2D) set_global_rotation(radians f64)

fn (Node2D) set_global_rotation_degrees #

fn (s &Node2D) set_global_rotation_degrees(degrees f64)

fn (Node2D) get_global_rotation #

fn (s &Node2D) get_global_rotation() f64

fn (Node2D) get_global_rotation_degrees #

fn (s &Node2D) get_global_rotation_degrees() f64

fn (Node2D) set_global_skew #

fn (s &Node2D) set_global_skew(radians f64)

fn (Node2D) get_global_skew #

fn (s &Node2D) get_global_skew() f64

fn (Node2D) set_global_scale #

fn (s &Node2D) set_global_scale(scale Vector2)

fn (Node2D) get_global_scale #

fn (s &Node2D) get_global_scale() Vector2

fn (Node2D) set_transform #

fn (s &Node2D) set_transform(xform Transform2D)

fn (Node2D) set_global_transform #

fn (s &Node2D) set_global_transform(xform Transform2D)

fn (Node2D) look_at #

fn (s &Node2D) look_at(point Vector2)

Rotates the node so that its local +X axis points towards the [param point], which is expected to use global coordinates. [param point] should not be the same as the node's position, otherwise the node always looks to the right.

fn (Node2D) get_angle_to #

fn (s &Node2D) get_angle_to(point Vector2) f64

Returns the angle between the node and the [param point] in radians. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url]

fn (Node2D) to_local #

fn (s &Node2D) to_local(global_point Vector2) Vector2

Transforms the provided global position into a position in local coordinate space. The output will be local relative to the [Node2D] it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent.

fn (Node2D) to_global #

fn (s &Node2D) to_global(local_point Vector2) Vector2

Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the [Node2D] it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position.

fn (Node2D) get_relative_transform_to_parent #

fn (s &Node2D) get_relative_transform_to_parent(parent Node) Transform2D

Returns the [Transform2D] relative to this node's parent.

struct Node2D_move_local_x_Cfg #

@[params]
struct Node2D_move_local_x_Cfg {
pub:
	scaled bool
}

Optional parameters for Node2D#move_local_x

struct Node2D_move_local_y_Cfg #

@[params]
struct Node2D_move_local_y_Cfg {
pub:
	scaled bool
}

Optional parameters for Node2D#move_local_y

struct Node3D #

struct Node3D {
	Node
}

Base object in 3D space, inherited by all 3D nodes.

fn (Node3D) to_variant #

fn (s &Node3D) to_variant() Variant

fn (Node3D) from_variant #

fn (mut s Node3D) from_variant(variant &Variant)

fn (Node3D) set_transform #

fn (s &Node3D) set_transform(local Transform3D)

fn (Node3D) get_transform #

fn (s &Node3D) get_transform() Transform3D

fn (Node3D) set_position #

fn (s &Node3D) set_position(position Vector3)

fn (Node3D) get_position #

fn (s &Node3D) get_position() Vector3

fn (Node3D) set_rotation #

fn (s &Node3D) set_rotation(euler_radians Vector3)

fn (Node3D) get_rotation #

fn (s &Node3D) get_rotation() Vector3

fn (Node3D) set_rotation_degrees #

fn (s &Node3D) set_rotation_degrees(euler_degrees Vector3)

fn (Node3D) get_rotation_degrees #

fn (s &Node3D) get_rotation_degrees() Vector3

fn (Node3D) set_rotation_order #

fn (s &Node3D) set_rotation_order(order EulerOrder)

fn (Node3D) get_rotation_order #

fn (s &Node3D) get_rotation_order() EulerOrder

fn (Node3D) set_rotation_edit_mode #

fn (s &Node3D) set_rotation_edit_mode(edit_mode Node3DRotationEditMode)

fn (Node3D) get_rotation_edit_mode #

fn (s &Node3D) get_rotation_edit_mode() Node3DRotationEditMode

fn (Node3D) set_scale #

fn (s &Node3D) set_scale(scale Vector3)

fn (Node3D) get_scale #

fn (s &Node3D) get_scale() Vector3

fn (Node3D) set_quaternion #

fn (s &Node3D) set_quaternion(quaternion Quaternion)

fn (Node3D) get_quaternion #

fn (s &Node3D) get_quaternion() Quaternion

fn (Node3D) set_basis #

fn (s &Node3D) set_basis(basis Basis)

fn (Node3D) get_basis #

fn (s &Node3D) get_basis() Basis

fn (Node3D) set_global_transform #

fn (s &Node3D) set_global_transform(global Transform3D)

fn (Node3D) get_global_transform #

fn (s &Node3D) get_global_transform() Transform3D

fn (Node3D) get_global_transform_interpolated #

fn (s &Node3D) get_global_transform_interpolated() Transform3D

When using physics interpolation, there will be circumstances in which you want to know the interpolated (displayed) transform of a node rather than the standard transform (which may only be accurate to the most recent physics tick). This is particularly important for frame-based operations that take place in [method Node._process], rather than [method Node._physics_process]. Examples include [Camera3D]s focusing on a node, or finding where to fire lasers from on a frame rather than physics tick. [b]Note:[/b] This function creates an interpolation pump on the [Node3D] the first time it is called, which can respond to physics interpolation resets. If you get problems with "streaking" when initially following a [Node3D], be sure to call [method get_global_transform_interpolated] at least once [i]before[/i] resetting the [Node3D] physics interpolation.

fn (Node3D) set_global_position #

fn (s &Node3D) set_global_position(position Vector3)

fn (Node3D) get_global_position #

fn (s &Node3D) get_global_position() Vector3

fn (Node3D) set_global_basis #

fn (s &Node3D) set_global_basis(basis Basis)

fn (Node3D) get_global_basis #

fn (s &Node3D) get_global_basis() Basis

fn (Node3D) set_global_rotation #

fn (s &Node3D) set_global_rotation(euler_radians Vector3)

fn (Node3D) get_global_rotation #

fn (s &Node3D) get_global_rotation() Vector3

fn (Node3D) set_global_rotation_degrees #

fn (s &Node3D) set_global_rotation_degrees(euler_degrees Vector3)

fn (Node3D) get_global_rotation_degrees #

fn (s &Node3D) get_global_rotation_degrees() Vector3

fn (Node3D) get_parent_node_3d #

fn (s &Node3D) get_parent_node_3d() Node3D

Returns the parent [Node3D] that directly affects this node's [member global_transform]. Returns null if no parent exists, the parent is not a [Node3D], or [member top_level] is true. [b]Note:[/b] This method is not always equivalent to [method Node.get_parent], which does not take [member top_level] into account.

fn (Node3D) set_ignore_transform_notification #

fn (s &Node3D) set_ignore_transform_notification(enabled bool)

If true, the node will not receive [constant NOTIFICATION_TRANSFORM_CHANGED] or [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED]. It may useful to call this method when handling these notifications to prevent infinite recursion.

fn (Node3D) set_as_top_level #

fn (s &Node3D) set_as_top_level(enable bool)

fn (Node3D) is_set_as_top_level #

fn (s &Node3D) is_set_as_top_level() bool

fn (Node3D) set_disable_scale #

fn (s &Node3D) set_disable_scale(disable bool)

If true, this node's [member global_transform] is automatically orthonormalized. This results in this node not appearing distorted, as if its global scale were set to [constant Vector3.ONE] (or its negative counterpart). See also [method is_scale_disabled] and [method orthonormalize]. [b]Note:[/b] [member transform] is not affected by this setting.

fn (Node3D) is_scale_disabled #

fn (s &Node3D) is_scale_disabled() bool

Returns true if this node's [member global_transform] is automatically orthonormalized. This results in this node not appearing distorted, as if its global scale were set to [constant Vector3.ONE] (or its negative counterpart). See also [method set_disable_scale] and [method orthonormalize]. [b]Note:[/b] [member transform] is not affected by this setting.

fn (Node3D) get_world_3d #

fn (s &Node3D) get_world_3d() World3D

Returns the [World3D] this node is registered to. Usually, this is the same as the world used by this node's viewport (see [method Node.get_viewport] and [method Viewport.find_world_3d]).

fn (Node3D) force_update_transform #

fn (s &Node3D) force_update_transform()

Forces the node's [member global_transform] to update, by sending [constant NOTIFICATION_TRANSFORM_CHANGED]. Fails if the node is not inside the tree. [b]Note:[/b] For performance reasons, transform changes are usually accumulated and applied [i]once[/i] at the end of the frame. The update propagates through [Node3D] children, as well. Therefore, use this method only when you need an up-to-date transform (such as during physics operations).

fn (Node3D) set_visibility_parent #

fn (s &Node3D) set_visibility_parent(path NodePath)

fn (Node3D) get_visibility_parent #

fn (s &Node3D) get_visibility_parent() NodePath

fn (Node3D) update_gizmos #

fn (s &Node3D) update_gizmos()

Updates all the [EditorNode3DGizmo] objects attached to this node. Only works in the editor.

fn (Node3D) add_gizmo #

fn (s &Node3D) add_gizmo(gizmo Node3DGizmo)

Attaches the given [param gizmo] to this node. Only works in the editor. [b]Note:[/b] [param gizmo] should be an [EditorNode3DGizmo]. The argument type is [Node3DGizmo] to avoid depending on editor classes in [Node3D].

fn (Node3D) get_gizmos #

fn (s &Node3D) get_gizmos() Array

Returns all the [EditorNode3DGizmo] objects attached to this node. Only works in the editor.

fn (Node3D) clear_gizmos #

fn (s &Node3D) clear_gizmos()

Clears all [EditorNode3DGizmo] objects attached to this node. Only works in the editor.

fn (Node3D) set_subgizmo_selection #

fn (s &Node3D) set_subgizmo_selection(gizmo Node3DGizmo, id i64, transform Transform3D)

Selects the [param gizmo]'s subgizmo with the given [param id] and sets its transform. Only works in the editor. [b]Note:[/b] The gizmo object would typically be an instance of [EditorNode3DGizmo], but the argument type is kept generic to avoid creating a dependency on editor classes in [Node3D].

fn (Node3D) clear_subgizmo_selection #

fn (s &Node3D) clear_subgizmo_selection()

Deselects all subgizmos for this node. Useful to call when the selected subgizmo may no longer exist after a property change. Only works in the editor.

fn (Node3D) set_visible #

fn (s &Node3D) set_visible(visible bool)

fn (Node3D) is_visible #

fn (s &Node3D) is_visible() bool

fn (Node3D) is_visible_in_tree #

fn (s &Node3D) is_visible_in_tree() bool

Returns true if this node is inside the scene tree and the [member visible] property is true for this node and all of its [Node3D] ancestors [i]in sequence[/i]. An ancestor of any other type (such as [Node] or [Node2D]) breaks the sequence. See also [method Node.get_parent]. [b]Note:[/b] This method cannot take [member VisualInstance3D.layers] into account, so even if this method returns true, the node may not be rendered.

fn (Node3D) show #

fn (s &Node3D) show()

Allows this node to be rendered. Equivalent to setting [member visible] to true. This is the opposite of [method hide].

fn (Node3D) hide #

fn (s &Node3D) hide()

Prevents this node from being rendered. Equivalent to setting [member visible] to false. This is the opposite of [method show].

fn (Node3D) set_notify_local_transform #

fn (s &Node3D) set_notify_local_transform(enable bool)

If true, the node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever [member transform] changes. [b]Note:[/b] Some 3D nodes such as [CSGShape3D] or [CollisionShape3D] automatically enable this to function correctly.

fn (Node3D) is_local_transform_notification_enabled #

fn (s &Node3D) is_local_transform_notification_enabled() bool

Returns true if the node receives [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever [member transform] changes. This is enabled with [method set_notify_local_transform].

fn (Node3D) set_notify_transform #

fn (s &Node3D) set_notify_transform(enable bool)

If true, the node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] whenever [member global_transform] changes. [b]Note:[/b] Most 3D nodes such as [VisualInstance3D] or [CollisionObject3D] automatically enable this to function correctly. [b]Note:[/b] In the editor, nodes will propagate this notification to their children if a gizmo is attached (see [method add_gizmo]).

fn (Node3D) is_transform_notification_enabled #

fn (s &Node3D) is_transform_notification_enabled() bool

Returns true if the node receives [constant NOTIFICATION_TRANSFORM_CHANGED] whenever [member global_transform] changes. This is enabled with [method set_notify_transform].

fn (Node3D) rotate #

fn (s &Node3D) rotate(axis Vector3, angle f64)

Rotates this node's [member basis] around the [param axis] by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position].

fn (Node3D) global_rotate #

fn (s &Node3D) global_rotate(axis Vector3, angle f64)

Rotates this node's [member global_basis] around the global [param axis] by the given [param angle], in radians. This operation is calculated in global space (relative to the world) and preserves the [member global_position].

fn (Node3D) global_scale #

fn (s &Node3D) global_scale(scale Vector3)

Scales this node's [member global_basis] by the given [param scale] factor. This operation is calculated in global space (relative to the world) and preserves the [member global_position]. [b]Note:[/b] This method is not to be confused with the [member scale] property.

fn (Node3D) global_translate #

fn (s &Node3D) global_translate(offset Vector3)

Adds the given translation [param offset] to the node's [member global_position] in global space (relative to the world).

fn (Node3D) rotate_object_local #

fn (s &Node3D) rotate_object_local(axis Vector3, angle f64)

Rotates this node's [member basis] around the [param axis] by the given [param angle], in radians. This operation is calculated in local space (relative to this node) and preserves the [member position].

fn (Node3D) scale_object_local #

fn (s &Node3D) scale_object_local(scale Vector3)

Scales this node's [member basis] by the given [param scale] factor. This operation is calculated in local space (relative to this node) and preserves the [member position].

fn (Node3D) translate_object_local #

fn (s &Node3D) translate_object_local(offset Vector3)

Adds the given translation [param offset] to the node's position, in local space (relative to this node).

fn (Node3D) rotate_x #

fn (s &Node3D) rotate_x(angle f64)

Rotates this node's [member basis] around the X axis by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position].

fn (Node3D) rotate_y #

fn (s &Node3D) rotate_y(angle f64)

Rotates this node's [member basis] around the Y axis by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position].

fn (Node3D) rotate_z #

fn (s &Node3D) rotate_z(angle f64)

Rotates this node's [member basis] around the Z axis by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position].

fn (Node3D) translate #

fn (s &Node3D) translate(offset Vector3)

Adds the given translation [param offset] to the node's position, in local space (relative to this node). [b]Note:[/b] Prefer using [method translate_object_local], instead, as this method may be changed in a future release. [b]Note:[/b] Despite the naming convention, this operation is [b]not[/b] calculated in parent space for compatibility reasons. To translate in parent space, add [param offset] to the [member position] (node_3d.position += offset).

fn (Node3D) orthonormalize #

fn (s &Node3D) orthonormalize()

Orthonormalizes this node's [member basis]. This method sets this node's [member scale] to [constant Vector3.ONE] (or its negative counterpart), but preserves the [member position] and [member rotation]. See also [method Transform3D.orthonormalized].

fn (Node3D) set_identity #

fn (s &Node3D) set_identity()

Sets this node's [member transform] to [constant Transform3D.IDENTITY], which resets all transformations in parent space ([member position], [member rotation], and [member scale]).

fn (Node3D) look_at #

fn (s &Node3D) look_at(target Vector3, cfg Node3D_look_at_Cfg)

Rotates the node so that the local forward axis (-Z, [constant Vector3.FORWARD]) points toward the [param target] position. This operation is calculated in global space (relative to the world). The local up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. The [param target] position cannot be the same as the node's position, the [param up] vector cannot be [constant Vector3.ZERO]. Furthermore, the direction from the node's position to the [param target] position cannot be parallel to the [param up] vector, to avoid an unintended rotation around the local Z axis. If [param use_model_front] is true, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). [b]Note:[/b] This method fails if the node is not in the scene tree. If necessary, use [method look_at_from_position] instead.

fn (Node3D) look_at_from_position #

fn (s &Node3D) look_at_from_position(position Vector3, target Vector3, cfg Node3D_look_at_from_position_Cfg)

Moves the node to the specified [param position], then rotates the node to point toward the [param target] position, similar to [method look_at]. This operation is calculated in global space (relative to the world).

fn (Node3D) to_local #

fn (s &Node3D) to_local(global_point Vector3) Vector3

Returns the [param global_point] converted from global space to this node's local space. This is the opposite of [method to_global].

fn (Node3D) to_global #

fn (s &Node3D) to_global(local_point Vector3) Vector3

Returns the [param local_point] converted from this node's local space to global space. This is the opposite of [method to_local].

struct Node3DGizmo #

struct Node3DGizmo {
	RefCounted
}

Abstract class to expose editor gizmos for [Node3D].

fn (Node3DGizmo) to_variant #

fn (s &Node3DGizmo) to_variant() Variant

fn (Node3DGizmo) from_variant #

fn (mut s Node3DGizmo) from_variant(variant &Variant)

struct Node3D_look_at_Cfg #

@[params]
struct Node3D_look_at_Cfg {
pub:
	up              Vector3 = Vector3{0, 1, 0}
	use_model_front bool
}

Optional parameters for Node3D#look_at

struct Node3D_look_at_from_position_Cfg #

@[params]
struct Node3D_look_at_from_position_Cfg {
pub:
	up              Vector3 = Vector3{0, 1, 0}
	use_model_front bool
}

Optional parameters for Node3D#look_at_from_position

struct NodePath #

@[packed]
struct NodePath {
	data_ [8]u8
}

A pre-parsed scene tree path.

The [NodePath] built-in [Variant] type represents a path to a node or property in a hierarchy of nodes. It is designed to be efficiently passed into many built-in methods (such as [method Node.get_node], [method Object.set_indexed], [method Tween.tween_property], etc.) without a hard dependence on the node or property they point to. A node path is represented as a [String] composed of slash-separated (/) node names and colon-separated (:) property names (also called "subnames"). Similar to a filesystem path, ".." and "." are special node names. They refer to the parent node and the current node, respectively. The following examples are paths relative to the current node:

^'A'     ##^'A/B'   ##^'.'     ##^'..'    ##^'../C'  ##^'../..' ##

A leading slash means the path is absolute, and begins from the [SceneTree]:

^'/root'            ##^'/root/Title'      ##^'/root/Global'     ##

Despite their name, node paths may also point to a property:

^':position'           ##^':position:x'         ##^'Camera3D:rotation:y' ##^'/root:size:x'        ##

In some situations, it's possible to omit the leading : when pointing to an object's property. As an example, this is the case with [method Object.set_indexed] and [method Tween.tween_property], as those methods call [method NodePath.get_as_property_path] under the hood. However, it's generally recommended to keep the : prefix. Node paths cannot check whether they are valid and may point to nodes or properties that do not exist. Their meaning depends entirely on the context in which they're used. You usually do not have to worry about the [NodePath] type, as strings are automatically converted to the type when necessary. There are still times when defining node paths is useful. For example, exported [NodePath] properties allow you to easily select any node within the currently edited scene. They are also automatically updated when moving, renaming or deleting nodes in the scene tree editor. See also [annotation @GDScript.@export_node_path]. See also [StringName], which is a similar type designed for optimized strings. [b]Note:[/b] In a boolean context, a [NodePath] will evaluate to false if it is empty (NodePath("")). Otherwise, a [NodePath] will always evaluate to true.

fn (NodePath) deinit #

fn (s &NodePath) deinit()

fn (NodePath) is_absolute #

fn (s &NodePath) is_absolute() bool

Returns true if the node path is absolute. Unlike a relative path, an absolute path is represented by a leading slash character (/) and always begins from the [SceneTree]. It can be used to reliably access nodes from the root node (e.g. "/root/Global" if an autoload named "Global" exists).

fn (NodePath) get_name_count #

fn (s &NodePath) get_name_count() i64

Returns the number of node names in the path. Property subnames are not included. For example, "../RigidBody2D/Sprite2D:texture" contains 3 node names.

fn (NodePath) get_name #

fn (s &NodePath) get_name(idx i64) StringName

Returns the node name indicated by [param idx], starting from 0. If [param idx] is out of bounds, an error is generated. See also [method get_subname_count] and [method get_name_count]. [codeblocks] [gdscript] var sprite_path = NodePath("../RigidBody2D/Sprite2D") print(sprite_path.get_name(0)) # Prints ".." print(sprite_path.get_name(1)) # Prints "RigidBody2D" print(sprite_path.get_name(2)) # Prints "Sprite" [/gdscript] [csharp] var spritePath = new NodePath("../RigidBody2D/Sprite2D"); GD.Print(spritePath.GetName(0)); // Prints ".." GD.Print(spritePath.GetName(1)); // Prints "PathFollow2D" GD.Print(spritePath.GetName(2)); // Prints "Sprite" [/csharp] [/codeblocks]

fn (NodePath) get_subname_count #

fn (s &NodePath) get_subname_count() i64

Returns the number of property names ("subnames") in the path. Each subname in the node path is listed after a colon character (:). For example, "Level/RigidBody2D/Sprite2D:texture:resource_name" contains 2 subnames.

fn (NodePath) hash #

fn (s &NodePath) hash() i64

Returns the 32-bit hash value representing the node path's contents. [b]Note:[/b] Node paths with equal hash values are [i]not[/i] guaranteed to be the same, as a result of hash collisions. Node paths with different hash values are guaranteed to be different.

fn (NodePath) get_subname #

fn (s &NodePath) get_subname(idx i64) StringName

Returns the property name indicated by [param idx], starting from 0. If [param idx] is out of bounds, an error is generated. See also [method get_subname_count]. [codeblocks] [gdscript] var path_to_name = NodePath("Sprite2D:texture:resource_name") print(path_to_name.get_subname(0)) # Prints "texture" print(path_to_name.get_subname(1)) # Prints "resource_name" [/gdscript] [csharp] var pathToName = new NodePath("Sprite2D:texture:resource_name"); GD.Print(pathToName.GetSubname(0)); // Prints "texture" GD.Print(pathToName.GetSubname(1)); // Prints "resource_name" [/csharp] [/codeblocks]

fn (NodePath) get_concatenated_names #

fn (s &NodePath) get_concatenated_names() StringName

Returns all node names concatenated with a slash character (/) as a single [StringName].

fn (NodePath) get_concatenated_subnames #

fn (s &NodePath) get_concatenated_subnames() StringName

Returns all property subnames concatenated with a colon character (:) as a single [StringName]. [codeblocks] [gdscript] var node_path = ^"Sprite2D:texture:resource_name" print(node_path.get_concatenated_subnames()) # Prints "texture:resource_name" [/gdscript] [csharp] var nodePath = new NodePath("Sprite2D:texture:resource_name"); GD.Print(nodePath.GetConcatenatedSubnames()); // Prints "texture:resource_name" [/csharp] [/codeblocks]

fn (NodePath) slice #

fn (s &NodePath) slice(begin i64, cfg NodePath_slice_Cfg) NodePath

Returns the slice of the [NodePath], from [param begin] (inclusive) to [param end] (exclusive), as a new [NodePath]. The absolute value of [param begin] and [param end] will be clamped to the sum of [method get_name_count] and [method get_subname_count], so the default value for [param end] makes it slice to the end of the [NodePath] by default (i.e. path.slice(1) is a shorthand for path.slice(1, path.get_name_count() + path.get_subname_count())). If either [param begin] or [param end] are negative, they will be relative to the end of the [NodePath] (i.e. path.slice(0, -2) is a shorthand for path.slice(0, path.get_name_count() + path.get_subname_count() - 2)).

fn (NodePath) get_as_property_path #

fn (s &NodePath) get_as_property_path() NodePath

Returns a copy of this node path with a colon character (:) prefixed, transforming it to a pure property path with no node names (relative to the current node). [codeblocks] [gdscript]# node_path points to the "x" property of the child node named "position".var node_path = ^"position:x"

property_path points to the "position" in the "x" axis of this node.

var property_path = node_path.get_as_property_path() print(property_path) # Prints ":position:x" [/gdscript] [csharp] // nodePath points to the "x" property of the child node named "position". var nodePath = new NodePath("position:x");

// propertyPath points to the "position" in the "x" axis of this node. NodePath propertyPath = nodePath.GetAsPropertyPath(); GD.Print(propertyPath); // Prints ":position:x" [/csharp] [/codeblocks]

fn (NodePath) is_empty #

fn (s &NodePath) is_empty() bool

Returns true if the node path has been constructed from an empty [String] ("").

fn (NodePath) to_variant #

fn (s &NodePath) to_variant() Variant

fn (NodePath) from_variant #

fn (mut s NodePath) from_variant(variant &Variant)

fn (NodePath) == #

fn (a NodePath) == (b NodePath) bool

Returns true if two node paths are equal, that is, they are composed of the same node names and subnames in the same order.

fn (NodePath) eq_nodepath #

fn (a NodePath) eq_nodepath(b NodePath) bool

Returns true if two node paths are equal, that is, they are composed of the same node names and subnames in the same order.

fn (NodePath) ne_nodepath #

fn (a NodePath) ne_nodepath(b NodePath) bool

Returns true if two node paths are not equal.

fn (NodePath) in_dictionary #

fn (a NodePath) in_dictionary(b Dictionary) bool

fn (NodePath) in_array #

fn (a NodePath) in_array(b Array) bool

struct NodePath_slice_Cfg #

@[params]
struct NodePath_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct Node_add_child_Cfg #

@[params]
struct Node_add_child_Cfg {
pub:
	force_readable_name bool
	internal            NodeInternalMode = unsafe { NodeInternalMode(0) }
}

Optional parameters for Node#add_child

struct Node_add_sibling_Cfg #

@[params]
struct Node_add_sibling_Cfg {
pub:
	force_readable_name bool
}

Optional parameters for Node#add_sibling

struct Node_add_to_group_Cfg #

@[params]
struct Node_add_to_group_Cfg {
pub:
	persistent bool
}

Optional parameters for Node#add_to_group

struct Node_atr_Cfg #

@[params]
struct Node_atr_Cfg {
pub:
	context string
}

Optional parameters for Node#atr

struct Node_atr_n_Cfg #

@[params]
struct Node_atr_n_Cfg {
pub:
	context string
}

Optional parameters for Node#atr_n

struct Node_duplicate_Cfg #

@[params]
struct Node_duplicate_Cfg {
pub:
	flags i64 = 15
}

Optional parameters for Node#duplicate

struct Node_find_child_Cfg #

@[params]
struct Node_find_child_Cfg {
pub:
	recursive bool
	owned     bool
}

Optional parameters for Node#find_child

struct Node_find_children_Cfg #

@[params]
struct Node_find_children_Cfg {
pub:
	gd_type   string
	recursive bool
	owned     bool
}

Optional parameters for Node#find_children

struct Node_get_child_Cfg #

@[params]
struct Node_get_child_Cfg {
pub:
	include_internal bool
}

Optional parameters for Node#get_child

struct Node_get_child_count_Cfg #

@[params]
struct Node_get_child_count_Cfg {
pub:
	include_internal bool
}

Optional parameters for Node#get_child_count

struct Node_get_children_Cfg #

@[params]
struct Node_get_children_Cfg {
pub:
	include_internal bool
}

Optional parameters for Node#get_children

struct Node_get_index_Cfg #

@[params]
struct Node_get_index_Cfg {
pub:
	include_internal bool
}

Optional parameters for Node#get_index

struct Node_get_path_to_Cfg #

@[params]
struct Node_get_path_to_Cfg {
pub:
	use_unique_path bool
}

Optional parameters for Node#get_path_to

struct Node_propagate_call_Cfg #

@[params]
struct Node_propagate_call_Cfg {
pub:
	gd_args      Array = Array.new0()
	parent_first bool
}

Optional parameters for Node#propagate_call

struct Node_reparent_Cfg #

@[params]
struct Node_reparent_Cfg {
pub:
	keep_global_transform bool
}

Optional parameters for Node#reparent

struct Node_replace_by_Cfg #

@[params]
struct Node_replace_by_Cfg {
pub:
	keep_groups bool
}

Optional parameters for Node#replace_by

struct Node_set_multiplayer_authority_Cfg #

@[params]
struct Node_set_multiplayer_authority_Cfg {
pub:
	recursive bool
}

Optional parameters for Node#set_multiplayer_authority

struct Noise #

struct Noise {
	Resource
}

Abstract base class for noise generators.

fn (Noise) to_variant #

fn (s &Noise) to_variant() Variant

fn (Noise) from_variant #

fn (mut s Noise) from_variant(variant &Variant)

fn (Noise) get_noise_1d #

fn (s &Noise) get_noise_1d(x f64) f64

Returns the 1D noise value at the given (x) coordinate.

fn (Noise) get_noise_2d #

fn (s &Noise) get_noise_2d(x f64, y f64) f64

Returns the 2D noise value at the given position.

fn (Noise) get_noise_2dv #

fn (s &Noise) get_noise_2dv(v Vector2) f64

Returns the 2D noise value at the given position.

fn (Noise) get_noise_3d #

fn (s &Noise) get_noise_3d(x f64, y f64, z f64) f64

Returns the 3D noise value at the given position.

fn (Noise) get_noise_3dv #

fn (s &Noise) get_noise_3dv(v Vector3) f64

Returns the 3D noise value at the given position.

fn (Noise) get_image #

fn (s &Noise) get_image(width i64, height i64, cfg Noise_get_image_Cfg) Image

Returns an [Image] containing 2D noise values. [b]Note:[/b] With [param normalize] set to false, the default implementation expects the noise generator to return values in the range -1.0 to 1.0.

fn (Noise) get_seamless_image #

fn (s &Noise) get_seamless_image(width i64, height i64, cfg Noise_get_seamless_image_Cfg) Image

Returns an [Image] containing seamless 2D noise values. [b]Note:[/b] With [param normalize] set to false, the default implementation expects the noise generator to return values in the range -1.0 to 1.0.

fn (Noise) get_image_3d #

fn (s &Noise) get_image_3d(width i64, height i64, depth i64, cfg Noise_get_image_3d_Cfg) Array

Returns an [Array] of [Image]s containing 3D noise values for use with [method ImageTexture3D.create]. [b]Note:[/b] With [param normalize] set to false, the default implementation expects the noise generator to return values in the range -1.0 to 1.0.

fn (Noise) get_seamless_image_3d #

fn (s &Noise) get_seamless_image_3d(width i64, height i64, depth i64, cfg Noise_get_seamless_image_3d_Cfg) Array

Returns an [Array] of [Image]s containing seamless 3D noise values for use with [method ImageTexture3D.create]. [b]Note:[/b] With [param normalize] set to false, the default implementation expects the noise generator to return values in the range -1.0 to 1.0.

struct NoiseTexture2D #

struct NoiseTexture2D {
	Texture2D
}

A 2D texture filled with noise generated by a [Noise] object.

fn (NoiseTexture2D) to_variant #

fn (s &NoiseTexture2D) to_variant() Variant

fn (NoiseTexture2D) from_variant #

fn (mut s NoiseTexture2D) from_variant(variant &Variant)

fn (NoiseTexture2D) set_width #

fn (s &NoiseTexture2D) set_width(width i64)

fn (NoiseTexture2D) set_height #

fn (s &NoiseTexture2D) set_height(height i64)

fn (NoiseTexture2D) set_invert #

fn (s &NoiseTexture2D) set_invert(invert bool)

fn (NoiseTexture2D) get_invert #

fn (s &NoiseTexture2D) get_invert() bool

fn (NoiseTexture2D) set_in_3d_space #

fn (s &NoiseTexture2D) set_in_3d_space(enable bool)

fn (NoiseTexture2D) is_in_3d_space #

fn (s &NoiseTexture2D) is_in_3d_space() bool

fn (NoiseTexture2D) set_generate_mipmaps #

fn (s &NoiseTexture2D) set_generate_mipmaps(invert bool)

fn (NoiseTexture2D) is_generating_mipmaps #

fn (s &NoiseTexture2D) is_generating_mipmaps() bool

fn (NoiseTexture2D) set_seamless #

fn (s &NoiseTexture2D) set_seamless(seamless bool)

fn (NoiseTexture2D) get_seamless #

fn (s &NoiseTexture2D) get_seamless() bool

fn (NoiseTexture2D) set_seamless_blend_skirt #

fn (s &NoiseTexture2D) set_seamless_blend_skirt(seamless_blend_skirt f64)

fn (NoiseTexture2D) get_seamless_blend_skirt #

fn (s &NoiseTexture2D) get_seamless_blend_skirt() f64

fn (NoiseTexture2D) set_as_normal_map #

fn (s &NoiseTexture2D) set_as_normal_map(as_normal_map bool)

fn (NoiseTexture2D) is_normal_map #

fn (s &NoiseTexture2D) is_normal_map() bool

fn (NoiseTexture2D) set_bump_strength #

fn (s &NoiseTexture2D) set_bump_strength(bump_strength f64)

fn (NoiseTexture2D) get_bump_strength #

fn (s &NoiseTexture2D) get_bump_strength() f64

fn (NoiseTexture2D) set_normalize #

fn (s &NoiseTexture2D) set_normalize(normalize bool)

fn (NoiseTexture2D) is_normalized #

fn (s &NoiseTexture2D) is_normalized() bool

fn (NoiseTexture2D) set_color_ramp #

fn (s &NoiseTexture2D) set_color_ramp(gradient Gradient)

fn (NoiseTexture2D) get_color_ramp #

fn (s &NoiseTexture2D) get_color_ramp() Gradient

fn (NoiseTexture2D) set_noise #

fn (s &NoiseTexture2D) set_noise(noise Noise)

fn (NoiseTexture2D) get_noise #

fn (s &NoiseTexture2D) get_noise() Noise

struct NoiseTexture3D #

struct NoiseTexture3D {
	Texture3D
}

A 3D texture filled with noise generated by a [Noise] object.

fn (NoiseTexture3D) to_variant #

fn (s &NoiseTexture3D) to_variant() Variant

fn (NoiseTexture3D) from_variant #

fn (mut s NoiseTexture3D) from_variant(variant &Variant)

fn (NoiseTexture3D) set_width #

fn (s &NoiseTexture3D) set_width(width i64)

fn (NoiseTexture3D) set_height #

fn (s &NoiseTexture3D) set_height(height i64)

fn (NoiseTexture3D) set_depth #

fn (s &NoiseTexture3D) set_depth(depth i64)

fn (NoiseTexture3D) set_invert #

fn (s &NoiseTexture3D) set_invert(invert bool)

fn (NoiseTexture3D) get_invert #

fn (s &NoiseTexture3D) get_invert() bool

fn (NoiseTexture3D) set_seamless #

fn (s &NoiseTexture3D) set_seamless(seamless bool)

fn (NoiseTexture3D) get_seamless #

fn (s &NoiseTexture3D) get_seamless() bool

fn (NoiseTexture3D) set_seamless_blend_skirt #

fn (s &NoiseTexture3D) set_seamless_blend_skirt(seamless_blend_skirt f64)

fn (NoiseTexture3D) get_seamless_blend_skirt #

fn (s &NoiseTexture3D) get_seamless_blend_skirt() f64

fn (NoiseTexture3D) set_normalize #

fn (s &NoiseTexture3D) set_normalize(normalize bool)

fn (NoiseTexture3D) is_normalized #

fn (s &NoiseTexture3D) is_normalized() bool

fn (NoiseTexture3D) set_color_ramp #

fn (s &NoiseTexture3D) set_color_ramp(gradient Gradient)

fn (NoiseTexture3D) get_color_ramp #

fn (s &NoiseTexture3D) get_color_ramp() Gradient

fn (NoiseTexture3D) set_noise #

fn (s &NoiseTexture3D) set_noise(noise Noise)

fn (NoiseTexture3D) get_noise #

fn (s &NoiseTexture3D) get_noise() Noise

struct Noise_get_image_3d_Cfg #

@[params]
struct Noise_get_image_3d_Cfg {
pub:
	invert    bool
	normalize bool
}

Optional parameters for Noise#get_image_3d

struct Noise_get_image_Cfg #

@[params]
struct Noise_get_image_Cfg {
pub:
	invert      bool
	in_3d_space bool
	normalize   bool
}

Optional parameters for Noise#get_image

struct Noise_get_seamless_image_3d_Cfg #

@[params]
struct Noise_get_seamless_image_3d_Cfg {
pub:
	invert    bool
	skirt     f64 = 0.1
	normalize bool
}

Optional parameters for Noise#get_seamless_image_3d

struct Noise_get_seamless_image_Cfg #

@[params]
struct Noise_get_seamless_image_Cfg {
pub:
	invert      bool
	in_3d_space bool
	skirt       f64 = 0.1
	normalize   bool
}

Optional parameters for Noise#get_seamless_image

struct ORMMaterial3D #

struct ORMMaterial3D {
	BaseMaterial3D
}

A PBR (Physically Based Rendering) material to be used on 3D objects. Uses an ORM texture.

fn (ORMMaterial3D) to_variant #

fn (s &ORMMaterial3D) to_variant() Variant

fn (ORMMaterial3D) from_variant #

fn (mut s ORMMaterial3D) from_variant(variant &Variant)

struct OS #

struct OS {
	Object
}

Provides access to common operating system functionalities.

fn (OS) to_variant #

fn (s &OS) to_variant() Variant

fn (OS) from_variant #

fn (mut s OS) from_variant(variant &Variant)

fn (OS) get_entropy #

fn (s &OS) get_entropy(size i64) PackedByteArray

Generates a [PackedByteArray] of cryptographically secure random bytes with given [param size]. [b]Note:[/b] Generating large quantities of bytes using this method can result in locking and entropy of lower quality on most platforms. Using [method Crypto.generate_random_bytes] is preferred in most cases.

fn (OS) get_system_ca_certificates #

fn (s &OS) get_system_ca_certificates() string

Returns the list of certification authorities trusted by the operating system as a string of concatenated certificates in PEM format.

fn (OS) get_connected_midi_inputs #

fn (s &OS) get_connected_midi_inputs() PackedStringArray

Returns an array of connected MIDI device names, if they exist. Returns an empty array if the system MIDI driver has not previously been initialized with [method open_midi_inputs]. See also [method close_midi_inputs]. [b]Note:[/b] This method is implemented on Linux, macOS, Windows, and Web. [b]Note:[/b] On the Web platform, Web MIDI needs to be supported by the browser. [url=https://caniuse.com/midi]For the time being[/url], it is currently supported by all major browsers, except Safari. [b]Note:[/b] On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling [method open_midi_inputs]. The browser will refrain from processing MIDI input until the user accepts the permission request.

fn (OS) open_midi_inputs #

fn (s &OS) open_midi_inputs()

Initializes the singleton for the system MIDI driver, allowing Godot to receive [InputEventMIDI]. See also [method get_connected_midi_inputs] and [method close_midi_inputs]. [b]Note:[/b] This method is implemented on Linux, macOS, Windows, and Web. [b]Note:[/b] On the Web platform, Web MIDI needs to be supported by the browser. [url=https://caniuse.com/midi]For the time being[/url], it is currently supported by all major browsers, except Safari. [b]Note:[/b] On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling [method open_midi_inputs]. The browser will refrain from processing MIDI input until the user accepts the permission request.

fn (OS) close_midi_inputs #

fn (s &OS) close_midi_inputs()

Shuts down the system MIDI driver. Godot will no longer receive [InputEventMIDI]. See also [method open_midi_inputs] and [method get_connected_midi_inputs]. [b]Note:[/b] This method is implemented on Linux, macOS, Windows, and Web.

fn (OS) alert #

fn (s &OS) alert(text string, cfg OS_alert_Cfg)

Displays a modal dialog box using the host platform's implementation. The engine execution is blocked until the dialog is closed.

fn (OS) crash #

fn (s &OS) crash(message string)

Crashes the engine (or the editor if called within a @tool script). See also [method kill]. [b]Note:[/b] This method should [i]only[/i] be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) [method @GDScript.assert], [method @GlobalScope.push_error], or [method alert].

fn (OS) set_low_processor_usage_mode #

fn (s &OS) set_low_processor_usage_mode(enable bool)

fn (OS) is_in_low_processor_usage_mode #

fn (s &OS) is_in_low_processor_usage_mode() bool

fn (OS) set_low_processor_usage_mode_sleep_usec #

fn (s &OS) set_low_processor_usage_mode_sleep_usec(usec i64)

fn (OS) get_low_processor_usage_mode_sleep_usec #

fn (s &OS) get_low_processor_usage_mode_sleep_usec() i64

fn (OS) set_delta_smoothing #

fn (s &OS) set_delta_smoothing(delta_smoothing_enabled bool)

fn (OS) is_delta_smoothing_enabled #

fn (s &OS) is_delta_smoothing_enabled() bool

fn (OS) get_processor_count #

fn (s &OS) get_processor_count() i64

Returns the number of [i]logical[/i] CPU cores available on the host machine. On CPUs with HyperThreading enabled, this number will be greater than the number of [i]physical[/i] CPU cores.

fn (OS) get_processor_name #

fn (s &OS) get_processor_name() string

Returns the full name of the CPU model on the host machine (e.g. "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"). [b]Note:[/b] This method is only implemented on Windows, macOS, Linux and iOS. On Android and Web, [method get_processor_name] returns an empty string.

fn (OS) get_system_fonts #

fn (s &OS) get_system_fonts() PackedStringArray

Returns the list of font family names available. [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.

fn (OS) get_system_font_path #

fn (s &OS) get_system_font_path(font_name string, cfg OS_get_system_font_path_Cfg) string

Returns the path to the system font file with [param font_name] and style. Returns an empty string if no matching fonts found. The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". [b]Note:[/b] Returned font might have different style if the requested style is not available. [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.

fn (OS) get_system_font_path_for_text #

fn (s &OS) get_system_font_path_for_text(font_name string, text string, cfg OS_get_system_font_path_for_text_Cfg) PackedStringArray

Returns an array of the system substitute font file paths, which are similar to the font with [param font_name] and style for the specified text, locale, and script. Returns an empty array if no matching fonts found. The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". [b]Note:[/b] Depending on OS, it's not guaranteed that any of the returned fonts will be suitable for rendering specified text. Fonts should be loaded and checked in the order they are returned, and the first suitable one used. [b]Note:[/b] Returned fonts might have different style if the requested style is not available or belong to a different font family. [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.

fn (OS) get_executable_path #

fn (s &OS) get_executable_path() string

Returns the file path to the current engine executable. [b]Note:[/b] On macOS, if you want to launch another instance of Godot, always use [method create_instance] instead of relying on the executable path.

fn (OS) read_string_from_stdin #

fn (s &OS) read_string_from_stdin(cfg OS_read_string_from_stdin_Cfg) string

Reads a user input as a UTF-8 encoded string from the standard input. This operation can be [i]blocking[/i], which causes the window to freeze if [method read_string_from_stdin] is called on the main thread.- If standard input is console, this method will block until the program receives a line break in standard input (usually by the user pressing [kbd]Enter[/kbd]).

  • If standard input is pipe, this method will block until a specific amount of data is read or pipe is closed.
  • If standard input is a file, this method will read a specific amount of data (or less if end-of-file is reached) and return immediately.[b]Note:[/b] This method automatically replaces \r\n line breaks with \n and removes them from the end of the string. Use [method read_buffer_from_stdin] to read the unprocessed data. [b]Note:[/b] This method is implemented on Linux, macOS, and Windows. [b]Note:[/b] On exported Windows builds, run the console wrapper executable to access the terminal. If standard input is console, calling this method without console wrapped will freeze permanently. If standard input is pipe or file, it can be used without console wrapper. If you need a single executable with full console support, use a custom build compiled with the windows_subsystem=console flag.

fn (OS) read_buffer_from_stdin #

fn (s &OS) read_buffer_from_stdin(cfg OS_read_buffer_from_stdin_Cfg) PackedByteArray

Reads a user input as raw data from the standard input. This operation can be [i]blocking[/i], which causes the window to freeze if [method read_buffer_from_stdin] is called on the main thread.- If standard input is console, this method will block until the program receives a line break in standard input (usually by the user pressing [kbd]Enter[/kbd]).

  • If standard input is pipe, this method will block until a specific amount of data is read or pipe is closed.
  • If standard input is a file, this method will read a specific amount of data (or less if end-of-file is reached) and return immediately.[b]Note:[/b] This method is implemented on Linux, macOS, and Windows. [b]Note:[/b] On exported Windows builds, run the console wrapper executable to access the terminal. If standard input is console, calling this method without console wrapped will freeze permanently. If standard input is pipe or file, it can be used without console wrapper. If you need a single executable with full console support, use a custom build compiled with the windows_subsystem=console flag.

fn (OS) get_stdin_type #

fn (s &OS) get_stdin_type() OSStdHandleType

Returns the type of the standard input device. [b]Note:[/b] This method is implemented on Linux, macOS, and Windows. [b]Note:[/b] On exported Windows builds, run the console wrapper executable to access the standard input. If you need a single executable with full console support, use a custom build compiled with the windows_subsystem=console flag.

fn (OS) get_stdout_type #

fn (s &OS) get_stdout_type() OSStdHandleType

Returns the type of the standard output device. [b]Note:[/b] This method is implemented on Linux, macOS, and Windows.

fn (OS) get_stderr_type #

fn (s &OS) get_stderr_type() OSStdHandleType

Returns the type of the standard error device. [b]Note:[/b] This method is implemented on Linux, macOS, and Windows.

fn (OS) execute #

fn (s &OS) execute(path string, arguments PackedStringArray, cfg OS_execute_Cfg) i64

Executes the given process in a [i]blocking[/i] way. The file specified in [param path] must exist and be executable. The system path resolution will be used. The [param arguments] are used in the given order, separated by spaces, and wrapped in quotes. If an [param output] array is provided, the complete shell output of the process is appended to [param output] as a single [String] element. If [param read_stderr] is true, the output to the standard error stream is also appended to the array. On Windows, if [param open_console] is true and the process is a console app, a new terminal window is opened. This method returns the exit code of the command, or -1 if the process fails to execute. [b]Note:[/b] The main thread will be blocked until the executed command terminates. Use [Thread] to create a separate thread that will not block the main thread, or use [method create_process] to create a completely independent process. For example, to retrieve a list of the working directory's contents: [codeblocks] [gdscript] var output = [] var exit_code = OS.execute("ls", ["-l", "/tmp"], output) [/gdscript] [csharp] Godot.Collections.Array output = []; int exitCode = OS.Execute("ls", ["-l", "/tmp"], output); [/csharp] [/codeblocks] If you wish to access a shell built-in or execute a composite command, a platform-specific shell can be invoked. For example: [codeblocks] [gdscript] var output = [] OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], output) [/gdscript] [csharp] Godot.Collections.Array output = []; OS.Execute("CMD.exe", ["/C", "cd %TEMP% && dir"], output); [/csharp] [/codeblocks] [b]Note:[/b] This method is implemented on Android, Linux, macOS, and Windows. [b]Note:[/b] To execute a Windows command interpreter built-in command, specify cmd.exe in [param path], /c as the first argument, and the desired command as the second argument. [b]Note:[/b] To execute a PowerShell built-in command, specify powershell.exe in [param path], -Command as the first argument, and the desired command as the second argument. [b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [param path], -c as the first argument, and the desired command as the second argument. [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export. [b]Note:[/b] On Android, system commands such as dumpsys can only be run on a rooted device.

fn (OS) execute_with_pipe #

fn (s &OS) execute_with_pipe(path string, arguments PackedStringArray, cfg OS_execute_with_pipe_Cfg) Dictionary

Creates a new process that runs independently of Godot with redirected IO. It will not terminate when Godot terminates. The path specified in [param path] must exist and be an executable file or macOS .app bundle. The path is resolved based on the current platform. The [param arguments] are used in the given order and separated by a space. If [param blocking] is false, created pipes work in non-blocking mode, i.e. read and write operations will return immediately. Use [method FileAccess.get_error] to check if the last read/write operation was successful. If the process cannot be created, this method returns an empty [Dictionary]. Otherwise, this method returns a [Dictionary] with the following keys:- "stdio" - [FileAccess] to access the process stdin and stdout pipes (read/write).

  • "stderr" - [FileAccess] to access the process stderr pipe (read only).
  • "pid" - Process ID as an [int], which you can use to monitor the process (and potentially terminate it with [method kill]).[b]Note:[/b] This method is implemented on Android, Linux, macOS, and Windows. [b]Note:[/b] To execute a Windows command interpreter built-in command, specify cmd.exe in [param path], /c as the first argument, and the desired command as the second argument. [b]Note:[/b] To execute a PowerShell built-in command, specify powershell.exe in [param path], -Command as the first argument, and the desired command as the second argument. [b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [param path], -c as the first argument, and the desired command as the second argument. [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments.

fn (OS) create_process #

fn (s &OS) create_process(path string, arguments PackedStringArray, cfg OS_create_process_Cfg) i64

Creates a new process that runs independently of Godot. It will not terminate when Godot terminates. The path specified in [param path] must exist and be an executable file or macOS .app bundle. The path is resolved based on the current platform. The [param arguments] are used in the given order and separated by a space. On Windows, if [param open_console] is true and the process is a console app, a new terminal window will be opened. If the process is successfully created, this method returns its process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). Otherwise, this method returns -1. [b]Example:[/b] Run another instance of the project: [codeblocks] [gdscript] var pid = OS.create_process(OS.get_executable_path(), []) [/gdscript] [csharp] var pid = OS.CreateProcess(OS.GetExecutablePath(), []); [/csharp] [/codeblocks] See [method execute] if you wish to run an external command and retrieve the results. [b]Note:[/b] This method is implemented on Android, Linux, macOS, and Windows. [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments.

fn (OS) create_instance #

fn (s &OS) create_instance(arguments PackedStringArray) i64

Creates a new instance of Godot that runs independently. The [param arguments] are used in the given order and separated by a space. If the process is successfully created, this method returns the new process' ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process cannot be created, this method returns -1. See [method create_process] if you wish to run a different process. [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.

fn (OS) open_with_program #

fn (s &OS) open_with_program(program_path string, paths PackedStringArray) GDError

Opens one or more files/directories with the specified application. The [param program_path] specifies the path to the application to use for opening the files, and [param paths] contains an array of file/directory paths to open. [b]Note:[/b] This method is mostly only relevant for macOS, where opening files using [method create_process] might fail. On other platforms, this falls back to using [method create_process]. [b]Note:[/b] On macOS, [param program_path] should ideally be the path to an .app bundle.

fn (OS) kill #

fn (s &OS) kill(pid i64) GDError

Kill (terminate) the process identified by the given process ID ([param pid]), such as the ID returned by [method execute] in non-blocking mode. See also [method crash]. [b]Note:[/b] This method can also be used to kill processes that were not spawned by the engine. [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.

fn (OS) shell_open #

fn (s &OS) shell_open(uri string) GDError

Requests the OS to open a resource identified by [param uri] with the most appropriate program. For example:- OS.shell_open("C:\\Users\\name\\Downloads") on Windows opens the file explorer at the user's Downloads folder.

  • OS.shell_open("C:/Users/name/Downloads") also works on Windows and opens the file explorer at the user's Downloads folder.
  • OS.shell_open("https://godotengine.org") opens the default web browser on the official Godot website.
  • OS.shell_open("mailto:example@example.com") opens the default email client with the "To" field set to example@example.com. See [url=https://datatracker.ietf.org/doc/html/rfc2368]RFC 2368 - The mailto URL scheme[/url] for a list of fields that can be added.Use [method ProjectSettings.globalize_path] to convert a res:// or user:// project path into a system path for use with this method. [b]Note:[/b] Use [method String.uri_encode] to encode characters within URLs in a URL-safe, portable way. This is especially required for line breaks. Otherwise, [method shell_open] may not work correctly in a project exported to the Web platform. [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS and Windows.

fn (OS) shell_show_in_file_manager #

fn (s &OS) shell_show_in_file_manager(file_or_dir_path string, cfg OS_shell_show_in_file_manager_Cfg) GDError

Requests the OS to open the file manager, navigate to the given [param file_or_dir_path] and select the target file or folder. If [param open_folder] is true and [param file_or_dir_path] is a valid directory path, the OS will open the file manager and navigate to the target folder without selecting anything. Use [method ProjectSettings.globalize_path] to convert a res:// or user:// project path into a system path to use with this method. [b]Note:[/b] This method is currently only implemented on Windows and macOS. On other platforms, it will fallback to [method shell_open] with a directory path of [param file_or_dir_path] prefixed with file://.

fn (OS) is_process_running #

fn (s &OS) is_process_running(pid i64) bool

Returns true if the child process ID ([param pid]) is still running or false if it has terminated. [param pid] must be a valid ID generated from [method create_process]. [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS, and Windows.

fn (OS) get_process_exit_code #

fn (s &OS) get_process_exit_code(pid i64) i64

Returns the exit code of a spawned process once it has finished running (see [method is_process_running]). Returns -1 if the [param pid] is not a PID of a spawned child process, the process is still running, or the method is not implemented for the current platform. [b]Note:[/b] Returns -1 if the [param pid] is a macOS bundled app process. [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.

fn (OS) get_process_id #

fn (s &OS) get_process_id() i64

Returns the number used by the host machine to uniquely identify this application. [b]Note:[/b] On Web, this method always returns 0.

fn (OS) has_environment #

fn (s &OS) has_environment(variable string) bool

Returns true if the environment variable with the name [param variable] exists. [b]Note:[/b] Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows.

fn (OS) get_environment #

fn (s &OS) get_environment(variable string) string

Returns the value of the given environment variable, or an empty string if [param variable] doesn't exist. [b]Note:[/b] Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows. [b]Note:[/b] On macOS, applications do not have access to shell environment variables.

fn (OS) set_environment #

fn (s &OS) set_environment(variable string, value string)

Sets the value of the environment variable [param variable] to [param value]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated. [b]Note:[/b] Environment variable names are case-sensitive on all platforms except Windows. The [param variable] name cannot be empty or include the = character. On Windows, there is a 32767 characters limit for the combined length of [param variable], [param value], and the = and null terminator characters that will be registered in the environment block.

fn (OS) unset_environment #

fn (s &OS) unset_environment(variable string)

Removes the given environment variable from the current environment, if it exists. The [param variable] name cannot be empty or include the = character. The environment variable will be removed for the Godot process and any process executed with [method execute] after running [method unset_environment]. The removal of the environment variable will [i]not[/i] persist to processes run after the Godot process was terminated. [b]Note:[/b] Environment variable names are case-sensitive on all platforms except Windows.

fn (OS) get_name #

fn (s &OS) get_name() string

Returns the name of the host platform.- On Windows, this is "Windows".

  • On macOS, this is "macOS".
  • On Linux-based operating systems, this is "Linux".
  • On BSD-based operating systems, this is "FreeBSD", "NetBSD", "OpenBSD", or "BSD" as a fallback.
  • On Android, this is "Android".
  • On iOS, this is "iOS".
  • On Web, this is "Web".[b]Note:[/b] Custom builds of the engine may support additional platforms, such as consoles, possibly returning other names. [codeblocks] [gdscript] match OS.get_name(): "Windows": print("Welcome to Windows!") "macOS": print("Welcome to macOS!") "Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD": print("Welcome to Linux/BSD!") "Android": print("Welcome to Android!") "iOS": print("Welcome to iOS!") "Web": print("Welcome to the Web!") [/gdscript] [csharp] switch (OS.GetName()) { case "Windows": GD.Print("Welcome to Windows"); break; case "macOS": GD.Print("Welcome to macOS!"); break; case "Linux": case "FreeBSD": case "NetBSD": case "OpenBSD": case "BSD": GD.Print("Welcome to Linux/BSD!"); break; case "Android": GD.Print("Welcome to Android!"); break; case "iOS": GD.Print("Welcome to iOS!"); break; case "Web": GD.Print("Welcome to the Web!"); break; } [/csharp] [/codeblocks] [b]Note:[/b] On Web platforms, it is still possible to determine the host platform's OS with feature tags. See [method has_feature].

fn (OS) get_distribution_name #

fn (s &OS) get_distribution_name() string

Returns the name of the distribution for Linux and BSD platforms (e.g. "Ubuntu", "Manjaro", "OpenBSD", etc.). Returns the same value as [method get_name] for stock Android ROMs, but attempts to return the custom ROM name for popular Android derivatives such as "LineageOS". Returns the same value as [method get_name] for other platforms. [b]Note:[/b] This method is not supported on the Web platform. It returns an empty string.

fn (OS) get_version #

fn (s &OS) get_version() string

Returns the exact production and build version of the operating system. This is different from the branded version used in marketing. This helps to distinguish between different releases of operating systems, including minor versions, and insider and custom builds.- For Windows, the major and minor version are returned, as well as the build number. For example, the returned string may look like 10.0.9926 for a build of Windows 10.

  • For rolling distributions, such as Arch Linux, an empty string is returned.
  • For macOS and iOS, the major and minor version are returned, as well as the patch number.
  • For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead.[b]Note:[/b] This method is not supported on the Web platform. It returns an empty string.

fn (OS) get_version_alias #

fn (s &OS) get_version_alias() string

Returns the branded version used in marketing, followed by the build number (on Windows), the version number (on macOS), or the SDK version and incremental build number (on Android). Examples include 11 (build 22000), Sequoia (15.0.0), and 15 (SDK 35 build abc528-11988f). This value can then be appended to [method get_name] to get a full, human-readable operating system name and version combination for the operating system. Windows feature updates such as 24H2 are not contained in the resulting string, but Windows Server is recognized as such (e.g. 2025 (build 26100) for Windows Server 2025). [b]Note:[/b] This method is only supported on Windows, macOS, and Android. On other operating systems, it returns the same value as [method get_version].

fn (OS) get_cmdline_args #

fn (s &OS) get_cmdline_args() PackedStringArray

Returns the command-line arguments passed to the engine. Command-line arguments can be written in any form, including both --key value and --key=value forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments. You can also incorporate environment variables using the [method get_environment] method. You can set [member ProjectSettings.editor/run/main_run_args] to define command-line arguments to be passed by the editor when running the project. [b]Example:[/b] Parse command-line arguments into a [Dictionary] using the --key=value form for arguments: [codeblocks] [gdscript] var arguments = {} for argument in OS.get_cmdline_args(): if argument.contains("="): var key_value = argument.split("=") arguments[key_value[0].trim_prefix("--")] = key_value[1] else:# Options without an argument will be present in the dictionary,

with the value set to an empty string.

arguments[argument.trim_prefix("--")] = "" [/gdscript] [csharp] var arguments = new Dictionary<string, string>(); foreach (var argument in OS.GetCmdlineArgs()) { if (argument.Contains('=')) { string[] keyValue = argument.Split("="); arguments[keyValue[0].TrimPrefix("--")] = keyValue[1]; } else { // Options without an argument will be present in the dictionary, // with the value set to an empty string. arguments[argument.TrimPrefix("--")] = ""; } } [/csharp] [/codeblocks] [b]Note:[/b] Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, pass the standard UNIX double dash (--) and then the custom arguments, which the engine will ignore by design. These can be read via [method get_cmdline_user_args].

fn (OS) get_cmdline_user_args #

fn (s &OS) get_cmdline_user_args() PackedStringArray

Returns the command-line user arguments passed to the engine. User arguments are ignored by the engine and reserved for the user. They are passed after the double dash -- argument. ++ may be used when -- is intercepted by another program (such as startx).

####
OS.get_cmdline_args()      ##OS.get_cmdline_user_args() ##

To get all passed arguments, use [method get_cmdline_args].

fn (OS) get_video_adapter_driver_info #

fn (s &OS) get_video_adapter_driver_info() PackedStringArray

Returns the video adapter driver name and version for the user's currently active graphics card, as a [PackedStringArray]. See also [method RenderingServer.get_video_adapter_api_version]. The first element holds the driver name, such as nvidia, amdgpu, etc. The second element holds the driver version. For example, on the nvidia driver on a Linux/BSD platform, the version is in the format 510.85.02. For Windows, the driver's format is 31.0.15.1659. [b]Note:[/b] This method is only supported on Linux/BSD and Windows when not running in headless mode. On other platforms, it returns an empty array.

fn (OS) set_restart_on_exit #

fn (s &OS) set_restart_on_exit(restart bool, cfg OS_set_restart_on_exit_Cfg)

If [param restart] is true, restarts the project automatically when it is exited with [method SceneTree.quit] or [constant Node.NOTIFICATION_WM_CLOSE_REQUEST]. Command-line [param arguments] can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass [method get_cmdline_args] as the value for [param arguments]. This method can be used to apply setting changes that require a restart. See also [method is_restart_on_exit_set] and [method get_restart_on_exit_arguments]. [b]Note:[/b] This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor. [b]Note:[/b] If the project process crashes or is [i]killed[/i] by the user (by sending SIGKILL instead of the usual SIGTERM), the project won't restart automatically.

fn (OS) is_restart_on_exit_set #

fn (s &OS) is_restart_on_exit_set() bool

Returns true if the project will automatically restart when it exits for any reason, false otherwise. See also [method set_restart_on_exit] and [method get_restart_on_exit_arguments].

fn (OS) get_restart_on_exit_arguments #

fn (s &OS) get_restart_on_exit_arguments() PackedStringArray

Returns the list of command line arguments that will be used when the project automatically restarts using [method set_restart_on_exit]. See also [method is_restart_on_exit_set].

fn (OS) delay_usec #

fn (s &OS) delay_usec(usec i64)

Delays execution of the current thread by [param usec] microseconds. [param usec] must be greater than or equal to 0. Otherwise, [method delay_usec] does nothing and prints an error message. [b]Note:[/b] [method delay_usec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, you may use [method SceneTree.create_timer]. Awaiting with a [SceneTreeTimer] delays the execution of code placed below the await without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). [b]Note:[/b] When [method delay_usec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_usec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process).

fn (OS) delay_msec #

fn (s &OS) delay_msec(msec i64)

Delays execution of the current thread by [param msec] milliseconds. [param msec] must be greater than or equal to 0. Otherwise, [method delay_msec] does nothing and prints an error message. [b]Note:[/b] [method delay_msec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, you may use [method SceneTree.create_timer]. Awaiting with [SceneTreeTimer] delays the execution of code placed below the await without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). [b]Note:[/b] When [method delay_msec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_msec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process).

fn (OS) get_locale #

fn (s &OS) get_locale() string

Returns the host OS locale as a [String] of the form language_Script_COUNTRY_VARIANT@extra. Every substring after language is optional and may not exist.- language - 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url], in lower case.

  • [code skip-lint]Script` - 4-letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case.
  • COUNTRY - 2 or 3-letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case.
  • VARIANT - language variant, region and sort order. The variant can have any number of underscored keywords.
  • extra - semicolon separated list of additional key words. This may include currency, calendar, sort order and numbering system information.If you want only the language code and not the fully specified locale from the OS, you can use [method get_locale_language].

fn (OS) get_locale_language #

fn (s &OS) get_locale_language() string

Returns the host OS locale's 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url] as a string which should be consistent on all platforms. This is equivalent to extracting the language part of the [method get_locale] string. This can be used to narrow down fully specified locale strings to only the "common" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with fr_CA locale, this would return fr.

fn (OS) get_model_name #

fn (s &OS) get_model_name() string

Returns the model name of the current device. [b]Note:[/b] This method is implemented on Android, iOS, macOS, and Windows. Returns "GenericDevice" on unsupported platforms.

fn (OS) is_userfs_persistent #

fn (s &OS) is_userfs_persistent() bool

Returns true if the user:// file system is persistent, that is, its state is the same after a player quits and starts the game again. Relevant to the Web platform, where this persistence may be unavailable.

fn (OS) is_stdout_verbose #

fn (s &OS) is_stdout_verbose() bool

Returns true if the engine was executed with the --verbose or -v command line argument, or if [member ProjectSettings.debug/settings/stdout/verbose_stdout] is true. See also [method @GlobalScope.print_verbose].

fn (OS) is_debug_build #

fn (s &OS) is_debug_build() bool

Returns true if the Godot binary used to run the project is a [i]debug[/i] export template, or when running in the editor. Returns false if the Godot binary used to run the project is a [i]release[/i] export template. [b]Note:[/b] To check whether the Godot binary used to run the project is an export template (debug or release), use OS.has_feature("template") instead.

fn (OS) get_static_memory_usage #

fn (s &OS) get_static_memory_usage() i64

Returns the amount of static memory being used by the program in bytes. Only works in debug builds.

fn (OS) get_static_memory_peak_usage #

fn (s &OS) get_static_memory_peak_usage() i64

Returns the maximum amount of static memory used. Only works in debug builds.

fn (OS) get_memory_info #

fn (s &OS) get_memory_info() Dictionary

Returns a [Dictionary] containing information about the current memory with the following entries:- "physical" - total amount of usable physical memory in bytes. This value can be slightly less than the actual physical memory amount, since it does not include memory reserved by the kernel and devices.

  • "free" - amount of physical memory, that can be immediately allocated without disk access or other costly operations, in bytes. The process might be able to allocate more physical memory, but this action will require moving inactive pages to disk, which can be expensive.
  • "available" - amount of memory that can be allocated without extending the swap file(s), in bytes. This value includes both physical memory and swap.
  • "stack" - size of the current thread stack in bytes.[b]Note:[/b] Each entry's value may be -1 if it is unknown.

fn (OS) move_to_trash #

fn (s &OS) move_to_trash(path string) GDError

Moves the file or directory at the given [param path] to the system's recycle bin. See also [method DirAccess.remove]. The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in res:// as it will not work in exported projects. Returns [constant FAILED] if the file or directory cannot be found, or the system does not support this method. [codeblocks] [gdscript] var file_to_remove = "user://slot1.save" OS.move_to_trash(ProjectSettings.globalize_path(file_to_remove)) [/gdscript] [csharp] var fileToRemove = "user://slot1.save"; OS.MoveToTrash(ProjectSettings.GlobalizePath(fileToRemove)); [/csharp] [/codeblocks] [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. [b]Note:[/b] If the user has disabled the recycle bin on their system, the file will be permanently deleted instead.

fn (OS) get_user_data_dir #

fn (s &OS) get_user_data_dir() string

Returns the absolute directory path where user data is written (the user:// directory in Godot). The path depends on the project name and [member ProjectSettings.application/config/use_custom_user_dir].- On Windows, this is %AppData%\Godot\app_userdata\[project_name], or %AppData%\[custom_name] if use_custom_user_dir is set. %AppData% expands to %UserProfile%\AppData\Roaming.

  • On macOS, this is ~/Library/Application Support/Godot/app_userdata/[project_name], or ~/Library/Application Support/[custom_name] if use_custom_user_dir is set.
  • On Linux and BSD, this is ~/.local/share/godot/app_userdata/[project_name], or ~/.local/share/[custom_name] if use_custom_user_dir is set.
  • On Android and iOS, this is a sandboxed directory in either internal or external storage, depending on the user's configuration.
  • On Web, this is a virtual directory managed by the browser.If the project name is empty, [project_name] falls back to [unnamed project]. Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user home directory.

fn (OS) get_system_dir #

fn (s &OS) get_system_dir(dir OSSystemDir, cfg OS_get_system_dir_Cfg) string

Returns the path to commonly used folders across different platforms, as defined by [param dir]. See the [enum SystemDir] constants for available locations. [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. [b]Note:[/b] Shared storage is implemented on Android and allows to differentiate between app specific and shared directories, if [param shared_storage] is true. Shared directories have additional restrictions on Android.

fn (OS) get_config_dir #

fn (s &OS) get_config_dir() string

Returns the [i]global[/i] user configuration directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the XDG_CONFIG_HOME environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.

fn (OS) get_data_dir #

fn (s &OS) get_data_dir() string

Returns the [i]global[/i] user data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the XDG_DATA_HOME environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.

fn (OS) get_cache_dir #

fn (s &OS) get_cache_dir() string

Returns the [i]global[/i] cache data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the XDG_CACHE_HOME environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.

fn (OS) get_temp_dir #

fn (s &OS) get_temp_dir() string

Returns the [i]global[/i] temporary data directory according to the operating system's standards.

fn (OS) get_unique_id #

fn (s &OS) get_unique_id() string

Returns a string that is unique to the device. [b]Note:[/b] This string may change without notice if the user reinstalls their operating system, upgrades it, or modifies their hardware. This means it should generally not be used to encrypt persistent data, as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by this method for security purposes. [b]Note:[/b] On Web, returns an empty string and generates an error, as this method cannot be implemented for security reasons.

fn (OS) get_keycode_string #

fn (s &OS) get_keycode_string(code Key) string

Returns the given keycode as a [String]. [codeblocks] [gdscript] print(OS.get_keycode_string(KEY_C)) # Prints "C" print(OS.get_keycode_string(KEY_ESCAPE)) # Prints "Escape" print(OS.get_keycode_string(KEY_MASK_SHIFT | KEY_TAB)) # Prints "Shift+Tab" [/gdscript] [csharp] GD.Print(OS.GetKeycodeString(Key.C)); // Prints "C" GD.Print(OS.GetKeycodeString(Key.Escape)); // Prints "Escape" GD.Print(OS.GetKeycodeString((Key)KeyModifierMask.MaskShift | Key.Tab)); // Prints "Shift+Tab" [/csharp] [/codeblocks] See also [method find_keycode_from_string], [member InputEventKey.keycode], and [method InputEventKey.get_keycode_with_modifiers].

fn (OS) is_keycode_unicode #

fn (s &OS) is_keycode_unicode(code i64) bool

Returns true if the input keycode corresponds to a Unicode character. For a list of codes, see the [enum Key] constants. [codeblocks] [gdscript] print(OS.is_keycode_unicode(KEY_G)) # Prints true print(OS.is_keycode_unicode(KEY_KP_4)) # Prints true print(OS.is_keycode_unicode(KEY_TAB)) # Prints false print(OS.is_keycode_unicode(KEY_ESCAPE)) # Prints false [/gdscript] [csharp] GD.Print(OS.IsKeycodeUnicode((long)Key.G)); // Prints True GD.Print(OS.IsKeycodeUnicode((long)Key.Kp4)); // Prints True GD.Print(OS.IsKeycodeUnicode((long)Key.Tab)); // Prints False GD.Print(OS.IsKeycodeUnicode((long)Key.Escape)); // Prints False [/csharp] [/codeblocks]

fn (OS) find_keycode_from_string #

fn (s &OS) find_keycode_from_string(gd_string string) Key

Finds the keycode for the given string. The returned values are equivalent to the [enum Key] constants. [codeblocks] [gdscript] print(OS.find_keycode_from_string("C")) # Prints 67 (KEY_C) print(OS.find_keycode_from_string("Escape")) # Prints 4194305 (KEY_ESCAPE) print(OS.find_keycode_from_string("Shift+Tab")) # Prints 37748738 (KEY_MASK_SHIFT | KEY_TAB) print(OS.find_keycode_from_string("Unknown")) # Prints 0 (KEY_NONE) [/gdscript] [csharp] GD.Print(OS.FindKeycodeFromString("C")); // Prints C (Key.C) GD.Print(OS.FindKeycodeFromString("Escape")); // Prints Escape (Key.Escape) GD.Print(OS.FindKeycodeFromString("Shift+Tab")); // Prints 37748738 (KeyModifierMask.MaskShift | Key.Tab) GD.Print(OS.FindKeycodeFromString("Unknown")); // Prints None (Key.None) [/csharp] [/codeblocks] See also [method get_keycode_string].

fn (OS) set_use_file_access_save_and_swap #

fn (s &OS) set_use_file_access_save_and_swap(enabled bool)

If [param enabled] is true, when opening a file for writing, a temporary file is used in its place. When closed, it is automatically applied to the target file. This can useful when files may be opened by other applications, such as antiviruses, text editors, or even the Godot editor itself.

fn (OS) set_thread_name #

fn (s &OS) set_thread_name(name string) GDError

Assigns the given name to the current thread. Returns [constant ERR_UNAVAILABLE] if unavailable on the current platform.

fn (OS) get_thread_caller_id #

fn (s &OS) get_thread_caller_id() i64

Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications. [b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts.

fn (OS) get_main_thread_id #

fn (s &OS) get_main_thread_id() i64

Returns the ID of the main thread. See [method get_thread_caller_id]. [b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts.

fn (OS) has_feature #

fn (s &OS) has_feature(tag_name string) bool

Returns true if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=$DOCS_URL/tutorials/export/feature_tags.html]Feature Tags[/url] documentation for more details. [b]Note:[/b] Tag names are case-sensitive. [b]Note:[/b] On the Web platform, one of the following additional tags is defined to indicate the host platform: web_android, web_ios, web_linuxbsd, web_macos, or web_windows.

fn (OS) is_sandboxed #

fn (s &OS) is_sandboxed() bool

Returns true if the application is running in the sandbox. [b]Note:[/b] This method is only implemented on macOS and Linux.

fn (OS) request_permission #

fn (s &OS) request_permission(name string) bool

Requests permission from the OS for the given [param name]. Returns true if the permission has already been granted. See also [signal MainLoop.on_request_permissions_result]. The [param name] must be the full permission name. For example:- OS.request_permission("android.permission.READ_EXTERNAL_STORAGE")

  • OS.request_permission("android.permission.POST_NOTIFICATIONS")
  • OS.request_permission("macos.permission.RECORD_SCREEN")[b]Note:[/b] On Android, permission must be checked during export. [b]Note:[/b] This method is implemented on Android and macOS.

fn (OS) request_permissions #

fn (s &OS) request_permissions() bool

Requests [i]dangerous[/i] permissions from the OS. Returns true if permissions have already been granted. See also [signal MainLoop.on_request_permissions_result]. [b]Note:[/b] Permissions must be checked during export. [b]Note:[/b] This method is only implemented on Android. Normal permissions are automatically granted at install time in Android applications.

fn (OS) get_granted_permissions #

fn (s &OS) get_granted_permissions() PackedStringArray

On Android devices: Returns the list of dangerous permissions that have been granted. On macOS: Returns the list of granted permissions and user selected folders accessible to the application (sandboxed applications only). Use the native file dialog to request folder access permission.

fn (OS) revoke_granted_permissions #

fn (s &OS) revoke_granted_permissions()

On macOS (sandboxed applications only), this function clears list of user selected folders accessible to the application.

fn (OS) add_logger #

fn (s &OS) add_logger(logger Logger)

Add a custom logger to intercept the internal message stream.

fn (OS) remove_logger #

fn (s &OS) remove_logger(logger Logger)

Remove a custom logger added by [method add_logger].

struct OS_alert_Cfg #

@[params]
struct OS_alert_Cfg {
pub:
	title string
}

Optional parameters for OS#alert

struct OS_create_process_Cfg #

@[params]
struct OS_create_process_Cfg {
pub:
	open_console bool
}

Optional parameters for OS#create_process

struct OS_execute_Cfg #

@[params]
struct OS_execute_Cfg {
pub:
	output       Array = Array.new0()
	read_stderr  bool
	open_console bool
}

Optional parameters for OS#execute

struct OS_execute_with_pipe_Cfg #

@[params]
struct OS_execute_with_pipe_Cfg {
pub:
	blocking bool
}

Optional parameters for OS#execute_with_pipe

struct OS_get_system_dir_Cfg #

@[params]
struct OS_get_system_dir_Cfg {
pub:
	shared_storage bool
}

Optional parameters for OS#get_system_dir

struct OS_get_system_font_path_Cfg #

@[params]
struct OS_get_system_font_path_Cfg {
pub:
	weight  i64 = 400
	stretch i64 = 100
	italic  bool
}

Optional parameters for OS#get_system_font_path

struct OS_get_system_font_path_for_text_Cfg #

@[params]
struct OS_get_system_font_path_for_text_Cfg {
pub:
	locale  string
	script  string
	weight  i64 = 400
	stretch i64 = 100
	italic  bool
}

Optional parameters for OS#get_system_font_path_for_text

struct OS_read_buffer_from_stdin_Cfg #

@[params]
struct OS_read_buffer_from_stdin_Cfg {
pub:
	buffer_size i64 = 1024
}

Optional parameters for OS#read_buffer_from_stdin

struct OS_read_string_from_stdin_Cfg #

@[params]
struct OS_read_string_from_stdin_Cfg {
pub:
	buffer_size i64 = 1024
}

Optional parameters for OS#read_string_from_stdin

struct OS_set_restart_on_exit_Cfg #

@[params]
struct OS_set_restart_on_exit_Cfg {
pub:
	arguments PackedStringArray = PackedStringArray{}
}

Optional parameters for OS#set_restart_on_exit

struct OS_shell_show_in_file_manager_Cfg #

@[params]
struct OS_shell_show_in_file_manager_Cfg {
pub:
	open_folder bool
}

Optional parameters for OS#shell_show_in_file_manager

struct Object #

struct Object {
pub mut:
	ptr voidptr = unsafe { nil }
}

Base class for all other classes in the engine.

fn (Object) add_user_signal #

fn (s &Object) add_user_signal(signal string, cfg Object_add_user_signal_Cfg)

Adds a user-defined signal named [param signal]. Optional arguments for the signal can be added as an [Array] of dictionaries, each defining a name [String] and a type [int] (see [enum Variant.Type]). See also [method has_user_signal] and [method remove_user_signal]. [codeblocks] [gdscript] add_user_signal("hurt", [ { "name": "damage", "type": TYPE_INT }, { "name": "source", "type": TYPE_OBJECT } ]) [/gdscript] [csharp] AddUserSignal("Hurt", [ new Godot.Collections.Dictionary() { { "name", "damage" }, { "type", (int)Variant.Type.Int }, }, new Godot.Collections.Dictionary() { { "name", "source" }, { "type", (int)Variant.Type.Object }, }, ]); [/csharp] [/codeblocks]

fn (Object) call #

fn (s &Object) call(method string, varargs ...ToVariant) Variant

Calls the [param method] on the object and returns the result. This method supports a variable number of arguments, so parameters can be passed as a comma separated list. [codeblocks] [gdscript] var node = Node3D.new() node.call("rotate", Vector3(1.0, 0.0, 0.0), 1.571) [/gdscript] [csharp] var node = new Node3D(); node.Call(Node3D.MethodName.Rotate, new Vector3(1f, 0f, 0f), 1.571f); [/csharp] [/codeblocks] [b]Note:[/b] In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the MethodName class to avoid allocating a new [StringName] on each call.

fn (Object) call_deferred #

fn (s &Object) call_deferred(method string, varargs ...ToVariant) Variant

Calls the [param method] on the object during idle time. Always returns null, [b]not[/b] the method's result. Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly. This method supports a variable number of arguments, so parameters can be passed as a comma separated list. [codeblocks] [gdscript] var node = Node3D.new() node.call_deferred("rotate", Vector3(1.0, 0.0, 0.0), 1.571) [/gdscript] [csharp] var node = new Node3D(); node.CallDeferred(Node3D.MethodName.Rotate, new Vector3(1f, 0f, 0f), 1.571f); [/csharp] [/codeblocks] See also [method Callable.call_deferred]. [b]Note:[/b] In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the MethodName class to avoid allocating a new [StringName] on each call. [b]Note:[/b] If you're looking to delay the function call by a frame, refer to the [signal SceneTree.process_frame] and [signal SceneTree.physics_frame] signals.

var node = Node3D.new()
##var callable = node.rotate.bind(Vector3(1.0, 0.0, 0.0), 1.571)
####get_tree().process_frame.connect(callable, CONNECT_ONE_SHOT)

fn (Object) callv #

fn (s &Object) callv(method string, arg_array Array) Variant

Calls the [param method] on the object and returns the result. Unlike [method call], this method expects all parameters to be contained inside [param arg_array]. [codeblocks] [gdscript] var node = Node3D.new() node.callv("rotate", [Vector3(1.0, 0.0, 0.0), 1.571]) [/gdscript] [csharp] var node = new Node3D(); node.Callv(Node3D.MethodName.Rotate, [new Vector3(1f, 0f, 0f), 1.571f]); [/csharp] [/codeblocks] [b]Note:[/b] In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the MethodName class to avoid allocating a new [StringName] on each call.

fn (Object) can_translate_messages #

fn (s &Object) can_translate_messages() bool

Returns true if the object is allowed to translate messages with [method tr] and [method tr_n]. See also [method set_message_translation].

fn (Object) cancel_free #

fn (s &Object) cancel_free()

If this method is called during [constant NOTIFICATION_PREDELETE], this object will reject being freed and will remain allocated. This is mostly an internal function used for error handling to avoid the user from freeing objects when they are not intended to.

fn (Object) cast_to #

fn (s &Object) cast_to[T]() T

fn (Object) cast_to_v #

fn (s &Object) cast_to_v[T]() &T

fn (Object) connect #

fn (s &Object) connect(signal string, callable Callable, cfg Object_connect_Cfg) GDError

Connects a [param signal] by name to a [param callable]. Optional [param flags] can be also added to configure the connection's behavior (see [enum ConnectFlags] constants). A signal can only be connected once to the same [Callable]. If the signal is already connected, this method returns [constant ERR_INVALID_PARAMETER] and generates an error, unless the signal is connected with [constant CONNECT_REFERENCE_COUNTED]. To prevent this, use [method is_connected] first to check for existing connections. [b]Note:[/b] If the [param callable]'s object is freed, the connection will be lost. [b]Note:[/b] In GDScript, it is generally recommended to connect signals with [method Signal.connect] instead. [b]Note:[/b] This operation (and all other signal related operations) is thread-safe.

fn (Object) disconnect #

fn (s &Object) disconnect(signal string, callable Callable)

Disconnects a [param signal] by name from a given [param callable]. If the connection does not exist, generates an error. Use [method is_connected] to make sure that the connection exists.

fn (Object) emit_signal #

fn (s &Object) emit_signal(signal string, varargs ...ToVariant) GDError

Emits the given [param signal] by name. The signal must exist, so it should be a built-in signal of this class or one of its inherited classes, or a user-defined signal (see [method add_user_signal]). This method supports a variable number of arguments, so parameters can be passed as a comma separated list. Returns [constant ERR_UNAVAILABLE] if [param signal] does not exist or the parameters are invalid. [codeblocks] [gdscript] emit_signal("hit", "sword", 100) emit_signal("game_over") [/gdscript] [csharp] EmitSignal(SignalName.Hit, "sword", 100); EmitSignal(SignalName.GameOver); [/csharp] [/codeblocks] [b]Note:[/b] In C#, [param signal] must be in snake_case when referring to built-in Godot signals. Prefer using the names exposed in the SignalName class to avoid allocating a new [StringName] on each call.

fn (Object) from_variant #

fn (mut s Object) from_variant(variant &Variant)

fn (Object) get #

fn (s &Object) get(property string) Variant

Returns the [Variant] value of the given [param property]. If the [param property] does not exist, this method returns null. [codeblocks] [gdscript] var node = Node2D.new() node.rotation = 1.5 var a = node.get("rotation") # a is 1.5 [/gdscript] [csharp] var node = new Node2D(); node.Rotation = 1.5f; var a = node.Get(Node2D.PropertyName.Rotation); // a is 1.5 [/csharp] [/codeblocks] [b]Note:[/b] In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the PropertyName class to avoid allocating a new [StringName] on each call.

fn (Object) get_class #

fn (s &Object) get_class() string

Returns the object's built-in class name, as a [String]. See also [method is_class]. [b]Note:[/b] This method ignores class_name declarations. If this object's script has defined a class_name, the base, built-in class name is returned instead.

fn (Object) get_incoming_connections #

fn (s &Object) get_incoming_connections() Array

Returns an [Array] of signal connections received by this object. Each connection is represented as a [Dictionary] that contains three entries:- signal is a reference to the [Signal];

  • callable is a reference to the [Callable];
  • flags is a combination of [enum ConnectFlags].

fn (Object) get_indexed #

fn (s &Object) get_indexed(property_path NodePath) Variant

Gets the object's property indexed by the given [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character (:) to access nested properties. [b]Examples:[/b] "position:x" or "material:next_pass:blend_mode". [codeblocks] [gdscript] var node = Node2D.new() node.position = Vector2(5, -10) var a = node.get_indexed("position") # a is Vector2(5, -10) var b = node.get_indexed("position:y") # b is -10 [/gdscript] [csharp] var node = new Node2D(); node.Position = new Vector2(5, -10); var a = node.GetIndexed("position"); // a is Vector2(5, -10) var b = node.GetIndexed("position:y"); // b is -10 [/csharp] [/codeblocks] [b]Note:[/b] In C#, [param property_path] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the PropertyName class to avoid allocating a new [StringName] on each call. [b]Note:[/b] This method does not support actual paths to nodes in the [SceneTree], only sub-property paths. In the context of nodes, use [method Node.get_node_and_resource] instead.

fn (Object) get_instance_id #

fn (s &Object) get_instance_id() i64

Returns the object's unique instance ID. This ID can be saved in [EncodedObjectAsID], and can be used to retrieve this object instance with [method @GlobalScope.instance_from_id]. [b]Note:[/b] This ID is only useful during the current session. It won't correspond to a similar object if the ID is sent over a network, or loaded from a file at a later time.

fn (Object) get_meta #

fn (s &Object) get_meta(name string, cfg Object_get_meta_Cfg) Variant

Returns the object's metadata value for the given entry [param name]. If the entry does not exist, returns [param default]. If [param default] is null, an error is also generated. [b]Note:[/b] A metadata's name must be a valid identifier as per [method StringName.is_valid_identifier] method. [b]Note:[/b] Metadata that has a name starting with an underscore (_) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method.

fn (Object) get_meta_list #

fn (s &Object) get_meta_list() Array

Returns the object's metadata entry names as an [Array] of [StringName]s.

fn (Object) get_method_argument_count #

fn (s &Object) get_method_argument_count(method string) i64

Returns the number of arguments of the given [param method] by name. [b]Note:[/b] In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the MethodName class to avoid allocating a new [StringName] on each call.

fn (Object) get_method_list #

fn (s &Object) get_method_list() Array

Returns this object's methods and their signatures as an [Array] of dictionaries. Each [Dictionary] contains the following entries:- name is the name of the method, as a [String];

  • args is an [Array] of dictionaries representing the arguments;
  • default_args is the default arguments as an [Array] of variants;
  • flags is a combination of [enum MethodFlags];
  • id is the method's internal identifier [int];
  • return is the returned value, as a [Dictionary];[b]Note:[/b] The dictionaries of args and return are formatted identically to the results of [method get_property_list], although not all entries are used.

fn (Object) get_property_list #

fn (s &Object) get_property_list() Array

Returns the object's property list as an [Array] of dictionaries. Each [Dictionary] contains the following entries:- name is the property's name, as a [String];

  • class_name is an empty [StringName], unless the property is [constant TYPE_OBJECT] and it inherits from a class;
  • type is the property's type, as an [int] (see [enum Variant.Type]);
  • hint is [i]how[/i] the property is meant to be edited (see [enum PropertyHint]);
  • hint_string depends on the hint (see [enum PropertyHint]);
  • usage is a combination of [enum PropertyUsageFlags].[b]Note:[/b] In GDScript, all class members are treated as properties. In C# and GDExtension, it may be necessary to explicitly mark class members as Godot properties using decorators or attributes.

fn (Object) get_script #

fn (s &Object) get_script() Variant

Returns the object's [Script] instance, or null if no script is attached.

fn (Object) get_signal_connection_list #

fn (s &Object) get_signal_connection_list(signal string) Array

Returns an [Array] of connections for the given [param signal] name. Each connection is represented as a [Dictionary] that contains three entries:- [code skip-lint]signal` is a reference to the [Signal];

  • callable is a reference to the connected [Callable];
  • flags is a combination of [enum ConnectFlags].

fn (Object) get_signal_list #

fn (s &Object) get_signal_list() Array

Returns the list of existing signals as an [Array] of dictionaries. [b]Note:[/b] Due of the implementation, each [Dictionary] is formatted very similarly to the returned values of [method get_method_list].

fn (Object) get_translation_domain #

fn (s &Object) get_translation_domain() string

Returns the name of the translation domain used by [method tr] and [method tr_n]. See also [TranslationServer].

fn (Object) has_connections #

fn (s &Object) has_connections(signal string) bool

Returns true if any connection exists on the given [param signal] name. [b]Note:[/b] In C#, [param signal] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the SignalName class to avoid allocating a new [StringName] on each call.

fn (Object) has_meta #

fn (s &Object) has_meta(name string) bool

Returns true if a metadata entry is found with the given [param name]. See also [method get_meta], [method set_meta] and [method remove_meta]. [b]Note:[/b] A metadata's name must be a valid identifier as per [method StringName.is_valid_identifier] method. [b]Note:[/b] Metadata that has a name starting with an underscore (_) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method.

fn (Object) has_method #

fn (s &Object) has_method(method string) bool

Returns true if the given [param method] name exists in the object. [b]Note:[/b] In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the MethodName class to avoid allocating a new [StringName] on each call.

fn (Object) has_signal #

fn (s &Object) has_signal(signal string) bool

Returns true if the given [param signal] name exists in the object. [b]Note:[/b] In C#, [param signal] must be in snake_case when referring to built-in Godot signals. Prefer using the names exposed in the SignalName class to avoid allocating a new [StringName] on each call.

fn (Object) has_user_signal #

fn (s &Object) has_user_signal(signal string) bool

Returns true if the given user-defined [param signal] name exists. Only signals added with [method add_user_signal] are included. See also [method remove_user_signal].

fn (Object) is_blocking_signals #

fn (s &Object) is_blocking_signals() bool

Returns true if the object is blocking its signals from being emitted. See [method set_block_signals].

fn (Object) is_class #

fn (s &Object) is_class(class string) bool

Returns true if the object inherits from the given [param class]. See also [method get_class]. [codeblocks] [gdscript] var sprite2d = Sprite2D.new() sprite2d.is_class("Sprite2D") # Returns true sprite2d.is_class("Node") # Returns true sprite2d.is_class("Node3D") # Returns false [/gdscript] [csharp] var sprite2D = new Sprite2D(); sprite2D.IsClass("Sprite2D"); // Returns true sprite2D.IsClass("Node"); // Returns true sprite2D.IsClass("Node3D"); // Returns false [/csharp] [/codeblocks] [b]Note:[/b] This method ignores class_name declarations in the object's script.

fn (Object) is_connected #

fn (s &Object) is_connected(signal string, callable Callable) bool

Returns true if a connection exists between the given [param signal] name and [param callable]. [b]Note:[/b] In C#, [param signal] must be in snake_case when referring to built-in Godot signals. Prefer using the names exposed in the SignalName class to avoid allocating a new [StringName] on each call.

fn (Object) is_queued_for_deletion #

fn (s &Object) is_queued_for_deletion() bool

Returns true if the [method Node.queue_free] method was called for the object.

fn (Object) notification #

fn (s &Object) notification(what i64, cfg Object_notification_Cfg)

Sends the given [param what] notification to all classes inherited by the object, triggering calls to [method _notification], starting from the highest ancestor (the [Object] class) and going down to the object's script. If [param reversed] is true, the call order is reversed. [codeblocks] [gdscript] var player = Node2D.new() player.set_script(load("res://player.gd"))

player.notification(NOTIFICATION_ENTER_TREE)# The call order is Object -> Node -> Node2D -> player.gd.

player.notification(NOTIFICATION_ENTER_TREE, true)# The call order is player.gd -> Node2D -> Node -> Object.[/gdscript] [csharp] var player = new Node2D(); player.SetScript(GD.Load("res://player.gd"));

player.Notification(NotificationEnterTree); // The call order is GodotObject -> Node -> Node2D -> player.gd.

player.Notification(NotificationEnterTree, true); // The call order is player.gd -> Node2D -> Node -> GodotObject. [/csharp] [/codeblocks]

fn (Object) notify_property_list_changed #

fn (s &Object) notify_property_list_changed()

Emits the [signal property_list_changed] signal. This is mainly used to refresh the editor, so that the Inspector and editor plugins are properly updated.

fn (Object) property_can_revert #

fn (s &Object) property_can_revert(property string) bool

Returns true if the given [param property] has a custom default value. Use [method property_get_revert] to get the [param property]'s default value. [b]Note:[/b] This method is used by the Inspector dock to display a revert icon. The object must implement [method _property_can_revert] to customize the default value. If [method _property_can_revert] is not implemented, this method returns false.

fn (Object) property_get_revert #

fn (s &Object) property_get_revert(property string) Variant

Returns the custom default value of the given [param property]. Use [method property_can_revert] to check if the [param property] has a custom default value. [b]Note:[/b] This method is used by the Inspector dock to display a revert icon. The object must implement [method _property_get_revert] to customize the default value. If [method _property_get_revert] is not implemented, this method returns null.

fn (Object) remove_meta #

fn (s &Object) remove_meta(name string)

Removes the given entry [param name] from the object's metadata. See also [method has_meta], [method get_meta] and [method set_meta]. [b]Note:[/b] A metadata's name must be a valid identifier as per [method StringName.is_valid_identifier] method. [b]Note:[/b] Metadata that has a name starting with an underscore (_) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method.

fn (Object) remove_user_signal #

fn (s &Object) remove_user_signal(signal string)

Removes the given user signal [param signal] from the object. See also [method add_user_signal] and [method has_user_signal].

fn (Object) set #

fn (s &Object) set(property string, value_ ToVariant)

Assigns [param value] to the given [param property]. If the property does not exist or the given [param value]'s type doesn't match, nothing happens. [codeblocks] [gdscript] var node = Node2D.new() node.set("global_scale", Vector2(8, 2.5)) print(node.global_scale) # Prints (8.0, 2.5) [/gdscript] [csharp] var node = new Node2D(); node.Set(Node2D.PropertyName.GlobalScale, new Vector2(8, 2.5f)); GD.Print(node.GlobalScale); // Prints (8, 2.5) [/csharp] [/codeblocks] [b]Note:[/b] In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the PropertyName class to avoid allocating a new [StringName] on each call.

fn (Object) set_block_signals #

fn (s &Object) set_block_signals(enable bool)

If set to true, the object becomes unable to emit signals. As such, [method emit_signal] and signal connections will not work, until it is set to false.

fn (Object) set_deferred #

fn (s &Object) set_deferred(property string, value_ ToVariant)

Assigns [param value] to the given [param property], at the end of the current frame. This is equivalent to calling [method set] through [method call_deferred]. [codeblocks] [gdscript] var node = Node2D.new() add_child(node)

node.rotation = 1.5 node.set_deferred("rotation", 3.0) print(node.rotation) # Prints 1.5

await get_tree().process_frame print(node.rotation) # Prints 3.0 [/gdscript] [csharp] var node = new Node2D(); node.Rotation = 1.5f; node.SetDeferred(Node2D.PropertyName.Rotation, 3f); GD.Print(node.Rotation); // Prints 1.5

await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame); GD.Print(node.Rotation); // Prints 3.0 [/csharp] [/codeblocks] [b]Note:[/b] In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the PropertyName class to avoid allocating a new [StringName] on each call.

fn (Object) set_indexed #

fn (s &Object) set_indexed(property_path NodePath, value_ ToVariant)

Assigns a new [param value] to the property identified by the [param property_path]. The path should be a [NodePath] relative to this object, and can use the colon character (:) to access nested properties. [codeblocks] [gdscript] var node = Node2D.new() node.set_indexed("position", Vector2(42, 0)) node.set_indexed("position:y", -10) print(node.position) # Prints (42.0, -10.0) [/gdscript] [csharp] var node = new Node2D(); node.SetIndexed("position", new Vector2(42, 0)); node.SetIndexed("position:y", -10); GD.Print(node.Position); // Prints (42, -10) [/csharp] [/codeblocks] [b]Note:[/b] In C#, [param property_path] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the PropertyName class to avoid allocating a new [StringName] on each call.

fn (Object) set_message_translation #

fn (s &Object) set_message_translation(enable bool)

If set to true, allows the object to translate messages with [method tr] and [method tr_n]. Enabled by default. See also [method can_translate_messages].

fn (Object) set_meta #

fn (s &Object) set_meta(name string, value_ ToVariant)

Adds or changes the entry [param name] inside the object's metadata. The metadata [param value] can be any [Variant], although some types cannot be serialized correctly. If [param value] is null, the entry is removed. This is the equivalent of using [method remove_meta]. See also [method has_meta] and [method get_meta]. [b]Note:[/b] A metadata's name must be a valid identifier as per [method StringName.is_valid_identifier] method. [b]Note:[/b] Metadata that has a name starting with an underscore (_) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method.

fn (Object) set_script #

fn (s &Object) set_script(script_ ToVariant)

Attaches [param script] to the object, and instantiates it. As a result, the script's [method _init] is called. A [Script] is used to extend the object's functionality. If a script already exists, its instance is detached, and its property values and state are lost. Built-in property values are still kept.

fn (Object) set_translation_domain #

fn (s &Object) set_translation_domain(domain string)

Sets the name of the translation domain used by [method tr] and [method tr_n]. See also [TranslationServer].

fn (Object) to_string #

fn (s &Object) to_string() string

Returns a [String] representing the object. Defaults to "<ClassName#RID>". Override [method _to_string] to customize the string representation of the object.

fn (Object) to_variant #

fn (s &Object) to_variant() Variant

fn (Object) tr #

fn (s &Object) tr(message string, cfg Object_tr_Cfg) string

Translates a [param message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. Note that most [Control] nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. If [method can_translate_messages] is false, or no translation is available, this method returns the [param message] without changes. See [method set_message_translation]. For detailed examples, see [url=$DOCS_URL/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url]. [b]Note:[/b] This method can't be used without an [Object] instance, as it requires the [method can_translate_messages] method. To translate strings in a static context, use [method TranslationServer.translate].

fn (Object) tr_n #

fn (s &Object) tr_n(message string, plural_message string, n i64, cfg Object_tr_n_Cfg) string

Translates a [param message] or [param plural_message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. If [method can_translate_messages] is false, or no translation is available, this method returns [param message] or [param plural_message], without changes. See [method set_message_translation]. The [param n] is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. For detailed examples, see [url=$DOCS_URL/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url]. [b]Note:[/b] Negative and [float] numbers may not properly apply to some countable subjects. It's recommended to handle these cases with [method tr]. [b]Note:[/b] This method can't be used without an [Object] instance, as it requires the [method can_translate_messages] method. To translate strings in a static context, use [method TranslationServer.translate_plural].

fn (Object) try_cast_to #

fn (s &Object) try_cast_to[T]() ?T

Todo: unify all these misc cast/path methods

fn (Object) try_cast_to_v #

fn (s &Object) try_cast_to_v[T]() ?&T

struct ObjectID #

struct ObjectID {
pub mut:
	id u64
}

struct Object_add_user_signal_Cfg #

@[params]
struct Object_add_user_signal_Cfg {
pub:
	arguments Array = Array.new0()
}

Optional parameters for Object#add_user_signal

struct Object_connect_Cfg #

@[params]
struct Object_connect_Cfg {
pub:
	flags i64
}

Optional parameters for Object#connect

struct Object_get_meta_Cfg #

@[params]
struct Object_get_meta_Cfg {
pub:
	default ToVariant
}

Optional parameters for Object#get_meta

struct Object_notification_Cfg #

@[params]
struct Object_notification_Cfg {
pub:
	reversed bool
}

Optional parameters for Object#notification

struct Object_tr_Cfg #

@[params]
struct Object_tr_Cfg {
pub:
	context string
}

Optional parameters for Object#tr

struct Object_tr_n_Cfg #

@[params]
struct Object_tr_n_Cfg {
pub:
	context string
}

Optional parameters for Object#tr_n

struct Occluder3D #

struct Occluder3D {
	Resource
}

Occluder shape resource for use with occlusion culling in [OccluderInstance3D].

fn (Occluder3D) to_variant #

fn (s &Occluder3D) to_variant() Variant

fn (Occluder3D) from_variant #

fn (mut s Occluder3D) from_variant(variant &Variant)

fn (Occluder3D) get_vertices #

fn (s &Occluder3D) get_vertices() PackedVector3Array

Returns the occluder shape's vertex positions.

fn (Occluder3D) get_indices #

fn (s &Occluder3D) get_indices() PackedInt32Array

Returns the occluder shape's vertex indices.

struct OccluderInstance3D #

struct OccluderInstance3D {
	VisualInstance3D
}

Provides occlusion culling for 3D nodes, which improves performance in closed areas.

fn (OccluderInstance3D) to_variant #

fn (s &OccluderInstance3D) to_variant() Variant

fn (OccluderInstance3D) from_variant #

fn (mut s OccluderInstance3D) from_variant(variant &Variant)

fn (OccluderInstance3D) set_bake_mask #

fn (s &OccluderInstance3D) set_bake_mask(mask i64)

fn (OccluderInstance3D) get_bake_mask #

fn (s &OccluderInstance3D) get_bake_mask() i64

fn (OccluderInstance3D) set_bake_mask_value #

fn (s &OccluderInstance3D) set_bake_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member bake_mask], given a [param layer_number] between 1 and 32.

fn (OccluderInstance3D) get_bake_mask_value #

fn (s &OccluderInstance3D) get_bake_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (OccluderInstance3D) set_bake_simplification_distance #

fn (s &OccluderInstance3D) set_bake_simplification_distance(simplification_distance f64)

fn (OccluderInstance3D) get_bake_simplification_distance #

fn (s &OccluderInstance3D) get_bake_simplification_distance() f64

fn (OccluderInstance3D) set_occluder #

fn (s &OccluderInstance3D) set_occluder(occluder Occluder3D)

fn (OccluderInstance3D) get_occluder #

fn (s &OccluderInstance3D) get_occluder() Occluder3D

struct OccluderPolygon2D #

struct OccluderPolygon2D {
	Resource
}

Defines a 2D polygon for LightOccluder2D.

fn (OccluderPolygon2D) to_variant #

fn (s &OccluderPolygon2D) to_variant() Variant

fn (OccluderPolygon2D) from_variant #

fn (mut s OccluderPolygon2D) from_variant(variant &Variant)

fn (OccluderPolygon2D) set_closed #

fn (s &OccluderPolygon2D) set_closed(closed bool)

fn (OccluderPolygon2D) is_closed #

fn (s &OccluderPolygon2D) is_closed() bool

fn (OccluderPolygon2D) set_cull_mode #

fn (s &OccluderPolygon2D) set_cull_mode(cull_mode OccluderPolygon2DCullMode)

fn (OccluderPolygon2D) get_cull_mode #

fn (s &OccluderPolygon2D) get_cull_mode() OccluderPolygon2DCullMode

fn (OccluderPolygon2D) set_polygon #

fn (s &OccluderPolygon2D) set_polygon(polygon PackedVector2Array)

fn (OccluderPolygon2D) get_polygon #

fn (s &OccluderPolygon2D) get_polygon() PackedVector2Array

struct OfflineMultiplayerPeer #

struct OfflineMultiplayerPeer {
	MultiplayerPeer
}

A [MultiplayerPeer] which is always connected and acts as a server.

fn (OfflineMultiplayerPeer) to_variant #

fn (s &OfflineMultiplayerPeer) to_variant() Variant

fn (OfflineMultiplayerPeer) from_variant #

fn (mut s OfflineMultiplayerPeer) from_variant(variant &Variant)

struct OggPacketSequence #

struct OggPacketSequence {
	Resource
}

A sequence of Ogg packets.

fn (OggPacketSequence) to_variant #

fn (s &OggPacketSequence) to_variant() Variant

fn (OggPacketSequence) from_variant #

fn (mut s OggPacketSequence) from_variant(variant &Variant)

fn (OggPacketSequence) set_packet_data #

fn (s &OggPacketSequence) set_packet_data(packet_data Array)

fn (OggPacketSequence) get_packet_data #

fn (s &OggPacketSequence) get_packet_data() Array

fn (OggPacketSequence) set_packet_granule_positions #

fn (s &OggPacketSequence) set_packet_granule_positions(granule_positions PackedInt64Array)

fn (OggPacketSequence) get_packet_granule_positions #

fn (s &OggPacketSequence) get_packet_granule_positions() PackedInt64Array

fn (OggPacketSequence) set_sampling_rate #

fn (s &OggPacketSequence) set_sampling_rate(sampling_rate f64)

fn (OggPacketSequence) get_sampling_rate #

fn (s &OggPacketSequence) get_sampling_rate() f64

fn (OggPacketSequence) get_length #

fn (s &OggPacketSequence) get_length() f64

The length of this stream, in seconds.

struct OggPacketSequencePlayback #

struct OggPacketSequencePlayback {
	RefCounted
}

fn (OggPacketSequencePlayback) to_variant #

fn (s &OggPacketSequencePlayback) to_variant() Variant

fn (OggPacketSequencePlayback) from_variant #

fn (mut s OggPacketSequencePlayback) from_variant(variant &Variant)

struct OmniLight3D #

struct OmniLight3D {
	Light3D
}

Omnidirectional light, such as a light bulb or a candle.

fn (OmniLight3D) to_variant #

fn (s &OmniLight3D) to_variant() Variant

fn (OmniLight3D) from_variant #

fn (mut s OmniLight3D) from_variant(variant &Variant)

fn (OmniLight3D) set_shadow_mode #

fn (s &OmniLight3D) set_shadow_mode(mode OmniLight3DShadowMode)

fn (OmniLight3D) get_shadow_mode #

fn (s &OmniLight3D) get_shadow_mode() OmniLight3DShadowMode

struct OpenXRAPIExtension #

struct OpenXRAPIExtension {
	RefCounted
}

Makes the OpenXR API available for GDExtension.

fn (OpenXRAPIExtension) to_variant #

fn (s &OpenXRAPIExtension) to_variant() Variant

fn (OpenXRAPIExtension) from_variant #

fn (mut s OpenXRAPIExtension) from_variant(variant &Variant)

fn (OpenXRAPIExtension) get_instance #

fn (s &OpenXRAPIExtension) get_instance() i64

Returns the [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrInstance.html]XrInstance[/url] created during the initialization of the OpenXR API.

fn (OpenXRAPIExtension) get_system_id #

fn (s &OpenXRAPIExtension) get_system_id() i64

Returns the id of the system, which is a [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSystemId.html]XrSystemId[/url] cast to an integer.

fn (OpenXRAPIExtension) get_session #

fn (s &OpenXRAPIExtension) get_session() i64

Returns the OpenXR session, which is an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSession.html]XrSession[/url] cast to an integer.

fn (OpenXRAPIExtension) transform_from_pose #

fn (s &OpenXRAPIExtension) transform_from_pose(pose voidptr) Transform3D

Creates a [Transform3D] from an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrPosef.html]XrPosef[/url].

fn (OpenXRAPIExtension) xr_result #

fn (s &OpenXRAPIExtension) xr_result(gd_result i64, format string, gd_args Array) bool

Returns true if the provided [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url] (cast to an integer) is successful. Otherwise returns false and prints the [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url] converted to a string, with the specified additional information.

fn (OpenXRAPIExtension) get_instance_proc_addr #

fn (s &OpenXRAPIExtension) get_instance_proc_addr(name string) i64

Returns the function pointer of the OpenXR function with the specified name, cast to an integer. If the function with the given name does not exist, the method returns 0. [b]Note:[/b] openxr/util.h contains utility macros for acquiring OpenXR functions, e.g. GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction).

fn (OpenXRAPIExtension) get_error_string #

fn (s &OpenXRAPIExtension) get_error_string(gd_result i64) string

Returns an error string for the given [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url].

fn (OpenXRAPIExtension) get_swapchain_format_name #

fn (s &OpenXRAPIExtension) get_swapchain_format_name(swapchain_format i64) string

Returns the name of the specified swapchain format.

fn (OpenXRAPIExtension) set_object_name #

fn (s &OpenXRAPIExtension) set_object_name(object_type i64, object_handle i64, object_name string)

Set the object name of an OpenXR object, used for debug output. [param object_type] must be a valid OpenXR XrObjectType enum and [param object_handle] must be a valid OpenXR object handle.

fn (OpenXRAPIExtension) begin_debug_label_region #

fn (s &OpenXRAPIExtension) begin_debug_label_region(label_name string)

Begins a new debug label region, this label will be reported in debug messages for any calls following this until [method end_debug_label_region] is called. Debug labels can be stacked.

fn (OpenXRAPIExtension) end_debug_label_region #

fn (s &OpenXRAPIExtension) end_debug_label_region()

Marks the end of a debug label region. Removes the latest debug label region added by calling [method begin_debug_label_region].

fn (OpenXRAPIExtension) insert_debug_label #

fn (s &OpenXRAPIExtension) insert_debug_label(label_name string)

Inserts a debug label, this label is reported in any debug message resulting from the OpenXR calls that follows, until any of [method begin_debug_label_region], [method end_debug_label_region], or [method insert_debug_label] is called.

fn (OpenXRAPIExtension) is_initialized #

fn (s &OpenXRAPIExtension) is_initialized() bool

Returns true if OpenXR is initialized.

fn (OpenXRAPIExtension) is_running #

fn (s &OpenXRAPIExtension) is_running() bool

Returns true if OpenXR is running ([url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrBeginSession.html]xrBeginSession[/url] was successfully called and the swapchains were created).

fn (OpenXRAPIExtension) set_custom_play_space #

fn (s &OpenXRAPIExtension) set_custom_play_space(space voidptr)

Sets the reference space used by OpenXR to the given [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html]XrSpace[/url] (cast to a void *).

fn (OpenXRAPIExtension) get_play_space #

fn (s &OpenXRAPIExtension) get_play_space() i64

Returns the play space, which is an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html]XrSpace[/url] cast to an integer.

fn (OpenXRAPIExtension) get_predicted_display_time #

fn (s &OpenXRAPIExtension) get_predicted_display_time() i64

Returns the predicted display timing for the current frame.

fn (OpenXRAPIExtension) get_next_frame_time #

fn (s &OpenXRAPIExtension) get_next_frame_time() i64

Returns the predicted display timing for the next frame.

fn (OpenXRAPIExtension) can_render #

fn (s &OpenXRAPIExtension) can_render() bool

Returns true if OpenXR is initialized for rendering with an XR viewport.

fn (OpenXRAPIExtension) find_action #

fn (s &OpenXRAPIExtension) find_action(name string, action_set RID) RID

Returns the [RID] corresponding to an Action of a matching name, optionally limited to a specified action set.

fn (OpenXRAPIExtension) action_get_handle #

fn (s &OpenXRAPIExtension) action_get_handle(action RID) i64

Returns the corresponding XrAction OpenXR handle for the given action RID.

fn (OpenXRAPIExtension) get_hand_tracker #

fn (s &OpenXRAPIExtension) get_hand_tracker(hand_index i64) i64

Returns the corresponding XRHandTrackerEXT handle for the given hand index value.

fn (OpenXRAPIExtension) register_composition_layer_provider #

fn (s &OpenXRAPIExtension) register_composition_layer_provider(extension OpenXRExtensionWrapper)

Registers the given extension as a composition layer provider.

fn (OpenXRAPIExtension) unregister_composition_layer_provider #

fn (s &OpenXRAPIExtension) unregister_composition_layer_provider(extension OpenXRExtensionWrapper)

Unregisters the given extension as a composition layer provider.

fn (OpenXRAPIExtension) register_projection_views_extension #

fn (s &OpenXRAPIExtension) register_projection_views_extension(extension OpenXRExtensionWrapper)

Registers the given extension as a provider of additional data structures to projections views.

fn (OpenXRAPIExtension) unregister_projection_views_extension #

fn (s &OpenXRAPIExtension) unregister_projection_views_extension(extension OpenXRExtensionWrapper)

Unregisters the given extension as a provider of additional data structures to projections views.

fn (OpenXRAPIExtension) register_frame_info_extension #

fn (s &OpenXRAPIExtension) register_frame_info_extension(extension OpenXRExtensionWrapper)

Registers the given extension as modifying frame info via the [method OpenXRExtensionWrapper._set_frame_wait_info_and_get_next_pointer], [method OpenXRExtensionWrapper._set_view_locate_info_and_get_next_pointer], or [method OpenXRExtensionWrapper._set_frame_end_info_and_get_next_pointer] virtual methods.

fn (OpenXRAPIExtension) unregister_frame_info_extension #

fn (s &OpenXRAPIExtension) unregister_frame_info_extension(extension OpenXRExtensionWrapper)

Unregisters the given extension as modifying frame info.

fn (OpenXRAPIExtension) get_render_state_z_near #

fn (s &OpenXRAPIExtension) get_render_state_z_near() f64

Returns the near boundary value of the camera frustum. [b]Note:[/b] This is only accessible in the render thread.

fn (OpenXRAPIExtension) get_render_state_z_far #

fn (s &OpenXRAPIExtension) get_render_state_z_far() f64

Returns the far boundary value of the camera frustum. [b]Note:[/b] This is only accessible in the render thread.

fn (OpenXRAPIExtension) set_velocity_texture #

fn (s &OpenXRAPIExtension) set_velocity_texture(render_target RID)

Sets the render target of the velocity texture.

fn (OpenXRAPIExtension) set_velocity_depth_texture #

fn (s &OpenXRAPIExtension) set_velocity_depth_texture(render_target RID)

Sets the render target of the velocity depth texture.

fn (OpenXRAPIExtension) set_velocity_target_size #

fn (s &OpenXRAPIExtension) set_velocity_target_size(target_size Vector2i)

Sets the target size of the velocity and velocity depth textures.

fn (OpenXRAPIExtension) get_supported_swapchain_formats #

fn (s &OpenXRAPIExtension) get_supported_swapchain_formats() PackedInt64Array

Returns an array of supported swapchain formats.

fn (OpenXRAPIExtension) openxr_swapchain_create #

fn (s &OpenXRAPIExtension) openxr_swapchain_create(create_flags i64, usage_flags i64, swapchain_format i64, width i64, height i64, sample_count i64, array_size i64) i64

Returns a pointer to a new swapchain created using the provided parameters.

fn (OpenXRAPIExtension) openxr_swapchain_free #

fn (s &OpenXRAPIExtension) openxr_swapchain_free(swapchain i64)

Destroys the provided swapchain and frees it from memory.

fn (OpenXRAPIExtension) openxr_swapchain_get_swapchain #

fn (s &OpenXRAPIExtension) openxr_swapchain_get_swapchain(swapchain i64) i64

Returns the XrSwapchain handle of the provided swapchain.

fn (OpenXRAPIExtension) openxr_swapchain_acquire #

fn (s &OpenXRAPIExtension) openxr_swapchain_acquire(swapchain i64)

Acquires the image of the provided swapchain.

fn (OpenXRAPIExtension) openxr_swapchain_get_image #

fn (s &OpenXRAPIExtension) openxr_swapchain_get_image(swapchain i64) RID

Returns the RID of the provided swapchain's image.

fn (OpenXRAPIExtension) openxr_swapchain_release #

fn (s &OpenXRAPIExtension) openxr_swapchain_release(swapchain i64)

Releases the image of the provided swapchain.

fn (OpenXRAPIExtension) get_projection_layer #

fn (s &OpenXRAPIExtension) get_projection_layer() i64

Returns a pointer to the render state's XrCompositionLayerProjection struct. [b]Note:[/b] This method should only be called from the rendering thread.

fn (OpenXRAPIExtension) set_render_region #

fn (s &OpenXRAPIExtension) set_render_region(render_region Rect2i)

Sets the render region to [param render_region], overriding the normal render target's rect.

fn (OpenXRAPIExtension) set_emulate_environment_blend_mode_alpha_blend #

fn (s &OpenXRAPIExtension) set_emulate_environment_blend_mode_alpha_blend(enabled bool)

If set to true, an OpenXR extension is loaded which is capable of emulating the [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] blend mode.

fn (OpenXRAPIExtension) is_environment_blend_mode_alpha_supported #

fn (s &OpenXRAPIExtension) is_environment_blend_mode_alpha_supported() OpenXRAPIExtensionOpenXRAlphaBlendModeSupport

Returns [enum OpenXRAPIExtension.OpenXRAlphaBlendModeSupport] denoting if [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is really supported, emulated or not supported at all.

struct OpenXRAction #

struct OpenXRAction {
	Resource
}

An OpenXR action.

fn (OpenXRAction) to_variant #

fn (s &OpenXRAction) to_variant() Variant

fn (OpenXRAction) from_variant #

fn (mut s OpenXRAction) from_variant(variant &Variant)

fn (OpenXRAction) set_localized_name #

fn (s &OpenXRAction) set_localized_name(localized_name string)

fn (OpenXRAction) get_localized_name #

fn (s &OpenXRAction) get_localized_name() string

fn (OpenXRAction) set_action_type #

fn (s &OpenXRAction) set_action_type(action_type OpenXRActionActionType)

fn (OpenXRAction) get_action_type #

fn (s &OpenXRAction) get_action_type() OpenXRActionActionType

fn (OpenXRAction) set_toplevel_paths #

fn (s &OpenXRAction) set_toplevel_paths(toplevel_paths PackedStringArray)

fn (OpenXRAction) get_toplevel_paths #

fn (s &OpenXRAction) get_toplevel_paths() PackedStringArray

struct OpenXRActionBindingModifier #

struct OpenXRActionBindingModifier {
	OpenXRBindingModifier
}

Binding modifier that applies on individual actions related to an interaction profile.

fn (OpenXRActionBindingModifier) to_variant #

fn (s &OpenXRActionBindingModifier) to_variant() Variant

fn (OpenXRActionBindingModifier) from_variant #

fn (mut s OpenXRActionBindingModifier) from_variant(variant &Variant)

struct OpenXRActionMap #

struct OpenXRActionMap {
	Resource
}

Collection of [OpenXRActionSet] and [OpenXRInteractionProfile] resources for the OpenXR module.

fn (OpenXRActionMap) to_variant #

fn (s &OpenXRActionMap) to_variant() Variant

fn (OpenXRActionMap) from_variant #

fn (mut s OpenXRActionMap) from_variant(variant &Variant)

fn (OpenXRActionMap) set_action_sets #

fn (s &OpenXRActionMap) set_action_sets(action_sets Array)

fn (OpenXRActionMap) get_action_sets #

fn (s &OpenXRActionMap) get_action_sets() Array

fn (OpenXRActionMap) get_action_set_count #

fn (s &OpenXRActionMap) get_action_set_count() i64

Retrieve the number of actions sets in our action map.

fn (OpenXRActionMap) find_action_set #

fn (s &OpenXRActionMap) find_action_set(name string) OpenXRActionSet

Retrieve an action set by name.

fn (OpenXRActionMap) get_action_set #

fn (s &OpenXRActionMap) get_action_set(idx i64) OpenXRActionSet

Retrieve the action set at this index.

fn (OpenXRActionMap) add_action_set #

fn (s &OpenXRActionMap) add_action_set(action_set OpenXRActionSet)

Add an action set.

fn (OpenXRActionMap) remove_action_set #

fn (s &OpenXRActionMap) remove_action_set(action_set OpenXRActionSet)

Remove an action set.

fn (OpenXRActionMap) set_interaction_profiles #

fn (s &OpenXRActionMap) set_interaction_profiles(interaction_profiles Array)

fn (OpenXRActionMap) get_interaction_profiles #

fn (s &OpenXRActionMap) get_interaction_profiles() Array

fn (OpenXRActionMap) get_interaction_profile_count #

fn (s &OpenXRActionMap) get_interaction_profile_count() i64

Retrieve the number of interaction profiles in our action map.

fn (OpenXRActionMap) find_interaction_profile #

fn (s &OpenXRActionMap) find_interaction_profile(name string) OpenXRInteractionProfile

Find an interaction profile by its name (path).

fn (OpenXRActionMap) get_interaction_profile #

fn (s &OpenXRActionMap) get_interaction_profile(idx i64) OpenXRInteractionProfile

Get the interaction profile at this index.

fn (OpenXRActionMap) add_interaction_profile #

fn (s &OpenXRActionMap) add_interaction_profile(interaction_profile OpenXRInteractionProfile)

Add an interaction profile.

fn (OpenXRActionMap) remove_interaction_profile #

fn (s &OpenXRActionMap) remove_interaction_profile(interaction_profile OpenXRInteractionProfile)

Remove an interaction profile.

fn (OpenXRActionMap) create_default_action_sets #

fn (s &OpenXRActionMap) create_default_action_sets()

Setup this action set with our default actions.

struct OpenXRActionSet #

struct OpenXRActionSet {
	Resource
}

Collection of [OpenXRAction] resources that make up an action set.

fn (OpenXRActionSet) to_variant #

fn (s &OpenXRActionSet) to_variant() Variant

fn (OpenXRActionSet) from_variant #

fn (mut s OpenXRActionSet) from_variant(variant &Variant)

fn (OpenXRActionSet) set_localized_name #

fn (s &OpenXRActionSet) set_localized_name(localized_name string)

fn (OpenXRActionSet) get_localized_name #

fn (s &OpenXRActionSet) get_localized_name() string

fn (OpenXRActionSet) set_priority #

fn (s &OpenXRActionSet) set_priority(priority i64)

fn (OpenXRActionSet) get_priority #

fn (s &OpenXRActionSet) get_priority() i64

fn (OpenXRActionSet) get_action_count #

fn (s &OpenXRActionSet) get_action_count() i64

Retrieve the number of actions in our action set.

fn (OpenXRActionSet) set_actions #

fn (s &OpenXRActionSet) set_actions(actions Array)

fn (OpenXRActionSet) get_actions #

fn (s &OpenXRActionSet) get_actions() Array

fn (OpenXRActionSet) add_action #

fn (s &OpenXRActionSet) add_action(action OpenXRAction)

Add an action to this action set.

fn (OpenXRActionSet) remove_action #

fn (s &OpenXRActionSet) remove_action(action OpenXRAction)

Remove an action from this action set.

struct OpenXRAnalogThresholdModifier #

struct OpenXRAnalogThresholdModifier {
	OpenXRActionBindingModifier
}

The analog threshold binding modifier can modify a float input to a boolean input with specified thresholds.

fn (OpenXRAnalogThresholdModifier) to_variant #

fn (s &OpenXRAnalogThresholdModifier) to_variant() Variant

fn (OpenXRAnalogThresholdModifier) from_variant #

fn (mut s OpenXRAnalogThresholdModifier) from_variant(variant &Variant)

fn (OpenXRAnalogThresholdModifier) set_on_threshold #

fn (s &OpenXRAnalogThresholdModifier) set_on_threshold(on_threshold f64)

fn (OpenXRAnalogThresholdModifier) get_on_threshold #

fn (s &OpenXRAnalogThresholdModifier) get_on_threshold() f64

fn (OpenXRAnalogThresholdModifier) set_off_threshold #

fn (s &OpenXRAnalogThresholdModifier) set_off_threshold(off_threshold f64)

fn (OpenXRAnalogThresholdModifier) get_off_threshold #

fn (s &OpenXRAnalogThresholdModifier) get_off_threshold() f64

fn (OpenXRAnalogThresholdModifier) set_on_haptic #

fn (s &OpenXRAnalogThresholdModifier) set_on_haptic(haptic OpenXRHapticBase)

fn (OpenXRAnalogThresholdModifier) get_on_haptic #

fn (s &OpenXRAnalogThresholdModifier) get_on_haptic() OpenXRHapticBase

fn (OpenXRAnalogThresholdModifier) set_off_haptic #

fn (s &OpenXRAnalogThresholdModifier) set_off_haptic(haptic OpenXRHapticBase)

fn (OpenXRAnalogThresholdModifier) get_off_haptic #

fn (s &OpenXRAnalogThresholdModifier) get_off_haptic() OpenXRHapticBase

struct OpenXRBindingModifier #

struct OpenXRBindingModifier {
	Resource
}

Binding modifier base class.

fn (OpenXRBindingModifier) to_variant #

fn (s &OpenXRBindingModifier) to_variant() Variant

fn (OpenXRBindingModifier) from_variant #

fn (mut s OpenXRBindingModifier) from_variant(variant &Variant)

fn (OpenXRBindingModifier) gd_get_description #

fn (s &OpenXRBindingModifier) gd_get_description() string

Return the description of this class that is used for the title bar of the binding modifier editor.

fn (OpenXRBindingModifier) gd_get_ip_modification #

fn (s &OpenXRBindingModifier) gd_get_ip_modification() PackedByteArray

Returns the data that is sent to OpenXR when submitting the suggested interacting bindings this modifier is a part of. [b]Note:[/b] This must be data compatible with a XrBindingModificationBaseHeaderKHR structure.

struct OpenXRBindingModifierEditor #

struct OpenXRBindingModifierEditor {
	PanelContainer
}

Binding modifier editor.

fn (OpenXRBindingModifierEditor) to_variant #

fn (s &OpenXRBindingModifierEditor) to_variant() Variant

fn (OpenXRBindingModifierEditor) from_variant #

fn (mut s OpenXRBindingModifierEditor) from_variant(variant &Variant)

fn (OpenXRBindingModifierEditor) get_binding_modifier #

fn (s &OpenXRBindingModifierEditor) get_binding_modifier() OpenXRBindingModifier

Returns the [OpenXRBindingModifier] currently being edited.

fn (OpenXRBindingModifierEditor) setup #

fn (s &OpenXRBindingModifierEditor) setup(action_map OpenXRActionMap, binding_modifier OpenXRBindingModifier)

Setup this editor for the provided [param action_map] and [param binding_modifier].

struct OpenXRCompositionLayer #

struct OpenXRCompositionLayer {
	Node3D
}

The parent class of all OpenXR composition layer nodes.

fn (OpenXRCompositionLayer) to_variant #

fn (s &OpenXRCompositionLayer) to_variant() Variant

fn (OpenXRCompositionLayer) from_variant #

fn (mut s OpenXRCompositionLayer) from_variant(variant &Variant)

fn (OpenXRCompositionLayer) set_layer_viewport #

fn (s &OpenXRCompositionLayer) set_layer_viewport(viewport SubViewport)

fn (OpenXRCompositionLayer) get_layer_viewport #

fn (s &OpenXRCompositionLayer) get_layer_viewport() SubViewport

fn (OpenXRCompositionLayer) set_use_android_surface #

fn (s &OpenXRCompositionLayer) set_use_android_surface(enable bool)

fn (OpenXRCompositionLayer) get_use_android_surface #

fn (s &OpenXRCompositionLayer) get_use_android_surface() bool

fn (OpenXRCompositionLayer) set_android_surface_size #

fn (s &OpenXRCompositionLayer) set_android_surface_size(size Vector2i)

fn (OpenXRCompositionLayer) get_android_surface_size #

fn (s &OpenXRCompositionLayer) get_android_surface_size() Vector2i

fn (OpenXRCompositionLayer) set_enable_hole_punch #

fn (s &OpenXRCompositionLayer) set_enable_hole_punch(enable bool)

fn (OpenXRCompositionLayer) get_enable_hole_punch #

fn (s &OpenXRCompositionLayer) get_enable_hole_punch() bool

fn (OpenXRCompositionLayer) set_sort_order #

fn (s &OpenXRCompositionLayer) set_sort_order(order i64)

fn (OpenXRCompositionLayer) get_sort_order #

fn (s &OpenXRCompositionLayer) get_sort_order() i64

fn (OpenXRCompositionLayer) set_alpha_blend #

fn (s &OpenXRCompositionLayer) set_alpha_blend(enabled bool)

fn (OpenXRCompositionLayer) get_alpha_blend #

fn (s &OpenXRCompositionLayer) get_alpha_blend() bool

fn (OpenXRCompositionLayer) get_android_surface #

fn (s &OpenXRCompositionLayer) get_android_surface() JavaObject

Returns a [JavaObject] representing an android.view.Surface if [member use_android_surface] is enabled and OpenXR has created the surface. Otherwise, this will return null. [b]Note:[/b] The surface can only be created during an active OpenXR session. So, if [member use_android_surface] is enabled outside of an OpenXR session, it won't be created until a new session fully starts.

fn (OpenXRCompositionLayer) is_natively_supported #

fn (s &OpenXRCompositionLayer) is_natively_supported() bool

Returns true if the OpenXR runtime natively supports this composition layer type. [b]Note:[/b] This will only return an accurate result after the OpenXR session has started.

fn (OpenXRCompositionLayer) set_min_filter #

fn (s &OpenXRCompositionLayer) set_min_filter(mode OpenXRCompositionLayerFilter)

fn (OpenXRCompositionLayer) get_min_filter #

fn (s &OpenXRCompositionLayer) get_min_filter() OpenXRCompositionLayerFilter

fn (OpenXRCompositionLayer) set_mag_filter #

fn (s &OpenXRCompositionLayer) set_mag_filter(mode OpenXRCompositionLayerFilter)

fn (OpenXRCompositionLayer) get_mag_filter #

fn (s &OpenXRCompositionLayer) get_mag_filter() OpenXRCompositionLayerFilter

fn (OpenXRCompositionLayer) set_mipmap_mode #

fn (s &OpenXRCompositionLayer) set_mipmap_mode(mode OpenXRCompositionLayerMipmapMode)

fn (OpenXRCompositionLayer) get_mipmap_mode #

fn (s &OpenXRCompositionLayer) get_mipmap_mode() OpenXRCompositionLayerMipmapMode

fn (OpenXRCompositionLayer) set_horizontal_wrap #

fn (s &OpenXRCompositionLayer) set_horizontal_wrap(mode OpenXRCompositionLayerWrap)

fn (OpenXRCompositionLayer) get_horizontal_wrap #

fn (s &OpenXRCompositionLayer) get_horizontal_wrap() OpenXRCompositionLayerWrap

fn (OpenXRCompositionLayer) set_vertical_wrap #

fn (s &OpenXRCompositionLayer) set_vertical_wrap(mode OpenXRCompositionLayerWrap)

fn (OpenXRCompositionLayer) get_vertical_wrap #

fn (s &OpenXRCompositionLayer) get_vertical_wrap() OpenXRCompositionLayerWrap

fn (OpenXRCompositionLayer) set_red_swizzle #

fn (s &OpenXRCompositionLayer) set_red_swizzle(mode OpenXRCompositionLayerSwizzle)

fn (OpenXRCompositionLayer) get_red_swizzle #

fn (s &OpenXRCompositionLayer) get_red_swizzle() OpenXRCompositionLayerSwizzle

fn (OpenXRCompositionLayer) set_green_swizzle #

fn (s &OpenXRCompositionLayer) set_green_swizzle(mode OpenXRCompositionLayerSwizzle)

fn (OpenXRCompositionLayer) get_green_swizzle #

fn (s &OpenXRCompositionLayer) get_green_swizzle() OpenXRCompositionLayerSwizzle

fn (OpenXRCompositionLayer) set_blue_swizzle #

fn (s &OpenXRCompositionLayer) set_blue_swizzle(mode OpenXRCompositionLayerSwizzle)

fn (OpenXRCompositionLayer) get_blue_swizzle #

fn (s &OpenXRCompositionLayer) get_blue_swizzle() OpenXRCompositionLayerSwizzle

fn (OpenXRCompositionLayer) set_alpha_swizzle #

fn (s &OpenXRCompositionLayer) set_alpha_swizzle(mode OpenXRCompositionLayerSwizzle)

fn (OpenXRCompositionLayer) get_alpha_swizzle #

fn (s &OpenXRCompositionLayer) get_alpha_swizzle() OpenXRCompositionLayerSwizzle

fn (OpenXRCompositionLayer) set_max_anisotropy #

fn (s &OpenXRCompositionLayer) set_max_anisotropy(value f64)

fn (OpenXRCompositionLayer) get_max_anisotropy #

fn (s &OpenXRCompositionLayer) get_max_anisotropy() f64

fn (OpenXRCompositionLayer) set_border_color #

fn (s &OpenXRCompositionLayer) set_border_color(color Color)

fn (OpenXRCompositionLayer) get_border_color #

fn (s &OpenXRCompositionLayer) get_border_color() Color

fn (OpenXRCompositionLayer) intersects_ray #

fn (s &OpenXRCompositionLayer) intersects_ray(origin Vector3, direction Vector3) Vector2

Returns UV coordinates where the given ray intersects with the composition layer. [param origin] and [param direction] must be in global space. Returns Vector2(-1.0, -1.0) if the ray doesn't intersect.

struct OpenXRCompositionLayerCylinder #

struct OpenXRCompositionLayerCylinder {
	OpenXRCompositionLayer
}

An OpenXR composition layer that is rendered as an internal slice of a cylinder.

fn (OpenXRCompositionLayerCylinder) to_variant #

fn (s &OpenXRCompositionLayerCylinder) to_variant() Variant

fn (OpenXRCompositionLayerCylinder) from_variant #

fn (mut s OpenXRCompositionLayerCylinder) from_variant(variant &Variant)

fn (OpenXRCompositionLayerCylinder) set_radius #

fn (s &OpenXRCompositionLayerCylinder) set_radius(radius f64)

fn (OpenXRCompositionLayerCylinder) get_radius #

fn (s &OpenXRCompositionLayerCylinder) get_radius() f64

fn (OpenXRCompositionLayerCylinder) set_aspect_ratio #

fn (s &OpenXRCompositionLayerCylinder) set_aspect_ratio(aspect_ratio f64)

fn (OpenXRCompositionLayerCylinder) get_aspect_ratio #

fn (s &OpenXRCompositionLayerCylinder) get_aspect_ratio() f64

fn (OpenXRCompositionLayerCylinder) set_central_angle #

fn (s &OpenXRCompositionLayerCylinder) set_central_angle(angle f64)

fn (OpenXRCompositionLayerCylinder) get_central_angle #

fn (s &OpenXRCompositionLayerCylinder) get_central_angle() f64

fn (OpenXRCompositionLayerCylinder) set_fallback_segments #

fn (s &OpenXRCompositionLayerCylinder) set_fallback_segments(segments i64)

fn (OpenXRCompositionLayerCylinder) get_fallback_segments #

fn (s &OpenXRCompositionLayerCylinder) get_fallback_segments() i64

struct OpenXRCompositionLayerEquirect #

struct OpenXRCompositionLayerEquirect {
	OpenXRCompositionLayer
}

An OpenXR composition layer that is rendered as an internal slice of a sphere.

fn (OpenXRCompositionLayerEquirect) to_variant #

fn (s &OpenXRCompositionLayerEquirect) to_variant() Variant

fn (OpenXRCompositionLayerEquirect) from_variant #

fn (mut s OpenXRCompositionLayerEquirect) from_variant(variant &Variant)

fn (OpenXRCompositionLayerEquirect) set_radius #

fn (s &OpenXRCompositionLayerEquirect) set_radius(radius f64)

fn (OpenXRCompositionLayerEquirect) get_radius #

fn (s &OpenXRCompositionLayerEquirect) get_radius() f64

fn (OpenXRCompositionLayerEquirect) set_central_horizontal_angle #

fn (s &OpenXRCompositionLayerEquirect) set_central_horizontal_angle(angle f64)

fn (OpenXRCompositionLayerEquirect) get_central_horizontal_angle #

fn (s &OpenXRCompositionLayerEquirect) get_central_horizontal_angle() f64

fn (OpenXRCompositionLayerEquirect) set_upper_vertical_angle #

fn (s &OpenXRCompositionLayerEquirect) set_upper_vertical_angle(angle f64)

fn (OpenXRCompositionLayerEquirect) get_upper_vertical_angle #

fn (s &OpenXRCompositionLayerEquirect) get_upper_vertical_angle() f64

fn (OpenXRCompositionLayerEquirect) set_lower_vertical_angle #

fn (s &OpenXRCompositionLayerEquirect) set_lower_vertical_angle(angle f64)

fn (OpenXRCompositionLayerEquirect) get_lower_vertical_angle #

fn (s &OpenXRCompositionLayerEquirect) get_lower_vertical_angle() f64

fn (OpenXRCompositionLayerEquirect) set_fallback_segments #

fn (s &OpenXRCompositionLayerEquirect) set_fallback_segments(segments i64)

fn (OpenXRCompositionLayerEquirect) get_fallback_segments #

fn (s &OpenXRCompositionLayerEquirect) get_fallback_segments() i64

struct OpenXRCompositionLayerQuad #

struct OpenXRCompositionLayerQuad {
	OpenXRCompositionLayer
}

An OpenXR composition layer that is rendered as a quad.

fn (OpenXRCompositionLayerQuad) to_variant #

fn (s &OpenXRCompositionLayerQuad) to_variant() Variant

fn (OpenXRCompositionLayerQuad) from_variant #

fn (mut s OpenXRCompositionLayerQuad) from_variant(variant &Variant)

fn (OpenXRCompositionLayerQuad) set_quad_size #

fn (s &OpenXRCompositionLayerQuad) set_quad_size(size Vector2)

fn (OpenXRCompositionLayerQuad) get_quad_size #

fn (s &OpenXRCompositionLayerQuad) get_quad_size() Vector2

struct OpenXRDpadBindingModifier #

struct OpenXRDpadBindingModifier {
	OpenXRIPBindingModifier
}

The DPad binding modifier converts an axis input to a dpad output.

fn (OpenXRDpadBindingModifier) to_variant #

fn (s &OpenXRDpadBindingModifier) to_variant() Variant

fn (OpenXRDpadBindingModifier) from_variant #

fn (mut s OpenXRDpadBindingModifier) from_variant(variant &Variant)

fn (OpenXRDpadBindingModifier) set_action_set #

fn (s &OpenXRDpadBindingModifier) set_action_set(action_set OpenXRActionSet)

fn (OpenXRDpadBindingModifier) get_action_set #

fn (s &OpenXRDpadBindingModifier) get_action_set() OpenXRActionSet

fn (OpenXRDpadBindingModifier) set_input_path #

fn (s &OpenXRDpadBindingModifier) set_input_path(input_path string)

fn (OpenXRDpadBindingModifier) get_input_path #

fn (s &OpenXRDpadBindingModifier) get_input_path() string

fn (OpenXRDpadBindingModifier) set_threshold #

fn (s &OpenXRDpadBindingModifier) set_threshold(threshold f64)

fn (OpenXRDpadBindingModifier) get_threshold #

fn (s &OpenXRDpadBindingModifier) get_threshold() f64

fn (OpenXRDpadBindingModifier) set_threshold_released #

fn (s &OpenXRDpadBindingModifier) set_threshold_released(threshold_released f64)

fn (OpenXRDpadBindingModifier) get_threshold_released #

fn (s &OpenXRDpadBindingModifier) get_threshold_released() f64

fn (OpenXRDpadBindingModifier) set_center_region #

fn (s &OpenXRDpadBindingModifier) set_center_region(center_region f64)

fn (OpenXRDpadBindingModifier) get_center_region #

fn (s &OpenXRDpadBindingModifier) get_center_region() f64

fn (OpenXRDpadBindingModifier) set_wedge_angle #

fn (s &OpenXRDpadBindingModifier) set_wedge_angle(wedge_angle f64)

fn (OpenXRDpadBindingModifier) get_wedge_angle #

fn (s &OpenXRDpadBindingModifier) get_wedge_angle() f64

fn (OpenXRDpadBindingModifier) set_is_sticky #

fn (s &OpenXRDpadBindingModifier) set_is_sticky(is_sticky bool)

fn (OpenXRDpadBindingModifier) get_is_sticky #

fn (s &OpenXRDpadBindingModifier) get_is_sticky() bool

fn (OpenXRDpadBindingModifier) set_on_haptic #

fn (s &OpenXRDpadBindingModifier) set_on_haptic(haptic OpenXRHapticBase)

fn (OpenXRDpadBindingModifier) get_on_haptic #

fn (s &OpenXRDpadBindingModifier) get_on_haptic() OpenXRHapticBase

fn (OpenXRDpadBindingModifier) set_off_haptic #

fn (s &OpenXRDpadBindingModifier) set_off_haptic(haptic OpenXRHapticBase)

fn (OpenXRDpadBindingModifier) get_off_haptic #

fn (s &OpenXRDpadBindingModifier) get_off_haptic() OpenXRHapticBase

struct OpenXRExtensionWrapper #

struct OpenXRExtensionWrapper {
	Object
}

Allows implementing OpenXR extensions with GDExtension.

fn (OpenXRExtensionWrapper) to_variant #

fn (s &OpenXRExtensionWrapper) to_variant() Variant

fn (OpenXRExtensionWrapper) from_variant #

fn (mut s OpenXRExtensionWrapper) from_variant(variant &Variant)

fn (OpenXRExtensionWrapper) gd_get_requested_extensions #

fn (s &OpenXRExtensionWrapper) gd_get_requested_extensions() Dictionary

Returns a [Dictionary] of OpenXR extensions related to this extension. The [Dictionary] should contain the name of the extension, mapped to a bool * cast to an integer:- If the bool * is a nullptr this extension is mandatory.

  • If the bool * points to a boolean, the boolean will be updated to true if the extension is enabled.

fn (OpenXRExtensionWrapper) gd_set_system_properties_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_system_properties_and_get_next_pointer(next_pointer voidptr) i64

Adds additional data structures when querying OpenXR system abilities.

fn (OpenXRExtensionWrapper) gd_set_instance_create_info_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_instance_create_info_and_get_next_pointer(next_pointer voidptr) i64

Adds additional data structures when the OpenXR instance is created.

fn (OpenXRExtensionWrapper) gd_set_session_create_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_session_create_and_get_next_pointer(next_pointer voidptr) i64

Adds additional data structures when the OpenXR session is created.

fn (OpenXRExtensionWrapper) gd_set_swapchain_create_info_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_swapchain_create_info_and_get_next_pointer(next_pointer voidptr) i64

Adds additional data structures when creating OpenXR swapchains.

fn (OpenXRExtensionWrapper) gd_set_hand_joint_locations_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_hand_joint_locations_and_get_next_pointer(hand_index i64, next_pointer voidptr) i64

Adds additional data structures when each hand tracker is created.

fn (OpenXRExtensionWrapper) gd_set_projection_views_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_projection_views_and_get_next_pointer(view_index i64, next_pointer voidptr) i64

Adds additional data structures to the projection view of the given [param view_index].

fn (OpenXRExtensionWrapper) gd_set_frame_wait_info_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_frame_wait_info_and_get_next_pointer(next_pointer voidptr) i64

Adds additional data structures to XrFrameWaitInfo. This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_frame_info_extension].

fn (OpenXRExtensionWrapper) gd_set_frame_end_info_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_frame_end_info_and_get_next_pointer(next_pointer voidptr) i64

Adds additional data structures to XrFrameEndInfo. This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_frame_info_extension].

fn (OpenXRExtensionWrapper) gd_set_view_locate_info_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_view_locate_info_and_get_next_pointer(next_pointer voidptr) i64

Adds additional data structures to XrViewLocateInfo. This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_frame_info_extension].

fn (OpenXRExtensionWrapper) gd_set_reference_space_create_info_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_reference_space_create_info_and_get_next_pointer(reference_space_type i64, next_pointer voidptr) i64

Adds additional data structures to XrReferenceSpaceCreateInfo.

fn (OpenXRExtensionWrapper) gd_get_composition_layer_count #

fn (s &OpenXRExtensionWrapper) gd_get_composition_layer_count() i64

Returns the number of composition layers this extension wrapper provides via [method _get_composition_layer]. This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider].

fn (OpenXRExtensionWrapper) gd_get_composition_layer #

fn (s &OpenXRExtensionWrapper) gd_get_composition_layer(index i64) i64

Returns a pointer to an XrCompositionLayerBaseHeader struct to provide the given composition layer. This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider].

fn (OpenXRExtensionWrapper) gd_get_composition_layer_order #

fn (s &OpenXRExtensionWrapper) gd_get_composition_layer_order(index i64) i64

Returns an integer that will be used to sort the given composition layer provided via [method _get_composition_layer]. Lower numbers will move the layer to the front of the list, and higher numbers to the end. The default projection layer has an order of 0, so layers provided by this method should probably be above or below (but not exactly) 0. This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider].

fn (OpenXRExtensionWrapper) gd_get_suggested_tracker_names #

fn (s &OpenXRExtensionWrapper) gd_get_suggested_tracker_names() PackedStringArray

Returns a [PackedStringArray] of positional tracker names that are used within the extension wrapper.

fn (OpenXRExtensionWrapper) gd_on_register_metadata #

fn (s &OpenXRExtensionWrapper) gd_on_register_metadata()

Allows extensions to register additional controller metadata. This function is called even when the OpenXR API is not constructed as the metadata needs to be available to the editor. Extensions should also provide metadata regardless of whether they are supported on the host system. The controller data is used to setup action maps for users who may have access to the relevant hardware.

fn (OpenXRExtensionWrapper) gd_on_before_instance_created #

fn (s &OpenXRExtensionWrapper) gd_on_before_instance_created()

Called before the OpenXR instance is created.

fn (OpenXRExtensionWrapper) gd_on_instance_created #

fn (s &OpenXRExtensionWrapper) gd_on_instance_created(instance i64)

Called right after the OpenXR instance is created.

fn (OpenXRExtensionWrapper) gd_on_instance_destroyed #

fn (s &OpenXRExtensionWrapper) gd_on_instance_destroyed()

Called right before the OpenXR instance is destroyed.

fn (OpenXRExtensionWrapper) gd_on_session_created #

fn (s &OpenXRExtensionWrapper) gd_on_session_created(session i64)

Called right after the OpenXR session is created.

fn (OpenXRExtensionWrapper) gd_on_process #

fn (s &OpenXRExtensionWrapper) gd_on_process()

Called as part of the OpenXR process handling. This happens right before general and physics processing steps of the main loop. During this step controller data is queried and made available to game logic.

fn (OpenXRExtensionWrapper) gd_on_pre_render #

fn (s &OpenXRExtensionWrapper) gd_on_pre_render()

Called right before the XR viewports begin their rendering step.

fn (OpenXRExtensionWrapper) gd_on_main_swapchains_created #

fn (s &OpenXRExtensionWrapper) gd_on_main_swapchains_created()

Called right after the main swapchains are (re)created.

fn (OpenXRExtensionWrapper) gd_on_pre_draw_viewport #

fn (s &OpenXRExtensionWrapper) gd_on_pre_draw_viewport(viewport RID)

Called right before the given viewport is rendered.

fn (OpenXRExtensionWrapper) gd_on_post_draw_viewport #

fn (s &OpenXRExtensionWrapper) gd_on_post_draw_viewport(viewport RID)

Called right after the given viewport is rendered. [b]Note:[/b] The draw commands might only be queued at this point, not executed.

fn (OpenXRExtensionWrapper) gd_on_session_destroyed #

fn (s &OpenXRExtensionWrapper) gd_on_session_destroyed()

Called right before the OpenXR session is destroyed.

fn (OpenXRExtensionWrapper) gd_on_state_idle #

fn (s &OpenXRExtensionWrapper) gd_on_state_idle()

Called when the OpenXR session state is changed to idle.

fn (OpenXRExtensionWrapper) gd_on_state_ready #

fn (s &OpenXRExtensionWrapper) gd_on_state_ready()

Called when the OpenXR session state is changed to ready. This means OpenXR is ready to set up the session.

fn (OpenXRExtensionWrapper) gd_on_state_synchronized #

fn (s &OpenXRExtensionWrapper) gd_on_state_synchronized()

Called when the OpenXR session state is changed to synchronized. OpenXR also returns to this state when the application loses focus.

fn (OpenXRExtensionWrapper) gd_on_state_visible #

fn (s &OpenXRExtensionWrapper) gd_on_state_visible()

Called when the OpenXR session state is changed to visible. This means OpenXR is now ready to receive frames.

fn (OpenXRExtensionWrapper) gd_on_state_focused #

fn (s &OpenXRExtensionWrapper) gd_on_state_focused()

Called when the OpenXR session state is changed to focused. This state is the active state when the game runs.

fn (OpenXRExtensionWrapper) gd_on_state_stopping #

fn (s &OpenXRExtensionWrapper) gd_on_state_stopping()

Called when the OpenXR session state is changed to stopping.

fn (OpenXRExtensionWrapper) gd_on_state_loss_pending #

fn (s &OpenXRExtensionWrapper) gd_on_state_loss_pending()

Called when the OpenXR session state is changed to loss pending.

fn (OpenXRExtensionWrapper) gd_on_state_exiting #

fn (s &OpenXRExtensionWrapper) gd_on_state_exiting()

Called when the OpenXR session state is changed to exiting.

fn (OpenXRExtensionWrapper) gd_on_event_polled #

fn (s &OpenXRExtensionWrapper) gd_on_event_polled(event voidptr) bool

Called when there is an OpenXR event to process. When implementing, return true if the event was handled, return false otherwise.

fn (OpenXRExtensionWrapper) gd_set_viewport_composition_layer_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_viewport_composition_layer_and_get_next_pointer(layer voidptr, property_values Dictionary, next_pointer voidptr) i64

Adds additional data structures to composition layers created by [OpenXRCompositionLayer]. [param property_values] contains the values of the properties returned by [method _get_viewport_composition_layer_extension_properties]. [param layer] is a pointer to an XrCompositionLayerBaseHeader struct.

fn (OpenXRExtensionWrapper) gd_get_viewport_composition_layer_extension_properties #

fn (s &OpenXRExtensionWrapper) gd_get_viewport_composition_layer_extension_properties() Array

Gets an array of [Dictionary]s that represent properties, just like [method Object._get_property_list], that will be added to [OpenXRCompositionLayer] nodes.

fn (OpenXRExtensionWrapper) gd_get_viewport_composition_layer_extension_property_defaults #

fn (s &OpenXRExtensionWrapper) gd_get_viewport_composition_layer_extension_property_defaults() Dictionary

Gets a [Dictionary] containing the default values for the properties returned by [method _get_viewport_composition_layer_extension_properties].

fn (OpenXRExtensionWrapper) gd_on_viewport_composition_layer_destroyed #

fn (s &OpenXRExtensionWrapper) gd_on_viewport_composition_layer_destroyed(layer voidptr)

Called when a composition layer created via [OpenXRCompositionLayer] is destroyed. [param layer] is a pointer to an XrCompositionLayerBaseHeader struct.

fn (OpenXRExtensionWrapper) gd_set_android_surface_swapchain_create_info_and_get_next_pointer #

fn (s &OpenXRExtensionWrapper) gd_set_android_surface_swapchain_create_info_and_get_next_pointer(property_values Dictionary, next_pointer voidptr) i64

Adds additional data structures to Android surface swapchains created by [OpenXRCompositionLayer]. [param property_values] contains the values of the properties returned by [method _get_viewport_composition_layer_extension_properties].

fn (OpenXRExtensionWrapper) get_openxr_api #

fn (s &OpenXRExtensionWrapper) get_openxr_api() OpenXRAPIExtension

Returns the created [OpenXRAPIExtension], which can be used to access the OpenXR API.

fn (OpenXRExtensionWrapper) register_extension_wrapper #

fn (s &OpenXRExtensionWrapper) register_extension_wrapper()

Registers the extension. This should happen at core module initialization level.

struct OpenXRExtensionWrapperExtension #

struct OpenXRExtensionWrapperExtension {
	OpenXRExtensionWrapper
}

Allows implementing OpenXR extensions with GDExtension.

fn (OpenXRExtensionWrapperExtension) to_variant #

fn (s &OpenXRExtensionWrapperExtension) to_variant() Variant

fn (OpenXRExtensionWrapperExtension) from_variant #

fn (mut s OpenXRExtensionWrapperExtension) from_variant(variant &Variant)

struct OpenXRFutureExtension #

struct OpenXRFutureExtension {
	OpenXRExtensionWrapper
}

The OpenXR Future extension allows for asynchronous APIs to be used.

fn (OpenXRFutureExtension) to_variant #

fn (s &OpenXRFutureExtension) to_variant() Variant

fn (OpenXRFutureExtension) from_variant #

fn (mut s OpenXRFutureExtension) from_variant(variant &Variant)

fn (OpenXRFutureExtension) is_active #

fn (s &OpenXRFutureExtension) is_active() bool

Returns true if futures are available in the OpenXR runtime used. This function will only return a usable result after OpenXR has been initialized.

fn (OpenXRFutureExtension) register_future #

fn (s &OpenXRFutureExtension) register_future(future i64, cfg OpenXRFutureExtension_register_future_Cfg) OpenXRFutureResult

Register an OpenXR Future object so we monitor for completion. [param future] must be an XrFutureEXT value previously returned by an API that started an asynchronous function. You can optionally specify [param on_success], it will be invoked on successful completion of the future. Or you can use the returned [OpenXRFutureResult] object to await its [signal OpenXRFutureResult.completed] signal.

var future_result = OpenXRFutureExtension.register_future(future)
await future_result.completed
if future_result.get_status() == OpenXRFutureResult.RESULT_FINISHED:
##pass

fn (OpenXRFutureExtension) cancel_future #

fn (s &OpenXRFutureExtension) cancel_future(future i64)

Cancels an in-progress future. [param future] must be an XrFutureEXT value previously returned by an API that started an asynchronous function.

struct OpenXRFutureExtension_register_future_Cfg #

@[params]
struct OpenXRFutureExtension_register_future_Cfg {
pub:
	on_success Callable = Callable{}
}

Optional parameters for OpenXRFutureExtension#register_future

struct OpenXRFutureResult #

struct OpenXRFutureResult {
	RefCounted
}

Result object tracking the asynchronous result of an OpenXR Future object.

fn (OpenXRFutureResult) to_variant #

fn (s &OpenXRFutureResult) to_variant() Variant

fn (OpenXRFutureResult) from_variant #

fn (mut s OpenXRFutureResult) from_variant(variant &Variant)

fn (OpenXRFutureResult) get_status #

fn (s &OpenXRFutureResult) get_status() OpenXRFutureResultResultStatus

Returns the status of this result.

fn (OpenXRFutureResult) get_future #

fn (s &OpenXRFutureResult) get_future() i64

Return the XrFutureEXT value this result relates to.

fn (OpenXRFutureResult) cancel_future #

fn (s &OpenXRFutureResult) cancel_future()

Cancel this future, this will interrupt and stop the asynchronous function.

fn (OpenXRFutureResult) set_result_value #

fn (s &OpenXRFutureResult) set_result_value(result_value_ ToVariant)

Stores the result value we expose to the user. [b]Note:[/b] This method should only be called by an OpenXR extension that implements an asynchronous function.

fn (OpenXRFutureResult) get_result_value #

fn (s &OpenXRFutureResult) get_result_value() Variant

Returns the result value of our asynchronous function (if set by the extension). The type of this result value depends on the function being called. Consult the documentation of the relevant function.

struct OpenXRHand #

struct OpenXRHand {
	Node3D
}

Node supporting hand and finger tracking in OpenXR.

fn (OpenXRHand) to_variant #

fn (s &OpenXRHand) to_variant() Variant

fn (OpenXRHand) from_variant #

fn (mut s OpenXRHand) from_variant(variant &Variant)

fn (OpenXRHand) set_hand #

fn (s &OpenXRHand) set_hand(hand OpenXRHandHands)

fn (OpenXRHand) get_hand #

fn (s &OpenXRHand) get_hand() OpenXRHandHands

fn (OpenXRHand) set_hand_skeleton #

fn (s &OpenXRHand) set_hand_skeleton(hand_skeleton NodePath)

fn (OpenXRHand) get_hand_skeleton #

fn (s &OpenXRHand) get_hand_skeleton() NodePath

fn (OpenXRHand) set_motion_range #

fn (s &OpenXRHand) set_motion_range(motion_range OpenXRHandMotionRange)

fn (OpenXRHand) get_motion_range #

fn (s &OpenXRHand) get_motion_range() OpenXRHandMotionRange

fn (OpenXRHand) set_skeleton_rig #

fn (s &OpenXRHand) set_skeleton_rig(skeleton_rig OpenXRHandSkeletonRig)

fn (OpenXRHand) get_skeleton_rig #

fn (s &OpenXRHand) get_skeleton_rig() OpenXRHandSkeletonRig

fn (OpenXRHand) set_bone_update #

fn (s &OpenXRHand) set_bone_update(bone_update OpenXRHandBoneUpdate)

fn (OpenXRHand) get_bone_update #

fn (s &OpenXRHand) get_bone_update() OpenXRHandBoneUpdate

struct OpenXRHapticBase #

struct OpenXRHapticBase {
	Resource
}

OpenXR Haptic feedback base class.

fn (OpenXRHapticBase) to_variant #

fn (s &OpenXRHapticBase) to_variant() Variant

fn (OpenXRHapticBase) from_variant #

fn (mut s OpenXRHapticBase) from_variant(variant &Variant)

struct OpenXRHapticVibration #

struct OpenXRHapticVibration {
	OpenXRHapticBase
}

Vibration haptic feedback.

fn (OpenXRHapticVibration) to_variant #

fn (s &OpenXRHapticVibration) to_variant() Variant

fn (OpenXRHapticVibration) from_variant #

fn (mut s OpenXRHapticVibration) from_variant(variant &Variant)

fn (OpenXRHapticVibration) set_duration #

fn (s &OpenXRHapticVibration) set_duration(duration i64)

fn (OpenXRHapticVibration) get_duration #

fn (s &OpenXRHapticVibration) get_duration() i64

fn (OpenXRHapticVibration) set_frequency #

fn (s &OpenXRHapticVibration) set_frequency(frequency f64)

fn (OpenXRHapticVibration) get_frequency #

fn (s &OpenXRHapticVibration) get_frequency() f64

fn (OpenXRHapticVibration) set_amplitude #

fn (s &OpenXRHapticVibration) set_amplitude(amplitude f64)

fn (OpenXRHapticVibration) get_amplitude #

fn (s &OpenXRHapticVibration) get_amplitude() f64

struct OpenXRIPBinding #

struct OpenXRIPBinding {
	Resource
}

Defines a binding between an [OpenXRAction] and an XR input or output.

fn (OpenXRIPBinding) to_variant #

fn (s &OpenXRIPBinding) to_variant() Variant

fn (OpenXRIPBinding) from_variant #

fn (mut s OpenXRIPBinding) from_variant(variant &Variant)

fn (OpenXRIPBinding) set_action #

fn (s &OpenXRIPBinding) set_action(action OpenXRAction)

fn (OpenXRIPBinding) get_action #

fn (s &OpenXRIPBinding) get_action() OpenXRAction

fn (OpenXRIPBinding) set_binding_path #

fn (s &OpenXRIPBinding) set_binding_path(binding_path string)

fn (OpenXRIPBinding) get_binding_path #

fn (s &OpenXRIPBinding) get_binding_path() string

fn (OpenXRIPBinding) get_binding_modifier_count #

fn (s &OpenXRIPBinding) get_binding_modifier_count() i64

Get the number of binding modifiers for this binding.

fn (OpenXRIPBinding) get_binding_modifier #

fn (s &OpenXRIPBinding) get_binding_modifier(index i64) OpenXRActionBindingModifier

Get the [OpenXRBindingModifier] at this index.

fn (OpenXRIPBinding) set_binding_modifiers #

fn (s &OpenXRIPBinding) set_binding_modifiers(binding_modifiers Array)

fn (OpenXRIPBinding) get_binding_modifiers #

fn (s &OpenXRIPBinding) get_binding_modifiers() Array

fn (OpenXRIPBinding) set_paths #

fn (s &OpenXRIPBinding) set_paths(paths PackedStringArray)

fn (OpenXRIPBinding) get_paths #

fn (s &OpenXRIPBinding) get_paths() PackedStringArray

fn (OpenXRIPBinding) get_path_count #

fn (s &OpenXRIPBinding) get_path_count() i64

Get the number of input/output paths in this binding.

fn (OpenXRIPBinding) has_path #

fn (s &OpenXRIPBinding) has_path(path string) bool

Returns true if this input/output path is part of this binding.

fn (OpenXRIPBinding) add_path #

fn (s &OpenXRIPBinding) add_path(path string)

Add an input/output path to this binding.

fn (OpenXRIPBinding) remove_path #

fn (s &OpenXRIPBinding) remove_path(path string)

Removes this input/output path from this binding.

struct OpenXRIPBindingModifier #

struct OpenXRIPBindingModifier {
	OpenXRBindingModifier
}

Binding modifier that applies directly on an interaction profile.

fn (OpenXRIPBindingModifier) to_variant #

fn (s &OpenXRIPBindingModifier) to_variant() Variant

fn (OpenXRIPBindingModifier) from_variant #

fn (mut s OpenXRIPBindingModifier) from_variant(variant &Variant)

struct OpenXRInteractionProfile #

struct OpenXRInteractionProfile {
	Resource
}

Suggested bindings object for OpenXR.

fn (OpenXRInteractionProfile) to_variant #

fn (s &OpenXRInteractionProfile) to_variant() Variant

fn (OpenXRInteractionProfile) from_variant #

fn (mut s OpenXRInteractionProfile) from_variant(variant &Variant)

fn (OpenXRInteractionProfile) set_interaction_profile_path #

fn (s &OpenXRInteractionProfile) set_interaction_profile_path(interaction_profile_path string)

fn (OpenXRInteractionProfile) get_interaction_profile_path #

fn (s &OpenXRInteractionProfile) get_interaction_profile_path() string

fn (OpenXRInteractionProfile) get_binding_count #

fn (s &OpenXRInteractionProfile) get_binding_count() i64

Get the number of bindings in this interaction profile.

fn (OpenXRInteractionProfile) get_binding #

fn (s &OpenXRInteractionProfile) get_binding(index i64) OpenXRIPBinding

Retrieve the binding at this index.

fn (OpenXRInteractionProfile) set_bindings #

fn (s &OpenXRInteractionProfile) set_bindings(bindings Array)

fn (OpenXRInteractionProfile) get_bindings #

fn (s &OpenXRInteractionProfile) get_bindings() Array

fn (OpenXRInteractionProfile) get_binding_modifier_count #

fn (s &OpenXRInteractionProfile) get_binding_modifier_count() i64

Get the number of binding modifiers in this interaction profile.

fn (OpenXRInteractionProfile) get_binding_modifier #

fn (s &OpenXRInteractionProfile) get_binding_modifier(index i64) OpenXRIPBindingModifier

Get the [OpenXRBindingModifier] at this index.

fn (OpenXRInteractionProfile) set_binding_modifiers #

fn (s &OpenXRInteractionProfile) set_binding_modifiers(binding_modifiers Array)

fn (OpenXRInteractionProfile) get_binding_modifiers #

fn (s &OpenXRInteractionProfile) get_binding_modifiers() Array

struct OpenXRInteractionProfileEditor #

struct OpenXRInteractionProfileEditor {
	OpenXRInteractionProfileEditorBase
}

Default OpenXR interaction profile editor.

fn (OpenXRInteractionProfileEditor) to_variant #

fn (s &OpenXRInteractionProfileEditor) to_variant() Variant

fn (OpenXRInteractionProfileEditor) from_variant #

fn (mut s OpenXRInteractionProfileEditor) from_variant(variant &Variant)

struct OpenXRInteractionProfileEditorBase #

struct OpenXRInteractionProfileEditorBase {
	HBoxContainer
}

Base class for editing interaction profiles.

fn (OpenXRInteractionProfileEditorBase) to_variant #

fn (s &OpenXRInteractionProfileEditorBase) to_variant() Variant

fn (OpenXRInteractionProfileEditorBase) from_variant #

fn (mut s OpenXRInteractionProfileEditorBase) from_variant(variant &Variant)

fn (OpenXRInteractionProfileEditorBase) setup #

fn (s &OpenXRInteractionProfileEditorBase) setup(action_map OpenXRActionMap, interaction_profile OpenXRInteractionProfile)

Setup this editor for the provided [param action_map] and [param interaction_profile].

struct OpenXRInteractionProfileMetadata #

struct OpenXRInteractionProfileMetadata {
	Object
}

Meta class registering supported devices in OpenXR.

fn (OpenXRInteractionProfileMetadata) to_variant #

fn (s &OpenXRInteractionProfileMetadata) to_variant() Variant

fn (OpenXRInteractionProfileMetadata) from_variant #

fn (mut s OpenXRInteractionProfileMetadata) from_variant(variant &Variant)

fn (OpenXRInteractionProfileMetadata) register_profile_rename #

fn (s &OpenXRInteractionProfileMetadata) register_profile_rename(old_name string, new_name string)

Allows for renaming old interaction profile paths to new paths to maintain backwards compatibility with older action maps.

fn (OpenXRInteractionProfileMetadata) register_top_level_path #

fn (s &OpenXRInteractionProfileMetadata) register_top_level_path(display_name string, openxr_path string, openxr_extension_name string)

Registers a top level path to which profiles can be bound. For instance /user/hand/left refers to the bind point for the player's left hand. Extensions can register additional top level paths, for instance a haptic vest extension might register /user/body/vest. [param display_name] is the name shown to the user. [param openxr_path] is the top level path being registered. [param openxr_extension_name] is optional and ensures the top level path is only used if the specified extension is available/enabled. When a top level path ends up being bound by OpenXR, a [XRPositionalTracker] is instantiated to manage the state of the device.

fn (OpenXRInteractionProfileMetadata) register_interaction_profile #

fn (s &OpenXRInteractionProfileMetadata) register_interaction_profile(display_name string, openxr_path string, openxr_extension_name string)

Registers an interaction profile using its OpenXR designation (e.g. /interaction_profiles/khr/simple_controller is the profile for OpenXR's simple controller profile). [param display_name] is the description shown to the user. [param openxr_path] is the interaction profile path being registered. [param openxr_extension_name] optionally restricts this profile to the given extension being enabled/available. If the extension is not available, the profile and all related entries used in an action map are filtered out.

fn (OpenXRInteractionProfileMetadata) register_io_path #

fn (s &OpenXRInteractionProfileMetadata) register_io_path(interaction_profile string, display_name string, toplevel_path string, openxr_path string, openxr_extension_name string, action_type OpenXRActionActionType)

Registers an input/output path for the given [param interaction_profile]. The profile should previously have been registered using [method register_interaction_profile]. [param display_name] is the description shown to the user. [param toplevel_path] specifies the bind path this input/output can be bound to (e.g. /user/hand/left or /user/hand/right). [param openxr_path] is the action input/output being registered (e.g. /user/hand/left/input/aim/pose). [param openxr_extension_name] restricts this input/output to an enabled/available extension, this doesn't need to repeat the extension on the profile but relates to overlapping extension (e.g. XR_EXT_palm_pose that introduces …/input/palm_ext/pose input paths). [param action_type] defines the type of input or output provided by OpenXR.

struct OpenXRInterface #

struct OpenXRInterface {
	XRInterface
}

Our OpenXR interface.

fn (OpenXRInterface) to_variant #

fn (s &OpenXRInterface) to_variant() Variant

fn (OpenXRInterface) from_variant #

fn (mut s OpenXRInterface) from_variant(variant &Variant)

fn (OpenXRInterface) get_display_refresh_rate #

fn (s &OpenXRInterface) get_display_refresh_rate() f64

fn (OpenXRInterface) set_display_refresh_rate #

fn (s &OpenXRInterface) set_display_refresh_rate(refresh_rate f64)

fn (OpenXRInterface) get_render_target_size_multiplier #

fn (s &OpenXRInterface) get_render_target_size_multiplier() f64

fn (OpenXRInterface) set_render_target_size_multiplier #

fn (s &OpenXRInterface) set_render_target_size_multiplier(multiplier f64)

fn (OpenXRInterface) is_foveation_supported #

fn (s &OpenXRInterface) is_foveation_supported() bool

Returns true if OpenXR's foveation extension is supported, the interface must be initialized before this returns a valid value. [b]Note:[/b] This feature is only available on the Compatibility renderer and currently only available on some stand alone headsets. For Vulkan set [member Viewport.vrs_mode] to VRS_XR on desktop.

fn (OpenXRInterface) get_foveation_level #

fn (s &OpenXRInterface) get_foveation_level() i64

fn (OpenXRInterface) set_foveation_level #

fn (s &OpenXRInterface) set_foveation_level(foveation_level i64)

fn (OpenXRInterface) get_foveation_dynamic #

fn (s &OpenXRInterface) get_foveation_dynamic() bool

fn (OpenXRInterface) set_foveation_dynamic #

fn (s &OpenXRInterface) set_foveation_dynamic(foveation_dynamic bool)

fn (OpenXRInterface) is_action_set_active #

fn (s &OpenXRInterface) is_action_set_active(name string) bool

Returns true if the given action set is active.

fn (OpenXRInterface) set_action_set_active #

fn (s &OpenXRInterface) set_action_set_active(name string, active bool)

Sets the given action set as active or inactive.

fn (OpenXRInterface) get_action_sets #

fn (s &OpenXRInterface) get_action_sets() Array

Returns a list of action sets registered with Godot (loaded from the action map at runtime).

fn (OpenXRInterface) get_available_display_refresh_rates #

fn (s &OpenXRInterface) get_available_display_refresh_rates() Array

Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the OpenXR runtime and after the interface has been initialized.

fn (OpenXRInterface) set_motion_range #

fn (s &OpenXRInterface) set_motion_range(hand OpenXRInterfaceHand, motion_range OpenXRInterfaceHandMotionRange)

If handtracking is enabled and motion range is supported, sets the currently configured motion range for [param hand] to [param motion_range].

fn (OpenXRInterface) get_motion_range #

fn (s &OpenXRInterface) get_motion_range(hand OpenXRInterfaceHand) OpenXRInterfaceHandMotionRange

If handtracking is enabled and motion range is supported, gets the currently configured motion range for [param hand].

fn (OpenXRInterface) get_hand_tracking_source #

fn (s &OpenXRInterface) get_hand_tracking_source(hand OpenXRInterfaceHand) OpenXRInterfaceHandTrackedSource

If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for [param hand].

fn (OpenXRInterface) get_hand_joint_flags #

fn (s &OpenXRInterface) get_hand_joint_flags(hand OpenXRInterfaceHand, joint OpenXRInterfaceHandJoints) OpenXRInterfaceHandJointFlags

If handtracking is enabled, returns flags that inform us of the validity of the tracking data.

fn (OpenXRInterface) get_hand_joint_rotation #

fn (s &OpenXRInterface) get_hand_joint_rotation(hand OpenXRInterfaceHand, joint OpenXRInterfaceHandJoints) Quaternion

If handtracking is enabled, returns the rotation of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR.

fn (OpenXRInterface) get_hand_joint_position #

fn (s &OpenXRInterface) get_hand_joint_position(hand OpenXRInterfaceHand, joint OpenXRInterfaceHandJoints) Vector3

If handtracking is enabled, returns the position of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied!

fn (OpenXRInterface) get_hand_joint_radius #

fn (s &OpenXRInterface) get_hand_joint_radius(hand OpenXRInterfaceHand, joint OpenXRInterfaceHandJoints) f64

If handtracking is enabled, returns the radius of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is without worldscale applied!

fn (OpenXRInterface) get_hand_joint_linear_velocity #

fn (s &OpenXRInterface) get_hand_joint_linear_velocity(hand OpenXRInterfaceHand, joint OpenXRInterfaceHandJoints) Vector3

If handtracking is enabled, returns the linear velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied!

fn (OpenXRInterface) get_hand_joint_angular_velocity #

fn (s &OpenXRInterface) get_hand_joint_angular_velocity(hand OpenXRInterfaceHand, joint OpenXRInterfaceHandJoints) Vector3

If handtracking is enabled, returns the angular velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D]!

fn (OpenXRInterface) is_hand_tracking_supported #

fn (s &OpenXRInterface) is_hand_tracking_supported() bool

Returns true if OpenXR's hand tracking is supported and enabled. [b]Note:[/b] This only returns a valid value after OpenXR has been initialized.

fn (OpenXRInterface) is_hand_interaction_supported #

fn (s &OpenXRInterface) is_hand_interaction_supported() bool

Returns true if OpenXR's hand interaction profile is supported and enabled. [b]Note:[/b] This only returns a valid value after OpenXR has been initialized.

fn (OpenXRInterface) is_eye_gaze_interaction_supported #

fn (s &OpenXRInterface) is_eye_gaze_interaction_supported() bool

Returns the capabilities of the eye gaze interaction extension. [b]Note:[/b] This only returns a valid value after OpenXR has been initialized.

fn (OpenXRInterface) get_vrs_min_radius #

fn (s &OpenXRInterface) get_vrs_min_radius() f64

fn (OpenXRInterface) set_vrs_min_radius #

fn (s &OpenXRInterface) set_vrs_min_radius(radius f64)

fn (OpenXRInterface) get_vrs_strength #

fn (s &OpenXRInterface) get_vrs_strength() f64

fn (OpenXRInterface) set_vrs_strength #

fn (s &OpenXRInterface) set_vrs_strength(strength f64)

fn (OpenXRInterface) set_cpu_level #

fn (s &OpenXRInterface) set_cpu_level(level OpenXRInterfacePerfSettingsLevel)

Sets the CPU performance level of the OpenXR device.

fn (OpenXRInterface) set_gpu_level #

fn (s &OpenXRInterface) set_gpu_level(level OpenXRInterfacePerfSettingsLevel)

Sets the GPU performance level of the OpenXR device.

struct OpenXRVisibilityMask #

struct OpenXRVisibilityMask {
	VisualInstance3D
}

Draws a stereo correct visibility mask.

fn (OpenXRVisibilityMask) to_variant #

fn (s &OpenXRVisibilityMask) to_variant() Variant

fn (OpenXRVisibilityMask) from_variant #

fn (mut s OpenXRVisibilityMask) from_variant(variant &Variant)

struct OptimizedTranslation #

struct OptimizedTranslation {
	Translation
}

An optimized translation, used by default for CSV Translations.

fn (OptimizedTranslation) to_variant #

fn (s &OptimizedTranslation) to_variant() Variant

fn (OptimizedTranslation) from_variant #

fn (mut s OptimizedTranslation) from_variant(variant &Variant)

fn (OptimizedTranslation) generate #

fn (s &OptimizedTranslation) generate(from Translation)

Generates and sets an optimized translation from the given [Translation] resource. [b]Note:[/b] This method is intended to be used in the editor. It does nothing when called from an exported project.

struct OptionButton #

struct OptionButton {
	Button
}

A button that brings up a dropdown with selectable options when pressed.

fn (OptionButton) to_variant #

fn (s &OptionButton) to_variant() Variant

fn (OptionButton) from_variant #

fn (mut s OptionButton) from_variant(variant &Variant)

fn (OptionButton) add_item #

fn (s &OptionButton) add_item(label string, cfg OptionButton_add_item_Cfg)

Adds an item, with text [param label] and (optionally) [param id]. If no [param id] is passed, the item index will be used as the item's ID. New items are appended at the end.

fn (OptionButton) add_icon_item #

fn (s &OptionButton) add_icon_item(texture Texture2D, label string, cfg OptionButton_add_icon_item_Cfg)

Adds an item, with a [param texture] icon, text [param label] and (optionally) [param id]. If no [param id] is passed, the item index will be used as the item's ID. New items are appended at the end.

fn (OptionButton) set_item_text #

fn (s &OptionButton) set_item_text(idx i64, text string)

Sets the text of the item at index [param idx].

fn (OptionButton) set_item_icon #

fn (s &OptionButton) set_item_icon(idx i64, texture Texture2D)

Sets the icon of the item at index [param idx].

fn (OptionButton) set_item_disabled #

fn (s &OptionButton) set_item_disabled(idx i64, disabled bool)

Sets whether the item at index [param idx] is disabled. Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected.

fn (OptionButton) set_item_id #

fn (s &OptionButton) set_item_id(idx i64, id i64)

Sets the ID of the item at index [param idx].

fn (OptionButton) set_item_metadata #

fn (s &OptionButton) set_item_metadata(idx i64, metadata_ ToVariant)

Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID.

fn (OptionButton) set_item_tooltip #

fn (s &OptionButton) set_item_tooltip(idx i64, tooltip string)

Sets the tooltip of the item at index [param idx].

fn (OptionButton) set_item_auto_translate_mode #

fn (s &OptionButton) set_item_auto_translate_mode(idx i64, mode NodeAutoTranslateMode)

Sets the auto translate mode of the item at index [param idx]. Items use [constant Node.AUTO_TRANSLATE_MODE_INHERIT] by default, which uses the same auto translate mode as the [OptionButton] itself.

fn (OptionButton) get_item_text #

fn (s &OptionButton) get_item_text(idx i64) string

Returns the text of the item at index [param idx].

fn (OptionButton) get_item_icon #

fn (s &OptionButton) get_item_icon(idx i64) Texture2D

Returns the icon of the item at index [param idx].

fn (OptionButton) get_item_id #

fn (s &OptionButton) get_item_id(idx i64) i64

Returns the ID of the item at index [param idx].

fn (OptionButton) get_item_index #

fn (s &OptionButton) get_item_index(id i64) i64

Returns the index of the item with the given [param id].

fn (OptionButton) get_item_metadata #

fn (s &OptionButton) get_item_metadata(idx i64) Variant

Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID.

fn (OptionButton) get_item_tooltip #

fn (s &OptionButton) get_item_tooltip(idx i64) string

Returns the tooltip of the item at index [param idx].

fn (OptionButton) get_item_auto_translate_mode #

fn (s &OptionButton) get_item_auto_translate_mode(idx i64) NodeAutoTranslateMode

Returns the auto translate mode of the item at index [param idx].

fn (OptionButton) is_item_disabled #

fn (s &OptionButton) is_item_disabled(idx i64) bool

Returns true if the item at index [param idx] is disabled.

fn (OptionButton) is_item_separator #

fn (s &OptionButton) is_item_separator(idx i64) bool

Returns true if the item at index [param idx] is marked as a separator.

fn (OptionButton) add_separator #

fn (s &OptionButton) add_separator(cfg OptionButton_add_separator_Cfg)

Adds a separator to the list of items. Separators help to group items, and can optionally be given a [param text] header. A separator also gets an index assigned, and is appended at the end of the item list.

fn (OptionButton) clear #

fn (s &OptionButton) clear()

Clears all the items in the [OptionButton].

fn (OptionButton) gd_select #

fn (s &OptionButton) gd_select(idx i64)

Selects an item by index and makes it the current item. This will work even if the item is disabled. Passing -1 as the index deselects any currently selected item.

fn (OptionButton) get_selected #

fn (s &OptionButton) get_selected() i64

fn (OptionButton) get_selected_id #

fn (s &OptionButton) get_selected_id() i64

Returns the ID of the selected item, or -1 if no item is selected.

fn (OptionButton) get_selected_metadata #

fn (s &OptionButton) get_selected_metadata() Variant

Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata].

fn (OptionButton) remove_item #

fn (s &OptionButton) remove_item(idx i64)

Removes the item at index [param idx].

fn (OptionButton) get_popup #

fn (s &OptionButton) get_popup() PopupMenu

Returns the [PopupMenu] contained in this button. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.

fn (OptionButton) show_popup #

fn (s &OptionButton) show_popup()

Adjusts popup position and sizing for the [OptionButton], then shows the [PopupMenu]. Prefer this over using get_popup().popup().

fn (OptionButton) set_item_count #

fn (s &OptionButton) set_item_count(count i64)

fn (OptionButton) get_item_count #

fn (s &OptionButton) get_item_count() i64

fn (OptionButton) has_selectable_items #

fn (s &OptionButton) has_selectable_items() bool

Returns true if this button contains at least one item which is not disabled, or marked as a separator.

fn (OptionButton) get_selectable_item #

fn (s &OptionButton) get_selectable_item(cfg OptionButton_get_selectable_item_Cfg) i64

Returns the index of the first item which is not disabled, or marked as a separator. If [param from_last] is true, the items will be searched in reverse order. Returns -1 if no item is found.

fn (OptionButton) set_fit_to_longest_item #

fn (s &OptionButton) set_fit_to_longest_item(fit bool)

fn (OptionButton) is_fit_to_longest_item #

fn (s &OptionButton) is_fit_to_longest_item() bool

fn (OptionButton) set_allow_reselect #

fn (s &OptionButton) set_allow_reselect(allow bool)

fn (OptionButton) get_allow_reselect #

fn (s &OptionButton) get_allow_reselect() bool

fn (OptionButton) set_disable_shortcuts #

fn (s &OptionButton) set_disable_shortcuts(disabled bool)

If true, shortcuts are disabled and cannot be used to trigger the button.

struct OptionButton_add_icon_item_Cfg #

@[params]
struct OptionButton_add_icon_item_Cfg {
pub:
	id i64 = -1
}

Optional parameters for OptionButton#add_icon_item

struct OptionButton_add_item_Cfg #

@[params]
struct OptionButton_add_item_Cfg {
pub:
	id i64 = -1
}

Optional parameters for OptionButton#add_item

struct OptionButton_add_separator_Cfg #

@[params]
struct OptionButton_add_separator_Cfg {
pub:
	text string
}

Optional parameters for OptionButton#add_separator

struct OptionButton_get_selectable_item_Cfg #

@[params]
struct OptionButton_get_selectable_item_Cfg {
pub:
	from_last bool
}

Optional parameters for OptionButton#get_selectable_item

struct PCKPacker #

struct PCKPacker {
	RefCounted
}

Creates packages that can be loaded into a running project.

fn (PCKPacker) to_variant #

fn (s &PCKPacker) to_variant() Variant

fn (PCKPacker) from_variant #

fn (mut s PCKPacker) from_variant(variant &Variant)

fn (PCKPacker) pck_start #

fn (s &PCKPacker) pck_start(pck_path string, cfg PCKPacker_pck_start_Cfg) GDError

Creates a new PCK file at the file path [param pck_path]. The .pck file extension isn't added automatically, so it should be part of [param pck_path] (even though it's not required).

fn (PCKPacker) add_file #

fn (s &PCKPacker) add_file(target_path string, source_path string, cfg PCKPacker_add_file_Cfg) GDError

Adds the [param source_path] file to the current PCK package at the [param target_path] internal path. The res:// prefix for [param target_path] is optional and stripped internally. File content is immediately written to the PCK.

fn (PCKPacker) add_file_removal #

fn (s &PCKPacker) add_file_removal(target_path string) GDError

Registers a file removal of the [param target_path] internal path to the PCK. This is mainly used for patches. If the file at this path has been loaded from a previous PCK, it will be removed. The res:// prefix for [param target_path] is optional and stripped internally.

fn (PCKPacker) flush #

fn (s &PCKPacker) flush(cfg PCKPacker_flush_Cfg) GDError

Writes the file directory and closes the PCK. If [param verbose] is true, a list of files added will be printed to the console for easier debugging. [b]Note:[/b] [PCKPacker] will automatically flush when it's freed, which happens when it goes out of scope or when it gets assigned with null. In C# the reference must be disposed after use, either with the using statement or by calling the Dispose method directly.

struct PCKPacker_add_file_Cfg #

@[params]
struct PCKPacker_add_file_Cfg {
pub:
	encrypt bool
}

Optional parameters for PCKPacker#add_file

struct PCKPacker_flush_Cfg #

@[params]
struct PCKPacker_flush_Cfg {
pub:
	verbose bool
}

Optional parameters for PCKPacker#flush

struct PCKPacker_pck_start_Cfg #

@[params]
struct PCKPacker_pck_start_Cfg {
pub:
	alignment         i64 = 32
	key               string
	encrypt_directory bool
}

Optional parameters for PCKPacker#pck_start

struct PackedByteArray #

@[packed]
struct PackedByteArray {
	data_ [16]u8
}

A packed array of bytes.

An array specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes. [PackedByteArray] also provides methods to encode/decode various types to/from bytes. The way values are encoded is an implementation detail and shouldn't be relied upon when interacting with external apps. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedByteArray) deinit #

fn (s &PackedByteArray) deinit()

fn (PackedByteArray) get #

fn (s &PackedByteArray) get(index i64) i64

Returns the byte at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns 0. This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (PackedByteArray) set #

fn (s &PackedByteArray) set(index i64, value i64)

Changes the byte at the given index.

fn (PackedByteArray) size #

fn (s &PackedByteArray) size() i64

Returns the number of elements in the array.

fn (PackedByteArray) is_empty #

fn (s &PackedByteArray) is_empty() bool

Returns true if the array is empty.

fn (PackedByteArray) push_back #

fn (s &PackedByteArray) push_back(value i64) bool

Appends an element at the end of the array.

fn (PackedByteArray) append #

fn (s &PackedByteArray) append(value i64) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedByteArray) append_array #

fn (s &PackedByteArray) append_array(array PackedByteArray)

Appends a [PackedByteArray] at the end of this array.

fn (PackedByteArray) remove_at #

fn (s &PackedByteArray) remove_at(index i64)

Removes an element from the array by index.

fn (PackedByteArray) insert #

fn (s &PackedByteArray) insert(at_index i64, value i64) i64

Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedByteArray) fill #

fn (s &PackedByteArray) fill(value i64)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedByteArray) resize #

fn (s &PackedByteArray) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedByteArray) clear #

fn (s &PackedByteArray) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedByteArray) has #

fn (s &PackedByteArray) has(value i64) bool

Returns true if the array contains [param value].

fn (PackedByteArray) reverse #

fn (s &PackedByteArray) reverse()

Reverses the order of the elements in the array.

fn (PackedByteArray) slice #

fn (s &PackedByteArray) slice(begin i64, cfg PackedByteArray_slice_Cfg) PackedByteArray

Returns the slice of the [PackedByteArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedByteArray]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedByteArray) sort #

fn (s &PackedByteArray) sort()

Sorts the elements of the array in ascending order.

fn (PackedByteArray) bsearch #

fn (s &PackedByteArray) bsearch(value i64, cfg PackedByteArray_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.

fn (PackedByteArray) duplicate #

fn (s &PackedByteArray) duplicate() PackedByteArray

Creates a copy of the array, and returns it.

fn (PackedByteArray) find #

fn (s &PackedByteArray) find(value i64, cfg PackedByteArray_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed.

fn (PackedByteArray) rfind #

fn (s &PackedByteArray) rfind(value i64, cfg PackedByteArray_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.

fn (PackedByteArray) count #

fn (s &PackedByteArray) count(value i64) i64

Returns the number of times an element is in the array.

fn (PackedByteArray) erase #

fn (s &PackedByteArray) erase(value i64) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead.

fn (PackedByteArray) get_string_from_ascii #

fn (s &PackedByteArray) get_string_from_ascii() String

Converts ASCII/Latin-1 encoded array to [String]. Fast alternative to [method get_string_from_utf8] if the content is ASCII/Latin-1 only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method get_string_from_utf8]. This is the inverse of [method String.to_ascii_buffer].

fn (PackedByteArray) get_string_from_utf8 #

fn (s &PackedByteArray) get_string_from_utf8() String

Converts UTF-8 encoded array to [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string. This is the inverse of [method String.to_utf8_buffer].

fn (PackedByteArray) get_string_from_utf16 #

fn (s &PackedByteArray) get_string_from_utf16() String

Converts UTF-16 encoded array to [String]. If the BOM is missing, little-endianness is assumed. Returns empty string if source array is not valid UTF-16 string. This is the inverse of [method String.to_utf16_buffer].

fn (PackedByteArray) get_string_from_utf32 #

fn (s &PackedByteArray) get_string_from_utf32() String

Converts UTF-32 encoded array to [String]. Returns empty string if source array is not valid UTF-32 string. This is the inverse of [method String.to_utf32_buffer].

fn (PackedByteArray) get_string_from_wchar #

fn (s &PackedByteArray) get_string_from_wchar() String

Converts wide character (wchar_t, UTF-16 on Windows, UTF-32 on other platforms) encoded array to [String]. Returns empty string if source array is not valid wide string. This is the inverse of [method String.to_wchar_buffer].

fn (PackedByteArray) get_string_from_multibyte_char #

fn (s &PackedByteArray) get_string_from_multibyte_char(cfg PackedByteArray_get_string_from_multibyte_char_Cfg) String

Converts system multibyte code page encoded array to [String]. If conversion fails, empty string is returned. This is the inverse of [method String.to_multibyte_char_buffer]. The values permitted for [param encoding] are system dependent. If [param encoding] is empty string, system default encoding is used.- For Windows, see [url=https://learn.microsoft.com/en-us/windows/win32/Intl/code-page-identifiers]Code Page Identifiers[/url] .NET names.

  • For macOS and Linux/BSD, see libiconv library documentation and iconv --list for a list of supported encodings.

fn (PackedByteArray) hex_encode #

fn (s &PackedByteArray) hex_encode() String

Returns a hexadecimal representation of this array as a [String]. [codeblocks] [gdscript] var array = PackedByteArray([11, 46, 255]) print(array.hex_encode()) # Prints "0b2eff" [/gdscript] [csharp] byte[] array = [11, 46, 255]; GD.Print(array.HexEncode()); // Prints "0b2eff" [/csharp] [/codeblocks]

fn (PackedByteArray) compress #

fn (s &PackedByteArray) compress(cfg PackedByteArray_compress_Cfg) PackedByteArray

Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants.

fn (PackedByteArray) decompress #

fn (s &PackedByteArray) decompress(buffer_size i64, cfg PackedByteArray_decompress_Cfg) PackedByteArray

Returns a new [PackedByteArray] with the data decompressed. Set [param buffer_size] to the size of the uncompressed data. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants. [b]Note:[/b] Decompression is not guaranteed to work with data not compressed by Godot, for example if data compressed with the deflate compression mode lacks a checksum or header.

fn (PackedByteArray) decompress_dynamic #

fn (s &PackedByteArray) decompress_dynamic(max_output_size i64, cfg PackedByteArray_decompress_dynamic_Cfg) PackedByteArray

Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants. [b]This method only accepts brotli, gzip, and deflate compression modes.[/b] This method is potentially slower than [method decompress], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [method decompress] knows it's output buffer size from the beginning. GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [param max_output_size]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned. [b]Note:[/b] Decompression is not guaranteed to work with data not compressed by Godot, for example if data compressed with the deflate compression mode lacks a checksum or header.

fn (PackedByteArray) decode_u8 #

fn (s &PackedByteArray) decode_u8(byte_offset i64) i64

Decodes a 8-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0 if a valid number can't be decoded.

fn (PackedByteArray) decode_s8 #

fn (s &PackedByteArray) decode_s8(byte_offset i64) i64

Decodes a 8-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0 if a valid number can't be decoded.

fn (PackedByteArray) decode_u16 #

fn (s &PackedByteArray) decode_u16(byte_offset i64) i64

Decodes a 16-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0 if a valid number can't be decoded.

fn (PackedByteArray) decode_s16 #

fn (s &PackedByteArray) decode_s16(byte_offset i64) i64

Decodes a 16-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0 if a valid number can't be decoded.

fn (PackedByteArray) decode_u32 #

fn (s &PackedByteArray) decode_u32(byte_offset i64) i64

Decodes a 32-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0 if a valid number can't be decoded.

fn (PackedByteArray) decode_s32 #

fn (s &PackedByteArray) decode_s32(byte_offset i64) i64

Decodes a 32-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0 if a valid number can't be decoded.

fn (PackedByteArray) decode_u64 #

fn (s &PackedByteArray) decode_u64(byte_offset i64) i64

Decodes a 64-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0 if a valid number can't be decoded.

fn (PackedByteArray) decode_s64 #

fn (s &PackedByteArray) decode_s64(byte_offset i64) i64

Decodes a 64-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0 if a valid number can't be decoded.

fn (PackedByteArray) decode_half #

fn (s &PackedByteArray) decode_half(byte_offset i64) f64

Decodes a 16-bit floating-point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0.0 if a valid number can't be decoded.

fn (PackedByteArray) decode_float #

fn (s &PackedByteArray) decode_float(byte_offset i64) f64

Decodes a 32-bit floating-point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0.0 if a valid number can't be decoded.

fn (PackedByteArray) decode_double #

fn (s &PackedByteArray) decode_double(byte_offset i64) f64

Decodes a 64-bit floating-point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns 0.0 if a valid number can't be decoded.

fn (PackedByteArray) has_encoded_var #

fn (s &PackedByteArray) has_encoded_var(byte_offset i64, cfg PackedByteArray_has_encoded_var_Cfg) bool

Returns true if a valid [Variant] value can be decoded at the [param byte_offset]. Returns false otherwise or when the value is [Object]-derived and [param allow_objects] is false.

fn (PackedByteArray) decode_var #

fn (s &PackedByteArray) decode_var(byte_offset i64, cfg PackedByteArray_decode_var_Cfg) Variant

Decodes a [Variant] from the bytes starting at [param byte_offset]. Returns null if a valid variant can't be decoded or the value is [Object]-derived and [param allow_objects] is false.

fn (PackedByteArray) decode_var_size #

fn (s &PackedByteArray) decode_var_size(byte_offset i64, cfg PackedByteArray_decode_var_size_Cfg) i64

Decodes a size of a [Variant] from the bytes starting at [param byte_offset]. Requires at least 4 bytes of data starting at the offset, otherwise fails.

fn (PackedByteArray) to_int32_array #

fn (s &PackedByteArray) to_int32_array() PackedInt32Array

Returns a copy of the data converted to a [PackedInt32Array], where each block of 4 bytes has been converted to a signed 32-bit integer (C++ int32_t). The size of the input array must be a multiple of 4 (size of 32-bit integer). The size of the new array will be byte_array.size() / 4. If the original data can't be converted to signed 32-bit integers, the resulting data is undefined.

fn (PackedByteArray) to_int64_array #

fn (s &PackedByteArray) to_int64_array() PackedInt64Array

Returns a copy of the data converted to a [PackedInt64Array], where each block of 8 bytes has been converted to a signed 64-bit integer (C++ int64_t, Godot [int]). The size of the input array must be a multiple of 8 (size of 64-bit integer). The size of the new array will be byte_array.size() / 8. If the original data can't be converted to signed 64-bit integers, the resulting data is undefined.

fn (PackedByteArray) to_float32_array #

fn (s &PackedByteArray) to_float32_array() PackedFloat32Array

Returns a copy of the data converted to a [PackedFloat32Array], where each block of 4 bytes has been converted to a 32-bit float (C++ [code skip-lint]float). The size of the input array must be a multiple of 4 (size of 32-bit float). The size of the new array will be byte_array.size() / 4`. If the original data can't be converted to 32-bit floats, the resulting data is undefined.

fn (PackedByteArray) to_float64_array #

fn (s &PackedByteArray) to_float64_array() PackedFloat64Array

Returns a copy of the data converted to a [PackedFloat64Array], where each block of 8 bytes has been converted to a 64-bit float (C++ double, Godot [float]). The size of the input array must be a multiple of 8 (size of 64-bit double). The size of the new array will be byte_array.size() / 8. If the original data can't be converted to 64-bit floats, the resulting data is undefined.

fn (PackedByteArray) to_vector2_array #

fn (s &PackedByteArray) to_vector2_array() PackedVector2Array

Returns a copy of the data converted to a [PackedVector2Array], where each block of 8 bytes or 16 bytes (32-bit or 64-bit) has been converted to a [Vector2] variant. [b]Note:[/b] The size of the input array must be a multiple of 8 or 16 (depending on the build settings, see [Vector2] for more details). The size of the new array will be byte_array.size() / (8 or 16). If the original data can't be converted to [Vector2] variants, the resulting data is undefined.

fn (PackedByteArray) to_vector3_array #

fn (s &PackedByteArray) to_vector3_array() PackedVector3Array

Returns a copy of the data converted to a [PackedVector3Array], where each block of 12 or 24 bytes (32-bit or 64-bit) has been converted to a [Vector3] variant. [b]Note:[/b] The size of the input array must be a multiple of 12 or 24 (depending on the build settings, see [Vector3] for more details). The size of the new array will be byte_array.size() / (12 or 24). If the original data can't be converted to [Vector3] variants, the resulting data is undefined.

fn (PackedByteArray) to_vector4_array #

fn (s &PackedByteArray) to_vector4_array() PackedVector4Array

Returns a copy of the data converted to a [PackedVector4Array], where each block of 16 or 32 bytes (32-bit or 64-bit) has been converted to a [Vector4] variant. [b]Note:[/b] The size of the input array must be a multiple of 16 or 32 (depending on the build settings, see [Vector4] for more details). The size of the new array will be byte_array.size() / (16 or 32). If the original data can't be converted to [Vector4] variants, the resulting data is undefined.

fn (PackedByteArray) to_color_array #

fn (s &PackedByteArray) to_color_array() PackedColorArray

Returns a copy of the data converted to a [PackedColorArray], where each block of 16 bytes has been converted to a [Color] variant. [b]Note:[/b] The size of the input array must be a multiple of 16 (size of four 32-bit float variables). The size of the new array will be byte_array.size() / 16. If the original data can't be converted to [Color] variants, the resulting data is undefined.

fn (PackedByteArray) bswap16 #

fn (s &PackedByteArray) bswap16(cfg PackedByteArray_bswap16_Cfg)

Swaps the byte order of [param count] 16-bit segments of the array starting at [param offset]. Swap is done in-place. If [param count] is less than zero, all segments to the end of array are processed, if processed data size is not a multiple of 2, the byte after the last processed 16-bit segment is not modified.

fn (PackedByteArray) bswap32 #

fn (s &PackedByteArray) bswap32(cfg PackedByteArray_bswap32_Cfg)

Swaps the byte order of [param count] 32-bit segments of the array starting at [param offset]. Swap is done in-place. If [param count] is less than zero, all segments to the end of array are processed, if processed data size is not a multiple of 4, bytes after the last processed 32-bit segment are not modified.

fn (PackedByteArray) bswap64 #

fn (s &PackedByteArray) bswap64(cfg PackedByteArray_bswap64_Cfg)

Swaps the byte order of [param count] 64-bit segments of the array starting at [param offset]. Swap is done in-place. If [param count] is less than zero, all segments to the end of array are processed, if processed data size is not a multiple of 8, bytes after the last processed 64-bit segment are not modified.

fn (PackedByteArray) encode_u8 #

fn (s &PackedByteArray) encode_u8(byte_offset i64, value i64)

Encodes a 8-bit unsigned integer number (byte) at the index of [param byte_offset] bytes. The array must have at least 1 byte of space, starting at the offset.

fn (PackedByteArray) encode_s8 #

fn (s &PackedByteArray) encode_s8(byte_offset i64, value i64)

Encodes a 8-bit signed integer number (signed byte) at the index of [param byte_offset] bytes. The array must have at least 1 byte of space, starting at the offset.

fn (PackedByteArray) encode_u16 #

fn (s &PackedByteArray) encode_u16(byte_offset i64, value i64)

Encodes a 16-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset.

fn (PackedByteArray) encode_s16 #

fn (s &PackedByteArray) encode_s16(byte_offset i64, value i64)

Encodes a 16-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset.

fn (PackedByteArray) encode_u32 #

fn (s &PackedByteArray) encode_u32(byte_offset i64, value i64)

Encodes a 32-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset.

fn (PackedByteArray) encode_s32 #

fn (s &PackedByteArray) encode_s32(byte_offset i64, value i64)

Encodes a 32-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset.

fn (PackedByteArray) encode_u64 #

fn (s &PackedByteArray) encode_u64(byte_offset i64, value i64)

Encodes a 64-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of space, starting at the offset.

fn (PackedByteArray) encode_s64 #

fn (s &PackedByteArray) encode_s64(byte_offset i64, value i64)

Encodes a 64-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of space, starting at the offset.

fn (PackedByteArray) encode_half #

fn (s &PackedByteArray) encode_half(byte_offset i64, value f64)

Encodes a 16-bit floating-point number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset.

fn (PackedByteArray) encode_float #

fn (s &PackedByteArray) encode_float(byte_offset i64, value f64)

Encodes a 32-bit floating-point number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset.

fn (PackedByteArray) encode_double #

fn (s &PackedByteArray) encode_double(byte_offset i64, value f64)

Encodes a 64-bit floating-point number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of allocated space, starting at the offset.

fn (PackedByteArray) encode_var #

fn (s &PackedByteArray) encode_var(byte_offset i64, value_ ToVariant, cfg PackedByteArray_encode_var_Cfg) i64

Encodes a [Variant] at the index of [param byte_offset] bytes. A sufficient space must be allocated, depending on the encoded variant's size. If [param allow_objects] is false, [Object]-derived values are not permitted and will instead be serialized as ID-only.

fn (PackedByteArray) to_variant #

fn (s &PackedByteArray) to_variant() Variant

fn (PackedByteArray) from_variant #

fn (mut s PackedByteArray) from_variant(variant &Variant)

fn (PackedByteArray) index #

fn (v &PackedByteArray) index(i i64) i64

fn (PackedByteArray) in_dictionary #

fn (a PackedByteArray) in_dictionary(b Dictionary) bool

fn (PackedByteArray) in_array #

fn (a PackedByteArray) in_array(b Array) bool

fn (PackedByteArray) == #

fn (a PackedByteArray) == (b PackedByteArray) bool

Returns true if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices.

fn (PackedByteArray) eq_packedbytearray #

fn (a PackedByteArray) eq_packedbytearray(b PackedByteArray) bool

Returns true if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices.

fn (PackedByteArray) ne_packedbytearray #

fn (a PackedByteArray) ne_packedbytearray(b PackedByteArray) bool

Returns true if contents of the arrays differ.

fn (PackedByteArray) + #

fn (a PackedByteArray) + (b PackedByteArray) PackedByteArray

Returns a new [PackedByteArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedByteArray) add_packedbytearray #

fn (a PackedByteArray) add_packedbytearray(b PackedByteArray) PackedByteArray

Returns a new [PackedByteArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedByteArray_bsearch_Cfg #

@[params]
struct PackedByteArray_bsearch_Cfg {
pub:
	before bool
}

struct PackedByteArray_bswap16_Cfg #

@[params]
struct PackedByteArray_bswap16_Cfg {
pub:
	offset i64
	count  i64 = -1
}

struct PackedByteArray_bswap32_Cfg #

@[params]
struct PackedByteArray_bswap32_Cfg {
pub:
	offset i64
	count  i64 = -1
}

struct PackedByteArray_bswap64_Cfg #

@[params]
struct PackedByteArray_bswap64_Cfg {
pub:
	offset i64
	count  i64 = -1
}

struct PackedByteArray_compress_Cfg #

@[params]
struct PackedByteArray_compress_Cfg {
pub:
	compression_mode i64
}

struct PackedByteArray_decode_var_Cfg #

@[params]
struct PackedByteArray_decode_var_Cfg {
pub:
	allow_objects bool
}

struct PackedByteArray_decode_var_size_Cfg #

@[params]
struct PackedByteArray_decode_var_size_Cfg {
pub:
	allow_objects bool
}

struct PackedByteArray_decompress_Cfg #

@[params]
struct PackedByteArray_decompress_Cfg {
pub:
	compression_mode i64
}

struct PackedByteArray_decompress_dynamic_Cfg #

@[params]
struct PackedByteArray_decompress_dynamic_Cfg {
pub:
	compression_mode i64
}

struct PackedByteArray_encode_var_Cfg #

@[params]
struct PackedByteArray_encode_var_Cfg {
pub:
	allow_objects bool
}

struct PackedByteArray_find_Cfg #

@[params]
struct PackedByteArray_find_Cfg {
pub:
	from i64
}

struct PackedByteArray_get_string_from_multibyte_char_Cfg #

@[params]
struct PackedByteArray_get_string_from_multibyte_char_Cfg {
pub:
	encoding string
}

struct PackedByteArray_has_encoded_var_Cfg #

@[params]
struct PackedByteArray_has_encoded_var_Cfg {
pub:
	allow_objects bool
}

struct PackedByteArray_rfind_Cfg #

@[params]
struct PackedByteArray_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedByteArray_slice_Cfg #

@[params]
struct PackedByteArray_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PackedColorArray #

@[packed]
struct PackedColorArray {
	data_ [16]u8
}

A packed array of [Color]s.

An array specifically designed to hold [Color]. Packs data tightly, so it saves memory for large array sizes. [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedColorArray] versus Array[Color]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedColorArray) deinit #

fn (s &PackedColorArray) deinit()

fn (PackedColorArray) get #

fn (s &PackedColorArray) get(index i64) Color

Returns the [Color] at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns Color(0, 0, 0, 1). This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (PackedColorArray) set #

fn (s &PackedColorArray) set(index i64, value Color)

Changes the [Color] at the given index.

fn (PackedColorArray) size #

fn (s &PackedColorArray) size() i64

Returns the number of elements in the array.

fn (PackedColorArray) is_empty #

fn (s &PackedColorArray) is_empty() bool

Returns true if the array is empty.

fn (PackedColorArray) push_back #

fn (s &PackedColorArray) push_back(value Color) bool

Appends a value to the array.

fn (PackedColorArray) append #

fn (s &PackedColorArray) append(value Color) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedColorArray) append_array #

fn (s &PackedColorArray) append_array(array PackedColorArray)

Appends a [PackedColorArray] at the end of this array.

fn (PackedColorArray) remove_at #

fn (s &PackedColorArray) remove_at(index i64)

Removes an element from the array by index.

fn (PackedColorArray) insert #

fn (s &PackedColorArray) insert(at_index i64, value Color) i64

Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedColorArray) fill #

fn (s &PackedColorArray) fill(value Color)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedColorArray) resize #

fn (s &PackedColorArray) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedColorArray) clear #

fn (s &PackedColorArray) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedColorArray) has #

fn (s &PackedColorArray) has(value Color) bool

Returns true if the array contains [param value].

fn (PackedColorArray) reverse #

fn (s &PackedColorArray) reverse()

Reverses the order of the elements in the array.

fn (PackedColorArray) slice #

fn (s &PackedColorArray) slice(begin i64, cfg PackedColorArray_slice_Cfg) PackedColorArray

Returns the slice of the [PackedColorArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedColorArray]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedColorArray) to_byte_array #

fn (s &PackedColorArray) to_byte_array() PackedByteArray

Returns a [PackedByteArray] with each color encoded as bytes.

fn (PackedColorArray) sort #

fn (s &PackedColorArray) sort()

Sorts the elements of the array in ascending order.

fn (PackedColorArray) bsearch #

fn (s &PackedColorArray) bsearch(value Color, cfg PackedColorArray_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.

fn (PackedColorArray) duplicate #

fn (s &PackedColorArray) duplicate() PackedColorArray

Creates a copy of the array, and returns it.

fn (PackedColorArray) find #

fn (s &PackedColorArray) find(value Color, cfg PackedColorArray_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed.

fn (PackedColorArray) rfind #

fn (s &PackedColorArray) rfind(value Color, cfg PackedColorArray_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.

fn (PackedColorArray) count #

fn (s &PackedColorArray) count(value Color) i64

Returns the number of times an element is in the array.

fn (PackedColorArray) erase #

fn (s &PackedColorArray) erase(value Color) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead.

fn (PackedColorArray) to_variant #

fn (s &PackedColorArray) to_variant() Variant

fn (PackedColorArray) from_variant #

fn (mut s PackedColorArray) from_variant(variant &Variant)

fn (PackedColorArray) index #

fn (v &PackedColorArray) index(i i64) Color

fn (PackedColorArray) in_dictionary #

fn (a PackedColorArray) in_dictionary(b Dictionary) bool

fn (PackedColorArray) in_array #

fn (a PackedColorArray) in_array(b Array) bool

fn (PackedColorArray) == #

fn (a PackedColorArray) == (b PackedColorArray) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [Color]s at the corresponding indices.

fn (PackedColorArray) eq_packedcolorarray #

fn (a PackedColorArray) eq_packedcolorarray(b PackedColorArray) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [Color]s at the corresponding indices.

fn (PackedColorArray) ne_packedcolorarray #

fn (a PackedColorArray) ne_packedcolorarray(b PackedColorArray) bool

Returns true if contents of the arrays differ.

fn (PackedColorArray) + #

fn (a PackedColorArray) + (b PackedColorArray) PackedColorArray

Returns a new [PackedColorArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedColorArray) add_packedcolorarray #

fn (a PackedColorArray) add_packedcolorarray(b PackedColorArray) PackedColorArray

Returns a new [PackedColorArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedColorArray_bsearch_Cfg #

@[params]
struct PackedColorArray_bsearch_Cfg {
pub:
	before bool
}

struct PackedColorArray_find_Cfg #

@[params]
struct PackedColorArray_find_Cfg {
pub:
	from i64
}

struct PackedColorArray_rfind_Cfg #

@[params]
struct PackedColorArray_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedColorArray_slice_Cfg #

@[params]
struct PackedColorArray_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PackedDataContainer #

struct PackedDataContainer {
	Resource
}

Efficiently packs and serializes [Array] or [Dictionary].

fn (PackedDataContainer) to_variant #

fn (s &PackedDataContainer) to_variant() Variant

fn (PackedDataContainer) from_variant #

fn (mut s PackedDataContainer) from_variant(variant &Variant)

fn (PackedDataContainer) pack #

fn (s &PackedDataContainer) pack(value_ ToVariant) GDError

Packs the given container into a binary representation. The [param value] must be either [Array] or [Dictionary], any other type will result in invalid data error. [b]Note:[/b] Subsequent calls to this method will overwrite the existing data.

fn (PackedDataContainer) size #

fn (s &PackedDataContainer) size() i64

Returns the size of the packed container (see [method Array.size] and [method Dictionary.size]).

struct PackedDataContainerRef #

struct PackedDataContainerRef {
	RefCounted
}

An internal class used by [PackedDataContainer] to pack nested arrays and dictionaries.

fn (PackedDataContainerRef) to_variant #

fn (s &PackedDataContainerRef) to_variant() Variant

fn (PackedDataContainerRef) from_variant #

fn (mut s PackedDataContainerRef) from_variant(variant &Variant)

fn (PackedDataContainerRef) size #

fn (s &PackedDataContainerRef) size() i64

Returns the size of the packed container (see [method Array.size] and [method Dictionary.size]).

struct PackedFloat32Array #

@[packed]
struct PackedFloat32Array {
	data_ [16]u8
}

A packed array of 32-bit floating-point values.

An array specifically designed to hold 32-bit floating-point values (float). Packs data tightly, so it saves memory for large array sizes. If you need to pack 64-bit floats tightly, see [PackedFloat64Array]. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedFloat32Array) deinit #

fn (s &PackedFloat32Array) deinit()

fn (PackedFloat32Array) get #

fn (s &PackedFloat32Array) get(index i64) f64

Returns the 32-bit float at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns 0.0. This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (PackedFloat32Array) set #

fn (s &PackedFloat32Array) set(index i64, value f64)

Changes the float at the given index.

fn (PackedFloat32Array) size #

fn (s &PackedFloat32Array) size() i64

Returns the number of elements in the array.

fn (PackedFloat32Array) is_empty #

fn (s &PackedFloat32Array) is_empty() bool

Returns true if the array is empty.

fn (PackedFloat32Array) push_back #

fn (s &PackedFloat32Array) push_back(value f64) bool

Appends an element at the end of the array.

fn (PackedFloat32Array) append #

fn (s &PackedFloat32Array) append(value f64) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedFloat32Array) append_array #

fn (s &PackedFloat32Array) append_array(array PackedFloat32Array)

Appends a [PackedFloat32Array] at the end of this array.

fn (PackedFloat32Array) remove_at #

fn (s &PackedFloat32Array) remove_at(index i64)

Removes an element from the array by index.

fn (PackedFloat32Array) insert #

fn (s &PackedFloat32Array) insert(at_index i64, value f64) i64

Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedFloat32Array) fill #

fn (s &PackedFloat32Array) fill(value f64)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedFloat32Array) resize #

fn (s &PackedFloat32Array) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedFloat32Array) clear #

fn (s &PackedFloat32Array) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedFloat32Array) has #

fn (s &PackedFloat32Array) has(value f64) bool

Returns true if the array contains [param value]. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat32Array) reverse #

fn (s &PackedFloat32Array) reverse()

Reverses the order of the elements in the array.

fn (PackedFloat32Array) slice #

fn (s &PackedFloat32Array) slice(begin i64, cfg PackedFloat32Array_slice_Cfg) PackedFloat32Array

Returns the slice of the [PackedFloat32Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedFloat32Array]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedFloat32Array) to_byte_array #

fn (s &PackedFloat32Array) to_byte_array() PackedByteArray

Returns a copy of the data converted to a [PackedByteArray], where each element has been encoded as 4 bytes. The size of the new array will be float32_array.size() * 4.

fn (PackedFloat32Array) sort #

fn (s &PackedFloat32Array) sort()

Sorts the elements of the array in ascending order. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat32Array) bsearch #

fn (s &PackedFloat32Array) bsearch(value f64, cfg PackedFloat32Array_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat32Array) duplicate #

fn (s &PackedFloat32Array) duplicate() PackedFloat32Array

Creates a copy of the array, and returns it.

fn (PackedFloat32Array) find #

fn (s &PackedFloat32Array) find(value f64, cfg PackedFloat32Array_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat32Array) rfind #

fn (s &PackedFloat32Array) rfind(value f64, cfg PackedFloat32Array_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat32Array) count #

fn (s &PackedFloat32Array) count(value f64) i64

Returns the number of times an element is in the array. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat32Array) erase #

fn (s &PackedFloat32Array) erase(value f64) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat32Array) to_variant #

fn (s &PackedFloat32Array) to_variant() Variant

fn (PackedFloat32Array) from_variant #

fn (mut s PackedFloat32Array) from_variant(variant &Variant)

fn (PackedFloat32Array) index #

fn (v &PackedFloat32Array) index(i i64) f64

fn (PackedFloat32Array) in_dictionary #

fn (a PackedFloat32Array) in_dictionary(b Dictionary) bool

fn (PackedFloat32Array) in_array #

fn (a PackedFloat32Array) in_array(b Array) bool

fn (PackedFloat32Array) == #

fn (a PackedFloat32Array) == (b PackedFloat32Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal floats at the corresponding indices.

fn (PackedFloat32Array) eq_packedfloat32array #

fn (a PackedFloat32Array) eq_packedfloat32array(b PackedFloat32Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal floats at the corresponding indices.

fn (PackedFloat32Array) ne_packedfloat32array #

fn (a PackedFloat32Array) ne_packedfloat32array(b PackedFloat32Array) bool

Returns true if contents of the arrays differ.

fn (PackedFloat32Array) + #

fn (a PackedFloat32Array) + (b PackedFloat32Array) PackedFloat32Array

Returns a new [PackedFloat32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedFloat32Array) add_packedfloat32array #

fn (a PackedFloat32Array) add_packedfloat32array(b PackedFloat32Array) PackedFloat32Array

Returns a new [PackedFloat32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedFloat32Array_bsearch_Cfg #

@[params]
struct PackedFloat32Array_bsearch_Cfg {
pub:
	before bool
}

struct PackedFloat32Array_find_Cfg #

@[params]
struct PackedFloat32Array_find_Cfg {
pub:
	from i64
}

struct PackedFloat32Array_rfind_Cfg #

@[params]
struct PackedFloat32Array_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedFloat32Array_slice_Cfg #

@[params]
struct PackedFloat32Array_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PackedFloat64Array #

@[packed]
struct PackedFloat64Array {
	data_ [16]u8
}

A packed array of 64-bit floating-point values.

An array specifically designed to hold 64-bit floating-point values (double). Packs data tightly, so it saves memory for large array sizes. If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative. [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedFloat64Array] versus Array[float]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedFloat64Array) deinit #

fn (s &PackedFloat64Array) deinit()

fn (PackedFloat64Array) get #

fn (s &PackedFloat64Array) get(index i64) f64

Returns the 64-bit float at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns 0.0. This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (PackedFloat64Array) set #

fn (s &PackedFloat64Array) set(index i64, value f64)

Changes the float at the given index.

fn (PackedFloat64Array) size #

fn (s &PackedFloat64Array) size() i64

Returns the number of elements in the array.

fn (PackedFloat64Array) is_empty #

fn (s &PackedFloat64Array) is_empty() bool

Returns true if the array is empty.

fn (PackedFloat64Array) push_back #

fn (s &PackedFloat64Array) push_back(value f64) bool

Appends an element at the end of the array.

fn (PackedFloat64Array) append #

fn (s &PackedFloat64Array) append(value f64) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedFloat64Array) append_array #

fn (s &PackedFloat64Array) append_array(array PackedFloat64Array)

Appends a [PackedFloat64Array] at the end of this array.

fn (PackedFloat64Array) remove_at #

fn (s &PackedFloat64Array) remove_at(index i64)

Removes an element from the array by index.

fn (PackedFloat64Array) insert #

fn (s &PackedFloat64Array) insert(at_index i64, value f64) i64

Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedFloat64Array) fill #

fn (s &PackedFloat64Array) fill(value f64)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedFloat64Array) resize #

fn (s &PackedFloat64Array) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedFloat64Array) clear #

fn (s &PackedFloat64Array) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedFloat64Array) has #

fn (s &PackedFloat64Array) has(value f64) bool

Returns true if the array contains [param value]. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat64Array) reverse #

fn (s &PackedFloat64Array) reverse()

Reverses the order of the elements in the array.

fn (PackedFloat64Array) slice #

fn (s &PackedFloat64Array) slice(begin i64, cfg PackedFloat64Array_slice_Cfg) PackedFloat64Array

Returns the slice of the [PackedFloat64Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedFloat64Array]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedFloat64Array) to_byte_array #

fn (s &PackedFloat64Array) to_byte_array() PackedByteArray

Returns a copy of the data converted to a [PackedByteArray], where each element has been encoded as 8 bytes. The size of the new array will be float64_array.size() * 8.

fn (PackedFloat64Array) sort #

fn (s &PackedFloat64Array) sort()

Sorts the elements of the array in ascending order. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat64Array) bsearch #

fn (s &PackedFloat64Array) bsearch(value f64, cfg PackedFloat64Array_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat64Array) duplicate #

fn (s &PackedFloat64Array) duplicate() PackedFloat64Array

Creates a copy of the array, and returns it.

fn (PackedFloat64Array) find #

fn (s &PackedFloat64Array) find(value f64, cfg PackedFloat64Array_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat64Array) rfind #

fn (s &PackedFloat64Array) rfind(value f64, cfg PackedFloat64Array_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat64Array) count #

fn (s &PackedFloat64Array) count(value f64) i64

Returns the number of times an element is in the array. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat64Array) erase #

fn (s &PackedFloat64Array) erase(value f64) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead. [b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedFloat64Array) to_variant #

fn (s &PackedFloat64Array) to_variant() Variant

fn (PackedFloat64Array) from_variant #

fn (mut s PackedFloat64Array) from_variant(variant &Variant)

fn (PackedFloat64Array) index #

fn (v &PackedFloat64Array) index(i i64) f64

fn (PackedFloat64Array) in_dictionary #

fn (a PackedFloat64Array) in_dictionary(b Dictionary) bool

fn (PackedFloat64Array) in_array #

fn (a PackedFloat64Array) in_array(b Array) bool

fn (PackedFloat64Array) == #

fn (a PackedFloat64Array) == (b PackedFloat64Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal doubles at the corresponding indices.

fn (PackedFloat64Array) eq_packedfloat64array #

fn (a PackedFloat64Array) eq_packedfloat64array(b PackedFloat64Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal doubles at the corresponding indices.

fn (PackedFloat64Array) ne_packedfloat64array #

fn (a PackedFloat64Array) ne_packedfloat64array(b PackedFloat64Array) bool

Returns true if contents of the arrays differ.

fn (PackedFloat64Array) + #

fn (a PackedFloat64Array) + (b PackedFloat64Array) PackedFloat64Array

Returns a new [PackedFloat64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedFloat64Array) add_packedfloat64array #

fn (a PackedFloat64Array) add_packedfloat64array(b PackedFloat64Array) PackedFloat64Array

Returns a new [PackedFloat64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedFloat64Array_bsearch_Cfg #

@[params]
struct PackedFloat64Array_bsearch_Cfg {
pub:
	before bool
}

struct PackedFloat64Array_find_Cfg #

@[params]
struct PackedFloat64Array_find_Cfg {
pub:
	from i64
}

struct PackedFloat64Array_rfind_Cfg #

@[params]
struct PackedFloat64Array_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedFloat64Array_slice_Cfg #

@[params]
struct PackedFloat64Array_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PackedInt32Array #

@[packed]
struct PackedInt32Array {
	data_ [16]u8
}

A packed array of 32-bit integers.

An array specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [-2^31, 2^31 - 1], i.e. [-2147483648, 2147483647]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array]. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedInt32Array) deinit #

fn (s &PackedInt32Array) deinit()

fn (PackedInt32Array) get #

fn (s &PackedInt32Array) get(index i64) i64

Returns the 32-bit integer at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns 0. This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (PackedInt32Array) set #

fn (s &PackedInt32Array) set(index i64, value i64)

Changes the integer at the given index.

fn (PackedInt32Array) size #

fn (s &PackedInt32Array) size() i64

Returns the number of elements in the array.

fn (PackedInt32Array) is_empty #

fn (s &PackedInt32Array) is_empty() bool

Returns true if the array is empty.

fn (PackedInt32Array) push_back #

fn (s &PackedInt32Array) push_back(value i64) bool

Appends a value to the array.

fn (PackedInt32Array) append #

fn (s &PackedInt32Array) append(value i64) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedInt32Array) append_array #

fn (s &PackedInt32Array) append_array(array PackedInt32Array)

Appends a [PackedInt32Array] at the end of this array.

fn (PackedInt32Array) remove_at #

fn (s &PackedInt32Array) remove_at(index i64)

Removes an element from the array by index.

fn (PackedInt32Array) insert #

fn (s &PackedInt32Array) insert(at_index i64, value i64) i64

Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedInt32Array) fill #

fn (s &PackedInt32Array) fill(value i64)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedInt32Array) resize #

fn (s &PackedInt32Array) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedInt32Array) clear #

fn (s &PackedInt32Array) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedInt32Array) has #

fn (s &PackedInt32Array) has(value i64) bool

Returns true if the array contains [param value].

fn (PackedInt32Array) reverse #

fn (s &PackedInt32Array) reverse()

Reverses the order of the elements in the array.

fn (PackedInt32Array) slice #

fn (s &PackedInt32Array) slice(begin i64, cfg PackedInt32Array_slice_Cfg) PackedInt32Array

Returns the slice of the [PackedInt32Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedInt32Array]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedInt32Array) to_byte_array #

fn (s &PackedInt32Array) to_byte_array() PackedByteArray

Returns a copy of the data converted to a [PackedByteArray], where each element has been encoded as 4 bytes. The size of the new array will be int32_array.size() * 4.

fn (PackedInt32Array) sort #

fn (s &PackedInt32Array) sort()

Sorts the elements of the array in ascending order.

fn (PackedInt32Array) bsearch #

fn (s &PackedInt32Array) bsearch(value i64, cfg PackedInt32Array_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.

fn (PackedInt32Array) duplicate #

fn (s &PackedInt32Array) duplicate() PackedInt32Array

Creates a copy of the array, and returns it.

fn (PackedInt32Array) find #

fn (s &PackedInt32Array) find(value i64, cfg PackedInt32Array_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed.

fn (PackedInt32Array) rfind #

fn (s &PackedInt32Array) rfind(value i64, cfg PackedInt32Array_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.

fn (PackedInt32Array) count #

fn (s &PackedInt32Array) count(value i64) i64

Returns the number of times an element is in the array.

fn (PackedInt32Array) erase #

fn (s &PackedInt32Array) erase(value i64) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead.

fn (PackedInt32Array) to_variant #

fn (s &PackedInt32Array) to_variant() Variant

fn (PackedInt32Array) from_variant #

fn (mut s PackedInt32Array) from_variant(variant &Variant)

fn (PackedInt32Array) index #

fn (v &PackedInt32Array) index(i i64) i64

fn (PackedInt32Array) in_dictionary #

fn (a PackedInt32Array) in_dictionary(b Dictionary) bool

fn (PackedInt32Array) in_array #

fn (a PackedInt32Array) in_array(b Array) bool

fn (PackedInt32Array) == #

fn (a PackedInt32Array) == (b PackedInt32Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices.

fn (PackedInt32Array) eq_packedint32array #

fn (a PackedInt32Array) eq_packedint32array(b PackedInt32Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices.

fn (PackedInt32Array) ne_packedint32array #

fn (a PackedInt32Array) ne_packedint32array(b PackedInt32Array) bool

Returns true if contents of the arrays differ.

fn (PackedInt32Array) + #

fn (a PackedInt32Array) + (b PackedInt32Array) PackedInt32Array

Returns a new [PackedInt32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedInt32Array) add_packedint32array #

fn (a PackedInt32Array) add_packedint32array(b PackedInt32Array) PackedInt32Array

Returns a new [PackedInt32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedInt32Array_bsearch_Cfg #

@[params]
struct PackedInt32Array_bsearch_Cfg {
pub:
	before bool
}

struct PackedInt32Array_find_Cfg #

@[params]
struct PackedInt32Array_find_Cfg {
pub:
	from i64
}

struct PackedInt32Array_rfind_Cfg #

@[params]
struct PackedInt32Array_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedInt32Array_slice_Cfg #

@[params]
struct PackedInt32Array_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PackedInt64Array #

@[packed]
struct PackedInt64Array {
	data_ [16]u8
}

A packed array of 64-bit integers.

An array specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes. [b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [-2^63, 2^63 - 1], i.e. [-9223372036854775808, 9223372036854775807]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative. [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedInt64Array] versus Array[int]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedInt64Array) deinit #

fn (s &PackedInt64Array) deinit()

fn (PackedInt64Array) get #

fn (s &PackedInt64Array) get(index i64) i64

Returns the 64-bit integer at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns 0. This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (PackedInt64Array) set #

fn (s &PackedInt64Array) set(index i64, value i64)

Changes the integer at the given index.

fn (PackedInt64Array) size #

fn (s &PackedInt64Array) size() i64

Returns the number of elements in the array.

fn (PackedInt64Array) is_empty #

fn (s &PackedInt64Array) is_empty() bool

Returns true if the array is empty.

fn (PackedInt64Array) push_back #

fn (s &PackedInt64Array) push_back(value i64) bool

Appends a value to the array.

fn (PackedInt64Array) append #

fn (s &PackedInt64Array) append(value i64) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedInt64Array) append_array #

fn (s &PackedInt64Array) append_array(array PackedInt64Array)

Appends a [PackedInt64Array] at the end of this array.

fn (PackedInt64Array) remove_at #

fn (s &PackedInt64Array) remove_at(index i64)

Removes an element from the array by index.

fn (PackedInt64Array) insert #

fn (s &PackedInt64Array) insert(at_index i64, value i64) i64

Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedInt64Array) fill #

fn (s &PackedInt64Array) fill(value i64)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedInt64Array) resize #

fn (s &PackedInt64Array) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedInt64Array) clear #

fn (s &PackedInt64Array) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedInt64Array) has #

fn (s &PackedInt64Array) has(value i64) bool

Returns true if the array contains [param value].

fn (PackedInt64Array) reverse #

fn (s &PackedInt64Array) reverse()

Reverses the order of the elements in the array.

fn (PackedInt64Array) slice #

fn (s &PackedInt64Array) slice(begin i64, cfg PackedInt64Array_slice_Cfg) PackedInt64Array

Returns the slice of the [PackedInt64Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedInt64Array]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedInt64Array) to_byte_array #

fn (s &PackedInt64Array) to_byte_array() PackedByteArray

Returns a copy of the data converted to a [PackedByteArray], where each element has been encoded as 8 bytes. The size of the new array will be int64_array.size() * 8.

fn (PackedInt64Array) sort #

fn (s &PackedInt64Array) sort()

Sorts the elements of the array in ascending order.

fn (PackedInt64Array) bsearch #

fn (s &PackedInt64Array) bsearch(value i64, cfg PackedInt64Array_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.

fn (PackedInt64Array) duplicate #

fn (s &PackedInt64Array) duplicate() PackedInt64Array

Creates a copy of the array, and returns it.

fn (PackedInt64Array) find #

fn (s &PackedInt64Array) find(value i64, cfg PackedInt64Array_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed.

fn (PackedInt64Array) rfind #

fn (s &PackedInt64Array) rfind(value i64, cfg PackedInt64Array_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.

fn (PackedInt64Array) count #

fn (s &PackedInt64Array) count(value i64) i64

Returns the number of times an element is in the array.

fn (PackedInt64Array) erase #

fn (s &PackedInt64Array) erase(value i64) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead.

fn (PackedInt64Array) to_variant #

fn (s &PackedInt64Array) to_variant() Variant

fn (PackedInt64Array) from_variant #

fn (mut s PackedInt64Array) from_variant(variant &Variant)

fn (PackedInt64Array) index #

fn (v &PackedInt64Array) index(i i64) i64

fn (PackedInt64Array) in_dictionary #

fn (a PackedInt64Array) in_dictionary(b Dictionary) bool

fn (PackedInt64Array) in_array #

fn (a PackedInt64Array) in_array(b Array) bool

fn (PackedInt64Array) == #

fn (a PackedInt64Array) == (b PackedInt64Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices.

fn (PackedInt64Array) eq_packedint64array #

fn (a PackedInt64Array) eq_packedint64array(b PackedInt64Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices.

fn (PackedInt64Array) ne_packedint64array #

fn (a PackedInt64Array) ne_packedint64array(b PackedInt64Array) bool

Returns true if contents of the arrays differ.

fn (PackedInt64Array) + #

fn (a PackedInt64Array) + (b PackedInt64Array) PackedInt64Array

Returns a new [PackedInt64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedInt64Array) add_packedint64array #

fn (a PackedInt64Array) add_packedint64array(b PackedInt64Array) PackedInt64Array

Returns a new [PackedInt64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedInt64Array_bsearch_Cfg #

@[params]
struct PackedInt64Array_bsearch_Cfg {
pub:
	before bool
}

struct PackedInt64Array_find_Cfg #

@[params]
struct PackedInt64Array_find_Cfg {
pub:
	from i64
}

struct PackedInt64Array_rfind_Cfg #

@[params]
struct PackedInt64Array_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedInt64Array_slice_Cfg #

@[params]
struct PackedInt64Array_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PackedScene #

struct PackedScene {
	Resource
}

An abstraction of a serialized scene.

fn (PackedScene) can_instantiate #

fn (s &PackedScene) can_instantiate() bool

Returns true if the scene file has nodes.

fn (PackedScene) from_variant #

fn (mut s PackedScene) from_variant(variant &Variant)

fn (PackedScene) get_state #

fn (s &PackedScene) get_state() SceneState

Returns the [SceneState] representing the scene file contents.

fn (PackedScene) instantiate #

fn (s &PackedScene) instantiate(cfg PackedScene_instantiate_Cfg) Node

Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_SCENE_INSTANTIATED] notification on the root node.

fn (PackedScene) instantiate_as #

fn (s &PackedScene) instantiate_as[T](cfg PackedScene_instantiate_Cfg) T

fn (PackedScene) pack #

fn (s &PackedScene) pack(path Node) GDError

Packs the [param path] node, and all owned sub-nodes, into this [PackedScene]. Any existing data will be cleared. See [member Node.owner].

fn (PackedScene) to_variant #

fn (s &PackedScene) to_variant() Variant

struct PackedScene_instantiate_Cfg #

@[params]
struct PackedScene_instantiate_Cfg {
pub:
	edit_state PackedSceneGenEditState = unsafe { PackedSceneGenEditState(0) }
}

Optional parameters for PackedScene#instantiate

struct PackedStringArray #

@[packed]
struct PackedStringArray {
	data_ [16]u8
}

A packed array of [String]s.

An array specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes. If you want to join the strings in the array, use [method String.join].

var string_array = PackedStringArray(['hello', 'world'])
var string = ' '.join(string_array)
print(string) ##

[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedStringArray] versus Array[String]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedStringArray) deinit #

fn (s &PackedStringArray) deinit()

fn (PackedStringArray) get #

fn (s &PackedStringArray) get(index i64) String

Returns the [String] at the given [param index] in the array. Returns an empty string and prints an error if the access is out of bounds. Negative indices are not supported; they will always consider the value to be out of bounds and return an empty string. This is similar to using the [] operator (array[index]), except that operator supports negative indices and causes a debugger break if out-of-bounds access is performed.

fn (PackedStringArray) set #

fn (s &PackedStringArray) set(index i64, value string)

Changes the [String] at the given index.

fn (PackedStringArray) size #

fn (s &PackedStringArray) size() i64

Returns the number of elements in the array.

fn (PackedStringArray) is_empty #

fn (s &PackedStringArray) is_empty() bool

Returns true if the array is empty.

fn (PackedStringArray) push_back #

fn (s &PackedStringArray) push_back(value string) bool

Appends a string element at end of the array.

fn (PackedStringArray) append #

fn (s &PackedStringArray) append(value string) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedStringArray) append_array #

fn (s &PackedStringArray) append_array(array PackedStringArray)

Appends a [PackedStringArray] at the end of this array.

fn (PackedStringArray) remove_at #

fn (s &PackedStringArray) remove_at(index i64)

Removes an element from the array by index.

fn (PackedStringArray) insert #

fn (s &PackedStringArray) insert(at_index i64, value string) i64

Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedStringArray) fill #

fn (s &PackedStringArray) fill(value string)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedStringArray) resize #

fn (s &PackedStringArray) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedStringArray) clear #

fn (s &PackedStringArray) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedStringArray) has #

fn (s &PackedStringArray) has(value string) bool

Returns true if the array contains [param value].

fn (PackedStringArray) reverse #

fn (s &PackedStringArray) reverse()

Reverses the order of the elements in the array.

fn (PackedStringArray) slice #

fn (s &PackedStringArray) slice(begin i64, cfg PackedStringArray_slice_Cfg) PackedStringArray

Returns the slice of the [PackedStringArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedStringArray]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedStringArray) to_byte_array #

fn (s &PackedStringArray) to_byte_array() PackedByteArray

Returns a [PackedByteArray] with each string encoded as UTF-8. Strings are null terminated.

fn (PackedStringArray) sort #

fn (s &PackedStringArray) sort()

Sorts the elements of the array in ascending order.

fn (PackedStringArray) bsearch #

fn (s &PackedStringArray) bsearch(value string, cfg PackedStringArray_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.

fn (PackedStringArray) duplicate #

fn (s &PackedStringArray) duplicate() PackedStringArray

Creates a copy of the array, and returns it.

fn (PackedStringArray) find #

fn (s &PackedStringArray) find(value string, cfg PackedStringArray_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed.

fn (PackedStringArray) rfind #

fn (s &PackedStringArray) rfind(value string, cfg PackedStringArray_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.

fn (PackedStringArray) count #

fn (s &PackedStringArray) count(value string) i64

Returns the number of times an element is in the array.

fn (PackedStringArray) erase #

fn (s &PackedStringArray) erase(value string) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead.

fn (PackedStringArray) to_variant #

fn (s &PackedStringArray) to_variant() Variant

fn (PackedStringArray) from_variant #

fn (mut s PackedStringArray) from_variant(variant &Variant)

fn (PackedStringArray) index #

fn (v &PackedStringArray) index(i i64) String

fn (PackedStringArray) in_dictionary #

fn (a PackedStringArray) in_dictionary(b Dictionary) bool

fn (PackedStringArray) in_array #

fn (a PackedStringArray) in_array(b Array) bool

fn (PackedStringArray) == #

fn (a PackedStringArray) == (b PackedStringArray) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [String]s at the corresponding indices.

fn (PackedStringArray) eq_packedstringarray #

fn (a PackedStringArray) eq_packedstringarray(b PackedStringArray) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [String]s at the corresponding indices.

fn (PackedStringArray) ne_packedstringarray #

fn (a PackedStringArray) ne_packedstringarray(b PackedStringArray) bool

Returns true if contents of the arrays differ.

fn (PackedStringArray) + #

fn (a PackedStringArray) + (b PackedStringArray) PackedStringArray

Returns a new [PackedStringArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedStringArray) add_packedstringarray #

fn (a PackedStringArray) add_packedstringarray(b PackedStringArray) PackedStringArray

Returns a new [PackedStringArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedStringArray_bsearch_Cfg #

@[params]
struct PackedStringArray_bsearch_Cfg {
pub:
	before bool
}

struct PackedStringArray_find_Cfg #

@[params]
struct PackedStringArray_find_Cfg {
pub:
	from i64
}

struct PackedStringArray_rfind_Cfg #

@[params]
struct PackedStringArray_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedStringArray_slice_Cfg #

@[params]
struct PackedStringArray_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PackedVector2Array #

@[packed]
struct PackedVector2Array {
	data_ [16]u8
}

A packed array of [Vector2]s.

An array specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes. [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector2Array] versus Array[Vector2]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedVector2Array) deinit #

fn (s &PackedVector2Array) deinit()

fn (PackedVector2Array) get #

fn (s &PackedVector2Array) get(index i64) Vector2

Returns the [Vector2] at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns Vector2(0, 0). This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (PackedVector2Array) set #

fn (s &PackedVector2Array) set(index i64, value Vector2)

Changes the [Vector2] at the given index.

fn (PackedVector2Array) size #

fn (s &PackedVector2Array) size() i64

Returns the number of elements in the array.

fn (PackedVector2Array) is_empty #

fn (s &PackedVector2Array) is_empty() bool

Returns true if the array is empty.

fn (PackedVector2Array) push_back #

fn (s &PackedVector2Array) push_back(value Vector2) bool

Inserts a [Vector2] at the end.

fn (PackedVector2Array) append #

fn (s &PackedVector2Array) append(value Vector2) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedVector2Array) append_array #

fn (s &PackedVector2Array) append_array(array PackedVector2Array)

Appends a [PackedVector2Array] at the end of this array.

fn (PackedVector2Array) remove_at #

fn (s &PackedVector2Array) remove_at(index i64)

Removes an element from the array by index.

fn (PackedVector2Array) insert #

fn (s &PackedVector2Array) insert(at_index i64, value Vector2) i64

Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedVector2Array) fill #

fn (s &PackedVector2Array) fill(value Vector2)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedVector2Array) resize #

fn (s &PackedVector2Array) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedVector2Array) clear #

fn (s &PackedVector2Array) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedVector2Array) has #

fn (s &PackedVector2Array) has(value Vector2) bool

Returns true if the array contains [param value]. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector2Array) reverse #

fn (s &PackedVector2Array) reverse()

Reverses the order of the elements in the array.

fn (PackedVector2Array) slice #

fn (s &PackedVector2Array) slice(begin i64, cfg PackedVector2Array_slice_Cfg) PackedVector2Array

Returns the slice of the [PackedVector2Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector2Array]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedVector2Array) to_byte_array #

fn (s &PackedVector2Array) to_byte_array() PackedByteArray

Returns a [PackedByteArray] with each vector encoded as bytes.

fn (PackedVector2Array) sort #

fn (s &PackedVector2Array) sort()

Sorts the elements of the array in ascending order. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector2Array) bsearch #

fn (s &PackedVector2Array) bsearch(value Vector2, cfg PackedVector2Array_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector2Array) duplicate #

fn (s &PackedVector2Array) duplicate() PackedVector2Array

Creates a copy of the array, and returns it.

fn (PackedVector2Array) find #

fn (s &PackedVector2Array) find(value Vector2, cfg PackedVector2Array_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector2Array) rfind #

fn (s &PackedVector2Array) rfind(value Vector2, cfg PackedVector2Array_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector2Array) count #

fn (s &PackedVector2Array) count(value Vector2) i64

Returns the number of times an element is in the array. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector2Array) erase #

fn (s &PackedVector2Array) erase(value Vector2) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector2Array) to_variant #

fn (s &PackedVector2Array) to_variant() Variant

fn (PackedVector2Array) from_variant #

fn (mut s PackedVector2Array) from_variant(variant &Variant)

fn (PackedVector2Array) index #

fn (v &PackedVector2Array) index(i i64) Vector2

fn (PackedVector2Array) mul_transform2d #

fn (a PackedVector2Array) mul_transform2d(b Transform2D) PackedVector2Array

Returns a new [PackedVector2Array] with all vectors in this array inversely transformed (multiplied) by the given [Transform2D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). array * transform is equivalent to transform.inverse() * array. See [method Transform2D.inverse]. For transforming by inverse of an affine transformation (e.g. with scaling) transform.affine_inverse() * array can be used instead. See [method Transform2D.affine_inverse].

fn (PackedVector2Array) in_dictionary #

fn (a PackedVector2Array) in_dictionary(b Dictionary) bool

fn (PackedVector2Array) in_array #

fn (a PackedVector2Array) in_array(b Array) bool

fn (PackedVector2Array) == #

fn (a PackedVector2Array) == (b PackedVector2Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [Vector2]s at the corresponding indices.

fn (PackedVector2Array) eq_packedvector2array #

fn (a PackedVector2Array) eq_packedvector2array(b PackedVector2Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [Vector2]s at the corresponding indices.

fn (PackedVector2Array) ne_packedvector2array #

fn (a PackedVector2Array) ne_packedvector2array(b PackedVector2Array) bool

Returns true if contents of the arrays differ.

fn (PackedVector2Array) + #

fn (a PackedVector2Array) + (b PackedVector2Array) PackedVector2Array

Returns a new [PackedVector2Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedVector2Array) add_packedvector2array #

fn (a PackedVector2Array) add_packedvector2array(b PackedVector2Array) PackedVector2Array

Returns a new [PackedVector2Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedVector2Array_bsearch_Cfg #

@[params]
struct PackedVector2Array_bsearch_Cfg {
pub:
	before bool
}

struct PackedVector2Array_find_Cfg #

@[params]
struct PackedVector2Array_find_Cfg {
pub:
	from i64
}

struct PackedVector2Array_rfind_Cfg #

@[params]
struct PackedVector2Array_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedVector2Array_slice_Cfg #

@[params]
struct PackedVector2Array_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PackedVector3Array #

@[packed]
struct PackedVector3Array {
	data_ [16]u8
}

A packed array of [Vector3]s.

An array specifically designed to hold [Vector3]. Packs data tightly, so it saves memory for large array sizes. [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector3Array] versus Array[Vector3]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedVector3Array) deinit #

fn (s &PackedVector3Array) deinit()

fn (PackedVector3Array) get #

fn (s &PackedVector3Array) get(index i64) Vector3

Returns the [Vector3] at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns Vector3(0, 0, 0). This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (PackedVector3Array) set #

fn (s &PackedVector3Array) set(index i64, value Vector3)

Changes the [Vector3] at the given index.

fn (PackedVector3Array) size #

fn (s &PackedVector3Array) size() i64

Returns the number of elements in the array.

fn (PackedVector3Array) is_empty #

fn (s &PackedVector3Array) is_empty() bool

Returns true if the array is empty.

fn (PackedVector3Array) push_back #

fn (s &PackedVector3Array) push_back(value Vector3) bool

Inserts a [Vector3] at the end.

fn (PackedVector3Array) append #

fn (s &PackedVector3Array) append(value Vector3) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedVector3Array) append_array #

fn (s &PackedVector3Array) append_array(array PackedVector3Array)

Appends a [PackedVector3Array] at the end of this array.

fn (PackedVector3Array) remove_at #

fn (s &PackedVector3Array) remove_at(index i64)

Removes an element from the array by index.

fn (PackedVector3Array) insert #

fn (s &PackedVector3Array) insert(at_index i64, value Vector3) i64

Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedVector3Array) fill #

fn (s &PackedVector3Array) fill(value Vector3)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedVector3Array) resize #

fn (s &PackedVector3Array) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedVector3Array) clear #

fn (s &PackedVector3Array) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedVector3Array) has #

fn (s &PackedVector3Array) has(value Vector3) bool

Returns true if the array contains [param value]. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector3Array) reverse #

fn (s &PackedVector3Array) reverse()

Reverses the order of the elements in the array.

fn (PackedVector3Array) slice #

fn (s &PackedVector3Array) slice(begin i64, cfg PackedVector3Array_slice_Cfg) PackedVector3Array

Returns the slice of the [PackedVector3Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector3Array]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedVector3Array) to_byte_array #

fn (s &PackedVector3Array) to_byte_array() PackedByteArray

Returns a [PackedByteArray] with each vector encoded as bytes.

fn (PackedVector3Array) sort #

fn (s &PackedVector3Array) sort()

Sorts the elements of the array in ascending order. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector3Array) bsearch #

fn (s &PackedVector3Array) bsearch(value Vector3, cfg PackedVector3Array_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector3Array) duplicate #

fn (s &PackedVector3Array) duplicate() PackedVector3Array

Creates a copy of the array, and returns it.

fn (PackedVector3Array) find #

fn (s &PackedVector3Array) find(value Vector3, cfg PackedVector3Array_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector3Array) rfind #

fn (s &PackedVector3Array) rfind(value Vector3, cfg PackedVector3Array_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector3Array) count #

fn (s &PackedVector3Array) count(value Vector3) i64

Returns the number of times an element is in the array. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector3Array) erase #

fn (s &PackedVector3Array) erase(value Vector3) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector3Array) to_variant #

fn (s &PackedVector3Array) to_variant() Variant

fn (PackedVector3Array) from_variant #

fn (mut s PackedVector3Array) from_variant(variant &Variant)

fn (PackedVector3Array) index #

fn (v &PackedVector3Array) index(i i64) Vector3

fn (PackedVector3Array) mul_transform3d #

fn (a PackedVector3Array) mul_transform3d(b Transform3D) PackedVector3Array

Returns a new [PackedVector3Array] with all vectors in this array inversely transformed (multiplied) by the given [Transform3D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). array * transform is equivalent to transform.inverse() * array. See [method Transform3D.inverse]. For transforming by inverse of an affine transformation (e.g. with scaling) transform.affine_inverse() * array can be used instead. See [method Transform3D.affine_inverse].

fn (PackedVector3Array) in_dictionary #

fn (a PackedVector3Array) in_dictionary(b Dictionary) bool

fn (PackedVector3Array) in_array #

fn (a PackedVector3Array) in_array(b Array) bool

fn (PackedVector3Array) == #

fn (a PackedVector3Array) == (b PackedVector3Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [Vector3]s at the corresponding indices.

fn (PackedVector3Array) eq_packedvector3array #

fn (a PackedVector3Array) eq_packedvector3array(b PackedVector3Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [Vector3]s at the corresponding indices.

fn (PackedVector3Array) ne_packedvector3array #

fn (a PackedVector3Array) ne_packedvector3array(b PackedVector3Array) bool

Returns true if contents of the arrays differ.

fn (PackedVector3Array) + #

fn (a PackedVector3Array) + (b PackedVector3Array) PackedVector3Array

Returns a new [PackedVector3Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedVector3Array) add_packedvector3array #

fn (a PackedVector3Array) add_packedvector3array(b PackedVector3Array) PackedVector3Array

Returns a new [PackedVector3Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedVector3Array_bsearch_Cfg #

@[params]
struct PackedVector3Array_bsearch_Cfg {
pub:
	before bool
}

struct PackedVector3Array_find_Cfg #

@[params]
struct PackedVector3Array_find_Cfg {
pub:
	from i64
}

struct PackedVector3Array_rfind_Cfg #

@[params]
struct PackedVector3Array_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedVector3Array_slice_Cfg #

@[params]
struct PackedVector3Array_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PackedVector4Array #

@[packed]
struct PackedVector4Array {
	data_ [16]u8
}

A packed array of [Vector4]s.

An array specifically designed to hold [Vector4]. Packs data tightly, so it saves memory for large array sizes. [b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector4Array] versus Array[Vector4]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays. [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will [i]not[/i] affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.

fn (PackedVector4Array) deinit #

fn (s &PackedVector4Array) deinit()

fn (PackedVector4Array) get #

fn (s &PackedVector4Array) get(index i64) Vector4

Returns the [Vector4] at the given [param index] in the array. If [param index] out-of-bounds or negative, this method fails and returns Vector4(0, 0, 0, 0). This method is similar (but not identical) to the [] operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.

fn (PackedVector4Array) set #

fn (s &PackedVector4Array) set(index i64, value Vector4)

Changes the [Vector4] at the given index.

fn (PackedVector4Array) size #

fn (s &PackedVector4Array) size() i64

Returns the number of elements in the array.

fn (PackedVector4Array) is_empty #

fn (s &PackedVector4Array) is_empty() bool

Returns true if the array is empty.

fn (PackedVector4Array) push_back #

fn (s &PackedVector4Array) push_back(value Vector4) bool

Inserts a [Vector4] at the end.

fn (PackedVector4Array) append #

fn (s &PackedVector4Array) append(value Vector4) bool

Appends an element at the end of the array (alias of [method push_back]).

fn (PackedVector4Array) append_array #

fn (s &PackedVector4Array) append_array(array PackedVector4Array)

Appends a [PackedVector4Array] at the end of this array.

fn (PackedVector4Array) remove_at #

fn (s &PackedVector4Array) remove_at(index i64)

Removes an element from the array by index.

fn (PackedVector4Array) insert #

fn (s &PackedVector4Array) insert(at_index i64, value Vector4) i64

Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (idx == size()).

fn (PackedVector4Array) fill #

fn (s &PackedVector4Array) fill(value Vector4)

Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.

fn (PackedVector4Array) resize #

fn (s &PackedVector4Array) resize(new_size i64) i64

Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling [method resize] once and assigning the new values is faster than adding new elements one by one. Returns [constant OK] on success, or one of the following [enum Error] constants if this method fails: [constant ERR_INVALID_PARAMETER] if the size is negative, or [constant ERR_OUT_OF_MEMORY] if allocations fail. Use [method size] to find the actual size of the array after resize.

fn (PackedVector4Array) clear #

fn (s &PackedVector4Array) clear()

Clears the array. This is equivalent to using [method resize] with a size of 0.

fn (PackedVector4Array) has #

fn (s &PackedVector4Array) has(value Vector4) bool

Returns true if the array contains [param value]. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector4Array) reverse #

fn (s &PackedVector4Array) reverse()

Reverses the order of the elements in the array.

fn (PackedVector4Array) slice #

fn (s &PackedVector4Array) slice(begin i64, cfg PackedVector4Array_slice_Cfg) PackedVector4Array

Returns the slice of the [PackedVector4Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector4Array]. The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. arr.slice(1) is a shorthand for arr.slice(1, arr.size())). If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. arr.slice(0, -2) is a shorthand for arr.slice(0, arr.size() - 2)).

fn (PackedVector4Array) to_byte_array #

fn (s &PackedVector4Array) to_byte_array() PackedByteArray

Returns a [PackedByteArray] with each vector encoded as bytes.

fn (PackedVector4Array) sort #

fn (s &PackedVector4Array) sort()

Sorts the elements of the array in ascending order. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector4Array) bsearch #

fn (s &PackedVector4Array) bsearch(value Vector4, cfg PackedVector4Array_bsearch_Cfg) i64

Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector4Array) duplicate #

fn (s &PackedVector4Array) duplicate() PackedVector4Array

Creates a copy of the array, and returns it.

fn (PackedVector4Array) find #

fn (s &PackedVector4Array) find(value Vector4, cfg PackedVector4Array_find_Cfg) i64

Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector4Array) rfind #

fn (s &PackedVector4Array) rfind(value Vector4, cfg PackedVector4Array_rfind_Cfg) i64

Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector4Array) count #

fn (s &PackedVector4Array) count(value Vector4) i64

Returns the number of times an element is in the array. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector4Array) erase #

fn (s &PackedVector4Array) erase(value Vector4) bool

Removes the first occurrence of a value from the array and returns true. If the value does not exist in the array, nothing happens and false is returned. To remove an element by index, use [method remove_at] instead. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included.

fn (PackedVector4Array) to_variant #

fn (s &PackedVector4Array) to_variant() Variant

fn (PackedVector4Array) from_variant #

fn (mut s PackedVector4Array) from_variant(variant &Variant)

fn (PackedVector4Array) index #

fn (v &PackedVector4Array) index(i i64) Vector4

fn (PackedVector4Array) in_dictionary #

fn (a PackedVector4Array) in_dictionary(b Dictionary) bool

fn (PackedVector4Array) in_array #

fn (a PackedVector4Array) in_array(b Array) bool

fn (PackedVector4Array) == #

fn (a PackedVector4Array) == (b PackedVector4Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [Vector4]s at the corresponding indices.

fn (PackedVector4Array) eq_packedvector4array #

fn (a PackedVector4Array) eq_packedvector4array(b PackedVector4Array) bool

Returns true if contents of both arrays are the same, i.e. they have all equal [Vector4]s at the corresponding indices.

fn (PackedVector4Array) ne_packedvector4array #

fn (a PackedVector4Array) ne_packedvector4array(b PackedVector4Array) bool

Returns true if contents of the arrays differ.

fn (PackedVector4Array) + #

fn (a PackedVector4Array) + (b PackedVector4Array) PackedVector4Array

Returns a new [PackedVector4Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

fn (PackedVector4Array) add_packedvector4array #

fn (a PackedVector4Array) add_packedvector4array(b PackedVector4Array) PackedVector4Array

Returns a new [PackedVector4Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.

struct PackedVector4Array_bsearch_Cfg #

@[params]
struct PackedVector4Array_bsearch_Cfg {
pub:
	before bool
}

struct PackedVector4Array_find_Cfg #

@[params]
struct PackedVector4Array_find_Cfg {
pub:
	from i64
}

struct PackedVector4Array_rfind_Cfg #

@[params]
struct PackedVector4Array_rfind_Cfg {
pub:
	from i64 = -1
}

struct PackedVector4Array_slice_Cfg #

@[params]
struct PackedVector4Array_slice_Cfg {
pub:
	end i64 = 2147483647
}

struct PacketPeer #

struct PacketPeer {
	RefCounted
}

Abstraction and base class for packet-based protocols.

fn (PacketPeer) to_variant #

fn (s &PacketPeer) to_variant() Variant

fn (PacketPeer) from_variant #

fn (mut s PacketPeer) from_variant(variant &Variant)

fn (PacketPeer) get_var #

fn (s &PacketPeer) get_var(cfg PacketPeer_get_var_Cfg) Variant

Gets a Variant. If [param allow_objects] is true, decoding objects is allowed. Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.

fn (PacketPeer) put_var #

fn (s &PacketPeer) put_var(var_ ToVariant, cfg PacketPeer_put_var_Cfg) GDError

Sends a [Variant] as a packet. If [param full_objects] is true, encoding objects is allowed (and can potentially include code). Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.

fn (PacketPeer) get_packet #

fn (s &PacketPeer) get_packet() PackedByteArray

Gets a raw packet.

fn (PacketPeer) put_packet #

fn (s &PacketPeer) put_packet(buffer PackedByteArray) GDError

Sends a raw packet.

fn (PacketPeer) get_packet_error #

fn (s &PacketPeer) get_packet_error() GDError

Returns the error state of the last packet received (via [method get_packet] and [method get_var]).

fn (PacketPeer) get_available_packet_count #

fn (s &PacketPeer) get_available_packet_count() i64

Returns the number of packets currently available in the ring-buffer.

fn (PacketPeer) get_encode_buffer_max_size #

fn (s &PacketPeer) get_encode_buffer_max_size() i64

fn (PacketPeer) set_encode_buffer_max_size #

fn (s &PacketPeer) set_encode_buffer_max_size(max_size i64)

struct PacketPeerDTLS #

struct PacketPeerDTLS {
	PacketPeer
}

DTLS packet peer.

fn (PacketPeerDTLS) to_variant #

fn (s &PacketPeerDTLS) to_variant() Variant

fn (PacketPeerDTLS) from_variant #

fn (mut s PacketPeerDTLS) from_variant(variant &Variant)

fn (PacketPeerDTLS) poll #

fn (s &PacketPeerDTLS) poll()

Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working.

fn (PacketPeerDTLS) connect_to_peer #

fn (s &PacketPeerDTLS) connect_to_peer(packet_peer PacketPeerUDP, hostname string, cfg PacketPeerDTLS_connect_to_peer_Cfg) GDError

Connects a [param packet_peer] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). You can optionally specify the [param client_options] to be used while verifying the TLS connections. See [method TLSOptions.client] and [method TLSOptions.client_unsafe].

fn (PacketPeerDTLS) get_status #

fn (s &PacketPeerDTLS) get_status() PacketPeerDTLSStatus

Returns the status of the connection.

fn (PacketPeerDTLS) disconnect_from_peer #

fn (s &PacketPeerDTLS) disconnect_from_peer()

Disconnects this peer, terminating the DTLS session.

struct PacketPeerDTLS_connect_to_peer_Cfg #

@[params]
struct PacketPeerDTLS_connect_to_peer_Cfg {
pub:
	client_options TLSOptions
}

Optional parameters for PacketPeerDTLS#connect_to_peer

struct PacketPeerExtension #

struct PacketPeerExtension {
	PacketPeer
}

fn (PacketPeerExtension) to_variant #

fn (s &PacketPeerExtension) to_variant() Variant

fn (PacketPeerExtension) from_variant #

fn (mut s PacketPeerExtension) from_variant(variant &Variant)

fn (PacketPeerExtension) gd_get_packet #

fn (s &PacketPeerExtension) gd_get_packet(r_buffer &&u8, r_buffer_size &i32) GDError

fn (PacketPeerExtension) gd_put_packet #

fn (s &PacketPeerExtension) gd_put_packet(p_buffer &u8, p_buffer_size i64) GDError

fn (PacketPeerExtension) gd_get_available_packet_count #

fn (s &PacketPeerExtension) gd_get_available_packet_count() i64

fn (PacketPeerExtension) gd_get_max_packet_size #

fn (s &PacketPeerExtension) gd_get_max_packet_size() i64

struct PacketPeerStream #

struct PacketPeerStream {
	PacketPeer
}

Wrapper to use a PacketPeer over a StreamPeer.

fn (PacketPeerStream) to_variant #

fn (s &PacketPeerStream) to_variant() Variant

fn (PacketPeerStream) from_variant #

fn (mut s PacketPeerStream) from_variant(variant &Variant)

fn (PacketPeerStream) set_stream_peer #

fn (s &PacketPeerStream) set_stream_peer(peer StreamPeer)

fn (PacketPeerStream) get_stream_peer #

fn (s &PacketPeerStream) get_stream_peer() StreamPeer

fn (PacketPeerStream) set_input_buffer_max_size #

fn (s &PacketPeerStream) set_input_buffer_max_size(max_size_bytes i64)

fn (PacketPeerStream) set_output_buffer_max_size #

fn (s &PacketPeerStream) set_output_buffer_max_size(max_size_bytes i64)

fn (PacketPeerStream) get_input_buffer_max_size #

fn (s &PacketPeerStream) get_input_buffer_max_size() i64

fn (PacketPeerStream) get_output_buffer_max_size #

fn (s &PacketPeerStream) get_output_buffer_max_size() i64

struct PacketPeerUDP #

struct PacketPeerUDP {
	PacketPeer
}

UDP packet peer.

fn (PacketPeerUDP) to_variant #

fn (s &PacketPeerUDP) to_variant() Variant

fn (PacketPeerUDP) from_variant #

fn (mut s PacketPeerUDP) from_variant(variant &Variant)

fn (PacketPeerUDP) bind #

fn (s &PacketPeerUDP) bind(port i64, cfg PacketPeerUDP_bind_Cfg) GDError

Binds this [PacketPeerUDP] to the specified [param port] and [param bind_address] with a buffer size [param recv_buf_size], allowing it to receive incoming packets. If [param bind_address] is set to "*" (default), the peer will be bound on all available addresses (both IPv4 and IPv6). If [param bind_address] is set to "0.0.0.0" (for IPv4) or "::" (for IPv6), the peer will be bound to all available addresses matching that IP type. If [param bind_address] is set to any valid address (e.g. "192.168.1.101", "::1", etc.), the peer will only be bound to the interface with that address (or fail if no interface with the given address exists).

fn (PacketPeerUDP) close #

fn (s &PacketPeerUDP) close()

Closes the [PacketPeerUDP]'s underlying UDP socket.

fn (PacketPeerUDP) wait #

fn (s &PacketPeerUDP) wait() GDError

Waits for a packet to arrive on the bound address. See [method bind]. [b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: [codeblocks] [gdscript] socket = PacketPeerUDP.new()# Serversocket.set_dest_address("127.0.0.1", 789) socket.put_packet("Time to stop".to_ascii_buffer())

Client

while socket.wait() == OK: var data = socket.get_packet().get_string_from_ascii() if data == "Time to stop": return [/gdscript] [csharp] var socket = new PacketPeerUdp(); // Server socket.SetDestAddress("127.0.0.1", 789); socket.PutPacket("Time to stop".ToAsciiBuffer());

// Client while (socket.Wait() == OK) { string data = socket.GetPacket().GetStringFromASCII(); if (data == "Time to stop") { return; } } [/csharp] [/codeblocks]

fn (PacketPeerUDP) is_bound #

fn (s &PacketPeerUDP) is_bound() bool

Returns whether this [PacketPeerUDP] is bound to an address and can receive packets.

fn (PacketPeerUDP) connect_to_host #

fn (s &PacketPeerUDP) connect_to_host(host string, port i64) GDError

Calling this method connects this UDP peer to the given [param host]/[param port] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer]. [b]Note:[/b] Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like TLS or DTLS if you feel like your application is transferring sensitive information.

fn (PacketPeerUDP) is_socket_connected #

fn (s &PacketPeerUDP) is_socket_connected() bool

Returns true if the UDP socket is open and has been connected to a remote address. See [method connect_to_host].

fn (PacketPeerUDP) get_packet_ip #

fn (s &PacketPeerUDP) get_packet_ip() string

Returns the IP of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]).

fn (PacketPeerUDP) get_packet_port #

fn (s &PacketPeerUDP) get_packet_port() i64

Returns the port of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]).

fn (PacketPeerUDP) get_local_port #

fn (s &PacketPeerUDP) get_local_port() i64

Returns the local port to which this peer is bound.

fn (PacketPeerUDP) set_dest_address #

fn (s &PacketPeerUDP) set_dest_address(host string, port i64) GDError

Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. [b]Note:[/b] [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. 255.255.255.255).

fn (PacketPeerUDP) set_broadcast_enabled #

fn (s &PacketPeerUDP) set_broadcast_enabled(enabled bool)

Enable or disable sending of broadcast packets (e.g. set_dest_address("255.255.255.255", 4343). This option is disabled by default. [b]Note:[/b] Some Android devices might require the CHANGE_WIFI_MULTICAST_STATE permission and this option to be enabled to receive broadcast packets too.

fn (PacketPeerUDP) join_multicast_group #

fn (s &PacketPeerUDP) join_multicast_group(multicast_address string, interface_name string) GDError

Joins the multicast group specified by [param multicast_address] using the interface identified by [param interface_name]. You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available. [b]Note:[/b] Some Android devices might require the CHANGE_WIFI_MULTICAST_STATE permission for multicast to work.

fn (PacketPeerUDP) leave_multicast_group #

fn (s &PacketPeerUDP) leave_multicast_group(multicast_address string, interface_name string) GDError

Removes the interface identified by [param interface_name] from the multicast group specified by [param multicast_address].

struct PacketPeerUDP_bind_Cfg #

@[params]
struct PacketPeerUDP_bind_Cfg {
pub:
	bind_address  string
	recv_buf_size i64 = 65536
}

Optional parameters for PacketPeerUDP#bind

struct PacketPeer_get_var_Cfg #

@[params]
struct PacketPeer_get_var_Cfg {
pub:
	allow_objects bool
}

Optional parameters for PacketPeer#get_var

struct PacketPeer_put_var_Cfg #

@[params]
struct PacketPeer_put_var_Cfg {
pub:
	full_objects bool
}

Optional parameters for PacketPeer#put_var

struct Panel #

struct Panel {
	Control
}

A GUI control that displays a [StyleBox].

fn (Panel) to_variant #

fn (s &Panel) to_variant() Variant

fn (Panel) from_variant #

fn (mut s Panel) from_variant(variant &Variant)

struct PanelContainer #

struct PanelContainer {
	Container
}

A container that keeps its child controls within the area of a [StyleBox].

fn (PanelContainer) to_variant #

fn (s &PanelContainer) to_variant() Variant

fn (PanelContainer) from_variant #

fn (mut s PanelContainer) from_variant(variant &Variant)

struct PanoramaSkyMaterial #

struct PanoramaSkyMaterial {
	Material
}

A material that provides a special texture to a [Sky], usually an HDR panorama.

fn (PanoramaSkyMaterial) to_variant #

fn (s &PanoramaSkyMaterial) to_variant() Variant

fn (PanoramaSkyMaterial) from_variant #

fn (mut s PanoramaSkyMaterial) from_variant(variant &Variant)

fn (PanoramaSkyMaterial) set_panorama #

fn (s &PanoramaSkyMaterial) set_panorama(texture Texture2D)

fn (PanoramaSkyMaterial) get_panorama #

fn (s &PanoramaSkyMaterial) get_panorama() Texture2D

fn (PanoramaSkyMaterial) set_filtering_enabled #

fn (s &PanoramaSkyMaterial) set_filtering_enabled(enabled bool)

fn (PanoramaSkyMaterial) is_filtering_enabled #

fn (s &PanoramaSkyMaterial) is_filtering_enabled() bool

fn (PanoramaSkyMaterial) set_energy_multiplier #

fn (s &PanoramaSkyMaterial) set_energy_multiplier(multiplier f64)

fn (PanoramaSkyMaterial) get_energy_multiplier #

fn (s &PanoramaSkyMaterial) get_energy_multiplier() f64

struct Parallax2D #

struct Parallax2D {
	Node2D
}

A node used to create a parallax scrolling background.

fn (Parallax2D) to_variant #

fn (s &Parallax2D) to_variant() Variant

fn (Parallax2D) from_variant #

fn (mut s Parallax2D) from_variant(variant &Variant)

fn (Parallax2D) set_scroll_scale #

fn (s &Parallax2D) set_scroll_scale(scale Vector2)

fn (Parallax2D) get_scroll_scale #

fn (s &Parallax2D) get_scroll_scale() Vector2

fn (Parallax2D) set_repeat_size #

fn (s &Parallax2D) set_repeat_size(repeat_size Vector2)

fn (Parallax2D) get_repeat_size #

fn (s &Parallax2D) get_repeat_size() Vector2

fn (Parallax2D) set_repeat_times #

fn (s &Parallax2D) set_repeat_times(repeat_times i64)

fn (Parallax2D) get_repeat_times #

fn (s &Parallax2D) get_repeat_times() i64

fn (Parallax2D) set_autoscroll #

fn (s &Parallax2D) set_autoscroll(autoscroll Vector2)

fn (Parallax2D) get_autoscroll #

fn (s &Parallax2D) get_autoscroll() Vector2

fn (Parallax2D) set_scroll_offset #

fn (s &Parallax2D) set_scroll_offset(offset Vector2)

fn (Parallax2D) get_scroll_offset #

fn (s &Parallax2D) get_scroll_offset() Vector2

fn (Parallax2D) set_screen_offset #

fn (s &Parallax2D) set_screen_offset(offset Vector2)

fn (Parallax2D) get_screen_offset #

fn (s &Parallax2D) get_screen_offset() Vector2

fn (Parallax2D) set_limit_begin #

fn (s &Parallax2D) set_limit_begin(offset Vector2)

fn (Parallax2D) get_limit_begin #

fn (s &Parallax2D) get_limit_begin() Vector2

fn (Parallax2D) set_limit_end #

fn (s &Parallax2D) set_limit_end(offset Vector2)

fn (Parallax2D) get_limit_end #

fn (s &Parallax2D) get_limit_end() Vector2

fn (Parallax2D) set_follow_viewport #

fn (s &Parallax2D) set_follow_viewport(follow bool)

fn (Parallax2D) get_follow_viewport #

fn (s &Parallax2D) get_follow_viewport() bool

fn (Parallax2D) set_ignore_camera_scroll #

fn (s &Parallax2D) set_ignore_camera_scroll(ignore bool)

fn (Parallax2D) is_ignore_camera_scroll #

fn (s &Parallax2D) is_ignore_camera_scroll() bool

struct ParallaxBackground #

struct ParallaxBackground {
	CanvasLayer
}

A node used to create a parallax scrolling background.

fn (ParallaxBackground) to_variant #

fn (s &ParallaxBackground) to_variant() Variant

fn (ParallaxBackground) from_variant #

fn (mut s ParallaxBackground) from_variant(variant &Variant)

fn (ParallaxBackground) set_scroll_offset #

fn (s &ParallaxBackground) set_scroll_offset(offset Vector2)

fn (ParallaxBackground) get_scroll_offset #

fn (s &ParallaxBackground) get_scroll_offset() Vector2

fn (ParallaxBackground) set_scroll_base_offset #

fn (s &ParallaxBackground) set_scroll_base_offset(offset Vector2)

fn (ParallaxBackground) get_scroll_base_offset #

fn (s &ParallaxBackground) get_scroll_base_offset() Vector2

fn (ParallaxBackground) set_scroll_base_scale #

fn (s &ParallaxBackground) set_scroll_base_scale(scale Vector2)

fn (ParallaxBackground) get_scroll_base_scale #

fn (s &ParallaxBackground) get_scroll_base_scale() Vector2

fn (ParallaxBackground) set_limit_begin #

fn (s &ParallaxBackground) set_limit_begin(offset Vector2)

fn (ParallaxBackground) get_limit_begin #

fn (s &ParallaxBackground) get_limit_begin() Vector2

fn (ParallaxBackground) set_limit_end #

fn (s &ParallaxBackground) set_limit_end(offset Vector2)

fn (ParallaxBackground) get_limit_end #

fn (s &ParallaxBackground) get_limit_end() Vector2

fn (ParallaxBackground) set_ignore_camera_zoom #

fn (s &ParallaxBackground) set_ignore_camera_zoom(ignore bool)

fn (ParallaxBackground) is_ignore_camera_zoom #

fn (s &ParallaxBackground) is_ignore_camera_zoom() bool

struct ParallaxLayer #

struct ParallaxLayer {
	Node2D
}

A parallax scrolling layer to be used with [ParallaxBackground].

fn (ParallaxLayer) to_variant #

fn (s &ParallaxLayer) to_variant() Variant

fn (ParallaxLayer) from_variant #

fn (mut s ParallaxLayer) from_variant(variant &Variant)

fn (ParallaxLayer) set_motion_scale #

fn (s &ParallaxLayer) set_motion_scale(scale Vector2)

fn (ParallaxLayer) get_motion_scale #

fn (s &ParallaxLayer) get_motion_scale() Vector2

fn (ParallaxLayer) set_motion_offset #

fn (s &ParallaxLayer) set_motion_offset(offset Vector2)

fn (ParallaxLayer) get_motion_offset #

fn (s &ParallaxLayer) get_motion_offset() Vector2

fn (ParallaxLayer) set_mirroring #

fn (s &ParallaxLayer) set_mirroring(mirror Vector2)

fn (ParallaxLayer) get_mirroring #

fn (s &ParallaxLayer) get_mirroring() Vector2

struct ParticleProcessMaterial #

struct ParticleProcessMaterial {
	Material
}

Holds a particle configuration for [GPUParticles2D] or [GPUParticles3D] nodes.

fn (ParticleProcessMaterial) to_variant #

fn (s &ParticleProcessMaterial) to_variant() Variant

fn (ParticleProcessMaterial) from_variant #

fn (mut s ParticleProcessMaterial) from_variant(variant &Variant)

fn (ParticleProcessMaterial) set_direction #

fn (s &ParticleProcessMaterial) set_direction(degrees Vector3)

fn (ParticleProcessMaterial) get_direction #

fn (s &ParticleProcessMaterial) get_direction() Vector3

fn (ParticleProcessMaterial) set_inherit_velocity_ratio #

fn (s &ParticleProcessMaterial) set_inherit_velocity_ratio(ratio f64)

fn (ParticleProcessMaterial) get_inherit_velocity_ratio #

fn (s &ParticleProcessMaterial) get_inherit_velocity_ratio() f64

fn (ParticleProcessMaterial) set_spread #

fn (s &ParticleProcessMaterial) set_spread(degrees f64)

fn (ParticleProcessMaterial) get_spread #

fn (s &ParticleProcessMaterial) get_spread() f64

fn (ParticleProcessMaterial) set_flatness #

fn (s &ParticleProcessMaterial) set_flatness(amount f64)

fn (ParticleProcessMaterial) get_flatness #

fn (s &ParticleProcessMaterial) get_flatness() f64

fn (ParticleProcessMaterial) set_param #

fn (s &ParticleProcessMaterial) set_param(param ParticleProcessMaterialParameter, value Vector2)

Sets the minimum and maximum values of the given [param param]. The x component of the argument vector corresponds to minimum and the y component corresponds to maximum.

fn (ParticleProcessMaterial) get_param #

fn (s &ParticleProcessMaterial) get_param(param ParticleProcessMaterialParameter) Vector2

Returns the minimum and maximum values of the given [param param] as a vector. The x component of the returned vector corresponds to minimum and the y component corresponds to maximum.

fn (ParticleProcessMaterial) set_param_min #

fn (s &ParticleProcessMaterial) set_param_min(param ParticleProcessMaterialParameter, value f64)

Sets the minimum value range for the given parameter.

fn (ParticleProcessMaterial) get_param_min #

fn (s &ParticleProcessMaterial) get_param_min(param ParticleProcessMaterialParameter) f64

Returns the minimum value range for the given parameter.

fn (ParticleProcessMaterial) set_param_max #

fn (s &ParticleProcessMaterial) set_param_max(param ParticleProcessMaterialParameter, value f64)

Sets the maximum value range for the given parameter.

fn (ParticleProcessMaterial) get_param_max #

fn (s &ParticleProcessMaterial) get_param_max(param ParticleProcessMaterialParameter) f64

Returns the maximum value range for the given parameter.

fn (ParticleProcessMaterial) set_param_texture #

fn (s &ParticleProcessMaterial) set_param_texture(param ParticleProcessMaterialParameter, texture Texture2D)

Sets the [Texture2D] for the specified [enum Parameter].

fn (ParticleProcessMaterial) get_param_texture #

fn (s &ParticleProcessMaterial) get_param_texture(param ParticleProcessMaterialParameter) Texture2D

Returns the [Texture2D] used by the specified parameter.

fn (ParticleProcessMaterial) set_color #

fn (s &ParticleProcessMaterial) set_color(color Color)

fn (ParticleProcessMaterial) get_color #

fn (s &ParticleProcessMaterial) get_color() Color

fn (ParticleProcessMaterial) set_color_ramp #

fn (s &ParticleProcessMaterial) set_color_ramp(ramp Texture2D)

fn (ParticleProcessMaterial) get_color_ramp #

fn (s &ParticleProcessMaterial) get_color_ramp() Texture2D

fn (ParticleProcessMaterial) set_alpha_curve #

fn (s &ParticleProcessMaterial) set_alpha_curve(curve Texture2D)

fn (ParticleProcessMaterial) get_alpha_curve #

fn (s &ParticleProcessMaterial) get_alpha_curve() Texture2D

fn (ParticleProcessMaterial) set_emission_curve #

fn (s &ParticleProcessMaterial) set_emission_curve(curve Texture2D)

fn (ParticleProcessMaterial) get_emission_curve #

fn (s &ParticleProcessMaterial) get_emission_curve() Texture2D

fn (ParticleProcessMaterial) set_color_initial_ramp #

fn (s &ParticleProcessMaterial) set_color_initial_ramp(ramp Texture2D)

fn (ParticleProcessMaterial) get_color_initial_ramp #

fn (s &ParticleProcessMaterial) get_color_initial_ramp() Texture2D

fn (ParticleProcessMaterial) set_velocity_limit_curve #

fn (s &ParticleProcessMaterial) set_velocity_limit_curve(curve Texture2D)

fn (ParticleProcessMaterial) get_velocity_limit_curve #

fn (s &ParticleProcessMaterial) get_velocity_limit_curve() Texture2D

fn (ParticleProcessMaterial) set_particle_flag #

fn (s &ParticleProcessMaterial) set_particle_flag(particle_flag ParticleProcessMaterialParticleFlags, enable bool)

Sets the [param particle_flag] to [param enable].

fn (ParticleProcessMaterial) get_particle_flag #

fn (s &ParticleProcessMaterial) get_particle_flag(particle_flag ParticleProcessMaterialParticleFlags) bool

Returns true if the specified particle flag is enabled.

fn (ParticleProcessMaterial) set_velocity_pivot #

fn (s &ParticleProcessMaterial) set_velocity_pivot(pivot Vector3)

fn (ParticleProcessMaterial) get_velocity_pivot #

fn (s &ParticleProcessMaterial) get_velocity_pivot() Vector3

fn (ParticleProcessMaterial) set_emission_shape #

fn (s &ParticleProcessMaterial) set_emission_shape(shape ParticleProcessMaterialEmissionShape)

fn (ParticleProcessMaterial) get_emission_shape #

fn (s &ParticleProcessMaterial) get_emission_shape() ParticleProcessMaterialEmissionShape

fn (ParticleProcessMaterial) set_emission_sphere_radius #

fn (s &ParticleProcessMaterial) set_emission_sphere_radius(radius f64)

fn (ParticleProcessMaterial) get_emission_sphere_radius #

fn (s &ParticleProcessMaterial) get_emission_sphere_radius() f64

fn (ParticleProcessMaterial) set_emission_box_extents #

fn (s &ParticleProcessMaterial) set_emission_box_extents(extents Vector3)

fn (ParticleProcessMaterial) get_emission_box_extents #

fn (s &ParticleProcessMaterial) get_emission_box_extents() Vector3

fn (ParticleProcessMaterial) set_emission_point_texture #

fn (s &ParticleProcessMaterial) set_emission_point_texture(texture Texture2D)

fn (ParticleProcessMaterial) get_emission_point_texture #

fn (s &ParticleProcessMaterial) get_emission_point_texture() Texture2D

fn (ParticleProcessMaterial) set_emission_normal_texture #

fn (s &ParticleProcessMaterial) set_emission_normal_texture(texture Texture2D)

fn (ParticleProcessMaterial) get_emission_normal_texture #

fn (s &ParticleProcessMaterial) get_emission_normal_texture() Texture2D

fn (ParticleProcessMaterial) set_emission_color_texture #

fn (s &ParticleProcessMaterial) set_emission_color_texture(texture Texture2D)

fn (ParticleProcessMaterial) get_emission_color_texture #

fn (s &ParticleProcessMaterial) get_emission_color_texture() Texture2D

fn (ParticleProcessMaterial) set_emission_point_count #

fn (s &ParticleProcessMaterial) set_emission_point_count(point_count i64)

fn (ParticleProcessMaterial) get_emission_point_count #

fn (s &ParticleProcessMaterial) get_emission_point_count() i64

fn (ParticleProcessMaterial) set_emission_ring_axis #

fn (s &ParticleProcessMaterial) set_emission_ring_axis(axis Vector3)

fn (ParticleProcessMaterial) get_emission_ring_axis #

fn (s &ParticleProcessMaterial) get_emission_ring_axis() Vector3

fn (ParticleProcessMaterial) set_emission_ring_height #

fn (s &ParticleProcessMaterial) set_emission_ring_height(height f64)

fn (ParticleProcessMaterial) get_emission_ring_height #

fn (s &ParticleProcessMaterial) get_emission_ring_height() f64

fn (ParticleProcessMaterial) set_emission_ring_radius #

fn (s &ParticleProcessMaterial) set_emission_ring_radius(radius f64)

fn (ParticleProcessMaterial) get_emission_ring_radius #

fn (s &ParticleProcessMaterial) get_emission_ring_radius() f64

fn (ParticleProcessMaterial) set_emission_ring_inner_radius #

fn (s &ParticleProcessMaterial) set_emission_ring_inner_radius(inner_radius f64)

fn (ParticleProcessMaterial) get_emission_ring_inner_radius #

fn (s &ParticleProcessMaterial) get_emission_ring_inner_radius() f64

fn (ParticleProcessMaterial) set_emission_ring_cone_angle #

fn (s &ParticleProcessMaterial) set_emission_ring_cone_angle(cone_angle f64)

fn (ParticleProcessMaterial) get_emission_ring_cone_angle #

fn (s &ParticleProcessMaterial) get_emission_ring_cone_angle() f64

fn (ParticleProcessMaterial) set_emission_shape_offset #

fn (s &ParticleProcessMaterial) set_emission_shape_offset(emission_shape_offset Vector3)

fn (ParticleProcessMaterial) get_emission_shape_offset #

fn (s &ParticleProcessMaterial) get_emission_shape_offset() Vector3

fn (ParticleProcessMaterial) set_emission_shape_scale #

fn (s &ParticleProcessMaterial) set_emission_shape_scale(emission_shape_scale Vector3)

fn (ParticleProcessMaterial) get_emission_shape_scale #

fn (s &ParticleProcessMaterial) get_emission_shape_scale() Vector3

fn (ParticleProcessMaterial) get_turbulence_enabled #

fn (s &ParticleProcessMaterial) get_turbulence_enabled() bool

fn (ParticleProcessMaterial) set_turbulence_enabled #

fn (s &ParticleProcessMaterial) set_turbulence_enabled(turbulence_enabled bool)

fn (ParticleProcessMaterial) get_turbulence_noise_strength #

fn (s &ParticleProcessMaterial) get_turbulence_noise_strength() f64

fn (ParticleProcessMaterial) set_turbulence_noise_strength #

fn (s &ParticleProcessMaterial) set_turbulence_noise_strength(turbulence_noise_strength f64)

fn (ParticleProcessMaterial) get_turbulence_noise_scale #

fn (s &ParticleProcessMaterial) get_turbulence_noise_scale() f64

fn (ParticleProcessMaterial) set_turbulence_noise_scale #

fn (s &ParticleProcessMaterial) set_turbulence_noise_scale(turbulence_noise_scale f64)

fn (ParticleProcessMaterial) get_turbulence_noise_speed_random #

fn (s &ParticleProcessMaterial) get_turbulence_noise_speed_random() f64

fn (ParticleProcessMaterial) set_turbulence_noise_speed_random #

fn (s &ParticleProcessMaterial) set_turbulence_noise_speed_random(turbulence_noise_speed_random f64)

fn (ParticleProcessMaterial) get_turbulence_noise_speed #

fn (s &ParticleProcessMaterial) get_turbulence_noise_speed() Vector3

fn (ParticleProcessMaterial) set_turbulence_noise_speed #

fn (s &ParticleProcessMaterial) set_turbulence_noise_speed(turbulence_noise_speed Vector3)

fn (ParticleProcessMaterial) get_gravity #

fn (s &ParticleProcessMaterial) get_gravity() Vector3

fn (ParticleProcessMaterial) set_gravity #

fn (s &ParticleProcessMaterial) set_gravity(accel_vec Vector3)

fn (ParticleProcessMaterial) set_lifetime_randomness #

fn (s &ParticleProcessMaterial) set_lifetime_randomness(randomness f64)

fn (ParticleProcessMaterial) get_lifetime_randomness #

fn (s &ParticleProcessMaterial) get_lifetime_randomness() f64

fn (ParticleProcessMaterial) get_sub_emitter_mode #

fn (s &ParticleProcessMaterial) get_sub_emitter_mode() ParticleProcessMaterialSubEmitterMode

fn (ParticleProcessMaterial) set_sub_emitter_mode #

fn (s &ParticleProcessMaterial) set_sub_emitter_mode(mode ParticleProcessMaterialSubEmitterMode)

fn (ParticleProcessMaterial) get_sub_emitter_frequency #

fn (s &ParticleProcessMaterial) get_sub_emitter_frequency() f64

fn (ParticleProcessMaterial) set_sub_emitter_frequency #

fn (s &ParticleProcessMaterial) set_sub_emitter_frequency(hz f64)

fn (ParticleProcessMaterial) get_sub_emitter_amount_at_end #

fn (s &ParticleProcessMaterial) get_sub_emitter_amount_at_end() i64

fn (ParticleProcessMaterial) set_sub_emitter_amount_at_end #

fn (s &ParticleProcessMaterial) set_sub_emitter_amount_at_end(amount i64)

fn (ParticleProcessMaterial) get_sub_emitter_amount_at_collision #

fn (s &ParticleProcessMaterial) get_sub_emitter_amount_at_collision() i64

fn (ParticleProcessMaterial) set_sub_emitter_amount_at_collision #

fn (s &ParticleProcessMaterial) set_sub_emitter_amount_at_collision(amount i64)

fn (ParticleProcessMaterial) get_sub_emitter_amount_at_start #

fn (s &ParticleProcessMaterial) get_sub_emitter_amount_at_start() i64

fn (ParticleProcessMaterial) set_sub_emitter_amount_at_start #

fn (s &ParticleProcessMaterial) set_sub_emitter_amount_at_start(amount i64)

fn (ParticleProcessMaterial) get_sub_emitter_keep_velocity #

fn (s &ParticleProcessMaterial) get_sub_emitter_keep_velocity() bool

fn (ParticleProcessMaterial) set_sub_emitter_keep_velocity #

fn (s &ParticleProcessMaterial) set_sub_emitter_keep_velocity(enable bool)

fn (ParticleProcessMaterial) set_attractor_interaction_enabled #

fn (s &ParticleProcessMaterial) set_attractor_interaction_enabled(enabled bool)

fn (ParticleProcessMaterial) is_attractor_interaction_enabled #

fn (s &ParticleProcessMaterial) is_attractor_interaction_enabled() bool

fn (ParticleProcessMaterial) set_collision_mode #

fn (s &ParticleProcessMaterial) set_collision_mode(mode ParticleProcessMaterialCollisionMode)

fn (ParticleProcessMaterial) get_collision_mode #

fn (s &ParticleProcessMaterial) get_collision_mode() ParticleProcessMaterialCollisionMode

fn (ParticleProcessMaterial) set_collision_use_scale #

fn (s &ParticleProcessMaterial) set_collision_use_scale(radius bool)

fn (ParticleProcessMaterial) is_collision_using_scale #

fn (s &ParticleProcessMaterial) is_collision_using_scale() bool

fn (ParticleProcessMaterial) set_collision_friction #

fn (s &ParticleProcessMaterial) set_collision_friction(friction f64)

fn (ParticleProcessMaterial) get_collision_friction #

fn (s &ParticleProcessMaterial) get_collision_friction() f64

fn (ParticleProcessMaterial) set_collision_bounce #

fn (s &ParticleProcessMaterial) set_collision_bounce(bounce f64)

fn (ParticleProcessMaterial) get_collision_bounce #

fn (s &ParticleProcessMaterial) get_collision_bounce() f64

struct Path2D #

struct Path2D {
	Node2D
}

Contains a [Curve2D] path for [PathFollow2D] nodes to follow.

fn (Path2D) to_variant #

fn (s &Path2D) to_variant() Variant

fn (Path2D) from_variant #

fn (mut s Path2D) from_variant(variant &Variant)

fn (Path2D) set_curve #

fn (s &Path2D) set_curve(curve Curve2D)

fn (Path2D) get_curve #

fn (s &Path2D) get_curve() Curve2D

struct Path3D #

struct Path3D {
	Node3D
}

Contains a [Curve3D] path for [PathFollow3D] nodes to follow.

fn (Path3D) to_variant #

fn (s &Path3D) to_variant() Variant

fn (Path3D) from_variant #

fn (mut s Path3D) from_variant(variant &Variant)

fn (Path3D) set_curve #

fn (s &Path3D) set_curve(curve Curve3D)

fn (Path3D) get_curve #

fn (s &Path3D) get_curve() Curve3D

fn (Path3D) set_debug_custom_color #

fn (s &Path3D) set_debug_custom_color(debug_custom_color Color)

fn (Path3D) get_debug_custom_color #

fn (s &Path3D) get_debug_custom_color() Color

struct PathFollow2D #

struct PathFollow2D {
	Node2D
}

Point sampler for a [Path2D].

fn (PathFollow2D) to_variant #

fn (s &PathFollow2D) to_variant() Variant

fn (PathFollow2D) from_variant #

fn (mut s PathFollow2D) from_variant(variant &Variant)

fn (PathFollow2D) set_progress #

fn (s &PathFollow2D) set_progress(progress f64)

fn (PathFollow2D) get_progress #

fn (s &PathFollow2D) get_progress() f64

fn (PathFollow2D) set_h_offset #

fn (s &PathFollow2D) set_h_offset(h_offset f64)

fn (PathFollow2D) get_h_offset #

fn (s &PathFollow2D) get_h_offset() f64

fn (PathFollow2D) set_v_offset #

fn (s &PathFollow2D) set_v_offset(v_offset f64)

fn (PathFollow2D) get_v_offset #

fn (s &PathFollow2D) get_v_offset() f64

fn (PathFollow2D) set_progress_ratio #

fn (s &PathFollow2D) set_progress_ratio(ratio f64)

fn (PathFollow2D) get_progress_ratio #

fn (s &PathFollow2D) get_progress_ratio() f64

fn (PathFollow2D) set_rotates #

fn (s &PathFollow2D) set_rotates(enabled bool)

fn (PathFollow2D) is_rotating #

fn (s &PathFollow2D) is_rotating() bool

fn (PathFollow2D) set_cubic_interpolation #

fn (s &PathFollow2D) set_cubic_interpolation(enabled bool)

fn (PathFollow2D) get_cubic_interpolation #

fn (s &PathFollow2D) get_cubic_interpolation() bool

fn (PathFollow2D) set_loop #

fn (s &PathFollow2D) set_loop(loop bool)

fn (PathFollow2D) has_loop #

fn (s &PathFollow2D) has_loop() bool

struct PathFollow3D #

struct PathFollow3D {
	Node3D
}

Point sampler for a [Path3D].

fn (PathFollow3D) to_variant #

fn (s &PathFollow3D) to_variant() Variant

fn (PathFollow3D) from_variant #

fn (mut s PathFollow3D) from_variant(variant &Variant)

fn (PathFollow3D) set_progress #

fn (s &PathFollow3D) set_progress(progress f64)

fn (PathFollow3D) get_progress #

fn (s &PathFollow3D) get_progress() f64

fn (PathFollow3D) set_h_offset #

fn (s &PathFollow3D) set_h_offset(h_offset f64)

fn (PathFollow3D) get_h_offset #

fn (s &PathFollow3D) get_h_offset() f64

fn (PathFollow3D) set_v_offset #

fn (s &PathFollow3D) set_v_offset(v_offset f64)

fn (PathFollow3D) get_v_offset #

fn (s &PathFollow3D) get_v_offset() f64

fn (PathFollow3D) set_progress_ratio #

fn (s &PathFollow3D) set_progress_ratio(ratio f64)

fn (PathFollow3D) get_progress_ratio #

fn (s &PathFollow3D) get_progress_ratio() f64

fn (PathFollow3D) set_rotation_mode #

fn (s &PathFollow3D) set_rotation_mode(rotation_mode PathFollow3DRotationMode)

fn (PathFollow3D) get_rotation_mode #

fn (s &PathFollow3D) get_rotation_mode() PathFollow3DRotationMode

fn (PathFollow3D) set_cubic_interpolation #

fn (s &PathFollow3D) set_cubic_interpolation(enabled bool)

fn (PathFollow3D) get_cubic_interpolation #

fn (s &PathFollow3D) get_cubic_interpolation() bool

fn (PathFollow3D) set_use_model_front #

fn (s &PathFollow3D) set_use_model_front(enabled bool)

fn (PathFollow3D) is_using_model_front #

fn (s &PathFollow3D) is_using_model_front() bool

fn (PathFollow3D) set_loop #

fn (s &PathFollow3D) set_loop(loop bool)

fn (PathFollow3D) has_loop #

fn (s &PathFollow3D) has_loop() bool

fn (PathFollow3D) set_tilt_enabled #

fn (s &PathFollow3D) set_tilt_enabled(enabled bool)

fn (PathFollow3D) is_tilt_enabled #

fn (s &PathFollow3D) is_tilt_enabled() bool

struct Performance #

struct Performance {
	Object
}

Exposes performance-related data.

fn (Performance) to_variant #

fn (s &Performance) to_variant() Variant

fn (Performance) from_variant #

fn (mut s Performance) from_variant(variant &Variant)

fn (Performance) get_monitor #

fn (s &Performance) get_monitor(monitor PerformanceMonitor) f64

Returns the value of one of the available built-in monitors. You should provide one of the [enum Monitor] constants as the argument, like this: [codeblocks] [gdscript] print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console. [/gdscript] [csharp] GD.Print(Performance.GetMonitor(Performance.Monitor.TimeFps)); // Prints the FPS to the console. [/csharp] [/codeblocks] See [method get_custom_monitor] to query custom performance monitors' values.

fn (Performance) add_custom_monitor #

fn (s &Performance) add_custom_monitor(id string, callable Callable, cfg Performance_add_custom_monitor_Cfg)

Adds a custom monitor with the name [param id]. You can specify the category of the monitor using slash delimiters in [param id] (for example: "Game/NumberOfNPCs"). If there is more than one slash delimiter, then the default category is used. The default category is "Custom". Prints an error if given [param id] is already present. [codeblocks] [gdscript] func _ready(): var monitor_value = Callable(self, "get_monitor_value")

Adds monitor with name "MyName" to category "MyCategory".

Performance.add_custom_monitor("MyCategory/MyMonitor", monitor_value)

Adds monitor with name "MyName" to category "Custom".

Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different IDs, so the code is valid.

Performance.add_custom_monitor("MyMonitor", monitor_value)

Adds monitor with name "MyName" to category "Custom".

Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different IDs, so the code is valid.

Performance.add_custom_monitor("Custom/MyMonitor", monitor_value)

Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom".

Performance.add_custom_monitor("MyCategoryOne/MyCategoryTwo/MyMonitor", monitor_value)

func get_monitor_value(): return randi() % 25 [/gdscript] [csharp] public override void _Ready() { var monitorValue = new Callable(this, MethodName.GetMonitorValue);

// Adds monitor with name "MyName" to category "MyCategory". Performance.AddCustomMonitor("MyCategory/MyMonitor", monitorValue); // Adds monitor with name "MyName" to category "Custom". // Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so the code is valid. Performance.AddCustomMonitor("MyMonitor", monitorValue);

// Adds monitor with name "MyName" to category "Custom". // Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so the code is valid. Performance.AddCustomMonitor("Custom/MyMonitor", monitorValue);

// Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom". Performance.AddCustomMonitor("MyCategoryOne/MyCategoryTwo/MyMonitor", monitorValue); }

public int GetMonitorValue() { return GD.Randi() % 25; } [/csharp] [/codeblocks] The debugger calls the callable to get the value of custom monitor. The callable must return a zero or positive integer or floating-point number. Callables are called with arguments supplied in argument array.

fn (Performance) remove_custom_monitor #

fn (s &Performance) remove_custom_monitor(id string)

Removes the custom monitor with given [param id]. Prints an error if the given [param id] is already absent.

fn (Performance) has_custom_monitor #

fn (s &Performance) has_custom_monitor(id string) bool

Returns true if custom monitor with the given [param id] is present, false otherwise.

fn (Performance) get_custom_monitor #

fn (s &Performance) get_custom_monitor(id string) Variant

Returns the value of custom monitor with given [param id]. The callable is called to get the value of custom monitor. See also [method has_custom_monitor]. Prints an error if the given [param id] is absent.

fn (Performance) get_monitor_modification_time #

fn (s &Performance) get_monitor_modification_time() i64

Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to [method Time.get_ticks_usec] when the monitor is updated.

fn (Performance) get_custom_monitor_names #

fn (s &Performance) get_custom_monitor_names() Array

Returns the names of active custom monitors in an [Array].

struct Performance_add_custom_monitor_Cfg #

@[params]
struct Performance_add_custom_monitor_Cfg {
pub:
	arguments Array = Array.new0()
}

Optional parameters for Performance#add_custom_monitor

struct PhysicalBone2D #

struct PhysicalBone2D {
	RigidBody2D
}

A [RigidBody2D]-derived node used to make [Bone2D]s in a [Skeleton2D] react to physics.

fn (PhysicalBone2D) to_variant #

fn (s &PhysicalBone2D) to_variant() Variant

fn (PhysicalBone2D) from_variant #

fn (mut s PhysicalBone2D) from_variant(variant &Variant)

fn (PhysicalBone2D) get_joint #

fn (s &PhysicalBone2D) get_joint() Joint2D

Returns the first [Joint2D] child node, if one exists. This is mainly a helper function to make it easier to get the [Joint2D] that the [PhysicalBone2D] is autoconfiguring.

fn (PhysicalBone2D) get_auto_configure_joint #

fn (s &PhysicalBone2D) get_auto_configure_joint() bool

fn (PhysicalBone2D) set_auto_configure_joint #

fn (s &PhysicalBone2D) set_auto_configure_joint(auto_configure_joint bool)

fn (PhysicalBone2D) set_simulate_physics #

fn (s &PhysicalBone2D) set_simulate_physics(simulate_physics bool)

fn (PhysicalBone2D) get_simulate_physics #

fn (s &PhysicalBone2D) get_simulate_physics() bool

fn (PhysicalBone2D) is_simulating_physics #

fn (s &PhysicalBone2D) is_simulating_physics() bool

Returns a boolean that indicates whether the [PhysicalBone2D] is running and simulating using the Godot 2D physics engine. When true, the PhysicalBone2D node is using physics.

fn (PhysicalBone2D) set_bone2d_nodepath #

fn (s &PhysicalBone2D) set_bone2d_nodepath(nodepath NodePath)

fn (PhysicalBone2D) get_bone2d_nodepath #

fn (s &PhysicalBone2D) get_bone2d_nodepath() NodePath

fn (PhysicalBone2D) set_bone2d_index #

fn (s &PhysicalBone2D) set_bone2d_index(bone_index i64)

fn (PhysicalBone2D) get_bone2d_index #

fn (s &PhysicalBone2D) get_bone2d_index() i64

fn (PhysicalBone2D) set_follow_bone_when_simulating #

fn (s &PhysicalBone2D) set_follow_bone_when_simulating(follow_bone bool)

fn (PhysicalBone2D) get_follow_bone_when_simulating #

fn (s &PhysicalBone2D) get_follow_bone_when_simulating() bool

struct PhysicalBone3D #

struct PhysicalBone3D {
	PhysicsBody3D
}

A physics body used to make bones in a [Skeleton3D] react to physics.

fn (PhysicalBone3D) to_variant #

fn (s &PhysicalBone3D) to_variant() Variant

fn (PhysicalBone3D) from_variant #

fn (mut s PhysicalBone3D) from_variant(variant &Variant)

fn (PhysicalBone3D) gd_integrate_forces #

fn (s &PhysicalBone3D) gd_integrate_forces(state PhysicsDirectBodyState3D)

Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the [member custom_integrator] property allows you to disable the standard force integration and do fully custom force integration for a body.

fn (PhysicalBone3D) apply_central_impulse #

fn (s &PhysicalBone3D) apply_central_impulse(impulse Vector3)

Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_integrate_forces" functions otherwise). This is equivalent to using [method apply_impulse] at the body's center of mass.

fn (PhysicalBone3D) apply_impulse #

fn (s &PhysicalBone3D) apply_impulse(impulse Vector3, cfg PhysicalBone3D_apply_impulse_Cfg)

Applies a positioned impulse to the PhysicsBone3D. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_integrate_forces" functions otherwise). [param position] is the offset from the PhysicsBone3D origin in global coordinates.

fn (PhysicalBone3D) set_joint_type #

fn (s &PhysicalBone3D) set_joint_type(joint_type PhysicalBone3DJointType)

fn (PhysicalBone3D) get_joint_type #

fn (s &PhysicalBone3D) get_joint_type() PhysicalBone3DJointType

fn (PhysicalBone3D) set_joint_offset #

fn (s &PhysicalBone3D) set_joint_offset(offset Transform3D)

fn (PhysicalBone3D) get_joint_offset #

fn (s &PhysicalBone3D) get_joint_offset() Transform3D

fn (PhysicalBone3D) set_joint_rotation #

fn (s &PhysicalBone3D) set_joint_rotation(euler Vector3)

fn (PhysicalBone3D) get_joint_rotation #

fn (s &PhysicalBone3D) get_joint_rotation() Vector3

fn (PhysicalBone3D) set_body_offset #

fn (s &PhysicalBone3D) set_body_offset(offset Transform3D)

fn (PhysicalBone3D) get_body_offset #

fn (s &PhysicalBone3D) get_body_offset() Transform3D

fn (PhysicalBone3D) get_simulate_physics #

fn (s &PhysicalBone3D) get_simulate_physics() bool

Returns true if the PhysicsBone3D is allowed to simulate physics.

fn (PhysicalBone3D) is_simulating_physics #

fn (s &PhysicalBone3D) is_simulating_physics() bool

Returns true if the PhysicsBone3D is currently simulating physics.

fn (PhysicalBone3D) get_bone_id #

fn (s &PhysicalBone3D) get_bone_id() i64

Returns the unique identifier of the PhysicsBone3D.

fn (PhysicalBone3D) set_mass #

fn (s &PhysicalBone3D) set_mass(mass f64)

fn (PhysicalBone3D) get_mass #

fn (s &PhysicalBone3D) get_mass() f64

fn (PhysicalBone3D) set_friction #

fn (s &PhysicalBone3D) set_friction(friction f64)

fn (PhysicalBone3D) get_friction #

fn (s &PhysicalBone3D) get_friction() f64

fn (PhysicalBone3D) set_bounce #

fn (s &PhysicalBone3D) set_bounce(bounce f64)

fn (PhysicalBone3D) get_bounce #

fn (s &PhysicalBone3D) get_bounce() f64

fn (PhysicalBone3D) set_gravity_scale #

fn (s &PhysicalBone3D) set_gravity_scale(gravity_scale f64)

fn (PhysicalBone3D) get_gravity_scale #

fn (s &PhysicalBone3D) get_gravity_scale() f64

fn (PhysicalBone3D) set_linear_damp_mode #

fn (s &PhysicalBone3D) set_linear_damp_mode(linear_damp_mode PhysicalBone3DDampMode)

fn (PhysicalBone3D) get_linear_damp_mode #

fn (s &PhysicalBone3D) get_linear_damp_mode() PhysicalBone3DDampMode

fn (PhysicalBone3D) set_angular_damp_mode #

fn (s &PhysicalBone3D) set_angular_damp_mode(angular_damp_mode PhysicalBone3DDampMode)

fn (PhysicalBone3D) get_angular_damp_mode #

fn (s &PhysicalBone3D) get_angular_damp_mode() PhysicalBone3DDampMode

fn (PhysicalBone3D) set_linear_damp #

fn (s &PhysicalBone3D) set_linear_damp(linear_damp f64)

fn (PhysicalBone3D) get_linear_damp #

fn (s &PhysicalBone3D) get_linear_damp() f64

fn (PhysicalBone3D) set_angular_damp #

fn (s &PhysicalBone3D) set_angular_damp(angular_damp f64)

fn (PhysicalBone3D) get_angular_damp #

fn (s &PhysicalBone3D) get_angular_damp() f64

fn (PhysicalBone3D) set_linear_velocity #

fn (s &PhysicalBone3D) set_linear_velocity(linear_velocity Vector3)

fn (PhysicalBone3D) get_linear_velocity #

fn (s &PhysicalBone3D) get_linear_velocity() Vector3

fn (PhysicalBone3D) set_angular_velocity #

fn (s &PhysicalBone3D) set_angular_velocity(angular_velocity Vector3)

fn (PhysicalBone3D) get_angular_velocity #

fn (s &PhysicalBone3D) get_angular_velocity() Vector3

fn (PhysicalBone3D) set_use_custom_integrator #

fn (s &PhysicalBone3D) set_use_custom_integrator(enable bool)

fn (PhysicalBone3D) is_using_custom_integrator #

fn (s &PhysicalBone3D) is_using_custom_integrator() bool

fn (PhysicalBone3D) set_can_sleep #

fn (s &PhysicalBone3D) set_can_sleep(able_to_sleep bool)

fn (PhysicalBone3D) is_able_to_sleep #

fn (s &PhysicalBone3D) is_able_to_sleep() bool

struct PhysicalBone3D_apply_impulse_Cfg #

@[params]
struct PhysicalBone3D_apply_impulse_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicalBone3D#apply_impulse

struct PhysicalBoneSimulator3D #

struct PhysicalBoneSimulator3D {
	SkeletonModifier3D
}

Node that can be the parent of [PhysicalBone3D] and can apply the simulation results to [Skeleton3D].

fn (PhysicalBoneSimulator3D) to_variant #

fn (s &PhysicalBoneSimulator3D) to_variant() Variant

fn (PhysicalBoneSimulator3D) from_variant #

fn (mut s PhysicalBoneSimulator3D) from_variant(variant &Variant)

fn (PhysicalBoneSimulator3D) is_simulating_physics #

fn (s &PhysicalBoneSimulator3D) is_simulating_physics() bool

Returns a boolean that indicates whether the [PhysicalBoneSimulator3D] is running and simulating.

fn (PhysicalBoneSimulator3D) physical_bones_stop_simulation #

fn (s &PhysicalBoneSimulator3D) physical_bones_stop_simulation()

Tells the [PhysicalBone3D] nodes in the Skeleton to stop simulating.

fn (PhysicalBoneSimulator3D) physical_bones_start_simulation #

fn (s &PhysicalBoneSimulator3D) physical_bones_start_simulation(cfg PhysicalBoneSimulator3D_physical_bones_start_simulation_Cfg)

Tells the [PhysicalBone3D] nodes in the Skeleton to start simulating and reacting to the physics world. Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated.

fn (PhysicalBoneSimulator3D) physical_bones_add_collision_exception #

fn (s &PhysicalBoneSimulator3D) physical_bones_add_collision_exception(exception RID)

Adds a collision exception to the physical bone. Works just like the [RigidBody3D] node.

fn (PhysicalBoneSimulator3D) physical_bones_remove_collision_exception #

fn (s &PhysicalBoneSimulator3D) physical_bones_remove_collision_exception(exception RID)

Removes a collision exception to the physical bone. Works just like the [RigidBody3D] node.

struct PhysicalBoneSimulator3D_physical_bones_start_simulation_Cfg #

@[params]
struct PhysicalBoneSimulator3D_physical_bones_start_simulation_Cfg {
pub:
	bones Array
}

Optional parameters for PhysicalBoneSimulator3D#physical_bones_start_simulation

struct PhysicalSkyMaterial #

struct PhysicalSkyMaterial {
	Material
}

A material that defines a sky for a [Sky] resource by a set of physical properties.

fn (PhysicalSkyMaterial) to_variant #

fn (s &PhysicalSkyMaterial) to_variant() Variant

fn (PhysicalSkyMaterial) from_variant #

fn (mut s PhysicalSkyMaterial) from_variant(variant &Variant)

fn (PhysicalSkyMaterial) set_rayleigh_coefficient #

fn (s &PhysicalSkyMaterial) set_rayleigh_coefficient(rayleigh f64)

fn (PhysicalSkyMaterial) get_rayleigh_coefficient #

fn (s &PhysicalSkyMaterial) get_rayleigh_coefficient() f64

fn (PhysicalSkyMaterial) set_rayleigh_color #

fn (s &PhysicalSkyMaterial) set_rayleigh_color(color Color)

fn (PhysicalSkyMaterial) get_rayleigh_color #

fn (s &PhysicalSkyMaterial) get_rayleigh_color() Color

fn (PhysicalSkyMaterial) set_mie_coefficient #

fn (s &PhysicalSkyMaterial) set_mie_coefficient(mie f64)

fn (PhysicalSkyMaterial) get_mie_coefficient #

fn (s &PhysicalSkyMaterial) get_mie_coefficient() f64

fn (PhysicalSkyMaterial) set_mie_eccentricity #

fn (s &PhysicalSkyMaterial) set_mie_eccentricity(eccentricity f64)

fn (PhysicalSkyMaterial) get_mie_eccentricity #

fn (s &PhysicalSkyMaterial) get_mie_eccentricity() f64

fn (PhysicalSkyMaterial) set_mie_color #

fn (s &PhysicalSkyMaterial) set_mie_color(color Color)

fn (PhysicalSkyMaterial) get_mie_color #

fn (s &PhysicalSkyMaterial) get_mie_color() Color

fn (PhysicalSkyMaterial) set_turbidity #

fn (s &PhysicalSkyMaterial) set_turbidity(turbidity f64)

fn (PhysicalSkyMaterial) get_turbidity #

fn (s &PhysicalSkyMaterial) get_turbidity() f64

fn (PhysicalSkyMaterial) set_sun_disk_scale #

fn (s &PhysicalSkyMaterial) set_sun_disk_scale(scale f64)

fn (PhysicalSkyMaterial) get_sun_disk_scale #

fn (s &PhysicalSkyMaterial) get_sun_disk_scale() f64

fn (PhysicalSkyMaterial) set_ground_color #

fn (s &PhysicalSkyMaterial) set_ground_color(color Color)

fn (PhysicalSkyMaterial) get_ground_color #

fn (s &PhysicalSkyMaterial) get_ground_color() Color

fn (PhysicalSkyMaterial) set_energy_multiplier #

fn (s &PhysicalSkyMaterial) set_energy_multiplier(multiplier f64)

fn (PhysicalSkyMaterial) get_energy_multiplier #

fn (s &PhysicalSkyMaterial) get_energy_multiplier() f64

fn (PhysicalSkyMaterial) set_use_debanding #

fn (s &PhysicalSkyMaterial) set_use_debanding(use_debanding bool)

fn (PhysicalSkyMaterial) get_use_debanding #

fn (s &PhysicalSkyMaterial) get_use_debanding() bool

fn (PhysicalSkyMaterial) set_night_sky #

fn (s &PhysicalSkyMaterial) set_night_sky(night_sky Texture2D)

fn (PhysicalSkyMaterial) get_night_sky #

fn (s &PhysicalSkyMaterial) get_night_sky() Texture2D

struct PhysicsBody2D #

struct PhysicsBody2D {
	CollisionObject2D
}

Abstract base class for 2D game objects affected by physics.

fn (PhysicsBody2D) to_variant #

fn (s &PhysicsBody2D) to_variant() Variant

fn (PhysicsBody2D) from_variant #

fn (mut s PhysicsBody2D) from_variant(variant &Variant)

fn (PhysicsBody2D) move_and_collide #

fn (s &PhysicsBody2D) move_and_collide(motion Vector2, cfg PhysicsBody2D_move_and_collide_Cfg) KinematicCollision2D

Moves the body along the vector [param motion]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using delta. Returns a [KinematicCollision2D], which contains information about the collision when stopped, or when touching another body along the motion. If [param test_only] is true, the body does not move but the would-be collision information is given. [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details). If [param recovery_as_collision] is true, any depenetration from the recovery phase is also reported as a collision; this is used e.g. by [CharacterBody2D] for improving floor detection during floor snapping.

fn (PhysicsBody2D) test_move #

fn (s &PhysicsBody2D) test_move(from Transform2D, motion Vector2, cfg PhysicsBody2D_test_move_Cfg) bool

Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using delta. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [param motion]. Returns true if a collision would stop the body from moving along the whole path. [param collision] is an optional object of type [KinematicCollision2D], which contains additional information about the collision when stopped, or when touching another body along the motion. [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details). If [param recovery_as_collision] is true, any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would [i]touch[/i] any other bodies.

fn (PhysicsBody2D) get_gravity #

fn (s &PhysicsBody2D) get_gravity() Vector2

Returns the gravity vector computed from all sources that can affect the body, including all gravity overrides from [Area2D] nodes and the global world gravity.

fn (PhysicsBody2D) get_collision_exceptions #

fn (s &PhysicsBody2D) get_collision_exceptions() Array

Returns an array of nodes that were added as collision exceptions for this body.

fn (PhysicsBody2D) add_collision_exception_with #

fn (s &PhysicsBody2D) add_collision_exception_with(body Node)

Adds a body to the list of bodies that this body can't collide with.

fn (PhysicsBody2D) remove_collision_exception_with #

fn (s &PhysicsBody2D) remove_collision_exception_with(body Node)

Removes a body from the list of bodies that this body can't collide with.

struct PhysicsBody2D_move_and_collide_Cfg #

@[params]
struct PhysicsBody2D_move_and_collide_Cfg {
pub:
	test_only             bool
	safe_margin           f64 = 0.08
	recovery_as_collision bool
}

Optional parameters for PhysicsBody2D#move_and_collide

struct PhysicsBody2D_test_move_Cfg #

@[params]
struct PhysicsBody2D_test_move_Cfg {
pub:
	collision             KinematicCollision2D
	safe_margin           f64 = 0.08
	recovery_as_collision bool
}

Optional parameters for PhysicsBody2D#test_move

struct PhysicsBody3D #

struct PhysicsBody3D {
	CollisionObject3D
}

Abstract base class for 3D game objects affected by physics.

fn (PhysicsBody3D) to_variant #

fn (s &PhysicsBody3D) to_variant() Variant

fn (PhysicsBody3D) from_variant #

fn (mut s PhysicsBody3D) from_variant(variant &Variant)

fn (PhysicsBody3D) move_and_collide #

fn (s &PhysicsBody3D) move_and_collide(motion Vector3, cfg PhysicsBody3D_move_and_collide_Cfg) KinematicCollision3D

Moves the body along the vector [param motion]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using delta. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision when stopped, or when touching another body along the motion. If [param test_only] is true, the body does not move but the would-be collision information is given. [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details). If [param recovery_as_collision] is true, any depenetration from the recovery phase is also reported as a collision; this is used e.g. by [CharacterBody3D] for improving floor detection during floor snapping. [param max_collisions] allows to retrieve more than one collision result.

fn (PhysicsBody3D) test_move #

fn (s &PhysicsBody3D) test_move(from Transform3D, motion Vector3, cfg PhysicsBody3D_test_move_Cfg) bool

Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using delta. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [param motion]. Returns true if a collision would stop the body from moving along the whole path. [param collision] is an optional object of type [KinematicCollision3D], which contains additional information about the collision when stopped, or when touching another body along the motion. [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details). If [param recovery_as_collision] is true, any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would [i]touch[/i] any other bodies. [param max_collisions] allows to retrieve more than one collision result.

fn (PhysicsBody3D) get_gravity #

fn (s &PhysicsBody3D) get_gravity() Vector3

Returns the gravity vector computed from all sources that can affect the body, including all gravity overrides from [Area3D] nodes and the global world gravity.

fn (PhysicsBody3D) set_axis_lock #

fn (s &PhysicsBody3D) set_axis_lock(axis PhysicsServer3DBodyAxis, gd_lock bool)

Locks or unlocks the specified linear or rotational [param axis] depending on the value of [param lock].

fn (PhysicsBody3D) get_axis_lock #

fn (s &PhysicsBody3D) get_axis_lock(axis PhysicsServer3DBodyAxis) bool

Returns true if the specified linear or rotational [param axis] is locked.

fn (PhysicsBody3D) get_collision_exceptions #

fn (s &PhysicsBody3D) get_collision_exceptions() Array

Returns an array of nodes that were added as collision exceptions for this body.

fn (PhysicsBody3D) add_collision_exception_with #

fn (s &PhysicsBody3D) add_collision_exception_with(body Node)

Adds a body to the list of bodies that this body can't collide with.

fn (PhysicsBody3D) remove_collision_exception_with #

fn (s &PhysicsBody3D) remove_collision_exception_with(body Node)

Removes a body from the list of bodies that this body can't collide with.

struct PhysicsBody3D_move_and_collide_Cfg #

@[params]
struct PhysicsBody3D_move_and_collide_Cfg {
pub:
	test_only             bool
	safe_margin           f64 = 0.001
	recovery_as_collision bool
	max_collisions        i64 = 1
}

Optional parameters for PhysicsBody3D#move_and_collide

struct PhysicsBody3D_test_move_Cfg #

@[params]
struct PhysicsBody3D_test_move_Cfg {
pub:
	collision             KinematicCollision3D
	safe_margin           f64 = 0.001
	recovery_as_collision bool
	max_collisions        i64 = 1
}

Optional parameters for PhysicsBody3D#test_move

struct PhysicsDirectBodyState2D #

struct PhysicsDirectBodyState2D {
	Object
}

Provides direct access to a physics body in the [PhysicsServer2D].

fn (PhysicsDirectBodyState2D) to_variant #

fn (s &PhysicsDirectBodyState2D) to_variant() Variant

fn (PhysicsDirectBodyState2D) from_variant #

fn (mut s PhysicsDirectBodyState2D) from_variant(variant &Variant)

fn (PhysicsDirectBodyState2D) get_total_gravity #

fn (s &PhysicsDirectBodyState2D) get_total_gravity() Vector2

fn (PhysicsDirectBodyState2D) get_total_linear_damp #

fn (s &PhysicsDirectBodyState2D) get_total_linear_damp() f64

fn (PhysicsDirectBodyState2D) get_total_angular_damp #

fn (s &PhysicsDirectBodyState2D) get_total_angular_damp() f64

fn (PhysicsDirectBodyState2D) get_center_of_mass #

fn (s &PhysicsDirectBodyState2D) get_center_of_mass() Vector2

fn (PhysicsDirectBodyState2D) get_center_of_mass_local #

fn (s &PhysicsDirectBodyState2D) get_center_of_mass_local() Vector2

fn (PhysicsDirectBodyState2D) get_inverse_mass #

fn (s &PhysicsDirectBodyState2D) get_inverse_mass() f64

fn (PhysicsDirectBodyState2D) get_inverse_inertia #

fn (s &PhysicsDirectBodyState2D) get_inverse_inertia() f64

fn (PhysicsDirectBodyState2D) set_linear_velocity #

fn (s &PhysicsDirectBodyState2D) set_linear_velocity(velocity Vector2)

fn (PhysicsDirectBodyState2D) get_linear_velocity #

fn (s &PhysicsDirectBodyState2D) get_linear_velocity() Vector2

fn (PhysicsDirectBodyState2D) set_angular_velocity #

fn (s &PhysicsDirectBodyState2D) set_angular_velocity(velocity f64)

fn (PhysicsDirectBodyState2D) get_angular_velocity #

fn (s &PhysicsDirectBodyState2D) get_angular_velocity() f64

fn (PhysicsDirectBodyState2D) set_transform #

fn (s &PhysicsDirectBodyState2D) set_transform(transform Transform2D)

fn (PhysicsDirectBodyState2D) get_transform #

fn (s &PhysicsDirectBodyState2D) get_transform() Transform2D

fn (PhysicsDirectBodyState2D) get_velocity_at_local_position #

fn (s &PhysicsDirectBodyState2D) get_velocity_at_local_position(local_position Vector2) Vector2

Returns the body's velocity at the given relative position, including both translation and rotation.

fn (PhysicsDirectBodyState2D) apply_central_impulse #

fn (s &PhysicsDirectBodyState2D) apply_central_impulse(impulse Vector2)

Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). This is equivalent to using [method apply_impulse] at the body's center of mass.

fn (PhysicsDirectBodyState2D) apply_torque_impulse #

fn (s &PhysicsDirectBodyState2D) apply_torque_impulse(impulse f64)

Applies a rotational impulse to the body without affecting the position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inverse_inertia].

fn (PhysicsDirectBodyState2D) apply_impulse #

fn (s &PhysicsDirectBodyState2D) apply_impulse(impulse Vector2, cfg PhysicsDirectBodyState2D_apply_impulse_Cfg)

Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [param position] is the offset from the body origin in global coordinates.

fn (PhysicsDirectBodyState2D) apply_central_force #

fn (s &PhysicsDirectBodyState2D) apply_central_force(cfg PhysicsDirectBodyState2D_apply_central_force_Cfg)

Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using [method apply_force] at the body's center of mass.

fn (PhysicsDirectBodyState2D) apply_force #

fn (s &PhysicsDirectBodyState2D) apply_force(force Vector2, cfg PhysicsDirectBodyState2D_apply_force_Cfg)

Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. [param position] is the offset from the body origin in global coordinates.

fn (PhysicsDirectBodyState2D) apply_torque #

fn (s &PhysicsDirectBodyState2D) apply_torque(torque f64)

Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inverse_inertia].

fn (PhysicsDirectBodyState2D) add_constant_central_force #

fn (s &PhysicsDirectBodyState2D) add_constant_central_force(cfg PhysicsDirectBodyState2D_add_constant_central_force_Cfg)

Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with constant_force = Vector2(0, 0). This is equivalent to using [method add_constant_force] at the body's center of mass.

fn (PhysicsDirectBodyState2D) add_constant_force #

fn (s &PhysicsDirectBodyState2D) add_constant_force(force Vector2, cfg PhysicsDirectBodyState2D_add_constant_force_Cfg)

Adds a constant positioned force to the body that keeps being applied over time until cleared with constant_force = Vector2(0, 0). [param position] is the offset from the body origin in global coordinates.

fn (PhysicsDirectBodyState2D) add_constant_torque #

fn (s &PhysicsDirectBodyState2D) add_constant_torque(torque f64)

Adds a constant rotational force without affecting position that keeps being applied over time until cleared with constant_torque = 0.

fn (PhysicsDirectBodyState2D) set_constant_force #

fn (s &PhysicsDirectBodyState2D) set_constant_force(force Vector2)

Sets the body's total constant positional forces applied during each physics update. See [method add_constant_force] and [method add_constant_central_force].

fn (PhysicsDirectBodyState2D) get_constant_force #

fn (s &PhysicsDirectBodyState2D) get_constant_force() Vector2

Returns the body's total constant positional forces applied during each physics update. See [method add_constant_force] and [method add_constant_central_force].

fn (PhysicsDirectBodyState2D) set_constant_torque #

fn (s &PhysicsDirectBodyState2D) set_constant_torque(torque f64)

Sets the body's total constant rotational forces applied during each physics update. See [method add_constant_torque].

fn (PhysicsDirectBodyState2D) get_constant_torque #

fn (s &PhysicsDirectBodyState2D) get_constant_torque() f64

Returns the body's total constant rotational forces applied during each physics update. See [method add_constant_torque].

fn (PhysicsDirectBodyState2D) set_sleep_state #

fn (s &PhysicsDirectBodyState2D) set_sleep_state(enabled bool)

fn (PhysicsDirectBodyState2D) is_sleeping #

fn (s &PhysicsDirectBodyState2D) is_sleeping() bool

fn (PhysicsDirectBodyState2D) get_contact_count #

fn (s &PhysicsDirectBodyState2D) get_contact_count() i64

Returns the number of contacts this body has with other bodies. [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor].

fn (PhysicsDirectBodyState2D) get_contact_local_position #

fn (s &PhysicsDirectBodyState2D) get_contact_local_position(contact_idx i64) Vector2

Returns the position of the contact point on the body in the global coordinate system.

fn (PhysicsDirectBodyState2D) get_contact_local_normal #

fn (s &PhysicsDirectBodyState2D) get_contact_local_normal(contact_idx i64) Vector2

Returns the local normal at the contact point.

fn (PhysicsDirectBodyState2D) get_contact_local_shape #

fn (s &PhysicsDirectBodyState2D) get_contact_local_shape(contact_idx i64) i64

Returns the local shape index of the collision.

fn (PhysicsDirectBodyState2D) get_contact_local_velocity_at_position #

fn (s &PhysicsDirectBodyState2D) get_contact_local_velocity_at_position(contact_idx i64) Vector2

Returns the velocity vector at the body's contact point.

fn (PhysicsDirectBodyState2D) get_contact_collider #

fn (s &PhysicsDirectBodyState2D) get_contact_collider(contact_idx i64) RID

Returns the collider's [RID].

fn (PhysicsDirectBodyState2D) get_contact_collider_position #

fn (s &PhysicsDirectBodyState2D) get_contact_collider_position(contact_idx i64) Vector2

Returns the position of the contact point on the collider in the global coordinate system.

fn (PhysicsDirectBodyState2D) get_contact_collider_id #

fn (s &PhysicsDirectBodyState2D) get_contact_collider_id(contact_idx i64) i64

Returns the collider's object id.

fn (PhysicsDirectBodyState2D) get_contact_collider_object #

fn (s &PhysicsDirectBodyState2D) get_contact_collider_object(contact_idx i64) Object

Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it).

fn (PhysicsDirectBodyState2D) get_contact_collider_shape #

fn (s &PhysicsDirectBodyState2D) get_contact_collider_shape(contact_idx i64) i64

Returns the collider's shape index.

fn (PhysicsDirectBodyState2D) get_contact_collider_velocity_at_position #

fn (s &PhysicsDirectBodyState2D) get_contact_collider_velocity_at_position(contact_idx i64) Vector2

Returns the velocity vector at the collider's contact point.

fn (PhysicsDirectBodyState2D) get_contact_impulse #

fn (s &PhysicsDirectBodyState2D) get_contact_impulse(contact_idx i64) Vector2

Returns the impulse created by the contact.

fn (PhysicsDirectBodyState2D) get_step #

fn (s &PhysicsDirectBodyState2D) get_step() f64

fn (PhysicsDirectBodyState2D) integrate_forces #

fn (s &PhysicsDirectBodyState2D) integrate_forces()

Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick.

fn (PhysicsDirectBodyState2D) get_space_state #

fn (s &PhysicsDirectBodyState2D) get_space_state() PhysicsDirectSpaceState2D

Returns the current state of the space, useful for queries.

struct PhysicsDirectBodyState2DExtension #

struct PhysicsDirectBodyState2DExtension {
	PhysicsDirectBodyState2D
}

Provides virtual methods that can be overridden to create custom [PhysicsDirectBodyState2D] implementations.

fn (PhysicsDirectBodyState2DExtension) to_variant #

fn (s &PhysicsDirectBodyState2DExtension) to_variant() Variant

fn (PhysicsDirectBodyState2DExtension) from_variant #

fn (mut s PhysicsDirectBodyState2DExtension) from_variant(variant &Variant)

fn (PhysicsDirectBodyState2DExtension) gd_get_total_gravity #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_total_gravity() Vector2

Implement to override the behavior of [member PhysicsDirectBodyState2D.total_gravity] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_get_total_linear_damp #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_total_linear_damp() f64

Implement to override the behavior of [member PhysicsDirectBodyState2D.total_linear_damp] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_get_total_angular_damp #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_total_angular_damp() f64

Implement to override the behavior of [member PhysicsDirectBodyState2D.total_angular_damp] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_get_center_of_mass #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_center_of_mass() Vector2

Implement to override the behavior of [member PhysicsDirectBodyState2D.center_of_mass] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_get_center_of_mass_local #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_center_of_mass_local() Vector2

Implement to override the behavior of [member PhysicsDirectBodyState2D.center_of_mass_local] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_get_inverse_mass #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_inverse_mass() f64

Implement to override the behavior of [member PhysicsDirectBodyState2D.inverse_mass] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_get_inverse_inertia #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_inverse_inertia() f64

Implement to override the behavior of [member PhysicsDirectBodyState2D.inverse_inertia] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_set_linear_velocity #

fn (s &PhysicsDirectBodyState2DExtension) gd_set_linear_velocity(velocity Vector2)

Implement to override the behavior of [member PhysicsDirectBodyState2D.linear_velocity] and its respective setter.

fn (PhysicsDirectBodyState2DExtension) gd_get_linear_velocity #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_linear_velocity() Vector2

Implement to override the behavior of [member PhysicsDirectBodyState2D.linear_velocity] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_set_angular_velocity #

fn (s &PhysicsDirectBodyState2DExtension) gd_set_angular_velocity(velocity f64)

Implement to override the behavior of [member PhysicsDirectBodyState2D.angular_velocity] and its respective setter.

fn (PhysicsDirectBodyState2DExtension) gd_get_angular_velocity #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_angular_velocity() f64

Implement to override the behavior of [member PhysicsDirectBodyState2D.angular_velocity] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_set_transform #

fn (s &PhysicsDirectBodyState2DExtension) gd_set_transform(transform Transform2D)

Implement to override the behavior of [member PhysicsDirectBodyState2D.transform] and its respective setter.

fn (PhysicsDirectBodyState2DExtension) gd_get_transform #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_transform() Transform2D

Implement to override the behavior of [member PhysicsDirectBodyState2D.transform] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_get_velocity_at_local_position #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_velocity_at_local_position(local_position Vector2) Vector2

Overridable version of [method PhysicsDirectBodyState2D.get_velocity_at_local_position].

fn (PhysicsDirectBodyState2DExtension) gd_apply_central_impulse #

fn (s &PhysicsDirectBodyState2DExtension) gd_apply_central_impulse(impulse Vector2)

Overridable version of [method PhysicsDirectBodyState2D.apply_central_impulse].

fn (PhysicsDirectBodyState2DExtension) gd_apply_impulse #

fn (s &PhysicsDirectBodyState2DExtension) gd_apply_impulse(impulse Vector2, position Vector2)

Overridable version of [method PhysicsDirectBodyState2D.apply_impulse].

fn (PhysicsDirectBodyState2DExtension) gd_apply_torque_impulse #

fn (s &PhysicsDirectBodyState2DExtension) gd_apply_torque_impulse(impulse f64)

Overridable version of [method PhysicsDirectBodyState2D.apply_torque_impulse].

fn (PhysicsDirectBodyState2DExtension) gd_apply_central_force #

fn (s &PhysicsDirectBodyState2DExtension) gd_apply_central_force(force Vector2)

Overridable version of [method PhysicsDirectBodyState2D.apply_central_force].

fn (PhysicsDirectBodyState2DExtension) gd_apply_force #

fn (s &PhysicsDirectBodyState2DExtension) gd_apply_force(force Vector2, position Vector2)

Overridable version of [method PhysicsDirectBodyState2D.apply_force].

fn (PhysicsDirectBodyState2DExtension) gd_apply_torque #

fn (s &PhysicsDirectBodyState2DExtension) gd_apply_torque(torque f64)

Overridable version of [method PhysicsDirectBodyState2D.apply_torque].

fn (PhysicsDirectBodyState2DExtension) gd_add_constant_central_force #

fn (s &PhysicsDirectBodyState2DExtension) gd_add_constant_central_force(force Vector2)

Overridable version of [method PhysicsDirectBodyState2D.add_constant_central_force].

fn (PhysicsDirectBodyState2DExtension) gd_add_constant_force #

fn (s &PhysicsDirectBodyState2DExtension) gd_add_constant_force(force Vector2, position Vector2)

Overridable version of [method PhysicsDirectBodyState2D.add_constant_force].

fn (PhysicsDirectBodyState2DExtension) gd_add_constant_torque #

fn (s &PhysicsDirectBodyState2DExtension) gd_add_constant_torque(torque f64)

Overridable version of [method PhysicsDirectBodyState2D.add_constant_torque].

fn (PhysicsDirectBodyState2DExtension) gd_set_constant_force #

fn (s &PhysicsDirectBodyState2DExtension) gd_set_constant_force(force Vector2)

Overridable version of [method PhysicsDirectBodyState2D.set_constant_force].

fn (PhysicsDirectBodyState2DExtension) gd_get_constant_force #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_constant_force() Vector2

Overridable version of [method PhysicsDirectBodyState2D.get_constant_force].

fn (PhysicsDirectBodyState2DExtension) gd_set_constant_torque #

fn (s &PhysicsDirectBodyState2DExtension) gd_set_constant_torque(torque f64)

Overridable version of [method PhysicsDirectBodyState2D.set_constant_torque].

fn (PhysicsDirectBodyState2DExtension) gd_get_constant_torque #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_constant_torque() f64

Overridable version of [method PhysicsDirectBodyState2D.get_constant_torque].

fn (PhysicsDirectBodyState2DExtension) gd_set_sleep_state #

fn (s &PhysicsDirectBodyState2DExtension) gd_set_sleep_state(enabled bool)

Implement to override the behavior of [member PhysicsDirectBodyState2D.sleeping] and its respective setter.

fn (PhysicsDirectBodyState2DExtension) gd_is_sleeping #

fn (s &PhysicsDirectBodyState2DExtension) gd_is_sleeping() bool

Implement to override the behavior of [member PhysicsDirectBodyState2D.sleeping] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_count #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_count() i64

Overridable version of [method PhysicsDirectBodyState2D.get_contact_count].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_local_position #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_local_position(contact_idx i64) Vector2

Overridable version of [method PhysicsDirectBodyState2D.get_contact_local_position].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_local_normal #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_local_normal(contact_idx i64) Vector2

Overridable version of [method PhysicsDirectBodyState2D.get_contact_local_normal].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_local_shape #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_local_shape(contact_idx i64) i64

Overridable version of [method PhysicsDirectBodyState2D.get_contact_local_shape].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_local_velocity_at_position #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_local_velocity_at_position(contact_idx i64) Vector2

Overridable version of [method PhysicsDirectBodyState2D.get_contact_local_velocity_at_position].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_collider #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_collider(contact_idx i64) RID

Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_collider_position #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_collider_position(contact_idx i64) Vector2

Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_position].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_collider_id #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_collider_id(contact_idx i64) i64

Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_id].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_collider_object #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_collider_object(contact_idx i64) Object

Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_object].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_collider_shape #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_collider_shape(contact_idx i64) i64

Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_shape].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_collider_velocity_at_position #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_collider_velocity_at_position(contact_idx i64) Vector2

Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_velocity_at_position].

fn (PhysicsDirectBodyState2DExtension) gd_get_contact_impulse #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_contact_impulse(contact_idx i64) Vector2

Overridable version of [method PhysicsDirectBodyState2D.get_contact_impulse].

fn (PhysicsDirectBodyState2DExtension) gd_get_step #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_step() f64

Implement to override the behavior of [member PhysicsDirectBodyState2D.step] and its respective getter.

fn (PhysicsDirectBodyState2DExtension) gd_integrate_forces #

fn (s &PhysicsDirectBodyState2DExtension) gd_integrate_forces()

Overridable version of [method PhysicsDirectBodyState2D.integrate_forces].

fn (PhysicsDirectBodyState2DExtension) gd_get_space_state #

fn (s &PhysicsDirectBodyState2DExtension) gd_get_space_state() PhysicsDirectSpaceState2D

Overridable version of [method PhysicsDirectBodyState2D.get_space_state].

struct PhysicsDirectBodyState2D_add_constant_central_force_Cfg #

@[params]
struct PhysicsDirectBodyState2D_add_constant_central_force_Cfg {
pub:
	force Vector2 = Vector2{0, 0}
}

Optional parameters for PhysicsDirectBodyState2D#add_constant_central_force

struct PhysicsDirectBodyState2D_add_constant_force_Cfg #

@[params]
struct PhysicsDirectBodyState2D_add_constant_force_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for PhysicsDirectBodyState2D#add_constant_force

struct PhysicsDirectBodyState2D_apply_central_force_Cfg #

@[params]
struct PhysicsDirectBodyState2D_apply_central_force_Cfg {
pub:
	force Vector2 = Vector2{0, 0}
}

Optional parameters for PhysicsDirectBodyState2D#apply_central_force

struct PhysicsDirectBodyState2D_apply_force_Cfg #

@[params]
struct PhysicsDirectBodyState2D_apply_force_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for PhysicsDirectBodyState2D#apply_force

struct PhysicsDirectBodyState2D_apply_impulse_Cfg #

@[params]
struct PhysicsDirectBodyState2D_apply_impulse_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for PhysicsDirectBodyState2D#apply_impulse

struct PhysicsDirectBodyState3D #

struct PhysicsDirectBodyState3D {
	Object
}

Provides direct access to a physics body in the [PhysicsServer3D].

fn (PhysicsDirectBodyState3D) to_variant #

fn (s &PhysicsDirectBodyState3D) to_variant() Variant

fn (PhysicsDirectBodyState3D) from_variant #

fn (mut s PhysicsDirectBodyState3D) from_variant(variant &Variant)

fn (PhysicsDirectBodyState3D) get_total_gravity #

fn (s &PhysicsDirectBodyState3D) get_total_gravity() Vector3

fn (PhysicsDirectBodyState3D) get_total_linear_damp #

fn (s &PhysicsDirectBodyState3D) get_total_linear_damp() f64

fn (PhysicsDirectBodyState3D) get_total_angular_damp #

fn (s &PhysicsDirectBodyState3D) get_total_angular_damp() f64

fn (PhysicsDirectBodyState3D) get_center_of_mass #

fn (s &PhysicsDirectBodyState3D) get_center_of_mass() Vector3

fn (PhysicsDirectBodyState3D) get_center_of_mass_local #

fn (s &PhysicsDirectBodyState3D) get_center_of_mass_local() Vector3

fn (PhysicsDirectBodyState3D) get_principal_inertia_axes #

fn (s &PhysicsDirectBodyState3D) get_principal_inertia_axes() Basis

fn (PhysicsDirectBodyState3D) get_inverse_mass #

fn (s &PhysicsDirectBodyState3D) get_inverse_mass() f64

fn (PhysicsDirectBodyState3D) get_inverse_inertia #

fn (s &PhysicsDirectBodyState3D) get_inverse_inertia() Vector3

fn (PhysicsDirectBodyState3D) get_inverse_inertia_tensor #

fn (s &PhysicsDirectBodyState3D) get_inverse_inertia_tensor() Basis

fn (PhysicsDirectBodyState3D) set_linear_velocity #

fn (s &PhysicsDirectBodyState3D) set_linear_velocity(velocity Vector3)

fn (PhysicsDirectBodyState3D) get_linear_velocity #

fn (s &PhysicsDirectBodyState3D) get_linear_velocity() Vector3

fn (PhysicsDirectBodyState3D) set_angular_velocity #

fn (s &PhysicsDirectBodyState3D) set_angular_velocity(velocity Vector3)

fn (PhysicsDirectBodyState3D) get_angular_velocity #

fn (s &PhysicsDirectBodyState3D) get_angular_velocity() Vector3

fn (PhysicsDirectBodyState3D) set_transform #

fn (s &PhysicsDirectBodyState3D) set_transform(transform Transform3D)

fn (PhysicsDirectBodyState3D) get_transform #

fn (s &PhysicsDirectBodyState3D) get_transform() Transform3D

fn (PhysicsDirectBodyState3D) get_velocity_at_local_position #

fn (s &PhysicsDirectBodyState3D) get_velocity_at_local_position(local_position Vector3) Vector3

Returns the body's velocity at the given relative position, including both translation and rotation.

fn (PhysicsDirectBodyState3D) apply_central_impulse #

fn (s &PhysicsDirectBodyState3D) apply_central_impulse(cfg PhysicsDirectBodyState3D_apply_central_impulse_Cfg)

Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). This is equivalent to using [method apply_impulse] at the body's center of mass.

fn (PhysicsDirectBodyState3D) apply_impulse #

fn (s &PhysicsDirectBodyState3D) apply_impulse(impulse Vector3, cfg PhysicsDirectBodyState3D_apply_impulse_Cfg)

Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [param position] is the offset from the body origin in global coordinates.

fn (PhysicsDirectBodyState3D) apply_torque_impulse #

fn (s &PhysicsDirectBodyState3D) apply_torque_impulse(impulse Vector3)

Applies a rotational impulse to the body without affecting the position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inverse_inertia].

fn (PhysicsDirectBodyState3D) apply_central_force #

fn (s &PhysicsDirectBodyState3D) apply_central_force(cfg PhysicsDirectBodyState3D_apply_central_force_Cfg)

Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using [method apply_force] at the body's center of mass.

fn (PhysicsDirectBodyState3D) apply_force #

fn (s &PhysicsDirectBodyState3D) apply_force(force Vector3, cfg PhysicsDirectBodyState3D_apply_force_Cfg)

Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. [param position] is the offset from the body origin in global coordinates.

fn (PhysicsDirectBodyState3D) apply_torque #

fn (s &PhysicsDirectBodyState3D) apply_torque(torque Vector3)

Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inverse_inertia].

fn (PhysicsDirectBodyState3D) add_constant_central_force #

fn (s &PhysicsDirectBodyState3D) add_constant_central_force(cfg PhysicsDirectBodyState3D_add_constant_central_force_Cfg)

Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with constant_force = Vector3(0, 0, 0). This is equivalent to using [method add_constant_force] at the body's center of mass.

fn (PhysicsDirectBodyState3D) add_constant_force #

fn (s &PhysicsDirectBodyState3D) add_constant_force(force Vector3, cfg PhysicsDirectBodyState3D_add_constant_force_Cfg)

Adds a constant positioned force to the body that keeps being applied over time until cleared with constant_force = Vector3(0, 0, 0). [param position] is the offset from the body origin in global coordinates.

fn (PhysicsDirectBodyState3D) add_constant_torque #

fn (s &PhysicsDirectBodyState3D) add_constant_torque(torque Vector3)

Adds a constant rotational force without affecting position that keeps being applied over time until cleared with constant_torque = Vector3(0, 0, 0).

fn (PhysicsDirectBodyState3D) set_constant_force #

fn (s &PhysicsDirectBodyState3D) set_constant_force(force Vector3)

Sets the body's total constant positional forces applied during each physics update. See [method add_constant_force] and [method add_constant_central_force].

fn (PhysicsDirectBodyState3D) get_constant_force #

fn (s &PhysicsDirectBodyState3D) get_constant_force() Vector3

Returns the body's total constant positional forces applied during each physics update. See [method add_constant_force] and [method add_constant_central_force].

fn (PhysicsDirectBodyState3D) set_constant_torque #

fn (s &PhysicsDirectBodyState3D) set_constant_torque(torque Vector3)

Sets the body's total constant rotational forces applied during each physics update. See [method add_constant_torque].

fn (PhysicsDirectBodyState3D) get_constant_torque #

fn (s &PhysicsDirectBodyState3D) get_constant_torque() Vector3

Returns the body's total constant rotational forces applied during each physics update. See [method add_constant_torque].

fn (PhysicsDirectBodyState3D) set_sleep_state #

fn (s &PhysicsDirectBodyState3D) set_sleep_state(enabled bool)

fn (PhysicsDirectBodyState3D) is_sleeping #

fn (s &PhysicsDirectBodyState3D) is_sleeping() bool

fn (PhysicsDirectBodyState3D) get_contact_count #

fn (s &PhysicsDirectBodyState3D) get_contact_count() i64

Returns the number of contacts this body has with other bodies. [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody3D.contact_monitor].

fn (PhysicsDirectBodyState3D) get_contact_local_position #

fn (s &PhysicsDirectBodyState3D) get_contact_local_position(contact_idx i64) Vector3

Returns the position of the contact point on the body in the global coordinate system.

fn (PhysicsDirectBodyState3D) get_contact_local_normal #

fn (s &PhysicsDirectBodyState3D) get_contact_local_normal(contact_idx i64) Vector3

Returns the local normal at the contact point.

fn (PhysicsDirectBodyState3D) get_contact_impulse #

fn (s &PhysicsDirectBodyState3D) get_contact_impulse(contact_idx i64) Vector3

Impulse created by the contact.

fn (PhysicsDirectBodyState3D) get_contact_local_shape #

fn (s &PhysicsDirectBodyState3D) get_contact_local_shape(contact_idx i64) i64

Returns the local shape index of the collision.

fn (PhysicsDirectBodyState3D) get_contact_local_velocity_at_position #

fn (s &PhysicsDirectBodyState3D) get_contact_local_velocity_at_position(contact_idx i64) Vector3

Returns the linear velocity vector at the body's contact point.

fn (PhysicsDirectBodyState3D) get_contact_collider #

fn (s &PhysicsDirectBodyState3D) get_contact_collider(contact_idx i64) RID

Returns the collider's [RID].

fn (PhysicsDirectBodyState3D) get_contact_collider_position #

fn (s &PhysicsDirectBodyState3D) get_contact_collider_position(contact_idx i64) Vector3

Returns the position of the contact point on the collider in the global coordinate system.

fn (PhysicsDirectBodyState3D) get_contact_collider_id #

fn (s &PhysicsDirectBodyState3D) get_contact_collider_id(contact_idx i64) i64

Returns the collider's object id.

fn (PhysicsDirectBodyState3D) get_contact_collider_object #

fn (s &PhysicsDirectBodyState3D) get_contact_collider_object(contact_idx i64) Object

Returns the collider object.

fn (PhysicsDirectBodyState3D) get_contact_collider_shape #

fn (s &PhysicsDirectBodyState3D) get_contact_collider_shape(contact_idx i64) i64

Returns the collider's shape index.

fn (PhysicsDirectBodyState3D) get_contact_collider_velocity_at_position #

fn (s &PhysicsDirectBodyState3D) get_contact_collider_velocity_at_position(contact_idx i64) Vector3

Returns the linear velocity vector at the collider's contact point.

fn (PhysicsDirectBodyState3D) get_step #

fn (s &PhysicsDirectBodyState3D) get_step() f64

fn (PhysicsDirectBodyState3D) integrate_forces #

fn (s &PhysicsDirectBodyState3D) integrate_forces()

Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick.

fn (PhysicsDirectBodyState3D) get_space_state #

fn (s &PhysicsDirectBodyState3D) get_space_state() PhysicsDirectSpaceState3D

Returns the current state of the space, useful for queries.

struct PhysicsDirectBodyState3DExtension #

struct PhysicsDirectBodyState3DExtension {
	PhysicsDirectBodyState3D
}

Provides virtual methods that can be overridden to create custom [PhysicsDirectBodyState3D] implementations.

fn (PhysicsDirectBodyState3DExtension) to_variant #

fn (s &PhysicsDirectBodyState3DExtension) to_variant() Variant

fn (PhysicsDirectBodyState3DExtension) from_variant #

fn (mut s PhysicsDirectBodyState3DExtension) from_variant(variant &Variant)

fn (PhysicsDirectBodyState3DExtension) gd_get_total_gravity #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_total_gravity() Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_total_linear_damp #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_total_linear_damp() f64

fn (PhysicsDirectBodyState3DExtension) gd_get_total_angular_damp #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_total_angular_damp() f64

fn (PhysicsDirectBodyState3DExtension) gd_get_center_of_mass #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_center_of_mass() Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_center_of_mass_local #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_center_of_mass_local() Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_principal_inertia_axes #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_principal_inertia_axes() Basis

fn (PhysicsDirectBodyState3DExtension) gd_get_inverse_mass #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_inverse_mass() f64

fn (PhysicsDirectBodyState3DExtension) gd_get_inverse_inertia #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_inverse_inertia() Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_inverse_inertia_tensor #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_inverse_inertia_tensor() Basis

fn (PhysicsDirectBodyState3DExtension) gd_set_linear_velocity #

fn (s &PhysicsDirectBodyState3DExtension) gd_set_linear_velocity(velocity Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_get_linear_velocity #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_linear_velocity() Vector3

fn (PhysicsDirectBodyState3DExtension) gd_set_angular_velocity #

fn (s &PhysicsDirectBodyState3DExtension) gd_set_angular_velocity(velocity Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_get_angular_velocity #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_angular_velocity() Vector3

fn (PhysicsDirectBodyState3DExtension) gd_set_transform #

fn (s &PhysicsDirectBodyState3DExtension) gd_set_transform(transform Transform3D)

fn (PhysicsDirectBodyState3DExtension) gd_get_transform #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_transform() Transform3D

fn (PhysicsDirectBodyState3DExtension) gd_get_velocity_at_local_position #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_velocity_at_local_position(local_position Vector3) Vector3

fn (PhysicsDirectBodyState3DExtension) gd_apply_central_impulse #

fn (s &PhysicsDirectBodyState3DExtension) gd_apply_central_impulse(impulse Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_apply_impulse #

fn (s &PhysicsDirectBodyState3DExtension) gd_apply_impulse(impulse Vector3, position Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_apply_torque_impulse #

fn (s &PhysicsDirectBodyState3DExtension) gd_apply_torque_impulse(impulse Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_apply_central_force #

fn (s &PhysicsDirectBodyState3DExtension) gd_apply_central_force(force Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_apply_force #

fn (s &PhysicsDirectBodyState3DExtension) gd_apply_force(force Vector3, position Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_apply_torque #

fn (s &PhysicsDirectBodyState3DExtension) gd_apply_torque(torque Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_add_constant_central_force #

fn (s &PhysicsDirectBodyState3DExtension) gd_add_constant_central_force(force Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_add_constant_force #

fn (s &PhysicsDirectBodyState3DExtension) gd_add_constant_force(force Vector3, position Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_add_constant_torque #

fn (s &PhysicsDirectBodyState3DExtension) gd_add_constant_torque(torque Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_set_constant_force #

fn (s &PhysicsDirectBodyState3DExtension) gd_set_constant_force(force Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_get_constant_force #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_constant_force() Vector3

fn (PhysicsDirectBodyState3DExtension) gd_set_constant_torque #

fn (s &PhysicsDirectBodyState3DExtension) gd_set_constant_torque(torque Vector3)

fn (PhysicsDirectBodyState3DExtension) gd_get_constant_torque #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_constant_torque() Vector3

fn (PhysicsDirectBodyState3DExtension) gd_set_sleep_state #

fn (s &PhysicsDirectBodyState3DExtension) gd_set_sleep_state(enabled bool)

fn (PhysicsDirectBodyState3DExtension) gd_is_sleeping #

fn (s &PhysicsDirectBodyState3DExtension) gd_is_sleeping() bool

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_count #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_count() i64

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_local_position #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_local_position(contact_idx i64) Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_local_normal #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_local_normal(contact_idx i64) Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_impulse #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_impulse(contact_idx i64) Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_local_shape #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_local_shape(contact_idx i64) i64

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_local_velocity_at_position #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_local_velocity_at_position(contact_idx i64) Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_collider #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_collider(contact_idx i64) RID

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_collider_position #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_collider_position(contact_idx i64) Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_collider_id #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_collider_id(contact_idx i64) i64

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_collider_object #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_collider_object(contact_idx i64) Object

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_collider_shape #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_collider_shape(contact_idx i64) i64

fn (PhysicsDirectBodyState3DExtension) gd_get_contact_collider_velocity_at_position #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_contact_collider_velocity_at_position(contact_idx i64) Vector3

fn (PhysicsDirectBodyState3DExtension) gd_get_step #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_step() f64

fn (PhysicsDirectBodyState3DExtension) gd_integrate_forces #

fn (s &PhysicsDirectBodyState3DExtension) gd_integrate_forces()

fn (PhysicsDirectBodyState3DExtension) gd_get_space_state #

fn (s &PhysicsDirectBodyState3DExtension) gd_get_space_state() PhysicsDirectSpaceState3D

struct PhysicsDirectBodyState3D_add_constant_central_force_Cfg #

@[params]
struct PhysicsDirectBodyState3D_add_constant_central_force_Cfg {
pub:
	force Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicsDirectBodyState3D#add_constant_central_force

struct PhysicsDirectBodyState3D_add_constant_force_Cfg #

@[params]
struct PhysicsDirectBodyState3D_add_constant_force_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicsDirectBodyState3D#add_constant_force

struct PhysicsDirectBodyState3D_apply_central_force_Cfg #

@[params]
struct PhysicsDirectBodyState3D_apply_central_force_Cfg {
pub:
	force Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicsDirectBodyState3D#apply_central_force

struct PhysicsDirectBodyState3D_apply_central_impulse_Cfg #

@[params]
struct PhysicsDirectBodyState3D_apply_central_impulse_Cfg {
pub:
	impulse Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicsDirectBodyState3D#apply_central_impulse

struct PhysicsDirectBodyState3D_apply_force_Cfg #

@[params]
struct PhysicsDirectBodyState3D_apply_force_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicsDirectBodyState3D#apply_force

struct PhysicsDirectBodyState3D_apply_impulse_Cfg #

@[params]
struct PhysicsDirectBodyState3D_apply_impulse_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicsDirectBodyState3D#apply_impulse

struct PhysicsDirectSpaceState2D #

struct PhysicsDirectSpaceState2D {
	Object
}

Provides direct access to a physics space in the [PhysicsServer2D].

fn (PhysicsDirectSpaceState2D) to_variant #

fn (s &PhysicsDirectSpaceState2D) to_variant() Variant

fn (PhysicsDirectSpaceState2D) from_variant #

fn (mut s PhysicsDirectSpaceState2D) from_variant(variant &Variant)

fn (PhysicsDirectSpaceState2D) intersect_point #

fn (s &PhysicsDirectSpaceState2D) intersect_point(parameters PhysicsPointQueryParameters2D, cfg PhysicsDirectSpaceState2D_intersect_point_Cfg) Array

Checks whether a point is inside any solid shape. Position and other parameters are defined through [PhysicsPointQueryParameters2D]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: collider: The colliding object. collider_id: The colliding object's ID. rid: The intersecting object's [RID]. shape: The shape index of the colliding shape. The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in Segments build mode are not solid shapes. Therefore, they will not be detected.

fn (PhysicsDirectSpaceState2D) intersect_ray #

fn (s &PhysicsDirectSpaceState2D) intersect_ray(parameters PhysicsRayQueryParameters2D) Dictionary

Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters2D]. The returned object is a dictionary with the following fields: collider: The colliding object. collider_id: The colliding object's ID. normal: The object's surface normal at the intersection point, or Vector2(0, 0) if the ray starts inside the shape and [member PhysicsRayQueryParameters2D.hit_from_inside] is true. position: The intersection point. rid: The intersecting object's [RID]. shape: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead.

fn (PhysicsDirectSpaceState2D) intersect_shape #

fn (s &PhysicsDirectSpaceState2D) intersect_shape(parameters PhysicsShapeQueryParameters2D, cfg PhysicsDirectSpaceState2D_intersect_shape_Cfg) Array

Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: collider: The colliding object. collider_id: The colliding object's ID. rid: The intersecting object's [RID]. shape: The shape index of the colliding shape. The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time.

fn (PhysicsDirectSpaceState2D) cast_motion #

fn (s &PhysicsDirectSpaceState2D) cast_motion(parameters PhysicsShapeQueryParameters2D) PackedFloat32Array

Checks how far a [Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters2D] object. Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [1.0, 1.0] will be returned. [b]Note:[/b] Any [Shape2D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [method collide_shape] to determine the [Shape2D]s that the shape is already colliding with.

fn (PhysicsDirectSpaceState2D) collide_shape #

fn (s &PhysicsDirectSpaceState2D) collide_shape(parameters PhysicsShapeQueryParameters2D, cfg PhysicsDirectSpaceState2D_collide_shape_Cfg) Array

Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in [PhysicsShapeQueryParameters2D] object, second one is in the collided shape from the physics space.

fn (PhysicsDirectSpaceState2D) get_rest_info #

fn (s &PhysicsDirectSpaceState2D) get_rest_info(parameters PhysicsShapeQueryParameters2D) Dictionary

Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: collider_id: The colliding object's ID. linear_velocity: The colliding object's velocity [Vector2]. If the object is an [Area2D], the result is (0, 0). normal: The collision normal of the query shape at the intersection point, pointing away from the intersecting object. point: The intersection point. rid: The intersecting object's [RID]. shape: The shape index of the colliding shape. If the shape did not intersect anything, then an empty dictionary is returned instead.

struct PhysicsDirectSpaceState2DExtension #

struct PhysicsDirectSpaceState2DExtension {
	PhysicsDirectSpaceState2D
}

Provides virtual methods that can be overridden to create custom [PhysicsDirectSpaceState2D] implementations.

fn (PhysicsDirectSpaceState2DExtension) to_variant #

fn (s &PhysicsDirectSpaceState2DExtension) to_variant() Variant

fn (PhysicsDirectSpaceState2DExtension) from_variant #

fn (mut s PhysicsDirectSpaceState2DExtension) from_variant(variant &Variant)

fn (PhysicsDirectSpaceState2DExtension) gd_intersect_ray #

fn (s &PhysicsDirectSpaceState2DExtension) gd_intersect_ray(from Vector2, to Vector2, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, hit_from_inside bool, gd_result &PhysicsServer2DExtensionRayResult) bool

fn (PhysicsDirectSpaceState2DExtension) gd_intersect_point #

fn (s &PhysicsDirectSpaceState2DExtension) gd_intersect_point(position Vector2, canvas_instance_id i64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, results &PhysicsServer2DExtensionShapeResult, max_results i64) i64

fn (PhysicsDirectSpaceState2DExtension) gd_intersect_shape #

fn (s &PhysicsDirectSpaceState2DExtension) gd_intersect_shape(shape_rid RID, transform Transform2D, motion Vector2, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, gd_result &PhysicsServer2DExtensionShapeResult, max_results i64) i64

fn (PhysicsDirectSpaceState2DExtension) gd_cast_motion #

fn (s &PhysicsDirectSpaceState2DExtension) gd_cast_motion(shape_rid RID, transform Transform2D, motion Vector2, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, closest_safe &f64, closest_unsafe &f64) bool

fn (PhysicsDirectSpaceState2DExtension) gd_collide_shape #

fn (s &PhysicsDirectSpaceState2DExtension) gd_collide_shape(shape_rid RID, transform Transform2D, motion Vector2, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, results voidptr, max_results i64, result_count &i32) bool

fn (PhysicsDirectSpaceState2DExtension) gd_rest_info #

fn (s &PhysicsDirectSpaceState2DExtension) gd_rest_info(shape_rid RID, transform Transform2D, motion Vector2, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, rest_info &PhysicsServer2DExtensionShapeRestInfo) bool

fn (PhysicsDirectSpaceState2DExtension) is_body_excluded_from_query #

fn (s &PhysicsDirectSpaceState2DExtension) is_body_excluded_from_query(body RID) bool

struct PhysicsDirectSpaceState2D_collide_shape_Cfg #

@[params]
struct PhysicsDirectSpaceState2D_collide_shape_Cfg {
pub:
	max_results i64 = 32
}

Optional parameters for PhysicsDirectSpaceState2D#collide_shape

struct PhysicsDirectSpaceState2D_intersect_point_Cfg #

@[params]
struct PhysicsDirectSpaceState2D_intersect_point_Cfg {
pub:
	max_results i64 = 32
}

Optional parameters for PhysicsDirectSpaceState2D#intersect_point

struct PhysicsDirectSpaceState2D_intersect_shape_Cfg #

@[params]
struct PhysicsDirectSpaceState2D_intersect_shape_Cfg {
pub:
	max_results i64 = 32
}

Optional parameters for PhysicsDirectSpaceState2D#intersect_shape

struct PhysicsDirectSpaceState3D #

struct PhysicsDirectSpaceState3D {
	Object
}

Provides direct access to a physics space in the [PhysicsServer3D].

fn (PhysicsDirectSpaceState3D) to_variant #

fn (s &PhysicsDirectSpaceState3D) to_variant() Variant

fn (PhysicsDirectSpaceState3D) from_variant #

fn (mut s PhysicsDirectSpaceState3D) from_variant(variant &Variant)

fn (PhysicsDirectSpaceState3D) intersect_point #

fn (s &PhysicsDirectSpaceState3D) intersect_point(parameters PhysicsPointQueryParameters3D, cfg PhysicsDirectSpaceState3D_intersect_point_Cfg) Array

Checks whether a point is inside any solid shape. Position and other parameters are defined through [PhysicsPointQueryParameters3D]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: collider: The colliding object. collider_id: The colliding object's ID. rid: The intersecting object's [RID]. shape: The shape index of the colliding shape. The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time.

fn (PhysicsDirectSpaceState3D) intersect_ray #

fn (s &PhysicsDirectSpaceState3D) intersect_ray(parameters PhysicsRayQueryParameters3D) Dictionary

Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters3D]. The returned object is a dictionary with the following fields: collider: The colliding object. collider_id: The colliding object's ID. normal: The object's surface normal at the intersection point, or Vector3(0, 0, 0) if the ray starts inside the shape and [member PhysicsRayQueryParameters3D.hit_from_inside] is true. position: The intersection point. face_index: The face index at the intersection point. [b]Note:[/b] Returns a valid number only if the intersected shape is a [ConcavePolygonShape3D]. Otherwise, -1 is returned. rid: The intersecting object's [RID]. shape: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead.

fn (PhysicsDirectSpaceState3D) intersect_shape #

fn (s &PhysicsDirectSpaceState3D) intersect_shape(parameters PhysicsShapeQueryParameters3D, cfg PhysicsDirectSpaceState3D_intersect_shape_Cfg) Array

Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: collider: The colliding object. collider_id: The colliding object's ID. rid: The intersecting object's [RID]. shape: The shape index of the colliding shape. The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. [b]Note:[/b] This method does not take into account the motion property of the object.

fn (PhysicsDirectSpaceState3D) cast_motion #

fn (s &PhysicsDirectSpaceState3D) cast_motion(parameters PhysicsShapeQueryParameters3D) PackedFloat32Array

Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters3D] object. Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [1.0, 1.0] will be returned. [b]Note:[/b] Any [Shape3D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [method collide_shape] to determine the [Shape3D]s that the shape is already colliding with.

fn (PhysicsDirectSpaceState3D) collide_shape #

fn (s &PhysicsDirectSpaceState3D) collide_shape(parameters PhysicsShapeQueryParameters3D, cfg PhysicsDirectSpaceState3D_collide_shape_Cfg) Array

Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in [PhysicsShapeQueryParameters3D] object, second one is in the collided shape from the physics space. [b]Note:[/b] This method does not take into account the motion property of the object.

fn (PhysicsDirectSpaceState3D) get_rest_info #

fn (s &PhysicsDirectSpaceState3D) get_rest_info(parameters PhysicsShapeQueryParameters3D) Dictionary

Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: collider_id: The colliding object's ID. linear_velocity: The colliding object's velocity [Vector3]. If the object is an [Area3D], the result is (0, 0, 0). normal: The collision normal of the query shape at the intersection point, pointing away from the intersecting object. point: The intersection point. rid: The intersecting object's [RID]. shape: The shape index of the colliding shape. If the shape did not intersect anything, then an empty dictionary is returned instead. [b]Note:[/b] This method does not take into account the motion property of the object.

struct PhysicsDirectSpaceState3DExtension #

struct PhysicsDirectSpaceState3DExtension {
	PhysicsDirectSpaceState3D
}

Provides virtual methods that can be overridden to create custom [PhysicsDirectSpaceState3D] implementations.

fn (PhysicsDirectSpaceState3DExtension) to_variant #

fn (s &PhysicsDirectSpaceState3DExtension) to_variant() Variant

fn (PhysicsDirectSpaceState3DExtension) from_variant #

fn (mut s PhysicsDirectSpaceState3DExtension) from_variant(variant &Variant)

fn (PhysicsDirectSpaceState3DExtension) gd_intersect_ray #

fn (s &PhysicsDirectSpaceState3DExtension) gd_intersect_ray(from Vector3, to Vector3, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, hit_from_inside bool, hit_back_faces bool, pick_ray bool, gd_result &PhysicsServer3DExtensionRayResult) bool

fn (PhysicsDirectSpaceState3DExtension) gd_intersect_point #

fn (s &PhysicsDirectSpaceState3DExtension) gd_intersect_point(position Vector3, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, results &PhysicsServer3DExtensionShapeResult, max_results i64) i64

fn (PhysicsDirectSpaceState3DExtension) gd_intersect_shape #

fn (s &PhysicsDirectSpaceState3DExtension) gd_intersect_shape(shape_rid RID, transform Transform3D, motion Vector3, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, result_count &PhysicsServer3DExtensionShapeResult, max_results i64) i64

fn (PhysicsDirectSpaceState3DExtension) gd_cast_motion #

fn (s &PhysicsDirectSpaceState3DExtension) gd_cast_motion(shape_rid RID, transform Transform3D, motion Vector3, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, closest_safe &f64, closest_unsafe &f64, info &PhysicsServer3DExtensionShapeRestInfo) bool

fn (PhysicsDirectSpaceState3DExtension) gd_collide_shape #

fn (s &PhysicsDirectSpaceState3DExtension) gd_collide_shape(shape_rid RID, transform Transform3D, motion Vector3, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, results voidptr, max_results i64, result_count &i32) bool

fn (PhysicsDirectSpaceState3DExtension) gd_rest_info #

fn (s &PhysicsDirectSpaceState3DExtension) gd_rest_info(shape_rid RID, transform Transform3D, motion Vector3, margin f64, collision_mask i64, collide_with_bodies bool, collide_with_areas bool, rest_info &PhysicsServer3DExtensionShapeRestInfo) bool

fn (PhysicsDirectSpaceState3DExtension) gd_get_closest_point_to_object_volume #

fn (s &PhysicsDirectSpaceState3DExtension) gd_get_closest_point_to_object_volume(object RID, point Vector3) Vector3

fn (PhysicsDirectSpaceState3DExtension) is_body_excluded_from_query #

fn (s &PhysicsDirectSpaceState3DExtension) is_body_excluded_from_query(body RID) bool

struct PhysicsDirectSpaceState3D_collide_shape_Cfg #

@[params]
struct PhysicsDirectSpaceState3D_collide_shape_Cfg {
pub:
	max_results i64 = 32
}

Optional parameters for PhysicsDirectSpaceState3D#collide_shape

struct PhysicsDirectSpaceState3D_intersect_point_Cfg #

@[params]
struct PhysicsDirectSpaceState3D_intersect_point_Cfg {
pub:
	max_results i64 = 32
}

Optional parameters for PhysicsDirectSpaceState3D#intersect_point

struct PhysicsDirectSpaceState3D_intersect_shape_Cfg #

@[params]
struct PhysicsDirectSpaceState3D_intersect_shape_Cfg {
pub:
	max_results i64 = 32
}

Optional parameters for PhysicsDirectSpaceState3D#intersect_shape

struct PhysicsMaterial #

struct PhysicsMaterial {
	Resource
}

Holds physics-related properties of a surface, namely its roughness and bounciness.

fn (PhysicsMaterial) to_variant #

fn (s &PhysicsMaterial) to_variant() Variant

fn (PhysicsMaterial) from_variant #

fn (mut s PhysicsMaterial) from_variant(variant &Variant)

fn (PhysicsMaterial) set_friction #

fn (s &PhysicsMaterial) set_friction(friction f64)

fn (PhysicsMaterial) get_friction #

fn (s &PhysicsMaterial) get_friction() f64

fn (PhysicsMaterial) set_rough #

fn (s &PhysicsMaterial) set_rough(rough bool)

fn (PhysicsMaterial) is_rough #

fn (s &PhysicsMaterial) is_rough() bool

fn (PhysicsMaterial) set_bounce #

fn (s &PhysicsMaterial) set_bounce(bounce f64)

fn (PhysicsMaterial) get_bounce #

fn (s &PhysicsMaterial) get_bounce() f64

fn (PhysicsMaterial) set_absorbent #

fn (s &PhysicsMaterial) set_absorbent(absorbent bool)

fn (PhysicsMaterial) is_absorbent #

fn (s &PhysicsMaterial) is_absorbent() bool

struct PhysicsPointQueryParameters2D #

struct PhysicsPointQueryParameters2D {
	RefCounted
}

Provides parameters for [method PhysicsDirectSpaceState2D.intersect_point].

fn (PhysicsPointQueryParameters2D) to_variant #

fn (s &PhysicsPointQueryParameters2D) to_variant() Variant

fn (PhysicsPointQueryParameters2D) from_variant #

fn (mut s PhysicsPointQueryParameters2D) from_variant(variant &Variant)

fn (PhysicsPointQueryParameters2D) set_position #

fn (s &PhysicsPointQueryParameters2D) set_position(position Vector2)

fn (PhysicsPointQueryParameters2D) get_position #

fn (s &PhysicsPointQueryParameters2D) get_position() Vector2

fn (PhysicsPointQueryParameters2D) set_canvas_instance_id #

fn (s &PhysicsPointQueryParameters2D) set_canvas_instance_id(canvas_instance_id i64)

fn (PhysicsPointQueryParameters2D) get_canvas_instance_id #

fn (s &PhysicsPointQueryParameters2D) get_canvas_instance_id() i64

fn (PhysicsPointQueryParameters2D) set_collision_mask #

fn (s &PhysicsPointQueryParameters2D) set_collision_mask(collision_mask i64)

fn (PhysicsPointQueryParameters2D) get_collision_mask #

fn (s &PhysicsPointQueryParameters2D) get_collision_mask() i64

fn (PhysicsPointQueryParameters2D) set_exclude #

fn (s &PhysicsPointQueryParameters2D) set_exclude(exclude Array)

fn (PhysicsPointQueryParameters2D) get_exclude #

fn (s &PhysicsPointQueryParameters2D) get_exclude() Array

fn (PhysicsPointQueryParameters2D) set_collide_with_bodies #

fn (s &PhysicsPointQueryParameters2D) set_collide_with_bodies(enable bool)

fn (PhysicsPointQueryParameters2D) is_collide_with_bodies_enabled #

fn (s &PhysicsPointQueryParameters2D) is_collide_with_bodies_enabled() bool

fn (PhysicsPointQueryParameters2D) set_collide_with_areas #

fn (s &PhysicsPointQueryParameters2D) set_collide_with_areas(enable bool)

fn (PhysicsPointQueryParameters2D) is_collide_with_areas_enabled #

fn (s &PhysicsPointQueryParameters2D) is_collide_with_areas_enabled() bool

struct PhysicsPointQueryParameters3D #

struct PhysicsPointQueryParameters3D {
	RefCounted
}

Provides parameters for [method PhysicsDirectSpaceState3D.intersect_point].

fn (PhysicsPointQueryParameters3D) to_variant #

fn (s &PhysicsPointQueryParameters3D) to_variant() Variant

fn (PhysicsPointQueryParameters3D) from_variant #

fn (mut s PhysicsPointQueryParameters3D) from_variant(variant &Variant)

fn (PhysicsPointQueryParameters3D) set_position #

fn (s &PhysicsPointQueryParameters3D) set_position(position Vector3)

fn (PhysicsPointQueryParameters3D) get_position #

fn (s &PhysicsPointQueryParameters3D) get_position() Vector3

fn (PhysicsPointQueryParameters3D) set_collision_mask #

fn (s &PhysicsPointQueryParameters3D) set_collision_mask(collision_mask i64)

fn (PhysicsPointQueryParameters3D) get_collision_mask #

fn (s &PhysicsPointQueryParameters3D) get_collision_mask() i64

fn (PhysicsPointQueryParameters3D) set_exclude #

fn (s &PhysicsPointQueryParameters3D) set_exclude(exclude Array)

fn (PhysicsPointQueryParameters3D) get_exclude #

fn (s &PhysicsPointQueryParameters3D) get_exclude() Array

fn (PhysicsPointQueryParameters3D) set_collide_with_bodies #

fn (s &PhysicsPointQueryParameters3D) set_collide_with_bodies(enable bool)

fn (PhysicsPointQueryParameters3D) is_collide_with_bodies_enabled #

fn (s &PhysicsPointQueryParameters3D) is_collide_with_bodies_enabled() bool

fn (PhysicsPointQueryParameters3D) set_collide_with_areas #

fn (s &PhysicsPointQueryParameters3D) set_collide_with_areas(enable bool)

fn (PhysicsPointQueryParameters3D) is_collide_with_areas_enabled #

fn (s &PhysicsPointQueryParameters3D) is_collide_with_areas_enabled() bool

struct PhysicsRayQueryParameters2D #

struct PhysicsRayQueryParameters2D {
	RefCounted
}

Provides parameters for [method PhysicsDirectSpaceState2D.intersect_ray].

fn (PhysicsRayQueryParameters2D) to_variant #

fn (s &PhysicsRayQueryParameters2D) to_variant() Variant

fn (PhysicsRayQueryParameters2D) from_variant #

fn (mut s PhysicsRayQueryParameters2D) from_variant(variant &Variant)

fn (PhysicsRayQueryParameters2D) set_from #

fn (s &PhysicsRayQueryParameters2D) set_from(from Vector2)

fn (PhysicsRayQueryParameters2D) get_from #

fn (s &PhysicsRayQueryParameters2D) get_from() Vector2

fn (PhysicsRayQueryParameters2D) set_to #

fn (s &PhysicsRayQueryParameters2D) set_to(to Vector2)

fn (PhysicsRayQueryParameters2D) get_to #

fn (s &PhysicsRayQueryParameters2D) get_to() Vector2

fn (PhysicsRayQueryParameters2D) set_collision_mask #

fn (s &PhysicsRayQueryParameters2D) set_collision_mask(collision_mask i64)

fn (PhysicsRayQueryParameters2D) get_collision_mask #

fn (s &PhysicsRayQueryParameters2D) get_collision_mask() i64

fn (PhysicsRayQueryParameters2D) set_exclude #

fn (s &PhysicsRayQueryParameters2D) set_exclude(exclude Array)

fn (PhysicsRayQueryParameters2D) get_exclude #

fn (s &PhysicsRayQueryParameters2D) get_exclude() Array

fn (PhysicsRayQueryParameters2D) set_collide_with_bodies #

fn (s &PhysicsRayQueryParameters2D) set_collide_with_bodies(enable bool)

fn (PhysicsRayQueryParameters2D) is_collide_with_bodies_enabled #

fn (s &PhysicsRayQueryParameters2D) is_collide_with_bodies_enabled() bool

fn (PhysicsRayQueryParameters2D) set_collide_with_areas #

fn (s &PhysicsRayQueryParameters2D) set_collide_with_areas(enable bool)

fn (PhysicsRayQueryParameters2D) is_collide_with_areas_enabled #

fn (s &PhysicsRayQueryParameters2D) is_collide_with_areas_enabled() bool

fn (PhysicsRayQueryParameters2D) set_hit_from_inside #

fn (s &PhysicsRayQueryParameters2D) set_hit_from_inside(enable bool)

fn (PhysicsRayQueryParameters2D) is_hit_from_inside_enabled #

fn (s &PhysicsRayQueryParameters2D) is_hit_from_inside_enabled() bool

struct PhysicsRayQueryParameters2D_create_Cfg #

@[params]
struct PhysicsRayQueryParameters2D_create_Cfg {
pub:
	collision_mask i64 = 4294967295
	exclude        Array
}

Optional parameters for PhysicsRayQueryParameters2D#create

struct PhysicsRayQueryParameters3D #

struct PhysicsRayQueryParameters3D {
	RefCounted
}

Provides parameters for [method PhysicsDirectSpaceState3D.intersect_ray].

fn (PhysicsRayQueryParameters3D) to_variant #

fn (s &PhysicsRayQueryParameters3D) to_variant() Variant

fn (PhysicsRayQueryParameters3D) from_variant #

fn (mut s PhysicsRayQueryParameters3D) from_variant(variant &Variant)

fn (PhysicsRayQueryParameters3D) set_from #

fn (s &PhysicsRayQueryParameters3D) set_from(from Vector3)

fn (PhysicsRayQueryParameters3D) get_from #

fn (s &PhysicsRayQueryParameters3D) get_from() Vector3

fn (PhysicsRayQueryParameters3D) set_to #

fn (s &PhysicsRayQueryParameters3D) set_to(to Vector3)

fn (PhysicsRayQueryParameters3D) get_to #

fn (s &PhysicsRayQueryParameters3D) get_to() Vector3

fn (PhysicsRayQueryParameters3D) set_collision_mask #

fn (s &PhysicsRayQueryParameters3D) set_collision_mask(collision_mask i64)

fn (PhysicsRayQueryParameters3D) get_collision_mask #

fn (s &PhysicsRayQueryParameters3D) get_collision_mask() i64

fn (PhysicsRayQueryParameters3D) set_exclude #

fn (s &PhysicsRayQueryParameters3D) set_exclude(exclude Array)

fn (PhysicsRayQueryParameters3D) get_exclude #

fn (s &PhysicsRayQueryParameters3D) get_exclude() Array

fn (PhysicsRayQueryParameters3D) set_collide_with_bodies #

fn (s &PhysicsRayQueryParameters3D) set_collide_with_bodies(enable bool)

fn (PhysicsRayQueryParameters3D) is_collide_with_bodies_enabled #

fn (s &PhysicsRayQueryParameters3D) is_collide_with_bodies_enabled() bool

fn (PhysicsRayQueryParameters3D) set_collide_with_areas #

fn (s &PhysicsRayQueryParameters3D) set_collide_with_areas(enable bool)

fn (PhysicsRayQueryParameters3D) is_collide_with_areas_enabled #

fn (s &PhysicsRayQueryParameters3D) is_collide_with_areas_enabled() bool

fn (PhysicsRayQueryParameters3D) set_hit_from_inside #

fn (s &PhysicsRayQueryParameters3D) set_hit_from_inside(enable bool)

fn (PhysicsRayQueryParameters3D) is_hit_from_inside_enabled #

fn (s &PhysicsRayQueryParameters3D) is_hit_from_inside_enabled() bool

fn (PhysicsRayQueryParameters3D) set_hit_back_faces #

fn (s &PhysicsRayQueryParameters3D) set_hit_back_faces(enable bool)

fn (PhysicsRayQueryParameters3D) is_hit_back_faces_enabled #

fn (s &PhysicsRayQueryParameters3D) is_hit_back_faces_enabled() bool

struct PhysicsRayQueryParameters3D_create_Cfg #

@[params]
struct PhysicsRayQueryParameters3D_create_Cfg {
pub:
	collision_mask i64 = 4294967295
	exclude        Array
}

Optional parameters for PhysicsRayQueryParameters3D#create

struct PhysicsServer2D #

struct PhysicsServer2D {
	Object
}

A server interface for low-level 2D physics access.

fn (PhysicsServer2D) to_variant #

fn (s &PhysicsServer2D) to_variant() Variant

fn (PhysicsServer2D) from_variant #

fn (mut s PhysicsServer2D) from_variant(variant &Variant)

fn (PhysicsServer2D) world_boundary_shape_create #

fn (s &PhysicsServer2D) world_boundary_shape_create() RID

Creates a 2D world boundary shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the shape's normal direction and distance properties.

fn (PhysicsServer2D) separation_ray_shape_create #

fn (s &PhysicsServer2D) separation_ray_shape_create() RID

Creates a 2D separation ray shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the shape's length and slide_on_slope properties.

fn (PhysicsServer2D) segment_shape_create #

fn (s &PhysicsServer2D) segment_shape_create() RID

Creates a 2D segment shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the segment's start and end points.

fn (PhysicsServer2D) circle_shape_create #

fn (s &PhysicsServer2D) circle_shape_create() RID

Creates a 2D circle shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the circle's radius.

fn (PhysicsServer2D) rectangle_shape_create #

fn (s &PhysicsServer2D) rectangle_shape_create() RID

Creates a 2D rectangle shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the rectangle's half-extents.

fn (PhysicsServer2D) capsule_shape_create #

fn (s &PhysicsServer2D) capsule_shape_create() RID

Creates a 2D capsule shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the capsule's height and radius.

fn (PhysicsServer2D) convex_polygon_shape_create #

fn (s &PhysicsServer2D) convex_polygon_shape_create() RID

Creates a 2D convex polygon shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the convex polygon's points.

fn (PhysicsServer2D) concave_polygon_shape_create #

fn (s &PhysicsServer2D) concave_polygon_shape_create() RID

Creates a 2D concave polygon shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the concave polygon's segments.

fn (PhysicsServer2D) shape_set_data #

fn (s &PhysicsServer2D) shape_set_data(shape RID, data_ ToVariant)

Sets the shape data that defines the configuration of the shape. The [param data] to be passed depends on the shape's type (see [method shape_get_type]):- [constant SHAPE_WORLD_BOUNDARY]: an array of length two containing a [Vector2] normal direction and a [float] distance d,

  • [constant SHAPE_SEPARATION_RAY]: a dictionary containing the key length with a [float] value and the key slide_on_slope with a [bool] value,
  • [constant SHAPE_SEGMENT]: a [Rect2] rect containing the first point of the segment in rect.position and the second point of the segment in rect.size,
  • [constant SHAPE_CIRCLE]: a [float] radius,
  • [constant SHAPE_RECTANGLE]: a [Vector2] half_extents,
  • [constant SHAPE_CAPSULE]: an array of length two (or a [Vector2]) containing a [float] height and a [float] radius,
  • [constant SHAPE_CONVEX_POLYGON]: either a [PackedVector2Array] of points defining a convex polygon in counterclockwise order (the clockwise outward normal of each segment formed by consecutive points is calculated internally), or a [PackedFloat32Array] of length divisible by four so that every 4-tuple of [float]s contains the coordinates of a point followed by the coordinates of the clockwise outward normal vector to the segment between the current point and the next point,
  • [constant SHAPE_CONCAVE_POLYGON]: a [PackedVector2Array] of length divisible by two (each pair of points forms one segment).[b]Warning:[/b] In the case of [constant SHAPE_CONVEX_POLYGON], this method does not check if the points supplied actually form a convex polygon (unlike the [member CollisionPolygon2D.polygon] property).

fn (PhysicsServer2D) shape_get_type #

fn (s &PhysicsServer2D) shape_get_type(shape RID) PhysicsServer2DShapeType

Returns the shape's type.

fn (PhysicsServer2D) shape_get_data #

fn (s &PhysicsServer2D) shape_get_data(shape RID) Variant

Returns the shape data that defines the configuration of the shape, such as the half-extents of a rectangle or the segments of a concave shape. See [method shape_set_data] for the precise format of this data in each case.

fn (PhysicsServer2D) space_create #

fn (s &PhysicsServer2D) space_create() RID

Creates a 2D space in the physics server, and returns the [RID] that identifies it. A space contains bodies and areas, and controls the stepping of the physics simulation of the objects in it.

fn (PhysicsServer2D) space_set_active #

fn (s &PhysicsServer2D) space_set_active(space RID, active bool)

Activates or deactivates the space. If [param active] is false, then the physics server will not do anything with this space in its physics step.

fn (PhysicsServer2D) space_is_active #

fn (s &PhysicsServer2D) space_is_active(space RID) bool

Returns true if the space is active.

fn (PhysicsServer2D) space_set_param #

fn (s &PhysicsServer2D) space_set_param(space RID, param PhysicsServer2DSpaceParameter, value f64)

Sets the value of the given space parameter.

fn (PhysicsServer2D) space_get_param #

fn (s &PhysicsServer2D) space_get_param(space RID, param PhysicsServer2DSpaceParameter) f64

Returns the value of the given space parameter.

fn (PhysicsServer2D) space_get_direct_state #

fn (s &PhysicsServer2D) space_get_direct_state(space RID) PhysicsDirectSpaceState2D

Returns the state of a space, a [PhysicsDirectSpaceState2D]. This object can be used for collision/intersection queries.

fn (PhysicsServer2D) area_create #

fn (s &PhysicsServer2D) area_create() RID

Creates a 2D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to 1, and monitorable set to false. Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable].

fn (PhysicsServer2D) area_set_space #

fn (s &PhysicsServer2D) area_set_space(area RID, space RID)

Adds the area to the given space, after removing the area from the previously assigned space (if any). [b]Note:[/b] To remove an area from a space without immediately adding it back elsewhere, use PhysicsServer2D.area_set_space(area, RID()).

fn (PhysicsServer2D) area_get_space #

fn (s &PhysicsServer2D) area_get_space(area RID) RID

Returns the [RID] of the space assigned to the area. Returns an empty [RID] if no space is assigned.

fn (PhysicsServer2D) area_add_shape #

fn (s &PhysicsServer2D) area_add_shape(area RID, shape RID, cfg PhysicsServer2D_area_add_shape_Cfg)

Adds a shape to the area, with the given local transform. The shape (together with its [param transform] and [param disabled] properties) is added to an array of shapes, and the shapes of an area are usually referenced by their index in this array.

fn (PhysicsServer2D) area_set_shape #

fn (s &PhysicsServer2D) area_set_shape(area RID, shape_idx i64, shape RID)

Replaces the area's shape at the given index by another shape, while not affecting the transform and disabled properties at the same index.

fn (PhysicsServer2D) area_set_shape_transform #

fn (s &PhysicsServer2D) area_set_shape_transform(area RID, shape_idx i64, transform Transform2D)

Sets the local transform matrix of the area's shape with the given index.

fn (PhysicsServer2D) area_set_shape_disabled #

fn (s &PhysicsServer2D) area_set_shape_disabled(area RID, shape_idx i64, disabled bool)

Sets the disabled property of the area's shape with the given index. If [param disabled] is true, then the shape will not detect any other shapes entering or exiting it.

fn (PhysicsServer2D) area_get_shape_count #

fn (s &PhysicsServer2D) area_get_shape_count(area RID) i64

Returns the number of shapes added to the area.

fn (PhysicsServer2D) area_get_shape #

fn (s &PhysicsServer2D) area_get_shape(area RID, shape_idx i64) RID

Returns the [RID] of the shape with the given index in the area's array of shapes.

fn (PhysicsServer2D) area_get_shape_transform #

fn (s &PhysicsServer2D) area_get_shape_transform(area RID, shape_idx i64) Transform2D

Returns the local transform matrix of the shape with the given index in the area's array of shapes.

fn (PhysicsServer2D) area_remove_shape #

fn (s &PhysicsServer2D) area_remove_shape(area RID, shape_idx i64)

Removes the shape with the given index from the area's array of shapes. The shape itself is not deleted, so it can continue to be used elsewhere or added back later. As a result of this operation, the area's shapes which used to have indices higher than [param shape_idx] will have their index decreased by one.

fn (PhysicsServer2D) area_clear_shapes #

fn (s &PhysicsServer2D) area_clear_shapes(area RID)

Removes all shapes from the area. This does not delete the shapes themselves, so they can continue to be used elsewhere or added back later.

fn (PhysicsServer2D) area_set_collision_layer #

fn (s &PhysicsServer2D) area_set_collision_layer(area RID, layer i64)

Assigns the area to one or many physics layers, via a bitmask.

fn (PhysicsServer2D) area_get_collision_layer #

fn (s &PhysicsServer2D) area_get_collision_layer(area RID) i64

Returns the physics layer or layers the area belongs to, as a bitmask.

fn (PhysicsServer2D) area_set_collision_mask #

fn (s &PhysicsServer2D) area_set_collision_mask(area RID, mask i64)

Sets which physics layers the area will monitor, via a bitmask.

fn (PhysicsServer2D) area_get_collision_mask #

fn (s &PhysicsServer2D) area_get_collision_mask(area RID) i64

Returns the physics layer or layers the area can contact with, as a bitmask.

fn (PhysicsServer2D) area_set_param #

fn (s &PhysicsServer2D) area_set_param(area RID, param PhysicsServer2DAreaParameter, value_ ToVariant)

Sets the value of the given area parameter.

fn (PhysicsServer2D) area_set_transform #

fn (s &PhysicsServer2D) area_set_transform(area RID, transform Transform2D)

Sets the transform matrix of the area.

fn (PhysicsServer2D) area_get_param #

fn (s &PhysicsServer2D) area_get_param(area RID, param PhysicsServer2DAreaParameter) Variant

Returns the value of the given area parameter.

fn (PhysicsServer2D) area_get_transform #

fn (s &PhysicsServer2D) area_get_transform(area RID) Transform2D

Returns the transform matrix of the area.

fn (PhysicsServer2D) area_attach_object_instance_id #

fn (s &PhysicsServer2D) area_attach_object_instance_id(area RID, id i64)

Attaches the ObjectID of an [Object] to the area. Use [method Object.get_instance_id] to get the ObjectID of a [CollisionObject2D].

fn (PhysicsServer2D) area_get_object_instance_id #

fn (s &PhysicsServer2D) area_get_object_instance_id(area RID) i64

Returns the ObjectID attached to the area. Use [method @GlobalScope.instance_from_id] to retrieve an [Object] from a nonzero ObjectID.

fn (PhysicsServer2D) area_attach_canvas_instance_id #

fn (s &PhysicsServer2D) area_attach_canvas_instance_id(area RID, id i64)

Attaches the ObjectID of a canvas to the area. Use [method Object.get_instance_id] to get the ObjectID of a [CanvasLayer].

fn (PhysicsServer2D) area_get_canvas_instance_id #

fn (s &PhysicsServer2D) area_get_canvas_instance_id(area RID) i64

Returns the ObjectID of the canvas attached to the area. Use [method @GlobalScope.instance_from_id] to retrieve a [CanvasLayer] from a nonzero ObjectID.

fn (PhysicsServer2D) area_set_monitor_callback #

fn (s &PhysicsServer2D) area_set_monitor_callback(area RID, callback Callable)

Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters:1. an integer status: either [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED] depending on whether the other body shape entered or exited the area,2. an [RID] body_rid: the [RID] of the body that entered or exited the area,3. an integer instance_id: the ObjectID attached to the body,4. an integer body_shape_idx: the index of the shape of the body that entered or exited the area,5. an integer self_shape_idx: the index of the shape of the area where the body entered or exited.By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time.

fn (PhysicsServer2D) area_set_area_monitor_callback #

fn (s &PhysicsServer2D) area_set_area_monitor_callback(area RID, callback Callable)

Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters:1. an integer status: either [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED] depending on whether the other area's shape entered or exited the area,2. an [RID] area_rid: the [RID] of the other area that entered or exited the area,3. an integer instance_id: the ObjectID attached to the other area,4. an integer area_shape_idx: the index of the shape of the other area that entered or exited the area,5. an integer self_shape_idx: the index of the shape of the area where the other area entered or exited.By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time.

fn (PhysicsServer2D) area_set_monitorable #

fn (s &PhysicsServer2D) area_set_monitorable(area RID, monitorable bool)

Sets whether the area is monitorable or not. If [param monitorable] is true, the area monitoring callback of other areas will be called when this area enters or exits them.

fn (PhysicsServer2D) body_create #

fn (s &PhysicsServer2D) body_create() RID

Creates a 2D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to 1, and body mode set to [constant BODY_MODE_RIGID]. Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space.

fn (PhysicsServer2D) body_set_space #

fn (s &PhysicsServer2D) body_set_space(body RID, space RID)

Adds the body to the given space, after removing the body from the previously assigned space (if any). If the body's mode is set to [constant BODY_MODE_RIGID], then adding the body to a space will have the following additional effects:- If the parameter [constant BODY_PARAM_CENTER_OF_MASS] has never been set explicitly, then the value of that parameter will be recalculated based on the body's shapes.

  • If the parameter [constant BODY_PARAM_INERTIA] is set to a value <= 0.0, then the value of that parameter will be recalculated based on the body's shapes, mass, and center of mass.[b]Note:[/b] To remove a body from a space without immediately adding it back elsewhere, use PhysicsServer2D.body_set_space(body, RID()).

fn (PhysicsServer2D) body_get_space #

fn (s &PhysicsServer2D) body_get_space(body RID) RID

Returns the [RID] of the space assigned to the body. Returns an empty [RID] if no space is assigned.

fn (PhysicsServer2D) body_set_mode #

fn (s &PhysicsServer2D) body_set_mode(body RID, mode PhysicsServer2DBodyMode)

Sets the body's mode.

fn (PhysicsServer2D) body_get_mode #

fn (s &PhysicsServer2D) body_get_mode(body RID) PhysicsServer2DBodyMode

Returns the body's mode.

fn (PhysicsServer2D) body_add_shape #

fn (s &PhysicsServer2D) body_add_shape(body RID, shape RID, cfg PhysicsServer2D_body_add_shape_Cfg)

Adds a shape to the area, with the given local transform. The shape (together with its [param transform] and [param disabled] properties) is added to an array of shapes, and the shapes of a body are usually referenced by their index in this array.

fn (PhysicsServer2D) body_set_shape #

fn (s &PhysicsServer2D) body_set_shape(body RID, shape_idx i64, shape RID)

Replaces the body's shape at the given index by another shape, while not affecting the transform, disabled, and one-way collision properties at the same index.

fn (PhysicsServer2D) body_set_shape_transform #

fn (s &PhysicsServer2D) body_set_shape_transform(body RID, shape_idx i64, transform Transform2D)

Sets the local transform matrix of the body's shape with the given index.

fn (PhysicsServer2D) body_get_shape_count #

fn (s &PhysicsServer2D) body_get_shape_count(body RID) i64

Returns the number of shapes added to the body.

fn (PhysicsServer2D) body_get_shape #

fn (s &PhysicsServer2D) body_get_shape(body RID, shape_idx i64) RID

Returns the [RID] of the shape with the given index in the body's array of shapes.

fn (PhysicsServer2D) body_get_shape_transform #

fn (s &PhysicsServer2D) body_get_shape_transform(body RID, shape_idx i64) Transform2D

Returns the local transform matrix of the shape with the given index in the area's array of shapes.

fn (PhysicsServer2D) body_remove_shape #

fn (s &PhysicsServer2D) body_remove_shape(body RID, shape_idx i64)

Removes the shape with the given index from the body's array of shapes. The shape itself is not deleted, so it can continue to be used elsewhere or added back later. As a result of this operation, the body's shapes which used to have indices higher than [param shape_idx] will have their index decreased by one.

fn (PhysicsServer2D) body_clear_shapes #

fn (s &PhysicsServer2D) body_clear_shapes(body RID)

Removes all shapes from the body. This does not delete the shapes themselves, so they can continue to be used elsewhere or added back later.

fn (PhysicsServer2D) body_set_shape_disabled #

fn (s &PhysicsServer2D) body_set_shape_disabled(body RID, shape_idx i64, disabled bool)

Sets the disabled property of the body's shape with the given index. If [param disabled] is true, then the shape will be ignored in all collision detection.

fn (PhysicsServer2D) body_set_shape_as_one_way_collision #

fn (s &PhysicsServer2D) body_set_shape_as_one_way_collision(body RID, shape_idx i64, enable bool, margin f64)

Sets the one-way collision properties of the body's shape with the given index. If [param enable] is true, the one-way collision direction given by the shape's local upward axis body_get_shape_transform(body, shape_idx).y will be used to ignore collisions with the shape in the opposite direction, and to ensure depenetration of kinematic bodies happens in this direction.

fn (PhysicsServer2D) body_attach_object_instance_id #

fn (s &PhysicsServer2D) body_attach_object_instance_id(body RID, id i64)

Attaches the ObjectID of an [Object] to the body. Use [method Object.get_instance_id] to get the ObjectID of a [CollisionObject2D].

fn (PhysicsServer2D) body_get_object_instance_id #

fn (s &PhysicsServer2D) body_get_object_instance_id(body RID) i64

Returns the ObjectID attached to the body. Use [method @GlobalScope.instance_from_id] to retrieve an [Object] from a nonzero ObjectID.

fn (PhysicsServer2D) body_attach_canvas_instance_id #

fn (s &PhysicsServer2D) body_attach_canvas_instance_id(body RID, id i64)

Attaches the ObjectID of a canvas to the body. Use [method Object.get_instance_id] to get the ObjectID of a [CanvasLayer].

fn (PhysicsServer2D) body_get_canvas_instance_id #

fn (s &PhysicsServer2D) body_get_canvas_instance_id(body RID) i64

Returns the ObjectID of the canvas attached to the body. Use [method @GlobalScope.instance_from_id] to retrieve a [CanvasLayer] from a nonzero ObjectID.

fn (PhysicsServer2D) body_set_continuous_collision_detection_mode #

fn (s &PhysicsServer2D) body_set_continuous_collision_detection_mode(body RID, mode PhysicsServer2DCCDMode)

Sets the continuous collision detection mode. Continuous collision detection tries to predict where a moving body would collide in between physics updates, instead of moving it and correcting its movement if it collided.

fn (PhysicsServer2D) body_get_continuous_collision_detection_mode #

fn (s &PhysicsServer2D) body_get_continuous_collision_detection_mode(body RID) PhysicsServer2DCCDMode

Returns the body's continuous collision detection mode.

fn (PhysicsServer2D) body_set_collision_layer #

fn (s &PhysicsServer2D) body_set_collision_layer(body RID, layer i64)

Sets the physics layer or layers the body belongs to, via a bitmask.

fn (PhysicsServer2D) body_get_collision_layer #

fn (s &PhysicsServer2D) body_get_collision_layer(body RID) i64

Returns the physics layer or layers the body belongs to, as a bitmask.

fn (PhysicsServer2D) body_set_collision_mask #

fn (s &PhysicsServer2D) body_set_collision_mask(body RID, mask i64)

Sets the physics layer or layers the body can collide with, via a bitmask.

fn (PhysicsServer2D) body_get_collision_mask #

fn (s &PhysicsServer2D) body_get_collision_mask(body RID) i64

Returns the physics layer or layers the body can collide with, as a bitmask.

fn (PhysicsServer2D) body_set_collision_priority #

fn (s &PhysicsServer2D) body_set_collision_priority(body RID, priority f64)

Sets the body's collision priority. This is used in the depenetration phase of [method body_test_motion]. The higher the priority is, the lower the penetration into the body will be.

fn (PhysicsServer2D) body_get_collision_priority #

fn (s &PhysicsServer2D) body_get_collision_priority(body RID) f64

Returns the body's collision priority. This is used in the depenetration phase of [method body_test_motion]. The higher the priority is, the lower the penetration into the body will be.

fn (PhysicsServer2D) body_set_param #

fn (s &PhysicsServer2D) body_set_param(body RID, param PhysicsServer2DBodyParameter, value_ ToVariant)

Sets the value of the given body parameter.

fn (PhysicsServer2D) body_get_param #

fn (s &PhysicsServer2D) body_get_param(body RID, param PhysicsServer2DBodyParameter) Variant

Returns the value of the given body parameter.

fn (PhysicsServer2D) body_reset_mass_properties #

fn (s &PhysicsServer2D) body_reset_mass_properties(body RID)

Restores the default inertia and center of mass of the body based on its shapes. This undoes any custom values previously set using [method body_set_param].

fn (PhysicsServer2D) body_set_state #

fn (s &PhysicsServer2D) body_set_state(body RID, state PhysicsServer2DBodyState, value_ ToVariant)

Sets the value of a body's state. [b]Note:[/b] The state change doesn't take effect immediately. The state will change on the next physics frame.

fn (PhysicsServer2D) body_get_state #

fn (s &PhysicsServer2D) body_get_state(body RID, state PhysicsServer2DBodyState) Variant

Returns the value of the given state of the body.

fn (PhysicsServer2D) body_apply_central_impulse #

fn (s &PhysicsServer2D) body_apply_central_impulse(body RID, impulse Vector2)

Applies a directional impulse to the body, at the body's center of mass. The impulse does not affect rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). This is equivalent to using [method body_apply_impulse] at the body's center of mass.

fn (PhysicsServer2D) body_apply_torque_impulse #

fn (s &PhysicsServer2D) body_apply_torque_impulse(body RID, impulse f64)

Applies a rotational impulse to the body. The impulse does not affect position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).

fn (PhysicsServer2D) body_apply_impulse #

fn (s &PhysicsServer2D) body_apply_impulse(body RID, impulse Vector2, cfg PhysicsServer2D_body_apply_impulse_Cfg)

Applies a positioned impulse to the body. The impulse can affect rotation if [param position] is different from the body's center of mass. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [param position] is the offset from the body origin in global coordinates.

fn (PhysicsServer2D) body_apply_central_force #

fn (s &PhysicsServer2D) body_apply_central_force(body RID, force Vector2)

Applies a directional force to the body, at the body's center of mass. The force does not affect rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using [method body_apply_force] at the body's center of mass.

fn (PhysicsServer2D) body_apply_force #

fn (s &PhysicsServer2D) body_apply_force(body RID, force Vector2, cfg PhysicsServer2D_body_apply_force_Cfg)

Applies a positioned force to the body. The force can affect rotation if [param position] is different from the body's center of mass. A force is time dependent and meant to be applied every physics update. [param position] is the offset from the body origin in global coordinates.

fn (PhysicsServer2D) body_apply_torque #

fn (s &PhysicsServer2D) body_apply_torque(body RID, torque f64)

Applies a rotational force to the body. The force does not affect position. A force is time dependent and meant to be applied every physics update.

fn (PhysicsServer2D) body_add_constant_central_force #

fn (s &PhysicsServer2D) body_add_constant_central_force(body RID, force Vector2)

Adds a constant directional force to the body. The force does not affect rotation. The force remains applied over time until cleared with PhysicsServer2D.body_set_constant_force(body, Vector2(0, 0)). This is equivalent to using [method body_add_constant_force] at the body's center of mass.

fn (PhysicsServer2D) body_add_constant_force #

fn (s &PhysicsServer2D) body_add_constant_force(body RID, force Vector2, cfg PhysicsServer2D_body_add_constant_force_Cfg)

Adds a constant positioned force to the body. The force can affect rotation if [param position] is different from the body's center of mass. The force remains applied over time until cleared with PhysicsServer2D.body_set_constant_force(body, Vector2(0, 0)). [param position] is the offset from the body origin in global coordinates.

fn (PhysicsServer2D) body_add_constant_torque #

fn (s &PhysicsServer2D) body_add_constant_torque(body RID, torque f64)

Adds a constant rotational force to the body. The force does not affect position. The force remains applied over time until cleared with PhysicsServer2D.body_set_constant_torque(body, 0).

fn (PhysicsServer2D) body_set_constant_force #

fn (s &PhysicsServer2D) body_set_constant_force(body RID, force Vector2)

Sets the body's total constant positional force applied during each physics update. See [method body_add_constant_force] and [method body_add_constant_central_force].

fn (PhysicsServer2D) body_get_constant_force #

fn (s &PhysicsServer2D) body_get_constant_force(body RID) Vector2

Returns the body's total constant positional force applied during each physics update. See [method body_add_constant_force] and [method body_add_constant_central_force].

fn (PhysicsServer2D) body_set_constant_torque #

fn (s &PhysicsServer2D) body_set_constant_torque(body RID, torque f64)

Sets the body's total constant rotational force applied during each physics update. See [method body_add_constant_torque].

fn (PhysicsServer2D) body_get_constant_torque #

fn (s &PhysicsServer2D) body_get_constant_torque(body RID) f64

Returns the body's total constant rotational force applied during each physics update. See [method body_add_constant_torque].

fn (PhysicsServer2D) body_set_axis_velocity #

fn (s &PhysicsServer2D) body_set_axis_velocity(body RID, axis_velocity Vector2)

Modifies the body's linear velocity so that its projection to the axis axis_velocity.normalized() is exactly axis_velocity.length(). This is useful for jumping behavior.

fn (PhysicsServer2D) body_add_collision_exception #

fn (s &PhysicsServer2D) body_add_collision_exception(body RID, excepted_body RID)

Adds [param excepted_body] to the body's list of collision exceptions, so that collisions with it are ignored.

fn (PhysicsServer2D) body_remove_collision_exception #

fn (s &PhysicsServer2D) body_remove_collision_exception(body RID, excepted_body RID)

Removes [param excepted_body] from the body's list of collision exceptions, so that collisions with it are no longer ignored.

fn (PhysicsServer2D) body_set_max_contacts_reported #

fn (s &PhysicsServer2D) body_set_max_contacts_reported(body RID, amount i64)

Sets the maximum number of contacts that the body can report. If [param amount] is greater than zero, then the body will keep track of at most this many contacts with other bodies.

fn (PhysicsServer2D) body_get_max_contacts_reported #

fn (s &PhysicsServer2D) body_get_max_contacts_reported(body RID) i64

Returns the maximum number of contacts that the body can report. See [method body_set_max_contacts_reported].

fn (PhysicsServer2D) body_set_omit_force_integration #

fn (s &PhysicsServer2D) body_set_omit_force_integration(body RID, enable bool)

Sets whether the body omits the standard force integration. If [param enable] is true, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, [method body_set_force_integration_callback] can be used to manually update the linear and angular velocity instead. This method is called when the property [member RigidBody2D.custom_integrator] is set.

fn (PhysicsServer2D) body_is_omitting_force_integration #

fn (s &PhysicsServer2D) body_is_omitting_force_integration(body RID) bool

Returns true if the body is omitting the standard force integration. See [method body_set_omit_force_integration].

fn (PhysicsServer2D) body_set_state_sync_callback #

fn (s &PhysicsServer2D) body_set_state_sync_callback(body RID, callable Callable)

Sets the body's state synchronization callback function to [param callable]. Use an empty [Callable] ([code skip-lint]Callable()) to clear the callback. The function [param callable] will be called every physics frame, assuming that the body was active during the previous physics tick, and can be used to fetch the latest state from the physics server. The function [param callable] must take the following parameters:1. state`: a [PhysicsDirectBodyState2D], used to retrieve the body's state.

fn (PhysicsServer2D) body_set_force_integration_callback #

fn (s &PhysicsServer2D) body_set_force_integration_callback(body RID, callable Callable, cfg PhysicsServer2D_body_set_force_integration_callback_Cfg)

Sets the body's custom force integration callback function to [param callable]. Use an empty [Callable] ([code skip-lint]Callable()) to clear the custom callback. The function [param callable] will be called every physics tick, before the standard force integration (see [method body_set_omit_force_integration]). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. If [param userdata] is not null, the function [param callable] must take the following two parameters:1. state: a [PhysicsDirectBodyState2D] used to retrieve and modify the body's state, 2. [code skip-lint]userdata: a [Variant]; its value will be the [param userdata] passed into this method.If [param userdata] is null, then [param callable] must take only the state parameter.

fn (PhysicsServer2D) body_test_motion #

fn (s &PhysicsServer2D) body_test_motion(body RID, parameters PhysicsTestMotionParameters2D, cfg PhysicsServer2D_body_test_motion_Cfg) bool

Returns true if a collision would result from moving the body along a motion vector from a given point in space. See [PhysicsTestMotionParameters2D] for the available motion parameters. Optionally a [PhysicsTestMotionResult2D] object can be passed, which will be used to store the information about the resulting collision.

fn (PhysicsServer2D) body_get_direct_state #

fn (s &PhysicsServer2D) body_get_direct_state(body RID) PhysicsDirectBodyState2D

Returns the [PhysicsDirectBodyState2D] of the body. Returns null if the body is destroyed or not assigned to a space.

fn (PhysicsServer2D) joint_create #

fn (s &PhysicsServer2D) joint_create() RID

Creates a 2D joint in the physics server, and returns the [RID] that identifies it. To set the joint type, use [method joint_make_damped_spring], [method joint_make_groove] or [method joint_make_pin]. Use [method joint_set_param] to set generic joint parameters.

fn (PhysicsServer2D) joint_clear #

fn (s &PhysicsServer2D) joint_clear(joint RID)

Destroys the joint with the given [RID], creates a new uninitialized joint, and makes the [RID] refer to this new joint.

fn (PhysicsServer2D) joint_set_param #

fn (s &PhysicsServer2D) joint_set_param(joint RID, param PhysicsServer2DJointParam, value f64)

Sets the value of the given joint parameter.

fn (PhysicsServer2D) joint_get_param #

fn (s &PhysicsServer2D) joint_get_param(joint RID, param PhysicsServer2DJointParam) f64

Returns the value of the given joint parameter.

fn (PhysicsServer2D) joint_disable_collisions_between_bodies #

fn (s &PhysicsServer2D) joint_disable_collisions_between_bodies(joint RID, disable bool)

Sets whether the bodies attached to the [Joint2D] will collide with each other.

fn (PhysicsServer2D) joint_is_disabled_collisions_between_bodies #

fn (s &PhysicsServer2D) joint_is_disabled_collisions_between_bodies(joint RID) bool

Returns whether the bodies attached to the [Joint2D] will collide with each other.

fn (PhysicsServer2D) joint_make_pin #

fn (s &PhysicsServer2D) joint_make_pin(joint RID, anchor Vector2, body_a RID, cfg PhysicsServer2D_joint_make_pin_Cfg)

Makes the joint a pin joint. If [param body_b] is an empty [RID], then [param body_a] is pinned to the point [param anchor] (given in global coordinates); otherwise, [param body_a] is pinned to [param body_b] at the point [param anchor] (given in global coordinates). To set the parameters which are specific to the pin joint, see [method pin_joint_set_param].

fn (PhysicsServer2D) joint_make_groove #

fn (s &PhysicsServer2D) joint_make_groove(joint RID, groove1_a Vector2, groove2_a Vector2, anchor_b Vector2, cfg PhysicsServer2D_joint_make_groove_Cfg)

Makes the joint a groove joint.

fn (PhysicsServer2D) joint_make_damped_spring #

fn (s &PhysicsServer2D) joint_make_damped_spring(joint RID, anchor_a Vector2, anchor_b Vector2, body_a RID, cfg PhysicsServer2D_joint_make_damped_spring_Cfg)

Makes the joint a damped spring joint, attached at the point [param anchor_a] (given in global coordinates) on the body [param body_a] and at the point [param anchor_b] (given in global coordinates) on the body [param body_b]. To set the parameters which are specific to the damped spring, see [method damped_spring_joint_set_param].

fn (PhysicsServer2D) pin_joint_set_flag #

fn (s &PhysicsServer2D) pin_joint_set_flag(joint RID, flag PhysicsServer2DPinJointFlag, enabled bool)

Sets a pin joint flag.

fn (PhysicsServer2D) pin_joint_get_flag #

fn (s &PhysicsServer2D) pin_joint_get_flag(joint RID, flag PhysicsServer2DPinJointFlag) bool

Gets a pin joint flag.

fn (PhysicsServer2D) pin_joint_set_param #

fn (s &PhysicsServer2D) pin_joint_set_param(joint RID, param PhysicsServer2DPinJointParam, value f64)

Sets a pin joint parameter.

fn (PhysicsServer2D) pin_joint_get_param #

fn (s &PhysicsServer2D) pin_joint_get_param(joint RID, param PhysicsServer2DPinJointParam) f64

Returns the value of a pin joint parameter.

fn (PhysicsServer2D) damped_spring_joint_set_param #

fn (s &PhysicsServer2D) damped_spring_joint_set_param(joint RID, param PhysicsServer2DDampedSpringParam, value f64)

Sets the value of the given damped spring joint parameter.

fn (PhysicsServer2D) damped_spring_joint_get_param #

fn (s &PhysicsServer2D) damped_spring_joint_get_param(joint RID, param PhysicsServer2DDampedSpringParam) f64

Returns the value of the given damped spring joint parameter.

fn (PhysicsServer2D) joint_get_type #

fn (s &PhysicsServer2D) joint_get_type(joint RID) PhysicsServer2DJointType

Returns the joint's type.

fn (PhysicsServer2D) free_rid #

fn (s &PhysicsServer2D) free_rid(rid RID)

Destroys any of the objects created by PhysicsServer2D. If the [RID] passed is not one of the objects that can be created by PhysicsServer2D, an error will be printed to the console.

fn (PhysicsServer2D) set_active #

fn (s &PhysicsServer2D) set_active(active bool)

Activates or deactivates the 2D physics server. If [param active] is false, then the physics server will not do anything in its physics step.

fn (PhysicsServer2D) get_process_info #

fn (s &PhysicsServer2D) get_process_info(process_info PhysicsServer2DProcessInfo) i64

Returns the value of a physics engine state specified by [param process_info].

struct PhysicsServer2DExtension #

struct PhysicsServer2DExtension {
	PhysicsServer2D
}

Provides virtual methods that can be overridden to create custom [PhysicsServer2D] implementations.

fn (PhysicsServer2DExtension) to_variant #

fn (s &PhysicsServer2DExtension) to_variant() Variant

fn (PhysicsServer2DExtension) from_variant #

fn (mut s PhysicsServer2DExtension) from_variant(variant &Variant)

fn (PhysicsServer2DExtension) gd_world_boundary_shape_create #

fn (s &PhysicsServer2DExtension) gd_world_boundary_shape_create() RID

Overridable version of [method PhysicsServer2D.world_boundary_shape_create].

fn (PhysicsServer2DExtension) gd_separation_ray_shape_create #

fn (s &PhysicsServer2DExtension) gd_separation_ray_shape_create() RID

Overridable version of [method PhysicsServer2D.separation_ray_shape_create].

fn (PhysicsServer2DExtension) gd_segment_shape_create #

fn (s &PhysicsServer2DExtension) gd_segment_shape_create() RID

Overridable version of [method PhysicsServer2D.segment_shape_create].

fn (PhysicsServer2DExtension) gd_circle_shape_create #

fn (s &PhysicsServer2DExtension) gd_circle_shape_create() RID

Overridable version of [method PhysicsServer2D.circle_shape_create].

fn (PhysicsServer2DExtension) gd_rectangle_shape_create #

fn (s &PhysicsServer2DExtension) gd_rectangle_shape_create() RID

Overridable version of [method PhysicsServer2D.rectangle_shape_create].

fn (PhysicsServer2DExtension) gd_capsule_shape_create #

fn (s &PhysicsServer2DExtension) gd_capsule_shape_create() RID

Overridable version of [method PhysicsServer2D.capsule_shape_create].

fn (PhysicsServer2DExtension) gd_convex_polygon_shape_create #

fn (s &PhysicsServer2DExtension) gd_convex_polygon_shape_create() RID

Overridable version of [method PhysicsServer2D.convex_polygon_shape_create].

fn (PhysicsServer2DExtension) gd_concave_polygon_shape_create #

fn (s &PhysicsServer2DExtension) gd_concave_polygon_shape_create() RID

Overridable version of [method PhysicsServer2D.concave_polygon_shape_create].

fn (PhysicsServer2DExtension) gd_shape_set_data #

fn (s &PhysicsServer2DExtension) gd_shape_set_data(shape RID, data_ ToVariant)

Overridable version of [method PhysicsServer2D.shape_set_data].

fn (PhysicsServer2DExtension) gd_shape_set_custom_solver_bias #

fn (s &PhysicsServer2DExtension) gd_shape_set_custom_solver_bias(shape RID, bias f64)

Should set the custom solver bias for the given [param shape]. It defines how much bodies are forced to separate on contact. Overridable version of [PhysicsServer2D]'s internal shape_get_custom_solver_bias method. Corresponds to [member Shape2D.custom_solver_bias].

fn (PhysicsServer2DExtension) gd_shape_get_type #

fn (s &PhysicsServer2DExtension) gd_shape_get_type(shape RID) PhysicsServer2DShapeType

Overridable version of [method PhysicsServer2D.shape_get_type].

fn (PhysicsServer2DExtension) gd_shape_get_data #

fn (s &PhysicsServer2DExtension) gd_shape_get_data(shape RID) Variant

Overridable version of [method PhysicsServer2D.shape_get_data].

fn (PhysicsServer2DExtension) gd_shape_get_custom_solver_bias #

fn (s &PhysicsServer2DExtension) gd_shape_get_custom_solver_bias(shape RID) f64

Should return the custom solver bias of the given [param shape], which defines how much bodies are forced to separate on contact when this shape is involved. Overridable version of [PhysicsServer2D]'s internal shape_get_custom_solver_bias method. Corresponds to [member Shape2D.custom_solver_bias].

fn (PhysicsServer2DExtension) gd_shape_collide #

fn (s &PhysicsServer2DExtension) gd_shape_collide(shape_a RID, xform_a Transform2D, motion_a Vector2, shape_b RID, xform_b Transform2D, motion_b Vector2, results voidptr, result_max i64, result_count &i32) bool

Given two shapes and their parameters, should return true if a collision between the two would occur, with additional details passed in [param results]. Overridable version of [PhysicsServer2D]'s internal shape_collide method. Corresponds to [method PhysicsDirectSpaceState2D.collide_shape].

fn (PhysicsServer2DExtension) gd_space_create #

fn (s &PhysicsServer2DExtension) gd_space_create() RID

Overridable version of [method PhysicsServer2D.space_create].

fn (PhysicsServer2DExtension) gd_space_set_active #

fn (s &PhysicsServer2DExtension) gd_space_set_active(space RID, active bool)

Overridable version of [method PhysicsServer2D.space_set_active].

fn (PhysicsServer2DExtension) gd_space_is_active #

fn (s &PhysicsServer2DExtension) gd_space_is_active(space RID) bool

Overridable version of [method PhysicsServer2D.space_is_active].

fn (PhysicsServer2DExtension) gd_space_set_param #

fn (s &PhysicsServer2DExtension) gd_space_set_param(space RID, param PhysicsServer2DSpaceParameter, value f64)

Overridable version of [method PhysicsServer2D.space_set_param].

fn (PhysicsServer2DExtension) gd_space_get_param #

fn (s &PhysicsServer2DExtension) gd_space_get_param(space RID, param PhysicsServer2DSpaceParameter) f64

Overridable version of [method PhysicsServer2D.space_get_param].

fn (PhysicsServer2DExtension) gd_space_get_direct_state #

fn (s &PhysicsServer2DExtension) gd_space_get_direct_state(space RID) PhysicsDirectSpaceState2D

Overridable version of [method PhysicsServer2D.space_get_direct_state].

fn (PhysicsServer2DExtension) gd_space_set_debug_contacts #

fn (s &PhysicsServer2DExtension) gd_space_set_debug_contacts(space RID, max_contacts i64)

Used internally to allow the given [param space] to store contact points, up to [param max_contacts]. This is automatically set for the main [World2D]'s space when [member SceneTree.debug_collisions_hint] is true, or by checking "Visible Collision Shapes" in the editor. Only works in debug builds. Overridable version of [PhysicsServer2D]'s internal space_set_debug_contacts method.

fn (PhysicsServer2DExtension) gd_space_get_contacts #

fn (s &PhysicsServer2DExtension) gd_space_get_contacts(space RID) PackedVector2Array

Should return the positions of all contacts that have occurred during the last physics step in the given [param space]. See also [method _space_get_contact_count] and [method _space_set_debug_contacts]. Overridable version of [PhysicsServer2D]'s internal space_get_contacts method.

fn (PhysicsServer2DExtension) gd_space_get_contact_count #

fn (s &PhysicsServer2DExtension) gd_space_get_contact_count(space RID) i64

Should return how many contacts have occurred during the last physics step in the given [param space]. See also [method _space_get_contacts] and [method _space_set_debug_contacts]. Overridable version of [PhysicsServer2D]'s internal space_get_contact_count method.

fn (PhysicsServer2DExtension) gd_area_create #

fn (s &PhysicsServer2DExtension) gd_area_create() RID

Overridable version of [method PhysicsServer2D.area_create].

fn (PhysicsServer2DExtension) gd_area_set_space #

fn (s &PhysicsServer2DExtension) gd_area_set_space(area RID, space RID)

Overridable version of [method PhysicsServer2D.area_set_space].

fn (PhysicsServer2DExtension) gd_area_get_space #

fn (s &PhysicsServer2DExtension) gd_area_get_space(area RID) RID

Overridable version of [method PhysicsServer2D.area_get_space].

fn (PhysicsServer2DExtension) gd_area_add_shape #

fn (s &PhysicsServer2DExtension) gd_area_add_shape(area RID, shape RID, transform Transform2D, disabled bool)

Overridable version of [method PhysicsServer2D.area_add_shape].

fn (PhysicsServer2DExtension) gd_area_set_shape #

fn (s &PhysicsServer2DExtension) gd_area_set_shape(area RID, shape_idx i64, shape RID)

Overridable version of [method PhysicsServer2D.area_set_shape].

fn (PhysicsServer2DExtension) gd_area_set_shape_transform #

fn (s &PhysicsServer2DExtension) gd_area_set_shape_transform(area RID, shape_idx i64, transform Transform2D)

Overridable version of [method PhysicsServer2D.area_set_shape_transform].

fn (PhysicsServer2DExtension) gd_area_set_shape_disabled #

fn (s &PhysicsServer2DExtension) gd_area_set_shape_disabled(area RID, shape_idx i64, disabled bool)

Overridable version of [method PhysicsServer2D.area_set_shape_disabled].

fn (PhysicsServer2DExtension) gd_area_get_shape_count #

fn (s &PhysicsServer2DExtension) gd_area_get_shape_count(area RID) i64

Overridable version of [method PhysicsServer2D.area_get_shape_count].

fn (PhysicsServer2DExtension) gd_area_get_shape #

fn (s &PhysicsServer2DExtension) gd_area_get_shape(area RID, shape_idx i64) RID

Overridable version of [method PhysicsServer2D.area_get_shape].

fn (PhysicsServer2DExtension) gd_area_get_shape_transform #

fn (s &PhysicsServer2DExtension) gd_area_get_shape_transform(area RID, shape_idx i64) Transform2D

Overridable version of [method PhysicsServer2D.area_get_shape_transform].

fn (PhysicsServer2DExtension) gd_area_remove_shape #

fn (s &PhysicsServer2DExtension) gd_area_remove_shape(area RID, shape_idx i64)

Overridable version of [method PhysicsServer2D.area_remove_shape].

fn (PhysicsServer2DExtension) gd_area_clear_shapes #

fn (s &PhysicsServer2DExtension) gd_area_clear_shapes(area RID)

Overridable version of [method PhysicsServer2D.area_clear_shapes].

fn (PhysicsServer2DExtension) gd_area_attach_object_instance_id #

fn (s &PhysicsServer2DExtension) gd_area_attach_object_instance_id(area RID, id i64)

Overridable version of [method PhysicsServer2D.area_attach_object_instance_id].

fn (PhysicsServer2DExtension) gd_area_get_object_instance_id #

fn (s &PhysicsServer2DExtension) gd_area_get_object_instance_id(area RID) i64

Overridable version of [method PhysicsServer2D.area_get_object_instance_id].

fn (PhysicsServer2DExtension) gd_area_attach_canvas_instance_id #

fn (s &PhysicsServer2DExtension) gd_area_attach_canvas_instance_id(area RID, id i64)

Overridable version of [method PhysicsServer2D.area_attach_canvas_instance_id].

fn (PhysicsServer2DExtension) gd_area_get_canvas_instance_id #

fn (s &PhysicsServer2DExtension) gd_area_get_canvas_instance_id(area RID) i64

Overridable version of [method PhysicsServer2D.area_get_canvas_instance_id].

fn (PhysicsServer2DExtension) gd_area_set_param #

fn (s &PhysicsServer2DExtension) gd_area_set_param(area RID, param PhysicsServer2DAreaParameter, value_ ToVariant)

Overridable version of [method PhysicsServer2D.area_set_param].

fn (PhysicsServer2DExtension) gd_area_set_transform #

fn (s &PhysicsServer2DExtension) gd_area_set_transform(area RID, transform Transform2D)

Overridable version of [method PhysicsServer2D.area_set_transform].

fn (PhysicsServer2DExtension) gd_area_get_param #

fn (s &PhysicsServer2DExtension) gd_area_get_param(area RID, param PhysicsServer2DAreaParameter) Variant

Overridable version of [method PhysicsServer2D.area_get_param].

fn (PhysicsServer2DExtension) gd_area_get_transform #

fn (s &PhysicsServer2DExtension) gd_area_get_transform(area RID) Transform2D

Overridable version of [method PhysicsServer2D.area_get_transform].

fn (PhysicsServer2DExtension) gd_area_set_collision_layer #

fn (s &PhysicsServer2DExtension) gd_area_set_collision_layer(area RID, layer i64)

Overridable version of [method PhysicsServer2D.area_set_collision_layer].

fn (PhysicsServer2DExtension) gd_area_get_collision_layer #

fn (s &PhysicsServer2DExtension) gd_area_get_collision_layer(area RID) i64

Overridable version of [method PhysicsServer2D.area_get_collision_layer].

fn (PhysicsServer2DExtension) gd_area_set_collision_mask #

fn (s &PhysicsServer2DExtension) gd_area_set_collision_mask(area RID, mask i64)

Overridable version of [method PhysicsServer2D.area_set_collision_mask].

fn (PhysicsServer2DExtension) gd_area_get_collision_mask #

fn (s &PhysicsServer2DExtension) gd_area_get_collision_mask(area RID) i64

Overridable version of [method PhysicsServer2D.area_get_collision_mask].

fn (PhysicsServer2DExtension) gd_area_set_monitorable #

fn (s &PhysicsServer2DExtension) gd_area_set_monitorable(area RID, monitorable bool)

Overridable version of [method PhysicsServer2D.area_set_monitorable].

fn (PhysicsServer2DExtension) gd_area_set_pickable #

fn (s &PhysicsServer2DExtension) gd_area_set_pickable(area RID, pickable bool)

If set to true, allows the area with the given [RID] to detect mouse inputs when the mouse cursor is hovering on it. Overridable version of [PhysicsServer2D]'s internal area_set_pickable method. Corresponds to [member CollisionObject2D.input_pickable].

fn (PhysicsServer2DExtension) gd_area_set_monitor_callback #

fn (s &PhysicsServer2DExtension) gd_area_set_monitor_callback(area RID, callback Callable)

Overridable version of [method PhysicsServer2D.area_set_monitor_callback].

fn (PhysicsServer2DExtension) gd_area_set_area_monitor_callback #

fn (s &PhysicsServer2DExtension) gd_area_set_area_monitor_callback(area RID, callback Callable)

Overridable version of [method PhysicsServer2D.area_set_area_monitor_callback].

fn (PhysicsServer2DExtension) gd_body_create #

fn (s &PhysicsServer2DExtension) gd_body_create() RID

Overridable version of [method PhysicsServer2D.body_create].

fn (PhysicsServer2DExtension) gd_body_set_space #

fn (s &PhysicsServer2DExtension) gd_body_set_space(body RID, space RID)

Overridable version of [method PhysicsServer2D.body_set_space].

fn (PhysicsServer2DExtension) gd_body_get_space #

fn (s &PhysicsServer2DExtension) gd_body_get_space(body RID) RID

Overridable version of [method PhysicsServer2D.body_get_space].

fn (PhysicsServer2DExtension) gd_body_set_mode #

fn (s &PhysicsServer2DExtension) gd_body_set_mode(body RID, mode PhysicsServer2DBodyMode)

Overridable version of [method PhysicsServer2D.body_set_mode].

fn (PhysicsServer2DExtension) gd_body_get_mode #

fn (s &PhysicsServer2DExtension) gd_body_get_mode(body RID) PhysicsServer2DBodyMode

Overridable version of [method PhysicsServer2D.body_get_mode].

fn (PhysicsServer2DExtension) gd_body_add_shape #

fn (s &PhysicsServer2DExtension) gd_body_add_shape(body RID, shape RID, transform Transform2D, disabled bool)

Overridable version of [method PhysicsServer2D.body_add_shape].

fn (PhysicsServer2DExtension) gd_body_set_shape #

fn (s &PhysicsServer2DExtension) gd_body_set_shape(body RID, shape_idx i64, shape RID)

Overridable version of [method PhysicsServer2D.body_set_shape].

fn (PhysicsServer2DExtension) gd_body_set_shape_transform #

fn (s &PhysicsServer2DExtension) gd_body_set_shape_transform(body RID, shape_idx i64, transform Transform2D)

Overridable version of [method PhysicsServer2D.body_set_shape_transform].

fn (PhysicsServer2DExtension) gd_body_get_shape_count #

fn (s &PhysicsServer2DExtension) gd_body_get_shape_count(body RID) i64

Overridable version of [method PhysicsServer2D.body_get_shape_count].

fn (PhysicsServer2DExtension) gd_body_get_shape #

fn (s &PhysicsServer2DExtension) gd_body_get_shape(body RID, shape_idx i64) RID

Overridable version of [method PhysicsServer2D.body_get_shape].

fn (PhysicsServer2DExtension) gd_body_get_shape_transform #

fn (s &PhysicsServer2DExtension) gd_body_get_shape_transform(body RID, shape_idx i64) Transform2D

Overridable version of [method PhysicsServer2D.body_get_shape_transform].

fn (PhysicsServer2DExtension) gd_body_set_shape_disabled #

fn (s &PhysicsServer2DExtension) gd_body_set_shape_disabled(body RID, shape_idx i64, disabled bool)

Overridable version of [method PhysicsServer2D.body_set_shape_disabled].

fn (PhysicsServer2DExtension) gd_body_set_shape_as_one_way_collision #

fn (s &PhysicsServer2DExtension) gd_body_set_shape_as_one_way_collision(body RID, shape_idx i64, enable bool, margin f64)

Overridable version of [method PhysicsServer2D.body_set_shape_as_one_way_collision].

fn (PhysicsServer2DExtension) gd_body_remove_shape #

fn (s &PhysicsServer2DExtension) gd_body_remove_shape(body RID, shape_idx i64)

Overridable version of [method PhysicsServer2D.body_remove_shape].

fn (PhysicsServer2DExtension) gd_body_clear_shapes #

fn (s &PhysicsServer2DExtension) gd_body_clear_shapes(body RID)

Overridable version of [method PhysicsServer2D.body_clear_shapes].

fn (PhysicsServer2DExtension) gd_body_attach_object_instance_id #

fn (s &PhysicsServer2DExtension) gd_body_attach_object_instance_id(body RID, id i64)

Overridable version of [method PhysicsServer2D.body_attach_object_instance_id].

fn (PhysicsServer2DExtension) gd_body_get_object_instance_id #

fn (s &PhysicsServer2DExtension) gd_body_get_object_instance_id(body RID) i64

Overridable version of [method PhysicsServer2D.body_get_object_instance_id].

fn (PhysicsServer2DExtension) gd_body_attach_canvas_instance_id #

fn (s &PhysicsServer2DExtension) gd_body_attach_canvas_instance_id(body RID, id i64)

Overridable version of [method PhysicsServer2D.body_attach_canvas_instance_id].

fn (PhysicsServer2DExtension) gd_body_get_canvas_instance_id #

fn (s &PhysicsServer2DExtension) gd_body_get_canvas_instance_id(body RID) i64

Overridable version of [method PhysicsServer2D.body_get_canvas_instance_id].

fn (PhysicsServer2DExtension) gd_body_set_continuous_collision_detection_mode #

fn (s &PhysicsServer2DExtension) gd_body_set_continuous_collision_detection_mode(body RID, mode PhysicsServer2DCCDMode)

Overridable version of [method PhysicsServer2D.body_set_continuous_collision_detection_mode].

fn (PhysicsServer2DExtension) gd_body_get_continuous_collision_detection_mode #

fn (s &PhysicsServer2DExtension) gd_body_get_continuous_collision_detection_mode(body RID) PhysicsServer2DCCDMode

Overridable version of [method PhysicsServer2D.body_get_continuous_collision_detection_mode].

fn (PhysicsServer2DExtension) gd_body_set_collision_layer #

fn (s &PhysicsServer2DExtension) gd_body_set_collision_layer(body RID, layer i64)

Overridable version of [method PhysicsServer2D.body_set_collision_layer].

fn (PhysicsServer2DExtension) gd_body_get_collision_layer #

fn (s &PhysicsServer2DExtension) gd_body_get_collision_layer(body RID) i64

Overridable version of [method PhysicsServer2D.body_get_collision_layer].

fn (PhysicsServer2DExtension) gd_body_set_collision_mask #

fn (s &PhysicsServer2DExtension) gd_body_set_collision_mask(body RID, mask i64)

Overridable version of [method PhysicsServer2D.body_set_collision_mask].

fn (PhysicsServer2DExtension) gd_body_get_collision_mask #

fn (s &PhysicsServer2DExtension) gd_body_get_collision_mask(body RID) i64

Overridable version of [method PhysicsServer2D.body_get_collision_mask].

fn (PhysicsServer2DExtension) gd_body_set_collision_priority #

fn (s &PhysicsServer2DExtension) gd_body_set_collision_priority(body RID, priority f64)

Overridable version of [method PhysicsServer2D.body_set_collision_priority].

fn (PhysicsServer2DExtension) gd_body_get_collision_priority #

fn (s &PhysicsServer2DExtension) gd_body_get_collision_priority(body RID) f64

Overridable version of [method PhysicsServer2D.body_get_collision_priority].

fn (PhysicsServer2DExtension) gd_body_set_param #

fn (s &PhysicsServer2DExtension) gd_body_set_param(body RID, param PhysicsServer2DBodyParameter, value_ ToVariant)

Overridable version of [method PhysicsServer2D.body_set_param].

fn (PhysicsServer2DExtension) gd_body_get_param #

fn (s &PhysicsServer2DExtension) gd_body_get_param(body RID, param PhysicsServer2DBodyParameter) Variant

Overridable version of [method PhysicsServer2D.body_get_param].

fn (PhysicsServer2DExtension) gd_body_reset_mass_properties #

fn (s &PhysicsServer2DExtension) gd_body_reset_mass_properties(body RID)

Overridable version of [method PhysicsServer2D.body_reset_mass_properties].

fn (PhysicsServer2DExtension) gd_body_set_state #

fn (s &PhysicsServer2DExtension) gd_body_set_state(body RID, state PhysicsServer2DBodyState, value_ ToVariant)

Overridable version of [method PhysicsServer2D.body_set_state].

fn (PhysicsServer2DExtension) gd_body_get_state #

fn (s &PhysicsServer2DExtension) gd_body_get_state(body RID, state PhysicsServer2DBodyState) Variant

Overridable version of [method PhysicsServer2D.body_get_state].

fn (PhysicsServer2DExtension) gd_body_apply_central_impulse #

fn (s &PhysicsServer2DExtension) gd_body_apply_central_impulse(body RID, impulse Vector2)

Overridable version of [method PhysicsServer2D.body_apply_central_impulse].

fn (PhysicsServer2DExtension) gd_body_apply_torque_impulse #

fn (s &PhysicsServer2DExtension) gd_body_apply_torque_impulse(body RID, impulse f64)

Overridable version of [method PhysicsServer2D.body_apply_torque_impulse].

fn (PhysicsServer2DExtension) gd_body_apply_impulse #

fn (s &PhysicsServer2DExtension) gd_body_apply_impulse(body RID, impulse Vector2, position Vector2)

Overridable version of [method PhysicsServer2D.body_apply_impulse].

fn (PhysicsServer2DExtension) gd_body_apply_central_force #

fn (s &PhysicsServer2DExtension) gd_body_apply_central_force(body RID, force Vector2)

Overridable version of [method PhysicsServer2D.body_apply_central_force].

fn (PhysicsServer2DExtension) gd_body_apply_force #

fn (s &PhysicsServer2DExtension) gd_body_apply_force(body RID, force Vector2, position Vector2)

Overridable version of [method PhysicsServer2D.body_apply_force].

fn (PhysicsServer2DExtension) gd_body_apply_torque #

fn (s &PhysicsServer2DExtension) gd_body_apply_torque(body RID, torque f64)

Overridable version of [method PhysicsServer2D.body_apply_torque].

fn (PhysicsServer2DExtension) gd_body_add_constant_central_force #

fn (s &PhysicsServer2DExtension) gd_body_add_constant_central_force(body RID, force Vector2)

Overridable version of [method PhysicsServer2D.body_add_constant_central_force].

fn (PhysicsServer2DExtension) gd_body_add_constant_force #

fn (s &PhysicsServer2DExtension) gd_body_add_constant_force(body RID, force Vector2, position Vector2)

Overridable version of [method PhysicsServer2D.body_add_constant_force].

fn (PhysicsServer2DExtension) gd_body_add_constant_torque #

fn (s &PhysicsServer2DExtension) gd_body_add_constant_torque(body RID, torque f64)

Overridable version of [method PhysicsServer2D.body_add_constant_torque].

fn (PhysicsServer2DExtension) gd_body_set_constant_force #

fn (s &PhysicsServer2DExtension) gd_body_set_constant_force(body RID, force Vector2)

Overridable version of [method PhysicsServer2D.body_set_constant_force].

fn (PhysicsServer2DExtension) gd_body_get_constant_force #

fn (s &PhysicsServer2DExtension) gd_body_get_constant_force(body RID) Vector2

Overridable version of [method PhysicsServer2D.body_get_constant_force].

fn (PhysicsServer2DExtension) gd_body_set_constant_torque #

fn (s &PhysicsServer2DExtension) gd_body_set_constant_torque(body RID, torque f64)

Overridable version of [method PhysicsServer2D.body_set_constant_torque].

fn (PhysicsServer2DExtension) gd_body_get_constant_torque #

fn (s &PhysicsServer2DExtension) gd_body_get_constant_torque(body RID) f64

Overridable version of [method PhysicsServer2D.body_get_constant_torque].

fn (PhysicsServer2DExtension) gd_body_set_axis_velocity #

fn (s &PhysicsServer2DExtension) gd_body_set_axis_velocity(body RID, axis_velocity Vector2)

Overridable version of [method PhysicsServer2D.body_set_axis_velocity].

fn (PhysicsServer2DExtension) gd_body_add_collision_exception #

fn (s &PhysicsServer2DExtension) gd_body_add_collision_exception(body RID, excepted_body RID)

Overridable version of [method PhysicsServer2D.body_add_collision_exception].

fn (PhysicsServer2DExtension) gd_body_remove_collision_exception #

fn (s &PhysicsServer2DExtension) gd_body_remove_collision_exception(body RID, excepted_body RID)

Overridable version of [method PhysicsServer2D.body_remove_collision_exception].

fn (PhysicsServer2DExtension) gd_body_get_collision_exceptions #

fn (s &PhysicsServer2DExtension) gd_body_get_collision_exceptions(body RID) Array

Returns the [RID]s of all bodies added as collision exceptions for the given [param body]. See also [method _body_add_collision_exception] and [method _body_remove_collision_exception]. Overridable version of [PhysicsServer2D]'s internal body_get_collision_exceptions method. Corresponds to [method PhysicsBody2D.get_collision_exceptions].

fn (PhysicsServer2DExtension) gd_body_set_max_contacts_reported #

fn (s &PhysicsServer2DExtension) gd_body_set_max_contacts_reported(body RID, amount i64)

Overridable version of [method PhysicsServer2D.body_set_max_contacts_reported].

fn (PhysicsServer2DExtension) gd_body_get_max_contacts_reported #

fn (s &PhysicsServer2DExtension) gd_body_get_max_contacts_reported(body RID) i64

Overridable version of [method PhysicsServer2D.body_get_max_contacts_reported].

fn (PhysicsServer2DExtension) gd_body_set_contacts_reported_depth_threshold #

fn (s &PhysicsServer2DExtension) gd_body_set_contacts_reported_depth_threshold(body RID, threshold f64)

Overridable version of [PhysicsServer2D]'s internal body_set_contacts_reported_depth_threshold method. [b]Note:[/b] This method is currently unused by Godot's default physics implementation.

fn (PhysicsServer2DExtension) gd_body_get_contacts_reported_depth_threshold #

fn (s &PhysicsServer2DExtension) gd_body_get_contacts_reported_depth_threshold(body RID) f64

Overridable version of [PhysicsServer2D]'s internal body_get_contacts_reported_depth_threshold method. [b]Note:[/b] This method is currently unused by Godot's default physics implementation.

fn (PhysicsServer2DExtension) gd_body_set_omit_force_integration #

fn (s &PhysicsServer2DExtension) gd_body_set_omit_force_integration(body RID, enable bool)

Overridable version of [method PhysicsServer2D.body_set_omit_force_integration].

fn (PhysicsServer2DExtension) gd_body_is_omitting_force_integration #

fn (s &PhysicsServer2DExtension) gd_body_is_omitting_force_integration(body RID) bool

Overridable version of [method PhysicsServer2D.body_is_omitting_force_integration].

fn (PhysicsServer2DExtension) gd_body_set_state_sync_callback #

fn (s &PhysicsServer2DExtension) gd_body_set_state_sync_callback(body RID, callable Callable)

Assigns the [param body] to call the given [param callable] during the synchronization phase of the loop, before [method _step] is called. See also [method _sync]. Overridable version of [method PhysicsServer2D.body_set_state_sync_callback].

fn (PhysicsServer2DExtension) gd_body_set_force_integration_callback #

fn (s &PhysicsServer2DExtension) gd_body_set_force_integration_callback(body RID, callable Callable, userdata_ ToVariant)

Overridable version of [method PhysicsServer2D.body_set_force_integration_callback].

fn (PhysicsServer2DExtension) gd_body_collide_shape #

fn (s &PhysicsServer2DExtension) gd_body_collide_shape(body RID, body_shape i64, shape RID, shape_xform Transform2D, motion Vector2, results voidptr, result_max i64, result_count &i32) bool

Given a [param body], a [param shape], and their respective parameters, this method should return true if a collision between the two would occur, with additional details passed in [param results]. Overridable version of [PhysicsServer2D]'s internal shape_collide method. Corresponds to [method PhysicsDirectSpaceState2D.collide_shape].

fn (PhysicsServer2DExtension) gd_body_set_pickable #

fn (s &PhysicsServer2DExtension) gd_body_set_pickable(body RID, pickable bool)

If set to true, allows the body with the given [RID] to detect mouse inputs when the mouse cursor is hovering on it. Overridable version of [PhysicsServer2D]'s internal body_set_pickable method. Corresponds to [member CollisionObject2D.input_pickable].

fn (PhysicsServer2DExtension) gd_body_get_direct_state #

fn (s &PhysicsServer2DExtension) gd_body_get_direct_state(body RID) PhysicsDirectBodyState2D

Overridable version of [method PhysicsServer2D.body_get_direct_state].

fn (PhysicsServer2DExtension) gd_body_test_motion #

fn (s &PhysicsServer2DExtension) gd_body_test_motion(body RID, from Transform2D, motion Vector2, margin f64, collide_separation_ray bool, recovery_as_collision bool, gd_result &PhysicsServer2DExtensionMotionResult) bool

Overridable version of [method PhysicsServer2D.body_test_motion]. Unlike the exposed implementation, this method does not receive all of the arguments inside a [PhysicsTestMotionParameters2D].

fn (PhysicsServer2DExtension) gd_joint_create #

fn (s &PhysicsServer2DExtension) gd_joint_create() RID

Overridable version of [method PhysicsServer2D.joint_create].

fn (PhysicsServer2DExtension) gd_joint_clear #

fn (s &PhysicsServer2DExtension) gd_joint_clear(joint RID)

Overridable version of [method PhysicsServer2D.joint_clear].

fn (PhysicsServer2DExtension) gd_joint_set_param #

fn (s &PhysicsServer2DExtension) gd_joint_set_param(joint RID, param PhysicsServer2DJointParam, value f64)

Overridable version of [method PhysicsServer2D.joint_set_param].

fn (PhysicsServer2DExtension) gd_joint_get_param #

fn (s &PhysicsServer2DExtension) gd_joint_get_param(joint RID, param PhysicsServer2DJointParam) f64

Overridable version of [method PhysicsServer2D.joint_get_param].

fn (PhysicsServer2DExtension) gd_joint_disable_collisions_between_bodies #

fn (s &PhysicsServer2DExtension) gd_joint_disable_collisions_between_bodies(joint RID, disable bool)

Overridable version of [method PhysicsServer2D.joint_disable_collisions_between_bodies].

fn (PhysicsServer2DExtension) gd_joint_is_disabled_collisions_between_bodies #

fn (s &PhysicsServer2DExtension) gd_joint_is_disabled_collisions_between_bodies(joint RID) bool

Overridable version of [method PhysicsServer2D.joint_is_disabled_collisions_between_bodies].

fn (PhysicsServer2DExtension) gd_joint_make_pin #

fn (s &PhysicsServer2DExtension) gd_joint_make_pin(joint RID, anchor Vector2, body_a RID, body_b RID)

Overridable version of [method PhysicsServer2D.joint_make_pin].

fn (PhysicsServer2DExtension) gd_joint_make_groove #

fn (s &PhysicsServer2DExtension) gd_joint_make_groove(joint RID, a_groove1 Vector2, a_groove2 Vector2, b_anchor Vector2, body_a RID, body_b RID)

Overridable version of [method PhysicsServer2D.joint_make_groove].

fn (PhysicsServer2DExtension) gd_joint_make_damped_spring #

fn (s &PhysicsServer2DExtension) gd_joint_make_damped_spring(joint RID, anchor_a Vector2, anchor_b Vector2, body_a RID, body_b RID)

Overridable version of [method PhysicsServer2D.joint_make_damped_spring].

fn (PhysicsServer2DExtension) gd_pin_joint_set_flag #

fn (s &PhysicsServer2DExtension) gd_pin_joint_set_flag(joint RID, flag PhysicsServer2DPinJointFlag, enabled bool)

Overridable version of [method PhysicsServer2D.pin_joint_set_flag].

fn (PhysicsServer2DExtension) gd_pin_joint_get_flag #

fn (s &PhysicsServer2DExtension) gd_pin_joint_get_flag(joint RID, flag PhysicsServer2DPinJointFlag) bool

Overridable version of [method PhysicsServer2D.pin_joint_get_flag].

fn (PhysicsServer2DExtension) gd_pin_joint_set_param #

fn (s &PhysicsServer2DExtension) gd_pin_joint_set_param(joint RID, param PhysicsServer2DPinJointParam, value f64)

Overridable version of [method PhysicsServer2D.pin_joint_set_param].

fn (PhysicsServer2DExtension) gd_pin_joint_get_param #

fn (s &PhysicsServer2DExtension) gd_pin_joint_get_param(joint RID, param PhysicsServer2DPinJointParam) f64

Overridable version of [method PhysicsServer2D.pin_joint_get_param].

fn (PhysicsServer2DExtension) gd_damped_spring_joint_set_param #

fn (s &PhysicsServer2DExtension) gd_damped_spring_joint_set_param(joint RID, param PhysicsServer2DDampedSpringParam, value f64)

Overridable version of [method PhysicsServer2D.damped_spring_joint_set_param].

fn (PhysicsServer2DExtension) gd_damped_spring_joint_get_param #

fn (s &PhysicsServer2DExtension) gd_damped_spring_joint_get_param(joint RID, param PhysicsServer2DDampedSpringParam) f64

Overridable version of [method PhysicsServer2D.damped_spring_joint_get_param].

fn (PhysicsServer2DExtension) gd_joint_get_type #

fn (s &PhysicsServer2DExtension) gd_joint_get_type(joint RID) PhysicsServer2DJointType

Overridable version of [method PhysicsServer2D.joint_get_type].

fn (PhysicsServer2DExtension) gd_free_rid #

fn (s &PhysicsServer2DExtension) gd_free_rid(rid RID)

Overridable version of [method PhysicsServer2D.free_rid].

fn (PhysicsServer2DExtension) gd_set_active #

fn (s &PhysicsServer2DExtension) gd_set_active(active bool)

Overridable version of [method PhysicsServer2D.set_active].

fn (PhysicsServer2DExtension) gd_init #

fn (s &PhysicsServer2DExtension) gd_init()

Called when the main loop is initialized and creates a new instance of this physics server. See also [method MainLoop._initialize] and [method _finish]. Overridable version of [PhysicsServer2D]'s internal init method.

fn (PhysicsServer2DExtension) gd_step #

fn (s &PhysicsServer2DExtension) gd_step(step f64)

Called every physics step to process the physics simulation. [param step] is the time elapsed since the last physics step, in seconds. It is usually the same as the value returned by [method Node.get_physics_process_delta_time]. Overridable version of [PhysicsServer2D]'s internal [code skip-lint]step` method.

fn (PhysicsServer2DExtension) gd_sync #

fn (s &PhysicsServer2DExtension) gd_sync()

Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also [method _end_sync]. Overridable version of [PhysicsServer2D]'s internal sync method.

fn (PhysicsServer2DExtension) gd_flush_queries #

fn (s &PhysicsServer2DExtension) gd_flush_queries()

Called every physics step before [method _step] to process all remaining queries. Overridable version of [PhysicsServer2D]'s internal flush_queries method.

fn (PhysicsServer2DExtension) gd_end_sync #

fn (s &PhysicsServer2DExtension) gd_end_sync()

Called to indicate that the physics server has stopped synchronizing. It is in the loop's iteration/physics phase, and can access physics objects even if running on a separate thread. See also [method _sync]. Overridable version of [PhysicsServer2D]'s internal end_sync method.

fn (PhysicsServer2DExtension) gd_finish #

fn (s &PhysicsServer2DExtension) gd_finish()

Called when the main loop finalizes to shut down the physics server. See also [method MainLoop._finalize] and [method _init]. Overridable version of [PhysicsServer2D]'s internal finish method.

fn (PhysicsServer2DExtension) gd_is_flushing_queries #

fn (s &PhysicsServer2DExtension) gd_is_flushing_queries() bool

Overridable method that should return true when the physics server is processing queries. See also [method _flush_queries]. Overridable version of [PhysicsServer2D]'s internal is_flushing_queries method.

fn (PhysicsServer2DExtension) gd_get_process_info #

fn (s &PhysicsServer2DExtension) gd_get_process_info(process_info PhysicsServer2DProcessInfo) i64

Overridable version of [method PhysicsServer2D.get_process_info].

fn (PhysicsServer2DExtension) body_test_motion_is_excluding_body #

fn (s &PhysicsServer2DExtension) body_test_motion_is_excluding_body(body RID) bool

Returns true if the body with the given [RID] is being excluded from [method _body_test_motion]. See also [method Object.get_instance_id].

fn (PhysicsServer2DExtension) body_test_motion_is_excluding_object #

fn (s &PhysicsServer2DExtension) body_test_motion_is_excluding_object(object i64) bool

Returns true if the object with the given instance ID is being excluded from [method _body_test_motion]. See also [method Object.get_instance_id].

struct PhysicsServer2DExtensionMotionResult #

struct PhysicsServer2DExtensionMotionResult {
pub mut:
	travel                    Vector2
	remainder                 Vector2
	collision_point           Vector2
	collision_normal          Vector2
	collider_velocity         Vector2
	collision_depth           f64
	collision_safe_fraction   f64
	collision_unsafe_fraction f64
	collision_local_shape     i64
	collider_id               ObjectID
	collider                  RID
	collider_shape            i64
}

struct PhysicsServer2DExtensionRayResult #

struct PhysicsServer2DExtensionRayResult {
pub mut:
	position    Vector2
	normal      Vector2
	rid         RID
	collider_id ObjectID
	collider    &Object
	shape       i64
}

struct PhysicsServer2DExtensionShapeRestInfo #

struct PhysicsServer2DExtensionShapeRestInfo {
pub mut:
	point           Vector2
	normal          Vector2
	rid             RID
	collider_id     ObjectID
	shape           i64
	linear_velocity Vector2
}

struct PhysicsServer2DExtensionShapeResult #

struct PhysicsServer2DExtensionShapeResult {
pub mut:
	rid         RID
	collider_id ObjectID
	collider    &Object
	shape       i64
}

struct PhysicsServer2DManager #

struct PhysicsServer2DManager {
	Object
}

A singleton for managing [PhysicsServer2D] implementations.

fn (PhysicsServer2DManager) to_variant #

fn (s &PhysicsServer2DManager) to_variant() Variant

fn (PhysicsServer2DManager) from_variant #

fn (mut s PhysicsServer2DManager) from_variant(variant &Variant)

fn (PhysicsServer2DManager) register_server #

fn (s &PhysicsServer2DManager) register_server(name string, create_callback Callable)

Register a [PhysicsServer2D] implementation by passing a [param name] and a [Callable] that returns a [PhysicsServer2D] object.

fn (PhysicsServer2DManager) set_default_server #

fn (s &PhysicsServer2DManager) set_default_server(name string, priority i64)

Set the default [PhysicsServer2D] implementation to the one identified by [param name], if [param priority] is greater than the priority of the current default implementation.

struct PhysicsServer2D_area_add_shape_Cfg #

@[params]
struct PhysicsServer2D_area_add_shape_Cfg {
pub:
	transform Transform2D = Transform2D{Vector2{1, 0}, Vector2{0, 1}, Vector2{0, 0}}
	disabled  bool
}

Optional parameters for PhysicsServer2D#area_add_shape

struct PhysicsServer2D_body_add_constant_force_Cfg #

@[params]
struct PhysicsServer2D_body_add_constant_force_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for PhysicsServer2D#body_add_constant_force

struct PhysicsServer2D_body_add_shape_Cfg #

@[params]
struct PhysicsServer2D_body_add_shape_Cfg {
pub:
	transform Transform2D = Transform2D{Vector2{1, 0}, Vector2{0, 1}, Vector2{0, 0}}
	disabled  bool
}

Optional parameters for PhysicsServer2D#body_add_shape

struct PhysicsServer2D_body_apply_force_Cfg #

@[params]
struct PhysicsServer2D_body_apply_force_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for PhysicsServer2D#body_apply_force

struct PhysicsServer2D_body_apply_impulse_Cfg #

@[params]
struct PhysicsServer2D_body_apply_impulse_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for PhysicsServer2D#body_apply_impulse

struct PhysicsServer2D_body_set_force_integration_callback_Cfg #

@[params]
struct PhysicsServer2D_body_set_force_integration_callback_Cfg {
pub:
	userdata ToVariant
}

Optional parameters for PhysicsServer2D#body_set_force_integration_callback

struct PhysicsServer2D_body_test_motion_Cfg #

@[params]
struct PhysicsServer2D_body_test_motion_Cfg {
pub:
	gd_result PhysicsTestMotionResult2D
}

Optional parameters for PhysicsServer2D#body_test_motion

struct PhysicsServer2D_joint_make_damped_spring_Cfg #

@[params]
struct PhysicsServer2D_joint_make_damped_spring_Cfg {
pub:
	body_b RID = RID{}
}

Optional parameters for PhysicsServer2D#joint_make_damped_spring

struct PhysicsServer2D_joint_make_groove_Cfg #

@[params]
struct PhysicsServer2D_joint_make_groove_Cfg {
pub:
	body_a RID = RID{}
	body_b RID = RID{}
}

Optional parameters for PhysicsServer2D#joint_make_groove

struct PhysicsServer2D_joint_make_pin_Cfg #

@[params]
struct PhysicsServer2D_joint_make_pin_Cfg {
pub:
	body_b RID = RID{}
}

Optional parameters for PhysicsServer2D#joint_make_pin

struct PhysicsServer3D #

struct PhysicsServer3D {
	Object
}

A server interface for low-level 3D physics access.

fn (PhysicsServer3D) to_variant #

fn (s &PhysicsServer3D) to_variant() Variant

fn (PhysicsServer3D) from_variant #

fn (mut s PhysicsServer3D) from_variant(variant &Variant)

fn (PhysicsServer3D) world_boundary_shape_create #

fn (s &PhysicsServer3D) world_boundary_shape_create() RID

fn (PhysicsServer3D) separation_ray_shape_create #

fn (s &PhysicsServer3D) separation_ray_shape_create() RID

fn (PhysicsServer3D) sphere_shape_create #

fn (s &PhysicsServer3D) sphere_shape_create() RID

fn (PhysicsServer3D) box_shape_create #

fn (s &PhysicsServer3D) box_shape_create() RID

fn (PhysicsServer3D) capsule_shape_create #

fn (s &PhysicsServer3D) capsule_shape_create() RID

fn (PhysicsServer3D) cylinder_shape_create #

fn (s &PhysicsServer3D) cylinder_shape_create() RID

fn (PhysicsServer3D) convex_polygon_shape_create #

fn (s &PhysicsServer3D) convex_polygon_shape_create() RID

fn (PhysicsServer3D) concave_polygon_shape_create #

fn (s &PhysicsServer3D) concave_polygon_shape_create() RID

fn (PhysicsServer3D) heightmap_shape_create #

fn (s &PhysicsServer3D) heightmap_shape_create() RID

fn (PhysicsServer3D) custom_shape_create #

fn (s &PhysicsServer3D) custom_shape_create() RID

fn (PhysicsServer3D) shape_set_data #

fn (s &PhysicsServer3D) shape_set_data(shape RID, data_ ToVariant)

Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type].

fn (PhysicsServer3D) shape_set_margin #

fn (s &PhysicsServer3D) shape_set_margin(shape RID, margin f64)

Sets the collision margin for the shape. [b]Note:[/b] This is not used in Godot Physics.

fn (PhysicsServer3D) shape_get_type #

fn (s &PhysicsServer3D) shape_get_type(shape RID) PhysicsServer3DShapeType

Returns the type of shape.

fn (PhysicsServer3D) shape_get_data #

fn (s &PhysicsServer3D) shape_get_data(shape RID) Variant

Returns the shape data.

fn (PhysicsServer3D) shape_get_margin #

fn (s &PhysicsServer3D) shape_get_margin(shape RID) f64

Returns the collision margin for the shape. [b]Note:[/b] This is not used in Godot Physics, so will always return 0.

fn (PhysicsServer3D) space_create #

fn (s &PhysicsServer3D) space_create() RID

Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space].

fn (PhysicsServer3D) space_set_active #

fn (s &PhysicsServer3D) space_set_active(space RID, active bool)

Marks a space as active. It will not have an effect, unless it is assigned to an area or body.

fn (PhysicsServer3D) space_is_active #

fn (s &PhysicsServer3D) space_is_active(space RID) bool

Returns whether the space is active.

fn (PhysicsServer3D) space_set_param #

fn (s &PhysicsServer3D) space_set_param(space RID, param PhysicsServer3DSpaceParameter, value f64)

Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants.

fn (PhysicsServer3D) space_get_param #

fn (s &PhysicsServer3D) space_get_param(space RID, param PhysicsServer3DSpaceParameter) f64

Returns the value of a space parameter.

fn (PhysicsServer3D) space_get_direct_state #

fn (s &PhysicsServer3D) space_get_direct_state(space RID) PhysicsDirectSpaceState3D

Returns the state of a space, a [PhysicsDirectSpaceState3D]. This object can be used to make collision/intersection queries.

fn (PhysicsServer3D) area_create #

fn (s &PhysicsServer3D) area_create() RID

Creates a 3D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to 1, and monitorable set to false. Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable].

fn (PhysicsServer3D) area_set_space #

fn (s &PhysicsServer3D) area_set_space(area RID, space RID)

Assigns a space to the area.

fn (PhysicsServer3D) area_get_space #

fn (s &PhysicsServer3D) area_get_space(area RID) RID

Returns the space assigned to the area.

fn (PhysicsServer3D) area_add_shape #

fn (s &PhysicsServer3D) area_add_shape(area RID, shape RID, cfg PhysicsServer3D_area_add_shape_Cfg)

Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.

fn (PhysicsServer3D) area_set_shape #

fn (s &PhysicsServer3D) area_set_shape(area RID, shape_idx i64, shape RID)

Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID].

fn (PhysicsServer3D) area_set_shape_transform #

fn (s &PhysicsServer3D) area_set_shape_transform(area RID, shape_idx i64, transform Transform3D)

Sets the transform matrix for an area shape.

fn (PhysicsServer3D) area_set_shape_disabled #

fn (s &PhysicsServer3D) area_set_shape_disabled(area RID, shape_idx i64, disabled bool)

fn (PhysicsServer3D) area_get_shape_count #

fn (s &PhysicsServer3D) area_get_shape_count(area RID) i64

Returns the number of shapes assigned to an area.

fn (PhysicsServer3D) area_get_shape #

fn (s &PhysicsServer3D) area_get_shape(area RID, shape_idx i64) RID

Returns the [RID] of the nth shape of an area.

fn (PhysicsServer3D) area_get_shape_transform #

fn (s &PhysicsServer3D) area_get_shape_transform(area RID, shape_idx i64) Transform3D

Returns the transform matrix of a shape within an area.

fn (PhysicsServer3D) area_remove_shape #

fn (s &PhysicsServer3D) area_remove_shape(area RID, shape_idx i64)

Removes a shape from an area. It does not delete the shape, so it can be reassigned later.

fn (PhysicsServer3D) area_clear_shapes #

fn (s &PhysicsServer3D) area_clear_shapes(area RID)

Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later.

fn (PhysicsServer3D) area_set_collision_layer #

fn (s &PhysicsServer3D) area_set_collision_layer(area RID, layer i64)

Assigns the area to one or many physics layers.

fn (PhysicsServer3D) area_get_collision_layer #

fn (s &PhysicsServer3D) area_get_collision_layer(area RID) i64

Returns the physics layer or layers an area belongs to.

fn (PhysicsServer3D) area_set_collision_mask #

fn (s &PhysicsServer3D) area_set_collision_mask(area RID, mask i64)

Sets which physics layers the area will monitor.

fn (PhysicsServer3D) area_get_collision_mask #

fn (s &PhysicsServer3D) area_get_collision_mask(area RID) i64

Returns the physics layer or layers an area can contact with.

fn (PhysicsServer3D) area_set_param #

fn (s &PhysicsServer3D) area_set_param(area RID, param PhysicsServer3DAreaParameter, value_ ToVariant)

Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants.

fn (PhysicsServer3D) area_set_transform #

fn (s &PhysicsServer3D) area_set_transform(area RID, transform Transform3D)

Sets the transform matrix for an area.

fn (PhysicsServer3D) area_get_param #

fn (s &PhysicsServer3D) area_get_param(area RID, param PhysicsServer3DAreaParameter) Variant

Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants.

fn (PhysicsServer3D) area_get_transform #

fn (s &PhysicsServer3D) area_get_transform(area RID) Transform3D

Returns the transform matrix for an area.

fn (PhysicsServer3D) area_attach_object_instance_id #

fn (s &PhysicsServer3D) area_attach_object_instance_id(area RID, id i64)

Assigns the area to a descendant of [Object], so it can exist in the node tree.

fn (PhysicsServer3D) area_get_object_instance_id #

fn (s &PhysicsServer3D) area_get_object_instance_id(area RID) i64

Gets the instance ID of the object the area is assigned to.

fn (PhysicsServer3D) area_set_monitor_callback #

fn (s &PhysicsServer3D) area_set_monitor_callback(area RID, callback Callable)

Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters:1. an integer status: either [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED] depending on whether the other body shape entered or exited the area,2. an [RID] body_rid: the [RID] of the body that entered or exited the area,3. an integer instance_id: the ObjectID attached to the body,4. an integer body_shape_idx: the index of the shape of the body that entered or exited the area,5. an integer self_shape_idx: the index of the shape of the area where the body entered or exited.By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time.

fn (PhysicsServer3D) area_set_area_monitor_callback #

fn (s &PhysicsServer3D) area_set_area_monitor_callback(area RID, callback Callable)

Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters:1. an integer status: either [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED] depending on whether the other area's shape entered or exited the area,2. an [RID] area_rid: the [RID] of the other area that entered or exited the area,3. an integer instance_id: the ObjectID attached to the other area,4. an integer area_shape_idx: the index of the shape of the other area that entered or exited the area,5. an integer self_shape_idx: the index of the shape of the area where the other area entered or exited.By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time.

fn (PhysicsServer3D) area_set_monitorable #

fn (s &PhysicsServer3D) area_set_monitorable(area RID, monitorable bool)

fn (PhysicsServer3D) area_set_ray_pickable #

fn (s &PhysicsServer3D) area_set_ray_pickable(area RID, enable bool)

Sets object pickable with rays.

fn (PhysicsServer3D) body_create #

fn (s &PhysicsServer3D) body_create() RID

Creates a 3D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to 1, and body mode set to [constant BODY_MODE_RIGID]. Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space.

fn (PhysicsServer3D) body_set_space #

fn (s &PhysicsServer3D) body_set_space(body RID, space RID)

Assigns a space to the body (see [method space_create]).

fn (PhysicsServer3D) body_get_space #

fn (s &PhysicsServer3D) body_get_space(body RID) RID

Returns the [RID] of the space assigned to a body.

fn (PhysicsServer3D) body_set_mode #

fn (s &PhysicsServer3D) body_set_mode(body RID, mode PhysicsServer3DBodyMode)

Sets the body mode.

fn (PhysicsServer3D) body_get_mode #

fn (s &PhysicsServer3D) body_get_mode(body RID) PhysicsServer3DBodyMode

Returns the body mode.

fn (PhysicsServer3D) body_set_collision_layer #

fn (s &PhysicsServer3D) body_set_collision_layer(body RID, layer i64)

Sets the physics layer or layers a body belongs to.

fn (PhysicsServer3D) body_get_collision_layer #

fn (s &PhysicsServer3D) body_get_collision_layer(body RID) i64

Returns the physics layer or layers a body belongs to.

fn (PhysicsServer3D) body_set_collision_mask #

fn (s &PhysicsServer3D) body_set_collision_mask(body RID, mask i64)

Sets the physics layer or layers a body can collide with.

fn (PhysicsServer3D) body_get_collision_mask #

fn (s &PhysicsServer3D) body_get_collision_mask(body RID) i64

Returns the physics layer or layers a body can collide with.

fn (PhysicsServer3D) body_set_collision_priority #

fn (s &PhysicsServer3D) body_set_collision_priority(body RID, priority f64)

Sets the body's collision priority.

fn (PhysicsServer3D) body_get_collision_priority #

fn (s &PhysicsServer3D) body_get_collision_priority(body RID) f64

Returns the body's collision priority.

fn (PhysicsServer3D) body_add_shape #

fn (s &PhysicsServer3D) body_add_shape(body RID, shape RID, cfg PhysicsServer3D_body_add_shape_Cfg)

Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.

fn (PhysicsServer3D) body_set_shape #

fn (s &PhysicsServer3D) body_set_shape(body RID, shape_idx i64, shape RID)

Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID].

fn (PhysicsServer3D) body_set_shape_transform #

fn (s &PhysicsServer3D) body_set_shape_transform(body RID, shape_idx i64, transform Transform3D)

Sets the transform matrix for a body shape.

fn (PhysicsServer3D) body_set_shape_disabled #

fn (s &PhysicsServer3D) body_set_shape_disabled(body RID, shape_idx i64, disabled bool)

fn (PhysicsServer3D) body_get_shape_count #

fn (s &PhysicsServer3D) body_get_shape_count(body RID) i64

Returns the number of shapes assigned to a body.

fn (PhysicsServer3D) body_get_shape #

fn (s &PhysicsServer3D) body_get_shape(body RID, shape_idx i64) RID

Returns the [RID] of the nth shape of a body.

fn (PhysicsServer3D) body_get_shape_transform #

fn (s &PhysicsServer3D) body_get_shape_transform(body RID, shape_idx i64) Transform3D

Returns the transform matrix of a body shape.

fn (PhysicsServer3D) body_remove_shape #

fn (s &PhysicsServer3D) body_remove_shape(body RID, shape_idx i64)

Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.

fn (PhysicsServer3D) body_clear_shapes #

fn (s &PhysicsServer3D) body_clear_shapes(body RID)

Removes all shapes from a body.

fn (PhysicsServer3D) body_attach_object_instance_id #

fn (s &PhysicsServer3D) body_attach_object_instance_id(body RID, id i64)

Assigns the area to a descendant of [Object], so it can exist in the node tree.

fn (PhysicsServer3D) body_get_object_instance_id #

fn (s &PhysicsServer3D) body_get_object_instance_id(body RID) i64

Gets the instance ID of the object the area is assigned to.

fn (PhysicsServer3D) body_set_enable_continuous_collision_detection #

fn (s &PhysicsServer3D) body_set_enable_continuous_collision_detection(body RID, enable bool)

If true, the continuous collision detection mode is enabled. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.

fn (PhysicsServer3D) body_is_continuous_collision_detection_enabled #

fn (s &PhysicsServer3D) body_is_continuous_collision_detection_enabled(body RID) bool

If true, the continuous collision detection mode is enabled.

fn (PhysicsServer3D) body_set_param #

fn (s &PhysicsServer3D) body_set_param(body RID, param PhysicsServer3DBodyParameter, value_ ToVariant)

Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants.

fn (PhysicsServer3D) body_get_param #

fn (s &PhysicsServer3D) body_get_param(body RID, param PhysicsServer3DBodyParameter) Variant

Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants.

fn (PhysicsServer3D) body_reset_mass_properties #

fn (s &PhysicsServer3D) body_reset_mass_properties(body RID)

Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param].

fn (PhysicsServer3D) body_set_state #

fn (s &PhysicsServer3D) body_set_state(body RID, state PhysicsServer3DBodyState, value_ ToVariant)

Sets a body state.

fn (PhysicsServer3D) body_get_state #

fn (s &PhysicsServer3D) body_get_state(body RID, state PhysicsServer3DBodyState) Variant

Returns a body state.

fn (PhysicsServer3D) body_apply_central_impulse #

fn (s &PhysicsServer3D) body_apply_central_impulse(body RID, impulse Vector3)

Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). This is equivalent to using [method body_apply_impulse] at the body's center of mass.

fn (PhysicsServer3D) body_apply_impulse #

fn (s &PhysicsServer3D) body_apply_impulse(body RID, impulse Vector3, cfg PhysicsServer3D_body_apply_impulse_Cfg)

Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [param position] is the offset from the body origin in global coordinates.

fn (PhysicsServer3D) body_apply_torque_impulse #

fn (s &PhysicsServer3D) body_apply_torque_impulse(body RID, impulse Vector3)

Applies a rotational impulse to the body without affecting the position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).

fn (PhysicsServer3D) body_apply_central_force #

fn (s &PhysicsServer3D) body_apply_central_force(body RID, force Vector3)

Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using [method body_apply_force] at the body's center of mass.

fn (PhysicsServer3D) body_apply_force #

fn (s &PhysicsServer3D) body_apply_force(body RID, force Vector3, cfg PhysicsServer3D_body_apply_force_Cfg)

Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. [param position] is the offset from the body origin in global coordinates.

fn (PhysicsServer3D) body_apply_torque #

fn (s &PhysicsServer3D) body_apply_torque(body RID, torque Vector3)

Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.

fn (PhysicsServer3D) body_add_constant_central_force #

fn (s &PhysicsServer3D) body_add_constant_central_force(body RID, force Vector3)

Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with body_set_constant_force(body, Vector3(0, 0, 0)). This is equivalent to using [method body_add_constant_force] at the body's center of mass.

fn (PhysicsServer3D) body_add_constant_force #

fn (s &PhysicsServer3D) body_add_constant_force(body RID, force Vector3, cfg PhysicsServer3D_body_add_constant_force_Cfg)

Adds a constant positioned force to the body that keeps being applied over time until cleared with body_set_constant_force(body, Vector3(0, 0, 0)). [param position] is the offset from the body origin in global coordinates.

fn (PhysicsServer3D) body_add_constant_torque #

fn (s &PhysicsServer3D) body_add_constant_torque(body RID, torque Vector3)

Adds a constant rotational force without affecting position that keeps being applied over time until cleared with body_set_constant_torque(body, Vector3(0, 0, 0)).

fn (PhysicsServer3D) body_set_constant_force #

fn (s &PhysicsServer3D) body_set_constant_force(body RID, force Vector3)

Sets the body's total constant positional forces applied during each physics update. See [method body_add_constant_force] and [method body_add_constant_central_force].

fn (PhysicsServer3D) body_get_constant_force #

fn (s &PhysicsServer3D) body_get_constant_force(body RID) Vector3

Returns the body's total constant positional forces applied during each physics update. See [method body_add_constant_force] and [method body_add_constant_central_force].

fn (PhysicsServer3D) body_set_constant_torque #

fn (s &PhysicsServer3D) body_set_constant_torque(body RID, torque Vector3)

Sets the body's total constant rotational forces applied during each physics update. See [method body_add_constant_torque].

fn (PhysicsServer3D) body_get_constant_torque #

fn (s &PhysicsServer3D) body_get_constant_torque(body RID) Vector3

Returns the body's total constant rotational forces applied during each physics update. See [method body_add_constant_torque].

fn (PhysicsServer3D) body_set_axis_velocity #

fn (s &PhysicsServer3D) body_set_axis_velocity(body RID, axis_velocity Vector3)

Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.

fn (PhysicsServer3D) body_set_axis_lock #

fn (s &PhysicsServer3D) body_set_axis_lock(body RID, axis PhysicsServer3DBodyAxis, gd_lock bool)

fn (PhysicsServer3D) body_is_axis_locked #

fn (s &PhysicsServer3D) body_is_axis_locked(body RID, axis PhysicsServer3DBodyAxis) bool

fn (PhysicsServer3D) body_add_collision_exception #

fn (s &PhysicsServer3D) body_add_collision_exception(body RID, excepted_body RID)

Adds a body to the list of bodies exempt from collisions.

fn (PhysicsServer3D) body_remove_collision_exception #

fn (s &PhysicsServer3D) body_remove_collision_exception(body RID, excepted_body RID)

Removes a body from the list of bodies exempt from collisions. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.

fn (PhysicsServer3D) body_set_max_contacts_reported #

fn (s &PhysicsServer3D) body_set_max_contacts_reported(body RID, amount i64)

Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0.

fn (PhysicsServer3D) body_get_max_contacts_reported #

fn (s &PhysicsServer3D) body_get_max_contacts_reported(body RID) i64

Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported].

fn (PhysicsServer3D) body_set_omit_force_integration #

fn (s &PhysicsServer3D) body_set_omit_force_integration(body RID, enable bool)

Sets whether the body omits the standard force integration. If [param enable] is true, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, [method body_set_force_integration_callback] can be used to manually update the linear and angular velocity instead. This method is called when the property [member RigidBody3D.custom_integrator] is set.

fn (PhysicsServer3D) body_is_omitting_force_integration #

fn (s &PhysicsServer3D) body_is_omitting_force_integration(body RID) bool

Returns true if the body is omitting the standard force integration. See [method body_set_omit_force_integration].

fn (PhysicsServer3D) body_set_state_sync_callback #

fn (s &PhysicsServer3D) body_set_state_sync_callback(body RID, callable Callable)

Sets the body's state synchronization callback function to [param callable]. Use an empty [Callable] ([code skip-lint]Callable()) to clear the callback. The function [param callable] will be called every physics frame, assuming that the body was active during the previous physics tick, and can be used to fetch the latest state from the physics server. The function [param callable] must take the following parameters:1. state`: a [PhysicsDirectBodyState3D], used to retrieve the body's state.

fn (PhysicsServer3D) body_set_force_integration_callback #

fn (s &PhysicsServer3D) body_set_force_integration_callback(body RID, callable Callable, cfg PhysicsServer3D_body_set_force_integration_callback_Cfg)

Sets the body's custom force integration callback function to [param callable]. Use an empty [Callable] ([code skip-lint]Callable()) to clear the custom callback. The function [param callable] will be called every physics tick, before the standard force integration (see [method body_set_omit_force_integration]). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. If [param userdata] is not null, the function [param callable] must take the following two parameters:1. state: a [PhysicsDirectBodyState3D], used to retrieve and modify the body's state, 2. [code skip-lint]userdata: a [Variant]; its value will be the [param userdata] passed into this method.If [param userdata] is null, then [param callable] must take only the state parameter.

fn (PhysicsServer3D) body_set_ray_pickable #

fn (s &PhysicsServer3D) body_set_ray_pickable(body RID, enable bool)

Sets the body pickable with rays if [param enable] is set.

fn (PhysicsServer3D) body_test_motion #

fn (s &PhysicsServer3D) body_test_motion(body RID, parameters PhysicsTestMotionParameters3D, cfg PhysicsServer3D_body_test_motion_Cfg) bool

Returns true if a collision would result from moving along a motion vector from a given point in space. [PhysicsTestMotionParameters3D] is passed to set motion parameters. [PhysicsTestMotionResult3D] can be passed to return additional information.

fn (PhysicsServer3D) body_get_direct_state #

fn (s &PhysicsServer3D) body_get_direct_state(body RID) PhysicsDirectBodyState3D

Returns the [PhysicsDirectBodyState3D] of the body. Returns null if the body is destroyed or removed from the physics space.

fn (PhysicsServer3D) soft_body_create #

fn (s &PhysicsServer3D) soft_body_create() RID

Creates a new soft body and returns its internal [RID].

fn (PhysicsServer3D) soft_body_update_rendering_server #

fn (s &PhysicsServer3D) soft_body_update_rendering_server(body RID, rendering_server_handler PhysicsServer3DRenderingServerHandler)

Requests that the physics server updates the rendering server with the latest positions of the given soft body's points through the [param rendering_server_handler] interface.

fn (PhysicsServer3D) soft_body_set_space #

fn (s &PhysicsServer3D) soft_body_set_space(body RID, space RID)

Assigns a space to the given soft body (see [method space_create]).

fn (PhysicsServer3D) soft_body_get_space #

fn (s &PhysicsServer3D) soft_body_get_space(body RID) RID

Returns the [RID] of the space assigned to the given soft body.

fn (PhysicsServer3D) soft_body_set_mesh #

fn (s &PhysicsServer3D) soft_body_set_mesh(body RID, mesh RID)

Sets the mesh of the given soft body.

fn (PhysicsServer3D) soft_body_get_bounds #

fn (s &PhysicsServer3D) soft_body_get_bounds(body RID) AABB

Returns the bounds of the given soft body in global coordinates.

fn (PhysicsServer3D) soft_body_set_collision_layer #

fn (s &PhysicsServer3D) soft_body_set_collision_layer(body RID, layer i64)

Sets the physics layer or layers the given soft body belongs to.

fn (PhysicsServer3D) soft_body_get_collision_layer #

fn (s &PhysicsServer3D) soft_body_get_collision_layer(body RID) i64

Returns the physics layer or layers that the given soft body belongs to.

fn (PhysicsServer3D) soft_body_set_collision_mask #

fn (s &PhysicsServer3D) soft_body_set_collision_mask(body RID, mask i64)

Sets the physics layer or layers the given soft body can collide with.

fn (PhysicsServer3D) soft_body_get_collision_mask #

fn (s &PhysicsServer3D) soft_body_get_collision_mask(body RID) i64

Returns the physics layer or layers that the given soft body can collide with.

fn (PhysicsServer3D) soft_body_add_collision_exception #

fn (s &PhysicsServer3D) soft_body_add_collision_exception(body RID, body_b RID)

Adds the given body to the list of bodies exempt from collisions.

fn (PhysicsServer3D) soft_body_remove_collision_exception #

fn (s &PhysicsServer3D) soft_body_remove_collision_exception(body RID, body_b RID)

Removes the given body from the list of bodies exempt from collisions.

fn (PhysicsServer3D) soft_body_set_state #

fn (s &PhysicsServer3D) soft_body_set_state(body RID, state PhysicsServer3DBodyState, variant_ ToVariant)

Sets the given body state for the given body. [b]Note:[/b] Godot's default physics implementation does not support [constant BODY_STATE_LINEAR_VELOCITY], [constant BODY_STATE_ANGULAR_VELOCITY], [constant BODY_STATE_SLEEPING], or [constant BODY_STATE_CAN_SLEEP].

fn (PhysicsServer3D) soft_body_get_state #

fn (s &PhysicsServer3D) soft_body_get_state(body RID, state PhysicsServer3DBodyState) Variant

Returns the given soft body state. [b]Note:[/b] Godot's default physics implementation does not support [constant BODY_STATE_LINEAR_VELOCITY], [constant BODY_STATE_ANGULAR_VELOCITY], [constant BODY_STATE_SLEEPING], or [constant BODY_STATE_CAN_SLEEP].

fn (PhysicsServer3D) soft_body_set_transform #

fn (s &PhysicsServer3D) soft_body_set_transform(body RID, transform Transform3D)

Sets the global transform of the given soft body.

fn (PhysicsServer3D) soft_body_set_ray_pickable #

fn (s &PhysicsServer3D) soft_body_set_ray_pickable(body RID, enable bool)

Sets whether the given soft body will be pickable when using object picking.

fn (PhysicsServer3D) soft_body_set_simulation_precision #

fn (s &PhysicsServer3D) soft_body_set_simulation_precision(body RID, simulation_precision i64)

Sets the simulation precision of the given soft body. Increasing this value will improve the resulting simulation, but can affect performance. Use with care.

fn (PhysicsServer3D) soft_body_get_simulation_precision #

fn (s &PhysicsServer3D) soft_body_get_simulation_precision(body RID) i64

Returns the simulation precision of the given soft body.

fn (PhysicsServer3D) soft_body_set_total_mass #

fn (s &PhysicsServer3D) soft_body_set_total_mass(body RID, total_mass f64)

Sets the total mass for the given soft body.

fn (PhysicsServer3D) soft_body_get_total_mass #

fn (s &PhysicsServer3D) soft_body_get_total_mass(body RID) f64

Returns the total mass assigned to the given soft body.

fn (PhysicsServer3D) soft_body_set_linear_stiffness #

fn (s &PhysicsServer3D) soft_body_set_linear_stiffness(body RID, stiffness f64)

Sets the linear stiffness of the given soft body. Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between 0.0 and 1.0 (inclusive).

fn (PhysicsServer3D) soft_body_get_linear_stiffness #

fn (s &PhysicsServer3D) soft_body_get_linear_stiffness(body RID) f64

Returns the linear stiffness of the given soft body.

fn (PhysicsServer3D) soft_body_set_shrinking_factor #

fn (s &PhysicsServer3D) soft_body_set_shrinking_factor(body RID, shrinking_factor f64)

Sets the shrinking factor of the given soft body.

fn (PhysicsServer3D) soft_body_get_shrinking_factor #

fn (s &PhysicsServer3D) soft_body_get_shrinking_factor(body RID) f64

Returns the shrinking factor of the given soft body.

fn (PhysicsServer3D) soft_body_set_pressure_coefficient #

fn (s &PhysicsServer3D) soft_body_set_pressure_coefficient(body RID, pressure_coefficient f64)

Sets the pressure coefficient of the given soft body. Simulates pressure build-up from inside this body. Higher values increase the strength of this effect.

fn (PhysicsServer3D) soft_body_get_pressure_coefficient #

fn (s &PhysicsServer3D) soft_body_get_pressure_coefficient(body RID) f64

Returns the pressure coefficient of the given soft body.

fn (PhysicsServer3D) soft_body_set_damping_coefficient #

fn (s &PhysicsServer3D) soft_body_set_damping_coefficient(body RID, damping_coefficient f64)

Sets the damping coefficient of the given soft body. Higher values will slow down the body more noticeably when forces are applied.

fn (PhysicsServer3D) soft_body_get_damping_coefficient #

fn (s &PhysicsServer3D) soft_body_get_damping_coefficient(body RID) f64

Returns the damping coefficient of the given soft body.

fn (PhysicsServer3D) soft_body_set_drag_coefficient #

fn (s &PhysicsServer3D) soft_body_set_drag_coefficient(body RID, drag_coefficient f64)

Sets the drag coefficient of the given soft body. Higher values increase this body's air resistance. [b]Note:[/b] This value is currently unused by Godot's default physics implementation.

fn (PhysicsServer3D) soft_body_get_drag_coefficient #

fn (s &PhysicsServer3D) soft_body_get_drag_coefficient(body RID) f64

Returns the drag coefficient of the given soft body.

fn (PhysicsServer3D) soft_body_move_point #

fn (s &PhysicsServer3D) soft_body_move_point(body RID, point_index i64, global_position Vector3)

Moves the given soft body point to a position in global coordinates.

fn (PhysicsServer3D) soft_body_get_point_global_position #

fn (s &PhysicsServer3D) soft_body_get_point_global_position(body RID, point_index i64) Vector3

Returns the current position of the given soft body point in global coordinates.

fn (PhysicsServer3D) soft_body_remove_all_pinned_points #

fn (s &PhysicsServer3D) soft_body_remove_all_pinned_points(body RID)

Unpins all points of the given soft body.

fn (PhysicsServer3D) soft_body_pin_point #

fn (s &PhysicsServer3D) soft_body_pin_point(body RID, point_index i64, pin bool)

Pins or unpins the given soft body point based on the value of [param pin]. [b]Note:[/b] Pinning a point effectively makes it kinematic, preventing it from being affected by forces, but you can still move it using [method soft_body_move_point].

fn (PhysicsServer3D) soft_body_is_point_pinned #

fn (s &PhysicsServer3D) soft_body_is_point_pinned(body RID, point_index i64) bool

Returns whether the given soft body point is pinned.

fn (PhysicsServer3D) soft_body_apply_point_impulse #

fn (s &PhysicsServer3D) soft_body_apply_point_impulse(body RID, point_index i64, impulse Vector3)

Applies an impulse to a point. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).

fn (PhysicsServer3D) soft_body_apply_point_force #

fn (s &PhysicsServer3D) soft_body_apply_point_force(body RID, point_index i64, force Vector3)

Applies a force to a point. A force is time dependent and meant to be applied every physics update.

fn (PhysicsServer3D) soft_body_apply_central_impulse #

fn (s &PhysicsServer3D) soft_body_apply_central_impulse(body RID, impulse Vector3)

Distributes and applies an impulse to all points. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).

fn (PhysicsServer3D) soft_body_apply_central_force #

fn (s &PhysicsServer3D) soft_body_apply_central_force(body RID, force Vector3)

Distributes and applies a force to all points. A force is time dependent and meant to be applied every physics update.

fn (PhysicsServer3D) joint_create #

fn (s &PhysicsServer3D) joint_create() RID

fn (PhysicsServer3D) joint_clear #

fn (s &PhysicsServer3D) joint_clear(joint RID)

fn (PhysicsServer3D) joint_make_pin #

fn (s &PhysicsServer3D) joint_make_pin(joint RID, body_a RID, local_a Vector3, body_b RID, local_b Vector3)

fn (PhysicsServer3D) pin_joint_set_param #

fn (s &PhysicsServer3D) pin_joint_set_param(joint RID, param PhysicsServer3DPinJointParam, value f64)

Sets a pin joint parameter.

fn (PhysicsServer3D) pin_joint_get_param #

fn (s &PhysicsServer3D) pin_joint_get_param(joint RID, param PhysicsServer3DPinJointParam) f64

Gets a pin joint parameter.

fn (PhysicsServer3D) pin_joint_set_local_a #

fn (s &PhysicsServer3D) pin_joint_set_local_a(joint RID, local_a Vector3)

Sets position of the joint in the local space of body a of the joint.

fn (PhysicsServer3D) pin_joint_get_local_a #

fn (s &PhysicsServer3D) pin_joint_get_local_a(joint RID) Vector3

Returns position of the joint in the local space of body a of the joint.

fn (PhysicsServer3D) pin_joint_set_local_b #

fn (s &PhysicsServer3D) pin_joint_set_local_b(joint RID, local_b Vector3)

Sets position of the joint in the local space of body b of the joint.

fn (PhysicsServer3D) pin_joint_get_local_b #

fn (s &PhysicsServer3D) pin_joint_get_local_b(joint RID) Vector3

Returns position of the joint in the local space of body b of the joint.

fn (PhysicsServer3D) joint_make_hinge #

fn (s &PhysicsServer3D) joint_make_hinge(joint RID, body_a RID, hinge_a Transform3D, body_b RID, hinge_b Transform3D)

fn (PhysicsServer3D) hinge_joint_set_param #

fn (s &PhysicsServer3D) hinge_joint_set_param(joint RID, param PhysicsServer3DHingeJointParam, value f64)

Sets a hinge joint parameter.

fn (PhysicsServer3D) hinge_joint_get_param #

fn (s &PhysicsServer3D) hinge_joint_get_param(joint RID, param PhysicsServer3DHingeJointParam) f64

Gets a hinge joint parameter.

fn (PhysicsServer3D) hinge_joint_set_flag #

fn (s &PhysicsServer3D) hinge_joint_set_flag(joint RID, flag PhysicsServer3DHingeJointFlag, enabled bool)

Sets a hinge joint flag.

fn (PhysicsServer3D) hinge_joint_get_flag #

fn (s &PhysicsServer3D) hinge_joint_get_flag(joint RID, flag PhysicsServer3DHingeJointFlag) bool

Gets a hinge joint flag.

fn (PhysicsServer3D) joint_make_slider #

fn (s &PhysicsServer3D) joint_make_slider(joint RID, body_a RID, local_ref_a Transform3D, body_b RID, local_ref_b Transform3D)

fn (PhysicsServer3D) slider_joint_set_param #

fn (s &PhysicsServer3D) slider_joint_set_param(joint RID, param PhysicsServer3DSliderJointParam, value f64)

Gets a slider joint parameter.

fn (PhysicsServer3D) slider_joint_get_param #

fn (s &PhysicsServer3D) slider_joint_get_param(joint RID, param PhysicsServer3DSliderJointParam) f64

Gets a slider joint parameter.

fn (PhysicsServer3D) joint_make_cone_twist #

fn (s &PhysicsServer3D) joint_make_cone_twist(joint RID, body_a RID, local_ref_a Transform3D, body_b RID, local_ref_b Transform3D)

fn (PhysicsServer3D) cone_twist_joint_set_param #

fn (s &PhysicsServer3D) cone_twist_joint_set_param(joint RID, param PhysicsServer3DConeTwistJointParam, value f64)

Sets a cone twist joint parameter.

fn (PhysicsServer3D) cone_twist_joint_get_param #

fn (s &PhysicsServer3D) cone_twist_joint_get_param(joint RID, param PhysicsServer3DConeTwistJointParam) f64

Gets a cone twist joint parameter.

fn (PhysicsServer3D) joint_get_type #

fn (s &PhysicsServer3D) joint_get_type(joint RID) PhysicsServer3DJointType

Returns the type of the Joint3D.

fn (PhysicsServer3D) joint_set_solver_priority #

fn (s &PhysicsServer3D) joint_set_solver_priority(joint RID, priority i64)

Sets the priority value of the Joint3D.

fn (PhysicsServer3D) joint_get_solver_priority #

fn (s &PhysicsServer3D) joint_get_solver_priority(joint RID) i64

Gets the priority value of the Joint3D.

fn (PhysicsServer3D) joint_disable_collisions_between_bodies #

fn (s &PhysicsServer3D) joint_disable_collisions_between_bodies(joint RID, disable bool)

Sets whether the bodies attached to the [Joint3D] will collide with each other.

fn (PhysicsServer3D) joint_is_disabled_collisions_between_bodies #

fn (s &PhysicsServer3D) joint_is_disabled_collisions_between_bodies(joint RID) bool

Returns whether the bodies attached to the [Joint3D] will collide with each other.

fn (PhysicsServer3D) joint_make_generic_6dof #

fn (s &PhysicsServer3D) joint_make_generic_6dof(joint RID, body_a RID, local_ref_a Transform3D, body_b RID, local_ref_b Transform3D)

Make the joint a generic six degrees of freedom (6DOF) joint. Use [method generic_6dof_joint_set_flag] and [method generic_6dof_joint_set_param] to set the joint's flags and parameters respectively.

fn (PhysicsServer3D) generic_6dof_joint_set_param #

fn (s &PhysicsServer3D) generic_6dof_joint_set_param(joint RID, axis Vector3Axis, param PhysicsServer3DG6DOFJointAxisParam, value f64)

Sets the value of a given generic 6DOF joint parameter.

fn (PhysicsServer3D) generic_6dof_joint_get_param #

fn (s &PhysicsServer3D) generic_6dof_joint_get_param(joint RID, axis Vector3Axis, param PhysicsServer3DG6DOFJointAxisParam) f64

Returns the value of a generic 6DOF joint parameter.

fn (PhysicsServer3D) generic_6dof_joint_set_flag #

fn (s &PhysicsServer3D) generic_6dof_joint_set_flag(joint RID, axis Vector3Axis, flag PhysicsServer3DG6DOFJointAxisFlag, enable bool)

Sets the value of a given generic 6DOF joint flag.

fn (PhysicsServer3D) generic_6dof_joint_get_flag #

fn (s &PhysicsServer3D) generic_6dof_joint_get_flag(joint RID, axis Vector3Axis, flag PhysicsServer3DG6DOFJointAxisFlag) bool

Returns the value of a generic 6DOF joint flag.

fn (PhysicsServer3D) free_rid #

fn (s &PhysicsServer3D) free_rid(rid RID)

Destroys any of the objects created by PhysicsServer3D. If the [RID] passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console.

fn (PhysicsServer3D) set_active #

fn (s &PhysicsServer3D) set_active(active bool)

Activates or deactivates the 3D physics engine.

fn (PhysicsServer3D) get_process_info #

fn (s &PhysicsServer3D) get_process_info(process_info PhysicsServer3DProcessInfo) i64

Returns the value of a physics engine state specified by [param process_info].

struct PhysicsServer3DExtension #

struct PhysicsServer3DExtension {
	PhysicsServer3D
}

Provides virtual methods that can be overridden to create custom [PhysicsServer3D] implementations.

fn (PhysicsServer3DExtension) to_variant #

fn (s &PhysicsServer3DExtension) to_variant() Variant

fn (PhysicsServer3DExtension) from_variant #

fn (mut s PhysicsServer3DExtension) from_variant(variant &Variant)

fn (PhysicsServer3DExtension) gd_world_boundary_shape_create #

fn (s &PhysicsServer3DExtension) gd_world_boundary_shape_create() RID

fn (PhysicsServer3DExtension) gd_separation_ray_shape_create #

fn (s &PhysicsServer3DExtension) gd_separation_ray_shape_create() RID

fn (PhysicsServer3DExtension) gd_sphere_shape_create #

fn (s &PhysicsServer3DExtension) gd_sphere_shape_create() RID

fn (PhysicsServer3DExtension) gd_box_shape_create #

fn (s &PhysicsServer3DExtension) gd_box_shape_create() RID

fn (PhysicsServer3DExtension) gd_capsule_shape_create #

fn (s &PhysicsServer3DExtension) gd_capsule_shape_create() RID

fn (PhysicsServer3DExtension) gd_cylinder_shape_create #

fn (s &PhysicsServer3DExtension) gd_cylinder_shape_create() RID

fn (PhysicsServer3DExtension) gd_convex_polygon_shape_create #

fn (s &PhysicsServer3DExtension) gd_convex_polygon_shape_create() RID

fn (PhysicsServer3DExtension) gd_concave_polygon_shape_create #

fn (s &PhysicsServer3DExtension) gd_concave_polygon_shape_create() RID

fn (PhysicsServer3DExtension) gd_heightmap_shape_create #

fn (s &PhysicsServer3DExtension) gd_heightmap_shape_create() RID

fn (PhysicsServer3DExtension) gd_custom_shape_create #

fn (s &PhysicsServer3DExtension) gd_custom_shape_create() RID

fn (PhysicsServer3DExtension) gd_shape_set_data #

fn (s &PhysicsServer3DExtension) gd_shape_set_data(shape RID, data_ ToVariant)

fn (PhysicsServer3DExtension) gd_shape_set_custom_solver_bias #

fn (s &PhysicsServer3DExtension) gd_shape_set_custom_solver_bias(shape RID, bias f64)

fn (PhysicsServer3DExtension) gd_shape_set_margin #

fn (s &PhysicsServer3DExtension) gd_shape_set_margin(shape RID, margin f64)

fn (PhysicsServer3DExtension) gd_shape_get_margin #

fn (s &PhysicsServer3DExtension) gd_shape_get_margin(shape RID) f64

fn (PhysicsServer3DExtension) gd_shape_get_type #

fn (s &PhysicsServer3DExtension) gd_shape_get_type(shape RID) PhysicsServer3DShapeType

fn (PhysicsServer3DExtension) gd_shape_get_data #

fn (s &PhysicsServer3DExtension) gd_shape_get_data(shape RID) Variant

fn (PhysicsServer3DExtension) gd_shape_get_custom_solver_bias #

fn (s &PhysicsServer3DExtension) gd_shape_get_custom_solver_bias(shape RID) f64

fn (PhysicsServer3DExtension) gd_space_create #

fn (s &PhysicsServer3DExtension) gd_space_create() RID

fn (PhysicsServer3DExtension) gd_space_set_active #

fn (s &PhysicsServer3DExtension) gd_space_set_active(space RID, active bool)

fn (PhysicsServer3DExtension) gd_space_is_active #

fn (s &PhysicsServer3DExtension) gd_space_is_active(space RID) bool

fn (PhysicsServer3DExtension) gd_space_set_param #

fn (s &PhysicsServer3DExtension) gd_space_set_param(space RID, param PhysicsServer3DSpaceParameter, value f64)

fn (PhysicsServer3DExtension) gd_space_get_param #

fn (s &PhysicsServer3DExtension) gd_space_get_param(space RID, param PhysicsServer3DSpaceParameter) f64

fn (PhysicsServer3DExtension) gd_space_get_direct_state #

fn (s &PhysicsServer3DExtension) gd_space_get_direct_state(space RID) PhysicsDirectSpaceState3D

fn (PhysicsServer3DExtension) gd_space_set_debug_contacts #

fn (s &PhysicsServer3DExtension) gd_space_set_debug_contacts(space RID, max_contacts i64)

fn (PhysicsServer3DExtension) gd_space_get_contacts #

fn (s &PhysicsServer3DExtension) gd_space_get_contacts(space RID) PackedVector3Array

fn (PhysicsServer3DExtension) gd_space_get_contact_count #

fn (s &PhysicsServer3DExtension) gd_space_get_contact_count(space RID) i64

fn (PhysicsServer3DExtension) gd_area_create #

fn (s &PhysicsServer3DExtension) gd_area_create() RID

fn (PhysicsServer3DExtension) gd_area_set_space #

fn (s &PhysicsServer3DExtension) gd_area_set_space(area RID, space RID)

fn (PhysicsServer3DExtension) gd_area_get_space #

fn (s &PhysicsServer3DExtension) gd_area_get_space(area RID) RID

fn (PhysicsServer3DExtension) gd_area_add_shape #

fn (s &PhysicsServer3DExtension) gd_area_add_shape(area RID, shape RID, transform Transform3D, disabled bool)

fn (PhysicsServer3DExtension) gd_area_set_shape #

fn (s &PhysicsServer3DExtension) gd_area_set_shape(area RID, shape_idx i64, shape RID)

fn (PhysicsServer3DExtension) gd_area_set_shape_transform #

fn (s &PhysicsServer3DExtension) gd_area_set_shape_transform(area RID, shape_idx i64, transform Transform3D)

fn (PhysicsServer3DExtension) gd_area_set_shape_disabled #

fn (s &PhysicsServer3DExtension) gd_area_set_shape_disabled(area RID, shape_idx i64, disabled bool)

fn (PhysicsServer3DExtension) gd_area_get_shape_count #

fn (s &PhysicsServer3DExtension) gd_area_get_shape_count(area RID) i64

fn (PhysicsServer3DExtension) gd_area_get_shape #

fn (s &PhysicsServer3DExtension) gd_area_get_shape(area RID, shape_idx i64) RID

fn (PhysicsServer3DExtension) gd_area_get_shape_transform #

fn (s &PhysicsServer3DExtension) gd_area_get_shape_transform(area RID, shape_idx i64) Transform3D

fn (PhysicsServer3DExtension) gd_area_remove_shape #

fn (s &PhysicsServer3DExtension) gd_area_remove_shape(area RID, shape_idx i64)

fn (PhysicsServer3DExtension) gd_area_clear_shapes #

fn (s &PhysicsServer3DExtension) gd_area_clear_shapes(area RID)

fn (PhysicsServer3DExtension) gd_area_attach_object_instance_id #

fn (s &PhysicsServer3DExtension) gd_area_attach_object_instance_id(area RID, id i64)

fn (PhysicsServer3DExtension) gd_area_get_object_instance_id #

fn (s &PhysicsServer3DExtension) gd_area_get_object_instance_id(area RID) i64

fn (PhysicsServer3DExtension) gd_area_set_param #

fn (s &PhysicsServer3DExtension) gd_area_set_param(area RID, param PhysicsServer3DAreaParameter, value_ ToVariant)

fn (PhysicsServer3DExtension) gd_area_set_transform #

fn (s &PhysicsServer3DExtension) gd_area_set_transform(area RID, transform Transform3D)

fn (PhysicsServer3DExtension) gd_area_get_param #

fn (s &PhysicsServer3DExtension) gd_area_get_param(area RID, param PhysicsServer3DAreaParameter) Variant

fn (PhysicsServer3DExtension) gd_area_get_transform #

fn (s &PhysicsServer3DExtension) gd_area_get_transform(area RID) Transform3D

fn (PhysicsServer3DExtension) gd_area_set_collision_layer #

fn (s &PhysicsServer3DExtension) gd_area_set_collision_layer(area RID, layer i64)

fn (PhysicsServer3DExtension) gd_area_get_collision_layer #

fn (s &PhysicsServer3DExtension) gd_area_get_collision_layer(area RID) i64

fn (PhysicsServer3DExtension) gd_area_set_collision_mask #

fn (s &PhysicsServer3DExtension) gd_area_set_collision_mask(area RID, mask i64)

fn (PhysicsServer3DExtension) gd_area_get_collision_mask #

fn (s &PhysicsServer3DExtension) gd_area_get_collision_mask(area RID) i64

fn (PhysicsServer3DExtension) gd_area_set_monitorable #

fn (s &PhysicsServer3DExtension) gd_area_set_monitorable(area RID, monitorable bool)

fn (PhysicsServer3DExtension) gd_area_set_ray_pickable #

fn (s &PhysicsServer3DExtension) gd_area_set_ray_pickable(area RID, enable bool)

fn (PhysicsServer3DExtension) gd_area_set_monitor_callback #

fn (s &PhysicsServer3DExtension) gd_area_set_monitor_callback(area RID, callback Callable)

fn (PhysicsServer3DExtension) gd_area_set_area_monitor_callback #

fn (s &PhysicsServer3DExtension) gd_area_set_area_monitor_callback(area RID, callback Callable)

fn (PhysicsServer3DExtension) gd_body_create #

fn (s &PhysicsServer3DExtension) gd_body_create() RID

fn (PhysicsServer3DExtension) gd_body_set_space #

fn (s &PhysicsServer3DExtension) gd_body_set_space(body RID, space RID)

fn (PhysicsServer3DExtension) gd_body_get_space #

fn (s &PhysicsServer3DExtension) gd_body_get_space(body RID) RID

fn (PhysicsServer3DExtension) gd_body_set_mode #

fn (s &PhysicsServer3DExtension) gd_body_set_mode(body RID, mode PhysicsServer3DBodyMode)

fn (PhysicsServer3DExtension) gd_body_get_mode #

fn (s &PhysicsServer3DExtension) gd_body_get_mode(body RID) PhysicsServer3DBodyMode

fn (PhysicsServer3DExtension) gd_body_add_shape #

fn (s &PhysicsServer3DExtension) gd_body_add_shape(body RID, shape RID, transform Transform3D, disabled bool)

fn (PhysicsServer3DExtension) gd_body_set_shape #

fn (s &PhysicsServer3DExtension) gd_body_set_shape(body RID, shape_idx i64, shape RID)

fn (PhysicsServer3DExtension) gd_body_set_shape_transform #

fn (s &PhysicsServer3DExtension) gd_body_set_shape_transform(body RID, shape_idx i64, transform Transform3D)

fn (PhysicsServer3DExtension) gd_body_set_shape_disabled #

fn (s &PhysicsServer3DExtension) gd_body_set_shape_disabled(body RID, shape_idx i64, disabled bool)

fn (PhysicsServer3DExtension) gd_body_get_shape_count #

fn (s &PhysicsServer3DExtension) gd_body_get_shape_count(body RID) i64

fn (PhysicsServer3DExtension) gd_body_get_shape #

fn (s &PhysicsServer3DExtension) gd_body_get_shape(body RID, shape_idx i64) RID

fn (PhysicsServer3DExtension) gd_body_get_shape_transform #

fn (s &PhysicsServer3DExtension) gd_body_get_shape_transform(body RID, shape_idx i64) Transform3D

fn (PhysicsServer3DExtension) gd_body_remove_shape #

fn (s &PhysicsServer3DExtension) gd_body_remove_shape(body RID, shape_idx i64)

fn (PhysicsServer3DExtension) gd_body_clear_shapes #

fn (s &PhysicsServer3DExtension) gd_body_clear_shapes(body RID)

fn (PhysicsServer3DExtension) gd_body_attach_object_instance_id #

fn (s &PhysicsServer3DExtension) gd_body_attach_object_instance_id(body RID, id i64)

fn (PhysicsServer3DExtension) gd_body_get_object_instance_id #

fn (s &PhysicsServer3DExtension) gd_body_get_object_instance_id(body RID) i64

fn (PhysicsServer3DExtension) gd_body_set_enable_continuous_collision_detection #

fn (s &PhysicsServer3DExtension) gd_body_set_enable_continuous_collision_detection(body RID, enable bool)

fn (PhysicsServer3DExtension) gd_body_is_continuous_collision_detection_enabled #

fn (s &PhysicsServer3DExtension) gd_body_is_continuous_collision_detection_enabled(body RID) bool

fn (PhysicsServer3DExtension) gd_body_set_collision_layer #

fn (s &PhysicsServer3DExtension) gd_body_set_collision_layer(body RID, layer i64)

fn (PhysicsServer3DExtension) gd_body_get_collision_layer #

fn (s &PhysicsServer3DExtension) gd_body_get_collision_layer(body RID) i64

fn (PhysicsServer3DExtension) gd_body_set_collision_mask #

fn (s &PhysicsServer3DExtension) gd_body_set_collision_mask(body RID, mask i64)

fn (PhysicsServer3DExtension) gd_body_get_collision_mask #

fn (s &PhysicsServer3DExtension) gd_body_get_collision_mask(body RID) i64

fn (PhysicsServer3DExtension) gd_body_set_collision_priority #

fn (s &PhysicsServer3DExtension) gd_body_set_collision_priority(body RID, priority f64)

fn (PhysicsServer3DExtension) gd_body_get_collision_priority #

fn (s &PhysicsServer3DExtension) gd_body_get_collision_priority(body RID) f64

fn (PhysicsServer3DExtension) gd_body_set_user_flags #

fn (s &PhysicsServer3DExtension) gd_body_set_user_flags(body RID, flags i64)

fn (PhysicsServer3DExtension) gd_body_get_user_flags #

fn (s &PhysicsServer3DExtension) gd_body_get_user_flags(body RID) i64

fn (PhysicsServer3DExtension) gd_body_set_param #

fn (s &PhysicsServer3DExtension) gd_body_set_param(body RID, param PhysicsServer3DBodyParameter, value_ ToVariant)

fn (PhysicsServer3DExtension) gd_body_get_param #

fn (s &PhysicsServer3DExtension) gd_body_get_param(body RID, param PhysicsServer3DBodyParameter) Variant

fn (PhysicsServer3DExtension) gd_body_reset_mass_properties #

fn (s &PhysicsServer3DExtension) gd_body_reset_mass_properties(body RID)

fn (PhysicsServer3DExtension) gd_body_set_state #

fn (s &PhysicsServer3DExtension) gd_body_set_state(body RID, state PhysicsServer3DBodyState, value_ ToVariant)

fn (PhysicsServer3DExtension) gd_body_get_state #

fn (s &PhysicsServer3DExtension) gd_body_get_state(body RID, state PhysicsServer3DBodyState) Variant

fn (PhysicsServer3DExtension) gd_body_apply_central_impulse #

fn (s &PhysicsServer3DExtension) gd_body_apply_central_impulse(body RID, impulse Vector3)

fn (PhysicsServer3DExtension) gd_body_apply_impulse #

fn (s &PhysicsServer3DExtension) gd_body_apply_impulse(body RID, impulse Vector3, position Vector3)

fn (PhysicsServer3DExtension) gd_body_apply_torque_impulse #

fn (s &PhysicsServer3DExtension) gd_body_apply_torque_impulse(body RID, impulse Vector3)

fn (PhysicsServer3DExtension) gd_body_apply_central_force #

fn (s &PhysicsServer3DExtension) gd_body_apply_central_force(body RID, force Vector3)

fn (PhysicsServer3DExtension) gd_body_apply_force #

fn (s &PhysicsServer3DExtension) gd_body_apply_force(body RID, force Vector3, position Vector3)

fn (PhysicsServer3DExtension) gd_body_apply_torque #

fn (s &PhysicsServer3DExtension) gd_body_apply_torque(body RID, torque Vector3)

fn (PhysicsServer3DExtension) gd_body_add_constant_central_force #

fn (s &PhysicsServer3DExtension) gd_body_add_constant_central_force(body RID, force Vector3)

fn (PhysicsServer3DExtension) gd_body_add_constant_force #

fn (s &PhysicsServer3DExtension) gd_body_add_constant_force(body RID, force Vector3, position Vector3)

fn (PhysicsServer3DExtension) gd_body_add_constant_torque #

fn (s &PhysicsServer3DExtension) gd_body_add_constant_torque(body RID, torque Vector3)

fn (PhysicsServer3DExtension) gd_body_set_constant_force #

fn (s &PhysicsServer3DExtension) gd_body_set_constant_force(body RID, force Vector3)

fn (PhysicsServer3DExtension) gd_body_get_constant_force #

fn (s &PhysicsServer3DExtension) gd_body_get_constant_force(body RID) Vector3

fn (PhysicsServer3DExtension) gd_body_set_constant_torque #

fn (s &PhysicsServer3DExtension) gd_body_set_constant_torque(body RID, torque Vector3)

fn (PhysicsServer3DExtension) gd_body_get_constant_torque #

fn (s &PhysicsServer3DExtension) gd_body_get_constant_torque(body RID) Vector3

fn (PhysicsServer3DExtension) gd_body_set_axis_velocity #

fn (s &PhysicsServer3DExtension) gd_body_set_axis_velocity(body RID, axis_velocity Vector3)

fn (PhysicsServer3DExtension) gd_body_set_axis_lock #

fn (s &PhysicsServer3DExtension) gd_body_set_axis_lock(body RID, axis PhysicsServer3DBodyAxis, gd_lock bool)

fn (PhysicsServer3DExtension) gd_body_is_axis_locked #

fn (s &PhysicsServer3DExtension) gd_body_is_axis_locked(body RID, axis PhysicsServer3DBodyAxis) bool

fn (PhysicsServer3DExtension) gd_body_add_collision_exception #

fn (s &PhysicsServer3DExtension) gd_body_add_collision_exception(body RID, excepted_body RID)

fn (PhysicsServer3DExtension) gd_body_remove_collision_exception #

fn (s &PhysicsServer3DExtension) gd_body_remove_collision_exception(body RID, excepted_body RID)

fn (PhysicsServer3DExtension) gd_body_get_collision_exceptions #

fn (s &PhysicsServer3DExtension) gd_body_get_collision_exceptions(body RID) Array

fn (PhysicsServer3DExtension) gd_body_set_max_contacts_reported #

fn (s &PhysicsServer3DExtension) gd_body_set_max_contacts_reported(body RID, amount i64)

fn (PhysicsServer3DExtension) gd_body_get_max_contacts_reported #

fn (s &PhysicsServer3DExtension) gd_body_get_max_contacts_reported(body RID) i64

fn (PhysicsServer3DExtension) gd_body_set_contacts_reported_depth_threshold #

fn (s &PhysicsServer3DExtension) gd_body_set_contacts_reported_depth_threshold(body RID, threshold f64)

fn (PhysicsServer3DExtension) gd_body_get_contacts_reported_depth_threshold #

fn (s &PhysicsServer3DExtension) gd_body_get_contacts_reported_depth_threshold(body RID) f64

fn (PhysicsServer3DExtension) gd_body_set_omit_force_integration #

fn (s &PhysicsServer3DExtension) gd_body_set_omit_force_integration(body RID, enable bool)

fn (PhysicsServer3DExtension) gd_body_is_omitting_force_integration #

fn (s &PhysicsServer3DExtension) gd_body_is_omitting_force_integration(body RID) bool

fn (PhysicsServer3DExtension) gd_body_set_state_sync_callback #

fn (s &PhysicsServer3DExtension) gd_body_set_state_sync_callback(body RID, callable Callable)

fn (PhysicsServer3DExtension) gd_body_set_force_integration_callback #

fn (s &PhysicsServer3DExtension) gd_body_set_force_integration_callback(body RID, callable Callable, userdata_ ToVariant)

fn (PhysicsServer3DExtension) gd_body_set_ray_pickable #

fn (s &PhysicsServer3DExtension) gd_body_set_ray_pickable(body RID, enable bool)

fn (PhysicsServer3DExtension) gd_body_test_motion #

fn (s &PhysicsServer3DExtension) gd_body_test_motion(body RID, from Transform3D, motion Vector3, margin f64, max_collisions i64, collide_separation_ray bool, recovery_as_collision bool, gd_result &PhysicsServer3DExtensionMotionResult) bool

fn (PhysicsServer3DExtension) gd_body_get_direct_state #

fn (s &PhysicsServer3DExtension) gd_body_get_direct_state(body RID) PhysicsDirectBodyState3D

fn (PhysicsServer3DExtension) gd_soft_body_create #

fn (s &PhysicsServer3DExtension) gd_soft_body_create() RID

fn (PhysicsServer3DExtension) gd_soft_body_update_rendering_server #

fn (s &PhysicsServer3DExtension) gd_soft_body_update_rendering_server(body RID, rendering_server_handler PhysicsServer3DRenderingServerHandler)

fn (PhysicsServer3DExtension) gd_soft_body_set_space #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_space(body RID, space RID)

fn (PhysicsServer3DExtension) gd_soft_body_get_space #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_space(body RID) RID

fn (PhysicsServer3DExtension) gd_soft_body_set_ray_pickable #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_ray_pickable(body RID, enable bool)

fn (PhysicsServer3DExtension) gd_soft_body_set_collision_layer #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_collision_layer(body RID, layer i64)

fn (PhysicsServer3DExtension) gd_soft_body_get_collision_layer #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_collision_layer(body RID) i64

fn (PhysicsServer3DExtension) gd_soft_body_set_collision_mask #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_collision_mask(body RID, mask i64)

fn (PhysicsServer3DExtension) gd_soft_body_get_collision_mask #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_collision_mask(body RID) i64

fn (PhysicsServer3DExtension) gd_soft_body_add_collision_exception #

fn (s &PhysicsServer3DExtension) gd_soft_body_add_collision_exception(body RID, body_b RID)

fn (PhysicsServer3DExtension) gd_soft_body_remove_collision_exception #

fn (s &PhysicsServer3DExtension) gd_soft_body_remove_collision_exception(body RID, body_b RID)

fn (PhysicsServer3DExtension) gd_soft_body_get_collision_exceptions #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_collision_exceptions(body RID) Array

fn (PhysicsServer3DExtension) gd_soft_body_set_state #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_state(body RID, state PhysicsServer3DBodyState, variant_ ToVariant)

fn (PhysicsServer3DExtension) gd_soft_body_get_state #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_state(body RID, state PhysicsServer3DBodyState) Variant

fn (PhysicsServer3DExtension) gd_soft_body_set_transform #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_transform(body RID, transform Transform3D)

fn (PhysicsServer3DExtension) gd_soft_body_set_simulation_precision #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_simulation_precision(body RID, simulation_precision i64)

fn (PhysicsServer3DExtension) gd_soft_body_get_simulation_precision #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_simulation_precision(body RID) i64

fn (PhysicsServer3DExtension) gd_soft_body_set_total_mass #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_total_mass(body RID, total_mass f64)

fn (PhysicsServer3DExtension) gd_soft_body_get_total_mass #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_total_mass(body RID) f64

fn (PhysicsServer3DExtension) gd_soft_body_set_linear_stiffness #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_linear_stiffness(body RID, linear_stiffness f64)

fn (PhysicsServer3DExtension) gd_soft_body_get_linear_stiffness #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_linear_stiffness(body RID) f64

fn (PhysicsServer3DExtension) gd_soft_body_set_shrinking_factor #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_shrinking_factor(body RID, shrinking_factor f64)

fn (PhysicsServer3DExtension) gd_soft_body_get_shrinking_factor #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_shrinking_factor(body RID) f64

fn (PhysicsServer3DExtension) gd_soft_body_set_pressure_coefficient #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_pressure_coefficient(body RID, pressure_coefficient f64)

fn (PhysicsServer3DExtension) gd_soft_body_get_pressure_coefficient #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_pressure_coefficient(body RID) f64

fn (PhysicsServer3DExtension) gd_soft_body_set_damping_coefficient #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_damping_coefficient(body RID, damping_coefficient f64)

fn (PhysicsServer3DExtension) gd_soft_body_get_damping_coefficient #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_damping_coefficient(body RID) f64

fn (PhysicsServer3DExtension) gd_soft_body_set_drag_coefficient #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_drag_coefficient(body RID, drag_coefficient f64)

fn (PhysicsServer3DExtension) gd_soft_body_get_drag_coefficient #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_drag_coefficient(body RID) f64

fn (PhysicsServer3DExtension) gd_soft_body_set_mesh #

fn (s &PhysicsServer3DExtension) gd_soft_body_set_mesh(body RID, mesh RID)

fn (PhysicsServer3DExtension) gd_soft_body_get_bounds #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_bounds(body RID) AABB

fn (PhysicsServer3DExtension) gd_soft_body_move_point #

fn (s &PhysicsServer3DExtension) gd_soft_body_move_point(body RID, point_index i64, global_position Vector3)

fn (PhysicsServer3DExtension) gd_soft_body_get_point_global_position #

fn (s &PhysicsServer3DExtension) gd_soft_body_get_point_global_position(body RID, point_index i64) Vector3

fn (PhysicsServer3DExtension) gd_soft_body_remove_all_pinned_points #

fn (s &PhysicsServer3DExtension) gd_soft_body_remove_all_pinned_points(body RID)

fn (PhysicsServer3DExtension) gd_soft_body_pin_point #

fn (s &PhysicsServer3DExtension) gd_soft_body_pin_point(body RID, point_index i64, pin bool)

fn (PhysicsServer3DExtension) gd_soft_body_is_point_pinned #

fn (s &PhysicsServer3DExtension) gd_soft_body_is_point_pinned(body RID, point_index i64) bool

fn (PhysicsServer3DExtension) gd_soft_body_apply_point_impulse #

fn (s &PhysicsServer3DExtension) gd_soft_body_apply_point_impulse(body RID, point_index i64, impulse Vector3)

fn (PhysicsServer3DExtension) gd_soft_body_apply_point_force #

fn (s &PhysicsServer3DExtension) gd_soft_body_apply_point_force(body RID, point_index i64, force Vector3)

fn (PhysicsServer3DExtension) gd_soft_body_apply_central_impulse #

fn (s &PhysicsServer3DExtension) gd_soft_body_apply_central_impulse(body RID, impulse Vector3)

fn (PhysicsServer3DExtension) gd_soft_body_apply_central_force #

fn (s &PhysicsServer3DExtension) gd_soft_body_apply_central_force(body RID, force Vector3)

fn (PhysicsServer3DExtension) gd_joint_create #

fn (s &PhysicsServer3DExtension) gd_joint_create() RID

fn (PhysicsServer3DExtension) gd_joint_clear #

fn (s &PhysicsServer3DExtension) gd_joint_clear(joint RID)

fn (PhysicsServer3DExtension) gd_joint_make_pin #

fn (s &PhysicsServer3DExtension) gd_joint_make_pin(joint RID, body_a RID, local_a Vector3, body_b RID, local_b Vector3)

fn (PhysicsServer3DExtension) gd_pin_joint_set_param #

fn (s &PhysicsServer3DExtension) gd_pin_joint_set_param(joint RID, param PhysicsServer3DPinJointParam, value f64)

fn (PhysicsServer3DExtension) gd_pin_joint_get_param #

fn (s &PhysicsServer3DExtension) gd_pin_joint_get_param(joint RID, param PhysicsServer3DPinJointParam) f64

fn (PhysicsServer3DExtension) gd_pin_joint_set_local_a #

fn (s &PhysicsServer3DExtension) gd_pin_joint_set_local_a(joint RID, local_a Vector3)

fn (PhysicsServer3DExtension) gd_pin_joint_get_local_a #

fn (s &PhysicsServer3DExtension) gd_pin_joint_get_local_a(joint RID) Vector3

fn (PhysicsServer3DExtension) gd_pin_joint_set_local_b #

fn (s &PhysicsServer3DExtension) gd_pin_joint_set_local_b(joint RID, local_b Vector3)

fn (PhysicsServer3DExtension) gd_pin_joint_get_local_b #

fn (s &PhysicsServer3DExtension) gd_pin_joint_get_local_b(joint RID) Vector3

fn (PhysicsServer3DExtension) gd_joint_make_hinge #

fn (s &PhysicsServer3DExtension) gd_joint_make_hinge(joint RID, body_a RID, hinge_a Transform3D, body_b RID, hinge_b Transform3D)

fn (PhysicsServer3DExtension) gd_joint_make_hinge_simple #

fn (s &PhysicsServer3DExtension) gd_joint_make_hinge_simple(joint RID, body_a RID, pivot_a Vector3, axis_a Vector3, body_b RID, pivot_b Vector3, axis_b Vector3)

fn (PhysicsServer3DExtension) gd_hinge_joint_set_param #

fn (s &PhysicsServer3DExtension) gd_hinge_joint_set_param(joint RID, param PhysicsServer3DHingeJointParam, value f64)

fn (PhysicsServer3DExtension) gd_hinge_joint_get_param #

fn (s &PhysicsServer3DExtension) gd_hinge_joint_get_param(joint RID, param PhysicsServer3DHingeJointParam) f64

fn (PhysicsServer3DExtension) gd_hinge_joint_set_flag #

fn (s &PhysicsServer3DExtension) gd_hinge_joint_set_flag(joint RID, flag PhysicsServer3DHingeJointFlag, enabled bool)

fn (PhysicsServer3DExtension) gd_hinge_joint_get_flag #

fn (s &PhysicsServer3DExtension) gd_hinge_joint_get_flag(joint RID, flag PhysicsServer3DHingeJointFlag) bool

fn (PhysicsServer3DExtension) gd_joint_make_slider #

fn (s &PhysicsServer3DExtension) gd_joint_make_slider(joint RID, body_a RID, local_ref_a Transform3D, body_b RID, local_ref_b Transform3D)

fn (PhysicsServer3DExtension) gd_slider_joint_set_param #

fn (s &PhysicsServer3DExtension) gd_slider_joint_set_param(joint RID, param PhysicsServer3DSliderJointParam, value f64)

fn (PhysicsServer3DExtension) gd_slider_joint_get_param #

fn (s &PhysicsServer3DExtension) gd_slider_joint_get_param(joint RID, param PhysicsServer3DSliderJointParam) f64

fn (PhysicsServer3DExtension) gd_joint_make_cone_twist #

fn (s &PhysicsServer3DExtension) gd_joint_make_cone_twist(joint RID, body_a RID, local_ref_a Transform3D, body_b RID, local_ref_b Transform3D)

fn (PhysicsServer3DExtension) gd_cone_twist_joint_set_param #

fn (s &PhysicsServer3DExtension) gd_cone_twist_joint_set_param(joint RID, param PhysicsServer3DConeTwistJointParam, value f64)

fn (PhysicsServer3DExtension) gd_cone_twist_joint_get_param #

fn (s &PhysicsServer3DExtension) gd_cone_twist_joint_get_param(joint RID, param PhysicsServer3DConeTwistJointParam) f64

fn (PhysicsServer3DExtension) gd_joint_make_generic_6dof #

fn (s &PhysicsServer3DExtension) gd_joint_make_generic_6dof(joint RID, body_a RID, local_ref_a Transform3D, body_b RID, local_ref_b Transform3D)

fn (PhysicsServer3DExtension) gd_generic_6dof_joint_set_param #

fn (s &PhysicsServer3DExtension) gd_generic_6dof_joint_set_param(joint RID, axis Vector3Axis, param PhysicsServer3DG6DOFJointAxisParam, value f64)

fn (PhysicsServer3DExtension) gd_generic_6dof_joint_get_param #

fn (s &PhysicsServer3DExtension) gd_generic_6dof_joint_get_param(joint RID, axis Vector3Axis, param PhysicsServer3DG6DOFJointAxisParam) f64

fn (PhysicsServer3DExtension) gd_generic_6dof_joint_set_flag #

fn (s &PhysicsServer3DExtension) gd_generic_6dof_joint_set_flag(joint RID, axis Vector3Axis, flag PhysicsServer3DG6DOFJointAxisFlag, enable bool)

fn (PhysicsServer3DExtension) gd_generic_6dof_joint_get_flag #

fn (s &PhysicsServer3DExtension) gd_generic_6dof_joint_get_flag(joint RID, axis Vector3Axis, flag PhysicsServer3DG6DOFJointAxisFlag) bool

fn (PhysicsServer3DExtension) gd_joint_get_type #

fn (s &PhysicsServer3DExtension) gd_joint_get_type(joint RID) PhysicsServer3DJointType

fn (PhysicsServer3DExtension) gd_joint_set_solver_priority #

fn (s &PhysicsServer3DExtension) gd_joint_set_solver_priority(joint RID, priority i64)

fn (PhysicsServer3DExtension) gd_joint_get_solver_priority #

fn (s &PhysicsServer3DExtension) gd_joint_get_solver_priority(joint RID) i64

fn (PhysicsServer3DExtension) gd_joint_disable_collisions_between_bodies #

fn (s &PhysicsServer3DExtension) gd_joint_disable_collisions_between_bodies(joint RID, disable bool)

fn (PhysicsServer3DExtension) gd_joint_is_disabled_collisions_between_bodies #

fn (s &PhysicsServer3DExtension) gd_joint_is_disabled_collisions_between_bodies(joint RID) bool

fn (PhysicsServer3DExtension) gd_free_rid #

fn (s &PhysicsServer3DExtension) gd_free_rid(rid RID)

fn (PhysicsServer3DExtension) gd_set_active #

fn (s &PhysicsServer3DExtension) gd_set_active(active bool)

fn (PhysicsServer3DExtension) gd_init #

fn (s &PhysicsServer3DExtension) gd_init()

fn (PhysicsServer3DExtension) gd_step #

fn (s &PhysicsServer3DExtension) gd_step(step f64)

fn (PhysicsServer3DExtension) gd_sync #

fn (s &PhysicsServer3DExtension) gd_sync()

fn (PhysicsServer3DExtension) gd_flush_queries #

fn (s &PhysicsServer3DExtension) gd_flush_queries()

fn (PhysicsServer3DExtension) gd_end_sync #

fn (s &PhysicsServer3DExtension) gd_end_sync()

fn (PhysicsServer3DExtension) gd_finish #

fn (s &PhysicsServer3DExtension) gd_finish()

fn (PhysicsServer3DExtension) gd_is_flushing_queries #

fn (s &PhysicsServer3DExtension) gd_is_flushing_queries() bool

fn (PhysicsServer3DExtension) gd_get_process_info #

fn (s &PhysicsServer3DExtension) gd_get_process_info(process_info PhysicsServer3DProcessInfo) i64

fn (PhysicsServer3DExtension) body_test_motion_is_excluding_body #

fn (s &PhysicsServer3DExtension) body_test_motion_is_excluding_body(body RID) bool

fn (PhysicsServer3DExtension) body_test_motion_is_excluding_object #

fn (s &PhysicsServer3DExtension) body_test_motion_is_excluding_object(object i64) bool

struct PhysicsServer3DExtensionMotionCollision #

struct PhysicsServer3DExtensionMotionCollision {
pub mut:
	position                  Vector3
	normal                    Vector3
	collider_velocity         Vector3
	collider_angular_velocity Vector3
	depth                     f64
	local_shape               i64
	collider_id               ObjectID
	collider                  RID
	collider_shape            i64
}

struct PhysicsServer3DExtensionMotionResult #

struct PhysicsServer3DExtensionMotionResult {
pub mut:
	travel                    Vector3
	remainder                 Vector3
	collision_depth           f64
	collision_safe_fraction   f64
	collision_unsafe_fraction f64
	collisions                [32]PhysicsServer3DExtensionMotionCollision
	collision_count           i64
}

struct PhysicsServer3DExtensionRayResult #

struct PhysicsServer3DExtensionRayResult {
pub mut:
	position    Vector3
	normal      Vector3
	rid         RID
	collider_id ObjectID
	collider    &Object
	shape       i64
	face_index  i64
}

struct PhysicsServer3DExtensionShapeRestInfo #

struct PhysicsServer3DExtensionShapeRestInfo {
pub mut:
	point           Vector3
	normal          Vector3
	rid             RID
	collider_id     ObjectID
	shape           i64
	linear_velocity Vector3
}

struct PhysicsServer3DExtensionShapeResult #

struct PhysicsServer3DExtensionShapeResult {
pub mut:
	rid         RID
	collider_id ObjectID
	collider    &Object
	shape       i64
}

struct PhysicsServer3DManager #

struct PhysicsServer3DManager {
	Object
}

A singleton for managing [PhysicsServer3D] implementations.

fn (PhysicsServer3DManager) to_variant #

fn (s &PhysicsServer3DManager) to_variant() Variant

fn (PhysicsServer3DManager) from_variant #

fn (mut s PhysicsServer3DManager) from_variant(variant &Variant)

fn (PhysicsServer3DManager) register_server #

fn (s &PhysicsServer3DManager) register_server(name string, create_callback Callable)

Register a [PhysicsServer3D] implementation by passing a [param name] and a [Callable] that returns a [PhysicsServer3D] object.

fn (PhysicsServer3DManager) set_default_server #

fn (s &PhysicsServer3DManager) set_default_server(name string, priority i64)

Set the default [PhysicsServer3D] implementation to the one identified by [param name], if [param priority] is greater than the priority of the current default implementation.

struct PhysicsServer3DRenderingServerHandler #

struct PhysicsServer3DRenderingServerHandler {
	Object
}

A class used to provide [method PhysicsServer3DExtension._soft_body_update_rendering_server] with a rendering handler for soft bodies.

fn (PhysicsServer3DRenderingServerHandler) to_variant #

fn (s &PhysicsServer3DRenderingServerHandler) to_variant() Variant

fn (PhysicsServer3DRenderingServerHandler) from_variant #

fn (mut s PhysicsServer3DRenderingServerHandler) from_variant(variant &Variant)

fn (PhysicsServer3DRenderingServerHandler) gd_set_vertex #

fn (s &PhysicsServer3DRenderingServerHandler) gd_set_vertex(vertex_id i64, vertex Vector3)

Called by the [PhysicsServer3D] to set the position for the [SoftBody3D] vertex at the index specified by [param vertex_id]. [b]Note:[/b] The [param vertex] parameter used to be of type const void* prior to Godot 4.2.

fn (PhysicsServer3DRenderingServerHandler) gd_set_normal #

fn (s &PhysicsServer3DRenderingServerHandler) gd_set_normal(vertex_id i64, normal Vector3)

Called by the [PhysicsServer3D] to set the normal for the [SoftBody3D] vertex at the index specified by [param vertex_id]. [b]Note:[/b] The [param normal] parameter used to be of type const void* prior to Godot 4.2.

fn (PhysicsServer3DRenderingServerHandler) gd_set_aabb #

fn (s &PhysicsServer3DRenderingServerHandler) gd_set_aabb(aabb AABB)

Called by the [PhysicsServer3D] to set the bounding box for the [SoftBody3D].

fn (PhysicsServer3DRenderingServerHandler) set_vertex #

fn (s &PhysicsServer3DRenderingServerHandler) set_vertex(vertex_id i64, vertex Vector3)

Sets the position for the [SoftBody3D] vertex at the index specified by [param vertex_id].

fn (PhysicsServer3DRenderingServerHandler) set_normal #

fn (s &PhysicsServer3DRenderingServerHandler) set_normal(vertex_id i64, normal Vector3)

Sets the normal for the [SoftBody3D] vertex at the index specified by [param vertex_id].

fn (PhysicsServer3DRenderingServerHandler) set_aabb #

fn (s &PhysicsServer3DRenderingServerHandler) set_aabb(aabb AABB)

Sets the bounding box for the [SoftBody3D].

struct PhysicsServer3D_area_add_shape_Cfg #

@[params]
struct PhysicsServer3D_area_add_shape_Cfg {
pub:
	transform Transform3D = Transform3D{Basis{Vector3{1, 0, 0}, Vector3{0, 1, 0}, Vector3{0, 0, 1}}, Vector3{0, 0, 0}}
	disabled  bool
}

Optional parameters for PhysicsServer3D#area_add_shape

struct PhysicsServer3D_body_add_constant_force_Cfg #

@[params]
struct PhysicsServer3D_body_add_constant_force_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicsServer3D#body_add_constant_force

struct PhysicsServer3D_body_add_shape_Cfg #

@[params]
struct PhysicsServer3D_body_add_shape_Cfg {
pub:
	transform Transform3D = Transform3D{Basis{Vector3{1, 0, 0}, Vector3{0, 1, 0}, Vector3{0, 0, 1}}, Vector3{0, 0, 0}}
	disabled  bool
}

Optional parameters for PhysicsServer3D#body_add_shape

struct PhysicsServer3D_body_apply_force_Cfg #

@[params]
struct PhysicsServer3D_body_apply_force_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicsServer3D#body_apply_force

struct PhysicsServer3D_body_apply_impulse_Cfg #

@[params]
struct PhysicsServer3D_body_apply_impulse_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for PhysicsServer3D#body_apply_impulse

struct PhysicsServer3D_body_set_force_integration_callback_Cfg #

@[params]
struct PhysicsServer3D_body_set_force_integration_callback_Cfg {
pub:
	userdata ToVariant
}

Optional parameters for PhysicsServer3D#body_set_force_integration_callback

struct PhysicsServer3D_body_test_motion_Cfg #

@[params]
struct PhysicsServer3D_body_test_motion_Cfg {
pub:
	gd_result PhysicsTestMotionResult3D
}

Optional parameters for PhysicsServer3D#body_test_motion

struct PhysicsShapeQueryParameters2D #

struct PhysicsShapeQueryParameters2D {
	RefCounted
}

Provides parameters for [PhysicsDirectSpaceState2D]'s methods.

fn (PhysicsShapeQueryParameters2D) to_variant #

fn (s &PhysicsShapeQueryParameters2D) to_variant() Variant

fn (PhysicsShapeQueryParameters2D) from_variant #

fn (mut s PhysicsShapeQueryParameters2D) from_variant(variant &Variant)

fn (PhysicsShapeQueryParameters2D) set_shape #

fn (s &PhysicsShapeQueryParameters2D) set_shape(shape Resource)

fn (PhysicsShapeQueryParameters2D) get_shape #

fn (s &PhysicsShapeQueryParameters2D) get_shape() Resource

fn (PhysicsShapeQueryParameters2D) set_shape_rid #

fn (s &PhysicsShapeQueryParameters2D) set_shape_rid(shape RID)

fn (PhysicsShapeQueryParameters2D) get_shape_rid #

fn (s &PhysicsShapeQueryParameters2D) get_shape_rid() RID

fn (PhysicsShapeQueryParameters2D) set_transform #

fn (s &PhysicsShapeQueryParameters2D) set_transform(transform Transform2D)

fn (PhysicsShapeQueryParameters2D) get_transform #

fn (s &PhysicsShapeQueryParameters2D) get_transform() Transform2D

fn (PhysicsShapeQueryParameters2D) set_motion #

fn (s &PhysicsShapeQueryParameters2D) set_motion(motion Vector2)

fn (PhysicsShapeQueryParameters2D) get_motion #

fn (s &PhysicsShapeQueryParameters2D) get_motion() Vector2

fn (PhysicsShapeQueryParameters2D) set_margin #

fn (s &PhysicsShapeQueryParameters2D) set_margin(margin f64)

fn (PhysicsShapeQueryParameters2D) get_margin #

fn (s &PhysicsShapeQueryParameters2D) get_margin() f64

fn (PhysicsShapeQueryParameters2D) set_collision_mask #

fn (s &PhysicsShapeQueryParameters2D) set_collision_mask(collision_mask i64)

fn (PhysicsShapeQueryParameters2D) get_collision_mask #

fn (s &PhysicsShapeQueryParameters2D) get_collision_mask() i64

fn (PhysicsShapeQueryParameters2D) set_exclude #

fn (s &PhysicsShapeQueryParameters2D) set_exclude(exclude Array)

fn (PhysicsShapeQueryParameters2D) get_exclude #

fn (s &PhysicsShapeQueryParameters2D) get_exclude() Array

fn (PhysicsShapeQueryParameters2D) set_collide_with_bodies #

fn (s &PhysicsShapeQueryParameters2D) set_collide_with_bodies(enable bool)

fn (PhysicsShapeQueryParameters2D) is_collide_with_bodies_enabled #

fn (s &PhysicsShapeQueryParameters2D) is_collide_with_bodies_enabled() bool

fn (PhysicsShapeQueryParameters2D) set_collide_with_areas #

fn (s &PhysicsShapeQueryParameters2D) set_collide_with_areas(enable bool)

fn (PhysicsShapeQueryParameters2D) is_collide_with_areas_enabled #

fn (s &PhysicsShapeQueryParameters2D) is_collide_with_areas_enabled() bool

struct PhysicsShapeQueryParameters3D #

struct PhysicsShapeQueryParameters3D {
	RefCounted
}

Provides parameters for [PhysicsDirectSpaceState3D]'s methods.

fn (PhysicsShapeQueryParameters3D) to_variant #

fn (s &PhysicsShapeQueryParameters3D) to_variant() Variant

fn (PhysicsShapeQueryParameters3D) from_variant #

fn (mut s PhysicsShapeQueryParameters3D) from_variant(variant &Variant)

fn (PhysicsShapeQueryParameters3D) set_shape #

fn (s &PhysicsShapeQueryParameters3D) set_shape(shape Resource)

fn (PhysicsShapeQueryParameters3D) get_shape #

fn (s &PhysicsShapeQueryParameters3D) get_shape() Resource

fn (PhysicsShapeQueryParameters3D) set_shape_rid #

fn (s &PhysicsShapeQueryParameters3D) set_shape_rid(shape RID)

fn (PhysicsShapeQueryParameters3D) get_shape_rid #

fn (s &PhysicsShapeQueryParameters3D) get_shape_rid() RID

fn (PhysicsShapeQueryParameters3D) set_transform #

fn (s &PhysicsShapeQueryParameters3D) set_transform(transform Transform3D)

fn (PhysicsShapeQueryParameters3D) get_transform #

fn (s &PhysicsShapeQueryParameters3D) get_transform() Transform3D

fn (PhysicsShapeQueryParameters3D) set_motion #

fn (s &PhysicsShapeQueryParameters3D) set_motion(motion Vector3)

fn (PhysicsShapeQueryParameters3D) get_motion #

fn (s &PhysicsShapeQueryParameters3D) get_motion() Vector3

fn (PhysicsShapeQueryParameters3D) set_margin #

fn (s &PhysicsShapeQueryParameters3D) set_margin(margin f64)

fn (PhysicsShapeQueryParameters3D) get_margin #

fn (s &PhysicsShapeQueryParameters3D) get_margin() f64

fn (PhysicsShapeQueryParameters3D) set_collision_mask #

fn (s &PhysicsShapeQueryParameters3D) set_collision_mask(collision_mask i64)

fn (PhysicsShapeQueryParameters3D) get_collision_mask #

fn (s &PhysicsShapeQueryParameters3D) get_collision_mask() i64

fn (PhysicsShapeQueryParameters3D) set_exclude #

fn (s &PhysicsShapeQueryParameters3D) set_exclude(exclude Array)

fn (PhysicsShapeQueryParameters3D) get_exclude #

fn (s &PhysicsShapeQueryParameters3D) get_exclude() Array

fn (PhysicsShapeQueryParameters3D) set_collide_with_bodies #

fn (s &PhysicsShapeQueryParameters3D) set_collide_with_bodies(enable bool)

fn (PhysicsShapeQueryParameters3D) is_collide_with_bodies_enabled #

fn (s &PhysicsShapeQueryParameters3D) is_collide_with_bodies_enabled() bool

fn (PhysicsShapeQueryParameters3D) set_collide_with_areas #

fn (s &PhysicsShapeQueryParameters3D) set_collide_with_areas(enable bool)

fn (PhysicsShapeQueryParameters3D) is_collide_with_areas_enabled #

fn (s &PhysicsShapeQueryParameters3D) is_collide_with_areas_enabled() bool

struct PhysicsTestMotionParameters2D #

struct PhysicsTestMotionParameters2D {
	RefCounted
}

Provides parameters for [method PhysicsServer2D.body_test_motion].

fn (PhysicsTestMotionParameters2D) to_variant #

fn (s &PhysicsTestMotionParameters2D) to_variant() Variant

fn (PhysicsTestMotionParameters2D) from_variant #

fn (mut s PhysicsTestMotionParameters2D) from_variant(variant &Variant)

fn (PhysicsTestMotionParameters2D) get_from #

fn (s &PhysicsTestMotionParameters2D) get_from() Transform2D

fn (PhysicsTestMotionParameters2D) set_from #

fn (s &PhysicsTestMotionParameters2D) set_from(from Transform2D)

fn (PhysicsTestMotionParameters2D) get_motion #

fn (s &PhysicsTestMotionParameters2D) get_motion() Vector2

fn (PhysicsTestMotionParameters2D) set_motion #

fn (s &PhysicsTestMotionParameters2D) set_motion(motion Vector2)

fn (PhysicsTestMotionParameters2D) get_margin #

fn (s &PhysicsTestMotionParameters2D) get_margin() f64

fn (PhysicsTestMotionParameters2D) set_margin #

fn (s &PhysicsTestMotionParameters2D) set_margin(margin f64)

fn (PhysicsTestMotionParameters2D) is_collide_separation_ray_enabled #

fn (s &PhysicsTestMotionParameters2D) is_collide_separation_ray_enabled() bool

fn (PhysicsTestMotionParameters2D) set_collide_separation_ray_enabled #

fn (s &PhysicsTestMotionParameters2D) set_collide_separation_ray_enabled(enabled bool)

fn (PhysicsTestMotionParameters2D) get_exclude_bodies #

fn (s &PhysicsTestMotionParameters2D) get_exclude_bodies() Array

fn (PhysicsTestMotionParameters2D) set_exclude_bodies #

fn (s &PhysicsTestMotionParameters2D) set_exclude_bodies(exclude_list Array)

fn (PhysicsTestMotionParameters2D) get_exclude_objects #

fn (s &PhysicsTestMotionParameters2D) get_exclude_objects() Array

fn (PhysicsTestMotionParameters2D) set_exclude_objects #

fn (s &PhysicsTestMotionParameters2D) set_exclude_objects(exclude_list Array)

fn (PhysicsTestMotionParameters2D) is_recovery_as_collision_enabled #

fn (s &PhysicsTestMotionParameters2D) is_recovery_as_collision_enabled() bool

fn (PhysicsTestMotionParameters2D) set_recovery_as_collision_enabled #

fn (s &PhysicsTestMotionParameters2D) set_recovery_as_collision_enabled(enabled bool)

struct PhysicsTestMotionParameters3D #

struct PhysicsTestMotionParameters3D {
	RefCounted
}

Provides parameters for [method PhysicsServer3D.body_test_motion].

fn (PhysicsTestMotionParameters3D) to_variant #

fn (s &PhysicsTestMotionParameters3D) to_variant() Variant

fn (PhysicsTestMotionParameters3D) from_variant #

fn (mut s PhysicsTestMotionParameters3D) from_variant(variant &Variant)

fn (PhysicsTestMotionParameters3D) get_from #

fn (s &PhysicsTestMotionParameters3D) get_from() Transform3D

fn (PhysicsTestMotionParameters3D) set_from #

fn (s &PhysicsTestMotionParameters3D) set_from(from Transform3D)

fn (PhysicsTestMotionParameters3D) get_motion #

fn (s &PhysicsTestMotionParameters3D) get_motion() Vector3

fn (PhysicsTestMotionParameters3D) set_motion #

fn (s &PhysicsTestMotionParameters3D) set_motion(motion Vector3)

fn (PhysicsTestMotionParameters3D) get_margin #

fn (s &PhysicsTestMotionParameters3D) get_margin() f64

fn (PhysicsTestMotionParameters3D) set_margin #

fn (s &PhysicsTestMotionParameters3D) set_margin(margin f64)

fn (PhysicsTestMotionParameters3D) get_max_collisions #

fn (s &PhysicsTestMotionParameters3D) get_max_collisions() i64

fn (PhysicsTestMotionParameters3D) set_max_collisions #

fn (s &PhysicsTestMotionParameters3D) set_max_collisions(max_collisions i64)

fn (PhysicsTestMotionParameters3D) is_collide_separation_ray_enabled #

fn (s &PhysicsTestMotionParameters3D) is_collide_separation_ray_enabled() bool

fn (PhysicsTestMotionParameters3D) set_collide_separation_ray_enabled #

fn (s &PhysicsTestMotionParameters3D) set_collide_separation_ray_enabled(enabled bool)

fn (PhysicsTestMotionParameters3D) get_exclude_bodies #

fn (s &PhysicsTestMotionParameters3D) get_exclude_bodies() Array

fn (PhysicsTestMotionParameters3D) set_exclude_bodies #

fn (s &PhysicsTestMotionParameters3D) set_exclude_bodies(exclude_list Array)

fn (PhysicsTestMotionParameters3D) get_exclude_objects #

fn (s &PhysicsTestMotionParameters3D) get_exclude_objects() Array

fn (PhysicsTestMotionParameters3D) set_exclude_objects #

fn (s &PhysicsTestMotionParameters3D) set_exclude_objects(exclude_list Array)

fn (PhysicsTestMotionParameters3D) is_recovery_as_collision_enabled #

fn (s &PhysicsTestMotionParameters3D) is_recovery_as_collision_enabled() bool

fn (PhysicsTestMotionParameters3D) set_recovery_as_collision_enabled #

fn (s &PhysicsTestMotionParameters3D) set_recovery_as_collision_enabled(enabled bool)

struct PhysicsTestMotionResult2D #

struct PhysicsTestMotionResult2D {
	RefCounted
}

Describes the motion and collision result from [method PhysicsServer2D.body_test_motion].

fn (PhysicsTestMotionResult2D) to_variant #

fn (s &PhysicsTestMotionResult2D) to_variant() Variant

fn (PhysicsTestMotionResult2D) from_variant #

fn (mut s PhysicsTestMotionResult2D) from_variant(variant &Variant)

fn (PhysicsTestMotionResult2D) get_travel #

fn (s &PhysicsTestMotionResult2D) get_travel() Vector2

Returns the moving object's travel before collision.

fn (PhysicsTestMotionResult2D) get_remainder #

fn (s &PhysicsTestMotionResult2D) get_remainder() Vector2

Returns the moving object's remaining movement vector.

fn (PhysicsTestMotionResult2D) get_collision_point #

fn (s &PhysicsTestMotionResult2D) get_collision_point() Vector2

Returns the point of collision in global coordinates, if a collision occurred.

fn (PhysicsTestMotionResult2D) get_collision_normal #

fn (s &PhysicsTestMotionResult2D) get_collision_normal() Vector2

Returns the colliding body's shape's normal at the point of collision, if a collision occurred.

fn (PhysicsTestMotionResult2D) get_collider_velocity #

fn (s &PhysicsTestMotionResult2D) get_collider_velocity() Vector2

Returns the colliding body's velocity, if a collision occurred.

fn (PhysicsTestMotionResult2D) get_collider_id #

fn (s &PhysicsTestMotionResult2D) get_collider_id() i64

Returns the unique instance ID of the colliding body's attached [Object], if a collision occurred. See [method Object.get_instance_id].

fn (PhysicsTestMotionResult2D) get_collider_rid #

fn (s &PhysicsTestMotionResult2D) get_collider_rid() RID

Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occurred.

fn (PhysicsTestMotionResult2D) get_collider #

fn (s &PhysicsTestMotionResult2D) get_collider() Object

Returns the colliding body's attached [Object], if a collision occurred.

fn (PhysicsTestMotionResult2D) get_collider_shape #

fn (s &PhysicsTestMotionResult2D) get_collider_shape() i64

Returns the colliding body's shape index, if a collision occurred. See [CollisionObject2D].

fn (PhysicsTestMotionResult2D) get_collision_local_shape #

fn (s &PhysicsTestMotionResult2D) get_collision_local_shape() i64

Returns the moving object's colliding shape, if a collision occurred.

fn (PhysicsTestMotionResult2D) get_collision_depth #

fn (s &PhysicsTestMotionResult2D) get_collision_depth() f64

Returns the length of overlap along the collision normal, if a collision occurred.

fn (PhysicsTestMotionResult2D) get_collision_safe_fraction #

fn (s &PhysicsTestMotionResult2D) get_collision_safe_fraction() f64

Returns the maximum fraction of the motion that can occur without a collision, between 0 and 1.

fn (PhysicsTestMotionResult2D) get_collision_unsafe_fraction #

fn (s &PhysicsTestMotionResult2D) get_collision_unsafe_fraction() f64

Returns the minimum fraction of the motion needed to collide, if a collision occurred, between 0 and 1.

struct PhysicsTestMotionResult3D #

struct PhysicsTestMotionResult3D {
	RefCounted
}

Describes the motion and collision result from [method PhysicsServer3D.body_test_motion].

fn (PhysicsTestMotionResult3D) to_variant #

fn (s &PhysicsTestMotionResult3D) to_variant() Variant

fn (PhysicsTestMotionResult3D) from_variant #

fn (mut s PhysicsTestMotionResult3D) from_variant(variant &Variant)

fn (PhysicsTestMotionResult3D) get_travel #

fn (s &PhysicsTestMotionResult3D) get_travel() Vector3

Returns the moving object's travel before collision.

fn (PhysicsTestMotionResult3D) get_remainder #

fn (s &PhysicsTestMotionResult3D) get_remainder() Vector3

Returns the moving object's remaining movement vector.

fn (PhysicsTestMotionResult3D) get_collision_safe_fraction #

fn (s &PhysicsTestMotionResult3D) get_collision_safe_fraction() f64

Returns the maximum fraction of the motion that can occur without a collision, between 0 and 1.

fn (PhysicsTestMotionResult3D) get_collision_unsafe_fraction #

fn (s &PhysicsTestMotionResult3D) get_collision_unsafe_fraction() f64

Returns the minimum fraction of the motion needed to collide, if a collision occurred, between 0 and 1.

fn (PhysicsTestMotionResult3D) get_collision_count #

fn (s &PhysicsTestMotionResult3D) get_collision_count() i64

Returns the number of detected collisions.

fn (PhysicsTestMotionResult3D) get_collision_point #

fn (s &PhysicsTestMotionResult3D) get_collision_point(cfg PhysicsTestMotionResult3D_get_collision_point_Cfg) Vector3

Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred.

fn (PhysicsTestMotionResult3D) get_collision_normal #

fn (s &PhysicsTestMotionResult3D) get_collision_normal(cfg PhysicsTestMotionResult3D_get_collision_normal_Cfg) Vector3

Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occurred.

fn (PhysicsTestMotionResult3D) get_collider_velocity #

fn (s &PhysicsTestMotionResult3D) get_collider_velocity(cfg PhysicsTestMotionResult3D_get_collider_velocity_Cfg) Vector3

Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred.

fn (PhysicsTestMotionResult3D) get_collider_id #

fn (s &PhysicsTestMotionResult3D) get_collider_id(cfg PhysicsTestMotionResult3D_get_collider_id_Cfg) i64

Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. See [method Object.get_instance_id].

fn (PhysicsTestMotionResult3D) get_collider_rid #

fn (s &PhysicsTestMotionResult3D) get_collider_rid(cfg PhysicsTestMotionResult3D_get_collider_rid_Cfg) RID

Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occurred.

fn (PhysicsTestMotionResult3D) get_collider #

fn (s &PhysicsTestMotionResult3D) get_collider(cfg PhysicsTestMotionResult3D_get_collider_Cfg) Object

Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred.

fn (PhysicsTestMotionResult3D) get_collider_shape #

fn (s &PhysicsTestMotionResult3D) get_collider_shape(cfg PhysicsTestMotionResult3D_get_collider_shape_Cfg) i64

Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See [CollisionObject3D].

fn (PhysicsTestMotionResult3D) get_collision_local_shape #

fn (s &PhysicsTestMotionResult3D) get_collision_local_shape(cfg PhysicsTestMotionResult3D_get_collision_local_shape_Cfg) i64

Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred.

fn (PhysicsTestMotionResult3D) get_collision_depth #

fn (s &PhysicsTestMotionResult3D) get_collision_depth(cfg PhysicsTestMotionResult3D_get_collision_depth_Cfg) f64

Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred.

struct PhysicsTestMotionResult3D_get_collider_Cfg #

@[params]
struct PhysicsTestMotionResult3D_get_collider_Cfg {
pub:
	collision_index i64
}

Optional parameters for PhysicsTestMotionResult3D#get_collider

struct PhysicsTestMotionResult3D_get_collider_id_Cfg #

@[params]
struct PhysicsTestMotionResult3D_get_collider_id_Cfg {
pub:
	collision_index i64
}

Optional parameters for PhysicsTestMotionResult3D#get_collider_id

struct PhysicsTestMotionResult3D_get_collider_rid_Cfg #

@[params]
struct PhysicsTestMotionResult3D_get_collider_rid_Cfg {
pub:
	collision_index i64
}

Optional parameters for PhysicsTestMotionResult3D#get_collider_rid

struct PhysicsTestMotionResult3D_get_collider_shape_Cfg #

@[params]
struct PhysicsTestMotionResult3D_get_collider_shape_Cfg {
pub:
	collision_index i64
}

Optional parameters for PhysicsTestMotionResult3D#get_collider_shape

struct PhysicsTestMotionResult3D_get_collider_velocity_Cfg #

@[params]
struct PhysicsTestMotionResult3D_get_collider_velocity_Cfg {
pub:
	collision_index i64
}

Optional parameters for PhysicsTestMotionResult3D#get_collider_velocity

struct PhysicsTestMotionResult3D_get_collision_depth_Cfg #

@[params]
struct PhysicsTestMotionResult3D_get_collision_depth_Cfg {
pub:
	collision_index i64
}

Optional parameters for PhysicsTestMotionResult3D#get_collision_depth

struct PhysicsTestMotionResult3D_get_collision_local_shape_Cfg #

@[params]
struct PhysicsTestMotionResult3D_get_collision_local_shape_Cfg {
pub:
	collision_index i64
}

Optional parameters for PhysicsTestMotionResult3D#get_collision_local_shape

struct PhysicsTestMotionResult3D_get_collision_normal_Cfg #

@[params]
struct PhysicsTestMotionResult3D_get_collision_normal_Cfg {
pub:
	collision_index i64
}

Optional parameters for PhysicsTestMotionResult3D#get_collision_normal

struct PhysicsTestMotionResult3D_get_collision_point_Cfg #

@[params]
struct PhysicsTestMotionResult3D_get_collision_point_Cfg {
pub:
	collision_index i64
}

Optional parameters for PhysicsTestMotionResult3D#get_collision_point

struct PinJoint2D #

struct PinJoint2D {
	Joint2D
}

A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate.

fn (PinJoint2D) to_variant #

fn (s &PinJoint2D) to_variant() Variant

fn (PinJoint2D) from_variant #

fn (mut s PinJoint2D) from_variant(variant &Variant)

fn (PinJoint2D) set_softness #

fn (s &PinJoint2D) set_softness(softness f64)

fn (PinJoint2D) get_softness #

fn (s &PinJoint2D) get_softness() f64

fn (PinJoint2D) set_angular_limit_lower #

fn (s &PinJoint2D) set_angular_limit_lower(angular_limit_lower f64)

fn (PinJoint2D) get_angular_limit_lower #

fn (s &PinJoint2D) get_angular_limit_lower() f64

fn (PinJoint2D) set_angular_limit_upper #

fn (s &PinJoint2D) set_angular_limit_upper(angular_limit_upper f64)

fn (PinJoint2D) get_angular_limit_upper #

fn (s &PinJoint2D) get_angular_limit_upper() f64

fn (PinJoint2D) set_motor_target_velocity #

fn (s &PinJoint2D) set_motor_target_velocity(motor_target_velocity f64)

fn (PinJoint2D) get_motor_target_velocity #

fn (s &PinJoint2D) get_motor_target_velocity() f64

fn (PinJoint2D) set_motor_enabled #

fn (s &PinJoint2D) set_motor_enabled(enabled bool)

fn (PinJoint2D) is_motor_enabled #

fn (s &PinJoint2D) is_motor_enabled() bool

fn (PinJoint2D) set_angular_limit_enabled #

fn (s &PinJoint2D) set_angular_limit_enabled(enabled bool)

fn (PinJoint2D) is_angular_limit_enabled #

fn (s &PinJoint2D) is_angular_limit_enabled() bool

struct PinJoint3D #

struct PinJoint3D {
	Joint3D
}

A physics joint that attaches two 3D physics bodies at a single point, allowing them to freely rotate.

fn (PinJoint3D) to_variant #

fn (s &PinJoint3D) to_variant() Variant

fn (PinJoint3D) from_variant #

fn (mut s PinJoint3D) from_variant(variant &Variant)

fn (PinJoint3D) set_param #

fn (s &PinJoint3D) set_param(param PinJoint3DParam, value f64)

Sets the value of the specified parameter.

fn (PinJoint3D) get_param #

fn (s &PinJoint3D) get_param(param PinJoint3DParam) f64

Returns the value of the specified parameter.

struct PlaceholderCubemap #

struct PlaceholderCubemap {
	PlaceholderTextureLayered
}

A [Cubemap] without image data.

fn (PlaceholderCubemap) to_variant #

fn (s &PlaceholderCubemap) to_variant() Variant

fn (PlaceholderCubemap) from_variant #

fn (mut s PlaceholderCubemap) from_variant(variant &Variant)

struct PlaceholderCubemapArray #

struct PlaceholderCubemapArray {
	PlaceholderTextureLayered
}

A [CubemapArray] without image data.

fn (PlaceholderCubemapArray) to_variant #

fn (s &PlaceholderCubemapArray) to_variant() Variant

fn (PlaceholderCubemapArray) from_variant #

fn (mut s PlaceholderCubemapArray) from_variant(variant &Variant)

struct PlaceholderMaterial #

struct PlaceholderMaterial {
	Material
}

Placeholder class for a material.

fn (PlaceholderMaterial) to_variant #

fn (s &PlaceholderMaterial) to_variant() Variant

fn (PlaceholderMaterial) from_variant #

fn (mut s PlaceholderMaterial) from_variant(variant &Variant)

struct PlaceholderMesh #

struct PlaceholderMesh {
	Mesh
}

Placeholder class for a mesh.

fn (PlaceholderMesh) to_variant #

fn (s &PlaceholderMesh) to_variant() Variant

fn (PlaceholderMesh) from_variant #

fn (mut s PlaceholderMesh) from_variant(variant &Variant)

fn (PlaceholderMesh) set_aabb #

fn (s &PlaceholderMesh) set_aabb(aabb AABB)

struct PlaceholderTexture2D #

struct PlaceholderTexture2D {
	Texture2D
}

Placeholder class for a 2-dimensional texture.

fn (PlaceholderTexture2D) to_variant #

fn (s &PlaceholderTexture2D) to_variant() Variant

fn (PlaceholderTexture2D) from_variant #

fn (mut s PlaceholderTexture2D) from_variant(variant &Variant)

fn (PlaceholderTexture2D) set_size #

fn (s &PlaceholderTexture2D) set_size(size Vector2)

struct PlaceholderTexture2DArray #

struct PlaceholderTexture2DArray {
	PlaceholderTextureLayered
}

Placeholder class for a 2-dimensional texture array.

fn (PlaceholderTexture2DArray) to_variant #

fn (s &PlaceholderTexture2DArray) to_variant() Variant

fn (PlaceholderTexture2DArray) from_variant #

fn (mut s PlaceholderTexture2DArray) from_variant(variant &Variant)

struct PlaceholderTexture3D #

struct PlaceholderTexture3D {
	Texture3D
}

Placeholder class for a 3-dimensional texture.

fn (PlaceholderTexture3D) to_variant #

fn (s &PlaceholderTexture3D) to_variant() Variant

fn (PlaceholderTexture3D) from_variant #

fn (mut s PlaceholderTexture3D) from_variant(variant &Variant)

fn (PlaceholderTexture3D) set_size #

fn (s &PlaceholderTexture3D) set_size(size Vector3i)

fn (PlaceholderTexture3D) get_size #

fn (s &PlaceholderTexture3D) get_size() Vector3i

struct PlaceholderTextureLayered #

struct PlaceholderTextureLayered {
	TextureLayered
}

Placeholder class for a 2-dimensional texture array.

fn (PlaceholderTextureLayered) to_variant #

fn (s &PlaceholderTextureLayered) to_variant() Variant

fn (PlaceholderTextureLayered) from_variant #

fn (mut s PlaceholderTextureLayered) from_variant(variant &Variant)

fn (PlaceholderTextureLayered) set_size #

fn (s &PlaceholderTextureLayered) set_size(size Vector2i)

fn (PlaceholderTextureLayered) get_size #

fn (s &PlaceholderTextureLayered) get_size() Vector2i

fn (PlaceholderTextureLayered) set_layers #

fn (s &PlaceholderTextureLayered) set_layers(layers i64)

struct Plane #

@[packed]
struct Plane {
pub mut:
	// The X component of the plane's [member normal] vector.
	normal Vector3 // offset 0
	// The Y component of the plane's [member normal] vector.
	d f32 // offset 12
}

A plane in Hessian normal form.

Represents a normalized plane equation. [member normal] is the normal of the plane (a, b, c normalized), and [member d] is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.

fn (Plane) normalized #

fn (s &Plane) normalized() Plane

Returns a copy of the plane, with normalized [member normal] (so it's a unit vector). Returns Plane(0, 0, 0, 0) if [member normal] can't be normalized (it has zero length).

fn (Plane) get_center #

fn (s &Plane) get_center() Vector3

Returns the center of the plane.

fn (Plane) is_equal_approx #

fn (s &Plane) is_equal_approx(to_plane Plane) bool

Returns true if this plane and [param to_plane] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.

fn (Plane) is_finite #

fn (s &Plane) is_finite() bool

Returns true if this plane is finite, by calling [method @GlobalScope.is_finite] on each component.

fn (Plane) is_point_over #

fn (s &Plane) is_point_over(point Vector3) bool

Returns true if [param point] is located above the plane.

fn (Plane) distance_to #

fn (s &Plane) distance_to(point Vector3) f64

Returns the shortest distance from the plane to the position [param point]. If the point is above the plane, the distance will be positive. If below, the distance will be negative.

fn (Plane) has_point #

fn (s &Plane) has_point(point Vector3, cfg Plane_has_point_Cfg) bool

Returns true if [param point] is inside the plane. Comparison uses a custom minimum [param tolerance] threshold.

fn (Plane) project #

fn (s &Plane) project(point Vector3) Vector3

Returns the orthogonal projection of [param point] into a point in the plane.

fn (Plane) intersect_3 #

fn (s &Plane) intersect_3(b Plane, c Plane) Variant

Returns the intersection point of the three planes [param b], [param c] and this plane. If no intersection is found, null is returned.

fn (Plane) intersects_ray #

fn (s &Plane) intersects_ray(from Vector3, dir Vector3) Variant

Returns the intersection point of a ray consisting of the position [param from] and the direction normal [param dir] with this plane. If no intersection is found, null is returned.

fn (Plane) intersects_segment #

fn (s &Plane) intersects_segment(from Vector3, to Vector3) Variant

Returns the intersection point of a segment from position [param from] to position [param to] with this plane. If no intersection is found, null is returned.

fn (Plane) to_variant #

fn (s &Plane) to_variant() Variant

fn (Plane) from_variant #

fn (mut s Plane) from_variant(variant &Variant)

fn (Plane) == #

fn (a Plane) == (b Plane) bool

Returns true if the planes are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Plane) eq_plane #

fn (a Plane) eq_plane(b Plane) bool

Returns true if the planes are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Plane) ne_plane #

fn (a Plane) ne_plane(b Plane) bool

Returns true if the planes are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Plane) mul_transform3d #

fn (a Plane) mul_transform3d(b Transform3D) Plane

Inversely transforms (multiplies) the [Plane] by the given [Transform3D] transformation matrix. plane * transform is equivalent to transform.affine_inverse() * plane. See [method Transform3D.affine_inverse].

fn (Plane) in_dictionary #

fn (a Plane) in_dictionary(b Dictionary) bool

fn (Plane) in_array #

fn (a Plane) in_array(b Array) bool

struct PlaneMesh #

struct PlaneMesh {
	PrimitiveMesh
}

Class representing a planar [PrimitiveMesh].

fn (PlaneMesh) to_variant #

fn (s &PlaneMesh) to_variant() Variant

fn (PlaneMesh) from_variant #

fn (mut s PlaneMesh) from_variant(variant &Variant)

fn (PlaneMesh) set_size #

fn (s &PlaneMesh) set_size(size Vector2)

fn (PlaneMesh) get_size #

fn (s &PlaneMesh) get_size() Vector2

fn (PlaneMesh) set_subdivide_width #

fn (s &PlaneMesh) set_subdivide_width(subdivide i64)

fn (PlaneMesh) get_subdivide_width #

fn (s &PlaneMesh) get_subdivide_width() i64

fn (PlaneMesh) set_subdivide_depth #

fn (s &PlaneMesh) set_subdivide_depth(subdivide i64)

fn (PlaneMesh) get_subdivide_depth #

fn (s &PlaneMesh) get_subdivide_depth() i64

fn (PlaneMesh) set_center_offset #

fn (s &PlaneMesh) set_center_offset(offset Vector3)

fn (PlaneMesh) get_center_offset #

fn (s &PlaneMesh) get_center_offset() Vector3

fn (PlaneMesh) set_orientation #

fn (s &PlaneMesh) set_orientation(orientation PlaneMeshOrientation)

fn (PlaneMesh) get_orientation #

fn (s &PlaneMesh) get_orientation() PlaneMeshOrientation

struct Plane_has_point_Cfg #

@[params]
struct Plane_has_point_Cfg {
pub:
	tolerance f64 = 1e-05
}

struct PointLight2D #

struct PointLight2D {
	Light2D
}

Positional 2D light source.

fn (PointLight2D) to_variant #

fn (s &PointLight2D) to_variant() Variant

fn (PointLight2D) from_variant #

fn (mut s PointLight2D) from_variant(variant &Variant)

fn (PointLight2D) set_texture #

fn (s &PointLight2D) set_texture(texture Texture2D)

fn (PointLight2D) get_texture #

fn (s &PointLight2D) get_texture() Texture2D

fn (PointLight2D) set_texture_offset #

fn (s &PointLight2D) set_texture_offset(texture_offset Vector2)

fn (PointLight2D) get_texture_offset #

fn (s &PointLight2D) get_texture_offset() Vector2

fn (PointLight2D) set_texture_scale #

fn (s &PointLight2D) set_texture_scale(texture_scale f64)

fn (PointLight2D) get_texture_scale #

fn (s &PointLight2D) get_texture_scale() f64

struct PointMesh #

struct PointMesh {
	PrimitiveMesh
}

Mesh with a single point primitive.

fn (PointMesh) to_variant #

fn (s &PointMesh) to_variant() Variant

fn (PointMesh) from_variant #

fn (mut s PointMesh) from_variant(variant &Variant)

struct Polygon2D #

struct Polygon2D {
	Node2D
}

A 2D polygon.

fn (Polygon2D) to_variant #

fn (s &Polygon2D) to_variant() Variant

fn (Polygon2D) from_variant #

fn (mut s Polygon2D) from_variant(variant &Variant)

fn (Polygon2D) set_polygon #

fn (s &Polygon2D) set_polygon(polygon PackedVector2Array)

fn (Polygon2D) get_polygon #

fn (s &Polygon2D) get_polygon() PackedVector2Array

fn (Polygon2D) set_uv #

fn (s &Polygon2D) set_uv(uv PackedVector2Array)

fn (Polygon2D) get_uv #

fn (s &Polygon2D) get_uv() PackedVector2Array

fn (Polygon2D) set_color #

fn (s &Polygon2D) set_color(color Color)

fn (Polygon2D) get_color #

fn (s &Polygon2D) get_color() Color

fn (Polygon2D) set_polygons #

fn (s &Polygon2D) set_polygons(polygons Array)

fn (Polygon2D) get_polygons #

fn (s &Polygon2D) get_polygons() Array

fn (Polygon2D) set_vertex_colors #

fn (s &Polygon2D) set_vertex_colors(vertex_colors PackedColorArray)

fn (Polygon2D) get_vertex_colors #

fn (s &Polygon2D) get_vertex_colors() PackedColorArray

fn (Polygon2D) set_texture #

fn (s &Polygon2D) set_texture(texture Texture2D)

fn (Polygon2D) get_texture #

fn (s &Polygon2D) get_texture() Texture2D

fn (Polygon2D) set_texture_offset #

fn (s &Polygon2D) set_texture_offset(texture_offset Vector2)

fn (Polygon2D) get_texture_offset #

fn (s &Polygon2D) get_texture_offset() Vector2

fn (Polygon2D) set_texture_rotation #

fn (s &Polygon2D) set_texture_rotation(texture_rotation f64)

fn (Polygon2D) get_texture_rotation #

fn (s &Polygon2D) get_texture_rotation() f64

fn (Polygon2D) set_texture_scale #

fn (s &Polygon2D) set_texture_scale(texture_scale Vector2)

fn (Polygon2D) get_texture_scale #

fn (s &Polygon2D) get_texture_scale() Vector2

fn (Polygon2D) set_invert_enabled #

fn (s &Polygon2D) set_invert_enabled(invert bool)

fn (Polygon2D) get_invert_enabled #

fn (s &Polygon2D) get_invert_enabled() bool

fn (Polygon2D) set_antialiased #

fn (s &Polygon2D) set_antialiased(antialiased bool)

fn (Polygon2D) get_antialiased #

fn (s &Polygon2D) get_antialiased() bool

fn (Polygon2D) set_invert_border #

fn (s &Polygon2D) set_invert_border(invert_border f64)

fn (Polygon2D) get_invert_border #

fn (s &Polygon2D) get_invert_border() f64

fn (Polygon2D) set_offset #

fn (s &Polygon2D) set_offset(offset Vector2)

fn (Polygon2D) get_offset #

fn (s &Polygon2D) get_offset() Vector2

fn (Polygon2D) add_bone #

fn (s &Polygon2D) add_bone(path NodePath, weights PackedFloat32Array)

Adds a bone with the specified [param path] and [param weights].

fn (Polygon2D) get_bone_count #

fn (s &Polygon2D) get_bone_count() i64

Returns the number of bones in this [Polygon2D].

fn (Polygon2D) get_bone_path #

fn (s &Polygon2D) get_bone_path(index i64) NodePath

Returns the path to the node associated with the specified bone.

fn (Polygon2D) get_bone_weights #

fn (s &Polygon2D) get_bone_weights(index i64) PackedFloat32Array

Returns the weight values of the specified bone.

fn (Polygon2D) erase_bone #

fn (s &Polygon2D) erase_bone(index i64)

Removes the specified bone from this [Polygon2D].

fn (Polygon2D) clear_bones #

fn (s &Polygon2D) clear_bones()

Removes all bones from this [Polygon2D].

fn (Polygon2D) set_bone_path #

fn (s &Polygon2D) set_bone_path(index i64, path NodePath)

Sets the path to the node associated with the specified bone.

fn (Polygon2D) set_bone_weights #

fn (s &Polygon2D) set_bone_weights(index i64, weights PackedFloat32Array)

Sets the weight values for the specified bone.

fn (Polygon2D) set_skeleton #

fn (s &Polygon2D) set_skeleton(skeleton NodePath)

fn (Polygon2D) get_skeleton #

fn (s &Polygon2D) get_skeleton() NodePath

fn (Polygon2D) set_internal_vertex_count #

fn (s &Polygon2D) set_internal_vertex_count(internal_vertex_count i64)

fn (Polygon2D) get_internal_vertex_count #

fn (s &Polygon2D) get_internal_vertex_count() i64

struct PolygonOccluder3D #

struct PolygonOccluder3D {
	Occluder3D
}

Flat 2D polygon shape for use with occlusion culling in [OccluderInstance3D].

fn (PolygonOccluder3D) to_variant #

fn (s &PolygonOccluder3D) to_variant() Variant

fn (PolygonOccluder3D) from_variant #

fn (mut s PolygonOccluder3D) from_variant(variant &Variant)

fn (PolygonOccluder3D) set_polygon #

fn (s &PolygonOccluder3D) set_polygon(polygon PackedVector2Array)

fn (PolygonOccluder3D) get_polygon #

fn (s &PolygonOccluder3D) get_polygon() PackedVector2Array

struct PolygonPathFinder #

struct PolygonPathFinder {
	Resource
}

fn (PolygonPathFinder) to_variant #

fn (s &PolygonPathFinder) to_variant() Variant

fn (PolygonPathFinder) from_variant #

fn (mut s PolygonPathFinder) from_variant(variant &Variant)

fn (PolygonPathFinder) setup #

fn (s &PolygonPathFinder) setup(points PackedVector2Array, connections PackedInt32Array)

Sets up [PolygonPathFinder] with an array of points that define the vertices of the polygon, and an array of indices that determine the edges of the polygon. The length of [param connections] must be even, returns an error if odd. [codeblocks] [gdscript] var polygon_path_finder = PolygonPathFinder.new() var points = [Vector2(0.0, 0.0), Vector2(1.0, 0.0), Vector2(0.0, 1.0)] var connections = [0, 1, 1, 2, 2, 0] polygon_path_finder.setup(points, connections) [/gdscript] [csharp] var polygonPathFinder = new PolygonPathFinder(); Vector2[] points = [ new Vector2(0.0f, 0.0f), new Vector2(1.0f, 0.0f), new Vector2(0.0f, 1.0f) ]; int[] connections = [0, 1, 1, 2, 2, 0]; polygonPathFinder.Setup(points, connections); [/csharp] [/codeblocks]

fn (PolygonPathFinder) find_path #

fn (s &PolygonPathFinder) find_path(from Vector2, to Vector2) PackedVector2Array

fn (PolygonPathFinder) get_intersections #

fn (s &PolygonPathFinder) get_intersections(from Vector2, to Vector2) PackedVector2Array

fn (PolygonPathFinder) get_closest_point #

fn (s &PolygonPathFinder) get_closest_point(point Vector2) Vector2

fn (PolygonPathFinder) is_point_inside #

fn (s &PolygonPathFinder) is_point_inside(point Vector2) bool

Returns true if [param point] falls inside the polygon area. [codeblocks] [gdscript] var polygon_path_finder = PolygonPathFinder.new() var points = [Vector2(0.0, 0.0), Vector2(1.0, 0.0), Vector2(0.0, 1.0)] var connections = [0, 1, 1, 2, 2, 0] polygon_path_finder.setup(points, connections) print(polygon_path_finder.is_point_inside(Vector2(0.2, 0.2))) # Prints true print(polygon_path_finder.is_point_inside(Vector2(1.0, 1.0))) # Prints false [/gdscript] [csharp] var polygonPathFinder = new PolygonPathFinder(); Vector2[] points = [ new Vector2(0.0f, 0.0f), new Vector2(1.0f, 0.0f), new Vector2(0.0f, 1.0f) ]; int[] connections = [0, 1, 1, 2, 2, 0]; polygonPathFinder.Setup(points, connections); GD.Print(polygonPathFinder.IsPointInside(new Vector2(0.2f, 0.2f))); // Prints True GD.Print(polygonPathFinder.IsPointInside(new Vector2(1.0f, 1.0f))); // Prints False [/csharp] [/codeblocks]

fn (PolygonPathFinder) set_point_penalty #

fn (s &PolygonPathFinder) set_point_penalty(idx i64, penalty f64)

fn (PolygonPathFinder) get_point_penalty #

fn (s &PolygonPathFinder) get_point_penalty(idx i64) f64

fn (PolygonPathFinder) get_bounds #

fn (s &PolygonPathFinder) get_bounds() Rect2

fn (Popup) to_variant #

fn (s &Popup) to_variant() Variant

fn (Popup) from_variant #

fn (mut s Popup) from_variant(variant &Variant)

struct PopupMenu #

struct PopupMenu {
	Popup
}

A modal window used to display a list of options.

fn (PopupMenu) to_variant #

fn (s &PopupMenu) to_variant() Variant

fn (PopupMenu) from_variant #

fn (mut s PopupMenu) from_variant(variant &Variant)

fn (PopupMenu) activate_item_by_event #

fn (s &PopupMenu) activate_item_by_event(event InputEvent, cfg PopupMenu_activate_item_by_event_Cfg) bool

Checks the provided [param event] against the [PopupMenu]'s shortcuts and accelerators, and activates the first item with matching events. If [param for_global_only] is true, only shortcuts and accelerators with global set to true will be called. Returns true if an item was successfully activated. [b]Note:[/b] Certain [Control]s, such as [MenuButton], will call this method automatically.

fn (PopupMenu) set_prefer_native_menu #

fn (s &PopupMenu) set_prefer_native_menu(enabled bool)

fn (PopupMenu) is_prefer_native_menu #

fn (s &PopupMenu) is_prefer_native_menu() bool

fn (PopupMenu) is_native_menu #

fn (s &PopupMenu) is_native_menu() bool

Returns true if the system native menu is supported and currently used by this [PopupMenu].

fn (PopupMenu) add_item #

fn (s &PopupMenu) add_item(label string, cfg PopupMenu_add_item_Cfg)

Adds a new item with text [param label]. An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. [b]Note:[/b] The provided [param id] is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the index arguments in e.g. [method set_item_checked].

fn (PopupMenu) add_icon_item #

fn (s &PopupMenu) add_icon_item(texture Texture2D, label string, cfg PopupMenu_add_icon_item_Cfg)

Adds a new item with text [param label] and icon [param texture]. An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators.

fn (PopupMenu) add_check_item #

fn (s &PopupMenu) add_check_item(label string, cfg PopupMenu_add_check_item_Cfg)

Adds a new checkable item with text [param label]. An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.

fn (PopupMenu) add_icon_check_item #

fn (s &PopupMenu) add_icon_check_item(texture Texture2D, label string, cfg PopupMenu_add_icon_check_item_Cfg)

Adds a new checkable item with text [param label] and icon [param texture]. An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.

fn (PopupMenu) add_radio_check_item #

fn (s &PopupMenu) add_radio_check_item(label string, cfg PopupMenu_add_radio_check_item_Cfg)

Adds a new radio check button with text [param label]. An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.

fn (PopupMenu) add_icon_radio_check_item #

fn (s &PopupMenu) add_icon_radio_check_item(texture Texture2D, label string, cfg PopupMenu_add_icon_radio_check_item_Cfg)

Same as [method add_icon_check_item], but uses a radio check button.

fn (PopupMenu) add_multistate_item #

fn (s &PopupMenu) add_multistate_item(label string, max_states i64, cfg PopupMenu_add_multistate_item_Cfg)

Adds a new multistate item with text [param label]. Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. The default value is defined by [param default_state]. An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators.

func _ready():
add_multistate_item('Item', 3, 0)

index_pressed.connect(func(index: int):
toggle_item_multistate(index)
match get_item_multistate(index):
0:
print('First state')
1:
print('Second state')
2:
print('Third state')
)

[b]Note:[/b] Multistate items don't update their state automatically and must be done manually. See [method toggle_item_multistate], [method set_item_multistate] and [method get_item_multistate] for more info on how to control it.

fn (PopupMenu) add_shortcut #

fn (s &PopupMenu) add_shortcut(shortcut Shortcut, cfg PopupMenu_add_shortcut_Cfg)

Adds a [Shortcut]. An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. If [param allow_echo] is true, the shortcut can be activated with echo events.

fn (PopupMenu) add_icon_shortcut #

fn (s &PopupMenu) add_icon_shortcut(texture Texture2D, shortcut Shortcut, cfg PopupMenu_add_icon_shortcut_Cfg)

Adds a new item and assigns the specified [Shortcut] and icon [param texture] to it. Sets the label of the checkbox to the [Shortcut]'s name. An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. If [param allow_echo] is true, the shortcut can be activated with echo events.

fn (PopupMenu) add_check_shortcut #

fn (s &PopupMenu) add_check_shortcut(shortcut Shortcut, cfg PopupMenu_add_check_shortcut_Cfg)

Adds a new checkable item and assigns the specified [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name. An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.

fn (PopupMenu) add_icon_check_shortcut #

fn (s &PopupMenu) add_icon_check_shortcut(texture Texture2D, shortcut Shortcut, cfg PopupMenu_add_icon_check_shortcut_Cfg)

Adds a new checkable item and assigns the specified [Shortcut] and icon [param texture] to it. Sets the label of the checkbox to the [Shortcut]'s name. An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.

fn (PopupMenu) add_radio_check_shortcut #

fn (s &PopupMenu) add_radio_check_shortcut(shortcut Shortcut, cfg PopupMenu_add_radio_check_shortcut_Cfg)

Adds a new radio check button and assigns a [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name. An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.

fn (PopupMenu) add_icon_radio_check_shortcut #

fn (s &PopupMenu) add_icon_radio_check_shortcut(texture Texture2D, shortcut Shortcut, cfg PopupMenu_add_icon_radio_check_shortcut_Cfg)

Same as [method add_icon_check_shortcut], but uses a radio check button.

fn (PopupMenu) add_submenu_item #

fn (s &PopupMenu) add_submenu_item(label string, submenu string, cfg PopupMenu_add_submenu_item_Cfg)

Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. The [param submenu] argument must be the name of an existing [PopupMenu] that has been added as a child to this node. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the ui_select or ui_right input actions. An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index.

fn (PopupMenu) add_submenu_node_item #

fn (s &PopupMenu) add_submenu_node_item(label string, submenu PopupMenu, cfg PopupMenu_add_submenu_node_item_Cfg)

Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the ui_select or ui_right input actions. [param submenu] must be either child of this [PopupMenu] or has no parent node (in which case it will be automatically added as a child). If the [param submenu] popup has another parent, this method will fail. An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index.

fn (PopupMenu) set_item_text #

fn (s &PopupMenu) set_item_text(index i64, text string)

Sets the text of the item at the given [param index].

fn (PopupMenu) set_item_text_direction #

fn (s &PopupMenu) set_item_text_direction(index i64, direction ControlTextDirection)

Sets item's text base writing direction.

fn (PopupMenu) set_item_language #

fn (s &PopupMenu) set_item_language(index i64, language string)

Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.

fn (PopupMenu) set_item_auto_translate_mode #

fn (s &PopupMenu) set_item_auto_translate_mode(index i64, mode NodeAutoTranslateMode)

Sets the auto translate mode of the item at the given [param index]. Items use [constant Node.AUTO_TRANSLATE_MODE_INHERIT] by default, which uses the same auto translate mode as the [PopupMenu] itself.

fn (PopupMenu) set_item_icon #

fn (s &PopupMenu) set_item_icon(index i64, icon Texture2D)

Replaces the [Texture2D] icon of the item at the given [param index].

fn (PopupMenu) set_item_icon_max_width #

fn (s &PopupMenu) set_item_icon_max_width(index i64, width i64)

Sets the maximum allowed width of the icon for the item at the given [param index]. This limit is applied on top of the default size of the icon and on top of [theme_item icon_max_width]. The height is adjusted according to the icon's ratio.

fn (PopupMenu) set_item_icon_modulate #

fn (s &PopupMenu) set_item_icon_modulate(index i64, modulate Color)

Sets a modulating [Color] of the item's icon at the given [param index].

fn (PopupMenu) set_item_checked #

fn (s &PopupMenu) set_item_checked(index i64, checked bool)

Sets the checkstate status of the item at the given [param index].

fn (PopupMenu) set_item_id #

fn (s &PopupMenu) set_item_id(index i64, id i64)

Sets the [param id] of the item at the given [param index]. The [param id] is used in [signal id_pressed] and [signal id_focused] signals.

fn (PopupMenu) set_item_accelerator #

fn (s &PopupMenu) set_item_accelerator(index i64, accel Key)

Sets the accelerator of the item at the given [param index]. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. [param accel] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]).

fn (PopupMenu) set_item_metadata #

fn (s &PopupMenu) set_item_metadata(index i64, metadata_ ToVariant)

Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.

fn (PopupMenu) set_item_disabled #

fn (s &PopupMenu) set_item_disabled(index i64, disabled bool)

Enables/disables the item at the given [param index]. When it is disabled, it can't be selected and its action can't be invoked.

fn (PopupMenu) set_item_submenu #

fn (s &PopupMenu) set_item_submenu(index i64, submenu string)

Sets the submenu of the item at the given [param index]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked.

fn (PopupMenu) set_item_submenu_node #

fn (s &PopupMenu) set_item_submenu_node(index i64, submenu PopupMenu)

Sets the submenu of the item at the given [param index]. The submenu is a [PopupMenu] node that would be shown when the item is clicked. It must either be a child of this [PopupMenu] or has no parent (in which case it will be automatically added as a child). If the [param submenu] popup has another parent, this method will fail.

fn (PopupMenu) set_item_as_separator #

fn (s &PopupMenu) set_item_as_separator(index i64, enable bool)

Mark the item at the given [param index] as a separator, which means that it would be displayed as a line. If false, sets the type of the item to plain text.

fn (PopupMenu) set_item_as_checkable #

fn (s &PopupMenu) set_item_as_checkable(index i64, enable bool)

Sets whether the item at the given [param index] has a checkbox. If false, sets the type of the item to plain text. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.

fn (PopupMenu) set_item_as_radio_checkable #

fn (s &PopupMenu) set_item_as_radio_checkable(index i64, enable bool)

Sets the type of the item at the given [param index] to radio button. If false, sets the type of the item to plain text.

fn (PopupMenu) set_item_tooltip #

fn (s &PopupMenu) set_item_tooltip(index i64, tooltip string)

Sets the [String] tooltip of the item at the given [param index].

fn (PopupMenu) set_item_shortcut #

fn (s &PopupMenu) set_item_shortcut(index i64, shortcut Shortcut, cfg PopupMenu_set_item_shortcut_Cfg)

Sets a [Shortcut] for the item at the given [param index].

fn (PopupMenu) set_item_indent #

fn (s &PopupMenu) set_item_indent(index i64, indent i64)

Sets the horizontal offset of the item at the given [param index].

fn (PopupMenu) set_item_multistate #

fn (s &PopupMenu) set_item_multistate(index i64, state i64)

Sets the state of a multistate item. See [method add_multistate_item] for details.

fn (PopupMenu) set_item_multistate_max #

fn (s &PopupMenu) set_item_multistate_max(index i64, max_states i64)

Sets the max states of a multistate item. See [method add_multistate_item] for details.

fn (PopupMenu) set_item_shortcut_disabled #

fn (s &PopupMenu) set_item_shortcut_disabled(index i64, disabled bool)

Disables the [Shortcut] of the item at the given [param index].

fn (PopupMenu) toggle_item_checked #

fn (s &PopupMenu) toggle_item_checked(index i64)

Toggles the check state of the item at the given [param index].

fn (PopupMenu) toggle_item_multistate #

fn (s &PopupMenu) toggle_item_multistate(index i64)

Cycle to the next state of a multistate item. See [method add_multistate_item] for details.

fn (PopupMenu) get_item_text #

fn (s &PopupMenu) get_item_text(index i64) string

Returns the text of the item at the given [param index].

fn (PopupMenu) get_item_text_direction #

fn (s &PopupMenu) get_item_text_direction(index i64) ControlTextDirection

Returns item's text base writing direction.

fn (PopupMenu) get_item_language #

fn (s &PopupMenu) get_item_language(index i64) string

Returns item's text language code.

fn (PopupMenu) get_item_auto_translate_mode #

fn (s &PopupMenu) get_item_auto_translate_mode(index i64) NodeAutoTranslateMode

Returns the auto translate mode of the item at the given [param index].

fn (PopupMenu) get_item_icon #

fn (s &PopupMenu) get_item_icon(index i64) Texture2D

Returns the icon of the item at the given [param index].

fn (PopupMenu) get_item_icon_max_width #

fn (s &PopupMenu) get_item_icon_max_width(index i64) i64

Returns the maximum allowed width of the icon for the item at the given [param index].

fn (PopupMenu) get_item_icon_modulate #

fn (s &PopupMenu) get_item_icon_modulate(index i64) Color

Returns a [Color] modulating the item's icon at the given [param index].

fn (PopupMenu) is_item_checked #

fn (s &PopupMenu) is_item_checked(index i64) bool

Returns true if the item at the given [param index] is checked.

fn (PopupMenu) get_item_id #

fn (s &PopupMenu) get_item_id(index i64) i64

Returns the ID of the item at the given [param index]. id can be manually assigned, while index can not.

fn (PopupMenu) get_item_index #

fn (s &PopupMenu) get_item_index(id i64) i64

Returns the index of the item containing the specified [param id]. Index is automatically assigned to each item by the engine and can not be set manually.

fn (PopupMenu) get_item_accelerator #

fn (s &PopupMenu) get_item_accelerator(index i64) Key

Returns the accelerator of the item at the given [param index]. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The return value is an integer which is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]). If no accelerator is defined for the specified [param index], [method get_item_accelerator] returns 0 (corresponding to [constant @GlobalScope.KEY_NONE]).

fn (PopupMenu) get_item_metadata #

fn (s &PopupMenu) get_item_metadata(index i64) Variant

Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.

fn (PopupMenu) is_item_disabled #

fn (s &PopupMenu) is_item_disabled(index i64) bool

Returns true if the item at the given [param index] is disabled. When it is disabled it can't be selected, or its action invoked. See [method set_item_disabled] for more info on how to disable an item.

fn (PopupMenu) get_item_submenu #

fn (s &PopupMenu) get_item_submenu(index i64) string

Returns the submenu name of the item at the given [param index]. See [method add_submenu_item] for more info on how to add a submenu.

fn (PopupMenu) get_item_submenu_node #

fn (s &PopupMenu) get_item_submenu_node(index i64) PopupMenu

Returns the submenu of the item at the given [param index], or null if no submenu was added. See [method add_submenu_node_item] for more info on how to add a submenu.

fn (PopupMenu) is_item_separator #

fn (s &PopupMenu) is_item_separator(index i64) bool

Returns true if the item is a separator. If it is, it will be displayed as a line. See [method add_separator] for more info on how to add a separator.

fn (PopupMenu) is_item_checkable #

fn (s &PopupMenu) is_item_checkable(index i64) bool

Returns true if the item at the given [param index] is checkable in some way, i.e. if it has a checkbox or radio button. [b]Note:[/b] Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually.

fn (PopupMenu) is_item_radio_checkable #

fn (s &PopupMenu) is_item_radio_checkable(index i64) bool

Returns true if the item at the given [param index] has radio button-style checkability. [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.

fn (PopupMenu) is_item_shortcut_disabled #

fn (s &PopupMenu) is_item_shortcut_disabled(index i64) bool

Returns true if the specified item's shortcut is disabled.

fn (PopupMenu) get_item_tooltip #

fn (s &PopupMenu) get_item_tooltip(index i64) string

Returns the tooltip associated with the item at the given [param index].

fn (PopupMenu) get_item_shortcut #

fn (s &PopupMenu) get_item_shortcut(index i64) Shortcut

Returns the [Shortcut] associated with the item at the given [param index].

fn (PopupMenu) get_item_indent #

fn (s &PopupMenu) get_item_indent(index i64) i64

Returns the horizontal offset of the item at the given [param index].

fn (PopupMenu) get_item_multistate_max #

fn (s &PopupMenu) get_item_multistate_max(index i64) i64

Returns the max states of the item at the given [param index].

fn (PopupMenu) get_item_multistate #

fn (s &PopupMenu) get_item_multistate(index i64) i64

Returns the state of the item at the given [param index].

fn (PopupMenu) set_focused_item #

fn (s &PopupMenu) set_focused_item(index i64)

Sets the currently focused item as the given [param index]. Passing -1 as the index makes so that no item is focused.

fn (PopupMenu) get_focused_item #

fn (s &PopupMenu) get_focused_item() i64

Returns the index of the currently focused item. Returns -1 if no item is focused.

fn (PopupMenu) set_item_count #

fn (s &PopupMenu) set_item_count(count i64)

fn (PopupMenu) get_item_count #

fn (s &PopupMenu) get_item_count() i64

fn (PopupMenu) scroll_to_item #

fn (s &PopupMenu) scroll_to_item(index i64)

Moves the scroll view to make the item at the given [param index] visible.

fn (PopupMenu) remove_item #

fn (s &PopupMenu) remove_item(index i64)

Removes the item at the given [param index] from the menu. [b]Note:[/b] The indices of items after the removed item will be shifted by one.

fn (PopupMenu) add_separator #

fn (s &PopupMenu) add_separator(cfg PopupMenu_add_separator_Cfg)

Adds a separator between items. Separators also occupy an index, which you can set by using the [param id] parameter. A [param label] can optionally be provided, which will appear at the center of the separator.

fn (PopupMenu) clear #

fn (s &PopupMenu) clear(cfg PopupMenu_clear_Cfg)

Removes all items from the [PopupMenu]. If [param free_submenus] is true, the submenu nodes are automatically freed.

fn (PopupMenu) set_hide_on_item_selection #

fn (s &PopupMenu) set_hide_on_item_selection(enable bool)

fn (PopupMenu) is_hide_on_item_selection #

fn (s &PopupMenu) is_hide_on_item_selection() bool

fn (PopupMenu) set_hide_on_checkable_item_selection #

fn (s &PopupMenu) set_hide_on_checkable_item_selection(enable bool)

fn (PopupMenu) is_hide_on_checkable_item_selection #

fn (s &PopupMenu) is_hide_on_checkable_item_selection() bool

fn (PopupMenu) set_hide_on_state_item_selection #

fn (s &PopupMenu) set_hide_on_state_item_selection(enable bool)

fn (PopupMenu) is_hide_on_state_item_selection #

fn (s &PopupMenu) is_hide_on_state_item_selection() bool

fn (PopupMenu) set_submenu_popup_delay #

fn (s &PopupMenu) set_submenu_popup_delay(seconds f64)

fn (PopupMenu) get_submenu_popup_delay #

fn (s &PopupMenu) get_submenu_popup_delay() f64

fn (PopupMenu) is_system_menu #

fn (s &PopupMenu) is_system_menu() bool

Returns true if the menu is bound to the special system menu.

fn (PopupMenu) set_system_menu #

fn (s &PopupMenu) set_system_menu(system_menu_id NativeMenuSystemMenus)

fn (PopupMenu) get_system_menu #

fn (s &PopupMenu) get_system_menu() NativeMenuSystemMenus

struct PopupMenu_activate_item_by_event_Cfg #

@[params]
struct PopupMenu_activate_item_by_event_Cfg {
pub:
	for_global_only bool
}

Optional parameters for PopupMenu#activate_item_by_event

struct PopupMenu_add_check_item_Cfg #

@[params]
struct PopupMenu_add_check_item_Cfg {
pub:
	id    i64 = -1
	accel Key = unsafe { Key(0) }
}

Optional parameters for PopupMenu#add_check_item

struct PopupMenu_add_check_shortcut_Cfg #

@[params]
struct PopupMenu_add_check_shortcut_Cfg {
pub:
	id     i64 = -1
	global bool
}

Optional parameters for PopupMenu#add_check_shortcut

struct PopupMenu_add_icon_check_item_Cfg #

@[params]
struct PopupMenu_add_icon_check_item_Cfg {
pub:
	id    i64 = -1
	accel Key = unsafe { Key(0) }
}

Optional parameters for PopupMenu#add_icon_check_item

struct PopupMenu_add_icon_check_shortcut_Cfg #

@[params]
struct PopupMenu_add_icon_check_shortcut_Cfg {
pub:
	id     i64 = -1
	global bool
}

Optional parameters for PopupMenu#add_icon_check_shortcut

struct PopupMenu_add_icon_item_Cfg #

@[params]
struct PopupMenu_add_icon_item_Cfg {
pub:
	id    i64 = -1
	accel Key = unsafe { Key(0) }
}

Optional parameters for PopupMenu#add_icon_item

struct PopupMenu_add_icon_radio_check_item_Cfg #

@[params]
struct PopupMenu_add_icon_radio_check_item_Cfg {
pub:
	id    i64 = -1
	accel Key = unsafe { Key(0) }
}

Optional parameters for PopupMenu#add_icon_radio_check_item

struct PopupMenu_add_icon_radio_check_shortcut_Cfg #

@[params]
struct PopupMenu_add_icon_radio_check_shortcut_Cfg {
pub:
	id     i64 = -1
	global bool
}

Optional parameters for PopupMenu#add_icon_radio_check_shortcut

struct PopupMenu_add_icon_shortcut_Cfg #

@[params]
struct PopupMenu_add_icon_shortcut_Cfg {
pub:
	id         i64 = -1
	global     bool
	allow_echo bool
}

Optional parameters for PopupMenu#add_icon_shortcut

struct PopupMenu_add_item_Cfg #

@[params]
struct PopupMenu_add_item_Cfg {
pub:
	id    i64 = -1
	accel Key = unsafe { Key(0) }
}

Optional parameters for PopupMenu#add_item

struct PopupMenu_add_multistate_item_Cfg #

@[params]
struct PopupMenu_add_multistate_item_Cfg {
pub:
	default_state i64
	id            i64 = -1
	accel         Key = unsafe { Key(0) }
}

Optional parameters for PopupMenu#add_multistate_item

struct PopupMenu_add_radio_check_item_Cfg #

@[params]
struct PopupMenu_add_radio_check_item_Cfg {
pub:
	id    i64 = -1
	accel Key = unsafe { Key(0) }
}

Optional parameters for PopupMenu#add_radio_check_item

struct PopupMenu_add_radio_check_shortcut_Cfg #

@[params]
struct PopupMenu_add_radio_check_shortcut_Cfg {
pub:
	id     i64 = -1
	global bool
}

Optional parameters for PopupMenu#add_radio_check_shortcut

struct PopupMenu_add_separator_Cfg #

@[params]
struct PopupMenu_add_separator_Cfg {
pub:
	label string
	id    i64 = -1
}

Optional parameters for PopupMenu#add_separator

struct PopupMenu_add_shortcut_Cfg #

@[params]
struct PopupMenu_add_shortcut_Cfg {
pub:
	id         i64 = -1
	global     bool
	allow_echo bool
}

Optional parameters for PopupMenu#add_shortcut

struct PopupMenu_add_submenu_item_Cfg #

@[params]
struct PopupMenu_add_submenu_item_Cfg {
pub:
	id i64 = -1
}

Optional parameters for PopupMenu#add_submenu_item

struct PopupMenu_add_submenu_node_item_Cfg #

@[params]
struct PopupMenu_add_submenu_node_item_Cfg {
pub:
	id i64 = -1
}

Optional parameters for PopupMenu#add_submenu_node_item

struct PopupMenu_clear_Cfg #

@[params]
struct PopupMenu_clear_Cfg {
pub:
	free_submenus bool
}

Optional parameters for PopupMenu#clear

struct PopupMenu_set_item_shortcut_Cfg #

@[params]
struct PopupMenu_set_item_shortcut_Cfg {
pub:
	global bool
}

Optional parameters for PopupMenu#set_item_shortcut

struct PopupPanel #

struct PopupPanel {
	Popup
}

A popup with a panel background.

fn (PopupPanel) to_variant #

fn (s &PopupPanel) to_variant() Variant

fn (PopupPanel) from_variant #

fn (mut s PopupPanel) from_variant(variant &Variant)

struct PortableCompressedTexture2D #

struct PortableCompressedTexture2D {
	Texture2D
}

Provides a compressed texture for disk and/or VRAM in a way that is portable.

fn (PortableCompressedTexture2D) to_variant #

fn (s &PortableCompressedTexture2D) to_variant() Variant

fn (PortableCompressedTexture2D) from_variant #

fn (mut s PortableCompressedTexture2D) from_variant(variant &Variant)

fn (PortableCompressedTexture2D) create_from_image #

fn (s &PortableCompressedTexture2D) create_from_image(image Image, compression_mode PortableCompressedTexture2DCompressionMode, cfg PortableCompressedTexture2D_create_from_image_Cfg)

Initializes the compressed texture from a base image. The compression mode must be provided. [param normal_map] is recommended to ensure optimum quality if this image will be used as a normal map. If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality.

fn (PortableCompressedTexture2D) get_format #

fn (s &PortableCompressedTexture2D) get_format() ImageFormat

Return the image format used (valid after initialized).

fn (PortableCompressedTexture2D) get_compression_mode #

fn (s &PortableCompressedTexture2D) get_compression_mode() PortableCompressedTexture2DCompressionMode

Return the compression mode used (valid after initialized).

fn (PortableCompressedTexture2D) set_size_override #

fn (s &PortableCompressedTexture2D) set_size_override(size Vector2)

fn (PortableCompressedTexture2D) get_size_override #

fn (s &PortableCompressedTexture2D) get_size_override() Vector2

fn (PortableCompressedTexture2D) set_keep_compressed_buffer #

fn (s &PortableCompressedTexture2D) set_keep_compressed_buffer(keep bool)

fn (PortableCompressedTexture2D) is_keeping_compressed_buffer #

fn (s &PortableCompressedTexture2D) is_keeping_compressed_buffer() bool

fn (PortableCompressedTexture2D) set_basisu_compressor_params #

fn (s &PortableCompressedTexture2D) set_basisu_compressor_params(uastc_level i64, rdo_quality_loss f64)

Sets the compressor parameters for Basis Universal compression. See also the settings in [ResourceImporterTexture]. [b]Note:[/b] This must be set before [method create_from_image] to take effect.

struct PortableCompressedTexture2D_create_from_image_Cfg #

@[params]
struct PortableCompressedTexture2D_create_from_image_Cfg {
pub:
	normal_map    bool
	lossy_quality f64 = 0.8
}

Optional parameters for PortableCompressedTexture2D#create_from_image

struct PrimitiveMesh #

struct PrimitiveMesh {
	Mesh
}

Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.

fn (PrimitiveMesh) to_variant #

fn (s &PrimitiveMesh) to_variant() Variant

fn (PrimitiveMesh) from_variant #

fn (mut s PrimitiveMesh) from_variant(variant &Variant)

fn (PrimitiveMesh) gd_create_mesh_array #

fn (s &PrimitiveMesh) gd_create_mesh_array() Array

Override this method to customize how this primitive mesh should be generated. Should return an [Array] where each element is another Array of values required for the mesh (see the [enum Mesh.ArrayType] constants).

fn (PrimitiveMesh) set_material #

fn (s &PrimitiveMesh) set_material(material Material)

fn (PrimitiveMesh) get_material #

fn (s &PrimitiveMesh) get_material() Material

fn (PrimitiveMesh) get_mesh_arrays #

fn (s &PrimitiveMesh) get_mesh_arrays() Array

Returns the mesh arrays used to make up the surface of this primitive mesh. [b]Example:[/b] Pass the result to [method ArrayMesh.add_surface_from_arrays] to create a new surface: [codeblocks] [gdscript] var c = CylinderMesh.new() var arr_mesh = ArrayMesh.new() arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, c.get_mesh_arrays()) [/gdscript] [csharp] var c = new CylinderMesh(); var arrMesh = new ArrayMesh(); arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, c.GetMeshArrays()); [/csharp] [/codeblocks]

fn (PrimitiveMesh) set_custom_aabb #

fn (s &PrimitiveMesh) set_custom_aabb(aabb AABB)

fn (PrimitiveMesh) get_custom_aabb #

fn (s &PrimitiveMesh) get_custom_aabb() AABB

fn (PrimitiveMesh) set_flip_faces #

fn (s &PrimitiveMesh) set_flip_faces(flip_faces bool)

fn (PrimitiveMesh) get_flip_faces #

fn (s &PrimitiveMesh) get_flip_faces() bool

fn (PrimitiveMesh) set_add_uv2 #

fn (s &PrimitiveMesh) set_add_uv2(add_uv2 bool)

fn (PrimitiveMesh) get_add_uv2 #

fn (s &PrimitiveMesh) get_add_uv2() bool

fn (PrimitiveMesh) set_uv2_padding #

fn (s &PrimitiveMesh) set_uv2_padding(uv2_padding f64)

fn (PrimitiveMesh) get_uv2_padding #

fn (s &PrimitiveMesh) get_uv2_padding() f64

fn (PrimitiveMesh) request_update #

fn (s &PrimitiveMesh) request_update()

Request an update of this primitive mesh based on its properties.

struct PrismMesh #

struct PrismMesh {
	PrimitiveMesh
}

Class representing a prism-shaped [PrimitiveMesh].

fn (PrismMesh) to_variant #

fn (s &PrismMesh) to_variant() Variant

fn (PrismMesh) from_variant #

fn (mut s PrismMesh) from_variant(variant &Variant)

fn (PrismMesh) set_left_to_right #

fn (s &PrismMesh) set_left_to_right(left_to_right f64)

fn (PrismMesh) get_left_to_right #

fn (s &PrismMesh) get_left_to_right() f64

fn (PrismMesh) set_size #

fn (s &PrismMesh) set_size(size Vector3)

fn (PrismMesh) get_size #

fn (s &PrismMesh) get_size() Vector3

fn (PrismMesh) set_subdivide_width #

fn (s &PrismMesh) set_subdivide_width(segments i64)

fn (PrismMesh) get_subdivide_width #

fn (s &PrismMesh) get_subdivide_width() i64

fn (PrismMesh) set_subdivide_height #

fn (s &PrismMesh) set_subdivide_height(segments i64)

fn (PrismMesh) get_subdivide_height #

fn (s &PrismMesh) get_subdivide_height() i64

fn (PrismMesh) set_subdivide_depth #

fn (s &PrismMesh) set_subdivide_depth(segments i64)

fn (PrismMesh) get_subdivide_depth #

fn (s &PrismMesh) get_subdivide_depth() i64

struct ProceduralSkyMaterial #

struct ProceduralSkyMaterial {
	Material
}

A material that defines a simple sky for a [Sky] resource.

fn (ProceduralSkyMaterial) to_variant #

fn (s &ProceduralSkyMaterial) to_variant() Variant

fn (ProceduralSkyMaterial) from_variant #

fn (mut s ProceduralSkyMaterial) from_variant(variant &Variant)

fn (ProceduralSkyMaterial) set_sky_top_color #

fn (s &ProceduralSkyMaterial) set_sky_top_color(color Color)

fn (ProceduralSkyMaterial) get_sky_top_color #

fn (s &ProceduralSkyMaterial) get_sky_top_color() Color

fn (ProceduralSkyMaterial) set_sky_horizon_color #

fn (s &ProceduralSkyMaterial) set_sky_horizon_color(color Color)

fn (ProceduralSkyMaterial) get_sky_horizon_color #

fn (s &ProceduralSkyMaterial) get_sky_horizon_color() Color

fn (ProceduralSkyMaterial) set_sky_curve #

fn (s &ProceduralSkyMaterial) set_sky_curve(curve f64)

fn (ProceduralSkyMaterial) get_sky_curve #

fn (s &ProceduralSkyMaterial) get_sky_curve() f64

fn (ProceduralSkyMaterial) set_sky_energy_multiplier #

fn (s &ProceduralSkyMaterial) set_sky_energy_multiplier(multiplier f64)

fn (ProceduralSkyMaterial) get_sky_energy_multiplier #

fn (s &ProceduralSkyMaterial) get_sky_energy_multiplier() f64

fn (ProceduralSkyMaterial) set_sky_cover #

fn (s &ProceduralSkyMaterial) set_sky_cover(sky_cover Texture2D)

fn (ProceduralSkyMaterial) get_sky_cover #

fn (s &ProceduralSkyMaterial) get_sky_cover() Texture2D

fn (ProceduralSkyMaterial) set_sky_cover_modulate #

fn (s &ProceduralSkyMaterial) set_sky_cover_modulate(color Color)

fn (ProceduralSkyMaterial) get_sky_cover_modulate #

fn (s &ProceduralSkyMaterial) get_sky_cover_modulate() Color

fn (ProceduralSkyMaterial) set_ground_bottom_color #

fn (s &ProceduralSkyMaterial) set_ground_bottom_color(color Color)

fn (ProceduralSkyMaterial) get_ground_bottom_color #

fn (s &ProceduralSkyMaterial) get_ground_bottom_color() Color

fn (ProceduralSkyMaterial) set_ground_horizon_color #

fn (s &ProceduralSkyMaterial) set_ground_horizon_color(color Color)

fn (ProceduralSkyMaterial) get_ground_horizon_color #

fn (s &ProceduralSkyMaterial) get_ground_horizon_color() Color

fn (ProceduralSkyMaterial) set_ground_curve #

fn (s &ProceduralSkyMaterial) set_ground_curve(curve f64)

fn (ProceduralSkyMaterial) get_ground_curve #

fn (s &ProceduralSkyMaterial) get_ground_curve() f64

fn (ProceduralSkyMaterial) set_ground_energy_multiplier #

fn (s &ProceduralSkyMaterial) set_ground_energy_multiplier(energy f64)

fn (ProceduralSkyMaterial) get_ground_energy_multiplier #

fn (s &ProceduralSkyMaterial) get_ground_energy_multiplier() f64

fn (ProceduralSkyMaterial) set_sun_angle_max #

fn (s &ProceduralSkyMaterial) set_sun_angle_max(degrees f64)

fn (ProceduralSkyMaterial) get_sun_angle_max #

fn (s &ProceduralSkyMaterial) get_sun_angle_max() f64

fn (ProceduralSkyMaterial) set_sun_curve #

fn (s &ProceduralSkyMaterial) set_sun_curve(curve f64)

fn (ProceduralSkyMaterial) get_sun_curve #

fn (s &ProceduralSkyMaterial) get_sun_curve() f64

fn (ProceduralSkyMaterial) set_use_debanding #

fn (s &ProceduralSkyMaterial) set_use_debanding(use_debanding bool)

fn (ProceduralSkyMaterial) get_use_debanding #

fn (s &ProceduralSkyMaterial) get_use_debanding() bool

fn (ProceduralSkyMaterial) set_energy_multiplier #

fn (s &ProceduralSkyMaterial) set_energy_multiplier(multiplier f64)

fn (ProceduralSkyMaterial) get_energy_multiplier #

fn (s &ProceduralSkyMaterial) get_energy_multiplier() f64

struct ProgressBar #

struct ProgressBar {
	Range
}

A control used for visual representation of a percentage.

fn (ProgressBar) to_variant #

fn (s &ProgressBar) to_variant() Variant

fn (ProgressBar) from_variant #

fn (mut s ProgressBar) from_variant(variant &Variant)

fn (ProgressBar) set_fill_mode #

fn (s &ProgressBar) set_fill_mode(mode i64)

fn (ProgressBar) get_fill_mode #

fn (s &ProgressBar) get_fill_mode() i64

fn (ProgressBar) set_show_percentage #

fn (s &ProgressBar) set_show_percentage(visible bool)

fn (ProgressBar) is_percentage_shown #

fn (s &ProgressBar) is_percentage_shown() bool

fn (ProgressBar) set_indeterminate #

fn (s &ProgressBar) set_indeterminate(indeterminate bool)

fn (ProgressBar) is_indeterminate #

fn (s &ProgressBar) is_indeterminate() bool

fn (ProgressBar) set_editor_preview_indeterminate #

fn (s &ProgressBar) set_editor_preview_indeterminate(preview_indeterminate bool)

fn (ProgressBar) is_editor_preview_indeterminate_enabled #

fn (s &ProgressBar) is_editor_preview_indeterminate_enabled() bool

struct ProjectSettings #

struct ProjectSettings {
	Object
}

Stores globally-accessible variables.

fn (ProjectSettings) to_variant #

fn (s &ProjectSettings) to_variant() Variant

fn (ProjectSettings) from_variant #

fn (mut s ProjectSettings) from_variant(variant &Variant)

fn (ProjectSettings) has_setting #

fn (s &ProjectSettings) has_setting(name string) bool

Returns true if a configuration value is present. [b]Note:[/b] In order to be be detected, custom settings have to be either defined with [method set_setting], or exist in the project.godot file. This is especially relevant when using [method set_initial_value].

fn (ProjectSettings) set_setting #

fn (s &ProjectSettings) set_setting(name string, value_ ToVariant)

Sets the value of a setting. [codeblocks] [gdscript] ProjectSettings.set_setting("application/config/name", "Example") [/gdscript] [csharp] ProjectSettings.SetSetting("application/config/name", "Example"); [/csharp] [/codeblocks] This can also be used to erase custom project settings. To do this change the setting value to null.

fn (ProjectSettings) get_setting #

fn (s &ProjectSettings) get_setting(name string, cfg ProjectSettings_get_setting_Cfg) Variant

Returns the value of the setting identified by [param name]. If the setting doesn't exist and [param default_value] is specified, the value of [param default_value] is returned. Otherwise, null is returned. [codeblocks] [gdscript] print(ProjectSettings.get_setting("application/config/name")) print(ProjectSettings.get_setting("application/config/custom_description", "No description specified.")) [/gdscript] [csharp] GD.Print(ProjectSettings.GetSetting("application/config/name")); GD.Print(ProjectSettings.GetSetting("application/config/custom_description", "No description specified.")); [/csharp] [/codeblocks] [b]Note:[/b] This method doesn't take potential feature overrides into account automatically. Use [method get_setting_with_override] to handle seamlessly. See also [method has_setting] to check whether a setting exists.

fn (ProjectSettings) get_setting_with_override #

fn (s &ProjectSettings) get_setting_with_override(name string) Variant

Similar to [method get_setting], but applies feature tag overrides if any exists and is valid. [b]Example:[/b] If the setting override "application/config/name.windows" exists, and the following code is executed on a [i]Windows[/i] operating system, the overridden setting is printed instead: [codeblocks] [gdscript] print(ProjectSettings.get_setting_with_override("application/config/name")) [/gdscript] [csharp] GD.Print(ProjectSettings.GetSettingWithOverride("application/config/name")); [/csharp] [/codeblocks]

fn (ProjectSettings) get_global_class_list #

fn (s &ProjectSettings) get_global_class_list() Array

Returns an [Array] of registered global classes. Each global class is represented as a [Dictionary] that contains the following entries:- base is a name of the base class;

  • class is a name of the registered global class;
  • icon is a path to a custom icon of the global class, if it has any;
  • language is a name of a programming language in which the global class is written;
  • path is a path to a file containing the global class.[b]Note:[/b] Both the script and the icon paths are local to the project filesystem, i.e. they start with res://.

fn (ProjectSettings) get_setting_with_override_and_custom_features #

fn (s &ProjectSettings) get_setting_with_override_and_custom_features(name string, features PackedStringArray) Variant

Similar to [method get_setting_with_override], but applies feature tag overrides instead of current OS features.

fn (ProjectSettings) set_order #

fn (s &ProjectSettings) set_order(name string, position i64)

Sets the order of a configuration value (influences when saved to the config file).

fn (ProjectSettings) get_order #

fn (s &ProjectSettings) get_order(name string) i64

Returns the order of a configuration value (influences when saved to the config file).

fn (ProjectSettings) set_initial_value #

fn (s &ProjectSettings) set_initial_value(name string, value_ ToVariant)

Sets the specified setting's initial value. This is the value the setting reverts to. The setting should already exist before calling this method. Note that project settings equal to their default value are not saved, so your code needs to account for that.

extends EditorPlugin

const SETTING_NAME = 'addons/my_setting'
const SETTING_DEFAULT = 10.0

func _enter_tree():
if not ProjectSettings.has_setting(SETTING_NAME):
ProjectSettings.set_setting(SETTING_NAME, SETTING_DEFAULT)

ProjectSettings.set_initial_value(SETTING_NAME, SETTING_DEFAULT)

If you have a project setting defined by an [EditorPlugin], but want to use it in a running project, you will need a similar code at runtime.

fn (ProjectSettings) set_as_basic #

fn (s &ProjectSettings) set_as_basic(name string, basic bool)

Defines if the specified setting is considered basic or advanced. Basic settings will always be shown in the project settings. Advanced settings will only be shown if the user enables the "Advanced Settings" option.

fn (ProjectSettings) set_as_internal #

fn (s &ProjectSettings) set_as_internal(name string, internal bool)

Defines if the specified setting is considered internal. An internal setting won't show up in the Project Settings dialog. This is mostly useful for addons that need to store their own internal settings without exposing them directly to the user.

fn (ProjectSettings) add_property_info #

fn (s &ProjectSettings) add_property_info(hint Dictionary)

Adds a custom property info to a property. The dictionary must contain:- "name": [String] (the property's name)

  • "type": [int] (see [enum Variant.Type])
  • optionally "hint": [int] (see [enum PropertyHint]) and "hint_string": [String][codeblocks] [gdscript] ProjectSettings.set("category/property_name", 0)

var property_info = { "name": "category/property_name", "type": TYPE_INT, "hint": PROPERTY_HINT_ENUM, "hint_string": "one,two,three" }

ProjectSettings.add_property_info(property_info) [/gdscript] [csharp] ProjectSettings.Singleton.Set("category/property_name", 0);

var propertyInfo = new Godot.Collections.Dictionary { { "name", "category/propertyName" }, { "type", (int)Variant.Type.Int }, { "hint", (int)PropertyHint.Enum }, { "hint_string", "one,two,three" }, };

ProjectSettings.AddPropertyInfo(propertyInfo); [/csharp] [/codeblocks] [b]Note:[/b] Setting "usage" for the property is not supported. Use [method set_as_basic], [method set_restart_if_changed], and [method set_as_internal] to modify usage flags.

fn (ProjectSettings) set_restart_if_changed #

fn (s &ProjectSettings) set_restart_if_changed(name string, restart bool)

Sets whether a setting requires restarting the editor to properly take effect. [b]Note:[/b] This is just a hint to display to the user that the editor must be restarted for changes to take effect. Enabling [method set_restart_if_changed] does [i]not[/i] delay the setting being set when changed.

fn (ProjectSettings) clear #

fn (s &ProjectSettings) clear(name string)

Clears the whole configuration (not recommended, may break things).

fn (ProjectSettings) localize_path #

fn (s &ProjectSettings) localize_path(path string) string

Returns the localized path (starting with res://) corresponding to the absolute, native OS [param path]. See also [method globalize_path].

fn (ProjectSettings) globalize_path #

fn (s &ProjectSettings) globalize_path(path string) string

Returns the absolute, native OS path corresponding to the localized [param path] (starting with res:// or user://). The returned path will vary depending on the operating system and user preferences. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path]. [b]Note:[/b] [method globalize_path] with res:// will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project:

var path = ''
if OS.has_feature('editor'):
####path = ProjectSettings.globalize_path('res://hello.txt')
else:
########path = OS.get_executable_path().get_base_dir().path_join('hello.txt')

fn (ProjectSettings) save #

fn (s &ProjectSettings) save() GDError

Saves the configuration to the project.godot file. [b]Note:[/b] This method is intended to be used by editor plugins, as modified [ProjectSettings] can't be loaded back in the running app. If you want to change project settings in exported projects, use [method save_custom] to save override.cfg file.

fn (ProjectSettings) load_resource_pack #

fn (s &ProjectSettings) load_resource_pack(pack string, cfg ProjectSettings_load_resource_pack_Cfg) bool

Loads the contents of the .pck or .zip file specified by [param pack] into the resource filesystem (res://). Returns true on success. [b]Note:[/b] If a file from [param pack] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [param pack] unless [param replace_files] is set to false. [b]Note:[/b] The optional [param offset] parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files. [b]Note:[/b] [DirAccess] will not show changes made to the contents of res:// after calling this function.

fn (ProjectSettings) save_custom #

fn (s &ProjectSettings) save_custom(file string) GDError

Saves the configuration to a custom file. The file extension must be .godot (to save in text-based [ConfigFile] format) or .binary (to save in binary format). You can also save override.cfg file, which is also text, but can be used in exported projects unlike other formats.

struct ProjectSettings_get_setting_Cfg #

@[params]
struct ProjectSettings_get_setting_Cfg {
pub:
	default_value ToVariant
}

Optional parameters for ProjectSettings#get_setting

struct ProjectSettings_load_resource_pack_Cfg #

@[params]
struct ProjectSettings_load_resource_pack_Cfg {
pub:
	replace_files bool
	offset        i64
}

Optional parameters for ProjectSettings#load_resource_pack

struct Projection #

@[packed]
struct Projection {
pub mut:
	// The projection matrix's X vector (column 0). Equivalent to array index `0`.
	x Vector4 // offset 0
	// The projection matrix's Y vector (column 1). Equivalent to array index `1`.
	y Vector4 // offset 16
	// The projection matrix's Z vector (column 2). Equivalent to array index `2`.
	z Vector4 // offset 32
	// The projection matrix's W vector (column 3). Equivalent to array index `3`.
	w Vector4 // offset 48
}

A 4×4 matrix for 3D projective transformations.

A 4×4 matrix used for 3D projective transformations. It can represent transformations such as translation, rotation, scaling, shearing, and perspective division. It consists of four [Vector4] columns. For purely linear transformations (translation, rotation, and scale), it is recommended to use [Transform3D], as it is more performant and requires less memory. Used internally as [Camera3D]'s projection matrix.

fn (Projection) determinant #

fn (s &Projection) determinant() f64

Returns a scalar value that is the signed factor by which areas are scaled by this matrix. If the sign is negative, the matrix flips the orientation of the area. The determinant can be used to calculate the invertibility of a matrix or solve linear systems of equations involving the matrix, among other applications.

fn (Projection) perspective_znear_adjusted #

fn (s &Projection) perspective_znear_adjusted(new_znear f64) Projection

Returns a [Projection] with the near clipping distance adjusted to be [param new_znear]. [b]Note:[/b] The original [Projection] must be a perspective projection.

fn (Projection) get_projection_plane #

fn (s &Projection) get_projection_plane(plane i64) Plane

Returns the clipping plane of this [Projection] whose index is given by [param plane]. [param plane] should be equal to one of [constant PLANE_NEAR], [constant PLANE_FAR], [constant PLANE_LEFT], [constant PLANE_TOP], [constant PLANE_RIGHT], or [constant PLANE_BOTTOM].

fn (Projection) flipped_y #

fn (s &Projection) flipped_y() Projection

Returns a copy of this [Projection] with the signs of the values of the Y column flipped.

fn (Projection) jitter_offseted #

fn (s &Projection) jitter_offseted(offset Vector2) Projection

Returns a [Projection] with the X and Y values from the given [Vector2] added to the first and second values of the final column respectively.

fn (Projection) get_z_far #

fn (s &Projection) get_z_far() f64

Returns the distance for this [Projection] beyond which positions are clipped.

fn (Projection) get_z_near #

fn (s &Projection) get_z_near() f64

Returns the distance for this [Projection] before which positions are clipped.

fn (Projection) get_aspect #

fn (s &Projection) get_aspect() f64

Returns the X:Y aspect ratio of this [Projection]'s viewport.

fn (Projection) get_fov #

fn (s &Projection) get_fov() f64

Returns the horizontal field of view of the projection (in degrees).

fn (Projection) is_orthogonal #

fn (s &Projection) is_orthogonal() bool

Returns true if this [Projection] performs an orthogonal projection.

fn (Projection) get_viewport_half_extents #

fn (s &Projection) get_viewport_half_extents() Vector2

Returns the dimensions of the viewport plane that this [Projection] projects positions onto, divided by two.

fn (Projection) get_far_plane_half_extents #

fn (s &Projection) get_far_plane_half_extents() Vector2

Returns the dimensions of the far clipping plane of the projection, divided by two.

fn (Projection) inverse #

fn (s &Projection) inverse() Projection

Returns a [Projection] that performs the inverse of this [Projection]'s projective transformation.

fn (Projection) get_pixels_per_meter #

fn (s &Projection) get_pixels_per_meter(for_pixel_width i64) i64

Returns [param for_pixel_width] divided by the viewport's width measured in meters on the near plane, after this [Projection] is applied.

fn (Projection) get_lod_multiplier #

fn (s &Projection) get_lod_multiplier() f64

Returns the factor by which the visible level of detail is scaled by this [Projection].

fn (Projection) to_variant #

fn (s &Projection) to_variant() Variant

fn (Projection) from_variant #

fn (mut s Projection) from_variant(variant &Variant)

fn (Projection) index #

fn (v &Projection) index(i i64) Vector4

fn (Projection) mul_vector4 #

fn (a Projection) mul_vector4(b Vector4) Vector4

Projects (multiplies) the given [Vector4] by this [Projection] matrix.

fn (Projection) == #

fn (a Projection) == (b Projection) bool

Returns true if the projections are equal. [b]Note:[/b] Due to floating-point precision errors, this may return false, even if the projections are virtually equal. An is_equal_approx method may be added in a future version of Godot.

fn (Projection) eq_projection #

fn (a Projection) eq_projection(b Projection) bool

Returns true if the projections are equal. [b]Note:[/b] Due to floating-point precision errors, this may return false, even if the projections are virtually equal. An is_equal_approx method may be added in a future version of Godot.

fn (Projection) ne_projection #

fn (a Projection) ne_projection(b Projection) bool

Returns true if the projections are not equal. [b]Note:[/b] Due to floating-point precision errors, this may return true, even if the projections are virtually equal. An is_equal_approx method may be added in a future version of Godot.

fn (Projection) * #

fn (a Projection) * (b Projection) Projection

Returns a [Projection] that applies the combined transformations of this [Projection] and [param right].

fn (Projection) mul_projection #

fn (a Projection) mul_projection(b Projection) Projection

Returns a [Projection] that applies the combined transformations of this [Projection] and [param right].

fn (Projection) in_dictionary #

fn (a Projection) in_dictionary(b Dictionary) bool

fn (Projection) in_array #

fn (a Projection) in_array(b Array) bool

struct Projection_create_frustum_aspect_Cfg #

@[params]
struct Projection_create_frustum_aspect_Cfg {
pub:
	flip_fov bool
}

struct Projection_create_orthogonal_aspect_Cfg #

@[params]
struct Projection_create_orthogonal_aspect_Cfg {
pub:
	flip_fov bool
}

struct Projection_create_perspective_Cfg #

@[params]
struct Projection_create_perspective_Cfg {
pub:
	flip_fov bool
}

struct PropertyTweener #

struct PropertyTweener {
	Tweener
}

Interpolates an [Object]'s property over time.

fn (PropertyTweener) to_variant #

fn (s &PropertyTweener) to_variant() Variant

fn (PropertyTweener) from_variant #

fn (mut s PropertyTweener) from_variant(variant &Variant)

fn (PropertyTweener) from #

fn (s &PropertyTweener) from(value_ ToVariant) PropertyTweener

Sets a custom initial value to the [PropertyTweener]. [b]Example:[/b] Move the node from position (100, 100) to (200, 100). [codeblocks] [gdscript] var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) [/gdscript] [csharp] Tween tween = GetTree().CreateTween(); tween.TweenProperty(this, "position", new Vector2(200.0f, 100.0f), 1.0f).From(new Vector2(100.0f, 100.0f)); [/csharp] [/codeblocks]

fn (PropertyTweener) from_current #

fn (s &PropertyTweener) from_current() PropertyTweener

Makes the [PropertyTweener] use the current property value (i.e. at the time of creating this [PropertyTweener]) as a starting point. This is equivalent of using [method from] with the current value. These two calls will do the same: [codeblocks] [gdscript] tween.tween_property(self, "position", Vector2(200, 100), 1).from(position) tween.tween_property(self, "position", Vector2(200, 100), 1).from_current() [/gdscript] [csharp] tween.TweenProperty(this, "position", new Vector2(200.0f, 100.0f), 1.0f).From(Position); tween.TweenProperty(this, "position", new Vector2(200.0f, 100.0f), 1.0f).FromCurrent(); [/csharp] [/codeblocks]

fn (PropertyTweener) as_relative #

fn (s &PropertyTweener) as_relative() PropertyTweener

When called, the final value will be used as a relative value instead. [b]Example:[/b] Move the node by 100 pixels to the right. [codeblocks] [gdscript] var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() [/gdscript] [csharp] Tween tween = GetTree().CreateTween(); tween.TweenProperty(this, "position", Vector2.Right * 100.0f, 1.0f).AsRelative(); [/csharp] [/codeblocks]

fn (PropertyTweener) set_trans #

fn (s &PropertyTweener) set_trans(trans TweenTransitionType) PropertyTweener

Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener.

fn (PropertyTweener) set_ease #

fn (s &PropertyTweener) set_ease(ease TweenEaseType) PropertyTweener

Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener.

fn (PropertyTweener) set_custom_interpolator #

fn (s &PropertyTweener) set_custom_interpolator(interpolator_method Callable) PropertyTweener

Allows interpolating the value with a custom easing function. The provided [param interpolator_method] will be called with a value ranging from 0.0 to 1.0 and is expected to return a value within the same range (values outside the range can be used for overshoot). The return value of the method is then used for interpolation between initial and final value. Note that the parameter passed to the method is still subject to the tweener's own easing. [codeblocks] [gdscript] @export var curve: Curve

func _ready(): var tween = create_tween()# Interpolate the value using a custom curve.tween.tween_property(self, "position:x", 300, 1).as_relative().set_custom_interpolator(tween_curve)

func tween_curve(v): return curve.sample_baked(v) [/gdscript] [csharp] [Export] public Curve Curve { get; set; }

public override void _Ready() { Tween tween = CreateTween(); // Interpolate the value using a custom curve. Callable tweenCurveCallable = Callable.From<float, float>(TweenCurve); tween.TweenProperty(this, "position:x", 300.0f, 1.0f).AsRelative().SetCustomInterpolator(tweenCurveCallable); }

private float TweenCurve(float value) { return Curve.SampleBaked(value); } [/csharp] [/codeblocks]

fn (PropertyTweener) set_delay #

fn (s &PropertyTweener) set_delay(delay f64) PropertyTweener

Sets the time in seconds after which the [PropertyTweener] will start interpolating. By default there's no delay.

struct QuadMesh #

struct QuadMesh {
	PlaneMesh
}

Class representing a square mesh facing the camera.

fn (QuadMesh) to_variant #

fn (s &QuadMesh) to_variant() Variant

fn (QuadMesh) from_variant #

fn (mut s QuadMesh) from_variant(variant &Variant)

struct QuadOccluder3D #

struct QuadOccluder3D {
	Occluder3D
}

Flat plane shape for use with occlusion culling in [OccluderInstance3D].

fn (QuadOccluder3D) to_variant #

fn (s &QuadOccluder3D) to_variant() Variant

fn (QuadOccluder3D) from_variant #

fn (mut s QuadOccluder3D) from_variant(variant &Variant)

fn (QuadOccluder3D) set_size #

fn (s &QuadOccluder3D) set_size(size Vector2)

fn (QuadOccluder3D) get_size #

fn (s &QuadOccluder3D) get_size() Vector2

struct Quaternion #

@[packed]
struct Quaternion {
pub mut:
	// X component of the quaternion. This is the value along the "imaginary" `i` axis.
	// [b]Note:[/b] Quaternion components should usually not be manipulated directly.
	x f32 // offset 0
	// Y component of the quaternion. This is the value along the "imaginary" `j` axis.
	// [b]Note:[/b] Quaternion components should usually not be manipulated directly.
	y f32 // offset 4
	// Z component of the quaternion. This is the value along the "imaginary" `k` axis.
	// [b]Note:[/b] Quaternion components should usually not be manipulated directly.
	z f32 // offset 8
	// W component of the quaternion. This is the "real" part.
	// [b]Note:[/b] Quaternion components should usually not be manipulated directly.
	w f32 // offset 12
}

A unit quaternion used for representing 3D rotations.

The [Quaternion] built-in [Variant] type is a 4D data structure that represents rotation in the form of a [url=https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation]Hamilton convention quaternion[/url]. Compared to the [Basis] type which can store both rotation and scale, quaternions can [i]only[/i] store rotation. A [Quaternion] is composed by 4 floating-point components: [member w], [member x], [member y], and [member z]. These components are very compact in memory, and because of this some operations are more efficient and less likely to cause floating-point errors. Methods such as [method get_angle], [method get_axis], and [method slerp] are faster than their [Basis] counterparts. For a great introduction to quaternions, see [url=https://www.youtube.com/watch?v=d4EgbgTm0Bg]this video by 3Blue1Brown[/url]. You do not need to know the math behind quaternions, as Godot provides several helper methods that handle it for you. These include [method slerp] and [method spherical_cubic_interpolate], as well as the * operator. [b]Note:[/b] Quaternions must be normalized before being used for rotation (see [method normalized]). [b]Note:[/b] Similarly to [Vector2] and [Vector3], the components of a quaternion use 32-bit precision by default, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option precision=double.

fn (Quaternion) length #

fn (s &Quaternion) length() f64

Returns this quaternion's length, also called magnitude.

fn (Quaternion) length_squared #

fn (s &Quaternion) length_squared() f64

Returns this quaternion's length, squared. [b]Note:[/b] This method is faster than [method length], so prefer it if you only need to compare quaternion lengths.

fn (Quaternion) normalized #

fn (s &Quaternion) normalized() Quaternion

Returns a copy of this quaternion, normalized so that its length is 1.0. See also [method is_normalized].

fn (Quaternion) is_normalized #

fn (s &Quaternion) is_normalized() bool

Returns true if this quaternion is normalized. See also [method normalized].

fn (Quaternion) is_equal_approx #

fn (s &Quaternion) is_equal_approx(to Quaternion) bool

Returns true if this quaternion and [param to] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component.

fn (Quaternion) is_finite #

fn (s &Quaternion) is_finite() bool

Returns true if this quaternion is finite, by calling [method @GlobalScope.is_finite] on each component.

fn (Quaternion) inverse #

fn (s &Quaternion) inverse() Quaternion

Returns the inverse version of this quaternion, inverting the sign of every component except [member w].

fn (Quaternion) log #

fn (s &Quaternion) log() Quaternion

Returns the logarithm of this quaternion. Multiplies this quaternion's rotation axis by its rotation angle, and stores the result in the returned quaternion's vector part ([member x], [member y], and [member z]). The returned quaternion's real part ([member w]) is always 0.0.

fn (Quaternion) exp #

fn (s &Quaternion) exp() Quaternion

Returns the exponential of this quaternion. The rotation axis of the result is the normalized rotation axis of this quaternion, the angle of the result is the length of the vector part of this quaternion.

fn (Quaternion) angle_to #

fn (s &Quaternion) angle_to(to Quaternion) f64

Returns the angle between this quaternion and [param to]. This is the magnitude of the angle you would need to rotate by to get from one to the other. [b]Note:[/b] The magnitude of the floating-point error for this method is abnormally high, so methods such as is_zero_approx will not work reliably.

fn (Quaternion) dot #

fn (s &Quaternion) dot(with Quaternion) f64

Returns the dot product between this quaternion and [param with]. This is equivalent to (quat.x * with.x) + (quat.y * with.y) + (quat.z * with.z) + (quat.w * with.w).

fn (Quaternion) slerp #

fn (s &Quaternion) slerp(to Quaternion, weight f64) Quaternion

Performs a spherical-linear interpolation with the [param to] quaternion, given a [param weight] and returns the result. Both this quaternion and [param to] must be normalized.

fn (Quaternion) slerpni #

fn (s &Quaternion) slerpni(to Quaternion, weight f64) Quaternion

Performs a spherical-linear interpolation with the [param to] quaternion, given a [param weight] and returns the result. Unlike [method slerp], this method does not check if the rotation path is smaller than 90 degrees. Both this quaternion and [param to] must be normalized.

fn (Quaternion) spherical_cubic_interpolate #

fn (s &Quaternion) spherical_cubic_interpolate(b Quaternion, pre_a Quaternion, post_b Quaternion, weight f64) Quaternion

Performs a spherical cubic interpolation between quaternions [param pre_a], this vector, [param b], and [param post_b], by the given amount [param weight].

fn (Quaternion) spherical_cubic_interpolate_in_time #

fn (s &Quaternion) spherical_cubic_interpolate_in_time(b Quaternion, pre_a Quaternion, post_b Quaternion, weight f64, b_t f64, pre_a_t f64, post_b_t f64) Quaternion

Performs a spherical cubic interpolation between quaternions [param pre_a], this vector, [param b], and [param post_b], by the given amount [param weight]. It can perform smoother interpolation than [method spherical_cubic_interpolate] by the time values.

fn (Quaternion) get_euler #

fn (s &Quaternion) get_euler(cfg Quaternion_get_euler_Cfg) Vector3

Returns this quaternion's rotation as a [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians. The order of each consecutive rotation can be changed with [param order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method [method from_euler], this order is reversed.

fn (Quaternion) get_axis #

fn (s &Quaternion) get_axis() Vector3

Returns the rotation axis of the rotation represented by this quaternion.

fn (Quaternion) get_angle #

fn (s &Quaternion) get_angle() f64

Returns the angle of the rotation represented by this quaternion. [b]Note:[/b] The quaternion must be normalized.

fn (Quaternion) to_variant #

fn (s &Quaternion) to_variant() Variant

fn (Quaternion) from_variant #

fn (mut s Quaternion) from_variant(variant &Variant)

fn (Quaternion) index #

fn (v &Quaternion) index(i i64) f64

fn (Quaternion) mul_i64 #

fn (a Quaternion) mul_i64(b i64) Quaternion

Multiplies each component of the [Quaternion] by the right [int] value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.

fn (Quaternion) div_i64 #

fn (a Quaternion) div_i64(b i64) Quaternion

Divides each component of the [Quaternion] by the right [int] value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.

fn (Quaternion) mul_f64 #

fn (a Quaternion) mul_f64(b f64) Quaternion

Multiplies each component of the [Quaternion] by the right [float] value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.

fn (Quaternion) div_f64 #

fn (a Quaternion) div_f64(b f64) Quaternion

Divides each component of the [Quaternion] by the right [float] value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.

fn (Quaternion) mul_vector3 #

fn (a Quaternion) mul_vector3(b Vector3) Vector3

Rotates (multiplies) the [param right] vector by this quaternion, returning a [Vector3].

fn (Quaternion) == #

fn (a Quaternion) == (b Quaternion) bool

Returns true if the components of both quaternions are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Quaternion) eq_quaternion #

fn (a Quaternion) eq_quaternion(b Quaternion) bool

Returns true if the components of both quaternions are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Quaternion) ne_quaternion #

fn (a Quaternion) ne_quaternion(b Quaternion) bool

Returns true if the components of both quaternions are not exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Quaternion) + #

fn (a Quaternion) + (b Quaternion) Quaternion

Adds each component of the left [Quaternion] to the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations.

fn (Quaternion) add_quaternion #

fn (a Quaternion) add_quaternion(b Quaternion) Quaternion

Adds each component of the left [Quaternion] to the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations.

fn (Quaternion) - #

fn (a Quaternion) - (b Quaternion) Quaternion

Subtracts each component of the left [Quaternion] by the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.

fn (Quaternion) sub_quaternion #

fn (a Quaternion) sub_quaternion(b Quaternion) Quaternion

Subtracts each component of the left [Quaternion] by the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.

fn (Quaternion) * #

fn (a Quaternion) * (b Quaternion) Quaternion

Composes (multiplies) two quaternions. This rotates the [param right] quaternion (the child) by this quaternion (the parent).

fn (Quaternion) mul_quaternion #

fn (a Quaternion) mul_quaternion(b Quaternion) Quaternion

Composes (multiplies) two quaternions. This rotates the [param right] quaternion (the child) by this quaternion (the parent).

fn (Quaternion) in_dictionary #

fn (a Quaternion) in_dictionary(b Dictionary) bool

fn (Quaternion) in_array #

fn (a Quaternion) in_array(b Array) bool

struct Quaternion_get_euler_Cfg #

@[params]
struct Quaternion_get_euler_Cfg {
pub:
	order i64 = 2
}

struct RDAttachmentFormat #

struct RDAttachmentFormat {
	RefCounted
}

Attachment format (used by [RenderingDevice]).

fn (RDAttachmentFormat) to_variant #

fn (s &RDAttachmentFormat) to_variant() Variant

fn (RDAttachmentFormat) from_variant #

fn (mut s RDAttachmentFormat) from_variant(variant &Variant)

fn (RDAttachmentFormat) set_format #

fn (s &RDAttachmentFormat) set_format(p_member RenderingDeviceDataFormat)

fn (RDAttachmentFormat) get_format #

fn (s &RDAttachmentFormat) get_format() RenderingDeviceDataFormat

fn (RDAttachmentFormat) set_samples #

fn (s &RDAttachmentFormat) set_samples(p_member RenderingDeviceTextureSamples)

fn (RDAttachmentFormat) get_samples #

fn (s &RDAttachmentFormat) get_samples() RenderingDeviceTextureSamples

fn (RDAttachmentFormat) set_usage_flags #

fn (s &RDAttachmentFormat) set_usage_flags(p_member i64)

fn (RDAttachmentFormat) get_usage_flags #

fn (s &RDAttachmentFormat) get_usage_flags() i64

struct RDFramebufferPass #

struct RDFramebufferPass {
	RefCounted
}

Framebuffer pass attachment description (used by [RenderingDevice]).

fn (RDFramebufferPass) to_variant #

fn (s &RDFramebufferPass) to_variant() Variant

fn (RDFramebufferPass) from_variant #

fn (mut s RDFramebufferPass) from_variant(variant &Variant)

fn (RDFramebufferPass) set_color_attachments #

fn (s &RDFramebufferPass) set_color_attachments(p_member PackedInt32Array)

fn (RDFramebufferPass) get_color_attachments #

fn (s &RDFramebufferPass) get_color_attachments() PackedInt32Array

fn (RDFramebufferPass) set_input_attachments #

fn (s &RDFramebufferPass) set_input_attachments(p_member PackedInt32Array)

fn (RDFramebufferPass) get_input_attachments #

fn (s &RDFramebufferPass) get_input_attachments() PackedInt32Array

fn (RDFramebufferPass) set_resolve_attachments #

fn (s &RDFramebufferPass) set_resolve_attachments(p_member PackedInt32Array)

fn (RDFramebufferPass) get_resolve_attachments #

fn (s &RDFramebufferPass) get_resolve_attachments() PackedInt32Array

fn (RDFramebufferPass) set_preserve_attachments #

fn (s &RDFramebufferPass) set_preserve_attachments(p_member PackedInt32Array)

fn (RDFramebufferPass) get_preserve_attachments #

fn (s &RDFramebufferPass) get_preserve_attachments() PackedInt32Array

fn (RDFramebufferPass) set_depth_attachment #

fn (s &RDFramebufferPass) set_depth_attachment(p_member i64)

fn (RDFramebufferPass) get_depth_attachment #

fn (s &RDFramebufferPass) get_depth_attachment() i64

struct RDPipelineColorBlendState #

struct RDPipelineColorBlendState {
	RefCounted
}

Pipeline color blend state (used by [RenderingDevice]).

fn (RDPipelineColorBlendState) to_variant #

fn (s &RDPipelineColorBlendState) to_variant() Variant

fn (RDPipelineColorBlendState) from_variant #

fn (mut s RDPipelineColorBlendState) from_variant(variant &Variant)

fn (RDPipelineColorBlendState) set_enable_logic_op #

fn (s &RDPipelineColorBlendState) set_enable_logic_op(p_member bool)

fn (RDPipelineColorBlendState) get_enable_logic_op #

fn (s &RDPipelineColorBlendState) get_enable_logic_op() bool

fn (RDPipelineColorBlendState) set_logic_op #

fn (s &RDPipelineColorBlendState) set_logic_op(p_member RenderingDeviceLogicOperation)

fn (RDPipelineColorBlendState) get_logic_op #

fn (s &RDPipelineColorBlendState) get_logic_op() RenderingDeviceLogicOperation

fn (RDPipelineColorBlendState) set_blend_constant #

fn (s &RDPipelineColorBlendState) set_blend_constant(p_member Color)

fn (RDPipelineColorBlendState) get_blend_constant #

fn (s &RDPipelineColorBlendState) get_blend_constant() Color

fn (RDPipelineColorBlendState) set_attachments #

fn (s &RDPipelineColorBlendState) set_attachments(attachments Array)

fn (RDPipelineColorBlendState) get_attachments #

fn (s &RDPipelineColorBlendState) get_attachments() Array

struct RDPipelineColorBlendStateAttachment #

struct RDPipelineColorBlendStateAttachment {
	RefCounted
}

Pipeline color blend state attachment (used by [RenderingDevice]).

fn (RDPipelineColorBlendStateAttachment) to_variant #

fn (s &RDPipelineColorBlendStateAttachment) to_variant() Variant

fn (RDPipelineColorBlendStateAttachment) from_variant #

fn (mut s RDPipelineColorBlendStateAttachment) from_variant(variant &Variant)

fn (RDPipelineColorBlendStateAttachment) set_as_mix #

fn (s &RDPipelineColorBlendStateAttachment) set_as_mix()

Convenience method to perform standard mix blending with straight (non-premultiplied) alpha. This sets [member enable_blend] to true, [member src_color_blend_factor] to [constant RenderingDevice.BLEND_FACTOR_SRC_ALPHA], [member dst_color_blend_factor] to [constant RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA], [member src_alpha_blend_factor] to [constant RenderingDevice.BLEND_FACTOR_SRC_ALPHA] and [member dst_alpha_blend_factor] to [constant RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA].

fn (RDPipelineColorBlendStateAttachment) set_enable_blend #

fn (s &RDPipelineColorBlendStateAttachment) set_enable_blend(p_member bool)

fn (RDPipelineColorBlendStateAttachment) get_enable_blend #

fn (s &RDPipelineColorBlendStateAttachment) get_enable_blend() bool

fn (RDPipelineColorBlendStateAttachment) set_src_color_blend_factor #

fn (s &RDPipelineColorBlendStateAttachment) set_src_color_blend_factor(p_member RenderingDeviceBlendFactor)

fn (RDPipelineColorBlendStateAttachment) get_src_color_blend_factor #

fn (s &RDPipelineColorBlendStateAttachment) get_src_color_blend_factor() RenderingDeviceBlendFactor

fn (RDPipelineColorBlendStateAttachment) set_dst_color_blend_factor #

fn (s &RDPipelineColorBlendStateAttachment) set_dst_color_blend_factor(p_member RenderingDeviceBlendFactor)

fn (RDPipelineColorBlendStateAttachment) get_dst_color_blend_factor #

fn (s &RDPipelineColorBlendStateAttachment) get_dst_color_blend_factor() RenderingDeviceBlendFactor

fn (RDPipelineColorBlendStateAttachment) set_color_blend_op #

fn (s &RDPipelineColorBlendStateAttachment) set_color_blend_op(p_member RenderingDeviceBlendOperation)

fn (RDPipelineColorBlendStateAttachment) get_color_blend_op #

fn (s &RDPipelineColorBlendStateAttachment) get_color_blend_op() RenderingDeviceBlendOperation

fn (RDPipelineColorBlendStateAttachment) set_src_alpha_blend_factor #

fn (s &RDPipelineColorBlendStateAttachment) set_src_alpha_blend_factor(p_member RenderingDeviceBlendFactor)

fn (RDPipelineColorBlendStateAttachment) get_src_alpha_blend_factor #

fn (s &RDPipelineColorBlendStateAttachment) get_src_alpha_blend_factor() RenderingDeviceBlendFactor

fn (RDPipelineColorBlendStateAttachment) set_dst_alpha_blend_factor #

fn (s &RDPipelineColorBlendStateAttachment) set_dst_alpha_blend_factor(p_member RenderingDeviceBlendFactor)

fn (RDPipelineColorBlendStateAttachment) get_dst_alpha_blend_factor #

fn (s &RDPipelineColorBlendStateAttachment) get_dst_alpha_blend_factor() RenderingDeviceBlendFactor

fn (RDPipelineColorBlendStateAttachment) set_alpha_blend_op #

fn (s &RDPipelineColorBlendStateAttachment) set_alpha_blend_op(p_member RenderingDeviceBlendOperation)

fn (RDPipelineColorBlendStateAttachment) get_alpha_blend_op #

fn (s &RDPipelineColorBlendStateAttachment) get_alpha_blend_op() RenderingDeviceBlendOperation

fn (RDPipelineColorBlendStateAttachment) set_write_r #

fn (s &RDPipelineColorBlendStateAttachment) set_write_r(p_member bool)

fn (RDPipelineColorBlendStateAttachment) get_write_r #

fn (s &RDPipelineColorBlendStateAttachment) get_write_r() bool

fn (RDPipelineColorBlendStateAttachment) set_write_g #

fn (s &RDPipelineColorBlendStateAttachment) set_write_g(p_member bool)

fn (RDPipelineColorBlendStateAttachment) get_write_g #

fn (s &RDPipelineColorBlendStateAttachment) get_write_g() bool

fn (RDPipelineColorBlendStateAttachment) set_write_b #

fn (s &RDPipelineColorBlendStateAttachment) set_write_b(p_member bool)

fn (RDPipelineColorBlendStateAttachment) get_write_b #

fn (s &RDPipelineColorBlendStateAttachment) get_write_b() bool

fn (RDPipelineColorBlendStateAttachment) set_write_a #

fn (s &RDPipelineColorBlendStateAttachment) set_write_a(p_member bool)

fn (RDPipelineColorBlendStateAttachment) get_write_a #

fn (s &RDPipelineColorBlendStateAttachment) get_write_a() bool

struct RDPipelineDepthStencilState #

struct RDPipelineDepthStencilState {
	RefCounted
}

Pipeline depth/stencil state (used by [RenderingDevice]).

fn (RDPipelineDepthStencilState) to_variant #

fn (s &RDPipelineDepthStencilState) to_variant() Variant

fn (RDPipelineDepthStencilState) from_variant #

fn (mut s RDPipelineDepthStencilState) from_variant(variant &Variant)

fn (RDPipelineDepthStencilState) set_enable_depth_test #

fn (s &RDPipelineDepthStencilState) set_enable_depth_test(p_member bool)

fn (RDPipelineDepthStencilState) get_enable_depth_test #

fn (s &RDPipelineDepthStencilState) get_enable_depth_test() bool

fn (RDPipelineDepthStencilState) set_enable_depth_write #

fn (s &RDPipelineDepthStencilState) set_enable_depth_write(p_member bool)

fn (RDPipelineDepthStencilState) get_enable_depth_write #

fn (s &RDPipelineDepthStencilState) get_enable_depth_write() bool

fn (RDPipelineDepthStencilState) set_depth_compare_operator #

fn (s &RDPipelineDepthStencilState) set_depth_compare_operator(p_member RenderingDeviceCompareOperator)

fn (RDPipelineDepthStencilState) get_depth_compare_operator #

fn (s &RDPipelineDepthStencilState) get_depth_compare_operator() RenderingDeviceCompareOperator

fn (RDPipelineDepthStencilState) set_enable_depth_range #

fn (s &RDPipelineDepthStencilState) set_enable_depth_range(p_member bool)

fn (RDPipelineDepthStencilState) get_enable_depth_range #

fn (s &RDPipelineDepthStencilState) get_enable_depth_range() bool

fn (RDPipelineDepthStencilState) set_depth_range_min #

fn (s &RDPipelineDepthStencilState) set_depth_range_min(p_member f64)

fn (RDPipelineDepthStencilState) get_depth_range_min #

fn (s &RDPipelineDepthStencilState) get_depth_range_min() f64

fn (RDPipelineDepthStencilState) set_depth_range_max #

fn (s &RDPipelineDepthStencilState) set_depth_range_max(p_member f64)

fn (RDPipelineDepthStencilState) get_depth_range_max #

fn (s &RDPipelineDepthStencilState) get_depth_range_max() f64

fn (RDPipelineDepthStencilState) set_enable_stencil #

fn (s &RDPipelineDepthStencilState) set_enable_stencil(p_member bool)

fn (RDPipelineDepthStencilState) get_enable_stencil #

fn (s &RDPipelineDepthStencilState) get_enable_stencil() bool

fn (RDPipelineDepthStencilState) set_front_op_fail #

fn (s &RDPipelineDepthStencilState) set_front_op_fail(p_member RenderingDeviceStencilOperation)

fn (RDPipelineDepthStencilState) get_front_op_fail #

fn (s &RDPipelineDepthStencilState) get_front_op_fail() RenderingDeviceStencilOperation

fn (RDPipelineDepthStencilState) set_front_op_pass #

fn (s &RDPipelineDepthStencilState) set_front_op_pass(p_member RenderingDeviceStencilOperation)

fn (RDPipelineDepthStencilState) get_front_op_pass #

fn (s &RDPipelineDepthStencilState) get_front_op_pass() RenderingDeviceStencilOperation

fn (RDPipelineDepthStencilState) set_front_op_depth_fail #

fn (s &RDPipelineDepthStencilState) set_front_op_depth_fail(p_member RenderingDeviceStencilOperation)

fn (RDPipelineDepthStencilState) get_front_op_depth_fail #

fn (s &RDPipelineDepthStencilState) get_front_op_depth_fail() RenderingDeviceStencilOperation

fn (RDPipelineDepthStencilState) set_front_op_compare #

fn (s &RDPipelineDepthStencilState) set_front_op_compare(p_member RenderingDeviceCompareOperator)

fn (RDPipelineDepthStencilState) get_front_op_compare #

fn (s &RDPipelineDepthStencilState) get_front_op_compare() RenderingDeviceCompareOperator

fn (RDPipelineDepthStencilState) set_front_op_compare_mask #

fn (s &RDPipelineDepthStencilState) set_front_op_compare_mask(p_member i64)

fn (RDPipelineDepthStencilState) get_front_op_compare_mask #

fn (s &RDPipelineDepthStencilState) get_front_op_compare_mask() i64

fn (RDPipelineDepthStencilState) set_front_op_write_mask #

fn (s &RDPipelineDepthStencilState) set_front_op_write_mask(p_member i64)

fn (RDPipelineDepthStencilState) get_front_op_write_mask #

fn (s &RDPipelineDepthStencilState) get_front_op_write_mask() i64

fn (RDPipelineDepthStencilState) set_front_op_reference #

fn (s &RDPipelineDepthStencilState) set_front_op_reference(p_member i64)

fn (RDPipelineDepthStencilState) get_front_op_reference #

fn (s &RDPipelineDepthStencilState) get_front_op_reference() i64

fn (RDPipelineDepthStencilState) set_back_op_fail #

fn (s &RDPipelineDepthStencilState) set_back_op_fail(p_member RenderingDeviceStencilOperation)

fn (RDPipelineDepthStencilState) get_back_op_fail #

fn (s &RDPipelineDepthStencilState) get_back_op_fail() RenderingDeviceStencilOperation

fn (RDPipelineDepthStencilState) set_back_op_pass #

fn (s &RDPipelineDepthStencilState) set_back_op_pass(p_member RenderingDeviceStencilOperation)

fn (RDPipelineDepthStencilState) get_back_op_pass #

fn (s &RDPipelineDepthStencilState) get_back_op_pass() RenderingDeviceStencilOperation

fn (RDPipelineDepthStencilState) set_back_op_depth_fail #

fn (s &RDPipelineDepthStencilState) set_back_op_depth_fail(p_member RenderingDeviceStencilOperation)

fn (RDPipelineDepthStencilState) get_back_op_depth_fail #

fn (s &RDPipelineDepthStencilState) get_back_op_depth_fail() RenderingDeviceStencilOperation

fn (RDPipelineDepthStencilState) set_back_op_compare #

fn (s &RDPipelineDepthStencilState) set_back_op_compare(p_member RenderingDeviceCompareOperator)

fn (RDPipelineDepthStencilState) get_back_op_compare #

fn (s &RDPipelineDepthStencilState) get_back_op_compare() RenderingDeviceCompareOperator

fn (RDPipelineDepthStencilState) set_back_op_compare_mask #

fn (s &RDPipelineDepthStencilState) set_back_op_compare_mask(p_member i64)

fn (RDPipelineDepthStencilState) get_back_op_compare_mask #

fn (s &RDPipelineDepthStencilState) get_back_op_compare_mask() i64

fn (RDPipelineDepthStencilState) set_back_op_write_mask #

fn (s &RDPipelineDepthStencilState) set_back_op_write_mask(p_member i64)

fn (RDPipelineDepthStencilState) get_back_op_write_mask #

fn (s &RDPipelineDepthStencilState) get_back_op_write_mask() i64

fn (RDPipelineDepthStencilState) set_back_op_reference #

fn (s &RDPipelineDepthStencilState) set_back_op_reference(p_member i64)

fn (RDPipelineDepthStencilState) get_back_op_reference #

fn (s &RDPipelineDepthStencilState) get_back_op_reference() i64

struct RDPipelineMultisampleState #

struct RDPipelineMultisampleState {
	RefCounted
}

Pipeline multisample state (used by [RenderingDevice]).

fn (RDPipelineMultisampleState) to_variant #

fn (s &RDPipelineMultisampleState) to_variant() Variant

fn (RDPipelineMultisampleState) from_variant #

fn (mut s RDPipelineMultisampleState) from_variant(variant &Variant)

fn (RDPipelineMultisampleState) set_sample_count #

fn (s &RDPipelineMultisampleState) set_sample_count(p_member RenderingDeviceTextureSamples)

fn (RDPipelineMultisampleState) get_sample_count #

fn (s &RDPipelineMultisampleState) get_sample_count() RenderingDeviceTextureSamples

fn (RDPipelineMultisampleState) set_enable_sample_shading #

fn (s &RDPipelineMultisampleState) set_enable_sample_shading(p_member bool)

fn (RDPipelineMultisampleState) get_enable_sample_shading #

fn (s &RDPipelineMultisampleState) get_enable_sample_shading() bool

fn (RDPipelineMultisampleState) set_min_sample_shading #

fn (s &RDPipelineMultisampleState) set_min_sample_shading(p_member f64)

fn (RDPipelineMultisampleState) get_min_sample_shading #

fn (s &RDPipelineMultisampleState) get_min_sample_shading() f64

fn (RDPipelineMultisampleState) set_enable_alpha_to_coverage #

fn (s &RDPipelineMultisampleState) set_enable_alpha_to_coverage(p_member bool)

fn (RDPipelineMultisampleState) get_enable_alpha_to_coverage #

fn (s &RDPipelineMultisampleState) get_enable_alpha_to_coverage() bool

fn (RDPipelineMultisampleState) set_enable_alpha_to_one #

fn (s &RDPipelineMultisampleState) set_enable_alpha_to_one(p_member bool)

fn (RDPipelineMultisampleState) get_enable_alpha_to_one #

fn (s &RDPipelineMultisampleState) get_enable_alpha_to_one() bool

fn (RDPipelineMultisampleState) set_sample_masks #

fn (s &RDPipelineMultisampleState) set_sample_masks(masks Array)

fn (RDPipelineMultisampleState) get_sample_masks #

fn (s &RDPipelineMultisampleState) get_sample_masks() Array

struct RDPipelineRasterizationState #

struct RDPipelineRasterizationState {
	RefCounted
}

Pipeline rasterization state (used by [RenderingDevice]).

fn (RDPipelineRasterizationState) to_variant #

fn (s &RDPipelineRasterizationState) to_variant() Variant

fn (RDPipelineRasterizationState) from_variant #

fn (mut s RDPipelineRasterizationState) from_variant(variant &Variant)

fn (RDPipelineRasterizationState) set_enable_depth_clamp #

fn (s &RDPipelineRasterizationState) set_enable_depth_clamp(p_member bool)

fn (RDPipelineRasterizationState) get_enable_depth_clamp #

fn (s &RDPipelineRasterizationState) get_enable_depth_clamp() bool

fn (RDPipelineRasterizationState) set_discard_primitives #

fn (s &RDPipelineRasterizationState) set_discard_primitives(p_member bool)

fn (RDPipelineRasterizationState) get_discard_primitives #

fn (s &RDPipelineRasterizationState) get_discard_primitives() bool

fn (RDPipelineRasterizationState) set_wireframe #

fn (s &RDPipelineRasterizationState) set_wireframe(p_member bool)

fn (RDPipelineRasterizationState) get_wireframe #

fn (s &RDPipelineRasterizationState) get_wireframe() bool

fn (RDPipelineRasterizationState) set_cull_mode #

fn (s &RDPipelineRasterizationState) set_cull_mode(p_member RenderingDevicePolygonCullMode)

fn (RDPipelineRasterizationState) get_cull_mode #

fn (s &RDPipelineRasterizationState) get_cull_mode() RenderingDevicePolygonCullMode

fn (RDPipelineRasterizationState) set_front_face #

fn (s &RDPipelineRasterizationState) set_front_face(p_member RenderingDevicePolygonFrontFace)

fn (RDPipelineRasterizationState) get_front_face #

fn (s &RDPipelineRasterizationState) get_front_face() RenderingDevicePolygonFrontFace

fn (RDPipelineRasterizationState) set_depth_bias_enabled #

fn (s &RDPipelineRasterizationState) set_depth_bias_enabled(p_member bool)

fn (RDPipelineRasterizationState) get_depth_bias_enabled #

fn (s &RDPipelineRasterizationState) get_depth_bias_enabled() bool

fn (RDPipelineRasterizationState) set_depth_bias_constant_factor #

fn (s &RDPipelineRasterizationState) set_depth_bias_constant_factor(p_member f64)

fn (RDPipelineRasterizationState) get_depth_bias_constant_factor #

fn (s &RDPipelineRasterizationState) get_depth_bias_constant_factor() f64

fn (RDPipelineRasterizationState) set_depth_bias_clamp #

fn (s &RDPipelineRasterizationState) set_depth_bias_clamp(p_member f64)

fn (RDPipelineRasterizationState) get_depth_bias_clamp #

fn (s &RDPipelineRasterizationState) get_depth_bias_clamp() f64

fn (RDPipelineRasterizationState) set_depth_bias_slope_factor #

fn (s &RDPipelineRasterizationState) set_depth_bias_slope_factor(p_member f64)

fn (RDPipelineRasterizationState) get_depth_bias_slope_factor #

fn (s &RDPipelineRasterizationState) get_depth_bias_slope_factor() f64

fn (RDPipelineRasterizationState) set_line_width #

fn (s &RDPipelineRasterizationState) set_line_width(p_member f64)

fn (RDPipelineRasterizationState) get_line_width #

fn (s &RDPipelineRasterizationState) get_line_width() f64

fn (RDPipelineRasterizationState) set_patch_control_points #

fn (s &RDPipelineRasterizationState) set_patch_control_points(p_member i64)

fn (RDPipelineRasterizationState) get_patch_control_points #

fn (s &RDPipelineRasterizationState) get_patch_control_points() i64

struct RDPipelineSpecializationConstant #

struct RDPipelineSpecializationConstant {
	RefCounted
}

Pipeline specialization constant (used by [RenderingDevice]).

fn (RDPipelineSpecializationConstant) to_variant #

fn (s &RDPipelineSpecializationConstant) to_variant() Variant

fn (RDPipelineSpecializationConstant) from_variant #

fn (mut s RDPipelineSpecializationConstant) from_variant(variant &Variant)

fn (RDPipelineSpecializationConstant) set_value #

fn (s &RDPipelineSpecializationConstant) set_value(value_ ToVariant)

fn (RDPipelineSpecializationConstant) get_value #

fn (s &RDPipelineSpecializationConstant) get_value() Variant

fn (RDPipelineSpecializationConstant) set_constant_id #

fn (s &RDPipelineSpecializationConstant) set_constant_id(constant_id i64)

fn (RDPipelineSpecializationConstant) get_constant_id #

fn (s &RDPipelineSpecializationConstant) get_constant_id() i64

struct RDSamplerState #

struct RDSamplerState {
	RefCounted
}

Sampler state (used by [RenderingDevice]).

fn (RDSamplerState) to_variant #

fn (s &RDSamplerState) to_variant() Variant

fn (RDSamplerState) from_variant #

fn (mut s RDSamplerState) from_variant(variant &Variant)

fn (RDSamplerState) set_mag_filter #

fn (s &RDSamplerState) set_mag_filter(p_member RenderingDeviceSamplerFilter)

fn (RDSamplerState) get_mag_filter #

fn (s &RDSamplerState) get_mag_filter() RenderingDeviceSamplerFilter

fn (RDSamplerState) set_min_filter #

fn (s &RDSamplerState) set_min_filter(p_member RenderingDeviceSamplerFilter)

fn (RDSamplerState) get_min_filter #

fn (s &RDSamplerState) get_min_filter() RenderingDeviceSamplerFilter

fn (RDSamplerState) set_mip_filter #

fn (s &RDSamplerState) set_mip_filter(p_member RenderingDeviceSamplerFilter)

fn (RDSamplerState) get_mip_filter #

fn (s &RDSamplerState) get_mip_filter() RenderingDeviceSamplerFilter

fn (RDSamplerState) set_repeat_u #

fn (s &RDSamplerState) set_repeat_u(p_member RenderingDeviceSamplerRepeatMode)

fn (RDSamplerState) get_repeat_u #

fn (s &RDSamplerState) get_repeat_u() RenderingDeviceSamplerRepeatMode

fn (RDSamplerState) set_repeat_v #

fn (s &RDSamplerState) set_repeat_v(p_member RenderingDeviceSamplerRepeatMode)

fn (RDSamplerState) get_repeat_v #

fn (s &RDSamplerState) get_repeat_v() RenderingDeviceSamplerRepeatMode

fn (RDSamplerState) set_repeat_w #

fn (s &RDSamplerState) set_repeat_w(p_member RenderingDeviceSamplerRepeatMode)

fn (RDSamplerState) get_repeat_w #

fn (s &RDSamplerState) get_repeat_w() RenderingDeviceSamplerRepeatMode

fn (RDSamplerState) set_lod_bias #

fn (s &RDSamplerState) set_lod_bias(p_member f64)

fn (RDSamplerState) get_lod_bias #

fn (s &RDSamplerState) get_lod_bias() f64

fn (RDSamplerState) set_use_anisotropy #

fn (s &RDSamplerState) set_use_anisotropy(p_member bool)

fn (RDSamplerState) get_use_anisotropy #

fn (s &RDSamplerState) get_use_anisotropy() bool

fn (RDSamplerState) set_anisotropy_max #

fn (s &RDSamplerState) set_anisotropy_max(p_member f64)

fn (RDSamplerState) get_anisotropy_max #

fn (s &RDSamplerState) get_anisotropy_max() f64

fn (RDSamplerState) set_enable_compare #

fn (s &RDSamplerState) set_enable_compare(p_member bool)

fn (RDSamplerState) get_enable_compare #

fn (s &RDSamplerState) get_enable_compare() bool

fn (RDSamplerState) set_compare_op #

fn (s &RDSamplerState) set_compare_op(p_member RenderingDeviceCompareOperator)

fn (RDSamplerState) get_compare_op #

fn (s &RDSamplerState) get_compare_op() RenderingDeviceCompareOperator

fn (RDSamplerState) set_min_lod #

fn (s &RDSamplerState) set_min_lod(p_member f64)

fn (RDSamplerState) get_min_lod #

fn (s &RDSamplerState) get_min_lod() f64

fn (RDSamplerState) set_max_lod #

fn (s &RDSamplerState) set_max_lod(p_member f64)

fn (RDSamplerState) get_max_lod #

fn (s &RDSamplerState) get_max_lod() f64

fn (RDSamplerState) set_border_color #

fn (s &RDSamplerState) set_border_color(p_member RenderingDeviceSamplerBorderColor)

fn (RDSamplerState) get_border_color #

fn (s &RDSamplerState) get_border_color() RenderingDeviceSamplerBorderColor

fn (RDSamplerState) set_unnormalized_uvw #

fn (s &RDSamplerState) set_unnormalized_uvw(p_member bool)

fn (RDSamplerState) get_unnormalized_uvw #

fn (s &RDSamplerState) get_unnormalized_uvw() bool

struct RDShaderFile #

struct RDShaderFile {
	Resource
}

Compiled shader file in SPIR-V form (used by [RenderingDevice]). Not to be confused with Godot's own [Shader].

fn (RDShaderFile) to_variant #

fn (s &RDShaderFile) to_variant() Variant

fn (RDShaderFile) from_variant #

fn (mut s RDShaderFile) from_variant(variant &Variant)

fn (RDShaderFile) set_bytecode #

fn (s &RDShaderFile) set_bytecode(bytecode RDShaderSPIRV, cfg RDShaderFile_set_bytecode_Cfg)

Sets the SPIR-V [param bytecode] that will be compiled for the specified [param version].

fn (RDShaderFile) get_spirv #

fn (s &RDShaderFile) get_spirv(cfg RDShaderFile_get_spirv_Cfg) RDShaderSPIRV

Returns the SPIR-V intermediate representation for the specified shader [param version].

fn (RDShaderFile) get_version_list #

fn (s &RDShaderFile) get_version_list() Array

Returns the list of compiled versions for this shader.

fn (RDShaderFile) set_base_error #

fn (s &RDShaderFile) set_base_error(error string)

fn (RDShaderFile) get_base_error #

fn (s &RDShaderFile) get_base_error() string

struct RDShaderFile_get_spirv_Cfg #

@[params]
struct RDShaderFile_get_spirv_Cfg {
pub:
	version string
}

Optional parameters for RDShaderFile#get_spirv

struct RDShaderFile_set_bytecode_Cfg #

@[params]
struct RDShaderFile_set_bytecode_Cfg {
pub:
	version string
}

Optional parameters for RDShaderFile#set_bytecode

struct RDShaderSPIRV #

struct RDShaderSPIRV {
	Resource
}

SPIR-V intermediate representation as part of a [RDShaderFile] (used by [RenderingDevice]).

fn (RDShaderSPIRV) to_variant #

fn (s &RDShaderSPIRV) to_variant() Variant

fn (RDShaderSPIRV) from_variant #

fn (mut s RDShaderSPIRV) from_variant(variant &Variant)

fn (RDShaderSPIRV) set_stage_bytecode #

fn (s &RDShaderSPIRV) set_stage_bytecode(stage RenderingDeviceShaderStage, bytecode PackedByteArray)

Sets the SPIR-V [param bytecode] for the given shader [param stage]. Equivalent to setting one of [member bytecode_compute], [member bytecode_fragment], [member bytecode_tesselation_control], [member bytecode_tesselation_evaluation], [member bytecode_vertex].

fn (RDShaderSPIRV) get_stage_bytecode #

fn (s &RDShaderSPIRV) get_stage_bytecode(stage RenderingDeviceShaderStage) PackedByteArray

Equivalent to getting one of [member bytecode_compute], [member bytecode_fragment], [member bytecode_tesselation_control], [member bytecode_tesselation_evaluation], [member bytecode_vertex].

fn (RDShaderSPIRV) set_stage_compile_error #

fn (s &RDShaderSPIRV) set_stage_compile_error(stage RenderingDeviceShaderStage, compile_error string)

Sets the compilation error message for the given shader [param stage] to [param compile_error]. Equivalent to setting one of [member compile_error_compute], [member compile_error_fragment], [member compile_error_tesselation_control], [member compile_error_tesselation_evaluation], [member compile_error_vertex].

fn (RDShaderSPIRV) get_stage_compile_error #

fn (s &RDShaderSPIRV) get_stage_compile_error(stage RenderingDeviceShaderStage) string

Returns the compilation error message for the given shader [param stage]. Equivalent to getting one of [member compile_error_compute], [member compile_error_fragment], [member compile_error_tesselation_control], [member compile_error_tesselation_evaluation], [member compile_error_vertex].

struct RDShaderSource #

struct RDShaderSource {
	RefCounted
}

Shader source code (used by [RenderingDevice]).

fn (RDShaderSource) to_variant #

fn (s &RDShaderSource) to_variant() Variant

fn (RDShaderSource) from_variant #

fn (mut s RDShaderSource) from_variant(variant &Variant)

fn (RDShaderSource) set_stage_source #

fn (s &RDShaderSource) set_stage_source(stage RenderingDeviceShaderStage, source string)

Sets [param source] code for the specified shader [param stage]. Equivalent to setting one of [member source_compute], [member source_fragment], [member source_tesselation_control], [member source_tesselation_evaluation] or [member source_vertex]. [b]Note:[/b] If you set the compute shader source code using this method directly, remember to remove the Godot-specific hint #[compute].

fn (RDShaderSource) get_stage_source #

fn (s &RDShaderSource) get_stage_source(stage RenderingDeviceShaderStage) string

Returns source code for the specified shader [param stage]. Equivalent to getting one of [member source_compute], [member source_fragment], [member source_tesselation_control], [member source_tesselation_evaluation] or [member source_vertex].

fn (RDShaderSource) set_language #

fn (s &RDShaderSource) set_language(language RenderingDeviceShaderLanguage)

fn (RDShaderSource) get_language #

fn (s &RDShaderSource) get_language() RenderingDeviceShaderLanguage

struct RDTextureFormat #

struct RDTextureFormat {
	RefCounted
}

Texture format (used by [RenderingDevice]).

fn (RDTextureFormat) to_variant #

fn (s &RDTextureFormat) to_variant() Variant

fn (RDTextureFormat) from_variant #

fn (mut s RDTextureFormat) from_variant(variant &Variant)

fn (RDTextureFormat) set_format #

fn (s &RDTextureFormat) set_format(p_member RenderingDeviceDataFormat)

fn (RDTextureFormat) get_format #

fn (s &RDTextureFormat) get_format() RenderingDeviceDataFormat

fn (RDTextureFormat) set_width #

fn (s &RDTextureFormat) set_width(p_member i64)

fn (RDTextureFormat) get_width #

fn (s &RDTextureFormat) get_width() i64

fn (RDTextureFormat) set_height #

fn (s &RDTextureFormat) set_height(p_member i64)

fn (RDTextureFormat) get_height #

fn (s &RDTextureFormat) get_height() i64

fn (RDTextureFormat) set_depth #

fn (s &RDTextureFormat) set_depth(p_member i64)

fn (RDTextureFormat) get_depth #

fn (s &RDTextureFormat) get_depth() i64

fn (RDTextureFormat) set_array_layers #

fn (s &RDTextureFormat) set_array_layers(p_member i64)

fn (RDTextureFormat) get_array_layers #

fn (s &RDTextureFormat) get_array_layers() i64

fn (RDTextureFormat) set_mipmaps #

fn (s &RDTextureFormat) set_mipmaps(p_member i64)

fn (RDTextureFormat) get_mipmaps #

fn (s &RDTextureFormat) get_mipmaps() i64

fn (RDTextureFormat) set_texture_type #

fn (s &RDTextureFormat) set_texture_type(p_member RenderingDeviceTextureType)

fn (RDTextureFormat) get_texture_type #

fn (s &RDTextureFormat) get_texture_type() RenderingDeviceTextureType

fn (RDTextureFormat) set_samples #

fn (s &RDTextureFormat) set_samples(p_member RenderingDeviceTextureSamples)

fn (RDTextureFormat) get_samples #

fn (s &RDTextureFormat) get_samples() RenderingDeviceTextureSamples

fn (RDTextureFormat) set_usage_bits #

fn (s &RDTextureFormat) set_usage_bits(p_member RenderingDeviceTextureUsageBits)

fn (RDTextureFormat) get_usage_bits #

fn (s &RDTextureFormat) get_usage_bits() RenderingDeviceTextureUsageBits

fn (RDTextureFormat) set_is_resolve_buffer #

fn (s &RDTextureFormat) set_is_resolve_buffer(p_member bool)

fn (RDTextureFormat) get_is_resolve_buffer #

fn (s &RDTextureFormat) get_is_resolve_buffer() bool

fn (RDTextureFormat) set_is_discardable #

fn (s &RDTextureFormat) set_is_discardable(p_member bool)

fn (RDTextureFormat) get_is_discardable #

fn (s &RDTextureFormat) get_is_discardable() bool

fn (RDTextureFormat) add_shareable_format #

fn (s &RDTextureFormat) add_shareable_format(format RenderingDeviceDataFormat)

Adds [param format] as a valid format for the corresponding [RDTextureView]'s [member RDTextureView.format_override] property. If any format is added as shareable, then the main [member format] must also be added.

fn (RDTextureFormat) remove_shareable_format #

fn (s &RDTextureFormat) remove_shareable_format(format RenderingDeviceDataFormat)

Removes [param format] from the list of valid formats that the corresponding [RDTextureView]'s [member RDTextureView.format_override] property can be set to.

struct RDTextureView #

struct RDTextureView {
	RefCounted
}

Texture view (used by [RenderingDevice]).

fn (RDTextureView) to_variant #

fn (s &RDTextureView) to_variant() Variant

fn (RDTextureView) from_variant #

fn (mut s RDTextureView) from_variant(variant &Variant)

fn (RDTextureView) set_format_override #

fn (s &RDTextureView) set_format_override(p_member RenderingDeviceDataFormat)

fn (RDTextureView) get_format_override #

fn (s &RDTextureView) get_format_override() RenderingDeviceDataFormat

fn (RDTextureView) set_swizzle_r #

fn (s &RDTextureView) set_swizzle_r(p_member RenderingDeviceTextureSwizzle)

fn (RDTextureView) get_swizzle_r #

fn (s &RDTextureView) get_swizzle_r() RenderingDeviceTextureSwizzle

fn (RDTextureView) set_swizzle_g #

fn (s &RDTextureView) set_swizzle_g(p_member RenderingDeviceTextureSwizzle)

fn (RDTextureView) get_swizzle_g #

fn (s &RDTextureView) get_swizzle_g() RenderingDeviceTextureSwizzle

fn (RDTextureView) set_swizzle_b #

fn (s &RDTextureView) set_swizzle_b(p_member RenderingDeviceTextureSwizzle)

fn (RDTextureView) get_swizzle_b #

fn (s &RDTextureView) get_swizzle_b() RenderingDeviceTextureSwizzle

fn (RDTextureView) set_swizzle_a #

fn (s &RDTextureView) set_swizzle_a(p_member RenderingDeviceTextureSwizzle)

fn (RDTextureView) get_swizzle_a #

fn (s &RDTextureView) get_swizzle_a() RenderingDeviceTextureSwizzle

struct RDUniform #

struct RDUniform {
	RefCounted
}

Shader uniform (used by [RenderingDevice]).

fn (RDUniform) to_variant #

fn (s &RDUniform) to_variant() Variant

fn (RDUniform) from_variant #

fn (mut s RDUniform) from_variant(variant &Variant)

fn (RDUniform) set_uniform_type #

fn (s &RDUniform) set_uniform_type(p_member RenderingDeviceUniformType)

fn (RDUniform) get_uniform_type #

fn (s &RDUniform) get_uniform_type() RenderingDeviceUniformType

fn (RDUniform) set_binding #

fn (s &RDUniform) set_binding(p_member i64)

fn (RDUniform) get_binding #

fn (s &RDUniform) get_binding() i64

fn (RDUniform) add_id #

fn (s &RDUniform) add_id(id RID)

Binds the given id to the uniform. The data associated with the id is then used when the uniform is passed to a shader.

fn (RDUniform) clear_ids #

fn (s &RDUniform) clear_ids()

Unbinds all ids currently bound to the uniform.

fn (RDUniform) get_ids #

fn (s &RDUniform) get_ids() Array

Returns an array of all ids currently bound to the uniform.

struct RDVertexAttribute #

struct RDVertexAttribute {
	RefCounted
}

Vertex attribute (used by [RenderingDevice]).

fn (RDVertexAttribute) to_variant #

fn (s &RDVertexAttribute) to_variant() Variant

fn (RDVertexAttribute) from_variant #

fn (mut s RDVertexAttribute) from_variant(variant &Variant)

fn (RDVertexAttribute) set_location #

fn (s &RDVertexAttribute) set_location(p_member i64)

fn (RDVertexAttribute) get_location #

fn (s &RDVertexAttribute) get_location() i64

fn (RDVertexAttribute) set_offset #

fn (s &RDVertexAttribute) set_offset(p_member i64)

fn (RDVertexAttribute) get_offset #

fn (s &RDVertexAttribute) get_offset() i64

fn (RDVertexAttribute) set_format #

fn (s &RDVertexAttribute) set_format(p_member RenderingDeviceDataFormat)

fn (RDVertexAttribute) get_format #

fn (s &RDVertexAttribute) get_format() RenderingDeviceDataFormat

fn (RDVertexAttribute) set_stride #

fn (s &RDVertexAttribute) set_stride(p_member i64)

fn (RDVertexAttribute) get_stride #

fn (s &RDVertexAttribute) get_stride() i64

fn (RDVertexAttribute) set_frequency #

fn (s &RDVertexAttribute) set_frequency(p_member RenderingDeviceVertexFrequency)

fn (RDVertexAttribute) get_frequency #

fn (s &RDVertexAttribute) get_frequency() RenderingDeviceVertexFrequency

struct RID #

@[packed]
struct RID {
	data_ [8]u8
}

A handle for a [Resource]'s unique identifier.

The RID [Variant] type is used to access a low-level resource by its unique ID. RIDs are opaque, which means they do not grant access to the resource by themselves. They are used by the low-level server classes, such as [DisplayServer], [RenderingServer], [TextServer], etc. A low-level resource may correspond to a high-level [Resource], such as [Texture] or [Mesh]. [b]Note:[/b] RIDs are only useful during the current session. It won't correspond to a similar resource if sent over a network, or loaded from a file at a later time.

fn (RID) is_valid #

fn (s &RID) is_valid() bool

Returns true if the [RID] is not 0.

fn (RID) get_id #

fn (s &RID) get_id() i64

Returns the ID of the referenced low-level resource.

fn (RID) to_variant #

fn (s &RID) to_variant() Variant

fn (RID) from_variant #

fn (mut s RID) from_variant(variant &Variant)

fn (RID) == #

fn (a RID) == (b RID) bool

Returns true if both [RID]s are equal, which means they both refer to the same low-level resource.

fn (RID) eq_rid #

fn (a RID) eq_rid(b RID) bool

Returns true if both [RID]s are equal, which means they both refer to the same low-level resource.

fn (RID) ne_rid #

fn (a RID) ne_rid(b RID) bool

Returns true if the [RID]s are not equal.

fn (RID) < #

fn (a RID) < (b RID) bool

Returns true if the [RID]'s ID is less than [param right]'s ID.

fn (RID) lt_rid #

fn (a RID) lt_rid(b RID) bool

Returns true if the [RID]'s ID is less than [param right]'s ID.

fn (RID) le_rid #

fn (a RID) le_rid(b RID) bool

Returns true if the [RID]'s ID is less than or equal to [param right]'s ID.

fn (RID) gt_rid #

fn (a RID) gt_rid(b RID) bool

Returns true if the [RID]'s ID is greater than [param right]'s ID.

fn (RID) ge_rid #

fn (a RID) ge_rid(b RID) bool

Returns true if the [RID]'s ID is greater than or equal to [param right]'s ID.

fn (RID) in_dictionary #

fn (a RID) in_dictionary(b Dictionary) bool

fn (RID) in_array #

fn (a RID) in_array(b Array) bool

struct RandomNumberGenerator #

struct RandomNumberGenerator {
	RefCounted
}

Provides methods for generating pseudo-random numbers.

fn (RandomNumberGenerator) to_variant #

fn (s &RandomNumberGenerator) to_variant() Variant

fn (RandomNumberGenerator) from_variant #

fn (mut s RandomNumberGenerator) from_variant(variant &Variant)

fn (RandomNumberGenerator) set_seed #

fn (s &RandomNumberGenerator) set_seed(seed i64)

fn (RandomNumberGenerator) get_seed #

fn (s &RandomNumberGenerator) get_seed() i64

fn (RandomNumberGenerator) set_state #

fn (s &RandomNumberGenerator) set_state(state i64)

fn (RandomNumberGenerator) get_state #

fn (s &RandomNumberGenerator) get_state() i64

fn (RandomNumberGenerator) randi #

fn (s &RandomNumberGenerator) randi() i64

Returns a pseudo-random 32-bit unsigned integer between 0 and 4294967295 (inclusive).

fn (RandomNumberGenerator) randf #

fn (s &RandomNumberGenerator) randf() f64

Returns a pseudo-random float between 0.0 and 1.0 (inclusive).

fn (RandomNumberGenerator) randfn #

fn (s &RandomNumberGenerator) randfn(cfg RandomNumberGenerator_randfn_Cfg) f64

Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url], pseudo-random floating-point number from the specified [param mean] and a standard [param deviation]. This is also known as a Gaussian distribution. [b]Note:[/b] This method uses the [url=https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform]Box-Muller transform[/url] algorithm.

fn (RandomNumberGenerator) randf_range #

fn (s &RandomNumberGenerator) randf_range(from f64, to f64) f64

Returns a pseudo-random float between [param from] and [param to] (inclusive).

fn (RandomNumberGenerator) randi_range #

fn (s &RandomNumberGenerator) randi_range(from i64, to i64) i64

Returns a pseudo-random 32-bit signed integer between [param from] and [param to] (inclusive).

fn (RandomNumberGenerator) rand_weighted #

fn (s &RandomNumberGenerator) rand_weighted(weights PackedFloat32Array) i64

Returns a random index with non-uniform weights. Prints an error and returns -1 if the array is empty. [codeblocks] [gdscript] var rng = RandomNumberGenerator.new()

var my_array = ["one", "two", "three", "four"] var weights = PackedFloat32Array([0.5, 1, 1, 2])

Prints one of the four elements in my_array.

It is more likely to print "four", and less likely to print "one".

print(my_array[rng.rand_weighted(weights)]) [/gdscript] [/codeblocks]

fn (RandomNumberGenerator) randomize #

fn (s &RandomNumberGenerator) randomize()

Sets up a time-based seed for this [RandomNumberGenerator] instance. Unlike the [@GlobalScope] random number generation functions, different [RandomNumberGenerator] instances can use different seeds.

struct RandomNumberGenerator_randfn_Cfg #

@[params]
struct RandomNumberGenerator_randfn_Cfg {
pub:
	mean      f64 = 0.0
	deviation f64 = 1.0
}

Optional parameters for RandomNumberGenerator#randfn

struct Range #

struct Range {
	Control
}

Abstract base class for controls that represent a number within a range.

fn (Range) to_variant #

fn (s &Range) to_variant() Variant

fn (Range) from_variant #

fn (mut s Range) from_variant(variant &Variant)

fn (Range) gd_value_changed #

fn (s &Range) gd_value_changed(new_value f64)

Called when the [Range]'s value is changed (following the same conditions as [signal value_changed]).

fn (Range) get_value #

fn (s &Range) get_value() f64

fn (Range) get_min #

fn (s &Range) get_min() f64

fn (Range) get_max #

fn (s &Range) get_max() f64

fn (Range) get_step #

fn (s &Range) get_step() f64

fn (Range) get_page #

fn (s &Range) get_page() f64

fn (Range) get_as_ratio #

fn (s &Range) get_as_ratio() f64

fn (Range) set_value #

fn (s &Range) set_value(value f64)

fn (Range) set_value_no_signal #

fn (s &Range) set_value_no_signal(value f64)

Sets the [Range]'s current value to the specified [param value], without emitting the [signal value_changed] signal.

fn (Range) set_min #

fn (s &Range) set_min(minimum f64)

fn (Range) set_max #

fn (s &Range) set_max(maximum f64)

fn (Range) set_step #

fn (s &Range) set_step(step f64)

fn (Range) set_page #

fn (s &Range) set_page(pagesize f64)

fn (Range) set_as_ratio #

fn (s &Range) set_as_ratio(value f64)

fn (Range) set_use_rounded_values #

fn (s &Range) set_use_rounded_values(enabled bool)

fn (Range) is_using_rounded_values #

fn (s &Range) is_using_rounded_values() bool

fn (Range) set_exp_ratio #

fn (s &Range) set_exp_ratio(enabled bool)

fn (Range) is_ratio_exp #

fn (s &Range) is_ratio_exp() bool

fn (Range) set_allow_greater #

fn (s &Range) set_allow_greater(allow bool)

fn (Range) is_greater_allowed #

fn (s &Range) is_greater_allowed() bool

fn (Range) set_allow_lesser #

fn (s &Range) set_allow_lesser(allow bool)

fn (Range) is_lesser_allowed #

fn (s &Range) is_lesser_allowed() bool

fn (Range) share #

fn (s &Range) share(with Node)

Binds two [Range]s together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group.

fn (Range) unshare #

fn (s &Range) unshare()

Stops the [Range] from sharing its member variables with any other.

struct RayCast2D #

struct RayCast2D {
	Node2D
}

A ray in 2D space, used to find the first [CollisionObject2D] it intersects.

fn (RayCast2D) to_variant #

fn (s &RayCast2D) to_variant() Variant

fn (RayCast2D) from_variant #

fn (mut s RayCast2D) from_variant(variant &Variant)

fn (RayCast2D) set_enabled #

fn (s &RayCast2D) set_enabled(enabled bool)

fn (RayCast2D) is_enabled #

fn (s &RayCast2D) is_enabled() bool

fn (RayCast2D) set_target_position #

fn (s &RayCast2D) set_target_position(local_point Vector2)

fn (RayCast2D) get_target_position #

fn (s &RayCast2D) get_target_position() Vector2

fn (RayCast2D) is_colliding #

fn (s &RayCast2D) is_colliding() bool

Returns whether any object is intersecting with the ray's vector (considering the vector length).

fn (RayCast2D) force_raycast_update #

fn (s &RayCast2D) force_raycast_update()

Updates the collision information for the ray immediately, without waiting for the next _physics_process call. Use this method, for example, when the ray or its parent has changed state. [b]Note:[/b] [member enabled] does not need to be true for this to work.

fn (RayCast2D) get_collider #

fn (s &RayCast2D) get_collider() Object

Returns the first object that the ray intersects, or null if no object is intersecting the ray (i.e. [method is_colliding] returns false).

fn (RayCast2D) get_collider_rid #

fn (s &RayCast2D) get_collider_rid() RID

Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns false).

fn (RayCast2D) get_collider_shape #

fn (s &RayCast2D) get_collider_shape() i64

Returns the shape ID of the first object that the ray intersects, or 0 if no object is intersecting the ray (i.e. [method is_colliding] returns false). To get the intersected shape node, for a [CollisionObject2D] target, use: [codeblocks] [gdscript] var target = get_collider() # A CollisionObject2D. var shape_id = get_collider_shape() # The shape index in the collider. var owner_id = target.shape_find_owner(shape_id) # The owner ID in the collider. var shape = target.shape_owner_get_owner(owner_id) [/gdscript] [csharp] var target = (CollisionObject2D)GetCollider(); // A CollisionObject2D. var shapeId = GetColliderShape(); // The shape index in the collider. var ownerId = target.ShapeFindOwner(shapeId); // The owner ID in the collider. var shape = target.ShapeOwnerGetOwner(ownerId); [/csharp] [/codeblocks]

fn (RayCast2D) get_collision_point #

fn (s &RayCast2D) get_collision_point() Vector2

Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If [member hit_from_inside] is true and the ray starts inside of a collision shape, this function will return the origin point of the ray. [b]Note:[/b] Check that [method is_colliding] returns true before calling this method to ensure the returned point is valid and up-to-date.

fn (RayCast2D) get_collision_normal #

fn (s &RayCast2D) get_collision_normal() Vector2

Returns the normal of the intersecting object's shape at the collision point, or Vector2(0, 0) if the ray starts inside the shape and [member hit_from_inside] is true. [b]Note:[/b] Check that [method is_colliding] returns true before calling this method to ensure the returned normal is valid and up-to-date.

fn (RayCast2D) add_exception_rid #

fn (s &RayCast2D) add_exception_rid(rid RID)

Adds a collision exception so the ray does not report collisions with the specified [RID].

fn (RayCast2D) add_exception #

fn (s &RayCast2D) add_exception(node CollisionObject2D)

Adds a collision exception so the ray does not report collisions with the specified [CollisionObject2D] node.

fn (RayCast2D) remove_exception_rid #

fn (s &RayCast2D) remove_exception_rid(rid RID)

Removes a collision exception so the ray does report collisions with the specified [RID].

fn (RayCast2D) remove_exception #

fn (s &RayCast2D) remove_exception(node CollisionObject2D)

Removes a collision exception so the ray does report collisions with the specified [CollisionObject2D] node.

fn (RayCast2D) clear_exceptions #

fn (s &RayCast2D) clear_exceptions()

Removes all collision exceptions for this ray.

fn (RayCast2D) set_collision_mask #

fn (s &RayCast2D) set_collision_mask(mask i64)

fn (RayCast2D) get_collision_mask #

fn (s &RayCast2D) get_collision_mask() i64

fn (RayCast2D) set_collision_mask_value #

fn (s &RayCast2D) set_collision_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.

fn (RayCast2D) get_collision_mask_value #

fn (s &RayCast2D) get_collision_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (RayCast2D) set_exclude_parent_body #

fn (s &RayCast2D) set_exclude_parent_body(mask bool)

fn (RayCast2D) get_exclude_parent_body #

fn (s &RayCast2D) get_exclude_parent_body() bool

fn (RayCast2D) set_collide_with_areas #

fn (s &RayCast2D) set_collide_with_areas(enable bool)

fn (RayCast2D) is_collide_with_areas_enabled #

fn (s &RayCast2D) is_collide_with_areas_enabled() bool

fn (RayCast2D) set_collide_with_bodies #

fn (s &RayCast2D) set_collide_with_bodies(enable bool)

fn (RayCast2D) is_collide_with_bodies_enabled #

fn (s &RayCast2D) is_collide_with_bodies_enabled() bool

fn (RayCast2D) set_hit_from_inside #

fn (s &RayCast2D) set_hit_from_inside(enable bool)

fn (RayCast2D) is_hit_from_inside_enabled #

fn (s &RayCast2D) is_hit_from_inside_enabled() bool

struct RayCast3D #

struct RayCast3D {
	Node3D
}

A ray in 3D space, used to find the first object it intersects.

fn (RayCast3D) to_variant #

fn (s &RayCast3D) to_variant() Variant

fn (RayCast3D) from_variant #

fn (mut s RayCast3D) from_variant(variant &Variant)

fn (RayCast3D) set_enabled #

fn (s &RayCast3D) set_enabled(enabled bool)

fn (RayCast3D) is_enabled #

fn (s &RayCast3D) is_enabled() bool

fn (RayCast3D) set_target_position #

fn (s &RayCast3D) set_target_position(local_point Vector3)

fn (RayCast3D) get_target_position #

fn (s &RayCast3D) get_target_position() Vector3

fn (RayCast3D) is_colliding #

fn (s &RayCast3D) is_colliding() bool

Returns whether any object is intersecting with the ray's vector (considering the vector length).

fn (RayCast3D) force_raycast_update #

fn (s &RayCast3D) force_raycast_update()

Updates the collision information for the ray immediately, without waiting for the next _physics_process call. Use this method, for example, when the ray or its parent has changed state. [b]Note:[/b] [member enabled] does not need to be true for this to work.

fn (RayCast3D) get_collider #

fn (s &RayCast3D) get_collider() Object

Returns the first object that the ray intersects, or null if no object is intersecting the ray (i.e. [method is_colliding] returns false). [b]Note:[/b] This object is not guaranteed to be a [CollisionObject3D]. For example, if the ray intersects a [CSGShape3D] or a [GridMap], the method will return a [CSGShape3D] or [GridMap] instance.

fn (RayCast3D) get_collider_rid #

fn (s &RayCast3D) get_collider_rid() RID

Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns false).

fn (RayCast3D) get_collider_shape #

fn (s &RayCast3D) get_collider_shape() i64

Returns the shape ID of the first object that the ray intersects, or 0 if no object is intersecting the ray (i.e. [method is_colliding] returns false). To get the intersected shape node, for a [CollisionObject3D] target, use: [codeblocks] [gdscript] var target = get_collider() # A CollisionObject3D. var shape_id = get_collider_shape() # The shape index in the collider. var owner_id = target.shape_find_owner(shape_id) # The owner ID in the collider. var shape = target.shape_owner_get_owner(owner_id) [/gdscript] [csharp] var target = (CollisionObject3D)GetCollider(); // A CollisionObject3D. var shapeId = GetColliderShape(); // The shape index in the collider. var ownerId = target.ShapeFindOwner(shapeId); // The owner ID in the collider. var shape = target.ShapeOwnerGetOwner(ownerId); [/csharp] [/codeblocks]

fn (RayCast3D) get_collision_point #

fn (s &RayCast3D) get_collision_point() Vector3

Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If [member hit_from_inside] is true and the ray starts inside of a collision shape, this function will return the origin point of the ray. [b]Note:[/b] Check that [method is_colliding] returns true before calling this method to ensure the returned point is valid and up-to-date.

fn (RayCast3D) get_collision_normal #

fn (s &RayCast3D) get_collision_normal() Vector3

Returns the normal of the intersecting object's shape at the collision point, or Vector3(0, 0, 0) if the ray starts inside the shape and [member hit_from_inside] is true. [b]Note:[/b] Check that [method is_colliding] returns true before calling this method to ensure the returned normal is valid and up-to-date.

fn (RayCast3D) get_collision_face_index #

fn (s &RayCast3D) get_collision_face_index() i64

Returns the collision object's face index at the collision point, or -1 if the shape intersecting the ray is not a [ConcavePolygonShape3D].

fn (RayCast3D) add_exception_rid #

fn (s &RayCast3D) add_exception_rid(rid RID)

Adds a collision exception so the ray does not report collisions with the specified [RID].

fn (RayCast3D) add_exception #

fn (s &RayCast3D) add_exception(node CollisionObject3D)

Adds a collision exception so the ray does not report collisions with the specified [CollisionObject3D] node.

fn (RayCast3D) remove_exception_rid #

fn (s &RayCast3D) remove_exception_rid(rid RID)

Removes a collision exception so the ray does report collisions with the specified [RID].

fn (RayCast3D) remove_exception #

fn (s &RayCast3D) remove_exception(node CollisionObject3D)

Removes a collision exception so the ray does report collisions with the specified [CollisionObject3D] node.

fn (RayCast3D) clear_exceptions #

fn (s &RayCast3D) clear_exceptions()

Removes all collision exceptions for this ray.

fn (RayCast3D) set_collision_mask #

fn (s &RayCast3D) set_collision_mask(mask i64)

fn (RayCast3D) get_collision_mask #

fn (s &RayCast3D) get_collision_mask() i64

fn (RayCast3D) set_collision_mask_value #

fn (s &RayCast3D) set_collision_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.

fn (RayCast3D) get_collision_mask_value #

fn (s &RayCast3D) get_collision_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (RayCast3D) set_exclude_parent_body #

fn (s &RayCast3D) set_exclude_parent_body(mask bool)

fn (RayCast3D) get_exclude_parent_body #

fn (s &RayCast3D) get_exclude_parent_body() bool

fn (RayCast3D) set_collide_with_areas #

fn (s &RayCast3D) set_collide_with_areas(enable bool)

fn (RayCast3D) is_collide_with_areas_enabled #

fn (s &RayCast3D) is_collide_with_areas_enabled() bool

fn (RayCast3D) set_collide_with_bodies #

fn (s &RayCast3D) set_collide_with_bodies(enable bool)

fn (RayCast3D) is_collide_with_bodies_enabled #

fn (s &RayCast3D) is_collide_with_bodies_enabled() bool

fn (RayCast3D) set_hit_from_inside #

fn (s &RayCast3D) set_hit_from_inside(enable bool)

fn (RayCast3D) is_hit_from_inside_enabled #

fn (s &RayCast3D) is_hit_from_inside_enabled() bool

fn (RayCast3D) set_hit_back_faces #

fn (s &RayCast3D) set_hit_back_faces(enable bool)

fn (RayCast3D) is_hit_back_faces_enabled #

fn (s &RayCast3D) is_hit_back_faces_enabled() bool

fn (RayCast3D) set_debug_shape_custom_color #

fn (s &RayCast3D) set_debug_shape_custom_color(debug_shape_custom_color Color)

fn (RayCast3D) get_debug_shape_custom_color #

fn (s &RayCast3D) get_debug_shape_custom_color() Color

fn (RayCast3D) set_debug_shape_thickness #

fn (s &RayCast3D) set_debug_shape_thickness(debug_shape_thickness i64)

fn (RayCast3D) get_debug_shape_thickness #

fn (s &RayCast3D) get_debug_shape_thickness() i64

struct Rect2 #

@[packed]
struct Rect2 {
pub mut:
	// The origin point. This is usually the top-left corner of the rectangle.
	position Vector2 // offset 0
	// The rectangle's width and height, starting from [member position]. Setting this value also affects the [member end] point.
	// [b]Note:[/b] It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the [member position] is the top-left corner, and the [member end] is the bottom-right corner. To get an equivalent rectangle with non-negative size, use [method abs].
	size Vector2 // offset 8
}

A 2D axis-aligned bounding box using floating-point coordinates.

The [Rect2] built-in [Variant] type represents an axis-aligned rectangle in a 2D space. It is defined by its [member position] and [member size], which are [Vector2]. It is frequently used for fast overlap tests (see [method intersects]). Although [Rect2] itself is axis-aligned, it can be combined with [Transform2D] to represent a rotated or skewed rectangle. For integer coordinates, use [Rect2i]. The 3D equivalent to [Rect2] is [AABB]. [b]Note:[/b] Negative values for [member size] are not supported. With negative size, most [Rect2] methods do not work correctly. Use [method abs] to get an equivalent [Rect2] with a non-negative size. [b]Note:[/b] In a boolean context, a [Rect2] evaluates to false if both [member position] and [member size] are zero (equal to [constant Vector2.ZERO]). Otherwise, it always evaluates to true.

fn (Rect2) get_center #

fn (s &Rect2) get_center() Vector2

Returns the center point of the rectangle. This is the same as position + (size / 2.0).

fn (Rect2) get_area #

fn (s &Rect2) get_area() f64

Returns the rectangle's area. This is equivalent to size.x * size.y. See also [method has_area].

fn (Rect2) has_area #

fn (s &Rect2) has_area() bool

Returns true if this rectangle has positive width and height. See also [method get_area].

fn (Rect2) has_point #

fn (s &Rect2) has_point(point Vector2) bool

Returns true if the rectangle contains the given [param point]. By convention, points on the right and bottom edges are [b]not[/b] included. [b]Note:[/b] This method is not reliable for [Rect2] with a [i]negative[/i] [member size]. Use [method abs] first to get a valid rectangle.

fn (Rect2) is_equal_approx #

fn (s &Rect2) is_equal_approx(rect Rect2) bool

Returns true if this rectangle and [param rect] are approximately equal, by calling [method Vector2.is_equal_approx] on the [member position] and the [member size].

fn (Rect2) is_finite #

fn (s &Rect2) is_finite() bool

Returns true if this rectangle's values are finite, by calling [method Vector2.is_finite] on the [member position] and the [member size].

fn (Rect2) intersects #

fn (s &Rect2) intersects(b Rect2, cfg Rect2_intersects_Cfg) bool

Returns true if this rectangle overlaps with the [param b] rectangle. The edges of both rectangles are excluded, unless [param include_borders] is true.

fn (Rect2) encloses #

fn (s &Rect2) encloses(b Rect2) bool

Returns true if this rectangle [i]completely[/i] encloses the [param b] rectangle.

fn (Rect2) intersection #

fn (s &Rect2) intersection(b Rect2) Rect2

Returns the intersection between this rectangle and [param b]. If the rectangles do not intersect, returns an empty [Rect2]. [codeblocks] [gdscript] var rect1 = Rect2(0, 0, 5, 10) var rect2 = Rect2(2, 0, 8, 4)

var a = rect1.intersection(rect2) # a is Rect2(2, 0, 3, 4) [/gdscript] [csharp] var rect1 = new Rect2(0, 0, 5, 10); var rect2 = new Rect2(2, 0, 8, 4);

var a = rect1.Intersection(rect2); // a is Rect2(2, 0, 3, 4) [/csharp] [/codeblocks] [b]Note:[/b] If you only need to know whether two rectangles are overlapping, use [method intersects], instead.

fn (Rect2) merge #

fn (s &Rect2) merge(b Rect2) Rect2

Returns a [Rect2] that encloses both this rectangle and [param b] around the edges. See also [method encloses].

fn (Rect2) expand #

fn (s &Rect2) expand(to Vector2) Rect2

Returns a copy of this rectangle expanded to align the edges with the given [param to] point, if necessary. [codeblocks] [gdscript] var rect = Rect2(0, 0, 5, 2)

rect = rect.expand(Vector2(10, 0)) # rect is Rect2(0, 0, 10, 2) rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 15, 5) [/gdscript] [csharp] var rect = new Rect2(0, 0, 5, 2);

rect = rect.Expand(new Vector2(10, 0)); // rect is Rect2(0, 0, 10, 2) rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 15, 5) [/csharp] [/codeblocks]

fn (Rect2) get_support #

fn (s &Rect2) get_support(direction Vector2) Vector2

Returns the vertex's position of this rect that's the farthest in the given direction. This point is commonly known as the support point in collision detection algorithms.

fn (Rect2) grow #

fn (s &Rect2) grow(amount f64) Rect2

Returns a copy of this rectangle extended on all sides by the given [param amount]. A negative [param amount] shrinks the rectangle instead. See also [method grow_individual] and [method grow_side]. [codeblocks] [gdscript] var a = Rect2(4, 4, 8, 8).grow(4) # a is Rect2(0, 0, 16, 16) var b = Rect2(0, 0, 8, 4).grow(2) # b is Rect2(-2, -2, 12, 8) [/gdscript] [csharp] var a = new Rect2(4, 4, 8, 8).Grow(4); // a is Rect2(0, 0, 16, 16) var b = new Rect2(0, 0, 8, 4).Grow(2); // b is Rect2(-2, -2, 12, 8) [/csharp] [/codeblocks]

fn (Rect2) grow_side #

fn (s &Rect2) grow_side(side i64, amount f64) Rect2

Returns a copy of this rectangle with its [param side] extended by the given [param amount] (see [enum Side] constants). A negative [param amount] shrinks the rectangle, instead. See also [method grow] and [method grow_individual].

fn (Rect2) grow_individual #

fn (s &Rect2) grow_individual(left f64, top f64, right f64, bottom f64) Rect2

Returns a copy of this rectangle with its [param left], [param top], [param right], and [param bottom] sides extended by the given amounts. Negative values shrink the sides, instead. See also [method grow] and [method grow_side].

fn (Rect2) abs #

fn (s &Rect2) abs() Rect2

Returns a [Rect2] equivalent to this rectangle, with its width and height modified to be non-negative values, and with its [member position] being the top-left corner of the rectangle. [codeblocks] [gdscript] var rect = Rect2(25, 25, -100, -50) var absolute = rect.abs() # absolute is Rect2(-75, -25, 100, 50) [/gdscript] [csharp] var rect = new Rect2(25, 25, -100, -50); var absolute = rect.Abs(); // absolute is Rect2(-75, -25, 100, 50) [/csharp] [/codeblocks] [b]Note:[/b] It's recommended to use this method when [member size] is negative, as most other methods in Godot assume that the [member position] is the top-left corner, and the [member end] is the bottom-right corner.

fn (Rect2) to_variant #

fn (s &Rect2) to_variant() Variant

fn (Rect2) from_variant #

fn (mut s Rect2) from_variant(variant &Variant)

fn (Rect2) == #

fn (a Rect2) == (b Rect2) bool

Returns true if both [member position] and [member size] of the rectangles are exactly equal, respectively. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Rect2) eq_rect2 #

fn (a Rect2) eq_rect2(b Rect2) bool

Returns true if both [member position] and [member size] of the rectangles are exactly equal, respectively. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Rect2) ne_rect2 #

fn (a Rect2) ne_rect2(b Rect2) bool

Returns true if the [member position] or [member size] of both rectangles are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Rect2) mul_transform2d #

fn (a Rect2) mul_transform2d(b Transform2D) Rect2

Inversely transforms (multiplies) the [Rect2] by the given [Transform2D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). rect * transform is equivalent to transform.inverse() * rect. See [method Transform2D.inverse]. For transforming by inverse of an affine transformation (e.g. with scaling) transform.affine_inverse() * rect can be used instead. See [method Transform2D.affine_inverse].

fn (Rect2) in_dictionary #

fn (a Rect2) in_dictionary(b Dictionary) bool

fn (Rect2) in_array #

fn (a Rect2) in_array(b Array) bool

struct Rect2_intersects_Cfg #

@[params]
struct Rect2_intersects_Cfg {
pub:
	include_borders bool
}

struct Rect2i #

@[packed]
struct Rect2i {
pub mut:
	// The origin point. This is usually the top-left corner of the rectangle.
	position Vector2i // offset 0
	// The rectangle's width and height, starting from [member position]. Setting this value also affects the [member end] point.
	// [b]Note:[/b] It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the [member position] is the top-left corner, and the [member end] is the bottom-right corner. To get an equivalent rectangle with non-negative size, use [method abs].
	size Vector2i // offset 8
}

A 2D axis-aligned bounding box using integer coordinates.

The [Rect2i] built-in [Variant] type represents an axis-aligned rectangle in a 2D space, using integer coordinates. It is defined by its [member position] and [member size], which are [Vector2i]. Because it does not rotate, it is frequently used for fast overlap tests (see [method intersects]). For floating-point coordinates, see [Rect2]. [b]Note:[/b] Negative values for [member size] are not supported. With negative size, most [Rect2i] methods do not work correctly. Use [method abs] to get an equivalent [Rect2i] with a non-negative size. [b]Note:[/b] In a boolean context, a [Rect2i] evaluates to false if both [member position] and [member size] are zero (equal to [constant Vector2i.ZERO]). Otherwise, it always evaluates to true.

fn (Rect2i) get_center #

fn (s &Rect2i) get_center() Vector2i

Returns the center point of the rectangle. This is the same as position + (size / 2). [b]Note:[/b] If the [member size] is odd, the result will be rounded towards [member position].

fn (Rect2i) get_area #

fn (s &Rect2i) get_area() i64

Returns the rectangle's area. This is equivalent to size.x * size.y. See also [method has_area].

fn (Rect2i) has_area #

fn (s &Rect2i) has_area() bool

Returns true if this rectangle has positive width and height. See also [method get_area].

fn (Rect2i) has_point #

fn (s &Rect2i) has_point(point Vector2i) bool

Returns true if the rectangle contains the given [param point]. By convention, points on the right and bottom edges are [b]not[/b] included. [b]Note:[/b] This method is not reliable for [Rect2i] with a [i]negative[/i] [member size]. Use [method abs] first to get a valid rectangle.

fn (Rect2i) intersects #

fn (s &Rect2i) intersects(b Rect2i) bool

Returns true if this rectangle overlaps with the [param b] rectangle. The edges of both rectangles are excluded.

fn (Rect2i) encloses #

fn (s &Rect2i) encloses(b Rect2i) bool

Returns true if this [Rect2i] completely encloses another one.

fn (Rect2i) intersection #

fn (s &Rect2i) intersection(b Rect2i) Rect2i

Returns the intersection between this rectangle and [param b]. If the rectangles do not intersect, returns an empty [Rect2i]. [codeblocks] [gdscript] var a = Rect2i(0, 0, 5, 10) var b = Rect2i(2, 0, 8, 4)

var c = a.intersection(b) # c is Rect2i(2, 0, 3, 4) [/gdscript] [csharp] var a = new Rect2I(0, 0, 5, 10); var b = new Rect2I(2, 0, 8, 4);

var c = rect1.Intersection(rect2); // c is Rect2I(2, 0, 3, 4) [/csharp] [/codeblocks] [b]Note:[/b] If you only need to know whether two rectangles are overlapping, use [method intersects], instead.

fn (Rect2i) merge #

fn (s &Rect2i) merge(b Rect2i) Rect2i

Returns a [Rect2i] that encloses both this rectangle and [param b] around the edges. See also [method encloses].

fn (Rect2i) expand #

fn (s &Rect2i) expand(to Vector2i) Rect2i

Returns a copy of this rectangle expanded to align the edges with the given [param to] point, if necessary. [codeblocks] [gdscript] var rect = Rect2i(0, 0, 5, 2)

rect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2) rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 15, 5) [/gdscript] [csharp] var rect = new Rect2I(0, 0, 5, 2);

rect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2) rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 15, 5) [/csharp] [/codeblocks]

fn (Rect2i) grow #

fn (s &Rect2i) grow(amount i64) Rect2i

Returns a copy of this rectangle extended on all sides by the given [param amount]. A negative [param amount] shrinks the rectangle instead. See also [method grow_individual] and [method grow_side]. [codeblocks] [gdscript] var a = Rect2i(4, 4, 8, 8).grow(4) # a is Rect2i(0, 0, 16, 16) var b = Rect2i(0, 0, 8, 4).grow(2) # b is Rect2i(-2, -2, 12, 8) [/gdscript] [csharp] var a = new Rect2I(4, 4, 8, 8).Grow(4); // a is Rect2I(0, 0, 16, 16) var b = new Rect2I(0, 0, 8, 4).Grow(2); // b is Rect2I(-2, -2, 12, 8) [/csharp] [/codeblocks]

fn (Rect2i) grow_side #

fn (s &Rect2i) grow_side(side i64, amount i64) Rect2i

Returns a copy of this rectangle with its [param side] extended by the given [param amount] (see [enum Side] constants). A negative [param amount] shrinks the rectangle, instead. See also [method grow] and [method grow_individual].

fn (Rect2i) grow_individual #

fn (s &Rect2i) grow_individual(left i64, top i64, right i64, bottom i64) Rect2i

Returns a copy of this rectangle with its [param left], [param top], [param right], and [param bottom] sides extended by the given amounts. Negative values shrink the sides, instead. See also [method grow] and [method grow_side].

fn (Rect2i) abs #

fn (s &Rect2i) abs() Rect2i

Returns a [Rect2i] equivalent to this rectangle, with its width and height modified to be non-negative values, and with its [member position] being the top-left corner of the rectangle. [codeblocks] [gdscript] var rect = Rect2i(25, 25, -100, -50) var absolute = rect.abs() # absolute is Rect2i(-75, -25, 100, 50) [/gdscript] [csharp] var rect = new Rect2I(25, 25, -100, -50); var absolute = rect.Abs(); // absolute is Rect2I(-75, -25, 100, 50) [/csharp] [/codeblocks] [b]Note:[/b] It's recommended to use this method when [member size] is negative, as most other methods in Godot assume that the [member position] is the top-left corner, and the [member end] is the bottom-right corner.

fn (Rect2i) to_variant #

fn (s &Rect2i) to_variant() Variant

fn (Rect2i) from_variant #

fn (mut s Rect2i) from_variant(variant &Variant)

fn (Rect2i) == #

fn (a Rect2i) == (b Rect2i) bool

Returns true if both [member position] and [member size] of the rectangles are equal, respectively.

fn (Rect2i) eq_rect2i #

fn (a Rect2i) eq_rect2i(b Rect2i) bool

Returns true if both [member position] and [member size] of the rectangles are equal, respectively.

fn (Rect2i) ne_rect2i #

fn (a Rect2i) ne_rect2i(b Rect2i) bool

Returns true if the [member position] or [member size] of both rectangles are not equal.

fn (Rect2i) in_dictionary #

fn (a Rect2i) in_dictionary(b Dictionary) bool

fn (Rect2i) in_array #

fn (a Rect2i) in_array(b Array) bool

struct RectangleShape2D #

struct RectangleShape2D {
	Shape2D
}

A 2D rectangle shape used for physics collision.

fn (RectangleShape2D) to_variant #

fn (s &RectangleShape2D) to_variant() Variant

fn (RectangleShape2D) from_variant #

fn (mut s RectangleShape2D) from_variant(variant &Variant)

fn (RectangleShape2D) set_size #

fn (s &RectangleShape2D) set_size(size Vector2)

fn (RectangleShape2D) get_size #

fn (s &RectangleShape2D) get_size() Vector2

struct Ref #

struct Ref[T] {
mut:
	obj T // extends RefCounted
}

struct RefCounted #

struct RefCounted {
	Object
}

Base class for reference-counted objects.

fn (RefCounted) to_variant #

fn (s &RefCounted) to_variant() Variant

fn (RefCounted) from_variant #

fn (mut s RefCounted) from_variant(variant &Variant)

fn (RefCounted) init_ref #

fn (s &RefCounted) init_ref() bool

Initializes the internal reference counter. Use this only if you really know what you are doing. Returns whether the initialization was successful.

fn (RefCounted) reference #

fn (s &RefCounted) reference() bool

Increments the internal reference counter. Use this only if you really know what you are doing. Returns true if the increment was successful, false otherwise.

fn (RefCounted) unreference #

fn (s &RefCounted) unreference() bool

Decrements the internal reference counter. Use this only if you really know what you are doing. Returns true if the object should be freed after the decrement, false otherwise.

fn (RefCounted) get_reference_count #

fn (s &RefCounted) get_reference_count() i64

Returns the current reference count.

struct ReferenceRect #

struct ReferenceRect {
	Control
}

A rectangular box for designing UIs.

fn (ReferenceRect) to_variant #

fn (s &ReferenceRect) to_variant() Variant

fn (ReferenceRect) from_variant #

fn (mut s ReferenceRect) from_variant(variant &Variant)

fn (ReferenceRect) get_border_color #

fn (s &ReferenceRect) get_border_color() Color

fn (ReferenceRect) set_border_color #

fn (s &ReferenceRect) set_border_color(color Color)

fn (ReferenceRect) get_border_width #

fn (s &ReferenceRect) get_border_width() f64

fn (ReferenceRect) set_border_width #

fn (s &ReferenceRect) set_border_width(width f64)

fn (ReferenceRect) get_editor_only #

fn (s &ReferenceRect) get_editor_only() bool

fn (ReferenceRect) set_editor_only #

fn (s &ReferenceRect) set_editor_only(enabled bool)

struct ReflectionProbe #

struct ReflectionProbe {
	VisualInstance3D
}

Captures its surroundings to create fast, accurate reflections from a given point.

fn (ReflectionProbe) to_variant #

fn (s &ReflectionProbe) to_variant() Variant

fn (ReflectionProbe) from_variant #

fn (mut s ReflectionProbe) from_variant(variant &Variant)

fn (ReflectionProbe) set_intensity #

fn (s &ReflectionProbe) set_intensity(intensity f64)

fn (ReflectionProbe) get_intensity #

fn (s &ReflectionProbe) get_intensity() f64

fn (ReflectionProbe) set_blend_distance #

fn (s &ReflectionProbe) set_blend_distance(blend_distance f64)

fn (ReflectionProbe) get_blend_distance #

fn (s &ReflectionProbe) get_blend_distance() f64

fn (ReflectionProbe) set_ambient_mode #

fn (s &ReflectionProbe) set_ambient_mode(ambient ReflectionProbeAmbientMode)

fn (ReflectionProbe) get_ambient_mode #

fn (s &ReflectionProbe) get_ambient_mode() ReflectionProbeAmbientMode

fn (ReflectionProbe) set_ambient_color #

fn (s &ReflectionProbe) set_ambient_color(ambient Color)

fn (ReflectionProbe) get_ambient_color #

fn (s &ReflectionProbe) get_ambient_color() Color

fn (ReflectionProbe) set_ambient_color_energy #

fn (s &ReflectionProbe) set_ambient_color_energy(ambient_energy f64)

fn (ReflectionProbe) get_ambient_color_energy #

fn (s &ReflectionProbe) get_ambient_color_energy() f64

fn (ReflectionProbe) set_max_distance #

fn (s &ReflectionProbe) set_max_distance(max_distance f64)

fn (ReflectionProbe) get_max_distance #

fn (s &ReflectionProbe) get_max_distance() f64

fn (ReflectionProbe) set_mesh_lod_threshold #

fn (s &ReflectionProbe) set_mesh_lod_threshold(ratio f64)

fn (ReflectionProbe) get_mesh_lod_threshold #

fn (s &ReflectionProbe) get_mesh_lod_threshold() f64

fn (ReflectionProbe) set_size #

fn (s &ReflectionProbe) set_size(size Vector3)

fn (ReflectionProbe) get_size #

fn (s &ReflectionProbe) get_size() Vector3

fn (ReflectionProbe) set_origin_offset #

fn (s &ReflectionProbe) set_origin_offset(origin_offset Vector3)

fn (ReflectionProbe) get_origin_offset #

fn (s &ReflectionProbe) get_origin_offset() Vector3

fn (ReflectionProbe) set_as_interior #

fn (s &ReflectionProbe) set_as_interior(enable bool)

fn (ReflectionProbe) is_set_as_interior #

fn (s &ReflectionProbe) is_set_as_interior() bool

fn (ReflectionProbe) set_enable_box_projection #

fn (s &ReflectionProbe) set_enable_box_projection(enable bool)

fn (ReflectionProbe) is_box_projection_enabled #

fn (s &ReflectionProbe) is_box_projection_enabled() bool

fn (ReflectionProbe) set_enable_shadows #

fn (s &ReflectionProbe) set_enable_shadows(enable bool)

fn (ReflectionProbe) are_shadows_enabled #

fn (s &ReflectionProbe) are_shadows_enabled() bool

fn (ReflectionProbe) set_cull_mask #

fn (s &ReflectionProbe) set_cull_mask(layers i64)

fn (ReflectionProbe) get_cull_mask #

fn (s &ReflectionProbe) get_cull_mask() i64

fn (ReflectionProbe) set_reflection_mask #

fn (s &ReflectionProbe) set_reflection_mask(layers i64)

fn (ReflectionProbe) get_reflection_mask #

fn (s &ReflectionProbe) get_reflection_mask() i64

fn (ReflectionProbe) set_update_mode #

fn (s &ReflectionProbe) set_update_mode(mode ReflectionProbeUpdateMode)

fn (ReflectionProbe) get_update_mode #

fn (s &ReflectionProbe) get_update_mode() ReflectionProbeUpdateMode

struct RegEx #

struct RegEx {
	RefCounted
}

Class for searching text for patterns using regular expressions.

fn (RegEx) to_variant #

fn (s &RegEx) to_variant() Variant

fn (RegEx) from_variant #

fn (mut s RegEx) from_variant(variant &Variant)

fn (RegEx) clear #

fn (s &RegEx) clear()

This method resets the state of the object, as if it was freshly created. Namely, it unassigns the regular expression of this object.

fn (RegEx) compile #

fn (s &RegEx) compile(pattern string, cfg RegEx_compile_Cfg) GDError

Compiles and assign the search pattern to use. Returns [constant OK] if the compilation is successful. If compilation fails, returns [constant FAILED] and when [param show_error] is true, details are printed to standard output.

fn (RegEx) search #

fn (s &RegEx) search(subject string, cfg RegEx_search_Cfg) RegExMatch

Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching result if found, otherwise null. The region to search within can be specified with [param offset] and [param end]. This is useful when searching for another match in the same [param subject] by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor ^ is not affected by [param offset], and the character before [param offset] will be checked for the word boundary \b.

fn (RegEx) search_all #

fn (s &RegEx) search_all(subject string, cfg RegEx_search_all_Cfg) Array

Searches the text for the compiled pattern. Returns an array of [RegExMatch] containers for each non-overlapping result. If no results were found, an empty array is returned instead. The region to search within can be specified with [param offset] and [param end]. This is useful when searching for another match in the same [param subject] by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor ^ is not affected by [param offset], and the character before [param offset] will be checked for the word boundary \b.

fn (RegEx) sub #

fn (s &RegEx) sub(subject string, replacement string, cfg RegEx_sub_Cfg) string

Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as $1 and $name are expanded and resolved. By default, only the first instance is replaced, but it can be changed for all instances (global replacement). The region to search within can be specified with [param offset] and [param end]. This is useful when searching for another match in the same [param subject] by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor ^ is not affected by [param offset], and the character before [param offset] will be checked for the word boundary \b.

fn (RegEx) is_valid #

fn (s &RegEx) is_valid() bool

Returns whether this object has a valid search pattern assigned.

fn (RegEx) get_pattern #

fn (s &RegEx) get_pattern() string

Returns the original search pattern that was compiled.

fn (RegEx) get_group_count #

fn (s &RegEx) get_group_count() i64

Returns the number of capturing groups in compiled pattern.

fn (RegEx) get_names #

fn (s &RegEx) get_names() PackedStringArray

Returns an array of names of named capturing groups in the compiled pattern. They are ordered by appearance.

struct RegExMatch #

struct RegExMatch {
	RefCounted
}

Contains the results of a [RegEx] search.

fn (RegExMatch) to_variant #

fn (s &RegExMatch) to_variant() Variant

fn (RegExMatch) from_variant #

fn (mut s RegExMatch) from_variant(variant &Variant)

fn (RegExMatch) get_subject #

fn (s &RegExMatch) get_subject() string

fn (RegExMatch) get_group_count #

fn (s &RegExMatch) get_group_count() i64

Returns the number of capturing groups.

fn (RegExMatch) get_names #

fn (s &RegExMatch) get_names() Dictionary

fn (RegExMatch) get_strings #

fn (s &RegExMatch) get_strings() PackedStringArray

fn (RegExMatch) get_string #

fn (s &RegExMatch) get_string(cfg RegExMatch_get_string_Cfg) string

Returns the substring of the match from the source string. Capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. Returns an empty string if the group did not match or doesn't exist.

fn (RegExMatch) get_start #

fn (s &RegExMatch) get_start(cfg RegExMatch_get_start_Cfg) i64

Returns the starting position of the match within the source string. The starting position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. Returns -1 if the group did not match or doesn't exist.

fn (RegExMatch) get_end #

fn (s &RegExMatch) get_end(cfg RegExMatch_get_end_Cfg) i64

Returns the end position of the match within the source string. The end position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. Returns -1 if the group did not match or doesn't exist.

struct RegExMatch_get_end_Cfg #

@[params]
struct RegExMatch_get_end_Cfg {
pub:
	name ToVariant
}

Optional parameters for RegExMatch#get_end

struct RegExMatch_get_start_Cfg #

@[params]
struct RegExMatch_get_start_Cfg {
pub:
	name ToVariant
}

Optional parameters for RegExMatch#get_start

struct RegExMatch_get_string_Cfg #

@[params]
struct RegExMatch_get_string_Cfg {
pub:
	name ToVariant
}

Optional parameters for RegExMatch#get_string

struct RegEx_compile_Cfg #

@[params]
struct RegEx_compile_Cfg {
pub:
	show_error bool
}

Optional parameters for RegEx#compile

struct RegEx_create_from_string_Cfg #

@[params]
struct RegEx_create_from_string_Cfg {
pub:
	show_error bool
}

Optional parameters for RegEx#create_from_string

struct RegEx_search_Cfg #

@[params]
struct RegEx_search_Cfg {
pub:
	offset i64
	end    i64 = -1
}

Optional parameters for RegEx#search

struct RegEx_search_all_Cfg #

@[params]
struct RegEx_search_all_Cfg {
pub:
	offset i64
	end    i64 = -1
}

Optional parameters for RegEx#search_all

struct RegEx_sub_Cfg #

@[params]
struct RegEx_sub_Cfg {
pub:
	all    bool
	offset i64
	end    i64 = -1
}

Optional parameters for RegEx#sub

struct RemoteTransform2D #

struct RemoteTransform2D {
	Node2D
}

RemoteTransform2D pushes its own [Transform2D] to another [Node2D] derived node in the scene.

fn (RemoteTransform2D) to_variant #

fn (s &RemoteTransform2D) to_variant() Variant

fn (RemoteTransform2D) from_variant #

fn (mut s RemoteTransform2D) from_variant(variant &Variant)

fn (RemoteTransform2D) set_remote_node #

fn (s &RemoteTransform2D) set_remote_node(path NodePath)

fn (RemoteTransform2D) get_remote_node #

fn (s &RemoteTransform2D) get_remote_node() NodePath

fn (RemoteTransform2D) force_update_cache #

fn (s &RemoteTransform2D) force_update_cache()

[RemoteTransform2D] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again.

fn (RemoteTransform2D) set_use_global_coordinates #

fn (s &RemoteTransform2D) set_use_global_coordinates(use_global_coordinates bool)

fn (RemoteTransform2D) get_use_global_coordinates #

fn (s &RemoteTransform2D) get_use_global_coordinates() bool

fn (RemoteTransform2D) set_update_position #

fn (s &RemoteTransform2D) set_update_position(update_remote_position bool)

fn (RemoteTransform2D) get_update_position #

fn (s &RemoteTransform2D) get_update_position() bool

fn (RemoteTransform2D) set_update_rotation #

fn (s &RemoteTransform2D) set_update_rotation(update_remote_rotation bool)

fn (RemoteTransform2D) get_update_rotation #

fn (s &RemoteTransform2D) get_update_rotation() bool

fn (RemoteTransform2D) set_update_scale #

fn (s &RemoteTransform2D) set_update_scale(update_remote_scale bool)

fn (RemoteTransform2D) get_update_scale #

fn (s &RemoteTransform2D) get_update_scale() bool

struct RemoteTransform3D #

struct RemoteTransform3D {
	Node3D
}

RemoteTransform3D pushes its own [Transform3D] to another [Node3D] derived Node in the scene.

fn (RemoteTransform3D) to_variant #

fn (s &RemoteTransform3D) to_variant() Variant

fn (RemoteTransform3D) from_variant #

fn (mut s RemoteTransform3D) from_variant(variant &Variant)

fn (RemoteTransform3D) set_remote_node #

fn (s &RemoteTransform3D) set_remote_node(path NodePath)

fn (RemoteTransform3D) get_remote_node #

fn (s &RemoteTransform3D) get_remote_node() NodePath

fn (RemoteTransform3D) force_update_cache #

fn (s &RemoteTransform3D) force_update_cache()

[RemoteTransform3D] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again.

fn (RemoteTransform3D) set_use_global_coordinates #

fn (s &RemoteTransform3D) set_use_global_coordinates(use_global_coordinates bool)

fn (RemoteTransform3D) get_use_global_coordinates #

fn (s &RemoteTransform3D) get_use_global_coordinates() bool

fn (RemoteTransform3D) set_update_position #

fn (s &RemoteTransform3D) set_update_position(update_remote_position bool)

fn (RemoteTransform3D) get_update_position #

fn (s &RemoteTransform3D) get_update_position() bool

fn (RemoteTransform3D) set_update_rotation #

fn (s &RemoteTransform3D) set_update_rotation(update_remote_rotation bool)

fn (RemoteTransform3D) get_update_rotation #

fn (s &RemoteTransform3D) get_update_rotation() bool

fn (RemoteTransform3D) set_update_scale #

fn (s &RemoteTransform3D) set_update_scale(update_remote_scale bool)

fn (RemoteTransform3D) get_update_scale #

fn (s &RemoteTransform3D) get_update_scale() bool

struct RenderData #

struct RenderData {
	Object
}

Abstract render data object, holds frame data related to rendering a single frame of a viewport.

fn (RenderData) to_variant #

fn (s &RenderData) to_variant() Variant

fn (RenderData) from_variant #

fn (mut s RenderData) from_variant(variant &Variant)

fn (RenderData) get_render_scene_buffers #

fn (s &RenderData) get_render_scene_buffers() RenderSceneBuffers

Returns the [RenderSceneBuffers] object managing the scene buffers for rendering this viewport.

fn (RenderData) get_render_scene_data #

fn (s &RenderData) get_render_scene_data() RenderSceneData

Returns the [RenderSceneData] object managing this frames scene data.

fn (RenderData) get_environment #

fn (s &RenderData) get_environment() RID

Returns the [RID] of the environment object in the [RenderingServer] being used to render this viewport.

fn (RenderData) get_camera_attributes #

fn (s &RenderData) get_camera_attributes() RID

Returns the [RID] of the camera attributes object in the [RenderingServer] being used to render this viewport.

struct RenderDataExtension #

struct RenderDataExtension {
	RenderData
}

This class allows for a RenderData implementation to be made in GDExtension.

fn (RenderDataExtension) to_variant #

fn (s &RenderDataExtension) to_variant() Variant

fn (RenderDataExtension) from_variant #

fn (mut s RenderDataExtension) from_variant(variant &Variant)

fn (RenderDataExtension) gd_get_render_scene_buffers #

fn (s &RenderDataExtension) gd_get_render_scene_buffers() RenderSceneBuffers

Implement this in GDExtension to return the implementation's [RenderSceneBuffers] object.

fn (RenderDataExtension) gd_get_render_scene_data #

fn (s &RenderDataExtension) gd_get_render_scene_data() RenderSceneData

Implement this in GDExtension to return the implementation's [RenderSceneDataExtension] object.

fn (RenderDataExtension) gd_get_environment #

fn (s &RenderDataExtension) gd_get_environment() RID

Implement this in GDExtension to return the [RID] of the implementation's environment object.

fn (RenderDataExtension) gd_get_camera_attributes #

fn (s &RenderDataExtension) gd_get_camera_attributes() RID

Implement this in GDExtension to return the [RID] for the implementation's camera attributes object.

struct RenderDataRD #

struct RenderDataRD {
	RenderData
}

Render data implementation for the RenderingDevice based renderers. [b]Note:[/b] This is an internal rendering server object, do not instantiate this from script.

fn (RenderDataRD) to_variant #

fn (s &RenderDataRD) to_variant() Variant

fn (RenderDataRD) from_variant #

fn (mut s RenderDataRD) from_variant(variant &Variant)

struct RenderSceneBuffers #

struct RenderSceneBuffers {
	RefCounted
}

Abstract scene buffers object, created for each viewport for which 3D rendering is done.

fn (RenderSceneBuffers) to_variant #

fn (s &RenderSceneBuffers) to_variant() Variant

fn (RenderSceneBuffers) from_variant #

fn (mut s RenderSceneBuffers) from_variant(variant &Variant)

fn (RenderSceneBuffers) configure #

fn (s &RenderSceneBuffers) configure(config RenderSceneBuffersConfiguration)

This method is called by the rendering server when the associated viewports configuration is changed. It will discard the old buffers and recreate the internal buffers used.

struct RenderSceneBuffersConfiguration #

struct RenderSceneBuffersConfiguration {
	RefCounted
}

Configuration object used to setup a [RenderSceneBuffers] object.

fn (RenderSceneBuffersConfiguration) to_variant #

fn (s &RenderSceneBuffersConfiguration) to_variant() Variant

fn (RenderSceneBuffersConfiguration) from_variant #

fn (mut s RenderSceneBuffersConfiguration) from_variant(variant &Variant)

fn (RenderSceneBuffersConfiguration) get_render_target #

fn (s &RenderSceneBuffersConfiguration) get_render_target() RID

fn (RenderSceneBuffersConfiguration) set_render_target #

fn (s &RenderSceneBuffersConfiguration) set_render_target(render_target RID)

fn (RenderSceneBuffersConfiguration) get_internal_size #

fn (s &RenderSceneBuffersConfiguration) get_internal_size() Vector2i

fn (RenderSceneBuffersConfiguration) set_internal_size #

fn (s &RenderSceneBuffersConfiguration) set_internal_size(internal_size Vector2i)

fn (RenderSceneBuffersConfiguration) get_target_size #

fn (s &RenderSceneBuffersConfiguration) get_target_size() Vector2i

fn (RenderSceneBuffersConfiguration) set_target_size #

fn (s &RenderSceneBuffersConfiguration) set_target_size(target_size Vector2i)

fn (RenderSceneBuffersConfiguration) get_view_count #

fn (s &RenderSceneBuffersConfiguration) get_view_count() i64

fn (RenderSceneBuffersConfiguration) set_view_count #

fn (s &RenderSceneBuffersConfiguration) set_view_count(view_count i64)

fn (RenderSceneBuffersConfiguration) get_scaling_3d_mode #

fn (s &RenderSceneBuffersConfiguration) get_scaling_3d_mode() RenderingServerViewportScaling3DMode

fn (RenderSceneBuffersConfiguration) set_scaling_3d_mode #

fn (s &RenderSceneBuffersConfiguration) set_scaling_3d_mode(scaling_3d_mode RenderingServerViewportScaling3DMode)

fn (RenderSceneBuffersConfiguration) get_msaa_3d #

fn (s &RenderSceneBuffersConfiguration) get_msaa_3d() RenderingServerViewportMSAA

fn (RenderSceneBuffersConfiguration) set_msaa_3d #

fn (s &RenderSceneBuffersConfiguration) set_msaa_3d(msaa_3d RenderingServerViewportMSAA)

fn (RenderSceneBuffersConfiguration) get_screen_space_aa #

fn (s &RenderSceneBuffersConfiguration) get_screen_space_aa() RenderingServerViewportScreenSpaceAA

fn (RenderSceneBuffersConfiguration) set_screen_space_aa #

fn (s &RenderSceneBuffersConfiguration) set_screen_space_aa(screen_space_aa RenderingServerViewportScreenSpaceAA)

fn (RenderSceneBuffersConfiguration) get_fsr_sharpness #

fn (s &RenderSceneBuffersConfiguration) get_fsr_sharpness() f64

fn (RenderSceneBuffersConfiguration) set_fsr_sharpness #

fn (s &RenderSceneBuffersConfiguration) set_fsr_sharpness(fsr_sharpness f64)

fn (RenderSceneBuffersConfiguration) get_texture_mipmap_bias #

fn (s &RenderSceneBuffersConfiguration) get_texture_mipmap_bias() f64

fn (RenderSceneBuffersConfiguration) set_texture_mipmap_bias #

fn (s &RenderSceneBuffersConfiguration) set_texture_mipmap_bias(texture_mipmap_bias f64)

fn (RenderSceneBuffersConfiguration) get_anisotropic_filtering_level #

fn (s &RenderSceneBuffersConfiguration) get_anisotropic_filtering_level() RenderingServerViewportAnisotropicFiltering

fn (RenderSceneBuffersConfiguration) set_anisotropic_filtering_level #

fn (s &RenderSceneBuffersConfiguration) set_anisotropic_filtering_level(anisotropic_filtering_level RenderingServerViewportAnisotropicFiltering)

struct RenderSceneBuffersExtension #

struct RenderSceneBuffersExtension {
	RenderSceneBuffers
}

This class allows for a RenderSceneBuffer implementation to be made in GDExtension.

fn (RenderSceneBuffersExtension) to_variant #

fn (s &RenderSceneBuffersExtension) to_variant() Variant

fn (RenderSceneBuffersExtension) from_variant #

fn (mut s RenderSceneBuffersExtension) from_variant(variant &Variant)

fn (RenderSceneBuffersExtension) gd_configure #

fn (s &RenderSceneBuffersExtension) gd_configure(config RenderSceneBuffersConfiguration)

Implement this in GDExtension to handle the (re)sizing of a viewport.

fn (RenderSceneBuffersExtension) gd_set_fsr_sharpness #

fn (s &RenderSceneBuffersExtension) gd_set_fsr_sharpness(fsr_sharpness f64)

Implement this in GDExtension to record a new FSR sharpness value.

fn (RenderSceneBuffersExtension) gd_set_texture_mipmap_bias #

fn (s &RenderSceneBuffersExtension) gd_set_texture_mipmap_bias(texture_mipmap_bias f64)

Implement this in GDExtension to change the texture mipmap bias.

fn (RenderSceneBuffersExtension) gd_set_anisotropic_filtering_level #

fn (s &RenderSceneBuffersExtension) gd_set_anisotropic_filtering_level(anisotropic_filtering_level i64)

Implement this in GDExtension to change the anisotropic filtering level.

fn (RenderSceneBuffersExtension) gd_set_use_debanding #

fn (s &RenderSceneBuffersExtension) gd_set_use_debanding(use_debanding bool)

Implement this in GDExtension to react to the debanding flag changing.

struct RenderSceneBuffersRD #

struct RenderSceneBuffersRD {
	RenderSceneBuffers
}

Render scene buffer implementation for the RenderingDevice based renderers.

fn (RenderSceneBuffersRD) to_variant #

fn (s &RenderSceneBuffersRD) to_variant() Variant

fn (RenderSceneBuffersRD) from_variant #

fn (mut s RenderSceneBuffersRD) from_variant(variant &Variant)

fn (RenderSceneBuffersRD) has_texture #

fn (s &RenderSceneBuffersRD) has_texture(context string, name string) bool

Returns true if a cached texture exists for this name.

fn (RenderSceneBuffersRD) create_texture #

fn (s &RenderSceneBuffersRD) create_texture(context string, name string, data_format RenderingDeviceDataFormat, usage_bits i64, texture_samples RenderingDeviceTextureSamples, size Vector2i, layers i64, mipmaps i64, unique bool, discardable bool) RID

Create a new texture with the given definition and cache this under the given name. Will return the existing texture if it already exists.

fn (RenderSceneBuffersRD) create_texture_from_format #

fn (s &RenderSceneBuffersRD) create_texture_from_format(context string, name string, format RDTextureFormat, view RDTextureView, unique bool) RID

Create a new texture using the given format and view and cache this under the given name. Will return the existing texture if it already exists.

fn (RenderSceneBuffersRD) create_texture_view #

fn (s &RenderSceneBuffersRD) create_texture_view(context string, name string, view_name string, view RDTextureView) RID

Create a new texture view for an existing texture and cache this under the given [param view_name]. Will return the existing texture view if it already exists. Will error if the source texture doesn't exist.

fn (RenderSceneBuffersRD) get_texture #

fn (s &RenderSceneBuffersRD) get_texture(context string, name string) RID

Returns a cached texture with this name.

fn (RenderSceneBuffersRD) get_texture_format #

fn (s &RenderSceneBuffersRD) get_texture_format(context string, name string) RDTextureFormat

Returns the texture format information with which a cached texture was created.

fn (RenderSceneBuffersRD) get_texture_slice #

fn (s &RenderSceneBuffersRD) get_texture_slice(context string, name string, layer i64, mipmap i64, layers i64, mipmaps i64) RID

Returns a specific slice (layer or mipmap) for a cached texture.

fn (RenderSceneBuffersRD) get_texture_slice_view #

fn (s &RenderSceneBuffersRD) get_texture_slice_view(context string, name string, layer i64, mipmap i64, layers i64, mipmaps i64, view RDTextureView) RID

Returns a specific view of a slice (layer or mipmap) for a cached texture.

fn (RenderSceneBuffersRD) get_texture_slice_size #

fn (s &RenderSceneBuffersRD) get_texture_slice_size(context string, name string, mipmap i64) Vector2i

Returns the texture size of a given slice of a cached texture.

fn (RenderSceneBuffersRD) clear_context #

fn (s &RenderSceneBuffersRD) clear_context(context string)

Frees all buffers related to this context.

fn (RenderSceneBuffersRD) get_color_texture #

fn (s &RenderSceneBuffersRD) get_color_texture(cfg RenderSceneBuffersRD_get_color_texture_Cfg) RID

Returns the color texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. If [param msaa] is true and MSAA is enabled, this returns the MSAA variant of the buffer.

fn (RenderSceneBuffersRD) get_color_layer #

fn (s &RenderSceneBuffersRD) get_color_layer(layer i64, cfg RenderSceneBuffersRD_get_color_layer_Cfg) RID

Returns the specified layer from the color texture we are rendering 3D content to. If [param msaa] is true and MSAA is enabled, this returns the MSAA variant of the buffer.

fn (RenderSceneBuffersRD) get_depth_texture #

fn (s &RenderSceneBuffersRD) get_depth_texture(cfg RenderSceneBuffersRD_get_depth_texture_Cfg) RID

Returns the depth texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. If [param msaa] is true and MSAA is enabled, this returns the MSAA variant of the buffer.

fn (RenderSceneBuffersRD) get_depth_layer #

fn (s &RenderSceneBuffersRD) get_depth_layer(layer i64, cfg RenderSceneBuffersRD_get_depth_layer_Cfg) RID

Returns the specified layer from the depth texture we are rendering 3D content to. If [param msaa] is true and MSAA is enabled, this returns the MSAA variant of the buffer.

fn (RenderSceneBuffersRD) get_velocity_texture #

fn (s &RenderSceneBuffersRD) get_velocity_texture(cfg RenderSceneBuffersRD_get_velocity_texture_Cfg) RID

Returns the velocity texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. If [param msaa] is [b]true[/b] and MSAA is enabled, this returns the MSAA variant of the buffer.

fn (RenderSceneBuffersRD) get_velocity_layer #

fn (s &RenderSceneBuffersRD) get_velocity_layer(layer i64, cfg RenderSceneBuffersRD_get_velocity_layer_Cfg) RID

Returns the specified layer from the velocity texture we are rendering 3D content to.

fn (RenderSceneBuffersRD) get_render_target #

fn (s &RenderSceneBuffersRD) get_render_target() RID

Returns the render target associated with this buffers object.

fn (RenderSceneBuffersRD) get_view_count #

fn (s &RenderSceneBuffersRD) get_view_count() i64

Returns the view count for the associated viewport.

fn (RenderSceneBuffersRD) get_internal_size #

fn (s &RenderSceneBuffersRD) get_internal_size() Vector2i

Returns the internal size of the render buffer (size before upscaling) with which textures are created by default.

fn (RenderSceneBuffersRD) get_target_size #

fn (s &RenderSceneBuffersRD) get_target_size() Vector2i

Returns the target size of the render buffer (size after upscaling).

fn (RenderSceneBuffersRD) get_scaling_3d_mode #

fn (s &RenderSceneBuffersRD) get_scaling_3d_mode() RenderingServerViewportScaling3DMode

Returns the scaling mode used for upscaling.

fn (RenderSceneBuffersRD) get_fsr_sharpness #

fn (s &RenderSceneBuffersRD) get_fsr_sharpness() f64

Returns the FSR sharpness value used while rendering the 3D content (if [method get_scaling_3d_mode] is an FSR mode).

fn (RenderSceneBuffersRD) get_msaa_3d #

fn (s &RenderSceneBuffersRD) get_msaa_3d() RenderingServerViewportMSAA

Returns the applied 3D MSAA mode for this viewport.

fn (RenderSceneBuffersRD) get_texture_samples #

fn (s &RenderSceneBuffersRD) get_texture_samples() RenderingDeviceTextureSamples

Returns the number of MSAA samples used.

fn (RenderSceneBuffersRD) get_screen_space_aa #

fn (s &RenderSceneBuffersRD) get_screen_space_aa() RenderingServerViewportScreenSpaceAA

Returns the screen-space antialiasing method applied.

fn (RenderSceneBuffersRD) get_use_taa #

fn (s &RenderSceneBuffersRD) get_use_taa() bool

Returns true if TAA is enabled.

fn (RenderSceneBuffersRD) get_use_debanding #

fn (s &RenderSceneBuffersRD) get_use_debanding() bool

Returns true if debanding is enabled.

struct RenderSceneBuffersRD_get_color_layer_Cfg #

@[params]
struct RenderSceneBuffersRD_get_color_layer_Cfg {
pub:
	msaa bool
}

Optional parameters for RenderSceneBuffersRD#get_color_layer

struct RenderSceneBuffersRD_get_color_texture_Cfg #

@[params]
struct RenderSceneBuffersRD_get_color_texture_Cfg {
pub:
	msaa bool
}

Optional parameters for RenderSceneBuffersRD#get_color_texture

struct RenderSceneBuffersRD_get_depth_layer_Cfg #

@[params]
struct RenderSceneBuffersRD_get_depth_layer_Cfg {
pub:
	msaa bool
}

Optional parameters for RenderSceneBuffersRD#get_depth_layer

struct RenderSceneBuffersRD_get_depth_texture_Cfg #

@[params]
struct RenderSceneBuffersRD_get_depth_texture_Cfg {
pub:
	msaa bool
}

Optional parameters for RenderSceneBuffersRD#get_depth_texture

struct RenderSceneBuffersRD_get_velocity_layer_Cfg #

@[params]
struct RenderSceneBuffersRD_get_velocity_layer_Cfg {
pub:
	msaa bool
}

Optional parameters for RenderSceneBuffersRD#get_velocity_layer

struct RenderSceneBuffersRD_get_velocity_texture_Cfg #

@[params]
struct RenderSceneBuffersRD_get_velocity_texture_Cfg {
pub:
	msaa bool
}

Optional parameters for RenderSceneBuffersRD#get_velocity_texture

struct RenderSceneData #

struct RenderSceneData {
	Object
}

Abstract render data object, holds scene data related to rendering a single frame of a viewport.

fn (RenderSceneData) to_variant #

fn (s &RenderSceneData) to_variant() Variant

fn (RenderSceneData) from_variant #

fn (mut s RenderSceneData) from_variant(variant &Variant)

fn (RenderSceneData) get_cam_transform #

fn (s &RenderSceneData) get_cam_transform() Transform3D

Returns the camera transform used to render this frame. [b]Note:[/b] If more than one view is rendered, this will return a centered transform.

fn (RenderSceneData) get_cam_projection #

fn (s &RenderSceneData) get_cam_projection() Projection

Returns the camera projection used to render this frame. [b]Note:[/b] If more than one view is rendered, this will return a combined projection.

fn (RenderSceneData) get_view_count #

fn (s &RenderSceneData) get_view_count() i64

Returns the number of views being rendered.

fn (RenderSceneData) get_view_eye_offset #

fn (s &RenderSceneData) get_view_eye_offset(view i64) Vector3

Returns the eye offset per view used to render this frame. This is the offset between our camera transform and the eye transform.

fn (RenderSceneData) get_view_projection #

fn (s &RenderSceneData) get_view_projection(view i64) Projection

Returns the view projection per view used to render this frame. [b]Note:[/b] If a single view is rendered, this returns the camera projection. If more than one view is rendered, this will return a projection for the given view including the eye offset.

fn (RenderSceneData) get_uniform_buffer #

fn (s &RenderSceneData) get_uniform_buffer() RID

Return the [RID] of the uniform buffer containing the scene data as a UBO.

struct RenderSceneDataExtension #

struct RenderSceneDataExtension {
	RenderSceneData
}

This class allows for a RenderSceneData implementation to be made in GDExtension.

fn (RenderSceneDataExtension) to_variant #

fn (s &RenderSceneDataExtension) to_variant() Variant

fn (RenderSceneDataExtension) from_variant #

fn (mut s RenderSceneDataExtension) from_variant(variant &Variant)

fn (RenderSceneDataExtension) gd_get_cam_transform #

fn (s &RenderSceneDataExtension) gd_get_cam_transform() Transform3D

Implement this in GDExtension to return the camera [Transform3D].

fn (RenderSceneDataExtension) gd_get_cam_projection #

fn (s &RenderSceneDataExtension) gd_get_cam_projection() Projection

Implement this in GDExtension to return the camera [Projection].

fn (RenderSceneDataExtension) gd_get_view_count #

fn (s &RenderSceneDataExtension) gd_get_view_count() i64

Implement this in GDExtension to return the view count.

fn (RenderSceneDataExtension) gd_get_view_eye_offset #

fn (s &RenderSceneDataExtension) gd_get_view_eye_offset(view i64) Vector3

Implement this in GDExtension to return the eye offset for the given [param view].

fn (RenderSceneDataExtension) gd_get_view_projection #

fn (s &RenderSceneDataExtension) gd_get_view_projection(view i64) Projection

Implement this in GDExtension to return the view [Projection] for the given [param view].

fn (RenderSceneDataExtension) gd_get_uniform_buffer #

fn (s &RenderSceneDataExtension) gd_get_uniform_buffer() RID

Implement this in GDExtension to return the [RID] of the uniform buffer containing the scene data as a UBO.

struct RenderSceneDataRD #

struct RenderSceneDataRD {
	RenderSceneData
}

Render scene data implementation for the RenderingDevice based renderers.

fn (RenderSceneDataRD) to_variant #

fn (s &RenderSceneDataRD) to_variant() Variant

fn (RenderSceneDataRD) from_variant #

fn (mut s RenderSceneDataRD) from_variant(variant &Variant)

struct RenderingDevice #

struct RenderingDevice {
	Object
}

Abstraction for working with modern low-level graphics APIs.

fn (RenderingDevice) to_variant #

fn (s &RenderingDevice) to_variant() Variant

fn (RenderingDevice) from_variant #

fn (mut s RenderingDevice) from_variant(variant &Variant)

fn (RenderingDevice) texture_create #

fn (s &RenderingDevice) texture_create(format RDTextureFormat, view RDTextureView, cfg RenderingDevice_texture_create_Cfg) RID

Creates a new texture. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. [b]Note:[/b] [param data] takes an [Array] of [PackedByteArray]s. For [constant TEXTURE_TYPE_1D], [constant TEXTURE_TYPE_2D], and [constant TEXTURE_TYPE_3D] types, this array should only have one element, a [PackedByteArray] containing all the data for the texture. For _ARRAY and _CUBE types, the length should be the same as the number of [member RDTextureFormat.array_layers] in [param format]. [b]Note:[/b] Not to be confused with [method RenderingServer.texture_2d_create], which creates the Godot-specific [Texture2D] resource as opposed to the graphics API's own texture type.

fn (RenderingDevice) texture_create_shared #

fn (s &RenderingDevice) texture_create_shared(view RDTextureView, with_texture RID) RID

Creates a shared texture using the specified [param view] and the texture information from [param with_texture].

fn (RenderingDevice) texture_create_shared_from_slice #

fn (s &RenderingDevice) texture_create_shared_from_slice(view RDTextureView, with_texture RID, layer i64, mipmap i64, cfg RenderingDevice_texture_create_shared_from_slice_Cfg) RID

Creates a shared texture using the specified [param view] and the texture information from [param with_texture]'s [param layer] and [param mipmap]. The number of included mipmaps from the original texture can be controlled using the [param mipmaps] parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use [method texture_create_shared]. For 2D textures (which only have one layer), [param layer] must be 0. [b]Note:[/b] Layer slicing is only supported for 2D texture arrays, not 3D textures or cubemaps.

fn (RenderingDevice) texture_create_from_extension #

fn (s &RenderingDevice) texture_create_from_extension(gd_type RenderingDeviceTextureType, format RenderingDeviceDataFormat, samples RenderingDeviceTextureSamples, usage_flags RenderingDeviceTextureUsageBits, image i64, width i64, height i64, depth i64, layers i64, cfg RenderingDevice_texture_create_from_extension_Cfg) RID

Returns an RID for an existing [param image] (VkImage) with the given [param type], [param format], [param samples], [param usage_flags], [param width], [param height], [param depth], [param layers], and [param mipmaps]. This can be used to allow Godot to render onto foreign images.

fn (RenderingDevice) texture_update #

fn (s &RenderingDevice) texture_update(texture RID, layer i64, data PackedByteArray) GDError

Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), [param layer] must be 0. Returns [constant @GlobalScope.OK] if the update was successful, [constant @GlobalScope.ERR_INVALID_PARAMETER] otherwise. [b]Note:[/b] Updating textures is forbidden during creation of a draw or compute list. [b]Note:[/b] The existing [param texture] can't be updated while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to update this texture. [b]Note:[/b] The existing [param texture] requires the [constant TEXTURE_USAGE_CAN_UPDATE_BIT] to be updatable.

fn (RenderingDevice) texture_get_data #

fn (s &RenderingDevice) texture_get_data(texture RID, layer i64) PackedByteArray

Returns the [param texture] data for the specified [param layer] as raw binary data. For 2D textures (which only have one layer), [param layer] must be 0. [b]Note:[/b] [param texture] can't be retrieved while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to retrieve this texture. Otherwise, an error is printed and a empty [PackedByteArray] is returned. [b]Note:[/b] [param texture] requires the [constant TEXTURE_USAGE_CAN_COPY_FROM_BIT] to be retrieved. Otherwise, an error is printed and a empty [PackedByteArray] is returned. [b]Note:[/b] This method will block the GPU from working until the data is retrieved. Refer to [method texture_get_data_async] for an alternative that returns the data in more performant way.

fn (RenderingDevice) texture_get_data_async #

fn (s &RenderingDevice) texture_get_data_async(texture RID, layer i64, callback Callable) GDError

Asynchronous version of [method texture_get_data]. RenderingDevice will call [param callback] in a certain amount of frames with the data the texture had at the time of the request. [b]Note:[/b] At the moment, the delay corresponds to the amount of frames specified by [member ProjectSettings.rendering/rendering_device/vsync/frame_queue_size]. [b]Note:[/b] Downloading large textures can have a prohibitive cost for real-time even when using the asynchronous method due to hardware bandwidth limitations. When dealing with large resources, you can adjust settings such as [member ProjectSettings.rendering/rendering_device/staging_buffer/texture_download_region_size_px] and [member ProjectSettings.rendering/rendering_device/staging_buffer/block_size_kb] to improve the transfer speed at the cost of extra memory.

func _texture_get_data_callback(array):
value = array.decode_u32(0)

...

rd.texture_get_data_async(texture, 0, _texture_get_data_callback)

fn (RenderingDevice) texture_is_format_supported_for_usage #

fn (s &RenderingDevice) texture_is_format_supported_for_usage(format RenderingDeviceDataFormat, usage_flags RenderingDeviceTextureUsageBits) bool

Returns true if the specified [param format] is supported for the given [param usage_flags], false otherwise.

fn (RenderingDevice) texture_is_shared #

fn (s &RenderingDevice) texture_is_shared(texture RID) bool

Returns true if the [param texture] is shared, false otherwise. See [RDTextureView].

fn (RenderingDevice) texture_is_valid #

fn (s &RenderingDevice) texture_is_valid(texture RID) bool

Returns true if the [param texture] is valid, false otherwise.

fn (RenderingDevice) texture_set_discardable #

fn (s &RenderingDevice) texture_set_discardable(texture RID, discardable bool)

Updates the discardable property of [param texture]. If a texture is discardable, its contents do not need to be preserved between frames. This flag is only relevant when the texture is used as target in a draw list. This information is used by [RenderingDevice] to figure out if a texture's contents can be discarded, eliminating unnecessary writes to memory and boosting performance.

fn (RenderingDevice) texture_is_discardable #

fn (s &RenderingDevice) texture_is_discardable(texture RID) bool

Returns true if the [param texture] is discardable, false otherwise. See [RDTextureFormat] or [method texture_set_discardable].

fn (RenderingDevice) texture_copy #

fn (s &RenderingDevice) texture_copy(from_texture RID, to_texture RID, from_pos Vector3, to_pos Vector3, size Vector3, src_mipmap i64, dst_mipmap i64, src_layer i64, dst_layer i64) GDError

Copies the [param from_texture] to [param to_texture] with the specified [param from_pos], [param to_pos] and [param size] coordinates. The Z axis of the [param from_pos], [param to_pos] and [param size] must be 0 for 2-dimensional textures. Source and destination mipmaps/layers must also be specified, with these parameters being 0 for textures without mipmaps or single-layer textures. Returns [constant @GlobalScope.OK] if the texture copy was successful or [constant @GlobalScope.ERR_INVALID_PARAMETER] otherwise. [b]Note:[/b] [param from_texture] texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to copy this texture. [b]Note:[/b] [param from_texture] texture requires the [constant TEXTURE_USAGE_CAN_COPY_FROM_BIT] to be retrieved. [b]Note:[/b] [param to_texture] can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to copy this texture. [b]Note:[/b] [param to_texture] requires the [constant TEXTURE_USAGE_CAN_COPY_TO_BIT] to be retrieved. [b]Note:[/b] [param from_texture] and [param to_texture] must be of the same type (color or depth).

fn (RenderingDevice) texture_clear #

fn (s &RenderingDevice) texture_clear(texture RID, color Color, base_mipmap i64, mipmap_count i64, base_layer i64, layer_count i64) GDError

Clears the specified [param texture] by replacing all of its pixels with the specified [param color]. [param base_mipmap] and [param mipmap_count] determine which mipmaps of the texture are affected by this clear operation, while [param base_layer] and [param layer_count] determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design), [param base_layer] must be 0 and [param layer_count] must be 1. [b]Note:[/b] [param texture] can't be cleared while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to clear this texture.

fn (RenderingDevice) texture_resolve_multisample #

fn (s &RenderingDevice) texture_resolve_multisample(from_texture RID, to_texture RID) GDError

Resolves the [param from_texture] texture onto [param to_texture] with multisample antialiasing enabled. This must be used when rendering a framebuffer for MSAA to work. Returns [constant @GlobalScope.OK] if successful, [constant @GlobalScope.ERR_INVALID_PARAMETER] otherwise. [b]Note:[/b] [param from_texture] and [param to_texture] textures must have the same dimension, format and type (color or depth). [b]Note:[/b] [param from_texture] can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to resolve this texture. [b]Note:[/b] [param from_texture] requires the [constant TEXTURE_USAGE_CAN_COPY_FROM_BIT] to be retrieved. [b]Note:[/b] [param from_texture] must be multisampled and must also be 2D (or a slice of a 3D/cubemap texture). [b]Note:[/b] [param to_texture] can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to resolve this texture. [b]Note:[/b] [param to_texture] texture requires the [constant TEXTURE_USAGE_CAN_COPY_TO_BIT] to be retrieved. [b]Note:[/b] [param to_texture] texture must [b]not[/b] be multisampled and must also be 2D (or a slice of a 3D/cubemap texture).

fn (RenderingDevice) texture_get_format #

fn (s &RenderingDevice) texture_get_format(texture RID) RDTextureFormat

Returns the data format used to create this texture.

fn (RenderingDevice) texture_get_native_handle #

fn (s &RenderingDevice) texture_get_native_handle(texture RID) i64

Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. [b]Note:[/b] This function returns a uint64_t which internally maps to a GLuint (OpenGL) or VkImage (Vulkan).

fn (RenderingDevice) framebuffer_format_create #

fn (s &RenderingDevice) framebuffer_format_create(attachments Array, cfg RenderingDevice_framebuffer_format_create_Cfg) i64

Creates a new framebuffer format with the specified [param attachments] and [param view_count]. Returns the new framebuffer's unique framebuffer format ID. If [param view_count] is greater than or equal to 2, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension.

fn (RenderingDevice) framebuffer_format_create_multipass #

fn (s &RenderingDevice) framebuffer_format_create_multipass(attachments Array, passes Array, cfg RenderingDevice_framebuffer_format_create_multipass_Cfg) i64

Creates a multipass framebuffer format with the specified [param attachments], [param passes] and [param view_count] and returns its ID. If [param view_count] is greater than or equal to 2, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension.

fn (RenderingDevice) framebuffer_format_create_empty #

fn (s &RenderingDevice) framebuffer_format_create_empty(cfg RenderingDevice_framebuffer_format_create_empty_Cfg) i64

Creates a new empty framebuffer format with the specified number of [param samples] and returns its ID.

fn (RenderingDevice) framebuffer_format_get_texture_samples #

fn (s &RenderingDevice) framebuffer_format_get_texture_samples(format i64, cfg RenderingDevice_framebuffer_format_get_texture_samples_Cfg) RenderingDeviceTextureSamples

Returns the number of texture samples used for the given framebuffer [param format] ID (returned by [method framebuffer_get_format]).

fn (RenderingDevice) framebuffer_create #

fn (s &RenderingDevice) framebuffer_create(textures Array, cfg RenderingDevice_framebuffer_create_Cfg) RID

Creates a new framebuffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) framebuffer_create_multipass #

fn (s &RenderingDevice) framebuffer_create_multipass(textures Array, passes Array, cfg RenderingDevice_framebuffer_create_multipass_Cfg) RID

Creates a new multipass framebuffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) framebuffer_create_empty #

fn (s &RenderingDevice) framebuffer_create_empty(size Vector2i, cfg RenderingDevice_framebuffer_create_empty_Cfg) RID

Creates a new empty framebuffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) framebuffer_get_format #

fn (s &RenderingDevice) framebuffer_get_format(framebuffer RID) i64

Returns the format ID of the framebuffer specified by the [param framebuffer] RID. This ID is guaranteed to be unique for the same formats and does not need to be freed.

fn (RenderingDevice) framebuffer_is_valid #

fn (s &RenderingDevice) framebuffer_is_valid(framebuffer RID) bool

Returns true if the framebuffer specified by the [param framebuffer] RID is valid, false otherwise.

fn (RenderingDevice) sampler_create #

fn (s &RenderingDevice) sampler_create(state RDSamplerState) RID

Creates a new sampler. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) sampler_is_format_supported_for_filter #

fn (s &RenderingDevice) sampler_is_format_supported_for_filter(format RenderingDeviceDataFormat, sampler_filter RenderingDeviceSamplerFilter) bool

Returns true if implementation supports using a texture of [param format] with the given [param sampler_filter].

fn (RenderingDevice) vertex_buffer_create #

fn (s &RenderingDevice) vertex_buffer_create(size_bytes i64, cfg RenderingDevice_vertex_buffer_create_Cfg) RID

Creates a new vertex buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) vertex_format_create #

fn (s &RenderingDevice) vertex_format_create(vertex_descriptions Array) i64

Creates a new vertex format with the specified [param vertex_descriptions]. Returns a unique vertex format ID corresponding to the newly created vertex format.

fn (RenderingDevice) vertex_array_create #

fn (s &RenderingDevice) vertex_array_create(vertex_count i64, vertex_format i64, src_buffers Array, cfg RenderingDevice_vertex_array_create_Cfg) RID

Creates a vertex array based on the specified buffers. Optionally, [param offsets] (in bytes) may be defined for each buffer.

fn (RenderingDevice) index_buffer_create #

fn (s &RenderingDevice) index_buffer_create(size_indices i64, format RenderingDeviceIndexBufferFormat, cfg RenderingDevice_index_buffer_create_Cfg) RID

Creates a new index buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) index_array_create #

fn (s &RenderingDevice) index_array_create(index_buffer RID, index_offset i64, index_count i64) RID

Creates a new index array. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) shader_compile_spirv_from_source #

fn (s &RenderingDevice) shader_compile_spirv_from_source(shader_source RDShaderSource, cfg RenderingDevice_shader_compile_spirv_from_source_Cfg) RDShaderSPIRV

Compiles a SPIR-V from the shader source code in [param shader_source] and returns the SPIR-V as a [RDShaderSPIRV]. This intermediate language shader is portable across different GPU models and driver versions, but cannot be run directly by GPUs until compiled into a binary shader using [method shader_compile_binary_from_spirv]. If [param allow_cache] is true, make use of the shader cache generated by Godot. This avoids a potentially lengthy shader compilation step if the shader is already in cache. If [param allow_cache] is false, Godot's shader cache is ignored and the shader will always be recompiled.

fn (RenderingDevice) shader_compile_binary_from_spirv #

fn (s &RenderingDevice) shader_compile_binary_from_spirv(spirv_data RDShaderSPIRV, cfg RenderingDevice_shader_compile_binary_from_spirv_Cfg) PackedByteArray

Compiles a binary shader from [param spirv_data] and returns the compiled binary data as a [PackedByteArray]. This compiled shader is specific to the GPU model and driver version used; it will not work on different GPU models or even different driver versions. See also [method shader_compile_spirv_from_source]. [param name] is an optional human-readable name that can be given to the compiled shader for organizational purposes.

fn (RenderingDevice) shader_create_from_spirv #

fn (s &RenderingDevice) shader_create_from_spirv(spirv_data RDShaderSPIRV, cfg RenderingDevice_shader_create_from_spirv_Cfg) RID

Creates a new shader instance from SPIR-V intermediate code. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. See also [method shader_compile_spirv_from_source] and [method shader_create_from_bytecode].

fn (RenderingDevice) shader_create_from_bytecode #

fn (s &RenderingDevice) shader_create_from_bytecode(binary_data PackedByteArray, cfg RenderingDevice_shader_create_from_bytecode_Cfg) RID

Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. See also [method shader_compile_binary_from_spirv] and [method shader_create_from_spirv].

fn (RenderingDevice) shader_create_placeholder #

fn (s &RenderingDevice) shader_create_placeholder() RID

Create a placeholder RID by allocating an RID without initializing it for use in [method shader_create_from_bytecode]. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time.

fn (RenderingDevice) shader_get_vertex_input_attribute_mask #

fn (s &RenderingDevice) shader_get_vertex_input_attribute_mask(shader RID) i64

Returns the internal vertex input mask. Internally, the vertex input mask is an unsigned integer consisting of the locations (specified in GLSL via. layout(location = ...)) of the input variables (specified in GLSL by the in keyword).

fn (RenderingDevice) uniform_buffer_create #

fn (s &RenderingDevice) uniform_buffer_create(size_bytes i64, cfg RenderingDevice_uniform_buffer_create_Cfg) RID

Creates a new uniform buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) storage_buffer_create #

fn (s &RenderingDevice) storage_buffer_create(size_bytes i64, cfg RenderingDevice_storage_buffer_create_Cfg) RID

Creates a [url=https://vkguide.dev/docs/chapter-4/storage_buffers/]storage buffer[/url] with the specified [param data] and [param usage]. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) texture_buffer_create #

fn (s &RenderingDevice) texture_buffer_create(size_bytes i64, format RenderingDeviceDataFormat, cfg RenderingDevice_texture_buffer_create_Cfg) RID

Creates a new texture buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) uniform_set_create #

fn (s &RenderingDevice) uniform_set_create(uniforms Array, shader RID, shader_set i64) RID

Creates a new uniform set. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) uniform_set_is_valid #

fn (s &RenderingDevice) uniform_set_is_valid(uniform_set RID) bool

Checks if the [param uniform_set] is valid, i.e. is owned.

fn (RenderingDevice) buffer_copy #

fn (s &RenderingDevice) buffer_copy(src_buffer RID, dst_buffer RID, src_offset i64, dst_offset i64, size i64) GDError

Copies [param size] bytes from the [param src_buffer] at [param src_offset] into [param dst_buffer] at [param dst_offset]. Prints an error if:- [param size] exceeds the size of either [param src_buffer] or [param dst_buffer] at their corresponding offsets

  • a draw list is currently active (created by [method draw_list_begin])
  • a compute list is currently active (created by [method compute_list_begin])

fn (RenderingDevice) buffer_update #

fn (s &RenderingDevice) buffer_update(buffer RID, offset i64, size_bytes i64, data PackedByteArray) GDError

Updates a region of [param size_bytes] bytes, starting at [param offset], in the buffer, with the specified [param data]. Prints an error if:- the region specified by [param offset] + [param size_bytes] exceeds the buffer

  • a draw list is currently active (created by [method draw_list_begin])
  • a compute list is currently active (created by [method compute_list_begin])

fn (RenderingDevice) buffer_clear #

fn (s &RenderingDevice) buffer_clear(buffer RID, offset i64, size_bytes i64) GDError

Clears the contents of the [param buffer], clearing [param size_bytes] bytes, starting at [param offset]. Prints an error if:- the size isn't a multiple of four

  • the region specified by [param offset] + [param size_bytes] exceeds the buffer
  • a draw list is currently active (created by [method draw_list_begin])
  • a compute list is currently active (created by [method compute_list_begin])

fn (RenderingDevice) buffer_get_data #

fn (s &RenderingDevice) buffer_get_data(buffer RID, cfg RenderingDevice_buffer_get_data_Cfg) PackedByteArray

Returns a copy of the data of the specified [param buffer], optionally [param offset_bytes] and [param size_bytes] can be set to copy only a portion of the buffer. [b]Note:[/b] This method will block the GPU from working until the data is retrieved. Refer to [method buffer_get_data_async] for an alternative that returns the data in more performant way.

fn (RenderingDevice) buffer_get_data_async #

fn (s &RenderingDevice) buffer_get_data_async(buffer RID, callback Callable, cfg RenderingDevice_buffer_get_data_async_Cfg) GDError

Asynchronous version of [method buffer_get_data]. RenderingDevice will call [param callback] in a certain amount of frames with the data the buffer had at the time of the request. [b]Note:[/b] At the moment, the delay corresponds to the amount of frames specified by [member ProjectSettings.rendering/rendering_device/vsync/frame_queue_size]. [b]Note:[/b] Downloading large buffers can have a prohibitive cost for real-time even when using the asynchronous method due to hardware bandwidth limitations. When dealing with large resources, you can adjust settings such as [member ProjectSettings.rendering/rendering_device/staging_buffer/block_size_kb] to improve the transfer speed at the cost of extra memory.

func _buffer_get_data_callback(array):
value = array.decode_u32(0)

...

rd.buffer_get_data_async(buffer, _buffer_get_data_callback)

fn (RenderingDevice) buffer_get_device_address #

fn (s &RenderingDevice) buffer_get_device_address(buffer RID) i64

Returns the address of the given [param buffer] which can be passed to shaders in any way to access underlying data. Buffer must have been created with this feature enabled. [b]Note:[/b] You must check that the GPU supports this functionality by calling [method has_feature] with [constant SUPPORTS_BUFFER_DEVICE_ADDRESS] as a parameter.

fn (RenderingDevice) render_pipeline_create #

fn (s &RenderingDevice) render_pipeline_create(shader RID, framebuffer_format i64, vertex_format i64, primitive RenderingDeviceRenderPrimitive, rasterization_state RDPipelineRasterizationState, multisample_state RDPipelineMultisampleState, stencil_state RDPipelineDepthStencilState, color_blend_state RDPipelineColorBlendState, cfg RenderingDevice_render_pipeline_create_Cfg) RID

Creates a new render pipeline. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) render_pipeline_is_valid #

fn (s &RenderingDevice) render_pipeline_is_valid(render_pipeline RID) bool

Returns true if the render pipeline specified by the [param render_pipeline] RID is valid, false otherwise.

fn (RenderingDevice) compute_pipeline_create #

fn (s &RenderingDevice) compute_pipeline_create(shader RID, cfg RenderingDevice_compute_pipeline_create_Cfg) RID

Creates a new compute pipeline. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method.

fn (RenderingDevice) compute_pipeline_is_valid #

fn (s &RenderingDevice) compute_pipeline_is_valid(compute_pipeline RID) bool

Returns true if the compute pipeline specified by the [param compute_pipeline] RID is valid, false otherwise.

fn (RenderingDevice) screen_get_width #

fn (s &RenderingDevice) screen_get_width(cfg RenderingDevice_screen_get_width_Cfg) i64

Returns the window width matching the graphics API context for the given window ID (in pixels). Despite the parameter being named [param screen], this returns the [i]window[/i] size. See also [method screen_get_height]. [b]Note:[/b] Only the main [RenderingDevice] returned by [method RenderingServer.get_rendering_device] has a width. If called on a local [RenderingDevice], this method prints an error and returns [constant INVALID_ID].

fn (RenderingDevice) screen_get_height #

fn (s &RenderingDevice) screen_get_height(cfg RenderingDevice_screen_get_height_Cfg) i64

Returns the window height matching the graphics API context for the given window ID (in pixels). Despite the parameter being named [param screen], this returns the [i]window[/i] size. See also [method screen_get_width]. [b]Note:[/b] Only the main [RenderingDevice] returned by [method RenderingServer.get_rendering_device] has a height. If called on a local [RenderingDevice], this method prints an error and returns [constant INVALID_ID].

fn (RenderingDevice) screen_get_framebuffer_format #

fn (s &RenderingDevice) screen_get_framebuffer_format(cfg RenderingDevice_screen_get_framebuffer_format_Cfg) i64

Returns the framebuffer format of the given screen. [b]Note:[/b] Only the main [RenderingDevice] returned by [method RenderingServer.get_rendering_device] has a format. If called on a local [RenderingDevice], this method prints an error and returns [constant INVALID_ID].

fn (RenderingDevice) draw_list_begin_for_screen #

fn (s &RenderingDevice) draw_list_begin_for_screen(cfg RenderingDevice_draw_list_begin_for_screen_Cfg) i64

High-level variant of [method draw_list_begin], with the parameters automatically being adjusted for drawing onto the window specified by the [param screen] ID. [b]Note:[/b] Cannot be used with local RenderingDevices, as these don't have a screen. If called on a local RenderingDevice, [method draw_list_begin_for_screen] returns [constant INVALID_ID].

fn (RenderingDevice) draw_list_begin #

fn (s &RenderingDevice) draw_list_begin(framebuffer RID, cfg RenderingDevice_draw_list_begin_Cfg) i64

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using [method draw_list_end]. A simple drawing operation might look like this (code is not a complete example):

var rd = RenderingDevice.new()
var clear_colors = PackedColorArray([Color(0, 0, 0, 0), Color(0, 0, 0, 0), Color(0, 0, 0, 0)])
var draw_list = rd.draw_list_begin(framebuffers[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS)

##rd.draw_list_bind_render_pipeline(draw_list, raster_pipeline)
rd.draw_list_bind_uniform_set(draw_list, raster_base_uniform, 0)
rd.draw_list_set_push_constant(draw_list, raster_push_constant, raster_push_constant.size())
rd.draw_list_draw(draw_list, false, 1, slice_triangle_count[i] * 3)
##rd.draw_list_bind_render_pipeline(draw_list, raster_pipeline_wire)
rd.draw_list_bind_uniform_set(draw_list, raster_base_uniform, 0)
rd.draw_list_set_push_constant(draw_list, raster_push_constant, raster_push_constant.size())
rd.draw_list_draw(draw_list, false, 1, slice_triangle_count[i] * 3)

rd.draw_list_end()

The [param draw_flags] indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See [RDTextureFormat] or [method texture_set_discardable]. The [param breadcrumb] parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Godot is built in dev or debug mode; when the GPU crashes Godot will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use [enum BreadcrumbMarker] enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)

fn (RenderingDevice) draw_list_begin_split #

fn (s &RenderingDevice) draw_list_begin_split(framebuffer RID, splits i64, initial_color_action RenderingDeviceInitialAction, final_color_action RenderingDeviceFinalAction, initial_depth_action RenderingDeviceInitialAction, final_depth_action RenderingDeviceFinalAction, cfg RenderingDevice_draw_list_begin_split_Cfg) PackedInt64Array

This method does nothing and always returns an empty [PackedInt64Array].

fn (RenderingDevice) draw_list_set_blend_constants #

fn (s &RenderingDevice) draw_list_set_blend_constants(draw_list i64, color Color)

Sets blend constants for the specified [param draw_list] to [param color]. Blend constants are used only if the graphics pipeline is created with [constant DYNAMIC_STATE_BLEND_CONSTANTS] flag set.

fn (RenderingDevice) draw_list_bind_render_pipeline #

fn (s &RenderingDevice) draw_list_bind_render_pipeline(draw_list i64, render_pipeline RID)

Binds [param render_pipeline] to the specified [param draw_list].

fn (RenderingDevice) draw_list_bind_uniform_set #

fn (s &RenderingDevice) draw_list_bind_uniform_set(draw_list i64, uniform_set RID, set_index i64)

Binds [param uniform_set] to the specified [param draw_list]. A [param set_index] must also be specified, which is an identifier starting from 0 that must match the one expected by the draw list.

fn (RenderingDevice) draw_list_bind_vertex_array #

fn (s &RenderingDevice) draw_list_bind_vertex_array(draw_list i64, vertex_array RID)

Binds [param vertex_array] to the specified [param draw_list].

fn (RenderingDevice) draw_list_bind_index_array #

fn (s &RenderingDevice) draw_list_bind_index_array(draw_list i64, index_array RID)

Binds [param index_array] to the specified [param draw_list].

fn (RenderingDevice) draw_list_set_push_constant #

fn (s &RenderingDevice) draw_list_set_push_constant(draw_list i64, buffer PackedByteArray, size_bytes i64)

Sets the push constant data to [param buffer] for the specified [param draw_list]. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in [param size_bytes] (this can be obtained by calling the [method PackedByteArray.size] method on the passed [param buffer]).

fn (RenderingDevice) draw_list_draw #

fn (s &RenderingDevice) draw_list_draw(draw_list i64, use_indices bool, instances i64, cfg RenderingDevice_draw_list_draw_Cfg)

Submits [param draw_list] for rendering on the GPU. This is the raster equivalent to [method compute_list_dispatch].

fn (RenderingDevice) draw_list_draw_indirect #

fn (s &RenderingDevice) draw_list_draw_indirect(draw_list i64, use_indices bool, buffer RID, cfg RenderingDevice_draw_list_draw_indirect_Cfg)

Submits [param draw_list] for rendering on the GPU with the given parameters stored in the [param buffer] at [param offset]. Parameters being integers: vertex count, instance count, first vertex, first instance. And when using indices: index count, instance count, first index, vertex offset, first instance. Buffer must have been created with [constant STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT] flag.

fn (RenderingDevice) draw_list_enable_scissor #

fn (s &RenderingDevice) draw_list_enable_scissor(draw_list i64, cfg RenderingDevice_draw_list_enable_scissor_Cfg)

Creates a scissor rectangle and enables it for the specified [param draw_list]. Scissor rectangles are used for clipping by discarding fragments that fall outside a specified rectangular portion of the screen. See also [method draw_list_disable_scissor]. [b]Note:[/b] The specified [param rect] is automatically intersected with the screen's dimensions, which means it cannot exceed the screen's dimensions.

fn (RenderingDevice) draw_list_disable_scissor #

fn (s &RenderingDevice) draw_list_disable_scissor(draw_list i64)

Removes and disables the scissor rectangle for the specified [param draw_list]. See also [method draw_list_enable_scissor].

fn (RenderingDevice) draw_list_switch_to_next_pass #

fn (s &RenderingDevice) draw_list_switch_to_next_pass() i64

Switches to the next draw pass.

fn (RenderingDevice) draw_list_switch_to_next_pass_split #

fn (s &RenderingDevice) draw_list_switch_to_next_pass_split(splits i64) PackedInt64Array

This method does nothing and always returns an empty [PackedInt64Array].

fn (RenderingDevice) draw_list_end #

fn (s &RenderingDevice) draw_list_end()

Finishes a list of raster drawing commands created with the draw_* methods.

fn (RenderingDevice) compute_list_begin #

fn (s &RenderingDevice) compute_list_begin() i64

Starts a list of compute commands created with the compute_* methods. The returned value should be passed to other compute_list_* functions. Multiple compute lists cannot be created at the same time; you must finish the previous compute list first using [method compute_list_end]. A simple compute operation might look like this (code is not a complete example):

var rd = RenderingDevice.new()
var compute_list = rd.compute_list_begin()

rd.compute_list_bind_compute_pipeline(compute_list, compute_shader_dilate_pipeline)
rd.compute_list_bind_uniform_set(compute_list, compute_base_uniform_set, 0)
rd.compute_list_bind_uniform_set(compute_list, dilate_uniform_set, 1)

for i in atlas_slices:
rd.compute_list_set_push_constant(compute_list, push_constant, push_constant.size())
rd.compute_list_dispatch(compute_list, group_size.x, group_size.y, group_size.z)
##
rd.compute_list_end()

fn (RenderingDevice) compute_list_bind_compute_pipeline #

fn (s &RenderingDevice) compute_list_bind_compute_pipeline(compute_list i64, compute_pipeline RID)

Tells the GPU what compute pipeline to use when processing the compute list. If the shader has changed since the last time this function was called, Godot will unbind all descriptor sets and will re-bind them inside [method compute_list_dispatch].

fn (RenderingDevice) compute_list_set_push_constant #

fn (s &RenderingDevice) compute_list_set_push_constant(compute_list i64, buffer PackedByteArray, size_bytes i64)

Sets the push constant data to [param buffer] for the specified [param compute_list]. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in [param size_bytes] (this can be obtained by calling the [method PackedByteArray.size] method on the passed [param buffer]).

fn (RenderingDevice) compute_list_bind_uniform_set #

fn (s &RenderingDevice) compute_list_bind_uniform_set(compute_list i64, uniform_set RID, set_index i64)

Binds the [param uniform_set] to this [param compute_list]. Godot ensures that all textures in the uniform set have the correct Vulkan access masks. If Godot had to change access masks of textures, it will raise a Vulkan image memory barrier.

fn (RenderingDevice) compute_list_dispatch #

fn (s &RenderingDevice) compute_list_dispatch(compute_list i64, x_groups i64, y_groups i64, z_groups i64)

Submits the compute list for processing on the GPU. This is the compute equivalent to [method draw_list_draw].

fn (RenderingDevice) compute_list_dispatch_indirect #

fn (s &RenderingDevice) compute_list_dispatch_indirect(compute_list i64, buffer RID, offset i64)

Submits the compute list for processing on the GPU with the given group counts stored in the [param buffer] at [param offset]. Buffer must have been created with [constant STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT] flag.

fn (RenderingDevice) compute_list_add_barrier #

fn (s &RenderingDevice) compute_list_add_barrier(compute_list i64)

Raises a Vulkan compute barrier in the specified [param compute_list].

fn (RenderingDevice) compute_list_end #

fn (s &RenderingDevice) compute_list_end()

Finishes a list of compute commands created with the compute_* methods.

fn (RenderingDevice) free_rid #

fn (s &RenderingDevice) free_rid(rid RID)

Tries to free an object in the RenderingDevice. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingDevice directly.

fn (RenderingDevice) capture_timestamp #

fn (s &RenderingDevice) capture_timestamp(name string)

Creates a timestamp marker with the specified [param name]. This is used for performance reporting with the [method get_captured_timestamp_cpu_time], [method get_captured_timestamp_gpu_time] and [method get_captured_timestamp_name] methods.

fn (RenderingDevice) get_captured_timestamps_count #

fn (s &RenderingDevice) get_captured_timestamps_count() i64

Returns the total number of timestamps (rendering steps) available for profiling.

fn (RenderingDevice) get_captured_timestamps_frame #

fn (s &RenderingDevice) get_captured_timestamps_frame() i64

Returns the index of the last frame rendered that has rendering timestamps available for querying.

fn (RenderingDevice) get_captured_timestamp_gpu_time #

fn (s &RenderingDevice) get_captured_timestamp_gpu_time(index i64) i64

Returns the timestamp in GPU time for the rendering step specified by [param index] (in microseconds since the engine started). See also [method get_captured_timestamp_cpu_time] and [method capture_timestamp].

fn (RenderingDevice) get_captured_timestamp_cpu_time #

fn (s &RenderingDevice) get_captured_timestamp_cpu_time(index i64) i64

Returns the timestamp in CPU time for the rendering step specified by [param index] (in microseconds since the engine started). See also [method get_captured_timestamp_gpu_time] and [method capture_timestamp].

fn (RenderingDevice) get_captured_timestamp_name #

fn (s &RenderingDevice) get_captured_timestamp_name(index i64) string

Returns the timestamp's name for the rendering step specified by [param index]. See also [method capture_timestamp].

fn (RenderingDevice) has_feature #

fn (s &RenderingDevice) has_feature(feature RenderingDeviceFeatures) bool

Returns true if the [param feature] is supported by the GPU.

fn (RenderingDevice) limit_get #

fn (s &RenderingDevice) limit_get(limit RenderingDeviceLimit) i64

Returns the value of the specified [param limit]. This limit varies depending on the current graphics hardware (and sometimes the driver version). If the given limit is exceeded, rendering errors will occur. Limits for various graphics hardware can be found in the [url=https://vulkan.gpuinfo.org/]Vulkan Hardware Database[/url].

fn (RenderingDevice) get_frame_delay #

fn (s &RenderingDevice) get_frame_delay() i64

Returns the frame count kept by the graphics API. Higher values result in higher input lag, but with more consistent throughput. For the main [RenderingDevice], frames are cycled (usually 3 with triple-buffered V-Sync enabled). However, local [RenderingDevice]s only have 1 frame.

fn (RenderingDevice) submit #

fn (s &RenderingDevice) submit()

Pushes the frame setup and draw command buffers then marks the local device as currently processing (which allows calling [method sync]). [b]Note:[/b] Only available in local RenderingDevices.

fn (RenderingDevice) sync #

fn (s &RenderingDevice) sync()

Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost. [b]Note:[/b] Only available in local RenderingDevices. [b]Note:[/b] [method sync] can only be called after a [method submit].

fn (RenderingDevice) barrier #

fn (s &RenderingDevice) barrier(cfg RenderingDevice_barrier_Cfg)

This method does nothing.

fn (RenderingDevice) full_barrier #

fn (s &RenderingDevice) full_barrier()

This method does nothing.

fn (RenderingDevice) create_local_device #

fn (s &RenderingDevice) create_local_device() RenderingDevice

Create a new local [RenderingDevice]. This is most useful for performing compute operations on the GPU independently from the rest of the engine.

fn (RenderingDevice) set_resource_name #

fn (s &RenderingDevice) set_resource_name(id RID, name string)

Sets the resource name for [param id] to [param name]. This is used for debugging with third-party tools such as [url=https://renderdoc.org/]RenderDoc[/url]. The following types of resources can be named: texture, sampler, vertex buffer, index buffer, uniform buffer, texture buffer, storage buffer, uniform set buffer, shader, render pipeline and compute pipeline. Framebuffers cannot be named. Attempting to name an incompatible resource type will print an error. [b]Note:[/b] Resource names are only set when the engine runs in verbose mode ([method OS.is_stdout_verbose] = true), or when using an engine build compiled with the dev_mode=yes SCons option. The graphics driver must also support the VK_EXT_DEBUG_UTILS_EXTENSION_NAME Vulkan extension for named resources to work.

fn (RenderingDevice) draw_command_begin_label #

fn (s &RenderingDevice) draw_command_begin_label(name string, color Color)

Create a command buffer debug label region that can be displayed in third-party tools such as [url=https://renderdoc.org/]RenderDoc[/url]. All regions must be ended with a [method draw_command_end_label] call. When viewed from the linear series of submissions to a single queue, calls to [method draw_command_begin_label] and [method draw_command_end_label] must be matched and balanced. The VK_EXT_DEBUG_UTILS_EXTENSION_NAME Vulkan extension must be available and enabled for command buffer debug label region to work. See also [method draw_command_end_label].

fn (RenderingDevice) draw_command_insert_label #

fn (s &RenderingDevice) draw_command_insert_label(name string, color Color)

This method does nothing.

fn (RenderingDevice) draw_command_end_label #

fn (s &RenderingDevice) draw_command_end_label()

Ends the command buffer debug label region started by a [method draw_command_begin_label] call.

fn (RenderingDevice) get_device_vendor_name #

fn (s &RenderingDevice) get_device_vendor_name() string

Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent to [method RenderingServer.get_video_adapter_vendor]. See also [method get_device_name].

fn (RenderingDevice) get_device_name #

fn (s &RenderingDevice) get_device_name() string

Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Equivalent to [method RenderingServer.get_video_adapter_name]. See also [method get_device_vendor_name].

fn (RenderingDevice) get_device_pipeline_cache_uuid #

fn (s &RenderingDevice) get_device_pipeline_cache_uuid() string

Returns the universally unique identifier for the pipeline cache. This is used to cache shader files on disk, which avoids shader recompilations on subsequent engine runs. This UUID varies depending on the graphics card model, but also the driver version. Therefore, updating graphics drivers will invalidate the shader cache.

fn (RenderingDevice) get_memory_usage #

fn (s &RenderingDevice) get_memory_usage(gd_type RenderingDeviceMemoryType) i64

Returns the memory usage in bytes corresponding to the given [param type]. When using Vulkan, these statistics are calculated by [url=https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator]Vulkan Memory Allocator[/url].

fn (RenderingDevice) get_driver_resource #

fn (s &RenderingDevice) get_driver_resource(resource RenderingDeviceDriverResource, rid RID, index i64) i64

Returns the unique identifier of the driver [param resource] for the specified [param rid]. Some driver resource types ignore the specified [param rid]. [param index] is always ignored but must be specified anyway.

fn (RenderingDevice) get_perf_report #

fn (s &RenderingDevice) get_perf_report() string

Returns a string with a performance report from the past frame. Updates every frame.

fn (RenderingDevice) get_driver_and_device_memory_report #

fn (s &RenderingDevice) get_driver_and_device_memory_report() string

Returns string report in CSV format using the following methods:- [method get_tracked_object_name]

  • [method get_tracked_object_type_count]
  • [method get_driver_total_memory]
  • [method get_driver_allocation_count]
  • [method get_driver_memory_by_object_type]
  • [method get_driver_allocs_by_object_type]
  • [method get_device_total_memory]
  • [method get_device_allocation_count]
  • [method get_device_memory_by_object_type]
  • [method get_device_allocs_by_object_type]This is only used by Vulkan in debug builds. Godot must also be started with the --extra-gpu-memory-tracking [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].

fn (RenderingDevice) get_tracked_object_name #

fn (s &RenderingDevice) get_tracked_object_name(type_index i64) string

Returns the name of the type of object for the given [param type_index]. This value must be in range [0; get_tracked_object_type_count - 1]. If [method get_tracked_object_type_count] is 0, then type argument is ignored and always returns the same string. The return value is important because it gives meaning to the types passed to [method get_driver_memory_by_object_type], [method get_driver_allocs_by_object_type], [method get_device_memory_by_object_type], and [method get_device_allocs_by_object_type]. Examples of strings it can return (not exhaustive):- DEVICE_MEMORY

  • PIPELINE_CACHE
  • SWAPCHAIN_KHR
  • COMMAND_POOLThus if e.g. get_tracked_object_name(5) returns "COMMAND_POOL", then get_device_memory_by_object_type(5) returns the bytes used by the GPU for command pools. This is only used by Vulkan in debug builds. Godot must also be started with the --extra-gpu-memory-tracking [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].

fn (RenderingDevice) get_tracked_object_type_count #

fn (s &RenderingDevice) get_tracked_object_type_count() i64

Returns how many types of trackable objects there are. This is only used by Vulkan in debug builds. Godot must also be started with the --extra-gpu-memory-tracking [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].

fn (RenderingDevice) get_driver_total_memory #

fn (s &RenderingDevice) get_driver_total_memory() i64

Returns how much bytes the GPU driver is using for internal driver structures. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

fn (RenderingDevice) get_driver_allocation_count #

fn (s &RenderingDevice) get_driver_allocation_count() i64

Returns how many allocations the GPU driver has performed for internal driver structures. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

fn (RenderingDevice) get_driver_memory_by_object_type #

fn (s &RenderingDevice) get_driver_memory_by_object_type(gd_type i64) i64

Same as [method get_driver_total_memory] but filtered for a given object type. The type argument must be in range [0; get_tracked_object_type_count - 1]. If [method get_tracked_object_type_count] is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

fn (RenderingDevice) get_driver_allocs_by_object_type #

fn (s &RenderingDevice) get_driver_allocs_by_object_type(gd_type i64) i64

Same as [method get_driver_allocation_count] but filtered for a given object type. The type argument must be in range [0; get_tracked_object_type_count - 1]. If [method get_tracked_object_type_count] is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

fn (RenderingDevice) get_device_total_memory #

fn (s &RenderingDevice) get_device_total_memory() i64

Returns how much bytes the GPU is using. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

fn (RenderingDevice) get_device_allocation_count #

fn (s &RenderingDevice) get_device_allocation_count() i64

Returns how many allocations the GPU has performed for internal driver structures. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

fn (RenderingDevice) get_device_memory_by_object_type #

fn (s &RenderingDevice) get_device_memory_by_object_type(gd_type i64) i64

Same as [method get_device_total_memory] but filtered for a given object type. The type argument must be in range [0; get_tracked_object_type_count - 1]. If [method get_tracked_object_type_count] is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

fn (RenderingDevice) get_device_allocs_by_object_type #

fn (s &RenderingDevice) get_device_allocs_by_object_type(gd_type i64) i64

Same as [method get_device_allocation_count] but filtered for a given object type. The type argument must be in range [0; get_tracked_object_type_count - 1]. If [method get_tracked_object_type_count] is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

struct RenderingDevice_barrier_Cfg #

@[params]
struct RenderingDevice_barrier_Cfg {
pub:
	from RenderingDeviceBarrierMask
	to   RenderingDeviceBarrierMask
}

Optional parameters for RenderingDevice#barrier

struct RenderingDevice_buffer_get_data_Cfg #

@[params]
struct RenderingDevice_buffer_get_data_Cfg {
pub:
	offset_bytes i64
	size_bytes   i64
}

Optional parameters for RenderingDevice#buffer_get_data

struct RenderingDevice_buffer_get_data_async_Cfg #

@[params]
struct RenderingDevice_buffer_get_data_async_Cfg {
pub:
	offset_bytes i64
	size_bytes   i64
}

Optional parameters for RenderingDevice#buffer_get_data_async

struct RenderingDevice_compute_pipeline_create_Cfg #

@[params]
struct RenderingDevice_compute_pipeline_create_Cfg {
pub:
	specialization_constants Array
}

Optional parameters for RenderingDevice#compute_pipeline_create

struct RenderingDevice_draw_list_begin_Cfg #

@[params]
struct RenderingDevice_draw_list_begin_Cfg {
pub:
	draw_flags          RenderingDeviceDrawFlags
	clear_color_values  PackedColorArray = PackedColorArray{}
	clear_depth_value   f64              = 1.0
	clear_stencil_value i64
	region              Rect2 = Rect2{Vector2{0, 0}, Vector2{0, 0}}
	breadcrumb          i64
}

Optional parameters for RenderingDevice#draw_list_begin

struct RenderingDevice_draw_list_begin_for_screen_Cfg #

@[params]
struct RenderingDevice_draw_list_begin_for_screen_Cfg {
pub:
	screen      i64
	clear_color Color = Color{0, 0, 0, 1}
}

Optional parameters for RenderingDevice#draw_list_begin_for_screen

struct RenderingDevice_draw_list_begin_split_Cfg #

@[params]
struct RenderingDevice_draw_list_begin_split_Cfg {
pub:
	clear_color_values PackedColorArray = PackedColorArray{}
	clear_depth        f64              = 1.0
	clear_stencil      i64
	region             Rect2 = Rect2{Vector2{0, 0}, Vector2{0, 0}}
	storage_textures   Array
}

Optional parameters for RenderingDevice#draw_list_begin_split

struct RenderingDevice_draw_list_draw_Cfg #

@[params]
struct RenderingDevice_draw_list_draw_Cfg {
pub:
	procedural_vertex_count i64
}

Optional parameters for RenderingDevice#draw_list_draw

struct RenderingDevice_draw_list_draw_indirect_Cfg #

@[params]
struct RenderingDevice_draw_list_draw_indirect_Cfg {
pub:
	offset     i64
	draw_count i64 = 1
	stride     i64
}

Optional parameters for RenderingDevice#draw_list_draw_indirect

struct RenderingDevice_draw_list_enable_scissor_Cfg #

@[params]
struct RenderingDevice_draw_list_enable_scissor_Cfg {
pub:
	rect Rect2 = Rect2{Vector2{0, 0}, Vector2{0, 0}}
}

Optional parameters for RenderingDevice#draw_list_enable_scissor

struct RenderingDevice_framebuffer_create_Cfg #

@[params]
struct RenderingDevice_framebuffer_create_Cfg {
pub:
	validate_with_format i64 = -1
	view_count           i64 = 1
}

Optional parameters for RenderingDevice#framebuffer_create

struct RenderingDevice_framebuffer_create_empty_Cfg #

@[params]
struct RenderingDevice_framebuffer_create_empty_Cfg {
pub:
	samples              RenderingDeviceTextureSamples = unsafe { RenderingDeviceTextureSamples(0) }
	validate_with_format i64 = -1
}

Optional parameters for RenderingDevice#framebuffer_create_empty

struct RenderingDevice_framebuffer_create_multipass_Cfg #

@[params]
struct RenderingDevice_framebuffer_create_multipass_Cfg {
pub:
	validate_with_format i64 = -1
	view_count           i64 = 1
}

Optional parameters for RenderingDevice#framebuffer_create_multipass

struct RenderingDevice_framebuffer_format_create_Cfg #

@[params]
struct RenderingDevice_framebuffer_format_create_Cfg {
pub:
	view_count i64 = 1
}

Optional parameters for RenderingDevice#framebuffer_format_create

struct RenderingDevice_framebuffer_format_create_empty_Cfg #

@[params]
struct RenderingDevice_framebuffer_format_create_empty_Cfg {
pub:
	samples RenderingDeviceTextureSamples = unsafe { RenderingDeviceTextureSamples(0) }
}

Optional parameters for RenderingDevice#framebuffer_format_create_empty

struct RenderingDevice_framebuffer_format_create_multipass_Cfg #

@[params]
struct RenderingDevice_framebuffer_format_create_multipass_Cfg {
pub:
	view_count i64 = 1
}

Optional parameters for RenderingDevice#framebuffer_format_create_multipass

struct RenderingDevice_framebuffer_format_get_texture_samples_Cfg #

@[params]
struct RenderingDevice_framebuffer_format_get_texture_samples_Cfg {
pub:
	render_pass i64
}

Optional parameters for RenderingDevice#framebuffer_format_get_texture_samples

struct RenderingDevice_index_buffer_create_Cfg #

@[params]
struct RenderingDevice_index_buffer_create_Cfg {
pub:
	data                PackedByteArray = PackedByteArray{}
	use_restart_indices bool
	creation_bits       RenderingDeviceBufferCreationBits
}

Optional parameters for RenderingDevice#index_buffer_create

struct RenderingDevice_render_pipeline_create_Cfg #

@[params]
struct RenderingDevice_render_pipeline_create_Cfg {
pub:
	dynamic_state_flags      RenderingDevicePipelineDynamicStateFlags
	for_render_pass          i64
	specialization_constants Array
}

Optional parameters for RenderingDevice#render_pipeline_create

struct RenderingDevice_screen_get_framebuffer_format_Cfg #

@[params]
struct RenderingDevice_screen_get_framebuffer_format_Cfg {
pub:
	screen i64
}

Optional parameters for RenderingDevice#screen_get_framebuffer_format

struct RenderingDevice_screen_get_height_Cfg #

@[params]
struct RenderingDevice_screen_get_height_Cfg {
pub:
	screen i64
}

Optional parameters for RenderingDevice#screen_get_height

struct RenderingDevice_screen_get_width_Cfg #

@[params]
struct RenderingDevice_screen_get_width_Cfg {
pub:
	screen i64
}

Optional parameters for RenderingDevice#screen_get_width

struct RenderingDevice_shader_compile_binary_from_spirv_Cfg #

@[params]
struct RenderingDevice_shader_compile_binary_from_spirv_Cfg {
pub:
	name string
}

Optional parameters for RenderingDevice#shader_compile_binary_from_spirv

struct RenderingDevice_shader_compile_spirv_from_source_Cfg #

@[params]
struct RenderingDevice_shader_compile_spirv_from_source_Cfg {
pub:
	allow_cache bool
}

Optional parameters for RenderingDevice#shader_compile_spirv_from_source

struct RenderingDevice_shader_create_from_bytecode_Cfg #

@[params]
struct RenderingDevice_shader_create_from_bytecode_Cfg {
pub:
	placeholder_rid RID = RID{}
}

Optional parameters for RenderingDevice#shader_create_from_bytecode

struct RenderingDevice_shader_create_from_spirv_Cfg #

@[params]
struct RenderingDevice_shader_create_from_spirv_Cfg {
pub:
	name string
}

Optional parameters for RenderingDevice#shader_create_from_spirv

struct RenderingDevice_storage_buffer_create_Cfg #

@[params]
struct RenderingDevice_storage_buffer_create_Cfg {
pub:
	data          PackedByteArray = PackedByteArray{}
	usage         RenderingDeviceStorageBufferUsage
	creation_bits RenderingDeviceBufferCreationBits
}

Optional parameters for RenderingDevice#storage_buffer_create

struct RenderingDevice_texture_buffer_create_Cfg #

@[params]
struct RenderingDevice_texture_buffer_create_Cfg {
pub:
	data PackedByteArray = PackedByteArray{}
}

Optional parameters for RenderingDevice#texture_buffer_create

struct RenderingDevice_texture_create_Cfg #

@[params]
struct RenderingDevice_texture_create_Cfg {
pub:
	data Array
}

Optional parameters for RenderingDevice#texture_create

struct RenderingDevice_texture_create_from_extension_Cfg #

@[params]
struct RenderingDevice_texture_create_from_extension_Cfg {
pub:
	mipmaps i64 = 1
}

Optional parameters for RenderingDevice#texture_create_from_extension

struct RenderingDevice_texture_create_shared_from_slice_Cfg #

@[params]
struct RenderingDevice_texture_create_shared_from_slice_Cfg {
pub:
	mipmaps    i64 = 1
	slice_type RenderingDeviceTextureSliceType = unsafe { RenderingDeviceTextureSliceType(0) }
}

Optional parameters for RenderingDevice#texture_create_shared_from_slice

struct RenderingDevice_uniform_buffer_create_Cfg #

@[params]
struct RenderingDevice_uniform_buffer_create_Cfg {
pub:
	data          PackedByteArray = PackedByteArray{}
	creation_bits RenderingDeviceBufferCreationBits
}

Optional parameters for RenderingDevice#uniform_buffer_create

struct RenderingDevice_vertex_array_create_Cfg #

@[params]
struct RenderingDevice_vertex_array_create_Cfg {
pub:
	offsets PackedInt64Array = PackedInt64Array{}
}

Optional parameters for RenderingDevice#vertex_array_create

struct RenderingDevice_vertex_buffer_create_Cfg #

@[params]
struct RenderingDevice_vertex_buffer_create_Cfg {
pub:
	data          PackedByteArray = PackedByteArray{}
	creation_bits RenderingDeviceBufferCreationBits
}

Optional parameters for RenderingDevice#vertex_buffer_create

struct RenderingServer #

struct RenderingServer {
	Object
}

Server for anything visible.

fn (RenderingServer) to_variant #

fn (s &RenderingServer) to_variant() Variant

fn (RenderingServer) from_variant #

fn (mut s RenderingServer) from_variant(variant &Variant)

fn (RenderingServer) texture_2d_create #

fn (s &RenderingServer) texture_2d_create(image Image) RID

Creates a 2-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Texture2D]. [b]Note:[/b] Not to be confused with [method RenderingDevice.texture_create], which creates the graphics API's own texture type as opposed to the Godot-specific [Texture2D] resource.

fn (RenderingServer) texture_2d_layered_create #

fn (s &RenderingServer) texture_2d_layered_create(layers Array, layered_type RenderingServerTextureLayeredType) RID

Creates a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_layered_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [TextureLayered].

fn (RenderingServer) texture_3d_create #

fn (s &RenderingServer) texture_3d_create(format ImageFormat, width i64, height i64, depth i64, mipmaps bool, data Array) RID

[b]Note:[/b] The equivalent resource is [Texture3D].

fn (RenderingServer) texture_proxy_create #

fn (s &RenderingServer) texture_proxy_create(base RID) RID

This method does nothing and always returns an invalid [RID].

fn (RenderingServer) texture_create_from_native_handle #

fn (s &RenderingServer) texture_create_from_native_handle(gd_type RenderingServerTextureType, format ImageFormat, native_handle i64, width i64, height i64, depth i64, cfg RenderingServer_texture_create_from_native_handle_Cfg) RID

Creates a texture based on a native handle that was created outside of Godot's renderer. [b]Note:[/b] If using only the rendering device renderer, it's recommend to use [method RenderingDevice.texture_create_from_extension] together with [method RenderingServer.texture_rd_create], rather than this method. It will give you much more control over the texture's format and usage.

fn (RenderingServer) texture_2d_update #

fn (s &RenderingServer) texture_2d_update(texture RID, image Image, layer i64)

Updates the texture specified by the [param texture] [RID] with the data in [param image]. A [param layer] must also be specified, which should be 0 when updating a single-layer texture ([Texture2D]). [b]Note:[/b] The [param image] must have the same width, height and format as the current [param texture] data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height or format, use [method texture_replace] instead.

fn (RenderingServer) texture_3d_update #

fn (s &RenderingServer) texture_3d_update(texture RID, data Array)

Updates the texture specified by the [param texture] [RID]'s data with the data in [param data]. All the texture's layers must be replaced at once. [b]Note:[/b] The [param texture] must have the same width, height, depth and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height, depth or format, use [method texture_replace] instead.

fn (RenderingServer) texture_proxy_update #

fn (s &RenderingServer) texture_proxy_update(texture RID, proxy_to RID)

This method does nothing.

fn (RenderingServer) texture_2d_placeholder_create #

fn (s &RenderingServer) texture_2d_placeholder_create() RID

Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_layered_* RenderingServer functions, although it does nothing when used. See also [method texture_2d_layered_placeholder_create]. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [PlaceholderTexture2D].

fn (RenderingServer) texture_2d_layered_placeholder_create #

fn (s &RenderingServer) texture_2d_layered_placeholder_create(layered_type RenderingServerTextureLayeredType) RID

Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_2d_layered_* RenderingServer functions, although it does nothing when used. See also [method texture_2d_placeholder_create]. [b]Note:[/b] The equivalent resource is [PlaceholderTextureLayered].

fn (RenderingServer) texture_3d_placeholder_create #

fn (s &RenderingServer) texture_3d_placeholder_create() RID

Creates a placeholder for a 3-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all texture_3d_* RenderingServer functions, although it does nothing when used. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [PlaceholderTexture3D].

fn (RenderingServer) texture_2d_get #

fn (s &RenderingServer) texture_2d_get(texture RID) Image

Returns an [Image] instance from the given [param texture] [RID]. [b]Example:[/b] Get the test texture from [method get_test_texture] and apply it to a [Sprite2D] node:

var texture_rid = RenderingServer.get_test_texture()
var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid))
$Sprite2D.texture = texture

fn (RenderingServer) texture_2d_layer_get #

fn (s &RenderingServer) texture_2d_layer_get(texture RID, layer i64) Image

Returns an [Image] instance from the given [param texture] [RID] and [param layer].

fn (RenderingServer) texture_3d_get #

fn (s &RenderingServer) texture_3d_get(texture RID) Array

Returns 3D texture data as an array of [Image]s for the specified texture [RID].

fn (RenderingServer) texture_replace #

fn (s &RenderingServer) texture_replace(texture RID, by_texture RID)

Replaces [param texture]'s texture data by the texture specified by the [param by_texture] RID, without changing [param texture]'s RID.

fn (RenderingServer) texture_set_size_override #

fn (s &RenderingServer) texture_set_size_override(texture RID, width i64, height i64)

fn (RenderingServer) texture_set_path #

fn (s &RenderingServer) texture_set_path(texture RID, path string)

fn (RenderingServer) texture_get_path #

fn (s &RenderingServer) texture_get_path(texture RID) string

fn (RenderingServer) texture_get_format #

fn (s &RenderingServer) texture_get_format(texture RID) ImageFormat

Returns the format for the texture.

fn (RenderingServer) texture_set_force_redraw_if_visible #

fn (s &RenderingServer) texture_set_force_redraw_if_visible(texture RID, enable bool)

fn (RenderingServer) texture_rd_create #

fn (s &RenderingServer) texture_rd_create(rd_texture RID, cfg RenderingServer_texture_rd_create_Cfg) RID

Creates a new texture object based on a texture created directly on the [RenderingDevice]. If the texture contains layers, [param layer_type] is used to define the layer type.

fn (RenderingServer) texture_get_rd_texture #

fn (s &RenderingServer) texture_get_rd_texture(texture RID, cfg RenderingServer_texture_get_rd_texture_Cfg) RID

Returns a texture [RID] that can be used with [RenderingDevice].

fn (RenderingServer) texture_get_native_handle #

fn (s &RenderingServer) texture_get_native_handle(texture RID, cfg RenderingServer_texture_get_native_handle_Cfg) i64

Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. [b]Note:[/b] This function returns a uint64_t which internally maps to a GLuint (OpenGL) or VkImage (Vulkan).

fn (RenderingServer) shader_create #

fn (s &RenderingServer) shader_create() RID

Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all shader_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Shader].

fn (RenderingServer) shader_set_code #

fn (s &RenderingServer) shader_set_code(shader RID, code string)

Sets the shader's source code (which triggers recompilation after being changed).

fn (RenderingServer) shader_set_path_hint #

fn (s &RenderingServer) shader_set_path_hint(shader RID, path string)

Sets the path hint for the specified shader. This should generally match the [Shader] resource's [member Resource.resource_path].

fn (RenderingServer) shader_get_code #

fn (s &RenderingServer) shader_get_code(shader RID) string

Returns a shader's source code as a string.

fn (RenderingServer) get_shader_parameter_list #

fn (s &RenderingServer) get_shader_parameter_list(shader RID) Array

Returns the parameters of a shader.

fn (RenderingServer) shader_get_parameter_default #

fn (s &RenderingServer) shader_get_parameter_default(shader RID, name string) Variant

Returns the default value for the specified shader uniform. This is usually the value written in the shader source code.

fn (RenderingServer) shader_set_default_texture_parameter #

fn (s &RenderingServer) shader_set_default_texture_parameter(shader RID, name string, texture RID, cfg RenderingServer_shader_set_default_texture_parameter_Cfg)

Sets a shader's default texture. Overwrites the texture given by name. [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.

fn (RenderingServer) shader_get_default_texture_parameter #

fn (s &RenderingServer) shader_get_default_texture_parameter(shader RID, name string, cfg RenderingServer_shader_get_default_texture_parameter_Cfg) RID

Returns a default texture from a shader searched by name. [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.

fn (RenderingServer) material_create #

fn (s &RenderingServer) material_create() RID

Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all material_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Material].

fn (RenderingServer) material_set_shader #

fn (s &RenderingServer) material_set_shader(shader_material RID, shader RID)

Sets a shader material's shader.

fn (RenderingServer) material_set_param #

fn (s &RenderingServer) material_set_param(material RID, parameter string, value_ ToVariant)

Sets a material's parameter.

fn (RenderingServer) material_get_param #

fn (s &RenderingServer) material_get_param(material RID, parameter string) Variant

Returns the value of a certain material's parameter.

fn (RenderingServer) material_set_render_priority #

fn (s &RenderingServer) material_set_render_priority(material RID, priority i64)

Sets a material's render priority.

fn (RenderingServer) material_set_next_pass #

fn (s &RenderingServer) material_set_next_pass(material RID, next_material RID)

Sets an object's next material.

fn (RenderingServer) mesh_create_from_surfaces #

fn (s &RenderingServer) mesh_create_from_surfaces(surfaces Array, cfg RenderingServer_mesh_create_from_surfaces_Cfg) RID

fn (RenderingServer) mesh_create #

fn (s &RenderingServer) mesh_create() RID

Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all mesh_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent resource is [Mesh].

fn (RenderingServer) mesh_surface_get_format_offset #

fn (s &RenderingServer) mesh_surface_get_format_offset(format RenderingServerArrayFormat, vertex_count i64, array_index i64) i64

Returns the offset of a given attribute by [param array_index] in the start of its respective buffer.

fn (RenderingServer) mesh_surface_get_format_vertex_stride #

fn (s &RenderingServer) mesh_surface_get_format_vertex_stride(format RenderingServerArrayFormat, vertex_count i64) i64

Returns the stride of the vertex positions for a mesh with given [param format]. Note importantly that vertex positions are stored consecutively and are not interleaved with the other attributes in the vertex buffer (normals and tangents).

fn (RenderingServer) mesh_surface_get_format_normal_tangent_stride #

fn (s &RenderingServer) mesh_surface_get_format_normal_tangent_stride(format RenderingServerArrayFormat, vertex_count i64) i64

Returns the stride of the combined normals and tangents for a mesh with given [param format]. Note importantly that, while normals and tangents are in the vertex buffer with vertices, they are only interleaved with each other and so have a different stride than vertex positions.

fn (RenderingServer) mesh_surface_get_format_attribute_stride #

fn (s &RenderingServer) mesh_surface_get_format_attribute_stride(format RenderingServerArrayFormat, vertex_count i64) i64

Returns the stride of the attribute buffer for a mesh with given [param format].

fn (RenderingServer) mesh_surface_get_format_skin_stride #

fn (s &RenderingServer) mesh_surface_get_format_skin_stride(format RenderingServerArrayFormat, vertex_count i64) i64

Returns the stride of the skin buffer for a mesh with given [param format].

fn (RenderingServer) mesh_surface_get_format_index_stride #

fn (s &RenderingServer) mesh_surface_get_format_index_stride(format RenderingServerArrayFormat, vertex_count i64) i64

Returns the stride of the index buffer for a mesh with the given [param format].

fn (RenderingServer) mesh_add_surface #

fn (s &RenderingServer) mesh_add_surface(mesh RID, surface Dictionary)

fn (RenderingServer) mesh_add_surface_from_arrays #

fn (s &RenderingServer) mesh_add_surface_from_arrays(mesh RID, primitive RenderingServerPrimitiveType, arrays Array, cfg RenderingServer_mesh_add_surface_from_arrays_Cfg)

fn (RenderingServer) mesh_get_blend_shape_count #

fn (s &RenderingServer) mesh_get_blend_shape_count(mesh RID) i64

Returns a mesh's blend shape count.

fn (RenderingServer) mesh_set_blend_shape_mode #

fn (s &RenderingServer) mesh_set_blend_shape_mode(mesh RID, mode RenderingServerBlendShapeMode)

Sets a mesh's blend shape mode.

fn (RenderingServer) mesh_get_blend_shape_mode #

fn (s &RenderingServer) mesh_get_blend_shape_mode(mesh RID) RenderingServerBlendShapeMode

Returns a mesh's blend shape mode.

fn (RenderingServer) mesh_surface_set_material #

fn (s &RenderingServer) mesh_surface_set_material(mesh RID, surface i64, material RID)

Sets a mesh's surface's material.

fn (RenderingServer) mesh_surface_get_material #

fn (s &RenderingServer) mesh_surface_get_material(mesh RID, surface i64) RID

Returns a mesh's surface's material.

fn (RenderingServer) mesh_get_surface #

fn (s &RenderingServer) mesh_get_surface(mesh RID, surface i64) Dictionary

fn (RenderingServer) mesh_surface_get_arrays #

fn (s &RenderingServer) mesh_surface_get_arrays(mesh RID, surface i64) Array

Returns a mesh's surface's buffer arrays.

fn (RenderingServer) mesh_surface_get_blend_shape_arrays #

fn (s &RenderingServer) mesh_surface_get_blend_shape_arrays(mesh RID, surface i64) Array

Returns a mesh's surface's arrays for blend shapes.

fn (RenderingServer) mesh_get_surface_count #

fn (s &RenderingServer) mesh_get_surface_count(mesh RID) i64

Returns a mesh's number of surfaces.

fn (RenderingServer) mesh_set_custom_aabb #

fn (s &RenderingServer) mesh_set_custom_aabb(mesh RID, aabb AABB)

Sets a mesh's custom aabb.

fn (RenderingServer) mesh_get_custom_aabb #

fn (s &RenderingServer) mesh_get_custom_aabb(mesh RID) AABB

Returns a mesh's custom aabb.

fn (RenderingServer) mesh_surface_remove #

fn (s &RenderingServer) mesh_surface_remove(mesh RID, surface i64)

Removes the surface at the given index from the Mesh, shifting surfaces with higher index down by one.

fn (RenderingServer) mesh_clear #

fn (s &RenderingServer) mesh_clear(mesh RID)

Removes all surfaces from a mesh.

fn (RenderingServer) mesh_surface_update_vertex_region #

fn (s &RenderingServer) mesh_surface_update_vertex_region(mesh RID, surface i64, offset i64, data PackedByteArray)

fn (RenderingServer) mesh_surface_update_attribute_region #

fn (s &RenderingServer) mesh_surface_update_attribute_region(mesh RID, surface i64, offset i64, data PackedByteArray)

fn (RenderingServer) mesh_surface_update_skin_region #

fn (s &RenderingServer) mesh_surface_update_skin_region(mesh RID, surface i64, offset i64, data PackedByteArray)

fn (RenderingServer) mesh_surface_update_index_region #

fn (s &RenderingServer) mesh_surface_update_index_region(mesh RID, surface i64, offset i64, data PackedByteArray)

Updates the index buffer of the mesh surface with the given [param data]. The expected data are 16 or 32-bit unsigned integers, which can be determined with [method mesh_surface_get_format_index_stride].

fn (RenderingServer) mesh_set_shadow_mesh #

fn (s &RenderingServer) mesh_set_shadow_mesh(mesh RID, shadow_mesh RID)

fn (RenderingServer) multimesh_create #

fn (s &RenderingServer) multimesh_create() RID

Creates a new multimesh on the RenderingServer and returns an [RID] handle. This RID will be used in all multimesh_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent resource is [MultiMesh].

fn (RenderingServer) multimesh_allocate_data #

fn (s &RenderingServer) multimesh_allocate_data(multimesh RID, instances i64, transform_format RenderingServerMultimeshTransformFormat, cfg RenderingServer_multimesh_allocate_data_Cfg)

fn (RenderingServer) multimesh_get_instance_count #

fn (s &RenderingServer) multimesh_get_instance_count(multimesh RID) i64

Returns the number of instances allocated for this multimesh.

fn (RenderingServer) multimesh_set_mesh #

fn (s &RenderingServer) multimesh_set_mesh(multimesh RID, mesh RID)

Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh].

fn (RenderingServer) multimesh_instance_set_transform #

fn (s &RenderingServer) multimesh_instance_set_transform(multimesh RID, index i64, transform Transform3D)

Sets the [Transform3D] for this instance. Equivalent to [method MultiMesh.set_instance_transform].

fn (RenderingServer) multimesh_instance_set_transform_2d #

fn (s &RenderingServer) multimesh_instance_set_transform_2d(multimesh RID, index i64, transform Transform2D)

Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d].

fn (RenderingServer) multimesh_instance_set_color #

fn (s &RenderingServer) multimesh_instance_set_color(multimesh RID, index i64, color Color)

Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color].

fn (RenderingServer) multimesh_instance_set_custom_data #

fn (s &RenderingServer) multimesh_instance_set_custom_data(multimesh RID, index i64, custom_data Color)

Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a vec4 in the shader. Equivalent to [method MultiMesh.set_instance_custom_data].

fn (RenderingServer) multimesh_get_mesh #

fn (s &RenderingServer) multimesh_get_mesh(multimesh RID) RID

Returns the RID of the mesh that will be used in drawing this multimesh.

fn (RenderingServer) multimesh_get_aabb #

fn (s &RenderingServer) multimesh_get_aabb(multimesh RID) AABB

Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh.

fn (RenderingServer) multimesh_set_custom_aabb #

fn (s &RenderingServer) multimesh_set_custom_aabb(multimesh RID, aabb AABB)

Sets the custom AABB for this MultiMesh resource.

fn (RenderingServer) multimesh_get_custom_aabb #

fn (s &RenderingServer) multimesh_get_custom_aabb(multimesh RID) AABB

Returns the custom AABB defined for this MultiMesh resource.

fn (RenderingServer) multimesh_instance_get_transform #

fn (s &RenderingServer) multimesh_instance_get_transform(multimesh RID, index i64) Transform3D

Returns the [Transform3D] of the specified instance.

fn (RenderingServer) multimesh_instance_get_transform_2d #

fn (s &RenderingServer) multimesh_instance_get_transform_2d(multimesh RID, index i64) Transform2D

Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms.

fn (RenderingServer) multimesh_instance_get_color #

fn (s &RenderingServer) multimesh_instance_get_color(multimesh RID, index i64) Color

Returns the color by which the specified instance will be modulated.

fn (RenderingServer) multimesh_instance_get_custom_data #

fn (s &RenderingServer) multimesh_instance_get_custom_data(multimesh RID, index i64) Color

Returns the custom data associated with the specified instance.

fn (RenderingServer) multimesh_set_visible_instances #

fn (s &RenderingServer) multimesh_set_visible_instances(multimesh RID, visible i64)

Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count].

fn (RenderingServer) multimesh_get_visible_instances #

fn (s &RenderingServer) multimesh_get_visible_instances(multimesh RID) i64

Returns the number of visible instances for this multimesh.

fn (RenderingServer) multimesh_set_buffer #

fn (s &RenderingServer) multimesh_set_buffer(multimesh RID, buffer PackedFloat32Array)

Set the entire data to use for drawing the [param multimesh] at once to [param buffer] (such as instance transforms and colors). [param buffer]'s size must match the number of instances multiplied by the per-instance data size (which depends on the enabled MultiMesh fields). Otherwise, an error message is printed and nothing is rendered. See also [method multimesh_get_buffer]. The per-instance data size and expected data order is: [codeblock lang=text] 2D:- Position: 8 floats (8 floats for Transform2D)

  • Position + Vertex color: 12 floats (8 floats for Transform2D, 4 floats for Color)
  • Position + Custom data: 12 floats (8 floats for Transform2D, 4 floats of custom data)
  • Position + Vertex color + Custom data: 16 floats (8 floats for Transform2D, 4 floats for Color, 4 floats of custom data)3D:- Position: 12 floats (12 floats for Transform3D)
  • Position + Vertex color: 16 floats (12 floats for Transform3D, 4 floats for Color)
  • Position + Custom data: 16 floats (12 floats for Transform3D, 4 floats of custom data)
  • Position + Vertex color + Custom data: 20 floats (12 floats for Transform3D, 4 floats for Color, 4 floats of custom data)
Instance transforms are in row-major order. Specifically:
- For [Transform2D] the float-order is: `(x.x, y.x, padding_float, origin.x, x.y, y.y, padding_float, origin.y)`.
- For [Transform3D] the float-order is: `(basis.x.x, basis.y.x, basis.z.x, origin.x, basis.x.y, basis.y.y, basis.z.y, origin.y, basis.x.z, basis.y.z, basis.z.z, origin.z)`.

fn (RenderingServer) multimesh_get_command_buffer_rd_rid #

fn (s &RenderingServer) multimesh_get_command_buffer_rd_rid(multimesh RID) RID

Returns the [RenderingDevice] [RID] handle of the [MultiMesh] command buffer. This [RID] is only valid if use_indirect is set to true when allocating data through [method multimesh_allocate_data]. It can be used to directly modify the instance count via buffer. The data structure is dependent on both how many surfaces the mesh contains and whether it is indexed or not, the buffer has 5 integers in it, with the last unused if the mesh is not indexed. Each of the values in the buffer correspond to these options: [codeblock lang=text] Indexed: 0 - indexCount; 1 - instanceCount; 2 - firstIndex; 3 - vertexOffset; 4 - firstInstance; Non Indexed: 0 - vertexCount; 1 - instanceCount; 2 - firstVertex; 3 - firstInstance; 4 - unused;

fn (RenderingServer) multimesh_get_buffer_rd_rid #

fn (s &RenderingServer) multimesh_get_buffer_rd_rid(multimesh RID) RID

Returns the [RenderingDevice] [RID] handle of the [MultiMesh], which can be used as any other buffer on the Rendering Device.

fn (RenderingServer) multimesh_get_buffer #

fn (s &RenderingServer) multimesh_get_buffer(multimesh RID) PackedFloat32Array

Returns the MultiMesh data (such as instance transforms, colors, etc.). See [method multimesh_set_buffer] for details on the returned data. [b]Note:[/b] If the buffer is in the engine's internal cache, it will have to be fetched from GPU memory and possibly decompressed. This means [method multimesh_get_buffer] is potentially a slow operation and should be avoided whenever possible.

fn (RenderingServer) multimesh_set_buffer_interpolated #

fn (s &RenderingServer) multimesh_set_buffer_interpolated(multimesh RID, buffer PackedFloat32Array, buffer_previous PackedFloat32Array)

Alternative version of [method multimesh_set_buffer] for use with physics interpolation. Takes both an array of current data and an array of data for the previous physics tick.

fn (RenderingServer) multimesh_set_physics_interpolated #

fn (s &RenderingServer) multimesh_set_physics_interpolated(multimesh RID, interpolated bool)

Turns on and off physics interpolation for this MultiMesh resource.

fn (RenderingServer) multimesh_set_physics_interpolation_quality #

fn (s &RenderingServer) multimesh_set_physics_interpolation_quality(multimesh RID, quality RenderingServerMultimeshPhysicsInterpolationQuality)

Sets the physics interpolation quality for the [MultiMesh]. A value of [constant MULTIMESH_INTERP_QUALITY_FAST] gives fast but low quality interpolation, a value of [constant MULTIMESH_INTERP_QUALITY_HIGH] gives slower but higher quality interpolation.

fn (RenderingServer) multimesh_instance_reset_physics_interpolation #

fn (s &RenderingServer) multimesh_instance_reset_physics_interpolation(multimesh RID, index i64)

Prevents physics interpolation for the specified instance during the current physics tick. This is useful when moving an instance to a new location, to give an instantaneous change rather than interpolation from the previous location.

fn (RenderingServer) skeleton_create #

fn (s &RenderingServer) skeleton_create() RID

Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all skeleton_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method.

fn (RenderingServer) skeleton_allocate_data #

fn (s &RenderingServer) skeleton_allocate_data(skeleton RID, bones i64, cfg RenderingServer_skeleton_allocate_data_Cfg)

fn (RenderingServer) skeleton_get_bone_count #

fn (s &RenderingServer) skeleton_get_bone_count(skeleton RID) i64

Returns the number of bones allocated for this skeleton.

fn (RenderingServer) skeleton_bone_set_transform #

fn (s &RenderingServer) skeleton_bone_set_transform(skeleton RID, bone i64, transform Transform3D)

Sets the [Transform3D] for a specific bone of this skeleton.

fn (RenderingServer) skeleton_bone_get_transform #

fn (s &RenderingServer) skeleton_bone_get_transform(skeleton RID, bone i64) Transform3D

Returns the [Transform3D] set for a specific bone of this skeleton.

fn (RenderingServer) skeleton_bone_set_transform_2d #

fn (s &RenderingServer) skeleton_bone_set_transform_2d(skeleton RID, bone i64, transform Transform2D)

Sets the [Transform2D] for a specific bone of this skeleton.

fn (RenderingServer) skeleton_bone_get_transform_2d #

fn (s &RenderingServer) skeleton_bone_get_transform_2d(skeleton RID, bone i64) Transform2D

Returns the [Transform2D] set for a specific bone of this skeleton.

fn (RenderingServer) skeleton_set_base_transform_2d #

fn (s &RenderingServer) skeleton_set_base_transform_2d(skeleton RID, base_transform Transform2D)

fn (RenderingServer) directional_light_create #

fn (s &RenderingServer) directional_light_create() RID

Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent node is [DirectionalLight3D].

fn (RenderingServer) omni_light_create #

fn (s &RenderingServer) omni_light_create() RID

Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent node is [OmniLight3D].

fn (RenderingServer) spot_light_create #

fn (s &RenderingServer) spot_light_create() RID

Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most light_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID.

fn (RenderingServer) light_set_color #

fn (s &RenderingServer) light_set_color(light RID, color Color)

Sets the color of the light. Equivalent to [member Light3D.light_color].

fn (RenderingServer) light_set_param #

fn (s &RenderingServer) light_set_param(light RID, param RenderingServerLightParam, value f64)

Sets the specified 3D light parameter. Equivalent to [method Light3D.set_param].

fn (RenderingServer) light_set_shadow #

fn (s &RenderingServer) light_set_shadow(light RID, enabled bool)

If true, light will cast shadows. Equivalent to [member Light3D.shadow_enabled].

fn (RenderingServer) light_set_projector #

fn (s &RenderingServer) light_set_projector(light RID, texture RID)

Sets the projector texture to use for the specified 3D light. Equivalent to [member Light3D.light_projector].

fn (RenderingServer) light_set_negative #

fn (s &RenderingServer) light_set_negative(light RID, enable bool)

If true, the 3D light will subtract light instead of adding light. Equivalent to [member Light3D.light_negative].

fn (RenderingServer) light_set_cull_mask #

fn (s &RenderingServer) light_set_cull_mask(light RID, mask i64)

Sets the cull mask for this 3D light. Lights only affect objects in the selected layers. Equivalent to [member Light3D.light_cull_mask].

fn (RenderingServer) light_set_distance_fade #

fn (s &RenderingServer) light_set_distance_fade(decal RID, enabled bool, begin f64, shadow f64, length f64)

Sets the distance fade for this 3D light. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to [member Light3D.distance_fade_enabled], [member Light3D.distance_fade_begin], [member Light3D.distance_fade_shadow], and [member Light3D.distance_fade_length].

fn (RenderingServer) light_set_reverse_cull_face_mode #

fn (s &RenderingServer) light_set_reverse_cull_face_mode(light RID, enabled bool)

If true, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face].

fn (RenderingServer) light_set_shadow_caster_mask #

fn (s &RenderingServer) light_set_shadow_caster_mask(light RID, mask i64)

Sets the shadow caster mask for this 3D light. Shadows will only be cast using objects in the selected layers. Equivalent to [member Light3D.shadow_caster_mask].

fn (RenderingServer) light_set_bake_mode #

fn (s &RenderingServer) light_set_bake_mode(light RID, bake_mode RenderingServerLightBakeMode)

Sets the bake mode to use for the specified 3D light. Equivalent to [member Light3D.light_bake_mode].

fn (RenderingServer) light_set_max_sdfgi_cascade #

fn (s &RenderingServer) light_set_max_sdfgi_cascade(light RID, cascade i64)

Sets the maximum SDFGI cascade in which the 3D light's indirect lighting is rendered. Higher values allow the light to be rendered in SDFGI further away from the camera.

fn (RenderingServer) light_omni_set_shadow_mode #

fn (s &RenderingServer) light_omni_set_shadow_mode(light RID, mode RenderingServerLightOmniShadowMode)

Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight3D.omni_shadow_mode].

fn (RenderingServer) light_directional_set_shadow_mode #

fn (s &RenderingServer) light_directional_set_shadow_mode(light RID, mode RenderingServerLightDirectionalShadowMode)

Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_mode].

fn (RenderingServer) light_directional_set_blend_splits #

fn (s &RenderingServer) light_directional_set_blend_splits(light RID, enable bool)

If true, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight3D.directional_shadow_blend_splits].

fn (RenderingServer) light_directional_set_sky_mode #

fn (s &RenderingServer) light_directional_set_sky_mode(light RID, mode RenderingServerLightDirectionalSkyMode)

If true, this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.

fn (RenderingServer) light_projectors_set_filter #

fn (s &RenderingServer) light_projectors_set_filter(filter RenderingServerLightProjectorFilter)

Sets the texture filter mode to use when rendering light projectors. This parameter is global and cannot be set on a per-light basis.

fn (RenderingServer) lightmaps_set_bicubic_filter #

fn (s &RenderingServer) lightmaps_set_bicubic_filter(enable bool)

Toggles whether a bicubic filter should be used when lightmaps are sampled. This smoothens their appearance at a performance cost.

fn (RenderingServer) positional_soft_shadow_filter_set_quality #

fn (s &RenderingServer) positional_soft_shadow_filter_set_quality(quality RenderingServerShadowQuality)

Sets the filter quality for omni and spot light shadows in 3D. See also [member ProjectSettings.rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality]. This parameter is global and cannot be set on a per-viewport basis.

fn (RenderingServer) directional_soft_shadow_filter_set_quality #

fn (s &RenderingServer) directional_soft_shadow_filter_set_quality(quality RenderingServerShadowQuality)

Sets the filter [param quality] for directional light shadows in 3D. See also [member ProjectSettings.rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality]. This parameter is global and cannot be set on a per-viewport basis.

fn (RenderingServer) directional_shadow_atlas_set_size #

fn (s &RenderingServer) directional_shadow_atlas_set_size(size i64, is_16bits bool)

Sets the [param size] of the directional light shadows in 3D. See also [member ProjectSettings.rendering/lights_and_shadows/directional_shadow/size]. This parameter is global and cannot be set on a per-viewport basis.

fn (RenderingServer) reflection_probe_create #

fn (s &RenderingServer) reflection_probe_create() RID

Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all reflection_probe_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent node is [ReflectionProbe].

fn (RenderingServer) reflection_probe_set_update_mode #

fn (s &RenderingServer) reflection_probe_set_update_mode(probe RID, mode RenderingServerReflectionProbeUpdateMode)

Sets how often the reflection probe updates. Can either be once or every frame.

fn (RenderingServer) reflection_probe_set_intensity #

fn (s &RenderingServer) reflection_probe_set_intensity(probe RID, intensity f64)

Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity].

fn (RenderingServer) reflection_probe_set_blend_distance #

fn (s &RenderingServer) reflection_probe_set_blend_distance(probe RID, blend_distance f64)

Sets the distance in meters over which a probe blends into the scene.

fn (RenderingServer) reflection_probe_set_ambient_mode #

fn (s &RenderingServer) reflection_probe_set_ambient_mode(probe RID, mode RenderingServerReflectionProbeAmbientMode)

Sets the reflection probe's ambient light mode. Equivalent to [member ReflectionProbe.ambient_mode].

fn (RenderingServer) reflection_probe_set_ambient_color #

fn (s &RenderingServer) reflection_probe_set_ambient_color(probe RID, color Color)

Sets the reflection probe's custom ambient light color. Equivalent to [member ReflectionProbe.ambient_color].

fn (RenderingServer) reflection_probe_set_ambient_energy #

fn (s &RenderingServer) reflection_probe_set_ambient_energy(probe RID, energy f64)

Sets the reflection probe's custom ambient light energy. Equivalent to [member ReflectionProbe.ambient_color_energy].

fn (RenderingServer) reflection_probe_set_max_distance #

fn (s &RenderingServer) reflection_probe_set_max_distance(probe RID, distance f64)

Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance].

fn (RenderingServer) reflection_probe_set_size #

fn (s &RenderingServer) reflection_probe_set_size(probe RID, size Vector3)

Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.size].

fn (RenderingServer) reflection_probe_set_origin_offset #

fn (s &RenderingServer) reflection_probe_set_origin_offset(probe RID, offset Vector3)

Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset].

fn (RenderingServer) reflection_probe_set_as_interior #

fn (s &RenderingServer) reflection_probe_set_as_interior(probe RID, enable bool)

If true, reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior].

fn (RenderingServer) reflection_probe_set_enable_box_projection #

fn (s &RenderingServer) reflection_probe_set_enable_box_projection(probe RID, enable bool)

If true, uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection].

fn (RenderingServer) reflection_probe_set_enable_shadows #

fn (s &RenderingServer) reflection_probe_set_enable_shadows(probe RID, enable bool)

If true, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows].

fn (RenderingServer) reflection_probe_set_cull_mask #

fn (s &RenderingServer) reflection_probe_set_cull_mask(probe RID, layers i64)

Sets the render cull mask for this reflection probe. Only instances with a matching layer will be reflected by this probe. Equivalent to [member ReflectionProbe.cull_mask].

fn (RenderingServer) reflection_probe_set_reflection_mask #

fn (s &RenderingServer) reflection_probe_set_reflection_mask(probe RID, layers i64)

Sets the render reflection mask for this reflection probe. Only instances with a matching layer will have reflections applied from this probe. Equivalent to [member ReflectionProbe.reflection_mask].

fn (RenderingServer) reflection_probe_set_resolution #

fn (s &RenderingServer) reflection_probe_set_resolution(probe RID, resolution i64)

Sets the resolution to use when rendering the specified reflection probe. The [param resolution] is specified for each cubemap face: for instance, specifying 512 will allocate 6 faces of 512×512 each (plus mipmaps for roughness levels).

fn (RenderingServer) reflection_probe_set_mesh_lod_threshold #

fn (s &RenderingServer) reflection_probe_set_mesh_lod_threshold(probe RID, pixels f64)

Sets the mesh level of detail to use in the reflection probe rendering. Higher values will use less detailed versions of meshes that have LOD variations generated, which can improve performance. Equivalent to [member ReflectionProbe.mesh_lod_threshold].

fn (RenderingServer) decal_create #

fn (s &RenderingServer) decal_create() RID

Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all decal_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this decal to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent node is [Decal].

fn (RenderingServer) decal_set_size #

fn (s &RenderingServer) decal_set_size(decal RID, size Vector3)

Sets the [param size] of the decal specified by the [param decal] RID. Equivalent to [member Decal.size].

fn (RenderingServer) decal_set_texture #

fn (s &RenderingServer) decal_set_texture(decal RID, gd_type RenderingServerDecalTexture, texture RID)

Sets the [param texture] in the given texture [param type] slot for the specified decal. Equivalent to [method Decal.set_texture].

fn (RenderingServer) decal_set_emission_energy #

fn (s &RenderingServer) decal_set_emission_energy(decal RID, energy f64)

Sets the emission [param energy] in the decal specified by the [param decal] RID. Equivalent to [member Decal.emission_energy].

fn (RenderingServer) decal_set_albedo_mix #

fn (s &RenderingServer) decal_set_albedo_mix(decal RID, albedo_mix f64)

Sets the [param albedo_mix] in the decal specified by the [param decal] RID. Equivalent to [member Decal.albedo_mix].

fn (RenderingServer) decal_set_modulate #

fn (s &RenderingServer) decal_set_modulate(decal RID, color Color)

Sets the color multiplier in the decal specified by the [param decal] RID to [param color]. Equivalent to [member Decal.modulate].

fn (RenderingServer) decal_set_cull_mask #

fn (s &RenderingServer) decal_set_cull_mask(decal RID, mask i64)

Sets the cull [param mask] in the decal specified by the [param decal] RID. Equivalent to [member Decal.cull_mask].

fn (RenderingServer) decal_set_distance_fade #

fn (s &RenderingServer) decal_set_distance_fade(decal RID, enabled bool, begin f64, length f64)

Sets the distance fade parameters in the decal specified by the [param decal] RID. Equivalent to [member Decal.distance_fade_enabled], [member Decal.distance_fade_begin] and [member Decal.distance_fade_length].

fn (RenderingServer) decal_set_fade #

fn (s &RenderingServer) decal_set_fade(decal RID, above f64, below f64)

Sets the upper fade ([param above]) and lower fade ([param below]) in the decal specified by the [param decal] RID. Equivalent to [member Decal.upper_fade] and [member Decal.lower_fade].

fn (RenderingServer) decal_set_normal_fade #

fn (s &RenderingServer) decal_set_normal_fade(decal RID, fade f64)

Sets the normal [param fade] in the decal specified by the [param decal] RID. Equivalent to [member Decal.normal_fade].

fn (RenderingServer) decals_set_filter #

fn (s &RenderingServer) decals_set_filter(filter RenderingServerDecalFilter)

Sets the texture [param filter] mode to use when rendering decals. This parameter is global and cannot be set on a per-decal basis.

fn (RenderingServer) gi_set_use_half_resolution #

fn (s &RenderingServer) gi_set_use_half_resolution(half_resolution bool)

If [param half_resolution] is true, renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution on each axis (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. Equivalent to [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution].

fn (RenderingServer) voxel_gi_create #

fn (s &RenderingServer) voxel_gi_create() RID

Creates a new voxel-based global illumination object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all voxel_gi_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [VoxelGI].

fn (RenderingServer) voxel_gi_allocate_data #

fn (s &RenderingServer) voxel_gi_allocate_data(voxel_gi RID, to_cell_xform Transform3D, aabb AABB, octree_size Vector3i, octree_cells PackedByteArray, data_cells PackedByteArray, distance_field PackedByteArray, level_counts PackedInt32Array)

fn (RenderingServer) voxel_gi_get_octree_size #

fn (s &RenderingServer) voxel_gi_get_octree_size(voxel_gi RID) Vector3i

fn (RenderingServer) voxel_gi_get_octree_cells #

fn (s &RenderingServer) voxel_gi_get_octree_cells(voxel_gi RID) PackedByteArray

fn (RenderingServer) voxel_gi_get_data_cells #

fn (s &RenderingServer) voxel_gi_get_data_cells(voxel_gi RID) PackedByteArray

fn (RenderingServer) voxel_gi_get_distance_field #

fn (s &RenderingServer) voxel_gi_get_distance_field(voxel_gi RID) PackedByteArray

fn (RenderingServer) voxel_gi_get_level_counts #

fn (s &RenderingServer) voxel_gi_get_level_counts(voxel_gi RID) PackedInt32Array

fn (RenderingServer) voxel_gi_get_to_cell_xform #

fn (s &RenderingServer) voxel_gi_get_to_cell_xform(voxel_gi RID) Transform3D

fn (RenderingServer) voxel_gi_set_dynamic_range #

fn (s &RenderingServer) voxel_gi_set_dynamic_range(voxel_gi RID, range f64)

Sets the [member VoxelGIData.dynamic_range] value to use on the specified [param voxel_gi]'s [RID].

fn (RenderingServer) voxel_gi_set_propagation #

fn (s &RenderingServer) voxel_gi_set_propagation(voxel_gi RID, amount f64)

Sets the [member VoxelGIData.propagation] value to use on the specified [param voxel_gi]'s [RID].

fn (RenderingServer) voxel_gi_set_energy #

fn (s &RenderingServer) voxel_gi_set_energy(voxel_gi RID, energy f64)

Sets the [member VoxelGIData.energy] value to use on the specified [param voxel_gi]'s [RID].

fn (RenderingServer) voxel_gi_set_baked_exposure_normalization #

fn (s &RenderingServer) voxel_gi_set_baked_exposure_normalization(voxel_gi RID, baked_exposure f64)

Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see [method camera_attributes_set_exposure].

fn (RenderingServer) voxel_gi_set_bias #

fn (s &RenderingServer) voxel_gi_set_bias(voxel_gi RID, bias f64)

Sets the [member VoxelGIData.bias] value to use on the specified [param voxel_gi]'s [RID].

fn (RenderingServer) voxel_gi_set_normal_bias #

fn (s &RenderingServer) voxel_gi_set_normal_bias(voxel_gi RID, bias f64)

Sets the [member VoxelGIData.normal_bias] value to use on the specified [param voxel_gi]'s [RID].

fn (RenderingServer) voxel_gi_set_interior #

fn (s &RenderingServer) voxel_gi_set_interior(voxel_gi RID, enable bool)

Sets the [member VoxelGIData.interior] value to use on the specified [param voxel_gi]'s [RID].

fn (RenderingServer) voxel_gi_set_use_two_bounces #

fn (s &RenderingServer) voxel_gi_set_use_two_bounces(voxel_gi RID, enable bool)

Sets the [member VoxelGIData.use_two_bounces] value to use on the specified [param voxel_gi]'s [RID].

fn (RenderingServer) voxel_gi_set_quality #

fn (s &RenderingServer) voxel_gi_set_quality(quality RenderingServerVoxelGIQuality)

Sets the [member ProjectSettings.rendering/global_illumination/voxel_gi/quality] value to use when rendering. This parameter is global and cannot be set on a per-VoxelGI basis.

fn (RenderingServer) lightmap_create #

fn (s &RenderingServer) lightmap_create() RID

Creates a new lightmap global illumination instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all lightmap_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [LightmapGI].

fn (RenderingServer) lightmap_set_textures #

fn (s &RenderingServer) lightmap_set_textures(lightmap RID, light RID, uses_sh bool)

Set the textures on the given [param lightmap] GI instance to the texture array pointed to by the [param light] RID. If the lightmap texture was baked with [member LightmapGI.directional] set to true, then [param uses_sh] must also be true.

fn (RenderingServer) lightmap_set_probe_bounds #

fn (s &RenderingServer) lightmap_set_probe_bounds(lightmap RID, bounds AABB)

fn (RenderingServer) lightmap_set_probe_interior #

fn (s &RenderingServer) lightmap_set_probe_interior(lightmap RID, interior bool)

fn (RenderingServer) lightmap_set_probe_capture_data #

fn (s &RenderingServer) lightmap_set_probe_capture_data(lightmap RID, points PackedVector3Array, point_sh PackedColorArray, tetrahedra PackedInt32Array, bsp_tree PackedInt32Array)

fn (RenderingServer) lightmap_get_probe_capture_points #

fn (s &RenderingServer) lightmap_get_probe_capture_points(lightmap RID) PackedVector3Array

fn (RenderingServer) lightmap_get_probe_capture_sh #

fn (s &RenderingServer) lightmap_get_probe_capture_sh(lightmap RID) PackedColorArray

fn (RenderingServer) lightmap_get_probe_capture_tetrahedra #

fn (s &RenderingServer) lightmap_get_probe_capture_tetrahedra(lightmap RID) PackedInt32Array

fn (RenderingServer) lightmap_get_probe_capture_bsp_tree #

fn (s &RenderingServer) lightmap_get_probe_capture_bsp_tree(lightmap RID) PackedInt32Array

fn (RenderingServer) lightmap_set_baked_exposure_normalization #

fn (s &RenderingServer) lightmap_set_baked_exposure_normalization(lightmap RID, baked_exposure f64)

Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see [method camera_attributes_set_exposure].

fn (RenderingServer) lightmap_set_probe_capture_update_speed #

fn (s &RenderingServer) lightmap_set_probe_capture_update_speed(speed f64)

fn (RenderingServer) particles_create #

fn (s &RenderingServer) particles_create() RID

Creates a GPU-based particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all particles_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent nodes are [GPUParticles2D] and [GPUParticles3D]. [b]Note:[/b] All particles_* methods only apply to GPU-based particles, not CPU-based particles. [CPUParticles2D] and [CPUParticles3D] do not have equivalent RenderingServer functions available, as these use [MultiMeshInstance2D] and [MultiMeshInstance3D] under the hood (see multimesh_* methods).

fn (RenderingServer) particles_set_mode #

fn (s &RenderingServer) particles_set_mode(particles RID, mode RenderingServerParticlesMode)

Sets whether the GPU particles specified by the [param particles] RID should be rendered in 2D or 3D according to [param mode].

fn (RenderingServer) particles_set_emitting #

fn (s &RenderingServer) particles_set_emitting(particles RID, emitting bool)

If true, particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member GPUParticles3D.emitting].

fn (RenderingServer) particles_get_emitting #

fn (s &RenderingServer) particles_get_emitting(particles RID) bool

Returns true if particles are currently set to emitting.

fn (RenderingServer) particles_set_amount #

fn (s &RenderingServer) particles_set_amount(particles RID, amount i64)

Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member GPUParticles3D.amount].

fn (RenderingServer) particles_set_amount_ratio #

fn (s &RenderingServer) particles_set_amount_ratio(particles RID, ratio f64)

Sets the amount ratio for particles to be emitted. Equivalent to [member GPUParticles3D.amount_ratio].

fn (RenderingServer) particles_set_lifetime #

fn (s &RenderingServer) particles_set_lifetime(particles RID, lifetime f64)

Sets the lifetime of each particle in the system. Equivalent to [member GPUParticles3D.lifetime].

fn (RenderingServer) particles_set_one_shot #

fn (s &RenderingServer) particles_set_one_shot(particles RID, one_shot bool)

If true, particles will emit once and then stop. Equivalent to [member GPUParticles3D.one_shot].

fn (RenderingServer) particles_set_pre_process_time #

fn (s &RenderingServer) particles_set_pre_process_time(particles RID, time f64)

Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess].

fn (RenderingServer) particles_request_process_time #

fn (s &RenderingServer) particles_request_process_time(particles RID, time f64)

Requests particles to process for extra process time during a single frame.

fn (RenderingServer) particles_set_explosiveness_ratio #

fn (s &RenderingServer) particles_set_explosiveness_ratio(particles RID, ratio f64)

Sets the explosiveness ratio. Equivalent to [member GPUParticles3D.explosiveness].

fn (RenderingServer) particles_set_randomness_ratio #

fn (s &RenderingServer) particles_set_randomness_ratio(particles RID, ratio f64)

Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member GPUParticles3D.randomness].

fn (RenderingServer) particles_set_interp_to_end #

fn (s &RenderingServer) particles_set_interp_to_end(particles RID, factor f64)

Sets the value that informs a [ParticleProcessMaterial] to rush all particles towards the end of their lifetime.

fn (RenderingServer) particles_set_emitter_velocity #

fn (s &RenderingServer) particles_set_emitter_velocity(particles RID, velocity Vector3)

Sets the velocity of a particle node, that will be used by [member ParticleProcessMaterial.inherit_velocity_ratio].

fn (RenderingServer) particles_set_custom_aabb #

fn (s &RenderingServer) particles_set_custom_aabb(particles RID, aabb AABB)

Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member GPUParticles3D.visibility_aabb].

fn (RenderingServer) particles_set_speed_scale #

fn (s &RenderingServer) particles_set_speed_scale(particles RID, scale f64)

Sets the speed scale of the particle system. Equivalent to [member GPUParticles3D.speed_scale].

fn (RenderingServer) particles_set_use_local_coordinates #

fn (s &RenderingServer) particles_set_use_local_coordinates(particles RID, enable bool)

If true, particles use local coordinates. If false they use global coordinates. Equivalent to [member GPUParticles3D.local_coords].

fn (RenderingServer) particles_set_process_material #

fn (s &RenderingServer) particles_set_process_material(particles RID, material RID)

Sets the material for processing the particles. [b]Note:[/b] This is not the material used to draw the materials. Equivalent to [member GPUParticles3D.process_material].

fn (RenderingServer) particles_set_fixed_fps #

fn (s &RenderingServer) particles_set_fixed_fps(particles RID, fps i64)

Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member GPUParticles3D.fixed_fps].

fn (RenderingServer) particles_set_interpolate #

fn (s &RenderingServer) particles_set_interpolate(particles RID, enable bool)

fn (RenderingServer) particles_set_fractional_delta #

fn (s &RenderingServer) particles_set_fractional_delta(particles RID, enable bool)

If true, uses fractional delta which smooths the movement of the particles. Equivalent to [member GPUParticles3D.fract_delta].

fn (RenderingServer) particles_set_collision_base_size #

fn (s &RenderingServer) particles_set_collision_base_size(particles RID, size f64)

fn (RenderingServer) particles_set_transform_align #

fn (s &RenderingServer) particles_set_transform_align(particles RID, align RenderingServerParticlesTransformAlign)

fn (RenderingServer) particles_set_trails #

fn (s &RenderingServer) particles_set_trails(particles RID, enable bool, length_sec f64)

If [param enable] is true, enables trails for the [param particles] with the specified [param length_sec] in seconds. Equivalent to [member GPUParticles3D.trail_enabled] and [member GPUParticles3D.trail_lifetime].

fn (RenderingServer) particles_set_trail_bind_poses #

fn (s &RenderingServer) particles_set_trail_bind_poses(particles RID, bind_poses Array)

fn (RenderingServer) particles_is_inactive #

fn (s &RenderingServer) particles_is_inactive(particles RID) bool

Returns true if particles are not emitting and particles are set to inactive.

fn (RenderingServer) particles_request_process #

fn (s &RenderingServer) particles_request_process(particles RID)

Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray].

fn (RenderingServer) particles_restart #

fn (s &RenderingServer) particles_restart(particles RID)

Reset the particles on the next update. Equivalent to [method GPUParticles3D.restart].

fn (RenderingServer) particles_set_subemitter #

fn (s &RenderingServer) particles_set_subemitter(particles RID, subemitter_particles RID)

fn (RenderingServer) particles_emit #

fn (s &RenderingServer) particles_emit(particles RID, transform Transform3D, velocity Vector3, color Color, custom Color, emit_flags i64)

Manually emits particles from the [param particles] instance.

fn (RenderingServer) particles_set_draw_order #

fn (s &RenderingServer) particles_set_draw_order(particles RID, order RenderingServerParticlesDrawOrder)

Sets the draw order of the particles. Equivalent to [member GPUParticles3D.draw_order].

fn (RenderingServer) particles_set_draw_passes #

fn (s &RenderingServer) particles_set_draw_passes(particles RID, count i64)

Sets the number of draw passes to use. Equivalent to [member GPUParticles3D.draw_passes].

fn (RenderingServer) particles_set_draw_pass_mesh #

fn (s &RenderingServer) particles_set_draw_pass_mesh(particles RID, pass i64, mesh RID)

Sets the mesh to be used for the specified draw pass. Equivalent to [member GPUParticles3D.draw_pass_1], [member GPUParticles3D.draw_pass_2], [member GPUParticles3D.draw_pass_3], and [member GPUParticles3D.draw_pass_4].

fn (RenderingServer) particles_get_current_aabb #

fn (s &RenderingServer) particles_get_current_aabb(particles RID) AABB

Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method GPUParticles3D.capture_aabb].

fn (RenderingServer) particles_set_emission_transform #

fn (s &RenderingServer) particles_set_emission_transform(particles RID, transform Transform3D)

Sets the [Transform3D] that will be used by the particles when they first emit.

fn (RenderingServer) particles_collision_create #

fn (s &RenderingServer) particles_collision_create() RID

Creates a new 3D GPU particle collision or attractor and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most particles_collision_* RenderingServer functions. [b]Note:[/b] The equivalent nodes are [GPUParticlesCollision3D] and [GPUParticlesAttractor3D].

fn (RenderingServer) particles_collision_set_collision_type #

fn (s &RenderingServer) particles_collision_set_collision_type(particles_collision RID, gd_type RenderingServerParticlesCollisionType)

Sets the collision or attractor shape [param type] for the 3D GPU particles collision or attractor specified by the [param particles_collision] RID.

fn (RenderingServer) particles_collision_set_cull_mask #

fn (s &RenderingServer) particles_collision_set_cull_mask(particles_collision RID, mask i64)

Sets the cull [param mask] for the 3D GPU particles collision or attractor specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollision3D.cull_mask] or [member GPUParticlesAttractor3D.cull_mask] depending on the [param particles_collision] type.

fn (RenderingServer) particles_collision_set_sphere_radius #

fn (s &RenderingServer) particles_collision_set_sphere_radius(particles_collision RID, radius f64)

Sets the [param radius] for the 3D GPU particles sphere collision or attractor specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionSphere3D.radius] or [member GPUParticlesAttractorSphere3D.radius] depending on the [param particles_collision] type.

fn (RenderingServer) particles_collision_set_box_extents #

fn (s &RenderingServer) particles_collision_set_box_extents(particles_collision RID, extents Vector3)

Sets the [param extents] for the 3D GPU particles collision by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionBox3D.size], [member GPUParticlesCollisionSDF3D.size], [member GPUParticlesCollisionHeightField3D.size], [member GPUParticlesAttractorBox3D.size] or [member GPUParticlesAttractorVectorField3D.size] depending on the [param particles_collision] type.

fn (RenderingServer) particles_collision_set_attractor_strength #

fn (s &RenderingServer) particles_collision_set_attractor_strength(particles_collision RID, strength f64)

Sets the [param strength] for the 3D GPU particles attractor specified by the [param particles_collision] RID. Only used for attractors, not colliders. Equivalent to [member GPUParticlesAttractor3D.strength].

fn (RenderingServer) particles_collision_set_attractor_directionality #

fn (s &RenderingServer) particles_collision_set_attractor_directionality(particles_collision RID, amount f64)

Sets the directionality [param amount] for the 3D GPU particles attractor specified by the [param particles_collision] RID. Only used for attractors, not colliders. Equivalent to [member GPUParticlesAttractor3D.directionality].

fn (RenderingServer) particles_collision_set_attractor_attenuation #

fn (s &RenderingServer) particles_collision_set_attractor_attenuation(particles_collision RID, curve f64)

Sets the attenuation [param curve] for the 3D GPU particles attractor specified by the [param particles_collision] RID. Only used for attractors, not colliders. Equivalent to [member GPUParticlesAttractor3D.attenuation].

fn (RenderingServer) particles_collision_set_field_texture #

fn (s &RenderingServer) particles_collision_set_field_texture(particles_collision RID, texture RID)

Sets the signed distance field [param texture] for the 3D GPU particles collision specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionSDF3D.texture] or [member GPUParticlesAttractorVectorField3D.texture] depending on the [param particles_collision] type.

fn (RenderingServer) particles_collision_height_field_update #

fn (s &RenderingServer) particles_collision_height_field_update(particles_collision RID)

Requests an update for the 3D GPU particle collision heightfield. This may be automatically called by the 3D GPU particle collision heightfield depending on its [member GPUParticlesCollisionHeightField3D.update_mode].

fn (RenderingServer) particles_collision_set_height_field_resolution #

fn (s &RenderingServer) particles_collision_set_height_field_resolution(particles_collision RID, resolution RenderingServerParticlesCollisionHeightfieldResolution)

Sets the heightmap [param resolution] for the 3D GPU particles heightfield collision specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionHeightField3D.resolution].

fn (RenderingServer) particles_collision_set_height_field_mask #

fn (s &RenderingServer) particles_collision_set_height_field_mask(particles_collision RID, mask i64)

Sets the heightfield [param mask] for the 3D GPU particles heightfield collision specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionHeightField3D.heightfield_mask].

fn (RenderingServer) fog_volume_create #

fn (s &RenderingServer) fog_volume_create() RID

Creates a new fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all fog_volume_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [FogVolume].

fn (RenderingServer) fog_volume_set_shape #

fn (s &RenderingServer) fog_volume_set_shape(fog_volume RID, shape RenderingServerFogVolumeShape)

Sets the shape of the fog volume to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD].

fn (RenderingServer) fog_volume_set_size #

fn (s &RenderingServer) fog_volume_set_size(fog_volume RID, size Vector3)

Sets the size of the fog volume when shape is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX].

fn (RenderingServer) fog_volume_set_material #

fn (s &RenderingServer) fog_volume_set_material(fog_volume RID, material RID)

Sets the [Material] of the fog volume. Can be either a [FogMaterial] or a custom [ShaderMaterial].

fn (RenderingServer) visibility_notifier_create #

fn (s &RenderingServer) visibility_notifier_create() RID

Creates a new 3D visibility notifier object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all visibility_notifier_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. To place in a scene, attach this notifier to an instance using [method instance_set_base] using the returned RID. [b]Note:[/b] The equivalent node is [VisibleOnScreenNotifier3D].

fn (RenderingServer) visibility_notifier_set_aabb #

fn (s &RenderingServer) visibility_notifier_set_aabb(notifier RID, aabb AABB)

fn (RenderingServer) visibility_notifier_set_callbacks #

fn (s &RenderingServer) visibility_notifier_set_callbacks(notifier RID, enter_callable Callable, exit_callable Callable)

fn (RenderingServer) occluder_create #

fn (s &RenderingServer) occluder_create() RID

Creates an occluder instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all occluder_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Occluder3D] (not to be confused with the [OccluderInstance3D] node).

fn (RenderingServer) occluder_set_mesh #

fn (s &RenderingServer) occluder_set_mesh(occluder RID, vertices PackedVector3Array, indices PackedInt32Array)

Sets the mesh data for the given occluder RID, which controls the shape of the occlusion culling that will be performed.

fn (RenderingServer) camera_create #

fn (s &RenderingServer) camera_create() RID

Creates a 3D camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all camera_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [Camera3D].

fn (RenderingServer) camera_set_perspective #

fn (s &RenderingServer) camera_set_perspective(camera RID, fovy_degrees f64, z_near f64, z_far f64)

Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away.

fn (RenderingServer) camera_set_orthogonal #

fn (s &RenderingServer) camera_set_orthogonal(camera RID, size f64, z_near f64, z_far f64)

Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are.

fn (RenderingServer) camera_set_frustum #

fn (s &RenderingServer) camera_set_frustum(camera RID, size f64, offset Vector2, z_near f64, z_far f64)

Sets camera to use frustum projection. This mode allows adjusting the [param offset] argument to create "tilted frustum" effects.

fn (RenderingServer) camera_set_transform #

fn (s &RenderingServer) camera_set_transform(camera RID, transform Transform3D)

Sets [Transform3D] of camera.

fn (RenderingServer) camera_set_cull_mask #

fn (s &RenderingServer) camera_set_cull_mask(camera RID, layers i64)

Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera3D.cull_mask].

fn (RenderingServer) camera_set_environment #

fn (s &RenderingServer) camera_set_environment(camera RID, env RID)

Sets the environment used by this camera. Equivalent to [member Camera3D.environment].

fn (RenderingServer) camera_set_camera_attributes #

fn (s &RenderingServer) camera_set_camera_attributes(camera RID, effects RID)

Sets the camera_attributes created with [method camera_attributes_create] to the given camera.

fn (RenderingServer) camera_set_compositor #

fn (s &RenderingServer) camera_set_compositor(camera RID, compositor RID)

Sets the compositor used by this camera. Equivalent to [member Camera3D.compositor].

fn (RenderingServer) camera_set_use_vertical_aspect #

fn (s &RenderingServer) camera_set_use_vertical_aspect(camera RID, enable bool)

If true, preserves the horizontal aspect ratio which is equivalent to [constant Camera3D.KEEP_WIDTH]. If false, preserves the vertical aspect ratio which is equivalent to [constant Camera3D.KEEP_HEIGHT].

fn (RenderingServer) viewport_create #

fn (s &RenderingServer) viewport_create() RID

Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all viewport_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [Viewport].

fn (RenderingServer) viewport_set_use_xr #

fn (s &RenderingServer) viewport_set_use_xr(viewport RID, use_xr bool)

If true, the viewport uses augmented or virtual reality technologies. See [XRInterface].

fn (RenderingServer) viewport_set_size #

fn (s &RenderingServer) viewport_set_size(viewport RID, width i64, height i64)

Sets the viewport's width and height in pixels.

fn (RenderingServer) viewport_set_active #

fn (s &RenderingServer) viewport_set_active(viewport RID, active bool)

If true, sets the viewport active, else sets it inactive.

fn (RenderingServer) viewport_set_parent_viewport #

fn (s &RenderingServer) viewport_set_parent_viewport(viewport RID, parent_viewport RID)

Sets the viewport's parent to the viewport specified by the [param parent_viewport] RID.

fn (RenderingServer) viewport_attach_to_screen #

fn (s &RenderingServer) viewport_attach_to_screen(viewport RID, cfg RenderingServer_viewport_attach_to_screen_Cfg)

Copies the viewport to a region of the screen specified by [param rect]. If [method viewport_set_render_direct_to_screen] is true, then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. For example, you can set the root viewport to not render at all with the following code: [codeblocks] [gdscript] func _ready(): RenderingServer.viewport_attach_to_screen(get_viewport().get_viewport_rid(), Rect2()) RenderingServer.viewport_attach_to_screen($Viewport.get_viewport_rid(), Rect2(0, 0, 600, 600)) [/gdscript] [/codeblocks] Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see [method viewport_set_render_direct_to_screen].

fn (RenderingServer) viewport_set_render_direct_to_screen #

fn (s &RenderingServer) viewport_set_render_direct_to_screen(viewport RID, enabled bool)

If true, render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the screen_texture. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.

fn (RenderingServer) viewport_set_canvas_cull_mask #

fn (s &RenderingServer) viewport_set_canvas_cull_mask(viewport RID, canvas_cull_mask i64)

Sets the rendering mask associated with this [Viewport]. Only [CanvasItem] nodes with a matching rendering visibility layer will be rendered by this [Viewport].

fn (RenderingServer) viewport_set_scaling_3d_mode #

fn (s &RenderingServer) viewport_set_scaling_3d_mode(viewport RID, scaling_3d_mode RenderingServerViewportScaling3DMode)

Sets the 3D resolution scaling mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.

fn (RenderingServer) viewport_set_scaling_3d_scale #

fn (s &RenderingServer) viewport_set_scaling_3d_scale(viewport RID, scale f64)

Scales the 3D render buffer based on the viewport size uses an image filter specified in [enum ViewportScaling3DMode] to scale the output image to the full viewport size. Values lower than 1.0 can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than 1.0 are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [enum ViewportMSAA] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons. When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.

fn (RenderingServer) viewport_set_fsr_sharpness #

fn (s &RenderingServer) viewport_set_fsr_sharpness(viewport RID, sharpness f64)

Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.

fn (RenderingServer) viewport_set_texture_mipmap_bias #

fn (s &RenderingServer) viewport_set_texture_mipmap_bias(viewport RID, mipmap_bias f64)

Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between -0.75 and 0.0. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias. [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is -log2(1.0 / scale) + mipmap_bias.

fn (RenderingServer) viewport_set_anisotropic_filtering_level #

fn (s &RenderingServer) viewport_set_anisotropic_filtering_level(viewport RID, anisotropic_filtering_level RenderingServerViewportAnisotropicFiltering)

Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of 0 forcibly disables anisotropic filtering, even on materials where it is enabled. The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See [member ProjectSettings.rendering/textures/decals/filter] and [member ProjectSettings.rendering/textures/light_projectors/filter]. [b]Note:[/b] In 3D, for this setting to have an effect, set [member BaseMaterial3D.texture_filter] to [constant BaseMaterial3D.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC] or [constant BaseMaterial3D.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC] on materials. [b]Note:[/b] In 2D, for this setting to have an effect, set [member CanvasItem.texture_filter] to [constant CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC] or [constant CanvasItem.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC] on the [CanvasItem] node displaying the texture (or in [CanvasTexture]). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference.

fn (RenderingServer) viewport_set_update_mode #

fn (s &RenderingServer) viewport_set_update_mode(viewport RID, update_mode RenderingServerViewportUpdateMode)

Sets when the viewport should be updated.

fn (RenderingServer) viewport_get_update_mode #

fn (s &RenderingServer) viewport_get_update_mode(viewport RID) RenderingServerViewportUpdateMode

Returns the viewport's update mode. [b]Warning:[/b] Calling this from any thread other than the rendering thread will be detrimental to performance.

fn (RenderingServer) viewport_set_clear_mode #

fn (s &RenderingServer) viewport_set_clear_mode(viewport RID, clear_mode RenderingServerViewportClearMode)

Sets the clear mode of a viewport.

fn (RenderingServer) viewport_get_render_target #

fn (s &RenderingServer) viewport_get_render_target(viewport RID) RID

Returns the render target for the viewport.

fn (RenderingServer) viewport_get_texture #

fn (s &RenderingServer) viewport_get_texture(viewport RID) RID

Returns the viewport's last rendered frame.

fn (RenderingServer) viewport_set_disable_3d #

fn (s &RenderingServer) viewport_set_disable_3d(viewport RID, disable bool)

If true, the viewport's 3D elements are not rendered.

fn (RenderingServer) viewport_set_disable_2d #

fn (s &RenderingServer) viewport_set_disable_2d(viewport RID, disable bool)

If true, the viewport's canvas (i.e. 2D and GUI elements) is not rendered.

fn (RenderingServer) viewport_set_environment_mode #

fn (s &RenderingServer) viewport_set_environment_mode(viewport RID, mode RenderingServerViewportEnvironmentMode)

Sets the viewport's environment mode which allows enabling or disabling rendering of 3D environment over 2D canvas. When disabled, 2D will not be affected by the environment. When enabled, 2D will be affected by the environment if the environment background mode is [constant ENV_BG_CANVAS]. The default behavior is to inherit the setting from the viewport's parent. If the topmost parent is also set to [constant VIEWPORT_ENVIRONMENT_INHERIT], then the behavior will be the same as if it was set to [constant VIEWPORT_ENVIRONMENT_ENABLED].

fn (RenderingServer) viewport_attach_camera #

fn (s &RenderingServer) viewport_attach_camera(viewport RID, camera RID)

Sets a viewport's camera.

fn (RenderingServer) viewport_set_scenario #

fn (s &RenderingServer) viewport_set_scenario(viewport RID, scenario RID)

Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas, etc.

fn (RenderingServer) viewport_attach_canvas #

fn (s &RenderingServer) viewport_attach_canvas(viewport RID, canvas RID)

Sets a viewport's canvas.

fn (RenderingServer) viewport_remove_canvas #

fn (s &RenderingServer) viewport_remove_canvas(viewport RID, canvas RID)

Detaches a viewport from a canvas.

fn (RenderingServer) viewport_set_snap_2d_transforms_to_pixel #

fn (s &RenderingServer) viewport_set_snap_2d_transforms_to_pixel(viewport RID, enabled bool)

If true, canvas item transforms (i.e. origin position) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when [Camera2D] smoothing is enabled. Equivalent to [member ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel].

fn (RenderingServer) viewport_set_snap_2d_vertices_to_pixel #

fn (s &RenderingServer) viewport_set_snap_2d_vertices_to_pixel(viewport RID, enabled bool)

If true, canvas item vertices (i.e. polygon points) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when [Camera2D] smoothing is enabled. Equivalent to [member ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel].

fn (RenderingServer) viewport_set_default_canvas_item_texture_filter #

fn (s &RenderingServer) viewport_set_default_canvas_item_texture_filter(viewport RID, filter RenderingServerCanvasItemTextureFilter)

Sets the default texture filtering mode for the specified [param viewport] RID.

fn (RenderingServer) viewport_set_default_canvas_item_texture_repeat #

fn (s &RenderingServer) viewport_set_default_canvas_item_texture_repeat(viewport RID, repeat RenderingServerCanvasItemTextureRepeat)

Sets the default texture repeat mode for the specified [param viewport] RID.

fn (RenderingServer) viewport_set_canvas_transform #

fn (s &RenderingServer) viewport_set_canvas_transform(viewport RID, canvas RID, offset Transform2D)

Sets the transformation of a viewport's canvas.

fn (RenderingServer) viewport_set_canvas_stacking #

fn (s &RenderingServer) viewport_set_canvas_stacking(viewport RID, canvas RID, layer i64, sublayer i64)

Sets the stacking order for a viewport's canvas. [param layer] is the actual canvas layer, while [param sublayer] specifies the stacking order of the canvas among those in the same layer. [b]Note:[/b] [param layer] should be between [constant CANVAS_LAYER_MIN] and [constant CANVAS_LAYER_MAX] (inclusive). Any other value will wrap around.

fn (RenderingServer) viewport_set_transparent_background #

fn (s &RenderingServer) viewport_set_transparent_background(viewport RID, enabled bool)

If true, the viewport renders its background as transparent.

fn (RenderingServer) viewport_set_global_canvas_transform #

fn (s &RenderingServer) viewport_set_global_canvas_transform(viewport RID, transform Transform2D)

Sets the viewport's global transformation matrix.

fn (RenderingServer) viewport_set_sdf_oversize_and_scale #

fn (s &RenderingServer) viewport_set_sdf_oversize_and_scale(viewport RID, oversize RenderingServerViewportSDFOversize, scale RenderingServerViewportSDFScale)

Sets the viewport's 2D signed distance field [member ProjectSettings.rendering/2d/sdf/oversize] and [member ProjectSettings.rendering/2d/sdf/scale]. This is used when sampling the signed distance field in [CanvasItem] shaders as well as [GPUParticles2D] collision. This is [i]not[/i] used by SDFGI in 3D rendering.

fn (RenderingServer) viewport_set_positional_shadow_atlas_size #

fn (s &RenderingServer) viewport_set_positional_shadow_atlas_size(viewport RID, size i64, cfg RenderingServer_viewport_set_positional_shadow_atlas_size_Cfg)

Sets the [param size] of the shadow atlas's images (used for omni and spot lights) on the viewport specified by the [param viewport] RID. The value is rounded up to the nearest power of 2. If [param use_16_bits] is true, use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. [b]Note:[/b] If this is set to 0, no positional shadows will be visible at all. This can improve performance significantly on low-end systems by reducing both the CPU and GPU load (as fewer draw calls are needed to draw the scene without shadows).

fn (RenderingServer) viewport_set_positional_shadow_atlas_quadrant_subdivision #

fn (s &RenderingServer) viewport_set_positional_shadow_atlas_quadrant_subdivision(viewport RID, quadrant i64, subdivision i64)

Sets the number of subdivisions to use in the specified shadow atlas [param quadrant] for omni and spot shadows. See also [method Viewport.set_positional_shadow_atlas_quadrant_subdiv].

fn (RenderingServer) viewport_set_msaa_3d #

fn (s &RenderingServer) viewport_set_msaa_3d(viewport RID, msaa RenderingServerViewportMSAA)

Sets the multisample antialiasing mode for 3D on the specified [param viewport] RID. Equivalent to [member ProjectSettings.rendering/anti_aliasing/quality/msaa_3d] or [member Viewport.msaa_3d].

fn (RenderingServer) viewport_set_msaa_2d #

fn (s &RenderingServer) viewport_set_msaa_2d(viewport RID, msaa RenderingServerViewportMSAA)

Sets the multisample antialiasing mode for 2D/Canvas on the specified [param viewport] RID. Equivalent to [member ProjectSettings.rendering/anti_aliasing/quality/msaa_2d] or [member Viewport.msaa_2d].

fn (RenderingServer) viewport_set_use_hdr_2d #

fn (s &RenderingServer) viewport_set_use_hdr_2d(viewport RID, enabled bool)

If true, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an RGBA16 framebuffer, while when using the Mobile renderer it will be an RGB10_A2 framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the 0-1 range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as [member Viewport.use_hdr_2d]. [b]Note:[/b] This setting will have no effect when using the Compatibility renderer, which always renders in low dynamic range for performance reasons.

fn (RenderingServer) viewport_set_screen_space_aa #

fn (s &RenderingServer) viewport_set_screen_space_aa(viewport RID, mode RenderingServerViewportScreenSpaceAA)

Sets the viewport's screen-space antialiasing mode. Equivalent to [member ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa] or [member Viewport.screen_space_aa].

fn (RenderingServer) viewport_set_use_taa #

fn (s &RenderingServer) viewport_set_use_taa(viewport RID, enable bool)

If true, use temporal antialiasing. Equivalent to [member ProjectSettings.rendering/anti_aliasing/quality/use_taa] or [member Viewport.use_taa].

fn (RenderingServer) viewport_set_use_debanding #

fn (s &RenderingServer) viewport_set_use_debanding(viewport RID, enable bool)

If true, enables debanding on the specified viewport. Equivalent to [member ProjectSettings.rendering/anti_aliasing/quality/use_debanding] or [member Viewport.use_debanding].

fn (RenderingServer) viewport_set_use_occlusion_culling #

fn (s &RenderingServer) viewport_set_use_occlusion_culling(viewport RID, enable bool)

If true, enables occlusion culling on the specified viewport. Equivalent to [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling].

fn (RenderingServer) viewport_set_occlusion_rays_per_thread #

fn (s &RenderingServer) viewport_set_occlusion_rays_per_thread(rays_per_thread i64)

Sets the [member ProjectSettings.rendering/occlusion_culling/occlusion_rays_per_thread] to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis.

fn (RenderingServer) viewport_set_occlusion_culling_build_quality #

fn (s &RenderingServer) viewport_set_occlusion_culling_build_quality(quality RenderingServerViewportOcclusionCullingBuildQuality)

Sets the [member ProjectSettings.rendering/occlusion_culling/bvh_build_quality] to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis.

fn (RenderingServer) viewport_get_render_info #

fn (s &RenderingServer) viewport_get_render_info(viewport RID, gd_type RenderingServerViewportRenderInfoType, info RenderingServerViewportRenderInfo) i64

Returns a statistic about the rendering engine which can be used for performance profiling. This is separated into render pass [param type]s, each of them having the same [param info]s you can query (different passes will return different values). See also [method get_rendering_info], which returns global information across all viewports. [b]Note:[/b] Viewport rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, [method viewport_get_render_info] returns 0. To print rendering information in _ready() successfully, use the following:

func _ready():
for _i in 2:
await get_tree().process_frame

print(
RenderingServer.viewport_get_render_info(get_viewport().get_viewport_rid(),
RenderingServer.VIEWPORT_RENDER_INFO_TYPE_VISIBLE,
RenderingServer.VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME)
)

fn (RenderingServer) viewport_set_debug_draw #

fn (s &RenderingServer) viewport_set_debug_draw(viewport RID, draw RenderingServerViewportDebugDraw)

Sets the debug draw mode of a viewport.

fn (RenderingServer) viewport_set_measure_render_time #

fn (s &RenderingServer) viewport_set_measure_render_time(viewport RID, enable bool)

Sets the measurement for the given [param viewport] RID (obtained using [method Viewport.get_viewport_rid]). Once enabled, [method viewport_get_measured_render_time_cpu] and [method viewport_get_measured_render_time_gpu] will return values greater than 0.0 when queried with the given [param viewport].

fn (RenderingServer) viewport_get_measured_render_time_cpu #

fn (s &RenderingServer) viewport_get_measured_render_time_cpu(viewport RID) f64

Returns the CPU time taken to render the last frame in milliseconds. This [i]only[/i] includes time spent in rendering-related operations; scripts' _process functions and other engine subsystems are not included in this readout. To get a complete readout of CPU time spent to render the scene, sum the render times of all viewports that are drawn every frame plus [method get_frame_setup_time_cpu]. Unlike [method Engine.get_frames_per_second], this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or [member Engine.max_fps]. See also [method viewport_get_measured_render_time_gpu]. [b]Note:[/b] Requires measurements to be enabled on the specified [param viewport] using [method viewport_set_measure_render_time]. Otherwise, this method returns 0.0.

fn (RenderingServer) viewport_get_measured_render_time_gpu #

fn (s &RenderingServer) viewport_get_measured_render_time_gpu(viewport RID) f64

Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike [method Engine.get_frames_per_second], this method accurately reflects GPU utilization even if framerate is capped via V-Sync or [member Engine.max_fps]. See also [method viewport_get_measured_render_time_cpu]. [b]Note:[/b] Requires measurements to be enabled on the specified [param viewport] using [method viewport_set_measure_render_time]. Otherwise, this method returns 0.0. [b]Note:[/b] When GPU utilization is low enough during a certain period of time, GPUs will decrease their power state (which in turn decreases core and memory clock speeds). This can cause the reported GPU time to increase if GPU utilization is kept low enough by a framerate cap (compared to what it would be at the GPU's highest power state). Keep this in mind when benchmarking using [method viewport_get_measured_render_time_gpu]. This behavior can be overridden in the graphics driver settings at the cost of higher power usage.

fn (RenderingServer) viewport_set_vrs_mode #

fn (s &RenderingServer) viewport_set_vrs_mode(viewport RID, mode RenderingServerViewportVRSMode)

Sets the Variable Rate Shading (VRS) mode for the viewport. If the GPU does not support VRS, this property is ignored. Equivalent to [member ProjectSettings.rendering/vrs/mode].

fn (RenderingServer) viewport_set_vrs_update_mode #

fn (s &RenderingServer) viewport_set_vrs_update_mode(viewport RID, mode RenderingServerViewportVRSUpdateMode)

Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored. If set to [constant RenderingServer.VIEWPORT_VRS_UPDATE_ONCE], the input texture is copied once and the mode is changed to [constant RenderingServer.VIEWPORT_VRS_UPDATE_DISABLED].

fn (RenderingServer) viewport_set_vrs_texture #

fn (s &RenderingServer) viewport_set_vrs_texture(viewport RID, texture RID)

The texture to use when the VRS mode is set to [constant RenderingServer.VIEWPORT_VRS_TEXTURE]. Equivalent to [member ProjectSettings.rendering/vrs/texture].

fn (RenderingServer) sky_create #

fn (s &RenderingServer) sky_create() RID

Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all sky_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method.

fn (RenderingServer) sky_set_radiance_size #

fn (s &RenderingServer) sky_set_radiance_size(sky RID, radiance_size i64)

Sets the [param radiance_size] of the sky specified by the [param sky] RID (in pixels). Equivalent to [member Sky.radiance_size].

fn (RenderingServer) sky_set_mode #

fn (s &RenderingServer) sky_set_mode(sky RID, mode RenderingServerSkyMode)

Sets the process [param mode] of the sky specified by the [param sky] RID. Equivalent to [member Sky.process_mode].

fn (RenderingServer) sky_set_material #

fn (s &RenderingServer) sky_set_material(sky RID, material RID)

Sets the material that the sky uses to render the background, ambient and reflection maps.

fn (RenderingServer) sky_bake_panorama #

fn (s &RenderingServer) sky_bake_panorama(sky RID, energy f64, bake_irradiance bool, size Vector2i) Image

Generates and returns an [Image] containing the radiance map for the specified [param sky] RID. This supports built-in sky material and custom sky shaders. If [param bake_irradiance] is true, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also [method environment_bake_panorama]. [b]Note:[/b] The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. [param energy] values above 1.0 can be used to brighten the resulting image. [b]Note:[/b] [param size] should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than [member Sky.radiance_size], as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map.

fn (RenderingServer) compositor_effect_create #

fn (s &RenderingServer) compositor_effect_create() RID

Creates a new rendering effect and adds it to the RenderingServer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method.

fn (RenderingServer) compositor_effect_set_enabled #

fn (s &RenderingServer) compositor_effect_set_enabled(effect RID, enabled bool)

Enables/disables this rendering effect.

fn (RenderingServer) compositor_effect_set_callback #

fn (s &RenderingServer) compositor_effect_set_callback(effect RID, callback_type RenderingServerCompositorEffectCallbackType, callback Callable)

Sets the callback type ([param callback_type]) and callback method([param callback]) for this rendering effect.

fn (RenderingServer) compositor_effect_set_flag #

fn (s &RenderingServer) compositor_effect_set_flag(effect RID, flag RenderingServerCompositorEffectFlags, set bool)

Sets the flag ([param flag]) for this rendering effect to true or false ([param set]).

fn (RenderingServer) compositor_create #

fn (s &RenderingServer) compositor_create() RID

Creates a new compositor and adds it to the RenderingServer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method.

fn (RenderingServer) compositor_set_compositor_effects #

fn (s &RenderingServer) compositor_set_compositor_effects(compositor RID, effects Array)

Sets the compositor effects for the specified compositor RID. [param effects] should be an array containing RIDs created with [method compositor_effect_create].

fn (RenderingServer) environment_create #

fn (s &RenderingServer) environment_create() RID

Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all environment_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [Environment].

fn (RenderingServer) environment_set_background #

fn (s &RenderingServer) environment_set_background(env RID, bg RenderingServerEnvironmentBG)

Sets the environment's background mode. Equivalent to [member Environment.background_mode].

fn (RenderingServer) environment_set_camera_id #

fn (s &RenderingServer) environment_set_camera_id(env RID, id i64)

Sets the camera ID to be used as environment background.

fn (RenderingServer) environment_set_sky #

fn (s &RenderingServer) environment_set_sky(env RID, sky RID)

Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.sky].

fn (RenderingServer) environment_set_sky_custom_fov #

fn (s &RenderingServer) environment_set_sky_custom_fov(env RID, scale f64)

Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.sky_custom_fov].

fn (RenderingServer) environment_set_sky_orientation #

fn (s &RenderingServer) environment_set_sky_orientation(env RID, orientation Basis)

Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis].

fn (RenderingServer) environment_set_bg_color #

fn (s &RenderingServer) environment_set_bg_color(env RID, color Color)

Color displayed for clear areas of the scene. Only effective if using the [constant ENV_BG_COLOR] background mode.

fn (RenderingServer) environment_set_bg_energy #

fn (s &RenderingServer) environment_set_bg_energy(env RID, multiplier f64, exposure_value f64)

Sets the intensity of the background color.

fn (RenderingServer) environment_set_canvas_max_layer #

fn (s &RenderingServer) environment_set_canvas_max_layer(env RID, max_layer i64)

Sets the maximum layer to use if using Canvas background mode.

fn (RenderingServer) environment_set_ambient_light #

fn (s &RenderingServer) environment_set_ambient_light(env RID, color Color, cfg RenderingServer_environment_set_ambient_light_Cfg)

Sets the values to be used for ambient light rendering. See [Environment] for more details.

fn (RenderingServer) environment_set_glow #

fn (s &RenderingServer) environment_set_glow(env RID, enable bool, levels PackedFloat32Array, intensity f64, strength f64, mix f64, bloom_threshold f64, blend_mode RenderingServerEnvironmentGlowBlendMode, hdr_bleed_threshold f64, hdr_bleed_scale f64, hdr_luminance_cap f64, glow_map_strength f64, glow_map RID)

Configures glow for the specified environment RID. See glow_* properties in [Environment] for more information.

fn (RenderingServer) environment_set_tonemap #

fn (s &RenderingServer) environment_set_tonemap(env RID, tone_mapper RenderingServerEnvironmentToneMapper, exposure f64, white f64)

Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details.

fn (RenderingServer) environment_set_adjustment #

fn (s &RenderingServer) environment_set_adjustment(env RID, enable bool, brightness f64, contrast f64, saturation f64, use_1d_color_correction bool, color_correction RID)

Sets the values to be used with the "adjustments" post-process effect. See [Environment] for more details.

fn (RenderingServer) environment_set_ssr #

fn (s &RenderingServer) environment_set_ssr(env RID, enable bool, max_steps i64, fade_in f64, fade_out f64, depth_tolerance f64)

Sets the variables to be used with the screen-space reflections (SSR) post-process effect. See [Environment] for more details.

fn (RenderingServer) environment_set_ssao #

fn (s &RenderingServer) environment_set_ssao(env RID, enable bool, radius f64, intensity f64, power f64, detail f64, horizon f64, sharpness f64, light_affect f64, ao_channel_affect f64)

Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details.

fn (RenderingServer) environment_set_fog #

fn (s &RenderingServer) environment_set_fog(env RID, enable bool, light_color Color, light_energy f64, sun_scatter f64, density f64, height f64, height_density f64, aerial_perspective f64, sky_affect f64, cfg RenderingServer_environment_set_fog_Cfg)

Configures fog for the specified environment RID. See fog_* properties in [Environment] for more information.

fn (RenderingServer) environment_set_fog_depth #

fn (s &RenderingServer) environment_set_fog_depth(env RID, curve f64, begin f64, end f64)

Configures fog depth for the specified environment RID. Only has an effect when the fog mode of the environment is [constant ENV_FOG_MODE_DEPTH]. See fog_depth_* properties in [Environment] for more information.

fn (RenderingServer) environment_set_sdfgi #

fn (s &RenderingServer) environment_set_sdfgi(env RID, enable bool, cascades i64, min_cell_size f64, y_scale RenderingServerEnvironmentSDFGIYScale, use_occlusion bool, bounce_feedback f64, read_sky bool, energy f64, normal_bias f64, probe_bias f64)

Configures signed distance field global illumination for the specified environment RID. See sdfgi_* properties in [Environment] for more information.

fn (RenderingServer) environment_set_volumetric_fog #

fn (s &RenderingServer) environment_set_volumetric_fog(env RID, enable bool, density f64, albedo Color, emission Color, emission_energy f64, anisotropy f64, length f64, p_detail_spread f64, gi_inject f64, temporal_reprojection bool, temporal_reprojection_amount f64, ambient_inject f64, sky_affect f64)

Sets the variables to be used with the volumetric fog post-process effect. See [Environment] for more details.

fn (RenderingServer) environment_glow_set_use_bicubic_upscale #

fn (s &RenderingServer) environment_glow_set_use_bicubic_upscale(enable bool)

If [param enable] is true, enables bicubic upscaling for glow which improves quality at the cost of performance. Equivalent to [member ProjectSettings.rendering/environment/glow/upscale_mode]. [b]Note:[/b] This setting is only effective when using the Forward+ or Mobile rendering methods, as Compatibility uses a different glow implementation.

fn (RenderingServer) environment_set_ssr_roughness_quality #

fn (s &RenderingServer) environment_set_ssr_roughness_quality(quality RenderingServerEnvironmentSSRRoughnessQuality)

fn (RenderingServer) environment_set_ssao_quality #

fn (s &RenderingServer) environment_set_ssao_quality(quality RenderingServerEnvironmentSSAOQuality, half_size bool, adaptive_target f64, blur_passes i64, fadeout_from f64, fadeout_to f64)

Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details.

fn (RenderingServer) environment_set_ssil_quality #

fn (s &RenderingServer) environment_set_ssil_quality(quality RenderingServerEnvironmentSSILQuality, half_size bool, adaptive_target f64, blur_passes i64, fadeout_from f64, fadeout_to f64)

Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See [Environment] for more details.

fn (RenderingServer) environment_set_sdfgi_ray_count #

fn (s &RenderingServer) environment_set_sdfgi_ray_count(ray_count RenderingServerEnvironmentSDFGIRayCount)

Sets the number of rays to throw per frame when computing signed distance field global illumination. Equivalent to [member ProjectSettings.rendering/global_illumination/sdfgi/probe_ray_count].

fn (RenderingServer) environment_set_sdfgi_frames_to_converge #

fn (s &RenderingServer) environment_set_sdfgi_frames_to_converge(frames RenderingServerEnvironmentSDFGIFramesToConverge)

Sets the number of frames to use for converging signed distance field global illumination. Equivalent to [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_converge].

fn (RenderingServer) environment_set_sdfgi_frames_to_update_light #

fn (s &RenderingServer) environment_set_sdfgi_frames_to_update_light(frames RenderingServerEnvironmentSDFGIFramesToUpdateLight)

Sets the update speed for dynamic lights' indirect lighting when computing signed distance field global illumination. Equivalent to [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights].

fn (RenderingServer) environment_set_volumetric_fog_volume_size #

fn (s &RenderingServer) environment_set_volumetric_fog_volume_size(size i64, depth i64)

Sets the resolution of the volumetric fog's froxel buffer. [param size] is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While [param depth] is directly used to set the depth of the buffer.

fn (RenderingServer) environment_set_volumetric_fog_filter_active #

fn (s &RenderingServer) environment_set_volumetric_fog_filter_active(active bool)

Enables filtering of the volumetric fog scattering buffer. This results in much smoother volumes with very few under-sampling artifacts.

fn (RenderingServer) environment_bake_panorama #

fn (s &RenderingServer) environment_bake_panorama(environment RID, bake_irradiance bool, size Vector2i) Image

Generates and returns an [Image] containing the radiance map for the specified [param environment] RID's sky. This supports built-in sky material and custom sky shaders. If [param bake_irradiance] is true, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also [method sky_bake_panorama]. [b]Note:[/b] The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. [b]Note:[/b] [param size] should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than [member Sky.radiance_size], as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map.

fn (RenderingServer) screen_space_roughness_limiter_set_active #

fn (s &RenderingServer) screen_space_roughness_limiter_set_active(enable bool, amount f64, limit f64)

Sets the screen-space roughness limiter parameters, such as whether it should be enabled and its thresholds. Equivalent to [member ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/enabled], [member ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/amount] and [member ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/limit].

fn (RenderingServer) sub_surface_scattering_set_quality #

fn (s &RenderingServer) sub_surface_scattering_set_quality(quality RenderingServerSubSurfaceScatteringQuality)

Sets [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality] to use when rendering materials that have subsurface scattering enabled.

fn (RenderingServer) sub_surface_scattering_set_scale #

fn (s &RenderingServer) sub_surface_scattering_set_scale(scale f64, depth_scale f64)

Sets the [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale] and [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale] to use when rendering materials that have subsurface scattering enabled.

fn (RenderingServer) camera_attributes_create #

fn (s &RenderingServer) camera_attributes_create() RID

Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all camera_attributes_ RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [CameraAttributes].

fn (RenderingServer) camera_attributes_set_dof_blur_quality #

fn (s &RenderingServer) camera_attributes_set_dof_blur_quality(quality RenderingServerDOFBlurQuality, use_jitter bool)

Sets the quality level of the DOF blur effect to [param quality]. [param use_jitter] can be used to jitter samples taken during the blur pass to hide artifacts at the cost of looking more fuzzy.

fn (RenderingServer) camera_attributes_set_dof_blur_bokeh_shape #

fn (s &RenderingServer) camera_attributes_set_dof_blur_bokeh_shape(shape RenderingServerDOFBokehShape)

Sets the shape of the DOF bokeh pattern to [param shape]. Different shapes may be used to achieve artistic effect, or to meet performance targets.

fn (RenderingServer) camera_attributes_set_dof_blur #

fn (s &RenderingServer) camera_attributes_set_dof_blur(camera_attributes RID, far_enable bool, far_distance f64, far_transition f64, near_enable bool, near_distance f64, near_transition f64, amount f64)

Sets the parameters to use with the DOF blur effect. These parameters take on the same meaning as their counterparts in [CameraAttributesPractical].

fn (RenderingServer) camera_attributes_set_exposure #

fn (s &RenderingServer) camera_attributes_set_exposure(camera_attributes RID, multiplier f64, normalization f64)

Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene. The normalization factor can be calculated from exposure value (EV100) as follows:

func get_exposure_normalization(ev100: float):
return 1.0 / (pow(2.0, ev100) * 1.2)

The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows:

func get_exposure(aperture: float, shutter_speed: float, sensitivity: float):
return log((aperture * aperture) / shutter_speed * (100.0 / sensitivity)) / log(2)

fn (RenderingServer) camera_attributes_set_auto_exposure #

fn (s &RenderingServer) camera_attributes_set_auto_exposure(camera_attributes RID, enable bool, min_sensitivity f64, max_sensitivity f64, speed f64, scale f64)

Sets the parameters to use with the auto-exposure effect. These parameters take on the same meaning as their counterparts in [CameraAttributes] and [CameraAttributesPractical].

fn (RenderingServer) scenario_create #

fn (s &RenderingServer) scenario_create() RID

Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all scenario_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. The scenario is the 3D world that all the visual instances exist in.

fn (RenderingServer) scenario_set_environment #

fn (s &RenderingServer) scenario_set_environment(scenario RID, environment RID)

Sets the environment that will be used with this scenario. See also [Environment].

fn (RenderingServer) scenario_set_fallback_environment #

fn (s &RenderingServer) scenario_set_fallback_environment(scenario RID, environment RID)

Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment.

fn (RenderingServer) scenario_set_camera_attributes #

fn (s &RenderingServer) scenario_set_camera_attributes(scenario RID, effects RID)

Sets the camera attributes ([param effects]) that will be used with this scenario. See also [CameraAttributes].

fn (RenderingServer) scenario_set_compositor #

fn (s &RenderingServer) scenario_set_compositor(scenario RID, compositor RID)

Sets the compositor ([param compositor]) that will be used with this scenario. See also [Compositor].

fn (RenderingServer) instance_create2 #

fn (s &RenderingServer) instance_create2(base RID, scenario RID) RID

Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all instance_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. This is a shorthand for using [method instance_create] and setting the base and scenario manually.

fn (RenderingServer) instance_create #

fn (s &RenderingServer) instance_create() RID

Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all instance_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, reflection probes and decals need to be associated with an instance to be visible in the scenario using [method instance_set_base]. [b]Note:[/b] The equivalent node is [VisualInstance3D].

fn (RenderingServer) instance_set_base #

fn (s &RenderingServer) instance_set_base(instance RID, base RID)

Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, particle system, reflection probe, decal, lightmap, voxel GI and visibility notifiers are all types that can be set as the base of an instance in order to be displayed in the scenario.

fn (RenderingServer) instance_set_scenario #

fn (s &RenderingServer) instance_set_scenario(instance RID, scenario RID)

Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in.

fn (RenderingServer) instance_set_layer_mask #

fn (s &RenderingServer) instance_set_layer_mask(instance RID, mask i64)

Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance3D.layers].

fn (RenderingServer) instance_set_pivot_data #

fn (s &RenderingServer) instance_set_pivot_data(instance RID, sorting_offset f64, use_aabb_center bool)

Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting.

fn (RenderingServer) instance_set_transform #

fn (s &RenderingServer) instance_set_transform(instance RID, transform Transform3D)

Sets the world space transform of the instance. Equivalent to [member Node3D.global_transform].

fn (RenderingServer) instance_attach_object_instance_id #

fn (s &RenderingServer) instance_attach_object_instance_id(instance RID, id i64)

Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray].

fn (RenderingServer) instance_set_blend_shape_weight #

fn (s &RenderingServer) instance_set_blend_shape_weight(instance RID, shape i64, weight f64)

Sets the weight for a given blend shape associated with this instance.

fn (RenderingServer) instance_set_surface_override_material #

fn (s &RenderingServer) instance_set_surface_override_material(instance RID, surface i64, material RID)

Sets the override material of a specific surface. Equivalent to [method MeshInstance3D.set_surface_override_material].

fn (RenderingServer) instance_set_visible #

fn (s &RenderingServer) instance_set_visible(instance RID, visible bool)

Sets whether an instance is drawn or not. Equivalent to [member Node3D.visible].

fn (RenderingServer) instance_geometry_set_transparency #

fn (s &RenderingServer) instance_geometry_set_transparency(instance RID, transparency f64)

Sets the transparency for the given geometry instance. Equivalent to [member GeometryInstance3D.transparency]. A transparency of 0.0 is fully opaque, while 1.0 is fully transparent. Values greater than 0.0 (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [param transparency] to a value greater than 0.0 (exclusive) will [i]not[/i] disable shadow rendering. In spatial shaders, 1.0 - transparency is set as the default value of the ALPHA built-in. [b]Note:[/b] [param transparency] is clamped between 0.0 and 1.0, so this property cannot be used to make transparent materials more opaque than they originally are.

fn (RenderingServer) instance_teleport #

fn (s &RenderingServer) instance_teleport(instance RID)

Resets motion vectors and other interpolated values. Use this [i]after[/i] teleporting a mesh from one position to another to avoid ghosting artifacts.

fn (RenderingServer) instance_set_custom_aabb #

fn (s &RenderingServer) instance_set_custom_aabb(instance RID, aabb AABB)

Sets a custom AABB to use when culling objects from the view frustum. Equivalent to setting [member GeometryInstance3D.custom_aabb].

fn (RenderingServer) instance_attach_skeleton #

fn (s &RenderingServer) instance_attach_skeleton(instance RID, skeleton RID)

Attaches a skeleton to an instance. Removes the previous skeleton from the instance.

fn (RenderingServer) instance_set_extra_visibility_margin #

fn (s &RenderingServer) instance_set_extra_visibility_margin(instance RID, margin f64)

Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin].

fn (RenderingServer) instance_set_visibility_parent #

fn (s &RenderingServer) instance_set_visibility_parent(instance RID, parent RID)

Sets the visibility parent for the given instance. Equivalent to [member Node3D.visibility_parent].

fn (RenderingServer) instance_set_ignore_culling #

fn (s &RenderingServer) instance_set_ignore_culling(instance RID, enabled bool)

If true, ignores both frustum and occlusion culling on the specified 3D geometry instance. This is not the same as [member GeometryInstance3D.ignore_occlusion_culling], which only ignores occlusion culling and leaves frustum culling intact.

fn (RenderingServer) instance_geometry_set_flag #

fn (s &RenderingServer) instance_geometry_set_flag(instance RID, flag RenderingServerInstanceFlags, enabled bool)

Sets the [param flag] for a given [param instance] to [param enabled].

fn (RenderingServer) instance_geometry_set_cast_shadows_setting #

fn (s &RenderingServer) instance_geometry_set_cast_shadows_setting(instance RID, shadow_casting_setting RenderingServerShadowCastingSetting)

Sets the shadow casting setting. Equivalent to [member GeometryInstance3D.cast_shadow].

fn (RenderingServer) instance_geometry_set_material_override #

fn (s &RenderingServer) instance_geometry_set_material_override(instance RID, material RID)

Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override].

fn (RenderingServer) instance_geometry_set_material_overlay #

fn (s &RenderingServer) instance_geometry_set_material_overlay(instance RID, material RID)

Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_overlay].

fn (RenderingServer) instance_geometry_set_visibility_range #

fn (s &RenderingServer) instance_geometry_set_visibility_range(instance RID, min f64, max f64, min_margin f64, max_margin f64, fade_mode RenderingServerVisibilityRangeFadeMode)

Sets the visibility range values for the given geometry instance. Equivalent to [member GeometryInstance3D.visibility_range_begin] and related properties.

fn (RenderingServer) instance_geometry_set_lightmap #

fn (s &RenderingServer) instance_geometry_set_lightmap(instance RID, lightmap RID, lightmap_uv_scale Rect2, lightmap_slice i64)

Sets the lightmap GI instance to use for the specified 3D geometry instance. The lightmap UV scale for the specified instance (equivalent to [member GeometryInstance3D.gi_lightmap_scale]) and lightmap atlas slice must also be specified.

fn (RenderingServer) instance_geometry_set_lod_bias #

fn (s &RenderingServer) instance_geometry_set_lod_bias(instance RID, lod_bias f64)

Sets the level of detail bias to use when rendering the specified 3D geometry instance. Higher values result in higher detail from further away. Equivalent to [member GeometryInstance3D.lod_bias].

fn (RenderingServer) instance_geometry_set_shader_parameter #

fn (s &RenderingServer) instance_geometry_set_shader_parameter(instance RID, parameter string, value_ ToVariant)

Sets the per-instance shader uniform on the specified 3D geometry instance. Equivalent to [method GeometryInstance3D.set_instance_shader_parameter].

fn (RenderingServer) instance_geometry_get_shader_parameter #

fn (s &RenderingServer) instance_geometry_get_shader_parameter(instance RID, parameter string) Variant

Returns the value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to [method GeometryInstance3D.get_instance_shader_parameter]. [b]Note:[/b] Per-instance shader parameter names are case-sensitive.

fn (RenderingServer) instance_geometry_get_shader_parameter_default_value #

fn (s &RenderingServer) instance_geometry_get_shader_parameter_default_value(instance RID, parameter string) Variant

Returns the default value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to [method GeometryInstance3D.get_instance_shader_parameter].

fn (RenderingServer) instance_geometry_get_shader_parameter_list #

fn (s &RenderingServer) instance_geometry_get_shader_parameter_list(instance RID) Array

Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified 3D geometry instance. The returned dictionary is in PropertyInfo format, with the keys name, class_name, type, hint, hint_string and usage. Equivalent to [method GeometryInstance3D.get_instance_shader_parameter].

fn (RenderingServer) instances_cull_aabb #

fn (s &RenderingServer) instances_cull_aabb(aabb AABB, cfg RenderingServer_instances_cull_aabb_Cfg) PackedInt64Array

Returns an array of object IDs intersecting with the provided AABB. Only 3D nodes that inherit from [VisualInstance3D] are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.

fn (RenderingServer) instances_cull_ray #

fn (s &RenderingServer) instances_cull_ray(from Vector3, to Vector3, cfg RenderingServer_instances_cull_ray_Cfg) PackedInt64Array

Returns an array of object IDs intersecting with the provided 3D ray. Only 3D nodes that inherit from [VisualInstance3D] are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.

fn (RenderingServer) instances_cull_convex #

fn (s &RenderingServer) instances_cull_convex(convex Array, cfg RenderingServer_instances_cull_convex_Cfg) PackedInt64Array

Returns an array of object IDs intersecting with the provided convex shape. Only 3D nodes that inherit from [VisualInstance3D] are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.

fn (RenderingServer) bake_render_uv2 #

fn (s &RenderingServer) bake_render_uv2(base RID, material_overrides Array, image_size Vector2i) Array

Bakes the material data of the Mesh passed in the [param base] parameter with optional [param material_overrides] to a set of [Image]s of size [param image_size]. Returns an array of [Image]s containing material properties as specified in [enum BakeChannels].

fn (RenderingServer) canvas_create #

fn (s &RenderingServer) canvas_create() RID

Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all canvas_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. Canvas has no [Resource] or [Node] equivalent.

fn (RenderingServer) canvas_set_item_mirroring #

fn (s &RenderingServer) canvas_set_item_mirroring(canvas RID, item RID, mirroring Vector2)

A copy of the canvas item will be drawn with a local offset of the [param mirroring]. [b]Note:[/b] This is equivalent to calling [method canvas_set_item_repeat] like canvas_set_item_repeat(item, mirroring, 1), with an additional check ensuring [param canvas] is a parent of [param item].

fn (RenderingServer) canvas_set_item_repeat #

fn (s &RenderingServer) canvas_set_item_repeat(item RID, repeat_size Vector2, repeat_times i64)

A copy of the canvas item will be drawn with a local offset of the [param repeat_size] by the number of times of the [param repeat_times]. As the [param repeat_times] increases, the copies will spread away from the origin texture.

fn (RenderingServer) canvas_set_modulate #

fn (s &RenderingServer) canvas_set_modulate(canvas RID, color Color)

Modulates all colors in the given canvas.

fn (RenderingServer) canvas_set_disable_scale #

fn (s &RenderingServer) canvas_set_disable_scale(disable bool)

fn (RenderingServer) canvas_texture_create #

fn (s &RenderingServer) canvas_texture_create() RID

Creates a canvas texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_texture_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. See also [method texture_2d_create]. [b]Note:[/b] The equivalent resource is [CanvasTexture] and is only meant to be used in 2D rendering, not 3D.

fn (RenderingServer) canvas_texture_set_channel #

fn (s &RenderingServer) canvas_texture_set_channel(canvas_texture RID, channel RenderingServerCanvasTextureChannel, texture RID)

Sets the [param channel]'s [param texture] for the canvas texture specified by the [param canvas_texture] RID. Equivalent to [member CanvasTexture.diffuse_texture], [member CanvasTexture.normal_texture] and [member CanvasTexture.specular_texture].

fn (RenderingServer) canvas_texture_set_shading_parameters #

fn (s &RenderingServer) canvas_texture_set_shading_parameters(canvas_texture RID, base_color Color, shininess f64)

Sets the [param base_color] and [param shininess] to use for the canvas texture specified by the [param canvas_texture] RID. Equivalent to [member CanvasTexture.specular_color] and [member CanvasTexture.specular_shininess].

fn (RenderingServer) canvas_texture_set_texture_filter #

fn (s &RenderingServer) canvas_texture_set_texture_filter(canvas_texture RID, filter RenderingServerCanvasItemTextureFilter)

Sets the texture [param filter] mode to use for the canvas texture specified by the [param canvas_texture] RID.

fn (RenderingServer) canvas_texture_set_texture_repeat #

fn (s &RenderingServer) canvas_texture_set_texture_repeat(canvas_texture RID, repeat RenderingServerCanvasItemTextureRepeat)

Sets the texture [param repeat] mode to use for the canvas texture specified by the [param canvas_texture] RID.

fn (RenderingServer) canvas_item_create #

fn (s &RenderingServer) canvas_item_create() RID

Creates a new CanvasItem instance and returns its [RID]. It can be accessed with the RID that is returned. This RID will be used in all canvas_item_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [CanvasItem].

fn (RenderingServer) canvas_item_set_parent #

fn (s &RenderingServer) canvas_item_set_parent(item RID, parent RID)

Sets a parent [CanvasItem] to the [CanvasItem]. The item will inherit transform, modulation and visibility from its parent, like [CanvasItem] nodes in the scene tree.

fn (RenderingServer) canvas_item_set_default_texture_filter #

fn (s &RenderingServer) canvas_item_set_default_texture_filter(item RID, filter RenderingServerCanvasItemTextureFilter)

Sets the default texture filter mode for the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.texture_filter].

fn (RenderingServer) canvas_item_set_default_texture_repeat #

fn (s &RenderingServer) canvas_item_set_default_texture_repeat(item RID, repeat RenderingServerCanvasItemTextureRepeat)

Sets the default texture repeat mode for the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.texture_repeat].

fn (RenderingServer) canvas_item_set_visible #

fn (s &RenderingServer) canvas_item_set_visible(item RID, visible bool)

Sets the visibility of the [CanvasItem].

fn (RenderingServer) canvas_item_set_light_mask #

fn (s &RenderingServer) canvas_item_set_light_mask(item RID, mask i64)

Sets the light [param mask] for the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.light_mask].

fn (RenderingServer) canvas_item_set_visibility_layer #

fn (s &RenderingServer) canvas_item_set_visibility_layer(item RID, visibility_layer i64)

Sets the rendering visibility layer associated with this [CanvasItem]. Only [Viewport] nodes with a matching rendering mask will render this [CanvasItem].

fn (RenderingServer) canvas_item_set_transform #

fn (s &RenderingServer) canvas_item_set_transform(item RID, transform Transform2D)

Sets the [param transform] of the canvas item specified by the [param item] RID. This affects where and how the item will be drawn. Child canvas items' transforms are multiplied by their parent's transform. Equivalent to [member Node2D.transform].

fn (RenderingServer) canvas_item_set_clip #

fn (s &RenderingServer) canvas_item_set_clip(item RID, clip bool)

If [param clip] is true, makes the canvas item specified by the [param item] RID not draw anything outside of its rect's coordinates. This clipping is fast, but works only with axis-aligned rectangles. This means that rotation is ignored by the clipping rectangle. For more advanced clipping shapes, use [method canvas_item_set_canvas_group_mode] instead. [b]Note:[/b] The equivalent node functionality is found in [member Label.clip_text], [RichTextLabel] (always enabled) and more.

fn (RenderingServer) canvas_item_set_distance_field_mode #

fn (s &RenderingServer) canvas_item_set_distance_field_mode(item RID, enabled bool)

If [param enabled] is true, enables multichannel signed distance field rendering mode for the canvas item specified by the [param item] RID. This is meant to be used for font rendering, or with specially generated images using [url=https://github.com/Chlumsky/msdfgen]msdfgen[/url].

fn (RenderingServer) canvas_item_set_custom_rect #

fn (s &RenderingServer) canvas_item_set_custom_rect(item RID, use_custom_rect bool, cfg RenderingServer_canvas_item_set_custom_rect_Cfg)

If [param use_custom_rect] is true, sets the custom visibility rectangle (used for culling) to [param rect] for the canvas item specified by [param item]. Setting a custom visibility rect can reduce CPU load when drawing lots of 2D instances. If [param use_custom_rect] is false, automatically computes a visibility rectangle based on the canvas item's draw commands.

fn (RenderingServer) canvas_item_set_modulate #

fn (s &RenderingServer) canvas_item_set_modulate(item RID, color Color)

Multiplies the color of the canvas item specified by the [param item] RID, while affecting its children. See also [method canvas_item_set_self_modulate]. Equivalent to [member CanvasItem.modulate].

fn (RenderingServer) canvas_item_set_self_modulate #

fn (s &RenderingServer) canvas_item_set_self_modulate(item RID, color Color)

Multiplies the color of the canvas item specified by the [param item] RID, without affecting its children. See also [method canvas_item_set_modulate]. Equivalent to [member CanvasItem.self_modulate].

fn (RenderingServer) canvas_item_set_draw_behind_parent #

fn (s &RenderingServer) canvas_item_set_draw_behind_parent(item RID, enabled bool)

If [param enabled] is true, draws the canvas item specified by the [param item] RID behind its parent. Equivalent to [member CanvasItem.show_behind_parent].

fn (RenderingServer) canvas_item_set_interpolated #

fn (s &RenderingServer) canvas_item_set_interpolated(item RID, interpolated bool)

If [param interpolated] is true, turns on physics interpolation for the canvas item.

fn (RenderingServer) canvas_item_reset_physics_interpolation #

fn (s &RenderingServer) canvas_item_reset_physics_interpolation(item RID)

Prevents physics interpolation for the current physics tick. This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location.

fn (RenderingServer) canvas_item_transform_physics_interpolation #

fn (s &RenderingServer) canvas_item_transform_physics_interpolation(item RID, transform Transform2D)

Transforms both the current and previous stored transform for a canvas item. This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.

fn (RenderingServer) canvas_item_add_line #

fn (s &RenderingServer) canvas_item_add_line(item RID, from Vector2, to Vector2, color Color, cfg RenderingServer_canvas_item_add_line_Cfg)

Draws a line on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_line].

fn (RenderingServer) canvas_item_add_polyline #

fn (s &RenderingServer) canvas_item_add_polyline(item RID, points PackedVector2Array, colors PackedColorArray, cfg RenderingServer_canvas_item_add_polyline_Cfg)

Draws a 2D polyline on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_polyline] and [method CanvasItem.draw_polyline_colors].

fn (RenderingServer) canvas_item_add_multiline #

fn (s &RenderingServer) canvas_item_add_multiline(item RID, points PackedVector2Array, colors PackedColorArray, cfg RenderingServer_canvas_item_add_multiline_Cfg)

Draws a 2D multiline on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_multiline] and [method CanvasItem.draw_multiline_colors].

fn (RenderingServer) canvas_item_add_rect #

fn (s &RenderingServer) canvas_item_add_rect(item RID, rect Rect2, color Color, cfg RenderingServer_canvas_item_add_rect_Cfg)

Draws a rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_rect].

fn (RenderingServer) canvas_item_add_circle #

fn (s &RenderingServer) canvas_item_add_circle(item RID, pos Vector2, radius f64, color Color, cfg RenderingServer_canvas_item_add_circle_Cfg)

Draws a circle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_circle].

fn (RenderingServer) canvas_item_add_texture_rect #

fn (s &RenderingServer) canvas_item_add_texture_rect(item RID, rect Rect2, texture RID, cfg RenderingServer_canvas_item_add_texture_rect_Cfg)

Draws a 2D textured rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_texture_rect] and [method Texture2D.draw_rect].

fn (RenderingServer) canvas_item_add_msdf_texture_rect_region #

fn (s &RenderingServer) canvas_item_add_msdf_texture_rect_region(item RID, rect Rect2, texture RID, src_rect Rect2, cfg RenderingServer_canvas_item_add_msdf_texture_rect_region_Cfg)

See also [method CanvasItem.draw_msdf_texture_rect_region].

fn (RenderingServer) canvas_item_add_lcd_texture_rect_region #

fn (s &RenderingServer) canvas_item_add_lcd_texture_rect_region(item RID, rect Rect2, texture RID, src_rect Rect2, modulate Color)

See also [method CanvasItem.draw_lcd_texture_rect_region].

fn (RenderingServer) canvas_item_add_texture_rect_region #

fn (s &RenderingServer) canvas_item_add_texture_rect_region(item RID, rect Rect2, texture RID, src_rect Rect2, cfg RenderingServer_canvas_item_add_texture_rect_region_Cfg)

Draws the specified region of a 2D textured rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_texture_rect_region] and [method Texture2D.draw_rect_region].

fn (RenderingServer) canvas_item_add_nine_patch #

fn (s &RenderingServer) canvas_item_add_nine_patch(item RID, rect Rect2, source Rect2, texture RID, topleft Vector2, bottomright Vector2, cfg RenderingServer_canvas_item_add_nine_patch_Cfg)

Draws a nine-patch rectangle on the [CanvasItem] pointed to by the [param item] [RID].

fn (RenderingServer) canvas_item_add_primitive #

fn (s &RenderingServer) canvas_item_add_primitive(item RID, points PackedVector2Array, colors PackedColorArray, uvs PackedVector2Array, texture RID)

Draws a 2D primitive on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_primitive].

fn (RenderingServer) canvas_item_add_polygon #

fn (s &RenderingServer) canvas_item_add_polygon(item RID, points PackedVector2Array, colors PackedColorArray, cfg RenderingServer_canvas_item_add_polygon_Cfg)

Draws a 2D polygon on the [CanvasItem] pointed to by the [param item] [RID]. If you need more flexibility (such as being able to use bones), use [method canvas_item_add_triangle_array] instead. See also [method CanvasItem.draw_polygon]. [b]Note:[/b] If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with [method Geometry2D.triangulate_polygon] and using [method CanvasItem.draw_mesh], [method CanvasItem.draw_multimesh], or [method canvas_item_add_triangle_array].

fn (RenderingServer) canvas_item_add_triangle_array #

fn (s &RenderingServer) canvas_item_add_triangle_array(item RID, indices PackedInt32Array, points PackedVector2Array, colors PackedColorArray, cfg RenderingServer_canvas_item_add_triangle_array_Cfg)

Draws a triangle array on the [CanvasItem] pointed to by the [param item] [RID]. This is internally used by [Line2D] and [StyleBoxFlat] for rendering. [method canvas_item_add_triangle_array] is highly flexible, but more complex to use than [method canvas_item_add_polygon]. [b]Note:[/b] If [param count] is set to a non-negative value, only the first count * 3 indices (corresponding to [code skip-lint]count` triangles) will be drawn. Otherwise, all indices are drawn.

fn (RenderingServer) canvas_item_add_mesh #

fn (s &RenderingServer) canvas_item_add_mesh(item RID, mesh RID, cfg RenderingServer_canvas_item_add_mesh_Cfg)

Draws a mesh created with [method mesh_create] with given [param transform], [param modulate] color, and [param texture]. This is used internally by [MeshInstance2D].

fn (RenderingServer) canvas_item_add_multimesh #

fn (s &RenderingServer) canvas_item_add_multimesh(item RID, mesh RID, cfg RenderingServer_canvas_item_add_multimesh_Cfg)

Draws a 2D [MultiMesh] on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_multimesh].

fn (RenderingServer) canvas_item_add_particles #

fn (s &RenderingServer) canvas_item_add_particles(item RID, particles RID, texture RID)

Draws particles on the [CanvasItem] pointed to by the [param item] [RID].

fn (RenderingServer) canvas_item_add_set_transform #

fn (s &RenderingServer) canvas_item_add_set_transform(item RID, transform Transform2D)

Sets a [Transform2D] that will be used to transform subsequent canvas item commands.

fn (RenderingServer) canvas_item_add_clip_ignore #

fn (s &RenderingServer) canvas_item_add_clip_ignore(item RID, ignore bool)

If [param ignore] is true, ignore clipping on items drawn with this canvas item until this is called again with [param ignore] set to false.

fn (RenderingServer) canvas_item_add_animation_slice #

fn (s &RenderingServer) canvas_item_add_animation_slice(item RID, animation_length f64, slice_begin f64, slice_end f64, cfg RenderingServer_canvas_item_add_animation_slice_Cfg)

Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly.

fn (RenderingServer) canvas_item_set_sort_children_by_y #

fn (s &RenderingServer) canvas_item_set_sort_children_by_y(item RID, enabled bool)

If [param enabled] is true, child nodes with the lowest Y position are drawn before those with a higher Y position. Y-sorting only affects children that inherit from the canvas item specified by the [param item] RID, not the canvas item itself. Equivalent to [member CanvasItem.y_sort_enabled].

fn (RenderingServer) canvas_item_set_z_index #

fn (s &RenderingServer) canvas_item_set_z_index(item RID, z_index i64)

Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first).

fn (RenderingServer) canvas_item_set_z_as_relative_to_parent #

fn (s &RenderingServer) canvas_item_set_z_as_relative_to_parent(item RID, enabled bool)

If this is enabled, the Z index of the parent will be added to the children's Z index.

fn (RenderingServer) canvas_item_set_copy_to_backbuffer #

fn (s &RenderingServer) canvas_item_set_copy_to_backbuffer(item RID, enabled bool, rect Rect2)

Sets the [CanvasItem] to copy a rect to the backbuffer.

fn (RenderingServer) canvas_item_attach_skeleton #

fn (s &RenderingServer) canvas_item_attach_skeleton(item RID, skeleton RID)

Attaches a skeleton to the [CanvasItem]. Removes the previous skeleton.

fn (RenderingServer) canvas_item_clear #

fn (s &RenderingServer) canvas_item_clear(item RID)

Clears the [CanvasItem] and removes all commands in it.

fn (RenderingServer) canvas_item_set_draw_index #

fn (s &RenderingServer) canvas_item_set_draw_index(item RID, index i64)

Sets the index for the [CanvasItem].

fn (RenderingServer) canvas_item_set_material #

fn (s &RenderingServer) canvas_item_set_material(item RID, material RID)

Sets a new [param material] to the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.material].

fn (RenderingServer) canvas_item_set_use_parent_material #

fn (s &RenderingServer) canvas_item_set_use_parent_material(item RID, enabled bool)

Sets if the [CanvasItem] uses its parent's material.

fn (RenderingServer) canvas_item_set_instance_shader_parameter #

fn (s &RenderingServer) canvas_item_set_instance_shader_parameter(instance RID, parameter string, value_ ToVariant)

Sets the per-instance shader uniform on the specified canvas item instance. Equivalent to [method CanvasItem.set_instance_shader_parameter].

fn (RenderingServer) canvas_item_get_instance_shader_parameter #

fn (s &RenderingServer) canvas_item_get_instance_shader_parameter(instance RID, parameter string) Variant

Returns the value of the per-instance shader uniform from the specified canvas item instance. Equivalent to [method CanvasItem.get_instance_shader_parameter].

fn (RenderingServer) canvas_item_get_instance_shader_parameter_default_value #

fn (s &RenderingServer) canvas_item_get_instance_shader_parameter_default_value(instance RID, parameter string) Variant

Returns the default value of the per-instance shader uniform from the specified canvas item instance. Equivalent to [method CanvasItem.get_instance_shader_parameter].

fn (RenderingServer) canvas_item_get_instance_shader_parameter_list #

fn (s &RenderingServer) canvas_item_get_instance_shader_parameter_list(instance RID) Array

Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified canvas item instance. The returned dictionary is in PropertyInfo format, with the keys name, class_name, type, hint, hint_string, and usage.

fn (RenderingServer) canvas_item_set_visibility_notifier #

fn (s &RenderingServer) canvas_item_set_visibility_notifier(item RID, enable bool, area Rect2, enter_callable Callable, exit_callable Callable)

Sets the given [CanvasItem] as visibility notifier. [param area] defines the area of detecting visibility. [param enter_callable] is called when the [CanvasItem] enters the screen, [param exit_callable] is called when the [CanvasItem] exits the screen. If [param enable] is false, the item will no longer function as notifier. This method can be used to manually mimic [VisibleOnScreenNotifier2D].

fn (RenderingServer) canvas_item_set_canvas_group_mode #

fn (s &RenderingServer) canvas_item_set_canvas_group_mode(item RID, mode RenderingServerCanvasGroupMode, cfg RenderingServer_canvas_item_set_canvas_group_mode_Cfg)

Sets the canvas group mode used during 2D rendering for the canvas item specified by the [param item] RID. For faster but more limited clipping, use [method canvas_item_set_clip] instead. [b]Note:[/b] The equivalent node functionality is found in [CanvasGroup] and [member CanvasItem.clip_children].

fn (RenderingServer) debug_canvas_item_get_rect #

fn (s &RenderingServer) debug_canvas_item_get_rect(item RID) Rect2

Returns the bounding rectangle for a canvas item in local space, as calculated by the renderer. This bound is used internally for culling. [b]Warning:[/b] This function is intended for debugging in the editor, and will pass through and return a zero [Rect2] in exported projects.

fn (RenderingServer) canvas_light_create #

fn (s &RenderingServer) canvas_light_create() RID

Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_light_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [Light2D].

fn (RenderingServer) canvas_light_attach_to_canvas #

fn (s &RenderingServer) canvas_light_attach_to_canvas(light RID, canvas RID)

Attaches the canvas light to the canvas. Removes it from its previous canvas.

fn (RenderingServer) canvas_light_set_enabled #

fn (s &RenderingServer) canvas_light_set_enabled(light RID, enabled bool)

Enables or disables a canvas light.

fn (RenderingServer) canvas_light_set_texture_scale #

fn (s &RenderingServer) canvas_light_set_texture_scale(light RID, scale f64)

Sets the scale factor of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.texture_scale].

fn (RenderingServer) canvas_light_set_transform #

fn (s &RenderingServer) canvas_light_set_transform(light RID, transform Transform2D)

Sets the canvas light's [Transform2D].

fn (RenderingServer) canvas_light_set_texture #

fn (s &RenderingServer) canvas_light_set_texture(light RID, texture RID)

Sets the texture to be used by a [PointLight2D]. Equivalent to [member PointLight2D.texture].

fn (RenderingServer) canvas_light_set_texture_offset #

fn (s &RenderingServer) canvas_light_set_texture_offset(light RID, offset Vector2)

Sets the offset of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.offset].

fn (RenderingServer) canvas_light_set_color #

fn (s &RenderingServer) canvas_light_set_color(light RID, color Color)

Sets the color for a light.

fn (RenderingServer) canvas_light_set_height #

fn (s &RenderingServer) canvas_light_set_height(light RID, height f64)

Sets a canvas light's height.

fn (RenderingServer) canvas_light_set_energy #

fn (s &RenderingServer) canvas_light_set_energy(light RID, energy f64)

Sets a canvas light's energy.

fn (RenderingServer) canvas_light_set_z_range #

fn (s &RenderingServer) canvas_light_set_z_range(light RID, min_z i64, max_z i64)

Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max].

fn (RenderingServer) canvas_light_set_layer_range #

fn (s &RenderingServer) canvas_light_set_layer_range(light RID, min_layer i64, max_layer i64)

The layer range that gets rendered with this light.

fn (RenderingServer) canvas_light_set_item_cull_mask #

fn (s &RenderingServer) canvas_light_set_item_cull_mask(light RID, mask i64)

The light mask. See [LightOccluder2D] for more information on light masks.

fn (RenderingServer) canvas_light_set_item_shadow_cull_mask #

fn (s &RenderingServer) canvas_light_set_item_shadow_cull_mask(light RID, mask i64)

The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks.

fn (RenderingServer) canvas_light_set_mode #

fn (s &RenderingServer) canvas_light_set_mode(light RID, mode RenderingServerCanvasLightMode)

Sets the mode of the canvas light.

fn (RenderingServer) canvas_light_set_shadow_enabled #

fn (s &RenderingServer) canvas_light_set_shadow_enabled(light RID, enabled bool)

Enables or disables the canvas light's shadow.

fn (RenderingServer) canvas_light_set_shadow_filter #

fn (s &RenderingServer) canvas_light_set_shadow_filter(light RID, filter RenderingServerCanvasLightShadowFilter)

Sets the canvas light's shadow's filter.

fn (RenderingServer) canvas_light_set_shadow_color #

fn (s &RenderingServer) canvas_light_set_shadow_color(light RID, color Color)

Sets the color of the canvas light's shadow.

fn (RenderingServer) canvas_light_set_shadow_smooth #

fn (s &RenderingServer) canvas_light_set_shadow_smooth(light RID, smooth f64)

Smoothens the shadow. The lower, the smoother.

fn (RenderingServer) canvas_light_set_blend_mode #

fn (s &RenderingServer) canvas_light_set_blend_mode(light RID, mode RenderingServerCanvasLightBlendMode)

Sets the blend mode for the given canvas light to [param mode]. Equivalent to [member Light2D.blend_mode].

fn (RenderingServer) canvas_light_set_interpolated #

fn (s &RenderingServer) canvas_light_set_interpolated(light RID, interpolated bool)

If [param interpolated] is true, turns on physics interpolation for the canvas light.

fn (RenderingServer) canvas_light_reset_physics_interpolation #

fn (s &RenderingServer) canvas_light_reset_physics_interpolation(light RID)

Prevents physics interpolation for the current physics tick. This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location.

fn (RenderingServer) canvas_light_transform_physics_interpolation #

fn (s &RenderingServer) canvas_light_transform_physics_interpolation(light RID, transform Transform2D)

Transforms both the current and previous stored transform for a canvas light. This allows transforming a light without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.

fn (RenderingServer) canvas_light_occluder_create #

fn (s &RenderingServer) canvas_light_occluder_create() RID

Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_light_occluder_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent node is [LightOccluder2D].

fn (RenderingServer) canvas_light_occluder_attach_to_canvas #

fn (s &RenderingServer) canvas_light_occluder_attach_to_canvas(occluder RID, canvas RID)

Attaches a light occluder to the canvas. Removes it from its previous canvas.

fn (RenderingServer) canvas_light_occluder_set_enabled #

fn (s &RenderingServer) canvas_light_occluder_set_enabled(occluder RID, enabled bool)

Enables or disables light occluder.

fn (RenderingServer) canvas_light_occluder_set_polygon #

fn (s &RenderingServer) canvas_light_occluder_set_polygon(occluder RID, polygon RID)

Sets a light occluder's polygon.

fn (RenderingServer) canvas_light_occluder_set_as_sdf_collision #

fn (s &RenderingServer) canvas_light_occluder_set_as_sdf_collision(occluder RID, enable bool)

fn (RenderingServer) canvas_light_occluder_set_transform #

fn (s &RenderingServer) canvas_light_occluder_set_transform(occluder RID, transform Transform2D)

Sets a light occluder's [Transform2D].

fn (RenderingServer) canvas_light_occluder_set_light_mask #

fn (s &RenderingServer) canvas_light_occluder_set_light_mask(occluder RID, mask i64)

The light mask. See [LightOccluder2D] for more information on light masks.

fn (RenderingServer) canvas_light_occluder_set_interpolated #

fn (s &RenderingServer) canvas_light_occluder_set_interpolated(occluder RID, interpolated bool)

If [param interpolated] is true, turns on physics interpolation for the light occluder.

fn (RenderingServer) canvas_light_occluder_reset_physics_interpolation #

fn (s &RenderingServer) canvas_light_occluder_reset_physics_interpolation(occluder RID)

Prevents physics interpolation for the current physics tick. This is useful when moving an occluder to a new location, to give an instantaneous change rather than interpolation from the previous location.

fn (RenderingServer) canvas_light_occluder_transform_physics_interpolation #

fn (s &RenderingServer) canvas_light_occluder_transform_physics_interpolation(occluder RID, transform Transform2D)

Transforms both the current and previous stored transform for a light occluder. This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin.

fn (RenderingServer) canvas_occluder_polygon_create #

fn (s &RenderingServer) canvas_occluder_polygon_create() RID

Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all canvas_occluder_polygon_* RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. [b]Note:[/b] The equivalent resource is [OccluderPolygon2D].

fn (RenderingServer) canvas_occluder_polygon_set_shape #

fn (s &RenderingServer) canvas_occluder_polygon_set_shape(occluder_polygon RID, shape PackedVector2Array, closed bool)

Sets the shape of the occluder polygon.

fn (RenderingServer) canvas_occluder_polygon_set_cull_mode #

fn (s &RenderingServer) canvas_occluder_polygon_set_cull_mode(occluder_polygon RID, mode RenderingServerCanvasOccluderPolygonCullMode)

Sets an occluder polygon's cull mode.

fn (RenderingServer) canvas_set_shadow_texture_size #

fn (s &RenderingServer) canvas_set_shadow_texture_size(size i64)

Sets the [member ProjectSettings.rendering/2d/shadow_atlas/size] to use for [Light2D] shadow rendering (in pixels). The value is rounded up to the nearest power of 2.

fn (RenderingServer) global_shader_parameter_add #

fn (s &RenderingServer) global_shader_parameter_add(name string, gd_type RenderingServerGlobalShaderParameterType, default_value_ ToVariant)

Creates a new global shader uniform. [b]Note:[/b] Global shader parameter names are case-sensitive.

fn (RenderingServer) global_shader_parameter_remove #

fn (s &RenderingServer) global_shader_parameter_remove(name string)

Removes the global shader uniform specified by [param name].

fn (RenderingServer) global_shader_parameter_get_list #

fn (s &RenderingServer) global_shader_parameter_get_list() Array

Returns the list of global shader uniform names. [b]Note:[/b] [method global_shader_parameter_get] has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters.

fn (RenderingServer) global_shader_parameter_set #

fn (s &RenderingServer) global_shader_parameter_set(name string, value_ ToVariant)

Sets the global shader uniform [param name] to [param value].

fn (RenderingServer) global_shader_parameter_set_override #

fn (s &RenderingServer) global_shader_parameter_set_override(name string, value_ ToVariant)

Overrides the global shader uniform [param name] with [param value]. Equivalent to the [ShaderGlobalsOverride] node.

fn (RenderingServer) global_shader_parameter_get #

fn (s &RenderingServer) global_shader_parameter_get(name string) Variant

Returns the value of the global shader uniform specified by [param name]. [b]Note:[/b] [method global_shader_parameter_get] has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters.

fn (RenderingServer) global_shader_parameter_get_type #

fn (s &RenderingServer) global_shader_parameter_get_type(name string) RenderingServerGlobalShaderParameterType

Returns the type associated to the global shader uniform specified by [param name]. [b]Note:[/b] [method global_shader_parameter_get] has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters.

fn (RenderingServer) free_rid #

fn (s &RenderingServer) free_rid(rid RID)

Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingServer directly.

fn (RenderingServer) request_frame_drawn_callback #

fn (s &RenderingServer) request_frame_drawn_callback(callable Callable)

Schedules a callback to the given callable after a frame has been drawn.

fn (RenderingServer) has_changed #

fn (s &RenderingServer) has_changed() bool

Returns true if changes have been made to the RenderingServer's data. [method force_draw] is usually called if this happens.

fn (RenderingServer) get_rendering_info #

fn (s &RenderingServer) get_rendering_info(info RenderingServerRenderingInfo) i64

Returns a statistic about the rendering engine which can be used for performance profiling. See also [method viewport_get_render_info], which returns information specific to a viewport. [b]Note:[/b] Only 3D rendering is currently taken into account by some of these values, such as the number of draw calls. [b]Note:[/b] Rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, [method get_rendering_info] returns 0. To print rendering information in _ready() successfully, use the following:

func _ready():
for _i in 2:
await get_tree().process_frame

print(RenderingServer.get_rendering_info(RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME))

fn (RenderingServer) get_video_adapter_name #

fn (s &RenderingServer) get_video_adapter_name() string

Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). [b]Note:[/b] When running a headless or server binary, this function returns an empty string. [b]Note:[/b] On the web platform, some browsers such as Firefox may report a different, fixed GPU name such as "GeForce GTX 980" (regardless of the user's actual GPU model). This is done to make fingerprinting more difficult.

fn (RenderingServer) get_video_adapter_vendor #

fn (s &RenderingServer) get_video_adapter_vendor() string

Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). [b]Note:[/b] When running a headless or server binary, this function returns an empty string.

fn (RenderingServer) get_video_adapter_type #

fn (s &RenderingServer) get_video_adapter_type() RenderingDeviceDeviceType

Returns the type of the video adapter. Since dedicated graphics cards from a given generation will [i]usually[/i] be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings. [b]Note:[/b] When using the OpenGL rendering driver or when running in headless mode, this function always returns [constant RenderingDevice.DEVICE_TYPE_OTHER].

fn (RenderingServer) get_video_adapter_api_version #

fn (s &RenderingServer) get_video_adapter_api_version() string

Returns the version of the graphics video adapter [i]currently in use[/i] (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. See also [method OS.get_video_adapter_driver_info]. [b]Note:[/b] When running a headless or server binary, this function returns an empty string.

fn (RenderingServer) get_current_rendering_driver_name #

fn (s &RenderingServer) get_current_rendering_driver_name() string

Returns the name of the current rendering driver. This can be vulkan, d3d12, metal, opengl3, opengl3_es, or opengl3_angle. See also [method get_current_rendering_method]. The rendering driver is determined by [member ProjectSettings.rendering/rendering_device/driver], the --rendering-driver command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware.

fn (RenderingServer) get_current_rendering_method #

fn (s &RenderingServer) get_current_rendering_method() string

Returns the name of the current rendering method. This can be forward_plus, mobile, or gl_compatibility. See also [method get_current_rendering_driver_name]. The rendering method is determined by [member ProjectSettings.rendering/renderer/rendering_method], the --rendering-method command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware.

fn (RenderingServer) make_sphere_mesh #

fn (s &RenderingServer) make_sphere_mesh(latitudes i64, longitudes i64, radius f64) RID

Returns a mesh of a sphere with the given number of horizontal subdivisions, vertical subdivisions and radius. See also [method get_test_cube].

fn (RenderingServer) get_test_cube #

fn (s &RenderingServer) get_test_cube() RID

Returns the RID of the test cube. This mesh will be created and returned on the first call to [method get_test_cube], then it will be cached for subsequent calls. See also [method make_sphere_mesh].

fn (RenderingServer) get_test_texture #

fn (s &RenderingServer) get_test_texture() RID

Returns the RID of a 256×256 texture with a testing pattern on it (in [constant Image.FORMAT_RGB8] format). This texture will be created and returned on the first call to [method get_test_texture], then it will be cached for subsequent calls. See also [method get_white_texture]. [b]Example:[/b] Get the test texture and apply it to a [Sprite2D] node:

var texture_rid = RenderingServer.get_test_texture()
var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid))
$Sprite2D.texture = texture

fn (RenderingServer) get_white_texture #

fn (s &RenderingServer) get_white_texture() RID

Returns the ID of a 4×4 white texture (in [constant Image.FORMAT_RGB8] format). This texture will be created and returned on the first call to [method get_white_texture], then it will be cached for subsequent calls. See also [method get_test_texture]. [b]Example:[/b] Get the white texture and apply it to a [Sprite2D] node:

var texture_rid = RenderingServer.get_white_texture()
var texture = ImageTexture.create_from_image(RenderingServer.texture_2d_get(texture_rid))
$Sprite2D.texture = texture

fn (RenderingServer) set_boot_image #

fn (s &RenderingServer) set_boot_image(image Image, color Color, scale bool, cfg RenderingServer_set_boot_image_Cfg)

Sets a boot image. The color defines the background color. If [param scale] is true, the image will be scaled to fit the screen size. If [param use_filter] is true, the image will be scaled with linear interpolation. If [param use_filter] is false, the image will be scaled with nearest-neighbor interpolation.

fn (RenderingServer) get_default_clear_color #

fn (s &RenderingServer) get_default_clear_color() Color

Returns the default clear color which is used when a specific clear color has not been selected. See also [method set_default_clear_color].

fn (RenderingServer) set_default_clear_color #

fn (s &RenderingServer) set_default_clear_color(color Color)

Sets the default clear color which is used when a specific clear color has not been selected. See also [method get_default_clear_color].

fn (RenderingServer) has_os_feature #

fn (s &RenderingServer) has_os_feature(feature string) bool

Returns true if the OS supports a certain [param feature]. Features might be s3tc, etc, and etc2.

fn (RenderingServer) set_debug_generate_wireframes #

fn (s &RenderingServer) set_debug_generate_wireframes(generate bool)

If [param generate] is true, generates debug wireframes for all meshes that are loaded when using the Compatibility renderer. By default, the engine does not generate debug wireframes at runtime, since they slow down loading of assets and take up VRAM. [b]Note:[/b] You must call this method before loading any meshes when using the Compatibility renderer, otherwise wireframes will not be used.

fn (RenderingServer) is_render_loop_enabled #

fn (s &RenderingServer) is_render_loop_enabled() bool

fn (RenderingServer) set_render_loop_enabled #

fn (s &RenderingServer) set_render_loop_enabled(enabled bool)

fn (RenderingServer) get_frame_setup_time_cpu #

fn (s &RenderingServer) get_frame_setup_time_cpu() f64

Returns the time taken to setup rendering on the CPU in milliseconds. This value is shared across all viewports and does [i]not[/i] require [method viewport_set_measure_render_time] to be enabled on a viewport to be queried. See also [method viewport_get_measured_render_time_cpu].

fn (RenderingServer) force_sync #

fn (s &RenderingServer) force_sync()

Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost.

fn (RenderingServer) force_draw #

fn (s &RenderingServer) force_draw(cfg RenderingServer_force_draw_Cfg)

Forces redrawing of all viewports at once. Must be called from the main thread.

fn (RenderingServer) get_rendering_device #

fn (s &RenderingServer) get_rendering_device() RenderingDevice

Returns the global RenderingDevice. [b]Note:[/b] When using the OpenGL rendering driver or when running in headless mode, this function always returns null.

fn (RenderingServer) create_local_rendering_device #

fn (s &RenderingServer) create_local_rendering_device() RenderingDevice

Creates a RenderingDevice that can be used to do draw and compute operations on a separate thread. Cannot draw to the screen nor share data with the global RenderingDevice. [b]Note:[/b] When using the OpenGL rendering driver or when running in headless mode, this function always returns null.

fn (RenderingServer) is_on_render_thread #

fn (s &RenderingServer) is_on_render_thread() bool

Returns true if our code is currently executing on the rendering thread.

fn (RenderingServer) call_on_render_thread #

fn (s &RenderingServer) call_on_render_thread(callable Callable)

As the RenderingServer actual logic may run on an separate thread, accessing its internals from the main (or any other) thread will result in errors. To make it easier to run code that can safely access the rendering internals (such as [RenderingDevice] and similar RD classes), push a callable via this function so it will be executed on the render thread.

fn (RenderingServer) has_feature #

fn (s &RenderingServer) has_feature(feature RenderingServerFeatures) bool

This method does nothing and always returns false.

struct RenderingServer_canvas_item_add_animation_slice_Cfg #

@[params]
struct RenderingServer_canvas_item_add_animation_slice_Cfg {
pub:
	offset f64 = 0.0
}

Optional parameters for RenderingServer#canvas_item_add_animation_slice

struct RenderingServer_canvas_item_add_circle_Cfg #

@[params]
struct RenderingServer_canvas_item_add_circle_Cfg {
pub:
	antialiased bool
}

Optional parameters for RenderingServer#canvas_item_add_circle

struct RenderingServer_canvas_item_add_line_Cfg #

@[params]
struct RenderingServer_canvas_item_add_line_Cfg {
pub:
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for RenderingServer#canvas_item_add_line

struct RenderingServer_canvas_item_add_mesh_Cfg #

@[params]
struct RenderingServer_canvas_item_add_mesh_Cfg {
pub:
	transform Transform2D = Transform2D{Vector2{1, 0}, Vector2{0, 1}, Vector2{0, 0}}
	modulate  Color       = Color{1, 1, 1, 1}
	texture   RID         = RID{}
}

Optional parameters for RenderingServer#canvas_item_add_mesh

struct RenderingServer_canvas_item_add_msdf_texture_rect_region_Cfg #

@[params]
struct RenderingServer_canvas_item_add_msdf_texture_rect_region_Cfg {
pub:
	modulate     Color = Color{1, 1, 1, 1}
	outline_size i64
	px_range     f64 = 1.0
	scale        f64 = 1.0
}

Optional parameters for RenderingServer#canvas_item_add_msdf_texture_rect_region

struct RenderingServer_canvas_item_add_multiline_Cfg #

@[params]
struct RenderingServer_canvas_item_add_multiline_Cfg {
pub:
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for RenderingServer#canvas_item_add_multiline

struct RenderingServer_canvas_item_add_multimesh_Cfg #

@[params]
struct RenderingServer_canvas_item_add_multimesh_Cfg {
pub:
	texture RID = RID{}
}

Optional parameters for RenderingServer#canvas_item_add_multimesh

struct RenderingServer_canvas_item_add_nine_patch_Cfg #

@[params]
struct RenderingServer_canvas_item_add_nine_patch_Cfg {
pub:
	x_axis_mode RenderingServerNinePatchAxisMode = unsafe { RenderingServerNinePatchAxisMode(0) }
	y_axis_mode RenderingServerNinePatchAxisMode = unsafe { RenderingServerNinePatchAxisMode(0) }
	draw_center bool
	modulate    Color = Color{1, 1, 1, 1}
}

Optional parameters for RenderingServer#canvas_item_add_nine_patch

struct RenderingServer_canvas_item_add_polygon_Cfg #

@[params]
struct RenderingServer_canvas_item_add_polygon_Cfg {
pub:
	uvs     PackedVector2Array = PackedVector2Array{}
	texture RID                = RID{}
}

Optional parameters for RenderingServer#canvas_item_add_polygon

struct RenderingServer_canvas_item_add_polyline_Cfg #

@[params]
struct RenderingServer_canvas_item_add_polyline_Cfg {
pub:
	width       f64 = -1.0
	antialiased bool
}

Optional parameters for RenderingServer#canvas_item_add_polyline

struct RenderingServer_canvas_item_add_rect_Cfg #

@[params]
struct RenderingServer_canvas_item_add_rect_Cfg {
pub:
	antialiased bool
}

Optional parameters for RenderingServer#canvas_item_add_rect

struct RenderingServer_canvas_item_add_texture_rect_Cfg #

@[params]
struct RenderingServer_canvas_item_add_texture_rect_Cfg {
pub:
	tile      bool
	modulate  Color = Color{1, 1, 1, 1}
	transpose bool
}

Optional parameters for RenderingServer#canvas_item_add_texture_rect

struct RenderingServer_canvas_item_add_texture_rect_region_Cfg #

@[params]
struct RenderingServer_canvas_item_add_texture_rect_region_Cfg {
pub:
	modulate  Color = Color{1, 1, 1, 1}
	transpose bool
	clip_uv   bool
}

Optional parameters for RenderingServer#canvas_item_add_texture_rect_region

struct RenderingServer_canvas_item_add_triangle_array_Cfg #

@[params]
struct RenderingServer_canvas_item_add_triangle_array_Cfg {
pub:
	uvs     PackedVector2Array = PackedVector2Array{}
	bones   PackedInt32Array   = PackedInt32Array{}
	weights PackedFloat32Array = PackedFloat32Array{}
	texture RID                = RID{}
	count   i64                = -1
}

Optional parameters for RenderingServer#canvas_item_add_triangle_array

struct RenderingServer_canvas_item_set_canvas_group_mode_Cfg #

@[params]
struct RenderingServer_canvas_item_set_canvas_group_mode_Cfg {
pub:
	clear_margin f64 = 5.0
	fit_empty    bool
	fit_margin   f64 = 0.0
	blur_mipmaps bool
}

Optional parameters for RenderingServer#canvas_item_set_canvas_group_mode

struct RenderingServer_canvas_item_set_custom_rect_Cfg #

@[params]
struct RenderingServer_canvas_item_set_custom_rect_Cfg {
pub:
	rect Rect2 = Rect2{Vector2{0, 0}, Vector2{0, 0}}
}

Optional parameters for RenderingServer#canvas_item_set_custom_rect

struct RenderingServer_environment_set_ambient_light_Cfg #

@[params]
struct RenderingServer_environment_set_ambient_light_Cfg {
pub:
	ambient           RenderingServerEnvironmentAmbientSource = unsafe { RenderingServerEnvironmentAmbientSource(0) }
	energy            f64 = 1.0
	sky_contribution  f64 = 0.0
	reflection_source RenderingServerEnvironmentReflectionSource = unsafe { RenderingServerEnvironmentReflectionSource(0) }
}

Optional parameters for RenderingServer#environment_set_ambient_light

struct RenderingServer_environment_set_fog_Cfg #

@[params]
struct RenderingServer_environment_set_fog_Cfg {
pub:
	fog_mode RenderingServerEnvironmentFogMode = unsafe { RenderingServerEnvironmentFogMode(0) }
}

Optional parameters for RenderingServer#environment_set_fog

struct RenderingServer_force_draw_Cfg #

@[params]
struct RenderingServer_force_draw_Cfg {
pub:
	swap_buffers bool
	frame_step   f64 = 0.0
}

Optional parameters for RenderingServer#force_draw

struct RenderingServer_instances_cull_aabb_Cfg #

@[params]
struct RenderingServer_instances_cull_aabb_Cfg {
pub:
	scenario RID = RID{}
}

Optional parameters for RenderingServer#instances_cull_aabb

struct RenderingServer_instances_cull_convex_Cfg #

@[params]
struct RenderingServer_instances_cull_convex_Cfg {
pub:
	scenario RID = RID{}
}

Optional parameters for RenderingServer#instances_cull_convex

struct RenderingServer_instances_cull_ray_Cfg #

@[params]
struct RenderingServer_instances_cull_ray_Cfg {
pub:
	scenario RID = RID{}
}

Optional parameters for RenderingServer#instances_cull_ray

struct RenderingServer_mesh_add_surface_from_arrays_Cfg #

@[params]
struct RenderingServer_mesh_add_surface_from_arrays_Cfg {
pub:
	blend_shapes    Array = Array.new0()
	lods            Dictionary
	compress_format RenderingServerArrayFormat
}

Optional parameters for RenderingServer#mesh_add_surface_from_arrays

struct RenderingServer_mesh_create_from_surfaces_Cfg #

@[params]
struct RenderingServer_mesh_create_from_surfaces_Cfg {
pub:
	blend_shape_count i64
}

Optional parameters for RenderingServer#mesh_create_from_surfaces

struct RenderingServer_multimesh_allocate_data_Cfg #

@[params]
struct RenderingServer_multimesh_allocate_data_Cfg {
pub:
	color_format       bool
	custom_data_format bool
	use_indirect       bool
}

Optional parameters for RenderingServer#multimesh_allocate_data

struct RenderingServer_set_boot_image_Cfg #

@[params]
struct RenderingServer_set_boot_image_Cfg {
pub:
	use_filter bool
}

Optional parameters for RenderingServer#set_boot_image

struct RenderingServer_shader_get_default_texture_parameter_Cfg #

@[params]
struct RenderingServer_shader_get_default_texture_parameter_Cfg {
pub:
	index i64
}

Optional parameters for RenderingServer#shader_get_default_texture_parameter

struct RenderingServer_shader_set_default_texture_parameter_Cfg #

@[params]
struct RenderingServer_shader_set_default_texture_parameter_Cfg {
pub:
	index i64
}

Optional parameters for RenderingServer#shader_set_default_texture_parameter

struct RenderingServer_skeleton_allocate_data_Cfg #

@[params]
struct RenderingServer_skeleton_allocate_data_Cfg {
pub:
	is_2d_skeleton bool
}

Optional parameters for RenderingServer#skeleton_allocate_data

struct RenderingServer_texture_create_from_native_handle_Cfg #

@[params]
struct RenderingServer_texture_create_from_native_handle_Cfg {
pub:
	layers       i64 = 1
	layered_type RenderingServerTextureLayeredType = unsafe { RenderingServerTextureLayeredType(0) }
}

Optional parameters for RenderingServer#texture_create_from_native_handle

struct RenderingServer_texture_get_native_handle_Cfg #

@[params]
struct RenderingServer_texture_get_native_handle_Cfg {
pub:
	srgb bool
}

Optional parameters for RenderingServer#texture_get_native_handle

struct RenderingServer_texture_get_rd_texture_Cfg #

@[params]
struct RenderingServer_texture_get_rd_texture_Cfg {
pub:
	srgb bool
}

Optional parameters for RenderingServer#texture_get_rd_texture

struct RenderingServer_texture_rd_create_Cfg #

@[params]
struct RenderingServer_texture_rd_create_Cfg {
pub:
	layer_type RenderingServerTextureLayeredType = unsafe { RenderingServerTextureLayeredType(0) }
}

Optional parameters for RenderingServer#texture_rd_create

struct RenderingServer_viewport_attach_to_screen_Cfg #

@[params]
struct RenderingServer_viewport_attach_to_screen_Cfg {
pub:
	rect   Rect2 = Rect2{Vector2{0, 0}, Vector2{0, 0}}
	screen i64
}

Optional parameters for RenderingServer#viewport_attach_to_screen

struct RenderingServer_viewport_set_positional_shadow_atlas_size_Cfg #

@[params]
struct RenderingServer_viewport_set_positional_shadow_atlas_size_Cfg {
pub:
	use_16_bits bool
}

Optional parameters for RenderingServer#viewport_set_positional_shadow_atlas_size

struct Resource #

struct Resource {
	RefCounted
}

Base class for serializable objects.

fn (Resource) to_variant #

fn (s &Resource) to_variant() Variant

fn (Resource) from_variant #

fn (mut s Resource) from_variant(variant &Variant)

fn (Resource) gd_setup_local_to_scene #

fn (s &Resource) gd_setup_local_to_scene()

Override this method to customize the newly duplicated resource created from [method PackedScene.instantiate], if the original's [member resource_local_to_scene] is set to true. [b]Example:[/b] Set a random damage value to every local resource from an instantiated scene:

extends Resource

var damage = 0

func _setup_local_to_scene():
damage = randi_range(10, 40)

fn (Resource) gd_get_rid #

fn (s &Resource) gd_get_rid() RID

Override this method to return a custom [RID] when [method get_rid] is called.

fn (Resource) gd_reset_state #

fn (s &Resource) gd_reset_state()

For resources that use a variable number of properties, either via [method Object._validate_property] or [method Object._get_property_list], this method should be implemented to correctly clear the resource's state.

fn (Resource) gd_set_path_cache #

fn (s &Resource) gd_set_path_cache(path string)

Sets the resource's path to [param path] without involving the resource cache.

fn (Resource) set_path #

fn (s &Resource) set_path(path string)

fn (Resource) take_over_path #

fn (s &Resource) take_over_path(path string)

Sets the [member resource_path] to [param path], potentially overriding an existing cache entry for this path. Further attempts to load an overridden resource by path will instead return this resource.

fn (Resource) get_path #

fn (s &Resource) get_path() string

fn (Resource) set_path_cache #

fn (s &Resource) set_path_cache(path string)

Sets the resource's path to [param path] without involving the resource cache.

fn (Resource) set_name #

fn (s &Resource) set_name(name string)

fn (Resource) get_name #

fn (s &Resource) get_name() string

fn (Resource) get_rid #

fn (s &Resource) get_rid() RID

Returns the [RID] of this resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], and so on) are high-level abstractions of resources stored in a specialized server ([DisplayServer], [RenderingServer], etc.), so this function will return the original [RID].

fn (Resource) set_local_to_scene #

fn (s &Resource) set_local_to_scene(enable bool)

fn (Resource) is_local_to_scene #

fn (s &Resource) is_local_to_scene() bool

fn (Resource) get_local_scene #

fn (s &Resource) get_local_scene() Node

If [member resource_local_to_scene] is set to true and the resource has been loaded from a [PackedScene] instantiation, returns the root [Node] of the scene where this resource is used. Otherwise, returns null.

fn (Resource) setup_local_to_scene #

fn (s &Resource) setup_local_to_scene()

Calls [method _setup_local_to_scene]. If [member resource_local_to_scene] is set to true, this method is automatically called from [method PackedScene.instantiate] by the newly duplicated resource within the scene instance.

fn (Resource) reset_state #

fn (s &Resource) reset_state()

For resources that use a variable number of properties, either via [method Object._validate_property] or [method Object._get_property_list], override [method _reset_state] to correctly clear the resource's state.

fn (Resource) set_id_for_path #

fn (s &Resource) set_id_for_path(path string, id string)

Sets the unique identifier to [param id] for the resource with the given [param path] in the resource cache. If the unique identifier is empty, the cache entry using [param path] is removed if it exists. [b]Note:[/b] This method is only implemented when running in an editor context.

fn (Resource) get_id_for_path #

fn (s &Resource) get_id_for_path(path string) string

Returns the unique identifier for the resource with the given [param path] from the resource cache. If the resource is not loaded and cached, an empty string is returned. [b]Note:[/b] This method is only implemented when running in an editor context. At runtime, it returns an empty string.

fn (Resource) is_built_in #

fn (s &Resource) is_built_in() bool

Returns true if the resource is built-in (from the engine) or false if it is user-defined.

fn (Resource) set_scene_unique_id #

fn (s &Resource) set_scene_unique_id(id string)

fn (Resource) get_scene_unique_id #

fn (s &Resource) get_scene_unique_id() string

fn (Resource) emit_changed #

fn (s &Resource) emit_changed()

Emits the [signal changed] signal. This method is called automatically for some built-in resources. [b]Note:[/b] For custom resources, it's recommended to call this method whenever a meaningful change occurs, such as a modified property. This ensures that custom [Object]s depending on the resource are properly updated.

var damage:
set(new_value):
if damage != new_value:
damage = new_value
emit_changed()

fn (Resource) duplicate #

fn (s &Resource) duplicate(cfg Resource_duplicate_Cfg) Resource

Duplicates this resource, returning a new resource with its exported or [constant PROPERTY_USAGE_STORAGE] properties copied from the original. If [param deep] is false, a [b]shallow[/b] copy is returned: nested [Array], [Dictionary], and [Resource] properties are not duplicated and are shared with the original resource. If [param deep] is true, a [b]deep[/b] copy is returned: all nested arrays, dictionaries, and packed arrays are also duplicated (recursively). Any [Resource] found inside will only be duplicated if it's local, like [constant RESOURCE_DEEP_DUPLICATE_INTERNAL] used with [method duplicate_deep]. The following exceptions apply:- Subresource properties with the [constant PROPERTY_USAGE_ALWAYS_DUPLICATE] flag are always duplicated (recursively or not, depending on [param deep]).

  • Subresource properties with the [constant PROPERTY_USAGE_NEVER_DUPLICATE] flag are never duplicated.[b]Note:[/b] For custom resources, this method will fail if [method Object._init] has been defined with required parameters. [b]Note:[/b] When duplicating with [param deep] set to true, each resource found, including the one on which this method is called, will be only duplicated once and referenced as many times as needed in the duplicate. For instance, if you are duplicating resource A that happens to have resource B referenced twice, you'll get a new resource A' referencing a new resource B' twice.

fn (Resource) duplicate_deep #

fn (s &Resource) duplicate_deep(cfg Resource_duplicate_deep_Cfg) Resource

Duplicates this resource, deeply, like [method duplicate](true), with extra control over how subresources are handled. [param deep_subresources_mode] must be one of the values from [enum ResourceDeepDuplicateMode].

struct ResourceFormatLoader #

struct ResourceFormatLoader {
	RefCounted
}

Loads a specific resource type from a file.

fn (ResourceFormatLoader) to_variant #

fn (s &ResourceFormatLoader) to_variant() Variant

fn (ResourceFormatLoader) from_variant #

fn (mut s ResourceFormatLoader) from_variant(variant &Variant)

fn (ResourceFormatLoader) gd_get_recognized_extensions #

fn (s &ResourceFormatLoader) gd_get_recognized_extensions() PackedStringArray

Gets the list of extensions for files this loader is able to read.

fn (ResourceFormatLoader) gd_recognize_path #

fn (s &ResourceFormatLoader) gd_recognize_path(path string, gd_type string) bool

Tells whether or not this loader should load a resource from its resource path for a given type. If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions], and if the type is within the ones provided by [method _get_resource_type].

fn (ResourceFormatLoader) gd_handles_type #

fn (s &ResourceFormatLoader) gd_handles_type(gd_type string) bool

Tells which resource class this loader can load. [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle "Resource" for them.

fn (ResourceFormatLoader) gd_get_resource_type #

fn (s &ResourceFormatLoader) gd_get_resource_type(path string) string

Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return "". [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return "Resource" for them.

fn (ResourceFormatLoader) gd_get_resource_script_class #

fn (s &ResourceFormatLoader) gd_get_resource_script_class(path string) string

Returns the script class name associated with the [Resource] under the given [param path]. If the resource has no script or the script isn't a named class, it should return "".

fn (ResourceFormatLoader) gd_get_resource_uid #

fn (s &ResourceFormatLoader) gd_get_resource_uid(path string) i64

Should return the unique ID for the resource associated with the given path. If this method is not overridden, a .uid file is generated along with the resource file, containing the unique ID.

fn (ResourceFormatLoader) gd_get_dependencies #

fn (s &ResourceFormatLoader) gd_get_dependencies(path string, add_types bool) PackedStringArray

If implemented, gets the dependencies of a given resource. If [param add_types] is true, paths should be appended ::TypeName, where TypeName is the class name of the dependency. [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return "Resource" for them.

fn (ResourceFormatLoader) gd_rename_dependencies #

fn (s &ResourceFormatLoader) gd_rename_dependencies(path string, renames Dictionary) GDError

If implemented, renames dependencies within the given resource and saves it. [param renames] is a dictionary { String => String } mapping old dependency paths to new paths. Returns [constant OK] on success, or an [enum Error] constant in case of failure.

fn (ResourceFormatLoader) gd_exists #

fn (s &ResourceFormatLoader) gd_exists(path string) bool

fn (ResourceFormatLoader) gd_get_classes_used #

fn (s &ResourceFormatLoader) gd_get_classes_used(path string) PackedStringArray

fn (ResourceFormatLoader) gd_load #

fn (s &ResourceFormatLoader) gd_load(path string, original_path string, use_sub_threads bool, cache_mode i64) Variant

Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [param original_path] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure. The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.

struct ResourceFormatSaver #

struct ResourceFormatSaver {
	RefCounted
}

Saves a specific resource type to a file.

fn (ResourceFormatSaver) to_variant #

fn (s &ResourceFormatSaver) to_variant() Variant

fn (ResourceFormatSaver) from_variant #

fn (mut s ResourceFormatSaver) from_variant(variant &Variant)

fn (ResourceFormatSaver) gd_save #

fn (s &ResourceFormatSaver) gd_save(resource Resource, path string, flags i64) GDError

Saves the given resource object to a file at the target [param path]. [param flags] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants. Returns [constant OK] on success, or an [enum Error] constant in case of failure.

fn (ResourceFormatSaver) gd_set_uid #

fn (s &ResourceFormatSaver) gd_set_uid(path string, uid i64) GDError

Sets a new UID for the resource at the given [param path]. Returns [constant OK] on success, or an [enum Error] constant in case of failure.

fn (ResourceFormatSaver) gd_recognize #

fn (s &ResourceFormatSaver) gd_recognize(resource Resource) bool

Returns whether the given resource object can be saved by this saver.

fn (ResourceFormatSaver) gd_get_recognized_extensions #

fn (s &ResourceFormatSaver) gd_get_recognized_extensions(resource Resource) PackedStringArray

Returns the list of extensions available for saving the resource object, provided it is recognized (see [method _recognize]).

fn (ResourceFormatSaver) gd_recognize_path #

fn (s &ResourceFormatSaver) gd_recognize_path(resource Resource, path string) bool

Returns true if this saver handles a given save path and false otherwise. If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions].

struct ResourceImporter #

struct ResourceImporter {
	RefCounted
}

Base class for resource importers.

fn (ResourceImporter) to_variant #

fn (s &ResourceImporter) to_variant() Variant

fn (ResourceImporter) from_variant #

fn (mut s ResourceImporter) from_variant(variant &Variant)

fn (ResourceImporter) gd_get_build_dependencies #

fn (s &ResourceImporter) gd_get_build_dependencies(path string) PackedStringArray

Called when the engine compilation profile editor wants to check what build options an imported resource needs. For example, [ResourceImporterDynamicFont] has a property called [member ResourceImporterDynamicFont.multichannel_signed_distance_field], that depends on the engine to be build with the "msdfgen" module. If that resource happened to be a custom one, it would be handled like this:

func _get_build_dependencies(path):
var resource = load(path)
var dependencies = PackedStringArray()

if resource.multichannel_signed_distance_field:
dependencies.push_back('module_msdfgen_enabled')

return dependencies

struct ResourceImporterBMFont #

struct ResourceImporterBMFont {
	ResourceImporter
}

Imports a bitmap font in the BMFont (.fnt) format.

fn (ResourceImporterBMFont) to_variant #

fn (s &ResourceImporterBMFont) to_variant() Variant

fn (ResourceImporterBMFont) from_variant #

fn (mut s ResourceImporterBMFont) from_variant(variant &Variant)

struct ResourceImporterBitMap #

struct ResourceImporterBitMap {
	ResourceImporter
}

Imports a [BitMap] resource (2D array of boolean values).

fn (ResourceImporterBitMap) to_variant #

fn (s &ResourceImporterBitMap) to_variant() Variant

fn (ResourceImporterBitMap) from_variant #

fn (mut s ResourceImporterBitMap) from_variant(variant &Variant)

struct ResourceImporterCSVTranslation #

struct ResourceImporterCSVTranslation {
	ResourceImporter
}

Imports comma-separated values

fn (ResourceImporterCSVTranslation) to_variant #

fn (s &ResourceImporterCSVTranslation) to_variant() Variant

fn (ResourceImporterCSVTranslation) from_variant #

fn (mut s ResourceImporterCSVTranslation) from_variant(variant &Variant)

struct ResourceImporterDynamicFont #

struct ResourceImporterDynamicFont {
	ResourceImporter
}

Imports a TTF, TTC, OTF, OTC, WOFF or WOFF2 font file for font rendering that adapts to any size.

fn (ResourceImporterDynamicFont) to_variant #

fn (s &ResourceImporterDynamicFont) to_variant() Variant

fn (ResourceImporterDynamicFont) from_variant #

fn (mut s ResourceImporterDynamicFont) from_variant(variant &Variant)

struct ResourceImporterImage #

struct ResourceImporterImage {
	ResourceImporter
}

Imports a image for use in scripting, with no rendering capabilities.

fn (ResourceImporterImage) to_variant #

fn (s &ResourceImporterImage) to_variant() Variant

fn (ResourceImporterImage) from_variant #

fn (mut s ResourceImporterImage) from_variant(variant &Variant)

struct ResourceImporterImageFont #

struct ResourceImporterImageFont {
	ResourceImporter
}

Imports a bitmap font where all glyphs have the same width and height.

fn (ResourceImporterImageFont) to_variant #

fn (s &ResourceImporterImageFont) to_variant() Variant

fn (ResourceImporterImageFont) from_variant #

fn (mut s ResourceImporterImageFont) from_variant(variant &Variant)

struct ResourceImporterLayeredTexture #

struct ResourceImporterLayeredTexture {
	ResourceImporter
}

Imports a 3-dimensional texture ([Texture3D]), a [Texture2DArray], a [Cubemap] or a [CubemapArray].

fn (ResourceImporterLayeredTexture) to_variant #

fn (s &ResourceImporterLayeredTexture) to_variant() Variant

fn (ResourceImporterLayeredTexture) from_variant #

fn (mut s ResourceImporterLayeredTexture) from_variant(variant &Variant)

struct ResourceImporterMP3 #

struct ResourceImporterMP3 {
	ResourceImporter
}

Imports an MP3 audio file for playback.

fn (ResourceImporterMP3) to_variant #

fn (s &ResourceImporterMP3) to_variant() Variant

fn (ResourceImporterMP3) from_variant #

fn (mut s ResourceImporterMP3) from_variant(variant &Variant)

struct ResourceImporterOBJ #

struct ResourceImporterOBJ {
	ResourceImporter
}

Imports an OBJ 3D model as an independent [Mesh] or scene.

fn (ResourceImporterOBJ) to_variant #

fn (s &ResourceImporterOBJ) to_variant() Variant

fn (ResourceImporterOBJ) from_variant #

fn (mut s ResourceImporterOBJ) from_variant(variant &Variant)

struct ResourceImporterOggVorbis #

struct ResourceImporterOggVorbis {
	ResourceImporter
}

Imports an Ogg Vorbis audio file for playback.

fn (ResourceImporterOggVorbis) to_variant #

fn (s &ResourceImporterOggVorbis) to_variant() Variant

fn (ResourceImporterOggVorbis) from_variant #

fn (mut s ResourceImporterOggVorbis) from_variant(variant &Variant)

struct ResourceImporterSVG #

struct ResourceImporterSVG {
	ResourceImporter
}

Imports a SVG file as a scalable texture for use in 2D or 3D rendering.

fn (ResourceImporterSVG) to_variant #

fn (s &ResourceImporterSVG) to_variant() Variant

fn (ResourceImporterSVG) from_variant #

fn (mut s ResourceImporterSVG) from_variant(variant &Variant)

struct ResourceImporterScene #

struct ResourceImporterScene {
	ResourceImporter
}

Imports a glTF, FBX, COLLADA, or Blender 3D scene.

fn (ResourceImporterScene) to_variant #

fn (s &ResourceImporterScene) to_variant() Variant

fn (ResourceImporterScene) from_variant #

fn (mut s ResourceImporterScene) from_variant(variant &Variant)

struct ResourceImporterShaderFile #

struct ResourceImporterShaderFile {
	ResourceImporter
}

Imports native GLSL shaders (not Godot shaders) as a [RDShaderFile].

fn (ResourceImporterShaderFile) to_variant #

fn (s &ResourceImporterShaderFile) to_variant() Variant

fn (ResourceImporterShaderFile) from_variant #

fn (mut s ResourceImporterShaderFile) from_variant(variant &Variant)

struct ResourceImporterTexture #

struct ResourceImporterTexture {
	ResourceImporter
}

Imports an image for use in 2D or 3D rendering.

fn (ResourceImporterTexture) to_variant #

fn (s &ResourceImporterTexture) to_variant() Variant

fn (ResourceImporterTexture) from_variant #

fn (mut s ResourceImporterTexture) from_variant(variant &Variant)

struct ResourceImporterTextureAtlas #

struct ResourceImporterTextureAtlas {
	ResourceImporter
}

Imports a collection of textures from a PNG image into an optimized [AtlasTexture] for 2D rendering.

fn (ResourceImporterTextureAtlas) to_variant #

fn (s &ResourceImporterTextureAtlas) to_variant() Variant

fn (ResourceImporterTextureAtlas) from_variant #

fn (mut s ResourceImporterTextureAtlas) from_variant(variant &Variant)

struct ResourceImporterWAV #

struct ResourceImporterWAV {
	ResourceImporter
}

Imports a WAV audio file for playback.

fn (ResourceImporterWAV) to_variant #

fn (s &ResourceImporterWAV) to_variant() Variant

fn (ResourceImporterWAV) from_variant #

fn (mut s ResourceImporterWAV) from_variant(variant &Variant)

struct ResourceLoader #

struct ResourceLoader {
	Object
}

A singleton for loading resource files.

fn (ResourceLoader) to_variant #

fn (s &ResourceLoader) to_variant() Variant

fn (ResourceLoader) from_variant #

fn (mut s ResourceLoader) from_variant(variant &Variant)

fn (ResourceLoader) load_threaded_request #

fn (s &ResourceLoader) load_threaded_request(path string, cfg ResourceLoader_load_threaded_request_Cfg) GDError

Loads the resource using threads. If [param use_sub_threads] is true, multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). The [param cache_mode] parameter defines whether and how the cache should be used or updated when loading the resource.

fn (ResourceLoader) load_threaded_get_status #

fn (s &ResourceLoader) load_threaded_get_status(path string, cfg ResourceLoader_load_threaded_get_status_Cfg) ResourceLoaderThreadLoadStatus

Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [param path]. An array variable can optionally be passed via [param progress], and will return a one-element array containing the ratio of completion of the threaded loading (between 0.0 and 1.0). [b]Note:[/b] The recommended way of using this method is to call it during different frames (e.g., in [method Node._process], instead of a loop).

fn (ResourceLoader) load_threaded_get #

fn (s &ResourceLoader) load_threaded_get(path string) Resource

Returns the resource loaded by [method load_threaded_request]. If this is called before the loading thread is done (i.e. [method load_threaded_get_status] is not [constant THREAD_LOAD_LOADED]), the calling thread will be blocked until the resource has finished loading. However, it's recommended to use [method load_threaded_get_status] to known when the load has actually completed.

fn (ResourceLoader) load #

fn (s &ResourceLoader) load(path string, cfg ResourceLoader_load_Cfg) Resource

Loads a resource at the given [param path], caching the result for further access. The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted. An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. Returns an empty resource if no [ResourceFormatLoader] could handle the file, and prints an error if no file is found at the specified path. GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios. [b]Note:[/b] If [member ProjectSettings.editor/export/convert_text_resources_to_binary] is true, [method @GDScript.load] will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set [member ProjectSettings.editor/export/convert_text_resources_to_binary] to false. [b]Note:[/b] Relative paths will be prefixed with "res://" before loading, to avoid unexpected results make sure your paths are absolute.

fn (ResourceLoader) get_recognized_extensions_for_type #

fn (s &ResourceLoader) get_recognized_extensions_for_type(gd_type string) PackedStringArray

Returns the list of recognized extensions for a resource type.

fn (ResourceLoader) add_resource_format_loader #

fn (s &ResourceLoader) add_resource_format_loader(format_loader ResourceFormatLoader, cfg ResourceLoader_add_resource_format_loader_Cfg)

Registers a new [ResourceFormatLoader]. The ResourceLoader will use the ResourceFormatLoader as described in [method load]. This method is performed implicitly for ResourceFormatLoaders written in GDScript (see [ResourceFormatLoader] for more information).

fn (ResourceLoader) remove_resource_format_loader #

fn (s &ResourceLoader) remove_resource_format_loader(format_loader ResourceFormatLoader)

Unregisters the given [ResourceFormatLoader].

fn (ResourceLoader) set_abort_on_missing_resources #

fn (s &ResourceLoader) set_abort_on_missing_resources(abort bool)

Changes the behavior on missing sub-resources. The default behavior is to abort loading.

fn (ResourceLoader) get_dependencies #

fn (s &ResourceLoader) get_dependencies(path string) PackedStringArray

Returns the dependencies for the resource at the given [param path]. [b]Note:[/b] The dependencies are returned with slices separated by ::. You can use [method String.get_slice] to get their components.

for dependency in ResourceLoader.get_dependencies(path):
print(dependency.get_slice('::', 0)) ##print(dependency.get_slice('::', 2)) ##

fn (ResourceLoader) has_cached #

fn (s &ResourceLoader) has_cached(path string) bool

Returns whether a cached resource is available for the given [param path]. Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] method will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path.

fn (ResourceLoader) get_cached_ref #

fn (s &ResourceLoader) get_cached_ref(path string) Resource

Returns the cached resource reference for the given [param path]. [b]Note:[/b] If the resource is not cached, the returned [Resource] will be invalid.

fn (ResourceLoader) exists #

fn (s &ResourceLoader) exists(path string, cfg ResourceLoader_exists_Cfg) bool

Returns whether a recognized resource exists for the given [param path]. An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. [b]Note:[/b] If you use [method Resource.take_over_path], this method will return true for the taken path even if the resource wasn't saved (i.e. exists only in resource cache).

fn (ResourceLoader) get_resource_uid #

fn (s &ResourceLoader) get_resource_uid(path string) i64

Returns the ID associated with a given resource path, or -1 when no such ID exists.

fn (ResourceLoader) list_directory #

fn (s &ResourceLoader) list_directory(directory_path string) PackedStringArray

Lists a directory, returning all resources and subdirectories contained within. The resource files have the original file names as visible in the editor before exporting. The directories have "/" appended.

##print(ResourceLoader.list_directory('res://assets/enemies/slime'))

[b]Note:[/b] The order of files and directories returned by this method is not deterministic, and can vary between operating systems. [b]Note:[/b] To normally traverse the filesystem, see [DirAccess].

struct ResourceLoader_add_resource_format_loader_Cfg #

@[params]
struct ResourceLoader_add_resource_format_loader_Cfg {
pub:
	at_front bool
}

Optional parameters for ResourceLoader#add_resource_format_loader

struct ResourceLoader_exists_Cfg #

@[params]
struct ResourceLoader_exists_Cfg {
pub:
	type_hint string
}

Optional parameters for ResourceLoader#exists

struct ResourceLoader_load_Cfg #

@[params]
struct ResourceLoader_load_Cfg {
pub:
	type_hint  string
	cache_mode ResourceLoaderCacheMode = unsafe { ResourceLoaderCacheMode(1) }
}

Optional parameters for ResourceLoader#load

struct ResourceLoader_load_threaded_get_status_Cfg #

@[params]
struct ResourceLoader_load_threaded_get_status_Cfg {
pub:
	progress Array = Array.new0()
}

Optional parameters for ResourceLoader#load_threaded_get_status

struct ResourceLoader_load_threaded_request_Cfg #

@[params]
struct ResourceLoader_load_threaded_request_Cfg {
pub:
	type_hint       string
	use_sub_threads bool
	cache_mode      ResourceLoaderCacheMode = unsafe { ResourceLoaderCacheMode(1) }
}

Optional parameters for ResourceLoader#load_threaded_request

struct ResourcePreloader #

struct ResourcePreloader {
	Node
}

A node used to preload sub-resources inside a scene.

fn (ResourcePreloader) to_variant #

fn (s &ResourcePreloader) to_variant() Variant

fn (ResourcePreloader) from_variant #

fn (mut s ResourcePreloader) from_variant(variant &Variant)

fn (ResourcePreloader) add_resource #

fn (s &ResourcePreloader) add_resource(name string, resource Resource)

Adds a resource to the preloader with the given [param name]. If a resource with the given [param name] already exists, the new resource will be renamed to "[param name] N" where N is an incrementing number starting from 2.

fn (ResourcePreloader) remove_resource #

fn (s &ResourcePreloader) remove_resource(name string)

Removes the resource associated to [param name] from the preloader.

fn (ResourcePreloader) rename_resource #

fn (s &ResourcePreloader) rename_resource(name string, newname string)

Renames a resource inside the preloader from [param name] to [param newname].

fn (ResourcePreloader) has_resource #

fn (s &ResourcePreloader) has_resource(name string) bool

Returns true if the preloader contains a resource associated to [param name].

fn (ResourcePreloader) get_resource #

fn (s &ResourcePreloader) get_resource(name string) Resource

Returns the resource associated to [param name].

fn (ResourcePreloader) get_resource_list #

fn (s &ResourcePreloader) get_resource_list() PackedStringArray

Returns the list of resources inside the preloader.

struct ResourceSaver #

struct ResourceSaver {
	Object
}

A singleton for saving [Resource]s to the filesystem.

fn (ResourceSaver) to_variant #

fn (s &ResourceSaver) to_variant() Variant

fn (ResourceSaver) from_variant #

fn (mut s ResourceSaver) from_variant(variant &Variant)

fn (ResourceSaver) save #

fn (s &ResourceSaver) save(resource Resource, cfg ResourceSaver_save_Cfg) GDError

Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. If [param path] is empty, [ResourceSaver] will try to use [member Resource.resource_path]. The [param flags] bitmask can be specified to customize the save behavior. Returns [constant OK] on success. [b]Note:[/b] When the project is running, any generated UID associated with the resource will not be saved as the required code is only executed in editor mode.

fn (ResourceSaver) set_uid #

fn (s &ResourceSaver) set_uid(resource string, uid i64) GDError

Sets the UID of the given [param resource] path to [param uid]. You can generate a new UID using [method ResourceUID.create_id]. Since resources will normally get a UID automatically, this method is only useful in very specific cases.

fn (ResourceSaver) get_recognized_extensions #

fn (s &ResourceSaver) get_recognized_extensions(gd_type Resource) PackedStringArray

Returns the list of extensions available for saving a resource of a given type.

fn (ResourceSaver) add_resource_format_saver #

fn (s &ResourceSaver) add_resource_format_saver(format_saver ResourceFormatSaver, cfg ResourceSaver_add_resource_format_saver_Cfg)

Registers a new [ResourceFormatSaver]. The ResourceSaver will use the ResourceFormatSaver as described in [method save]. This method is performed implicitly for ResourceFormatSavers written in GDScript (see [ResourceFormatSaver] for more information).

fn (ResourceSaver) remove_resource_format_saver #

fn (s &ResourceSaver) remove_resource_format_saver(format_saver ResourceFormatSaver)

Unregisters the given [ResourceFormatSaver].

fn (ResourceSaver) get_resource_id_for_path #

fn (s &ResourceSaver) get_resource_id_for_path(path string, cfg ResourceSaver_get_resource_id_for_path_Cfg) i64

Returns the resource ID for the given path. If [param generate] is true, a new resource ID will be generated if one for the path is not found. If [param generate] is false and the path is not found, [constant ResourceUID.INVALID_ID] is returned.

struct ResourceSaver_add_resource_format_saver_Cfg #

@[params]
struct ResourceSaver_add_resource_format_saver_Cfg {
pub:
	at_front bool
}

Optional parameters for ResourceSaver#add_resource_format_saver

struct ResourceSaver_get_resource_id_for_path_Cfg #

@[params]
struct ResourceSaver_get_resource_id_for_path_Cfg {
pub:
	generate bool
}

Optional parameters for ResourceSaver#get_resource_id_for_path

struct ResourceSaver_save_Cfg #

@[params]
struct ResourceSaver_save_Cfg {
pub:
	path  string
	flags ResourceSaverSaverFlags
}

Optional parameters for ResourceSaver#save

struct ResourceUID #

struct ResourceUID {
	Object
}

A singleton that manages the unique identifiers of all resources within a project.

fn (ResourceUID) to_variant #

fn (s &ResourceUID) to_variant() Variant

fn (ResourceUID) from_variant #

fn (mut s ResourceUID) from_variant(variant &Variant)

fn (ResourceUID) id_to_text #

fn (s &ResourceUID) id_to_text(id i64) string

Converts the given UID to a uid:// string value.

fn (ResourceUID) text_to_id #

fn (s &ResourceUID) text_to_id(text_id string) i64

Extracts the UID value from the given uid:// string.

fn (ResourceUID) create_id #

fn (s &ResourceUID) create_id() i64

Generates a random resource UID which is guaranteed to be unique within the list of currently loaded UIDs. In order for this UID to be registered, you must call [method add_id] or [method set_id].

fn (ResourceUID) create_id_for_path #

fn (s &ResourceUID) create_id_for_path(path string) i64

Like [method create_id], but the UID is seeded with the provided [param path] and project name. UIDs generated for that path will be always the same within the current project.

fn (ResourceUID) has_id #

fn (s &ResourceUID) has_id(id i64) bool

Returns whether the given UID value is known to the cache.

fn (ResourceUID) add_id #

fn (s &ResourceUID) add_id(id i64, path string)

Adds a new UID value which is mapped to the given resource path. Fails with an error if the UID already exists, so be sure to check [method has_id] beforehand, or use [method set_id] instead.

fn (ResourceUID) set_id #

fn (s &ResourceUID) set_id(id i64, path string)

Updates the resource path of an existing UID. Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand, or use [method add_id] instead.

fn (ResourceUID) get_id_path #

fn (s &ResourceUID) get_id_path(id i64) string

Returns the path that the given UID value refers to. Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand.

fn (ResourceUID) remove_id #

fn (s &ResourceUID) remove_id(id i64)

Removes a loaded UID value from the cache. Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand.

struct Resource_duplicate_Cfg #

@[params]
struct Resource_duplicate_Cfg {
pub:
	deep bool
}

Optional parameters for Resource#duplicate

struct Resource_duplicate_deep_Cfg #

@[params]
struct Resource_duplicate_deep_Cfg {
pub:
	deep_subresources_mode ResourceDeepDuplicateMode = unsafe { ResourceDeepDuplicateMode(1) }
}

Optional parameters for Resource#duplicate_deep

struct RetargetModifier3D #

struct RetargetModifier3D {
	SkeletonModifier3D
}

A modifier to transfer parent skeleton poses (or global poses) to child skeletons in model space with different rests.

fn (RetargetModifier3D) to_variant #

fn (s &RetargetModifier3D) to_variant() Variant

fn (RetargetModifier3D) from_variant #

fn (mut s RetargetModifier3D) from_variant(variant &Variant)

fn (RetargetModifier3D) set_profile #

fn (s &RetargetModifier3D) set_profile(profile SkeletonProfile)

fn (RetargetModifier3D) get_profile #

fn (s &RetargetModifier3D) get_profile() SkeletonProfile

fn (RetargetModifier3D) set_use_global_pose #

fn (s &RetargetModifier3D) set_use_global_pose(use_global_pose bool)

fn (RetargetModifier3D) is_using_global_pose #

fn (s &RetargetModifier3D) is_using_global_pose() bool

fn (RetargetModifier3D) set_enable_flags #

fn (s &RetargetModifier3D) set_enable_flags(enable_flags RetargetModifier3DTransformFlag)

fn (RetargetModifier3D) get_enable_flags #

fn (s &RetargetModifier3D) get_enable_flags() RetargetModifier3DTransformFlag

fn (RetargetModifier3D) set_position_enabled #

fn (s &RetargetModifier3D) set_position_enabled(enabled bool)

Sets [constant TRANSFORM_FLAG_POSITION] into [member enable].

fn (RetargetModifier3D) is_position_enabled #

fn (s &RetargetModifier3D) is_position_enabled() bool

Returns true if [member enable] has [constant TRANSFORM_FLAG_POSITION].

fn (RetargetModifier3D) set_rotation_enabled #

fn (s &RetargetModifier3D) set_rotation_enabled(enabled bool)

Sets [constant TRANSFORM_FLAG_ROTATION] into [member enable].

fn (RetargetModifier3D) is_rotation_enabled #

fn (s &RetargetModifier3D) is_rotation_enabled() bool

Returns true if [member enable] has [constant TRANSFORM_FLAG_ROTATION].

fn (RetargetModifier3D) set_scale_enabled #

fn (s &RetargetModifier3D) set_scale_enabled(enabled bool)

Sets [constant TRANSFORM_FLAG_SCALE] into [member enable].

fn (RetargetModifier3D) is_scale_enabled #

fn (s &RetargetModifier3D) is_scale_enabled() bool

Returns true if [member enable] has [constant TRANSFORM_FLAG_SCALE].

struct RibbonTrailMesh #

struct RibbonTrailMesh {
	PrimitiveMesh
}

Represents a straight ribbon-shaped [PrimitiveMesh] with variable width.

fn (RibbonTrailMesh) to_variant #

fn (s &RibbonTrailMesh) to_variant() Variant

fn (RibbonTrailMesh) from_variant #

fn (mut s RibbonTrailMesh) from_variant(variant &Variant)

fn (RibbonTrailMesh) set_size #

fn (s &RibbonTrailMesh) set_size(size f64)

fn (RibbonTrailMesh) get_size #

fn (s &RibbonTrailMesh) get_size() f64

fn (RibbonTrailMesh) set_sections #

fn (s &RibbonTrailMesh) set_sections(sections i64)

fn (RibbonTrailMesh) get_sections #

fn (s &RibbonTrailMesh) get_sections() i64

fn (RibbonTrailMesh) set_section_length #

fn (s &RibbonTrailMesh) set_section_length(section_length f64)

fn (RibbonTrailMesh) get_section_length #

fn (s &RibbonTrailMesh) get_section_length() f64

fn (RibbonTrailMesh) set_section_segments #

fn (s &RibbonTrailMesh) set_section_segments(section_segments i64)

fn (RibbonTrailMesh) get_section_segments #

fn (s &RibbonTrailMesh) get_section_segments() i64

fn (RibbonTrailMesh) set_curve #

fn (s &RibbonTrailMesh) set_curve(curve Curve)

fn (RibbonTrailMesh) get_curve #

fn (s &RibbonTrailMesh) get_curve() Curve

fn (RibbonTrailMesh) set_shape #

fn (s &RibbonTrailMesh) set_shape(shape RibbonTrailMeshShape)

fn (RibbonTrailMesh) get_shape #

fn (s &RibbonTrailMesh) get_shape() RibbonTrailMeshShape

struct RichTextEffect #

struct RichTextEffect {
	Resource
}

A custom effect for a [RichTextLabel].

fn (RichTextEffect) to_variant #

fn (s &RichTextEffect) to_variant() Variant

fn (RichTextEffect) from_variant #

fn (mut s RichTextEffect) from_variant(variant &Variant)

fn (RichTextEffect) gd_process_custom_fx #

fn (s &RichTextEffect) gd_process_custom_fx(char_fx CharFXTransform) bool

Override this method to modify properties in [param char_fx]. The method must return true if the character could be transformed successfully. If the method returns false, it will skip transformation to avoid displaying broken text.

struct RichTextLabel #

struct RichTextLabel {
	Control
}

A control for displaying text that can contain different font styles, images, and basic formatting.

fn (RichTextLabel) to_variant #

fn (s &RichTextLabel) to_variant() Variant

fn (RichTextLabel) from_variant #

fn (mut s RichTextLabel) from_variant(variant &Variant)

fn (RichTextLabel) get_parsed_text #

fn (s &RichTextLabel) get_parsed_text() string

Returns the text without BBCode mark-up.

fn (RichTextLabel) add_text #

fn (s &RichTextLabel) add_text(text string)

Adds raw non-BBCode-parsed text to the tag stack.

fn (RichTextLabel) set_text #

fn (s &RichTextLabel) set_text(text string)

fn (RichTextLabel) add_hr #

fn (s &RichTextLabel) add_hr(cfg RichTextLabel_add_hr_Cfg)

Adds a horizontal rule that can be used to separate content. If [param width_in_percent] is set, [param width] values are percentages of the control width instead of pixels. If [param height_in_percent] is set, [param height] values are percentages of the control width instead of pixels.

fn (RichTextLabel) add_image #

fn (s &RichTextLabel) add_image(image Texture2D, cfg RichTextLabel_add_image_Cfg)

Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image, a [param color] to tint the image and a [param region] to only use parts of the image. If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio. If [param width] and [param height] are not set, but [param region] is, the region's rect will be used. [param key] is an optional identifier, that can be used to modify the image via [method update_image]. If [param pad] is set, and the image is smaller than the size specified by [param width] and [param height], the image padding is added to match the size instead of upscaling. If [param width_in_percent] is set, [param width] values are percentages of the control width instead of pixels. If [param height_in_percent] is set, [param height] values are percentages of the control width instead of pixels. [param alt_text] is used as the image description for assistive apps.

fn (RichTextLabel) update_image #

fn (s &RichTextLabel) update_image(key_ ToVariant, mask RichTextLabelImageUpdateMask, image Texture2D, cfg RichTextLabel_update_image_Cfg)

Updates the existing images with the key [param key]. Only properties specified by [param mask] bits are updated. See [method add_image].

fn (RichTextLabel) newline #

fn (s &RichTextLabel) newline()

Adds a newline tag to the tag stack.

fn (RichTextLabel) remove_paragraph #

fn (s &RichTextLabel) remove_paragraph(paragraph i64, cfg RichTextLabel_remove_paragraph_Cfg) bool

Removes a paragraph of content from the label. Returns true if the paragraph exists. The [param paragraph] argument is the index of the paragraph to remove, it can take values in the interval [0, get_paragraph_count() - 1]. If [param no_invalidate] is set to true, cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and [method invalidate_paragraph] will be called at the end of operation.

fn (RichTextLabel) invalidate_paragraph #

fn (s &RichTextLabel) invalidate_paragraph(paragraph i64) bool

Invalidates [param paragraph] and all subsequent paragraphs cache.

fn (RichTextLabel) push_font #

fn (s &RichTextLabel) push_font(font Font, cfg RichTextLabel_push_font_Cfg)

Adds a [code skip-lint][font]tag to the tag stack. Overrides default fonts for its duration. Passing0` to [param font_size] will use the existing default font size.

fn (RichTextLabel) push_font_size #

fn (s &RichTextLabel) push_font_size(font_size i64)

Adds a [code skip-lint][font_size]` tag to the tag stack. Overrides default font size for its duration.

fn (RichTextLabel) push_normal #

fn (s &RichTextLabel) push_normal()

Adds a [code skip-lint][font]` tag with a normal font to the tag stack.

fn (RichTextLabel) push_bold #

fn (s &RichTextLabel) push_bold()

Adds a [code skip-lint][font] tag with a bold font to the tag stack. This is the same as adding a [code skip-lint][b] tag if not currently in a [code skip-lint][i]` tag.

fn (RichTextLabel) push_bold_italics #

fn (s &RichTextLabel) push_bold_italics()

Adds a [code skip-lint][font]` tag with a bold italics font to the tag stack.

fn (RichTextLabel) push_italics #

fn (s &RichTextLabel) push_italics()

Adds a [code skip-lint][font] tag with an italics font to the tag stack. This is the same as adding an [code skip-lint][i] tag if not currently in a [code skip-lint][b]` tag.

fn (RichTextLabel) push_mono #

fn (s &RichTextLabel) push_mono()

Adds a [code skip-lint][font]` tag with a monospace font to the tag stack.

fn (RichTextLabel) push_color #

fn (s &RichTextLabel) push_color(color Color)

Adds a [code skip-lint][color]` tag to the tag stack.

fn (RichTextLabel) push_outline_size #

fn (s &RichTextLabel) push_outline_size(outline_size i64)

Adds a [code skip-lint][outline_size]` tag to the tag stack. Overrides default text outline size for its duration.

fn (RichTextLabel) push_outline_color #

fn (s &RichTextLabel) push_outline_color(color Color)

Adds a [code skip-lint][outline_color]` tag to the tag stack. Adds text outline for its duration.

fn (RichTextLabel) push_paragraph #

fn (s &RichTextLabel) push_paragraph(alignment HorizontalAlignment, cfg RichTextLabel_push_paragraph_Cfg)

Adds a [code skip-lint][p]` tag to the tag stack.

fn (RichTextLabel) push_indent #

fn (s &RichTextLabel) push_indent(level i64)

Adds an [code skip-lint][indent]` tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.

fn (RichTextLabel) push_list #

fn (s &RichTextLabel) push_list(level i64, gd_type RichTextLabelListType, capitalize bool, cfg RichTextLabel_push_list_Cfg)

Adds [code skip-lint][ol] or [code skip-lint][ul] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.

fn (RichTextLabel) push_meta #

fn (s &RichTextLabel) push_meta(data_ ToVariant, cfg RichTextLabel_push_meta_Cfg)

Adds a meta tag to the tag stack. Similar to the BBCode [code skip-lint][url=something]{text}[/url], but supports non-[String] metadata types. If [member meta_underlined] is true`, meta tags display an underline. This behavior can be customized with [param underline_mode]. [b]Note:[/b] Meta tags do nothing by default when clicked. To assign behavior when clicked, connect [signal meta_clicked] to a function that is called when the meta tag is clicked.

fn (RichTextLabel) push_hint #

fn (s &RichTextLabel) push_hint(description string)

Adds a [code skip-lint][hint] tag to the tag stack. Same as BBCode [code skip-lint][hint=something]{text}[/hint].

fn (RichTextLabel) push_language #

fn (s &RichTextLabel) push_language(language string)

Adds language code used for text shaping algorithm and Open-Type font features.

fn (RichTextLabel) push_underline #

fn (s &RichTextLabel) push_underline(cfg RichTextLabel_push_underline_Cfg)

Adds a [code skip-lint][u]` tag to the tag stack. If [param color] alpha value is zero, current font color with alpha multiplied by [theme_item underline_alpha] is used.

fn (RichTextLabel) push_strikethrough #

fn (s &RichTextLabel) push_strikethrough(cfg RichTextLabel_push_strikethrough_Cfg)

Adds a [code skip-lint][s]` tag to the tag stack. If [param color] alpha value is zero, current font color with alpha multiplied by [theme_item strikethrough_alpha] is used.

fn (RichTextLabel) push_table #

fn (s &RichTextLabel) push_table(columns i64, cfg RichTextLabel_push_table_Cfg)

Adds a [code skip-lint][table=columns,inline_align]` tag to the tag stack. Use [method set_table_column_expand] to set column expansion ratio. Use [method push_cell] to add cells. [param name] is used as the table name for assistive apps.

fn (RichTextLabel) push_dropcap #

fn (s &RichTextLabel) push_dropcap(gd_string string, font Font, size i64, cfg RichTextLabel_push_dropcap_Cfg)

Adds a [code skip-lint][dropcap]` tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.

fn (RichTextLabel) set_table_column_expand #

fn (s &RichTextLabel) set_table_column_expand(column i64, expand bool, cfg RichTextLabel_set_table_column_expand_Cfg)

Edits the selected column's expansion options. If [param expand] is true, the column expands in proportion to its expansion ratio versus the other columns' ratios. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively. If [param expand] is false, the column will not contribute to the total ratio.

fn (RichTextLabel) set_table_column_name #

fn (s &RichTextLabel) set_table_column_name(column i64, name string)

Sets table column name for assistive apps.

fn (RichTextLabel) set_cell_row_background_color #

fn (s &RichTextLabel) set_cell_row_background_color(odd_row_bg Color, even_row_bg Color)

Sets color of a table cell. Separate colors for alternating rows can be specified.

fn (RichTextLabel) set_cell_border_color #

fn (s &RichTextLabel) set_cell_border_color(color Color)

Sets color of a table cell border.

fn (RichTextLabel) set_cell_size_override #

fn (s &RichTextLabel) set_cell_size_override(min_size Vector2, max_size Vector2)

Sets minimum and maximum size overrides for a table cell.

fn (RichTextLabel) set_cell_padding #

fn (s &RichTextLabel) set_cell_padding(padding Rect2)

Sets inner padding of a table cell.

fn (RichTextLabel) push_cell #

fn (s &RichTextLabel) push_cell()

Adds a [code skip-lint][cell] tag to the tag stack. Must be inside a [code skip-lint][table] tag. See [method push_table] for details. Use [method set_table_column_expand] to set column expansion ratio, [method set_cell_border_color] to set cell border, [method set_cell_row_background_color] to set cell background, [method set_cell_size_override] to override cell size, and [method set_cell_padding] to set padding.

fn (RichTextLabel) push_fgcolor #

fn (s &RichTextLabel) push_fgcolor(fgcolor Color)

Adds a [code skip-lint][fgcolor]tag to the tag stack. [b]Note:[/b] The foreground color has padding applied by default, which is controlled using [theme_item text_highlight_h_padding] and [theme_item text_highlight_v_padding]. This can lead to overlapping highlights if foreground colors are placed on neighboring lines/columns, so consider setting those theme items to0` if you want to avoid this.

fn (RichTextLabel) push_bgcolor #

fn (s &RichTextLabel) push_bgcolor(bgcolor Color)

Adds a [code skip-lint][bgcolor]tag to the tag stack. [b]Note:[/b] The background color has padding applied by default, which is controlled using [theme_item text_highlight_h_padding] and [theme_item text_highlight_v_padding]. This can lead to overlapping highlights if background colors are placed on neighboring lines/columns, so consider setting those theme items to0` if you want to avoid this.

fn (RichTextLabel) push_customfx #

fn (s &RichTextLabel) push_customfx(effect RichTextEffect, env Dictionary)

Adds a custom effect tag to the tag stack. The effect does not need to be in [member custom_effects]. The environment is directly passed to the effect.

fn (RichTextLabel) push_context #

fn (s &RichTextLabel) push_context()

Adds a context marker to the tag stack. See [method pop_context].

fn (RichTextLabel) pop_context #

fn (s &RichTextLabel) pop_context()

Terminates tags opened after the last [method push_context] call (including context marker), or all tags if there's no context marker on the stack.

fn (RichTextLabel) pop #

fn (s &RichTextLabel) pop()

Terminates the current tag. Use after push_* methods to close BBCodes manually. Does not need to follow add_* methods.

fn (RichTextLabel) pop_all #

fn (s &RichTextLabel) pop_all()

Terminates all tags opened by push_* methods.

fn (RichTextLabel) clear #

fn (s &RichTextLabel) clear()

Clears the tag stack, causing the label to display nothing. [b]Note:[/b] This method does not affect [member text], and its contents will show again if the label is redrawn. However, setting [member text] to an empty [String] also clears the stack.

fn (RichTextLabel) set_structured_text_bidi_override #

fn (s &RichTextLabel) set_structured_text_bidi_override(parser TextServerStructuredTextParser)

fn (RichTextLabel) get_structured_text_bidi_override #

fn (s &RichTextLabel) get_structured_text_bidi_override() TextServerStructuredTextParser

fn (RichTextLabel) set_structured_text_bidi_override_options #

fn (s &RichTextLabel) set_structured_text_bidi_override_options(gd_args Array)

fn (RichTextLabel) get_structured_text_bidi_override_options #

fn (s &RichTextLabel) get_structured_text_bidi_override_options() Array

fn (RichTextLabel) set_text_direction #

fn (s &RichTextLabel) set_text_direction(direction ControlTextDirection)

fn (RichTextLabel) get_text_direction #

fn (s &RichTextLabel) get_text_direction() ControlTextDirection

fn (RichTextLabel) set_language #

fn (s &RichTextLabel) set_language(language string)

fn (RichTextLabel) get_language #

fn (s &RichTextLabel) get_language() string

fn (RichTextLabel) set_horizontal_alignment #

fn (s &RichTextLabel) set_horizontal_alignment(alignment HorizontalAlignment)

fn (RichTextLabel) get_horizontal_alignment #

fn (s &RichTextLabel) get_horizontal_alignment() HorizontalAlignment

fn (RichTextLabel) set_vertical_alignment #

fn (s &RichTextLabel) set_vertical_alignment(alignment VerticalAlignment)

fn (RichTextLabel) get_vertical_alignment #

fn (s &RichTextLabel) get_vertical_alignment() VerticalAlignment

fn (RichTextLabel) set_justification_flags #

fn (s &RichTextLabel) set_justification_flags(justification_flags TextServerJustificationFlag)

fn (RichTextLabel) get_justification_flags #

fn (s &RichTextLabel) get_justification_flags() TextServerJustificationFlag

fn (RichTextLabel) set_tab_stops #

fn (s &RichTextLabel) set_tab_stops(tab_stops PackedFloat32Array)

fn (RichTextLabel) get_tab_stops #

fn (s &RichTextLabel) get_tab_stops() PackedFloat32Array

fn (RichTextLabel) set_autowrap_mode #

fn (s &RichTextLabel) set_autowrap_mode(autowrap_mode TextServerAutowrapMode)

fn (RichTextLabel) get_autowrap_mode #

fn (s &RichTextLabel) get_autowrap_mode() TextServerAutowrapMode

fn (RichTextLabel) set_autowrap_trim_flags #

fn (s &RichTextLabel) set_autowrap_trim_flags(autowrap_trim_flags TextServerLineBreakFlag)

fn (RichTextLabel) get_autowrap_trim_flags #

fn (s &RichTextLabel) get_autowrap_trim_flags() TextServerLineBreakFlag

fn (RichTextLabel) set_meta_underline #

fn (s &RichTextLabel) set_meta_underline(enable bool)

fn (RichTextLabel) is_meta_underlined #

fn (s &RichTextLabel) is_meta_underlined() bool

fn (RichTextLabel) set_hint_underline #

fn (s &RichTextLabel) set_hint_underline(enable bool)

fn (RichTextLabel) is_hint_underlined #

fn (s &RichTextLabel) is_hint_underlined() bool

fn (RichTextLabel) set_scroll_active #

fn (s &RichTextLabel) set_scroll_active(active bool)

fn (RichTextLabel) is_scroll_active #

fn (s &RichTextLabel) is_scroll_active() bool

fn (RichTextLabel) set_scroll_follow #

fn (s &RichTextLabel) set_scroll_follow(follow bool)

fn (RichTextLabel) is_scroll_following #

fn (s &RichTextLabel) is_scroll_following() bool

fn (RichTextLabel) get_v_scroll_bar #

fn (s &RichTextLabel) get_v_scroll_bar() VScrollBar

Returns the vertical scrollbar. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

fn (RichTextLabel) scroll_to_line #

fn (s &RichTextLabel) scroll_to_line(line i64)

Scrolls the window's top line to match [param line].

fn (RichTextLabel) scroll_to_paragraph #

fn (s &RichTextLabel) scroll_to_paragraph(paragraph i64)

Scrolls the window's top line to match first line of the [param paragraph].

fn (RichTextLabel) scroll_to_selection #

fn (s &RichTextLabel) scroll_to_selection()

Scrolls to the beginning of the current selection.

fn (RichTextLabel) set_tab_size #

fn (s &RichTextLabel) set_tab_size(spaces i64)

fn (RichTextLabel) get_tab_size #

fn (s &RichTextLabel) get_tab_size() i64

fn (RichTextLabel) set_fit_content #

fn (s &RichTextLabel) set_fit_content(enabled bool)

fn (RichTextLabel) is_fit_content_enabled #

fn (s &RichTextLabel) is_fit_content_enabled() bool

fn (RichTextLabel) set_selection_enabled #

fn (s &RichTextLabel) set_selection_enabled(enabled bool)

fn (RichTextLabel) is_selection_enabled #

fn (s &RichTextLabel) is_selection_enabled() bool

fn (RichTextLabel) set_context_menu_enabled #

fn (s &RichTextLabel) set_context_menu_enabled(enabled bool)

fn (RichTextLabel) is_context_menu_enabled #

fn (s &RichTextLabel) is_context_menu_enabled() bool

fn (RichTextLabel) set_shortcut_keys_enabled #

fn (s &RichTextLabel) set_shortcut_keys_enabled(enabled bool)

fn (RichTextLabel) is_shortcut_keys_enabled #

fn (s &RichTextLabel) is_shortcut_keys_enabled() bool

fn (RichTextLabel) set_deselect_on_focus_loss_enabled #

fn (s &RichTextLabel) set_deselect_on_focus_loss_enabled(enable bool)

fn (RichTextLabel) is_deselect_on_focus_loss_enabled #

fn (s &RichTextLabel) is_deselect_on_focus_loss_enabled() bool

fn (RichTextLabel) set_drag_and_drop_selection_enabled #

fn (s &RichTextLabel) set_drag_and_drop_selection_enabled(enable bool)

fn (RichTextLabel) is_drag_and_drop_selection_enabled #

fn (s &RichTextLabel) is_drag_and_drop_selection_enabled() bool

fn (RichTextLabel) get_selection_from #

fn (s &RichTextLabel) get_selection_from() i64

Returns the current selection first character index if a selection is active, -1 otherwise. Does not include BBCodes.

fn (RichTextLabel) get_selection_to #

fn (s &RichTextLabel) get_selection_to() i64

Returns the current selection last character index if a selection is active, -1 otherwise. Does not include BBCodes.

fn (RichTextLabel) get_selection_line_offset #

fn (s &RichTextLabel) get_selection_line_offset() f64

Returns the current selection vertical line offset if a selection is active, -1.0 otherwise.

fn (RichTextLabel) select_all #

fn (s &RichTextLabel) select_all()

Select all the text. If [member selection_enabled] is false, no selection will occur.

fn (RichTextLabel) get_selected_text #

fn (s &RichTextLabel) get_selected_text() string

Returns the current selection text. Does not include BBCodes.

fn (RichTextLabel) deselect #

fn (s &RichTextLabel) deselect()

Clears the current selection.

fn (RichTextLabel) parse_bbcode #

fn (s &RichTextLabel) parse_bbcode(bbcode string)

The assignment version of [method append_text]. Clears the tag stack and inserts the new content.

fn (RichTextLabel) append_text #

fn (s &RichTextLabel) append_text(bbcode string)

Parses [param bbcode] and adds tags to the tag stack as needed. [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_text] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member text] instead of using [method append_text].

fn (RichTextLabel) get_text #

fn (s &RichTextLabel) get_text() string

fn (RichTextLabel) is_ready #

fn (s &RichTextLabel) is_ready() bool

If [member threaded] is enabled, returns true if the background thread has finished text processing, otherwise always return true.

fn (RichTextLabel) is_finished #

fn (s &RichTextLabel) is_finished() bool

If [member threaded] is enabled, returns true if the background thread has finished text processing, otherwise always return true.

fn (RichTextLabel) set_threaded #

fn (s &RichTextLabel) set_threaded(threaded bool)

fn (RichTextLabel) is_threaded #

fn (s &RichTextLabel) is_threaded() bool

fn (RichTextLabel) set_progress_bar_delay #

fn (s &RichTextLabel) set_progress_bar_delay(delay_ms i64)

fn (RichTextLabel) get_progress_bar_delay #

fn (s &RichTextLabel) get_progress_bar_delay() i64

fn (RichTextLabel) set_visible_characters #

fn (s &RichTextLabel) set_visible_characters(amount i64)

fn (RichTextLabel) get_visible_characters #

fn (s &RichTextLabel) get_visible_characters() i64

fn (RichTextLabel) get_visible_characters_behavior #

fn (s &RichTextLabel) get_visible_characters_behavior() TextServerVisibleCharactersBehavior

fn (RichTextLabel) set_visible_characters_behavior #

fn (s &RichTextLabel) set_visible_characters_behavior(behavior TextServerVisibleCharactersBehavior)

fn (RichTextLabel) set_visible_ratio #

fn (s &RichTextLabel) set_visible_ratio(ratio f64)

fn (RichTextLabel) get_visible_ratio #

fn (s &RichTextLabel) get_visible_ratio() f64

fn (RichTextLabel) get_character_line #

fn (s &RichTextLabel) get_character_line(character i64) i64

Returns the line number of the character position provided. Line and character numbers are both zero-indexed. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) get_character_paragraph #

fn (s &RichTextLabel) get_character_paragraph(character i64) i64

Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) get_total_character_count #

fn (s &RichTextLabel) get_total_character_count() i64

Returns the total number of characters from text tags. Does not include BBCodes.

fn (RichTextLabel) set_use_bbcode #

fn (s &RichTextLabel) set_use_bbcode(enable bool)

fn (RichTextLabel) is_using_bbcode #

fn (s &RichTextLabel) is_using_bbcode() bool

fn (RichTextLabel) get_line_count #

fn (s &RichTextLabel) get_line_count() i64

Returns the total number of lines in the text. Wrapped text is counted as multiple lines. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) get_line_range #

fn (s &RichTextLabel) get_line_range(line i64) Vector2i

Returns the indexes of the first and last visible characters for the given [param line], as a [Vector2i]. [b]Note:[/b] If [member visible_characters_behavior] is set to [constant TextServer.VC_CHARS_BEFORE_SHAPING] only visible wrapped lines are counted. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) get_visible_line_count #

fn (s &RichTextLabel) get_visible_line_count() i64

Returns the number of visible lines. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) get_paragraph_count #

fn (s &RichTextLabel) get_paragraph_count() i64

Returns the total number of paragraphs (newlines or p tags in the tag stack's text tags). Considers wrapped text as one paragraph.

fn (RichTextLabel) get_visible_paragraph_count #

fn (s &RichTextLabel) get_visible_paragraph_count() i64

Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) get_content_height #

fn (s &RichTextLabel) get_content_height() i64

Returns the height of the content. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) get_content_width #

fn (s &RichTextLabel) get_content_width() i64

Returns the width of the content. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) get_line_height #

fn (s &RichTextLabel) get_line_height(line i64) i64

Returns the height of the line found at the provided index. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether the document is fully loaded.

fn (RichTextLabel) get_line_width #

fn (s &RichTextLabel) get_line_width(line i64) i64

Returns the width of the line found at the provided index. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether the document is fully loaded.

fn (RichTextLabel) get_line_offset #

fn (s &RichTextLabel) get_line_offset(line i64) f64

Returns the vertical offset of the line found at the provided index. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) get_paragraph_offset #

fn (s &RichTextLabel) get_paragraph_offset(paragraph i64) f64

Returns the vertical offset of the paragraph found at the provided index. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_finished] or [signal finished] to determine whether document is fully loaded.

fn (RichTextLabel) parse_expressions_for_values #

fn (s &RichTextLabel) parse_expressions_for_values(expressions PackedStringArray) Dictionary

Parses BBCode parameter [param expressions] into a dictionary.

fn (RichTextLabel) set_effects #

fn (s &RichTextLabel) set_effects(effects Array)

fn (RichTextLabel) get_effects #

fn (s &RichTextLabel) get_effects() Array

fn (RichTextLabel) install_effect #

fn (s &RichTextLabel) install_effect(effect_ ToVariant)

Installs a custom effect. This can also be done in the Inspector through the [member custom_effects] property. [param effect] should be a valid [RichTextEffect]. [b]Example:[/b] With the following script extending from [RichTextEffect]:

##class_name MyCustomEffect
extends RichTextEffect

var bbcode = 'my_custom_effect'

##

The above effect can be installed in [RichTextLabel] from a script:

##extends RichTextLabel

func _ready():
install_effect(MyCustomEffect.new())

##install_effect(preload('res://effect.gd').new())

fn (RichTextLabel) reload_effects #

fn (s &RichTextLabel) reload_effects()

Reloads custom effects. Useful when [member custom_effects] is modified manually.

fn (RichTextLabel) get_menu #

fn (s &RichTextLabel) get_menu() PopupMenu

Returns the [PopupMenu] of this [RichTextLabel]. By default, this menu is displayed when right-clicking on the [RichTextLabel]. You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see [enum MenuItems]). For example: [codeblocks] [gdscript] func _ready(): var menu = get_menu()# Remove "Select All" item.menu.remove_item(MENU_SELECT_ALL)# Add custom items.menu.add_separator() menu.add_item("Duplicate Text", MENU_MAX + 1)# Connect callback.menu.id_pressed.connect(_on_item_pressed)

func _on_item_pressed(id): if id == MENU_MAX + 1: add_text("\n" + get_parsed_text()) [/gdscript] [csharp] public override void _Ready() { var menu = GetMenu(); // Remove "Select All" item. menu.RemoveItem(RichTextLabel.MenuItems.SelectAll); // Add custom items. menu.AddSeparator(); menu.AddItem("Duplicate Text", RichTextLabel.MenuItems.Max + 1); // Add event handler. menu.IdPressed += OnItemPressed; }

public void OnItemPressed(int id) { if (id == TextEdit.MenuItems.Max + 1) { AddText("\n" + GetParsedText()); } } [/csharp] [/codeblocks] [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.

fn (RichTextLabel) is_menu_visible #

fn (s &RichTextLabel) is_menu_visible() bool

Returns whether the menu is visible. Use this instead of get_menu().visible to improve performance (so the creation of the menu is avoided).

fn (RichTextLabel) menu_option #

fn (s &RichTextLabel) menu_option(option i64)

Executes a given action as defined in the [enum MenuItems] enum.

struct RichTextLabel_add_hr_Cfg #

@[params]
struct RichTextLabel_add_hr_Cfg {
pub:
	width             i64                 = 90
	height            i64                 = 2
	color             Color               = Color{1, 1, 1, 1}
	alignment         HorizontalAlignment = unsafe { HorizontalAlignment(1) }
	width_in_percent  bool
	height_in_percent bool
}

Optional parameters for RichTextLabel#add_hr

struct RichTextLabel_add_image_Cfg #

@[params]
struct RichTextLabel_add_image_Cfg {
pub:
	width             i64
	height            i64
	color             Color           = Color{1, 1, 1, 1}
	inline_align      InlineAlignment = unsafe { InlineAlignment(5) }
	region            Rect2           = Rect2{Vector2{0, 0}, Vector2{0, 0}}
	key               ToVariant
	pad               bool
	tooltip           string
	width_in_percent  bool
	height_in_percent bool
	alt_text          string
}

Optional parameters for RichTextLabel#add_image

struct RichTextLabel_push_dropcap_Cfg #

@[params]
struct RichTextLabel_push_dropcap_Cfg {
pub:
	dropcap_margins Rect2 = Rect2{Vector2{0, 0}, Vector2{0, 0}}
	color           Color = Color{1, 1, 1, 1}
	outline_size    i64
	outline_color   Color = Color{0, 0, 0, 0}
}

Optional parameters for RichTextLabel#push_dropcap

struct RichTextLabel_push_font_Cfg #

@[params]
struct RichTextLabel_push_font_Cfg {
pub:
	font_size i64
}

Optional parameters for RichTextLabel#push_font

struct RichTextLabel_push_list_Cfg #

@[params]
struct RichTextLabel_push_list_Cfg {
pub:
	bullet string
}

Optional parameters for RichTextLabel#push_list

struct RichTextLabel_push_meta_Cfg #

@[params]
struct RichTextLabel_push_meta_Cfg {
pub:
	underline_mode RichTextLabelMetaUnderline = unsafe { RichTextLabelMetaUnderline(1) }
	tooltip        string
}

Optional parameters for RichTextLabel#push_meta

struct RichTextLabel_push_paragraph_Cfg #

@[params]
struct RichTextLabel_push_paragraph_Cfg {
pub:
	base_direction      ControlTextDirection = unsafe { ControlTextDirection(0) }
	language            string
	st_parser           TextServerStructuredTextParser = unsafe { TextServerStructuredTextParser(0) }
	justification_flags TextServerJustificationFlag
	tab_stops           PackedFloat32Array = PackedFloat32Array{}
}

Optional parameters for RichTextLabel#push_paragraph

struct RichTextLabel_push_strikethrough_Cfg #

@[params]
struct RichTextLabel_push_strikethrough_Cfg {
pub:
	color Color = Color{0, 0, 0, 0}
}

Optional parameters for RichTextLabel#push_strikethrough

struct RichTextLabel_push_table_Cfg #

@[params]
struct RichTextLabel_push_table_Cfg {
pub:
	inline_align InlineAlignment = unsafe { InlineAlignment(0) }
	align_to_row i64             = -1
	name         string
}

Optional parameters for RichTextLabel#push_table

struct RichTextLabel_push_underline_Cfg #

@[params]
struct RichTextLabel_push_underline_Cfg {
pub:
	color Color = Color{0, 0, 0, 0}
}

Optional parameters for RichTextLabel#push_underline

struct RichTextLabel_remove_paragraph_Cfg #

@[params]
struct RichTextLabel_remove_paragraph_Cfg {
pub:
	no_invalidate bool
}

Optional parameters for RichTextLabel#remove_paragraph

struct RichTextLabel_set_table_column_expand_Cfg #

@[params]
struct RichTextLabel_set_table_column_expand_Cfg {
pub:
	ratio  i64 = 1
	shrink bool
}

Optional parameters for RichTextLabel#set_table_column_expand

struct RichTextLabel_update_image_Cfg #

@[params]
struct RichTextLabel_update_image_Cfg {
pub:
	width             i64
	height            i64
	color             Color           = Color{1, 1, 1, 1}
	inline_align      InlineAlignment = unsafe { InlineAlignment(5) }
	region            Rect2           = Rect2{Vector2{0, 0}, Vector2{0, 0}}
	pad               bool
	tooltip           string
	width_in_percent  bool
	height_in_percent bool
}

Optional parameters for RichTextLabel#update_image

struct RigidBody2D #

struct RigidBody2D {
	PhysicsBody2D
}

A 2D physics body that is moved by a physics simulation.

fn (RigidBody2D) to_variant #

fn (s &RigidBody2D) to_variant() Variant

fn (RigidBody2D) from_variant #

fn (mut s RigidBody2D) from_variant(variant &Variant)

fn (RigidBody2D) gd_integrate_forces #

fn (s &RigidBody2D) gd_integrate_forces(state PhysicsDirectBodyState2D)

Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the [member custom_integrator] property allows you to disable the standard force integration and do fully custom force integration for a body.

fn (RigidBody2D) set_mass #

fn (s &RigidBody2D) set_mass(mass f64)

fn (RigidBody2D) get_mass #

fn (s &RigidBody2D) get_mass() f64

fn (RigidBody2D) get_inertia #

fn (s &RigidBody2D) get_inertia() f64

fn (RigidBody2D) set_inertia #

fn (s &RigidBody2D) set_inertia(inertia f64)

fn (RigidBody2D) set_center_of_mass_mode #

fn (s &RigidBody2D) set_center_of_mass_mode(mode RigidBody2DCenterOfMassMode)

fn (RigidBody2D) get_center_of_mass_mode #

fn (s &RigidBody2D) get_center_of_mass_mode() RigidBody2DCenterOfMassMode

fn (RigidBody2D) set_center_of_mass #

fn (s &RigidBody2D) set_center_of_mass(center_of_mass Vector2)

fn (RigidBody2D) get_center_of_mass #

fn (s &RigidBody2D) get_center_of_mass() Vector2

fn (RigidBody2D) set_physics_material_override #

fn (s &RigidBody2D) set_physics_material_override(physics_material_override PhysicsMaterial)

fn (RigidBody2D) get_physics_material_override #

fn (s &RigidBody2D) get_physics_material_override() PhysicsMaterial

fn (RigidBody2D) set_gravity_scale #

fn (s &RigidBody2D) set_gravity_scale(gravity_scale f64)

fn (RigidBody2D) get_gravity_scale #

fn (s &RigidBody2D) get_gravity_scale() f64

fn (RigidBody2D) set_linear_damp_mode #

fn (s &RigidBody2D) set_linear_damp_mode(linear_damp_mode RigidBody2DDampMode)

fn (RigidBody2D) get_linear_damp_mode #

fn (s &RigidBody2D) get_linear_damp_mode() RigidBody2DDampMode

fn (RigidBody2D) set_angular_damp_mode #

fn (s &RigidBody2D) set_angular_damp_mode(angular_damp_mode RigidBody2DDampMode)

fn (RigidBody2D) get_angular_damp_mode #

fn (s &RigidBody2D) get_angular_damp_mode() RigidBody2DDampMode

fn (RigidBody2D) set_linear_damp #

fn (s &RigidBody2D) set_linear_damp(linear_damp f64)

fn (RigidBody2D) get_linear_damp #

fn (s &RigidBody2D) get_linear_damp() f64

fn (RigidBody2D) set_angular_damp #

fn (s &RigidBody2D) set_angular_damp(angular_damp f64)

fn (RigidBody2D) get_angular_damp #

fn (s &RigidBody2D) get_angular_damp() f64

fn (RigidBody2D) set_linear_velocity #

fn (s &RigidBody2D) set_linear_velocity(linear_velocity Vector2)

fn (RigidBody2D) get_linear_velocity #

fn (s &RigidBody2D) get_linear_velocity() Vector2

fn (RigidBody2D) set_angular_velocity #

fn (s &RigidBody2D) set_angular_velocity(angular_velocity f64)

fn (RigidBody2D) get_angular_velocity #

fn (s &RigidBody2D) get_angular_velocity() f64

fn (RigidBody2D) set_max_contacts_reported #

fn (s &RigidBody2D) set_max_contacts_reported(amount i64)

fn (RigidBody2D) get_max_contacts_reported #

fn (s &RigidBody2D) get_max_contacts_reported() i64

fn (RigidBody2D) get_contact_count #

fn (s &RigidBody2D) get_contact_count() i64

Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]). [b]Note:[/b] To retrieve the colliding bodies, use [method get_colliding_bodies].

fn (RigidBody2D) set_use_custom_integrator #

fn (s &RigidBody2D) set_use_custom_integrator(enable bool)

fn (RigidBody2D) is_using_custom_integrator #

fn (s &RigidBody2D) is_using_custom_integrator() bool

fn (RigidBody2D) set_contact_monitor #

fn (s &RigidBody2D) set_contact_monitor(enabled bool)

fn (RigidBody2D) is_contact_monitor_enabled #

fn (s &RigidBody2D) is_contact_monitor_enabled() bool

fn (RigidBody2D) set_continuous_collision_detection_mode #

fn (s &RigidBody2D) set_continuous_collision_detection_mode(mode RigidBody2DCCDMode)

fn (RigidBody2D) get_continuous_collision_detection_mode #

fn (s &RigidBody2D) get_continuous_collision_detection_mode() RigidBody2DCCDMode

fn (RigidBody2D) set_axis_velocity #

fn (s &RigidBody2D) set_axis_velocity(axis_velocity Vector2)

Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.

fn (RigidBody2D) apply_central_impulse #

fn (s &RigidBody2D) apply_central_impulse(cfg RigidBody2D_apply_central_impulse_Cfg)

Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). This is equivalent to using [method apply_impulse] at the body's center of mass.

fn (RigidBody2D) apply_impulse #

fn (s &RigidBody2D) apply_impulse(impulse Vector2, cfg RigidBody2D_apply_impulse_Cfg)

Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [param position] is the offset from the body origin in global coordinates.

fn (RigidBody2D) apply_torque_impulse #

fn (s &RigidBody2D) apply_torque_impulse(torque f64)

Applies a rotational impulse to the body without affecting the position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia].

fn (RigidBody2D) apply_central_force #

fn (s &RigidBody2D) apply_central_force(force Vector2)

Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using [method apply_force] at the body's center of mass.

fn (RigidBody2D) apply_force #

fn (s &RigidBody2D) apply_force(force Vector2, cfg RigidBody2D_apply_force_Cfg)

Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. [param position] is the offset from the body origin in global coordinates.

fn (RigidBody2D) apply_torque #

fn (s &RigidBody2D) apply_torque(torque f64)

Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia].

fn (RigidBody2D) add_constant_central_force #

fn (s &RigidBody2D) add_constant_central_force(force Vector2)

Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with constant_force = Vector2(0, 0). This is equivalent to using [method add_constant_force] at the body's center of mass.

fn (RigidBody2D) add_constant_force #

fn (s &RigidBody2D) add_constant_force(force Vector2, cfg RigidBody2D_add_constant_force_Cfg)

Adds a constant positioned force to the body that keeps being applied over time until cleared with constant_force = Vector2(0, 0). [param position] is the offset from the body origin in global coordinates.

fn (RigidBody2D) add_constant_torque #

fn (s &RigidBody2D) add_constant_torque(torque f64)

Adds a constant rotational force without affecting position that keeps being applied over time until cleared with constant_torque = 0.

fn (RigidBody2D) set_constant_force #

fn (s &RigidBody2D) set_constant_force(force Vector2)

fn (RigidBody2D) get_constant_force #

fn (s &RigidBody2D) get_constant_force() Vector2

fn (RigidBody2D) set_constant_torque #

fn (s &RigidBody2D) set_constant_torque(torque f64)

fn (RigidBody2D) get_constant_torque #

fn (s &RigidBody2D) get_constant_torque() f64

fn (RigidBody2D) set_sleeping #

fn (s &RigidBody2D) set_sleeping(sleeping bool)

fn (RigidBody2D) is_sleeping #

fn (s &RigidBody2D) is_sleeping() bool

fn (RigidBody2D) set_can_sleep #

fn (s &RigidBody2D) set_can_sleep(able_to_sleep bool)

fn (RigidBody2D) is_able_to_sleep #

fn (s &RigidBody2D) is_able_to_sleep() bool

fn (RigidBody2D) set_lock_rotation_enabled #

fn (s &RigidBody2D) set_lock_rotation_enabled(lock_rotation bool)

fn (RigidBody2D) is_lock_rotation_enabled #

fn (s &RigidBody2D) is_lock_rotation_enabled() bool

fn (RigidBody2D) set_freeze_enabled #

fn (s &RigidBody2D) set_freeze_enabled(freeze_mode bool)

fn (RigidBody2D) is_freeze_enabled #

fn (s &RigidBody2D) is_freeze_enabled() bool

fn (RigidBody2D) set_freeze_mode #

fn (s &RigidBody2D) set_freeze_mode(freeze_mode RigidBody2DFreezeMode)

fn (RigidBody2D) get_freeze_mode #

fn (s &RigidBody2D) get_freeze_mode() RigidBody2DFreezeMode

fn (RigidBody2D) get_colliding_bodies #

fn (s &RigidBody2D) get_colliding_bodies() Array

Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to true and [member max_contacts_reported] to be set high enough to detect all the collisions. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead.

struct RigidBody2D_add_constant_force_Cfg #

@[params]
struct RigidBody2D_add_constant_force_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for RigidBody2D#add_constant_force

struct RigidBody2D_apply_central_impulse_Cfg #

@[params]
struct RigidBody2D_apply_central_impulse_Cfg {
pub:
	impulse Vector2 = Vector2{0, 0}
}

Optional parameters for RigidBody2D#apply_central_impulse

struct RigidBody2D_apply_force_Cfg #

@[params]
struct RigidBody2D_apply_force_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for RigidBody2D#apply_force

struct RigidBody2D_apply_impulse_Cfg #

@[params]
struct RigidBody2D_apply_impulse_Cfg {
pub:
	position Vector2 = Vector2{0, 0}
}

Optional parameters for RigidBody2D#apply_impulse

struct RigidBody3D #

struct RigidBody3D {
	PhysicsBody3D
}

A 3D physics body that is moved by a physics simulation.

fn (RigidBody3D) to_variant #

fn (s &RigidBody3D) to_variant() Variant

fn (RigidBody3D) from_variant #

fn (mut s RigidBody3D) from_variant(variant &Variant)

fn (RigidBody3D) gd_integrate_forces #

fn (s &RigidBody3D) gd_integrate_forces(state PhysicsDirectBodyState3D)

Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the [member custom_integrator] property allows you to disable the standard force integration and do fully custom force integration for a body.

fn (RigidBody3D) set_mass #

fn (s &RigidBody3D) set_mass(mass f64)

fn (RigidBody3D) get_mass #

fn (s &RigidBody3D) get_mass() f64

fn (RigidBody3D) set_inertia #

fn (s &RigidBody3D) set_inertia(inertia Vector3)

fn (RigidBody3D) get_inertia #

fn (s &RigidBody3D) get_inertia() Vector3

fn (RigidBody3D) set_center_of_mass_mode #

fn (s &RigidBody3D) set_center_of_mass_mode(mode RigidBody3DCenterOfMassMode)

fn (RigidBody3D) get_center_of_mass_mode #

fn (s &RigidBody3D) get_center_of_mass_mode() RigidBody3DCenterOfMassMode

fn (RigidBody3D) set_center_of_mass #

fn (s &RigidBody3D) set_center_of_mass(center_of_mass Vector3)

fn (RigidBody3D) get_center_of_mass #

fn (s &RigidBody3D) get_center_of_mass() Vector3

fn (RigidBody3D) set_physics_material_override #

fn (s &RigidBody3D) set_physics_material_override(physics_material_override PhysicsMaterial)

fn (RigidBody3D) get_physics_material_override #

fn (s &RigidBody3D) get_physics_material_override() PhysicsMaterial

fn (RigidBody3D) set_linear_velocity #

fn (s &RigidBody3D) set_linear_velocity(linear_velocity Vector3)

fn (RigidBody3D) get_linear_velocity #

fn (s &RigidBody3D) get_linear_velocity() Vector3

fn (RigidBody3D) set_angular_velocity #

fn (s &RigidBody3D) set_angular_velocity(angular_velocity Vector3)

fn (RigidBody3D) get_angular_velocity #

fn (s &RigidBody3D) get_angular_velocity() Vector3

fn (RigidBody3D) get_inverse_inertia_tensor #

fn (s &RigidBody3D) get_inverse_inertia_tensor() Basis

Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D].

fn (RigidBody3D) set_gravity_scale #

fn (s &RigidBody3D) set_gravity_scale(gravity_scale f64)

fn (RigidBody3D) get_gravity_scale #

fn (s &RigidBody3D) get_gravity_scale() f64

fn (RigidBody3D) set_linear_damp_mode #

fn (s &RigidBody3D) set_linear_damp_mode(linear_damp_mode RigidBody3DDampMode)

fn (RigidBody3D) get_linear_damp_mode #

fn (s &RigidBody3D) get_linear_damp_mode() RigidBody3DDampMode

fn (RigidBody3D) set_angular_damp_mode #

fn (s &RigidBody3D) set_angular_damp_mode(angular_damp_mode RigidBody3DDampMode)

fn (RigidBody3D) get_angular_damp_mode #

fn (s &RigidBody3D) get_angular_damp_mode() RigidBody3DDampMode

fn (RigidBody3D) set_linear_damp #

fn (s &RigidBody3D) set_linear_damp(linear_damp f64)

fn (RigidBody3D) get_linear_damp #

fn (s &RigidBody3D) get_linear_damp() f64

fn (RigidBody3D) set_angular_damp #

fn (s &RigidBody3D) set_angular_damp(angular_damp f64)

fn (RigidBody3D) get_angular_damp #

fn (s &RigidBody3D) get_angular_damp() f64

fn (RigidBody3D) set_max_contacts_reported #

fn (s &RigidBody3D) set_max_contacts_reported(amount i64)

fn (RigidBody3D) get_max_contacts_reported #

fn (s &RigidBody3D) get_max_contacts_reported() i64

fn (RigidBody3D) get_contact_count #

fn (s &RigidBody3D) get_contact_count() i64

Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]). [b]Note:[/b] To retrieve the colliding bodies, use [method get_colliding_bodies].

fn (RigidBody3D) set_use_custom_integrator #

fn (s &RigidBody3D) set_use_custom_integrator(enable bool)

fn (RigidBody3D) is_using_custom_integrator #

fn (s &RigidBody3D) is_using_custom_integrator() bool

fn (RigidBody3D) set_contact_monitor #

fn (s &RigidBody3D) set_contact_monitor(enabled bool)

fn (RigidBody3D) is_contact_monitor_enabled #

fn (s &RigidBody3D) is_contact_monitor_enabled() bool

fn (RigidBody3D) set_use_continuous_collision_detection #

fn (s &RigidBody3D) set_use_continuous_collision_detection(enable bool)

fn (RigidBody3D) is_using_continuous_collision_detection #

fn (s &RigidBody3D) is_using_continuous_collision_detection() bool

fn (RigidBody3D) set_axis_velocity #

fn (s &RigidBody3D) set_axis_velocity(axis_velocity Vector3)

Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.

fn (RigidBody3D) apply_central_impulse #

fn (s &RigidBody3D) apply_central_impulse(impulse Vector3)

Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). This is equivalent to using [method apply_impulse] at the body's center of mass.

fn (RigidBody3D) apply_impulse #

fn (s &RigidBody3D) apply_impulse(impulse Vector3, cfg RigidBody3D_apply_impulse_Cfg)

Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [param position] is the offset from the body origin in global coordinates.

fn (RigidBody3D) apply_torque_impulse #

fn (s &RigidBody3D) apply_torque_impulse(impulse Vector3)

Applies a rotational impulse to the body without affecting the position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia].

fn (RigidBody3D) apply_central_force #

fn (s &RigidBody3D) apply_central_force(force Vector3)

Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. This is equivalent to using [method apply_force] at the body's center of mass.

fn (RigidBody3D) apply_force #

fn (s &RigidBody3D) apply_force(force Vector3, cfg RigidBody3D_apply_force_Cfg)

Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. [param position] is the offset from the body origin in global coordinates.

fn (RigidBody3D) apply_torque #

fn (s &RigidBody3D) apply_torque(torque Vector3)

Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia].

fn (RigidBody3D) add_constant_central_force #

fn (s &RigidBody3D) add_constant_central_force(force Vector3)

Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with constant_force = Vector3(0, 0, 0). This is equivalent to using [method add_constant_force] at the body's center of mass.

fn (RigidBody3D) add_constant_force #

fn (s &RigidBody3D) add_constant_force(force Vector3, cfg RigidBody3D_add_constant_force_Cfg)

Adds a constant positioned force to the body that keeps being applied over time until cleared with constant_force = Vector3(0, 0, 0). [param position] is the offset from the body origin in global coordinates.

fn (RigidBody3D) add_constant_torque #

fn (s &RigidBody3D) add_constant_torque(torque Vector3)

Adds a constant rotational force without affecting position that keeps being applied over time until cleared with constant_torque = Vector3(0, 0, 0).

fn (RigidBody3D) set_constant_force #

fn (s &RigidBody3D) set_constant_force(force Vector3)

fn (RigidBody3D) get_constant_force #

fn (s &RigidBody3D) get_constant_force() Vector3

fn (RigidBody3D) set_constant_torque #

fn (s &RigidBody3D) set_constant_torque(torque Vector3)

fn (RigidBody3D) get_constant_torque #

fn (s &RigidBody3D) get_constant_torque() Vector3

fn (RigidBody3D) set_sleeping #

fn (s &RigidBody3D) set_sleeping(sleeping bool)

fn (RigidBody3D) is_sleeping #

fn (s &RigidBody3D) is_sleeping() bool

fn (RigidBody3D) set_can_sleep #

fn (s &RigidBody3D) set_can_sleep(able_to_sleep bool)

fn (RigidBody3D) is_able_to_sleep #

fn (s &RigidBody3D) is_able_to_sleep() bool

fn (RigidBody3D) set_lock_rotation_enabled #

fn (s &RigidBody3D) set_lock_rotation_enabled(lock_rotation bool)

fn (RigidBody3D) is_lock_rotation_enabled #

fn (s &RigidBody3D) is_lock_rotation_enabled() bool

fn (RigidBody3D) set_freeze_enabled #

fn (s &RigidBody3D) set_freeze_enabled(freeze_mode bool)

fn (RigidBody3D) is_freeze_enabled #

fn (s &RigidBody3D) is_freeze_enabled() bool

fn (RigidBody3D) set_freeze_mode #

fn (s &RigidBody3D) set_freeze_mode(freeze_mode RigidBody3DFreezeMode)

fn (RigidBody3D) get_freeze_mode #

fn (s &RigidBody3D) get_freeze_mode() RigidBody3DFreezeMode

fn (RigidBody3D) get_colliding_bodies #

fn (s &RigidBody3D) get_colliding_bodies() Array

Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to true and [member max_contacts_reported] to be set high enough to detect all the collisions. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead.

struct RigidBody3D_add_constant_force_Cfg #

@[params]
struct RigidBody3D_add_constant_force_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for RigidBody3D#add_constant_force

struct RigidBody3D_apply_force_Cfg #

@[params]
struct RigidBody3D_apply_force_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for RigidBody3D#apply_force

struct RigidBody3D_apply_impulse_Cfg #

@[params]
struct RigidBody3D_apply_impulse_Cfg {
pub:
	position Vector3 = Vector3{0, 0, 0}
}

Optional parameters for RigidBody3D#apply_impulse

struct RootMotionView #

struct RootMotionView {
	VisualInstance3D
}

Editor-only helper for setting up root motion in [AnimationMixer].

fn (RootMotionView) to_variant #

fn (s &RootMotionView) to_variant() Variant

fn (RootMotionView) from_variant #

fn (mut s RootMotionView) from_variant(variant &Variant)

fn (RootMotionView) set_animation_path #

fn (s &RootMotionView) set_animation_path(path NodePath)

fn (RootMotionView) get_animation_path #

fn (s &RootMotionView) get_animation_path() NodePath

fn (RootMotionView) set_color #

fn (s &RootMotionView) set_color(color Color)

fn (RootMotionView) get_color #

fn (s &RootMotionView) get_color() Color

fn (RootMotionView) set_cell_size #

fn (s &RootMotionView) set_cell_size(size f64)

fn (RootMotionView) get_cell_size #

fn (s &RootMotionView) get_cell_size() f64

fn (RootMotionView) set_radius #

fn (s &RootMotionView) set_radius(size f64)

fn (RootMotionView) get_radius #

fn (s &RootMotionView) get_radius() f64

fn (RootMotionView) set_zero_y #

fn (s &RootMotionView) set_zero_y(enable bool)

fn (RootMotionView) get_zero_y #

fn (s &RootMotionView) get_zero_y() bool

struct SVGTexture #

struct SVGTexture {
	Texture2D
}

A scalable [Texture2D] based on an SVG image.

fn (SVGTexture) to_variant #

fn (s &SVGTexture) to_variant() Variant

fn (SVGTexture) from_variant #

fn (mut s SVGTexture) from_variant(variant &Variant)

fn (SVGTexture) set_source #

fn (s &SVGTexture) set_source(source string)

Sets SVG source code.

fn (SVGTexture) get_source #

fn (s &SVGTexture) get_source() string

Returns SVG source code.

fn (SVGTexture) set_base_scale #

fn (s &SVGTexture) set_base_scale(base_scale f64)

fn (SVGTexture) get_base_scale #

fn (s &SVGTexture) get_base_scale() f64

fn (SVGTexture) set_saturation #

fn (s &SVGTexture) set_saturation(saturation f64)

fn (SVGTexture) get_saturation #

fn (s &SVGTexture) get_saturation() f64

fn (SVGTexture) set_color_map #

fn (s &SVGTexture) set_color_map(color_map Dictionary)

fn (SVGTexture) get_color_map #

fn (s &SVGTexture) get_color_map() Dictionary

fn (SVGTexture) set_size_override #

fn (s &SVGTexture) set_size_override(size Vector2i)

Resizes the texture to the specified dimensions.

struct SVGTexture_create_from_string_Cfg #

@[params]
struct SVGTexture_create_from_string_Cfg {
pub:
	scale      f64 = 1.0
	saturation f64 = 1.0
	color_map  Dictionary
}

Optional parameters for SVGTexture#create_from_string

struct SceneMultiplayer #

struct SceneMultiplayer {
	MultiplayerAPI
}

High-level multiplayer API implementation.

fn (SceneMultiplayer) to_variant #

fn (s &SceneMultiplayer) to_variant() Variant

fn (SceneMultiplayer) from_variant #

fn (mut s SceneMultiplayer) from_variant(variant &Variant)

fn (SceneMultiplayer) set_root_path #

fn (s &SceneMultiplayer) set_root_path(path NodePath)

fn (SceneMultiplayer) get_root_path #

fn (s &SceneMultiplayer) get_root_path() NodePath

fn (SceneMultiplayer) clear #

fn (s &SceneMultiplayer) clear()

Clears the current SceneMultiplayer network state (you shouldn't call this unless you know what you are doing).

fn (SceneMultiplayer) disconnect_peer #

fn (s &SceneMultiplayer) disconnect_peer(id i64)

Disconnects the peer identified by [param id], removing it from the list of connected peers, and closing the underlying connection with it.

fn (SceneMultiplayer) get_authenticating_peers #

fn (s &SceneMultiplayer) get_authenticating_peers() PackedInt32Array

Returns the IDs of the peers currently trying to authenticate with this [MultiplayerAPI].

fn (SceneMultiplayer) send_auth #

fn (s &SceneMultiplayer) send_auth(id i64, data PackedByteArray) GDError

Sends the specified [param data] to the remote peer identified by [param id] as part of an authentication message. This can be used to authenticate peers, and control when [signal MultiplayerAPI.peer_connected] is emitted (and the remote peer accepted as one of the connected peers).

fn (SceneMultiplayer) complete_auth #

fn (s &SceneMultiplayer) complete_auth(id i64) GDError

Mark the authentication step as completed for the remote peer identified by [param id]. The [signal MultiplayerAPI.peer_connected] signal will be emitted for this peer once the remote side also completes the authentication. No further authentication messages are expected to be received from this peer. If a peer disconnects before completing authentication, either due to a network issue, the [member auth_timeout] expiring, or manually calling [method disconnect_peer], the [signal peer_authentication_failed] signal will be emitted instead of [signal MultiplayerAPI.peer_disconnected].

fn (SceneMultiplayer) set_auth_callback #

fn (s &SceneMultiplayer) set_auth_callback(callback Callable)

fn (SceneMultiplayer) get_auth_callback #

fn (s &SceneMultiplayer) get_auth_callback() Callable

fn (SceneMultiplayer) set_auth_timeout #

fn (s &SceneMultiplayer) set_auth_timeout(timeout f64)

fn (SceneMultiplayer) get_auth_timeout #

fn (s &SceneMultiplayer) get_auth_timeout() f64

fn (SceneMultiplayer) set_refuse_new_connections #

fn (s &SceneMultiplayer) set_refuse_new_connections(refuse bool)

fn (SceneMultiplayer) is_refusing_new_connections #

fn (s &SceneMultiplayer) is_refusing_new_connections() bool

fn (SceneMultiplayer) set_allow_object_decoding #

fn (s &SceneMultiplayer) set_allow_object_decoding(enable bool)

fn (SceneMultiplayer) is_object_decoding_allowed #

fn (s &SceneMultiplayer) is_object_decoding_allowed() bool

fn (SceneMultiplayer) set_server_relay_enabled #

fn (s &SceneMultiplayer) set_server_relay_enabled(enabled bool)

fn (SceneMultiplayer) is_server_relay_enabled #

fn (s &SceneMultiplayer) is_server_relay_enabled() bool

fn (SceneMultiplayer) send_bytes #

fn (s &SceneMultiplayer) send_bytes(bytes PackedByteArray, cfg SceneMultiplayer_send_bytes_Cfg) GDError

Sends the given raw [param bytes] to a specific peer identified by [param id] (see [method MultiplayerPeer.set_target_peer]). Default ID is 0, i.e. broadcast to all peers.

fn (SceneMultiplayer) get_max_sync_packet_size #

fn (s &SceneMultiplayer) get_max_sync_packet_size() i64

fn (SceneMultiplayer) set_max_sync_packet_size #

fn (s &SceneMultiplayer) set_max_sync_packet_size(size i64)

fn (SceneMultiplayer) get_max_delta_packet_size #

fn (s &SceneMultiplayer) get_max_delta_packet_size() i64

fn (SceneMultiplayer) set_max_delta_packet_size #

fn (s &SceneMultiplayer) set_max_delta_packet_size(size i64)

struct SceneMultiplayer_send_bytes_Cfg #

@[params]
struct SceneMultiplayer_send_bytes_Cfg {
pub:
	id      i64
	mode    MultiplayerPeerTransferMode = unsafe { MultiplayerPeerTransferMode(2) }
	channel i64
}

Optional parameters for SceneMultiplayer#send_bytes

struct SceneReplicationConfig #

struct SceneReplicationConfig {
	Resource
}

Configuration for properties to synchronize with a [MultiplayerSynchronizer].

fn (SceneReplicationConfig) to_variant #

fn (s &SceneReplicationConfig) to_variant() Variant

fn (SceneReplicationConfig) from_variant #

fn (mut s SceneReplicationConfig) from_variant(variant &Variant)

fn (SceneReplicationConfig) get_properties #

fn (s &SceneReplicationConfig) get_properties() Array

Returns a list of synchronized property [NodePath]s.

fn (SceneReplicationConfig) add_property #

fn (s &SceneReplicationConfig) add_property(path NodePath, cfg SceneReplicationConfig_add_property_Cfg)

Adds the property identified by the given [param path] to the list of the properties being synchronized, optionally passing an [param index]. [b]Note:[/b] For details on restrictions and limitations on property synchronization, see [MultiplayerSynchronizer].

fn (SceneReplicationConfig) has_property #

fn (s &SceneReplicationConfig) has_property(path NodePath) bool

Returns true if the given [param path] is configured for synchronization.

fn (SceneReplicationConfig) remove_property #

fn (s &SceneReplicationConfig) remove_property(path NodePath)

Removes the property identified by the given [param path] from the configuration.

fn (SceneReplicationConfig) property_get_index #

fn (s &SceneReplicationConfig) property_get_index(path NodePath) i64

Finds the index of the given [param path].

fn (SceneReplicationConfig) property_get_spawn #

fn (s &SceneReplicationConfig) property_get_spawn(path NodePath) bool

Returns true if the property identified by the given [param path] is configured to be synchronized on spawn.

fn (SceneReplicationConfig) property_set_spawn #

fn (s &SceneReplicationConfig) property_set_spawn(path NodePath, enabled bool)

Sets whether the property identified by the given [param path] is configured to be synchronized on spawn.

fn (SceneReplicationConfig) property_get_replication_mode #

fn (s &SceneReplicationConfig) property_get_replication_mode(path NodePath) SceneReplicationConfigReplicationMode

Returns the replication mode for the property identified by the given [param path].

fn (SceneReplicationConfig) property_set_replication_mode #

fn (s &SceneReplicationConfig) property_set_replication_mode(path NodePath, mode SceneReplicationConfigReplicationMode)

Sets the synchronization mode for the property identified by the given [param path].

fn (SceneReplicationConfig) property_get_sync #

fn (s &SceneReplicationConfig) property_get_sync(path NodePath) bool

Returns true if the property identified by the given [param path] is configured to be synchronized on process.

fn (SceneReplicationConfig) property_set_sync #

fn (s &SceneReplicationConfig) property_set_sync(path NodePath, enabled bool)

Sets whether the property identified by the given [param path] is configured to be synchronized on process.

fn (SceneReplicationConfig) property_get_watch #

fn (s &SceneReplicationConfig) property_get_watch(path NodePath) bool

Returns true if the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process.

fn (SceneReplicationConfig) property_set_watch #

fn (s &SceneReplicationConfig) property_set_watch(path NodePath, enabled bool)

Sets whether the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process.

struct SceneReplicationConfig_add_property_Cfg #

@[params]
struct SceneReplicationConfig_add_property_Cfg {
pub:
	index i64 = -1
}

Optional parameters for SceneReplicationConfig#add_property

struct SceneState #

struct SceneState {
	RefCounted
}

Provides access to a scene file's information.

fn (SceneState) to_variant #

fn (s &SceneState) to_variant() Variant

fn (SceneState) from_variant #

fn (mut s SceneState) from_variant(variant &Variant)

fn (SceneState) get_path #

fn (s &SceneState) get_path() string

Returns the resource path to the represented [PackedScene].

fn (SceneState) get_base_scene_state #

fn (s &SceneState) get_base_scene_state() SceneState

Returns the [SceneState] of the scene that this scene inherits from, or null if it doesn't inherit from any scene.

fn (SceneState) get_node_count #

fn (s &SceneState) get_node_count() i64

Returns the number of nodes in the scene. The idx argument used to query node data in other get_node_* methods in the interval [0, get_node_count() - 1].

fn (SceneState) get_node_type #

fn (s &SceneState) get_node_type(idx i64) string

Returns the type of the node at [param idx].

fn (SceneState) get_node_name #

fn (s &SceneState) get_node_name(idx i64) string

Returns the name of the node at [param idx].

fn (SceneState) get_node_path #

fn (s &SceneState) get_node_path(idx i64, cfg SceneState_get_node_path_Cfg) NodePath

Returns the path to the node at [param idx]. If [param for_parent] is true, returns the path of the [param idx] node's parent instead.

fn (SceneState) get_node_owner_path #

fn (s &SceneState) get_node_owner_path(idx i64) NodePath

Returns the path to the owner of the node at [param idx], relative to the root node.

fn (SceneState) is_node_instance_placeholder #

fn (s &SceneState) is_node_instance_placeholder(idx i64) bool

Returns true if the node at [param idx] is an [InstancePlaceholder].

fn (SceneState) get_node_instance_placeholder #

fn (s &SceneState) get_node_instance_placeholder(idx i64) string

Returns the path to the represented scene file if the node at [param idx] is an [InstancePlaceholder].

fn (SceneState) get_node_instance #

fn (s &SceneState) get_node_instance(idx i64) PackedScene

Returns a [PackedScene] for the node at [param idx] (i.e. the whole branch starting at this node, with its child nodes and resources), or null if the node is not an instance.

fn (SceneState) get_node_groups #

fn (s &SceneState) get_node_groups(idx i64) PackedStringArray

Returns the list of group names associated with the node at [param idx].

fn (SceneState) get_node_index #

fn (s &SceneState) get_node_index(idx i64) i64

Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [param idx] argument used here and in other methods.

fn (SceneState) get_node_property_count #

fn (s &SceneState) get_node_property_count(idx i64) i64

Returns the number of exported or overridden properties for the node at [param idx]. The prop_idx argument used to query node property data in other get_node_property_* methods in the interval [0, get_node_property_count() - 1].

fn (SceneState) get_node_property_name #

fn (s &SceneState) get_node_property_name(idx i64, prop_idx i64) string

Returns the name of the property at [param prop_idx] for the node at [param idx].

fn (SceneState) get_node_property_value #

fn (s &SceneState) get_node_property_value(idx i64, prop_idx i64) Variant

Returns the value of the property at [param prop_idx] for the node at [param idx].

fn (SceneState) get_connection_count #

fn (s &SceneState) get_connection_count() i64

Returns the number of signal connections in the scene. The idx argument used to query connection metadata in other get_connection_* methods in the interval [0, get_connection_count() - 1].

fn (SceneState) get_connection_source #

fn (s &SceneState) get_connection_source(idx i64) NodePath

Returns the path to the node that owns the signal at [param idx], relative to the root node.

fn (SceneState) get_connection_signal #

fn (s &SceneState) get_connection_signal(idx i64) string

Returns the name of the signal at [param idx].

fn (SceneState) get_connection_target #

fn (s &SceneState) get_connection_target(idx i64) NodePath

Returns the path to the node that owns the method connected to the signal at [param idx], relative to the root node.

fn (SceneState) get_connection_method #

fn (s &SceneState) get_connection_method(idx i64) string

Returns the method connected to the signal at [param idx].

fn (SceneState) get_connection_flags #

fn (s &SceneState) get_connection_flags(idx i64) i64

Returns the connection flags for the signal at [param idx]. See [enum Object.ConnectFlags] constants.

fn (SceneState) get_connection_binds #

fn (s &SceneState) get_connection_binds(idx i64) Array

Returns the list of bound parameters for the signal at [param idx].

fn (SceneState) get_connection_unbinds #

fn (s &SceneState) get_connection_unbinds(idx i64) i64

Returns the number of unbound parameters for the signal at [param idx].

struct SceneState_get_node_path_Cfg #

@[params]
struct SceneState_get_node_path_Cfg {
pub:
	for_parent bool
}

Optional parameters for SceneState#get_node_path

struct SceneTree #

struct SceneTree {
	MainLoop
}

Manages the game loop via a hierarchy of nodes.

fn (SceneTree) call_group #

fn (s &SceneTree) call_group(group string, method string, varargs ...ToVariant)

Calls [param method] on each node inside this tree added to the given [param group]. You can pass arguments to [param method] by specifying them at the end of this method call. Nodes that cannot call [param method] (either because the method doesn't exist or the arguments do not match) are ignored. See also [method set_group] and [method notify_group]. [b]Note:[/b] This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. [b]Note:[/b] In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the MethodName class to avoid allocating a new [StringName] on each call.

fn (SceneTree) call_group_flags #

fn (s &SceneTree) call_group_flags(flags i64, group string, method string, varargs ...ToVariant)

Calls the given [param method] on each node inside this tree added to the given [param group]. Use [param flags] to customize this method's behavior (see [enum GroupCallFlags]). Additional arguments for [param method] can be passed at the end of this method. Nodes that cannot call [param method] (either because the method doesn't exist or the arguments do not match) are ignored.

##get_tree().call_group_flags(
SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE,
'enemies', 'hide')

[b]Note:[/b] In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the MethodName class to avoid allocating a new [StringName] on each call.

fn (SceneTree) call_group_v #

fn (s &SceneTree) call_group_v(group string, method string, varargs ...ToVariant)

TEMP: workaround for SceneTree#call_group crashing

fn (SceneTree) change_scene_to_file #

fn (s &SceneTree) change_scene_to_file(path string) GDError

Changes the running scene to the one at the given [param path], after loading it into a [PackedScene] and creating a new instance. Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [param path] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated. [b]Note:[/b] See [method change_scene_to_packed] for details on the order of operations.

fn (SceneTree) change_scene_to_packed #

fn (s &SceneTree) change_scene_to_packed(packed_scene PackedScene) GDError

Changes the running scene to a new instance of the given [PackedScene] (which must be valid). Returns [constant OK] on success, [constant ERR_CANT_CREATE] if the scene cannot be instantiated, or [constant ERR_INVALID_PARAMETER] if the scene is invalid. [b]Note:[/b] Operations happen in the following order when [method change_scene_to_packed] is called:1. The current scene node is immediately removed from the tree. From that point, [method Node.get_tree] called on the current (outgoing) scene will return null. [member current_scene] will be null, too, because the new scene is not available yet.2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. [method Node.get_tree] and [member current_scene] will be back to working as usual.This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to [method Node.queue_free]. If you want to reliably access the new scene, await the [signal scene_changed] signal.

fn (SceneTree) create_timer #

fn (s &SceneTree) create_timer(time_sec f64, cfg SceneTree_create_timer_Cfg) SceneTreeTimer

Returns a new [SceneTreeTimer]. After [param time_sec] in seconds have passed, the timer will emit [signal SceneTreeTimer.timeout] and will be automatically freed. If [param process_always] is false, the timer will be paused when setting [member SceneTree.paused] to true. If [param process_in_physics] is true, the timer will update at the end of the physics frame, instead of the process frame. If [param ignore_time_scale] is true, the timer will ignore [member Engine.time_scale] and update with the real, elapsed time. This method is commonly used to create a one-shot delay timer, as in the following example: [codeblocks] [gdscript] func some_function(): print("start") await get_tree().create_timer(1.0).timeout print("end") [/gdscript] [csharp] public async Task SomeFunction() { GD.Print("start"); await ToSignal(GetTree().CreateTimer(1.0f), SceneTreeTimer.SignalName.Timeout); GD.Print("end"); } [/csharp] [/codeblocks] [b]Note:[/b] The timer is always updated [i]after[/i] all of the nodes in the tree. A node's [method Node._process] method would be called before the timer updates (or [method Node._physics_process] if [param process_in_physics] is set to true).

fn (SceneTree) create_tween #

fn (s &SceneTree) create_tween() Tween

Creates and returns a new [Tween] processed in this tree. The Tween will start automatically on the next process frame or physics frame (depending on its [enum Tween.TweenProcessMode]). [b]Note:[/b] A [Tween] created using this method is not bound to any [Node]. It may keep working until there is nothing left to animate. If you want the [Tween] to be automatically killed when the [Node] is freed, use [method Node.create_tween] or [method Tween.bind_node].

fn (SceneTree) from_variant #

fn (mut s SceneTree) from_variant(variant &Variant)

fn (SceneTree) get_current_scene #

fn (s &SceneTree) get_current_scene() Node

fn (SceneTree) get_edited_scene_root #

fn (s &SceneTree) get_edited_scene_root() Node

fn (SceneTree) get_first_node_in_group #

fn (s &SceneTree) get_first_node_in_group(group string) Node

Returns the first [Node] found inside the tree, that has been added to the given [param group], in scene hierarchy order. Returns null if no match is found. See also [method get_nodes_in_group].

fn (SceneTree) get_frame #

fn (s &SceneTree) get_frame() i64

Returns how many physics process steps have been processed, since the application started. This is [i]not[/i] a measurement of elapsed time. See also [signal physics_frame]. For the number of frames rendered, see [method Engine.get_process_frames].

fn (SceneTree) get_multiplayer #

fn (s &SceneTree) get_multiplayer(cfg SceneTree_get_multiplayer_Cfg) 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. See [method set_multiplayer].

fn (SceneTree) get_node_count #

fn (s &SceneTree) get_node_count() i64

Returns the number of nodes inside this tree.

fn (SceneTree) get_node_count_in_group #

fn (s &SceneTree) get_node_count_in_group(group string) i64

Returns the number of nodes assigned to the given group.

fn (SceneTree) get_nodes_in_group #

fn (s &SceneTree) get_nodes_in_group(group string) Array

Returns an [Array] containing all nodes inside this tree, that have been added to the given [param group], in scene hierarchy order.

fn (SceneTree) get_processed_tweens #

fn (s &SceneTree) get_processed_tweens() Array

Returns an [Array] of currently existing [Tween]s in the tree, including paused tweens.

fn (SceneTree) get_root #

fn (s &SceneTree) get_root() Window

fn (SceneTree) has_group #

fn (s &SceneTree) has_group(name string) bool

Returns true if a node added to the given group [param name] exists in the tree.

fn (SceneTree) is_accessibility_enabled #

fn (s &SceneTree) is_accessibility_enabled() bool

Returns true if accessibility features are enabled, and accessibility information updates are actively processed.

fn (SceneTree) is_accessibility_supported #

fn (s &SceneTree) is_accessibility_supported() bool

Returns true if accessibility features are supported by the OS and enabled in project settings.

fn (SceneTree) is_auto_accept_quit #

fn (s &SceneTree) is_auto_accept_quit() bool

fn (SceneTree) is_debugging_collisions_hint #

fn (s &SceneTree) is_debugging_collisions_hint() bool

fn (SceneTree) is_debugging_navigation_hint #

fn (s &SceneTree) is_debugging_navigation_hint() bool

fn (SceneTree) is_debugging_paths_hint #

fn (s &SceneTree) is_debugging_paths_hint() bool

fn (SceneTree) is_multiplayer_poll_enabled #

fn (s &SceneTree) is_multiplayer_poll_enabled() bool

fn (SceneTree) is_paused #

fn (s &SceneTree) is_paused() bool

fn (SceneTree) is_physics_interpolation_enabled #

fn (s &SceneTree) is_physics_interpolation_enabled() bool

fn (SceneTree) is_quit_on_go_back #

fn (s &SceneTree) is_quit_on_go_back() bool

fn (SceneTree) notify_group #

fn (s &SceneTree) notify_group(group string, notification i64)

Calls [method Object.notification] with the given [param notification] to all nodes inside this tree added to the [param group]. See also [url=$DOCS_URL/tutorials/best_practices/godot_notifications.html]Godot notifications[/url] and [method call_group] and [method set_group]. [b]Note:[/b] This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations.

fn (SceneTree) notify_group_flags #

fn (s &SceneTree) notify_group_flags(call_flags i64, group string, notification i64)

Calls [method Object.notification] with the given [param notification] to all nodes inside this tree added to the [param group]. Use [param call_flags] to customize this method's behavior (see [enum GroupCallFlags]).

fn (SceneTree) queue_delete #

fn (s &SceneTree) queue_delete(obj Object)

Queues the given [param obj] to be deleted, calling its [method Object.free] at the end of the current frame. This method is similar to [method Node.queue_free].

fn (SceneTree) quit #

fn (s &SceneTree) quit(cfg SceneTree_quit_Cfg)

Quits the application at the end of the current iteration, with the given [param exit_code]. By convention, an exit code of 0 indicates success, whereas any other exit code indicates an error. For portability reasons, it should be between 0 and 125 (inclusive). [b]Note:[/b] On iOS this method doesn't work. Instead, as recommended by the [url=https://developer.apple.com/library/archive/qa/qa1561/_index.html]iOS Human Interface Guidelines[/url], the user is expected to close apps via the Home button.

fn (SceneTree) reload_current_scene #

fn (s &SceneTree) reload_current_scene() GDError

Reloads the currently active scene, replacing [member current_scene] with a new instance of its original [PackedScene]. Returns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] is defined, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if the scene cannot be instantiated.

fn (SceneTree) set_auto_accept_quit #

fn (s &SceneTree) set_auto_accept_quit(enabled bool)

fn (SceneTree) set_current_scene #

fn (s &SceneTree) set_current_scene(child_node Node)

fn (SceneTree) set_debug_collisions_hint #

fn (s &SceneTree) set_debug_collisions_hint(enable bool)

fn (SceneTree) set_debug_navigation_hint #

fn (s &SceneTree) set_debug_navigation_hint(enable bool)

fn (SceneTree) set_debug_paths_hint #

fn (s &SceneTree) set_debug_paths_hint(enable bool)

fn (SceneTree) set_edited_scene_root #

fn (s &SceneTree) set_edited_scene_root(scene Node)

fn (SceneTree) set_group #

fn (s &SceneTree) set_group(group string, property string, value_ ToVariant)

Sets the given [param property] to [param value] on all nodes inside this tree added to the given [param group]. Nodes that do not have the [param property] are ignored. See also [method call_group] and [method notify_group]. [b]Note:[/b] This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. [b]Note:[/b] In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the PropertyName class to avoid allocating a new [StringName] on each call.

fn (SceneTree) set_group_flags #

fn (s &SceneTree) set_group_flags(call_flags i64, group string, property string, value_ ToVariant)

Sets the given [param property] to [param value] on all nodes inside this tree added to the given [param group]. Nodes that do not have the [param property] are ignored. Use [param call_flags] to customize this method's behavior (see [enum GroupCallFlags]). [b]Note:[/b] In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the PropertyName class to avoid allocating a new [StringName] on each call.

fn (SceneTree) set_multiplayer #

fn (s &SceneTree) set_multiplayer(multiplayer MultiplayerAPI, cfg SceneTree_set_multiplayer_Cfg)

Sets a custom [MultiplayerAPI] with the given [param root_path] (controlling also the relative subpaths), or override the default one if [param root_path] is empty. [b]Note:[/b] No [MultiplayerAPI] must be configured for the subpath containing [param root_path], nested custom multiplayers are not allowed. I.e. if one is configured for "/root/Foo" setting one for "/root/Foo/Bar" will cause an error. [b]Note:[/b] [method set_multiplayer] should be called [i]before[/i] the child nodes are ready at the given [param root_path]. If multiplayer nodes like [MultiplayerSpawner] or [MultiplayerSynchronizer] are added to the tree before the custom multiplayer API is set, they will not work.

fn (SceneTree) set_multiplayer_poll_enabled #

fn (s &SceneTree) set_multiplayer_poll_enabled(enabled bool)

fn (SceneTree) set_pause #

fn (s &SceneTree) set_pause(enable bool)

fn (SceneTree) set_physics_interpolation_enabled #

fn (s &SceneTree) set_physics_interpolation_enabled(enabled bool)

fn (SceneTree) set_quit_on_go_back #

fn (s &SceneTree) set_quit_on_go_back(enabled bool)

fn (SceneTree) to_variant #

fn (s &SceneTree) to_variant() Variant

fn (SceneTree) unload_current_scene #

fn (s &SceneTree) unload_current_scene()

If a current scene is loaded, calling this method will unload it.

struct SceneTreeTimer #

struct SceneTreeTimer {
	RefCounted
}

One-shot timer.

fn (SceneTreeTimer) to_variant #

fn (s &SceneTreeTimer) to_variant() Variant

fn (SceneTreeTimer) from_variant #

fn (mut s SceneTreeTimer) from_variant(variant &Variant)

fn (SceneTreeTimer) set_time_left #

fn (s &SceneTreeTimer) set_time_left(time f64)

fn (SceneTreeTimer) get_time_left #

fn (s &SceneTreeTimer) get_time_left() f64

struct SceneTree_create_timer_Cfg #

@[params]
struct SceneTree_create_timer_Cfg {
pub:
	process_always     bool
	process_in_physics bool
	ignore_time_scale  bool
}

Optional parameters for SceneTree#create_timer

struct SceneTree_get_multiplayer_Cfg #

@[params]
struct SceneTree_get_multiplayer_Cfg {
pub:
	for_path NodePath = NodePath.new0()
}

Optional parameters for SceneTree#get_multiplayer

struct SceneTree_quit_Cfg #

@[params]
struct SceneTree_quit_Cfg {
pub:
	exit_code i64
}

Optional parameters for SceneTree#quit

struct SceneTree_set_multiplayer_Cfg #

@[params]
struct SceneTree_set_multiplayer_Cfg {
pub:
	root_path NodePath = NodePath.new0()
}

Optional parameters for SceneTree#set_multiplayer

struct Script #

struct Script {
	Resource
}

A class stored as a resource.

fn (Script) to_variant #

fn (s &Script) to_variant() Variant

fn (Script) from_variant #

fn (mut s Script) from_variant(variant &Variant)

fn (Script) can_instantiate #

fn (s &Script) can_instantiate() bool

Returns true if the script can be instantiated.

fn (Script) instance_has #

fn (s &Script) instance_has(base_object Object) bool

Returns true if [param base_object] is an instance of this script.

fn (Script) has_source_code #

fn (s &Script) has_source_code() bool

Returns true if the script contains non-empty source code. [b]Note:[/b] If a script does not have source code, this does not mean that it is invalid or unusable. For example, a [GDScript] that was exported with binary tokenization has no source code, but still behaves as expected and could be instantiated. This can be checked with [method can_instantiate].

fn (Script) get_source_code #

fn (s &Script) get_source_code() string

fn (Script) set_source_code #

fn (s &Script) set_source_code(source string)

fn (Script) reload #

fn (s &Script) reload(cfg Script_reload_Cfg) GDError

Reloads the script's class implementation. Returns an error code.

fn (Script) get_base_script #

fn (s &Script) get_base_script() Script

Returns the script directly inherited by this script.

fn (Script) get_instance_base_type #

fn (s &Script) get_instance_base_type() string

Returns the script's base type.

fn (Script) get_global_name #

fn (s &Script) get_global_name() string

Returns the class name associated with the script, if there is one. Returns an empty string otherwise. To give the script a global name, you can use the class_name keyword in GDScript and the [GlobalClass] attribute in C#. [codeblocks] [gdscript] class_name MyNode extends Node [/gdscript] [csharp] using Godot;

[GlobalClass] public partial class MyNode : Node { } [/csharp] [/codeblocks]

fn (Script) has_script_signal #

fn (s &Script) has_script_signal(signal_name string) bool

Returns true if the script, or a base class, defines a signal with the given name.

fn (Script) get_script_property_list #

fn (s &Script) get_script_property_list() Array

Returns the list of properties in this [Script]. [b]Note:[/b] The dictionaries returned by this method are formatted identically to those returned by [method Object.get_property_list].

fn (Script) get_script_method_list #

fn (s &Script) get_script_method_list() Array

Returns the list of methods in this [Script]. [b]Note:[/b] The dictionaries returned by this method are formatted identically to those returned by [method Object.get_method_list].

fn (Script) get_script_signal_list #

fn (s &Script) get_script_signal_list() Array

Returns the list of user signals defined in this [Script]. [b]Note:[/b] The dictionaries returned by this method are formatted identically to those returned by [method Object.get_signal_list].

fn (Script) get_script_constant_map #

fn (s &Script) get_script_constant_map() Dictionary

Returns a dictionary containing constant names and their values.

fn (Script) get_property_default_value #

fn (s &Script) get_property_default_value(property string) Variant

Returns the default value of the specified property.

fn (Script) is_tool #

fn (s &Script) is_tool() bool

Returns true if the script is a tool script. A tool script can run in the editor.

fn (Script) is_abstract #

fn (s &Script) is_abstract() bool

Returns true if the script is an abstract script. An abstract script does not have a constructor and cannot be instantiated.

fn (Script) get_rpc_config #

fn (s &Script) get_rpc_config() Variant

Returns a [Dictionary] mapping method names to their RPC configuration defined by this script.

struct ScriptBacktrace #

struct ScriptBacktrace {
	RefCounted
}

A captured backtrace of a specific script language.

fn (ScriptBacktrace) to_variant #

fn (s &ScriptBacktrace) to_variant() Variant

fn (ScriptBacktrace) from_variant #

fn (mut s ScriptBacktrace) from_variant(variant &Variant)

fn (ScriptBacktrace) get_language_name #

fn (s &ScriptBacktrace) get_language_name() string

Returns the name of the script language that this backtrace was captured from.

fn (ScriptBacktrace) is_empty #

fn (s &ScriptBacktrace) is_empty() bool

Returns true if the backtrace has no stack frames.

fn (ScriptBacktrace) get_frame_count #

fn (s &ScriptBacktrace) get_frame_count() i64

Returns the number of stack frames in the backtrace.

fn (ScriptBacktrace) get_frame_function #

fn (s &ScriptBacktrace) get_frame_function(index i64) string

Returns the name of the function called at the stack frame at the specified index.

fn (ScriptBacktrace) get_frame_file #

fn (s &ScriptBacktrace) get_frame_file(index i64) string

Returns the file name of the call site represented by the stack frame at the specified index.

fn (ScriptBacktrace) get_frame_line #

fn (s &ScriptBacktrace) get_frame_line(index i64) i64

Returns the line number of the call site represented by the stack frame at the specified index.

fn (ScriptBacktrace) get_global_variable_count #

fn (s &ScriptBacktrace) get_global_variable_count() i64

Returns the number of global variables (e.g. autoload singletons) in the backtrace. [b]Note:[/b] This will be non-zero only if the include_variables parameter was true when capturing the backtrace with [method Engine.capture_script_backtraces].

fn (ScriptBacktrace) get_global_variable_name #

fn (s &ScriptBacktrace) get_global_variable_name(variable_index i64) string

Returns the name of the global variable at the specified index.

fn (ScriptBacktrace) get_global_variable_value #

fn (s &ScriptBacktrace) get_global_variable_value(variable_index i64) Variant

Returns the value of the global variable at the specified index. [b]Warning:[/b] With GDScript backtraces, the returned [Variant] will be the variable's actual value, including any object references. This means that storing the returned [Variant] will prevent any such object from being deallocated, so it's generally recommended not to do so.

fn (ScriptBacktrace) get_local_variable_count #

fn (s &ScriptBacktrace) get_local_variable_count(frame_index i64) i64

Returns the number of local variables in the stack frame at the specified index. [b]Note:[/b] This will be non-zero only if the include_variables parameter was true when capturing the backtrace with [method Engine.capture_script_backtraces].

fn (ScriptBacktrace) get_local_variable_name #

fn (s &ScriptBacktrace) get_local_variable_name(frame_index i64, variable_index i64) string

Returns the name of the local variable at the specified [param variable_index] in the stack frame at the specified [param frame_index].

fn (ScriptBacktrace) get_local_variable_value #

fn (s &ScriptBacktrace) get_local_variable_value(frame_index i64, variable_index i64) Variant

Returns the value of the local variable at the specified [param variable_index] in the stack frame at the specified [param frame_index]. [b]Warning:[/b] With GDScript backtraces, the returned [Variant] will be the variable's actual value, including any object references. This means that storing the returned [Variant] will prevent any such object from being deallocated, so it's generally recommended not to do so.

fn (ScriptBacktrace) get_member_variable_count #

fn (s &ScriptBacktrace) get_member_variable_count(frame_index i64) i64

Returns the number of member variables in the stack frame at the specified index. [b]Note:[/b] This will be non-zero only if the include_variables parameter was true when capturing the backtrace with [method Engine.capture_script_backtraces].

fn (ScriptBacktrace) get_member_variable_name #

fn (s &ScriptBacktrace) get_member_variable_name(frame_index i64, variable_index i64) string

Returns the name of the member variable at the specified [param variable_index] in the stack frame at the specified [param frame_index].

fn (ScriptBacktrace) get_member_variable_value #

fn (s &ScriptBacktrace) get_member_variable_value(frame_index i64, variable_index i64) Variant

Returns the value of the member variable at the specified [param variable_index] in the stack frame at the specified [param frame_index]. [b]Warning:[/b] With GDScript backtraces, the returned [Variant] will be the variable's actual value, including any object references. This means that storing the returned [Variant] will prevent any such object from being deallocated, so it's generally recommended not to do so.

fn (ScriptBacktrace) format #

fn (s &ScriptBacktrace) format(cfg ScriptBacktrace_format_Cfg) string

Converts the backtrace to a [String], where the entire string will be indented by [param indent_all] number of spaces, and the individual stack frames will be additionally indented by [param indent_frames] number of spaces. [b]Note:[/b] Calling [method Object.to_string] on a [ScriptBacktrace] will produce the same output as calling [method format] with all parameters left at their default values.

struct ScriptBacktrace_format_Cfg #

@[params]
struct ScriptBacktrace_format_Cfg {
pub:
	indent_all    i64
	indent_frames i64 = 4
}

Optional parameters for ScriptBacktrace#format

struct ScriptCreateDialog #

struct ScriptCreateDialog {
	ConfirmationDialog
}

Godot editor's popup dialog for creating new [Script] files.

fn (ScriptCreateDialog) to_variant #

fn (s &ScriptCreateDialog) to_variant() Variant

fn (ScriptCreateDialog) from_variant #

fn (mut s ScriptCreateDialog) from_variant(variant &Variant)

fn (ScriptCreateDialog) config #

fn (s &ScriptCreateDialog) config(inherits string, path string, cfg ScriptCreateDialog_config_Cfg)

Prefills required fields to configure the ScriptCreateDialog for use.

struct ScriptCreateDialog_config_Cfg #

@[params]
struct ScriptCreateDialog_config_Cfg {
pub:
	built_in_enabled bool
	load_enabled     bool
}

Optional parameters for ScriptCreateDialog#config

struct ScriptEditor #

struct ScriptEditor {
	PanelContainer
}

Godot editor's script editor.

fn (ScriptEditor) to_variant #

fn (s &ScriptEditor) to_variant() Variant

fn (ScriptEditor) from_variant #

fn (mut s ScriptEditor) from_variant(variant &Variant)

fn (ScriptEditor) get_current_editor #

fn (s &ScriptEditor) get_current_editor() ScriptEditorBase

Returns the [ScriptEditorBase] object that the user is currently editing.

fn (ScriptEditor) get_open_script_editors #

fn (s &ScriptEditor) get_open_script_editors() Array

Returns an array with all [ScriptEditorBase] objects which are currently open in editor.

fn (ScriptEditor) get_breakpoints #

fn (s &ScriptEditor) get_breakpoints() PackedStringArray

Returns array of breakpoints.

fn (ScriptEditor) register_syntax_highlighter #

fn (s &ScriptEditor) register_syntax_highlighter(syntax_highlighter EditorSyntaxHighlighter)

Registers the [EditorSyntaxHighlighter] to the editor, the [EditorSyntaxHighlighter] will be available on all open scripts. [b]Note:[/b] Does not apply to scripts that are already opened.

fn (ScriptEditor) unregister_syntax_highlighter #

fn (s &ScriptEditor) unregister_syntax_highlighter(syntax_highlighter EditorSyntaxHighlighter)

Unregisters the [EditorSyntaxHighlighter] from the editor. [b]Note:[/b] The [EditorSyntaxHighlighter] will still be applied to scripts that are already opened.

fn (ScriptEditor) goto_line #

fn (s &ScriptEditor) goto_line(line_number i64)

Goes to the specified line in the current script.

fn (ScriptEditor) get_current_script #

fn (s &ScriptEditor) get_current_script() Script

Returns a [Script] that is currently active in editor.

fn (ScriptEditor) get_open_scripts #

fn (s &ScriptEditor) get_open_scripts() Array

Returns an array with all [Script] objects which are currently open in editor.

fn (ScriptEditor) open_script_create_dialog #

fn (s &ScriptEditor) open_script_create_dialog(base_name string, base_path string)

Opens the script create dialog. The script will extend [param base_name]. The file extension can be omitted from [param base_path]. It will be added based on the selected scripting language.

fn (ScriptEditor) goto_help #

fn (s &ScriptEditor) goto_help(topic string)

Opens help for the given topic. The [param topic] is an encoded string that controls which class, method, constant, signal, annotation, property, or theme item should be focused. The supported [param topic] formats include class_name:class, class_method:class:method, class_constant:class:constant, class_signal:class:signal, class_annotation:class:@annotation, class_property:class:property, and class_theme_item:class:item, where class is the class name, method is the method name, constant is the constant name, signal is the signal name, annotation is the annotation name, property is the property name, and item is the theme item.

##class_name:Node
####class_method:@GlobalScope:min
##class_method:Node:get_viewport
##class_constant:Input:MOUSE_BUTTON_MIDDLE
##class_signal:BaseButton:pressed
##class_property:CanvasItem:visible
####class_annotation:@GDScript:@export
##class_theme_item:GraphNode:panel_selected

fn (ScriptEditor) update_docs_from_script #

fn (s &ScriptEditor) update_docs_from_script(script Script)

Updates the documentation for the given [param script] if the script's documentation is currently open. [b]Note:[/b] This should be called whenever the script is changed to keep the open documentation state up to date.

struct ScriptEditorBase #

struct ScriptEditorBase {
	VBoxContainer
}

Base editor for editing scripts in the [ScriptEditor].

fn (ScriptEditorBase) to_variant #

fn (s &ScriptEditorBase) to_variant() Variant

fn (ScriptEditorBase) from_variant #

fn (mut s ScriptEditorBase) from_variant(variant &Variant)

fn (ScriptEditorBase) get_base_editor #

fn (s &ScriptEditorBase) get_base_editor() Control

Returns the underlying [Control] used for editing scripts. For text scripts, this is a [CodeEdit].

fn (ScriptEditorBase) add_syntax_highlighter #

fn (s &ScriptEditorBase) add_syntax_highlighter(highlighter EditorSyntaxHighlighter)

Adds a [EditorSyntaxHighlighter] to the open script.

struct ScriptExtension #

struct ScriptExtension {
	Script
}

fn (ScriptExtension) to_variant #

fn (s &ScriptExtension) to_variant() Variant

fn (ScriptExtension) from_variant #

fn (mut s ScriptExtension) from_variant(variant &Variant)

fn (ScriptExtension) gd_editor_can_reload_from_file #

fn (s &ScriptExtension) gd_editor_can_reload_from_file() bool

fn (ScriptExtension) gd_placeholder_erased #

fn (s &ScriptExtension) gd_placeholder_erased(placeholder voidptr)

fn (ScriptExtension) gd_can_instantiate #

fn (s &ScriptExtension) gd_can_instantiate() bool

fn (ScriptExtension) gd_get_base_script #

fn (s &ScriptExtension) gd_get_base_script() Script

fn (ScriptExtension) gd_get_global_name #

fn (s &ScriptExtension) gd_get_global_name() string

fn (ScriptExtension) gd_inherits_script #

fn (s &ScriptExtension) gd_inherits_script(script Script) bool

fn (ScriptExtension) gd_get_instance_base_type #

fn (s &ScriptExtension) gd_get_instance_base_type() string

fn (ScriptExtension) gd_instance_create #

fn (s &ScriptExtension) gd_instance_create(for_object Object) voidptr

fn (ScriptExtension) gd_placeholder_instance_create #

fn (s &ScriptExtension) gd_placeholder_instance_create(for_object Object) voidptr

fn (ScriptExtension) gd_instance_has #

fn (s &ScriptExtension) gd_instance_has(object Object) bool

fn (ScriptExtension) gd_has_source_code #

fn (s &ScriptExtension) gd_has_source_code() bool

fn (ScriptExtension) gd_get_source_code #

fn (s &ScriptExtension) gd_get_source_code() string

fn (ScriptExtension) gd_set_source_code #

fn (s &ScriptExtension) gd_set_source_code(code string)

fn (ScriptExtension) gd_reload #

fn (s &ScriptExtension) gd_reload(keep_state bool) GDError

fn (ScriptExtension) gd_get_doc_class_name #

fn (s &ScriptExtension) gd_get_doc_class_name() string

fn (ScriptExtension) gd_get_documentation #

fn (s &ScriptExtension) gd_get_documentation() Array

fn (ScriptExtension) gd_get_class_icon_path #

fn (s &ScriptExtension) gd_get_class_icon_path() string

fn (ScriptExtension) gd_has_method #

fn (s &ScriptExtension) gd_has_method(method string) bool

fn (ScriptExtension) gd_has_static_method #

fn (s &ScriptExtension) gd_has_static_method(method string) bool

fn (ScriptExtension) gd_get_script_method_argument_count #

fn (s &ScriptExtension) gd_get_script_method_argument_count(method string) Variant

Return the expected argument count for the given [param method], or null if it can't be determined (which will then fall back to the default behavior).

fn (ScriptExtension) gd_get_method_info #

fn (s &ScriptExtension) gd_get_method_info(method string) Dictionary

fn (ScriptExtension) gd_is_tool #

fn (s &ScriptExtension) gd_is_tool() bool

fn (ScriptExtension) gd_is_valid #

fn (s &ScriptExtension) gd_is_valid() bool

fn (ScriptExtension) gd_is_abstract #

fn (s &ScriptExtension) gd_is_abstract() bool

Returns true if the script is an abstract script. Abstract scripts cannot be instantiated directly, instead other scripts should inherit them. Abstract scripts will be either unselectable or hidden in the Create New Node dialog (unselectable if there are non-abstract classes inheriting it, otherwise hidden).

fn (ScriptExtension) gd_get_language #

fn (s &ScriptExtension) gd_get_language() ScriptLanguage

fn (ScriptExtension) gd_has_script_signal #

fn (s &ScriptExtension) gd_has_script_signal(signal string) bool

fn (ScriptExtension) gd_get_script_signal_list #

fn (s &ScriptExtension) gd_get_script_signal_list() Array

fn (ScriptExtension) gd_has_property_default_value #

fn (s &ScriptExtension) gd_has_property_default_value(property string) bool

fn (ScriptExtension) gd_get_property_default_value #

fn (s &ScriptExtension) gd_get_property_default_value(property string) Variant

fn (ScriptExtension) gd_update_exports #

fn (s &ScriptExtension) gd_update_exports()

fn (ScriptExtension) gd_get_script_method_list #

fn (s &ScriptExtension) gd_get_script_method_list() Array

fn (ScriptExtension) gd_get_script_property_list #

fn (s &ScriptExtension) gd_get_script_property_list() Array

fn (ScriptExtension) gd_get_member_line #

fn (s &ScriptExtension) gd_get_member_line(member string) i64

fn (ScriptExtension) gd_get_constants #

fn (s &ScriptExtension) gd_get_constants() Dictionary

fn (ScriptExtension) gd_get_members #

fn (s &ScriptExtension) gd_get_members() Array

fn (ScriptExtension) gd_is_placeholder_fallback_enabled #

fn (s &ScriptExtension) gd_is_placeholder_fallback_enabled() bool

fn (ScriptExtension) gd_get_rpc_config #

fn (s &ScriptExtension) gd_get_rpc_config() Variant

struct ScriptLanguage #

struct ScriptLanguage {
	Object
}

fn (ScriptLanguage) to_variant #

fn (s &ScriptLanguage) to_variant() Variant

fn (ScriptLanguage) from_variant #

fn (mut s ScriptLanguage) from_variant(variant &Variant)

struct ScriptLanguageExtension #

struct ScriptLanguageExtension {
	ScriptLanguage
}

fn (ScriptLanguageExtension) to_variant #

fn (s &ScriptLanguageExtension) to_variant() Variant

fn (ScriptLanguageExtension) from_variant #

fn (mut s ScriptLanguageExtension) from_variant(variant &Variant)

fn (ScriptLanguageExtension) gd_get_name #

fn (s &ScriptLanguageExtension) gd_get_name() string

fn (ScriptLanguageExtension) gd_init #

fn (s &ScriptLanguageExtension) gd_init()

fn (ScriptLanguageExtension) gd_get_type #

fn (s &ScriptLanguageExtension) gd_get_type() string

fn (ScriptLanguageExtension) gd_get_extension #

fn (s &ScriptLanguageExtension) gd_get_extension() string

fn (ScriptLanguageExtension) gd_finish #

fn (s &ScriptLanguageExtension) gd_finish()

fn (ScriptLanguageExtension) gd_get_reserved_words #

fn (s &ScriptLanguageExtension) gd_get_reserved_words() PackedStringArray

fn (ScriptLanguageExtension) gd_is_control_flow_keyword #

fn (s &ScriptLanguageExtension) gd_is_control_flow_keyword(keyword string) bool

fn (ScriptLanguageExtension) gd_get_comment_delimiters #

fn (s &ScriptLanguageExtension) gd_get_comment_delimiters() PackedStringArray

fn (ScriptLanguageExtension) gd_get_doc_comment_delimiters #

fn (s &ScriptLanguageExtension) gd_get_doc_comment_delimiters() PackedStringArray

fn (ScriptLanguageExtension) gd_get_string_delimiters #

fn (s &ScriptLanguageExtension) gd_get_string_delimiters() PackedStringArray

fn (ScriptLanguageExtension) gd_make_template #

fn (s &ScriptLanguageExtension) gd_make_template(template string, class_name string, base_class_name string) Script

fn (ScriptLanguageExtension) gd_get_built_in_templates #

fn (s &ScriptLanguageExtension) gd_get_built_in_templates(object string) Array

fn (ScriptLanguageExtension) gd_is_using_templates #

fn (s &ScriptLanguageExtension) gd_is_using_templates() bool

fn (ScriptLanguageExtension) gd_validate #

fn (s &ScriptLanguageExtension) gd_validate(script string, path string, validate_functions bool, validate_errors bool, validate_warnings bool, validate_safe_lines bool) Dictionary

fn (ScriptLanguageExtension) gd_validate_path #

fn (s &ScriptLanguageExtension) gd_validate_path(path string) string

fn (ScriptLanguageExtension) gd_create_script #

fn (s &ScriptLanguageExtension) gd_create_script() Object

fn (ScriptLanguageExtension) gd_has_named_classes #

fn (s &ScriptLanguageExtension) gd_has_named_classes() bool

fn (ScriptLanguageExtension) gd_supports_builtin_mode #

fn (s &ScriptLanguageExtension) gd_supports_builtin_mode() bool

fn (ScriptLanguageExtension) gd_supports_documentation #

fn (s &ScriptLanguageExtension) gd_supports_documentation() bool

fn (ScriptLanguageExtension) gd_can_inherit_from_file #

fn (s &ScriptLanguageExtension) gd_can_inherit_from_file() bool

fn (ScriptLanguageExtension) gd_find_function #

fn (s &ScriptLanguageExtension) gd_find_function(function string, code string) i64

Returns the line where the function is defined in the code, or -1 if the function is not present.

fn (ScriptLanguageExtension) gd_make_function #

fn (s &ScriptLanguageExtension) gd_make_function(class_name string, function_name string, function_args PackedStringArray) string

fn (ScriptLanguageExtension) gd_can_make_function #

fn (s &ScriptLanguageExtension) gd_can_make_function() bool

fn (ScriptLanguageExtension) gd_open_in_external_editor #

fn (s &ScriptLanguageExtension) gd_open_in_external_editor(script Script, line i64, column i64) GDError

fn (ScriptLanguageExtension) gd_overrides_external_editor #

fn (s &ScriptLanguageExtension) gd_overrides_external_editor() bool

fn (ScriptLanguageExtension) gd_preferred_file_name_casing #

fn (s &ScriptLanguageExtension) gd_preferred_file_name_casing() ScriptLanguageScriptNameCasing

fn (ScriptLanguageExtension) gd_complete_code #

fn (s &ScriptLanguageExtension) gd_complete_code(code string, path string, owner Object) Dictionary

fn (ScriptLanguageExtension) gd_lookup_code #

fn (s &ScriptLanguageExtension) gd_lookup_code(code string, symbol string, path string, owner Object) Dictionary

fn (ScriptLanguageExtension) gd_auto_indent_code #

fn (s &ScriptLanguageExtension) gd_auto_indent_code(code string, from_line i64, to_line i64) string

fn (ScriptLanguageExtension) gd_add_global_constant #

fn (s &ScriptLanguageExtension) gd_add_global_constant(name string, value_ ToVariant)

fn (ScriptLanguageExtension) gd_add_named_global_constant #

fn (s &ScriptLanguageExtension) gd_add_named_global_constant(name string, value_ ToVariant)

fn (ScriptLanguageExtension) gd_remove_named_global_constant #

fn (s &ScriptLanguageExtension) gd_remove_named_global_constant(name string)

fn (ScriptLanguageExtension) gd_thread_enter #

fn (s &ScriptLanguageExtension) gd_thread_enter()

fn (ScriptLanguageExtension) gd_thread_exit #

fn (s &ScriptLanguageExtension) gd_thread_exit()

fn (ScriptLanguageExtension) gd_debug_get_error #

fn (s &ScriptLanguageExtension) gd_debug_get_error() string

fn (ScriptLanguageExtension) gd_debug_get_stack_level_count #

fn (s &ScriptLanguageExtension) gd_debug_get_stack_level_count() i64

fn (ScriptLanguageExtension) gd_debug_get_stack_level_line #

fn (s &ScriptLanguageExtension) gd_debug_get_stack_level_line(level i64) i64

fn (ScriptLanguageExtension) gd_debug_get_stack_level_function #

fn (s &ScriptLanguageExtension) gd_debug_get_stack_level_function(level i64) string

fn (ScriptLanguageExtension) gd_debug_get_stack_level_source #

fn (s &ScriptLanguageExtension) gd_debug_get_stack_level_source(level i64) string

Returns the source associated with a given debug stack position.

fn (ScriptLanguageExtension) gd_debug_get_stack_level_locals #

fn (s &ScriptLanguageExtension) gd_debug_get_stack_level_locals(level i64, max_subitems i64, max_depth i64) Dictionary

fn (ScriptLanguageExtension) gd_debug_get_stack_level_members #

fn (s &ScriptLanguageExtension) gd_debug_get_stack_level_members(level i64, max_subitems i64, max_depth i64) Dictionary

fn (ScriptLanguageExtension) gd_debug_get_stack_level_instance #

fn (s &ScriptLanguageExtension) gd_debug_get_stack_level_instance(level i64) voidptr

fn (ScriptLanguageExtension) gd_debug_get_globals #

fn (s &ScriptLanguageExtension) gd_debug_get_globals(max_subitems i64, max_depth i64) Dictionary

fn (ScriptLanguageExtension) gd_debug_parse_stack_level_expression #

fn (s &ScriptLanguageExtension) gd_debug_parse_stack_level_expression(level i64, expression string, max_subitems i64, max_depth i64) string

fn (ScriptLanguageExtension) gd_debug_get_current_stack_info #

fn (s &ScriptLanguageExtension) gd_debug_get_current_stack_info() Array

fn (ScriptLanguageExtension) gd_reload_all_scripts #

fn (s &ScriptLanguageExtension) gd_reload_all_scripts()

fn (ScriptLanguageExtension) gd_reload_scripts #

fn (s &ScriptLanguageExtension) gd_reload_scripts(scripts Array, soft_reload bool)

fn (ScriptLanguageExtension) gd_reload_tool_script #

fn (s &ScriptLanguageExtension) gd_reload_tool_script(script Script, soft_reload bool)

fn (ScriptLanguageExtension) gd_get_recognized_extensions #

fn (s &ScriptLanguageExtension) gd_get_recognized_extensions() PackedStringArray

fn (ScriptLanguageExtension) gd_get_public_functions #

fn (s &ScriptLanguageExtension) gd_get_public_functions() Array

fn (ScriptLanguageExtension) gd_get_public_constants #

fn (s &ScriptLanguageExtension) gd_get_public_constants() Dictionary

fn (ScriptLanguageExtension) gd_get_public_annotations #

fn (s &ScriptLanguageExtension) gd_get_public_annotations() Array

fn (ScriptLanguageExtension) gd_profiling_start #

fn (s &ScriptLanguageExtension) gd_profiling_start()

fn (ScriptLanguageExtension) gd_profiling_stop #

fn (s &ScriptLanguageExtension) gd_profiling_stop()

fn (ScriptLanguageExtension) gd_profiling_set_save_native_calls #

fn (s &ScriptLanguageExtension) gd_profiling_set_save_native_calls(enable bool)

fn (ScriptLanguageExtension) gd_profiling_get_accumulated_data #

fn (s &ScriptLanguageExtension) gd_profiling_get_accumulated_data(info_array &ScriptLanguageExtensionProfilingInfo, info_max i64) i64

fn (ScriptLanguageExtension) gd_profiling_get_frame_data #

fn (s &ScriptLanguageExtension) gd_profiling_get_frame_data(info_array &ScriptLanguageExtensionProfilingInfo, info_max i64) i64

fn (ScriptLanguageExtension) gd_frame #

fn (s &ScriptLanguageExtension) gd_frame()

fn (ScriptLanguageExtension) gd_handles_global_class_type #

fn (s &ScriptLanguageExtension) gd_handles_global_class_type(gd_type string) bool

fn (ScriptLanguageExtension) gd_get_global_class_name #

fn (s &ScriptLanguageExtension) gd_get_global_class_name(path string) Dictionary

struct ScriptLanguageExtensionProfilingInfo #

struct ScriptLanguageExtensionProfilingInfo {
pub mut:
	signature  StringName
	call_count u64
	total_time u64
	self_time  u64
}

struct Script_reload_Cfg #

@[params]
struct Script_reload_Cfg {
pub:
	keep_state bool
}

Optional parameters for Script#reload

struct ScrollBar #

struct ScrollBar {
	Range
}

Abstract base class for scrollbars.

fn (ScrollBar) to_variant #

fn (s &ScrollBar) to_variant() Variant

fn (ScrollBar) from_variant #

fn (mut s ScrollBar) from_variant(variant &Variant)

fn (ScrollBar) set_custom_step #

fn (s &ScrollBar) set_custom_step(step f64)

fn (ScrollBar) get_custom_step #

fn (s &ScrollBar) get_custom_step() f64

struct ScrollContainer #

struct ScrollContainer {
	Container
}

A container used to provide scrollbars to a child control when needed.

fn (ScrollContainer) to_variant #

fn (s &ScrollContainer) to_variant() Variant

fn (ScrollContainer) from_variant #

fn (mut s ScrollContainer) from_variant(variant &Variant)

fn (ScrollContainer) set_h_scroll #

fn (s &ScrollContainer) set_h_scroll(value i64)

fn (ScrollContainer) get_h_scroll #

fn (s &ScrollContainer) get_h_scroll() i64

fn (ScrollContainer) set_v_scroll #

fn (s &ScrollContainer) set_v_scroll(value i64)

fn (ScrollContainer) get_v_scroll #

fn (s &ScrollContainer) get_v_scroll() i64

fn (ScrollContainer) set_horizontal_custom_step #

fn (s &ScrollContainer) set_horizontal_custom_step(value f64)

fn (ScrollContainer) get_horizontal_custom_step #

fn (s &ScrollContainer) get_horizontal_custom_step() f64

fn (ScrollContainer) set_vertical_custom_step #

fn (s &ScrollContainer) set_vertical_custom_step(value f64)

fn (ScrollContainer) get_vertical_custom_step #

fn (s &ScrollContainer) get_vertical_custom_step() f64

fn (ScrollContainer) set_horizontal_scroll_mode #

fn (s &ScrollContainer) set_horizontal_scroll_mode(enable ScrollContainerScrollMode)

fn (ScrollContainer) get_horizontal_scroll_mode #

fn (s &ScrollContainer) get_horizontal_scroll_mode() ScrollContainerScrollMode

fn (ScrollContainer) set_vertical_scroll_mode #

fn (s &ScrollContainer) set_vertical_scroll_mode(enable ScrollContainerScrollMode)

fn (ScrollContainer) get_vertical_scroll_mode #

fn (s &ScrollContainer) get_vertical_scroll_mode() ScrollContainerScrollMode

fn (ScrollContainer) set_deadzone #

fn (s &ScrollContainer) set_deadzone(deadzone i64)

fn (ScrollContainer) get_deadzone #

fn (s &ScrollContainer) get_deadzone() i64

fn (ScrollContainer) set_follow_focus #

fn (s &ScrollContainer) set_follow_focus(enabled bool)

fn (ScrollContainer) is_following_focus #

fn (s &ScrollContainer) is_following_focus() bool

fn (ScrollContainer) get_h_scroll_bar #

fn (s &ScrollContainer) get_h_scroll_bar() HScrollBar

Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer]. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use [member horizontal_scroll_mode].

fn (ScrollContainer) get_v_scroll_bar #

fn (s &ScrollContainer) get_v_scroll_bar() VScrollBar

Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer]. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable or hide a scrollbar, you can use [member vertical_scroll_mode].

fn (ScrollContainer) ensure_control_visible #

fn (s &ScrollContainer) ensure_control_visible(control Control)

Ensures the given [param control] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus]. [b]Note:[/b] This will not work on a node that was just added during the same frame. If you want to scroll to a newly added child, you must wait until the next frame using [signal SceneTree.process_frame]:

add_child(child_node)
await get_tree().process_frame
ensure_control_visible(child_node)

fn (ScrollContainer) set_draw_focus_border #

fn (s &ScrollContainer) set_draw_focus_border(draw bool)

fn (ScrollContainer) get_draw_focus_border #

fn (s &ScrollContainer) get_draw_focus_border() bool

struct SegmentShape2D #

struct SegmentShape2D {
	Shape2D
}

A 2D line segment shape used for physics collision.

fn (SegmentShape2D) to_variant #

fn (s &SegmentShape2D) to_variant() Variant

fn (SegmentShape2D) from_variant #

fn (mut s SegmentShape2D) from_variant(variant &Variant)

fn (SegmentShape2D) set_a #

fn (s &SegmentShape2D) set_a(a Vector2)

fn (SegmentShape2D) get_a #

fn (s &SegmentShape2D) get_a() Vector2

fn (SegmentShape2D) set_b #

fn (s &SegmentShape2D) set_b(b Vector2)

fn (SegmentShape2D) get_b #

fn (s &SegmentShape2D) get_b() Vector2

struct Semaphore #

struct Semaphore {
	RefCounted
}

A synchronization mechanism used to control access to a shared resource by [Thread]s.

fn (Semaphore) to_variant #

fn (s &Semaphore) to_variant() Variant

fn (Semaphore) from_variant #

fn (mut s Semaphore) from_variant(variant &Variant)

fn (Semaphore) wait #

fn (s &Semaphore) wait()

Waits for the [Semaphore], if its value is zero, blocks until non-zero.

fn (Semaphore) try_wait #

fn (s &Semaphore) try_wait() bool

Like [method wait], but won't block, so if the value is zero, fails immediately and returns false. If non-zero, it returns true to report success.

fn (Semaphore) post #

fn (s &Semaphore) post(cfg Semaphore_post_Cfg)

Lowers the [Semaphore], allowing one thread in, or more if [param count] is specified.

struct Semaphore_post_Cfg #

@[params]
struct Semaphore_post_Cfg {
pub:
	count i64 = 1
}

Optional parameters for Semaphore#post

struct SeparationRayShape2D #

struct SeparationRayShape2D {
	Shape2D
}

A 2D ray shape used for physics collision that tries to separate itself from any collider.

fn (SeparationRayShape2D) to_variant #

fn (s &SeparationRayShape2D) to_variant() Variant

fn (SeparationRayShape2D) from_variant #

fn (mut s SeparationRayShape2D) from_variant(variant &Variant)

fn (SeparationRayShape2D) set_length #

fn (s &SeparationRayShape2D) set_length(length f64)

fn (SeparationRayShape2D) get_length #

fn (s &SeparationRayShape2D) get_length() f64

fn (SeparationRayShape2D) set_slide_on_slope #

fn (s &SeparationRayShape2D) set_slide_on_slope(active bool)

fn (SeparationRayShape2D) get_slide_on_slope #

fn (s &SeparationRayShape2D) get_slide_on_slope() bool

struct SeparationRayShape3D #

struct SeparationRayShape3D {
	Shape3D
}

A 3D ray shape used for physics collision that tries to separate itself from any collider.

fn (SeparationRayShape3D) to_variant #

fn (s &SeparationRayShape3D) to_variant() Variant

fn (SeparationRayShape3D) from_variant #

fn (mut s SeparationRayShape3D) from_variant(variant &Variant)

fn (SeparationRayShape3D) set_length #

fn (s &SeparationRayShape3D) set_length(length f64)

fn (SeparationRayShape3D) get_length #

fn (s &SeparationRayShape3D) get_length() f64

fn (SeparationRayShape3D) set_slide_on_slope #

fn (s &SeparationRayShape3D) set_slide_on_slope(active bool)

fn (SeparationRayShape3D) get_slide_on_slope #

fn (s &SeparationRayShape3D) get_slide_on_slope() bool

struct Separator #

struct Separator {
	Control
}

Abstract base class for separators.

fn (Separator) to_variant #

fn (s &Separator) to_variant() Variant

fn (Separator) from_variant #

fn (mut s Separator) from_variant(variant &Variant)

struct Shader #

struct Shader {
	Resource
}

A shader implemented in the Godot shading language.

fn (Shader) to_variant #

fn (s &Shader) to_variant() Variant

fn (Shader) from_variant #

fn (mut s Shader) from_variant(variant &Variant)

fn (Shader) get_mode #

fn (s &Shader) get_mode() ShaderMode

Returns the shader mode for the shader.

fn (Shader) set_code #

fn (s &Shader) set_code(code string)

fn (Shader) get_code #

fn (s &Shader) get_code() string

fn (Shader) set_default_texture_parameter #

fn (s &Shader) set_default_texture_parameter(name string, texture Texture, cfg Shader_set_default_texture_parameter_Cfg)

Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial]. [b]Note:[/b] [param name] must match the name of the uniform in the code exactly. [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.

fn (Shader) get_default_texture_parameter #

fn (s &Shader) get_default_texture_parameter(name string, cfg Shader_get_default_texture_parameter_Cfg) Texture

Returns the texture that is set as default for the specified parameter. [b]Note:[/b] [param name] must match the name of the uniform in the code exactly. [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.

fn (Shader) get_shader_uniform_list #

fn (s &Shader) get_shader_uniform_list(cfg Shader_get_shader_uniform_list_Cfg) Array

Returns the list of shader uniforms that can be assigned to a [ShaderMaterial], for use with [method ShaderMaterial.set_shader_parameter] and [method ShaderMaterial.get_shader_parameter]. The parameters returned are contained in dictionaries in a similar format to the ones returned by [method Object.get_property_list]. If argument [param get_groups] is true, parameter grouping hints are also included in the list.

fn (Shader) inspect_native_shader_code #

fn (s &Shader) inspect_native_shader_code()

Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also [method Material.inspect_native_shader_code].

struct ShaderGlobalsOverride #

struct ShaderGlobalsOverride {
	Node
}

A node used to override global shader parameters' values in a scene.

fn (ShaderGlobalsOverride) to_variant #

fn (s &ShaderGlobalsOverride) to_variant() Variant

fn (ShaderGlobalsOverride) from_variant #

fn (mut s ShaderGlobalsOverride) from_variant(variant &Variant)

struct ShaderInclude #

struct ShaderInclude {
	Resource
}

A snippet of shader code to be included in a [Shader] with #include.

fn (ShaderInclude) to_variant #

fn (s &ShaderInclude) to_variant() Variant

fn (ShaderInclude) from_variant #

fn (mut s ShaderInclude) from_variant(variant &Variant)

fn (ShaderInclude) set_code #

fn (s &ShaderInclude) set_code(code string)

fn (ShaderInclude) get_code #

fn (s &ShaderInclude) get_code() string

struct ShaderIncludeDB #

struct ShaderIncludeDB {
	Object
}

Internal database of built in shader include files.

fn (ShaderIncludeDB) to_variant #

fn (s &ShaderIncludeDB) to_variant() Variant

fn (ShaderIncludeDB) from_variant #

fn (mut s ShaderIncludeDB) from_variant(variant &Variant)

struct ShaderMaterial #

struct ShaderMaterial {
	Material
}

A material defined by a custom [Shader] program and the values of its shader parameters.

fn (ShaderMaterial) to_variant #

fn (s &ShaderMaterial) to_variant() Variant

fn (ShaderMaterial) from_variant #

fn (mut s ShaderMaterial) from_variant(variant &Variant)

fn (ShaderMaterial) set_shader #

fn (s &ShaderMaterial) set_shader(shader Shader)

fn (ShaderMaterial) get_shader #

fn (s &ShaderMaterial) get_shader() Shader

fn (ShaderMaterial) set_shader_parameter #

fn (s &ShaderMaterial) set_shader_parameter(param string, value_ ToVariant)

Changes the value set for this material of a uniform in the shader. [b]Note:[/b] [param param] is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). [b]Note:[/b] Changes to the shader uniform will be effective on all instances using this [ShaderMaterial]. To prevent this, use per-instance uniforms with [method GeometryInstance3D.set_instance_shader_parameter] or duplicate the [ShaderMaterial] resource using [method Resource.duplicate]. Per-instance uniforms allow for better shader reuse and are therefore faster, so they should be preferred over duplicating the [ShaderMaterial] when possible.

fn (ShaderMaterial) get_shader_parameter #

fn (s &ShaderMaterial) get_shader_parameter(param string) Variant

Returns the current value set for this material of a uniform in the shader.

struct Shader_get_default_texture_parameter_Cfg #

@[params]
struct Shader_get_default_texture_parameter_Cfg {
pub:
	index i64
}

Optional parameters for Shader#get_default_texture_parameter

struct Shader_get_shader_uniform_list_Cfg #

@[params]
struct Shader_get_shader_uniform_list_Cfg {
pub:
	get_groups bool
}

Optional parameters for Shader#get_shader_uniform_list

struct Shader_set_default_texture_parameter_Cfg #

@[params]
struct Shader_set_default_texture_parameter_Cfg {
pub:
	index i64
}

Optional parameters for Shader#set_default_texture_parameter

struct Shape2D #

struct Shape2D {
	Resource
}

Abstract base class for 2D shapes used for physics collision.

fn (Shape2D) to_variant #

fn (s &Shape2D) to_variant() Variant

fn (Shape2D) from_variant #

fn (mut s Shape2D) from_variant(variant &Variant)

fn (Shape2D) set_custom_solver_bias #

fn (s &Shape2D) set_custom_solver_bias(bias f64)

fn (Shape2D) get_custom_solver_bias #

fn (s &Shape2D) get_custom_solver_bias() f64

fn (Shape2D) collide #

fn (s &Shape2D) collide(local_xform Transform2D, with_shape Shape2D, shape_xform Transform2D) bool

Returns true if this shape is colliding with another. This method needs the transformation matrix for this shape ([param local_xform]), the shape to check collisions with ([param with_shape]), and the transformation matrix of that shape ([param shape_xform]).

fn (Shape2D) collide_with_motion #

fn (s &Shape2D) collide_with_motion(local_xform Transform2D, local_motion Vector2, with_shape Shape2D, shape_xform Transform2D, shape_motion Vector2) bool

Returns whether this shape would collide with another, if a given movement was applied. This method needs the transformation matrix for this shape ([param local_xform]), the movement to test on this shape ([param local_motion]), the shape to check collisions with ([param with_shape]), the transformation matrix of that shape ([param shape_xform]), and the movement to test onto the other object ([param shape_motion]).

fn (Shape2D) collide_and_get_contacts #

fn (s &Shape2D) collide_and_get_contacts(local_xform Transform2D, with_shape Shape2D, shape_xform Transform2D) PackedVector2Array

Returns a list of contact point pairs where this shape touches another. If there are no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [param with_shape]. A collision pair A, B can be used to calculate the collision normal with (B - A).normalized(), and the collision depth with (B - A).length(). This information is typically used to separate shapes, particularly in collision solvers. This method needs the transformation matrix for this shape ([param local_xform]), the shape to check collisions with ([param with_shape]), and the transformation matrix of that shape ([param shape_xform]).

fn (Shape2D) collide_with_motion_and_get_contacts #

fn (s &Shape2D) collide_with_motion_and_get_contacts(local_xform Transform2D, local_motion Vector2, with_shape Shape2D, shape_xform Transform2D, shape_motion Vector2) PackedVector2Array

Returns a list of contact point pairs where this shape would touch another, if a given movement was applied. If there would be no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [param with_shape]. A collision pair A, B can be used to calculate the collision normal with (B - A).normalized(), and the collision depth with (B - A).length(). This information is typically used to separate shapes, particularly in collision solvers. This method needs the transformation matrix for this shape ([param local_xform]), the movement to test on this shape ([param local_motion]), the shape to check collisions with ([param with_shape]), the transformation matrix of that shape ([param shape_xform]), and the movement to test onto the other object ([param shape_motion]).

fn (Shape2D) draw #

fn (s &Shape2D) draw(canvas_item RID, color Color)

Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [param color]. The exact drawing method is specific for each shape and cannot be configured.

fn (Shape2D) get_rect #

fn (s &Shape2D) get_rect() Rect2

Returns a [Rect2] representing the shapes boundary.

struct Shape3D #

struct Shape3D {
	Resource
}

Abstract base class for 3D shapes used for physics collision.

fn (Shape3D) to_variant #

fn (s &Shape3D) to_variant() Variant

fn (Shape3D) from_variant #

fn (mut s Shape3D) from_variant(variant &Variant)

fn (Shape3D) set_custom_solver_bias #

fn (s &Shape3D) set_custom_solver_bias(bias f64)

fn (Shape3D) get_custom_solver_bias #

fn (s &Shape3D) get_custom_solver_bias() f64

fn (Shape3D) set_margin #

fn (s &Shape3D) set_margin(margin f64)

fn (Shape3D) get_margin #

fn (s &Shape3D) get_margin() f64

fn (Shape3D) get_debug_mesh #

fn (s &Shape3D) get_debug_mesh() ArrayMesh

Returns the [ArrayMesh] used to draw the debug collision for this [Shape3D].

struct ShapeCast2D #

struct ShapeCast2D {
	Node2D
}

A 2D shape that sweeps a region of space to detect [CollisionObject2D]s.

fn (ShapeCast2D) to_variant #

fn (s &ShapeCast2D) to_variant() Variant

fn (ShapeCast2D) from_variant #

fn (mut s ShapeCast2D) from_variant(variant &Variant)

fn (ShapeCast2D) set_enabled #

fn (s &ShapeCast2D) set_enabled(enabled bool)

fn (ShapeCast2D) is_enabled #

fn (s &ShapeCast2D) is_enabled() bool

fn (ShapeCast2D) set_shape #

fn (s &ShapeCast2D) set_shape(shape Shape2D)

fn (ShapeCast2D) get_shape #

fn (s &ShapeCast2D) get_shape() Shape2D

fn (ShapeCast2D) set_target_position #

fn (s &ShapeCast2D) set_target_position(local_point Vector2)

fn (ShapeCast2D) get_target_position #

fn (s &ShapeCast2D) get_target_position() Vector2

fn (ShapeCast2D) set_margin #

fn (s &ShapeCast2D) set_margin(margin f64)

fn (ShapeCast2D) get_margin #

fn (s &ShapeCast2D) get_margin() f64

fn (ShapeCast2D) set_max_results #

fn (s &ShapeCast2D) set_max_results(max_results i64)

fn (ShapeCast2D) get_max_results #

fn (s &ShapeCast2D) get_max_results() i64

fn (ShapeCast2D) is_colliding #

fn (s &ShapeCast2D) is_colliding() bool

Returns whether any object is intersecting with the shape's vector (considering the vector length).

fn (ShapeCast2D) get_collision_count #

fn (s &ShapeCast2D) get_collision_count() i64

The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by [method get_collider], [method get_collider_shape], [method get_collision_point], and [method get_collision_normal] methods.

fn (ShapeCast2D) force_shapecast_update #

fn (s &ShapeCast2D) force_shapecast_update()

Updates the collision information for the shape immediately, without waiting for the next _physics_process call. Use this method, for example, when the shape or its parent has changed state. [b]Note:[/b] Setting [member enabled] to true is not required for this to work.

fn (ShapeCast2D) get_collider #

fn (s &ShapeCast2D) get_collider(index i64) Object

Returns the collided [Object] of one of the multiple collisions at [param index], or null if no object is intersecting the shape (i.e. [method is_colliding] returns false).

fn (ShapeCast2D) get_collider_rid #

fn (s &ShapeCast2D) get_collider_rid(index i64) RID

Returns the [RID] of the collided object of one of the multiple collisions at [param index].

fn (ShapeCast2D) get_collider_shape #

fn (s &ShapeCast2D) get_collider_shape(index i64) i64

Returns the shape ID of the colliding shape of one of the multiple collisions at [param index], or 0 if no object is intersecting the shape (i.e. [method is_colliding] returns false).

fn (ShapeCast2D) get_collision_point #

fn (s &ShapeCast2D) get_collision_point(index i64) Vector2

Returns the collision point of one of the multiple collisions at [param index] where the shape intersects the colliding object. [b]Note:[/b] This point is in the [b]global[/b] coordinate system.

fn (ShapeCast2D) get_collision_normal #

fn (s &ShapeCast2D) get_collision_normal(index i64) Vector2

Returns the normal of one of the multiple collisions at [param index] of the intersecting object.

fn (ShapeCast2D) get_closest_collision_safe_fraction #

fn (s &ShapeCast2D) get_closest_collision_safe_fraction() f64

Returns the fraction from this cast's origin to its [member target_position] of how far the shape can move without triggering a collision, as a value between 0.0 and 1.0.

fn (ShapeCast2D) get_closest_collision_unsafe_fraction #

fn (s &ShapeCast2D) get_closest_collision_unsafe_fraction() f64

Returns the fraction from this cast's origin to its [member target_position] of how far the shape must move to trigger a collision, as a value between 0.0 and 1.0. In ideal conditions this would be the same as [method get_closest_collision_safe_fraction], however shape casting is calculated in discrete steps, so the precise point of collision can occur between two calculated positions.

fn (ShapeCast2D) add_exception_rid #

fn (s &ShapeCast2D) add_exception_rid(rid RID)

Adds a collision exception so the shape does not report collisions with the specified [RID].

fn (ShapeCast2D) add_exception #

fn (s &ShapeCast2D) add_exception(node CollisionObject2D)

Adds a collision exception so the shape does not report collisions with the specified node.

fn (ShapeCast2D) remove_exception_rid #

fn (s &ShapeCast2D) remove_exception_rid(rid RID)

Removes a collision exception so the shape does report collisions with the specified [RID].

fn (ShapeCast2D) remove_exception #

fn (s &ShapeCast2D) remove_exception(node CollisionObject2D)

Removes a collision exception so the shape does report collisions with the specified node.

fn (ShapeCast2D) clear_exceptions #

fn (s &ShapeCast2D) clear_exceptions()

Removes all collision exceptions for this shape.

fn (ShapeCast2D) set_collision_mask #

fn (s &ShapeCast2D) set_collision_mask(mask i64)

fn (ShapeCast2D) get_collision_mask #

fn (s &ShapeCast2D) get_collision_mask() i64

fn (ShapeCast2D) set_collision_mask_value #

fn (s &ShapeCast2D) set_collision_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.

fn (ShapeCast2D) get_collision_mask_value #

fn (s &ShapeCast2D) get_collision_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (ShapeCast2D) set_exclude_parent_body #

fn (s &ShapeCast2D) set_exclude_parent_body(mask bool)

fn (ShapeCast2D) get_exclude_parent_body #

fn (s &ShapeCast2D) get_exclude_parent_body() bool

fn (ShapeCast2D) set_collide_with_areas #

fn (s &ShapeCast2D) set_collide_with_areas(enable bool)

fn (ShapeCast2D) is_collide_with_areas_enabled #

fn (s &ShapeCast2D) is_collide_with_areas_enabled() bool

fn (ShapeCast2D) set_collide_with_bodies #

fn (s &ShapeCast2D) set_collide_with_bodies(enable bool)

fn (ShapeCast2D) is_collide_with_bodies_enabled #

fn (s &ShapeCast2D) is_collide_with_bodies_enabled() bool

fn (ShapeCast2D) get_collision_result #

fn (s &ShapeCast2D) get_collision_result() Array

struct ShapeCast3D #

struct ShapeCast3D {
	Node3D
}

A 3D shape that sweeps a region of space to detect [CollisionObject3D]s.

fn (ShapeCast3D) to_variant #

fn (s &ShapeCast3D) to_variant() Variant

fn (ShapeCast3D) from_variant #

fn (mut s ShapeCast3D) from_variant(variant &Variant)

fn (ShapeCast3D) resource_changed #

fn (s &ShapeCast3D) resource_changed(resource Resource)

This method does nothing.

fn (ShapeCast3D) set_enabled #

fn (s &ShapeCast3D) set_enabled(enabled bool)

fn (ShapeCast3D) is_enabled #

fn (s &ShapeCast3D) is_enabled() bool

fn (ShapeCast3D) set_shape #

fn (s &ShapeCast3D) set_shape(shape Shape3D)

fn (ShapeCast3D) get_shape #

fn (s &ShapeCast3D) get_shape() Shape3D

fn (ShapeCast3D) set_target_position #

fn (s &ShapeCast3D) set_target_position(local_point Vector3)

fn (ShapeCast3D) get_target_position #

fn (s &ShapeCast3D) get_target_position() Vector3

fn (ShapeCast3D) set_margin #

fn (s &ShapeCast3D) set_margin(margin f64)

fn (ShapeCast3D) get_margin #

fn (s &ShapeCast3D) get_margin() f64

fn (ShapeCast3D) set_max_results #

fn (s &ShapeCast3D) set_max_results(max_results i64)

fn (ShapeCast3D) get_max_results #

fn (s &ShapeCast3D) get_max_results() i64

fn (ShapeCast3D) is_colliding #

fn (s &ShapeCast3D) is_colliding() bool

Returns whether any object is intersecting with the shape's vector (considering the vector length).

fn (ShapeCast3D) get_collision_count #

fn (s &ShapeCast3D) get_collision_count() i64

The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by [method get_collider], [method get_collider_shape], [method get_collision_point], and [method get_collision_normal] methods.

fn (ShapeCast3D) force_shapecast_update #

fn (s &ShapeCast3D) force_shapecast_update()

Updates the collision information for the shape immediately, without waiting for the next _physics_process call. Use this method, for example, when the shape or its parent has changed state. [b]Note:[/b] Setting [member enabled] to true is not required for this to work.

fn (ShapeCast3D) get_collider #

fn (s &ShapeCast3D) get_collider(index i64) Object

Returns the collided [Object] of one of the multiple collisions at [param index], or null if no object is intersecting the shape (i.e. [method is_colliding] returns false).

fn (ShapeCast3D) get_collider_rid #

fn (s &ShapeCast3D) get_collider_rid(index i64) RID

Returns the [RID] of the collided object of one of the multiple collisions at [param index].

fn (ShapeCast3D) get_collider_shape #

fn (s &ShapeCast3D) get_collider_shape(index i64) i64

Returns the shape ID of the colliding shape of one of the multiple collisions at [param index], or 0 if no object is intersecting the shape (i.e. [method is_colliding] returns false).

fn (ShapeCast3D) get_collision_point #

fn (s &ShapeCast3D) get_collision_point(index i64) Vector3

Returns the collision point of one of the multiple collisions at [param index] where the shape intersects the colliding object. [b]Note:[/b] This point is in the [b]global[/b] coordinate system.

fn (ShapeCast3D) get_collision_normal #

fn (s &ShapeCast3D) get_collision_normal(index i64) Vector3

Returns the normal of one of the multiple collisions at [param index] of the intersecting object.

fn (ShapeCast3D) get_closest_collision_safe_fraction #

fn (s &ShapeCast3D) get_closest_collision_safe_fraction() f64

Returns the fraction from this cast's origin to its [member target_position] of how far the shape can move without triggering a collision, as a value between 0.0 and 1.0.

fn (ShapeCast3D) get_closest_collision_unsafe_fraction #

fn (s &ShapeCast3D) get_closest_collision_unsafe_fraction() f64

Returns the fraction from this cast's origin to its [member target_position] of how far the shape must move to trigger a collision, as a value between 0.0 and 1.0. In ideal conditions this would be the same as [method get_closest_collision_safe_fraction], however shape casting is calculated in discrete steps, so the precise point of collision can occur between two calculated positions.

fn (ShapeCast3D) add_exception_rid #

fn (s &ShapeCast3D) add_exception_rid(rid RID)

Adds a collision exception so the shape does not report collisions with the specified [RID].

fn (ShapeCast3D) add_exception #

fn (s &ShapeCast3D) add_exception(node CollisionObject3D)

Adds a collision exception so the shape does not report collisions with the specified node.

fn (ShapeCast3D) remove_exception_rid #

fn (s &ShapeCast3D) remove_exception_rid(rid RID)

Removes a collision exception so the shape does report collisions with the specified [RID].

fn (ShapeCast3D) remove_exception #

fn (s &ShapeCast3D) remove_exception(node CollisionObject3D)

Removes a collision exception so the shape does report collisions with the specified node.

fn (ShapeCast3D) clear_exceptions #

fn (s &ShapeCast3D) clear_exceptions()

Removes all collision exceptions for this shape.

fn (ShapeCast3D) set_collision_mask #

fn (s &ShapeCast3D) set_collision_mask(mask i64)

fn (ShapeCast3D) get_collision_mask #

fn (s &ShapeCast3D) get_collision_mask() i64

fn (ShapeCast3D) set_collision_mask_value #

fn (s &ShapeCast3D) set_collision_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.

fn (ShapeCast3D) get_collision_mask_value #

fn (s &ShapeCast3D) get_collision_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (ShapeCast3D) set_exclude_parent_body #

fn (s &ShapeCast3D) set_exclude_parent_body(mask bool)

fn (ShapeCast3D) get_exclude_parent_body #

fn (s &ShapeCast3D) get_exclude_parent_body() bool

fn (ShapeCast3D) set_collide_with_areas #

fn (s &ShapeCast3D) set_collide_with_areas(enable bool)

fn (ShapeCast3D) is_collide_with_areas_enabled #

fn (s &ShapeCast3D) is_collide_with_areas_enabled() bool

fn (ShapeCast3D) set_collide_with_bodies #

fn (s &ShapeCast3D) set_collide_with_bodies(enable bool)

fn (ShapeCast3D) is_collide_with_bodies_enabled #

fn (s &ShapeCast3D) is_collide_with_bodies_enabled() bool

fn (ShapeCast3D) get_collision_result #

fn (s &ShapeCast3D) get_collision_result() Array

fn (ShapeCast3D) set_debug_shape_custom_color #

fn (s &ShapeCast3D) set_debug_shape_custom_color(debug_shape_custom_color Color)

fn (ShapeCast3D) get_debug_shape_custom_color #

fn (s &ShapeCast3D) get_debug_shape_custom_color() Color

struct Shortcut #

struct Shortcut {
	Resource
}

A shortcut for binding input.

fn (Shortcut) to_variant #

fn (s &Shortcut) to_variant() Variant

fn (Shortcut) from_variant #

fn (mut s Shortcut) from_variant(variant &Variant)

fn (Shortcut) set_events #

fn (s &Shortcut) set_events(events Array)

fn (Shortcut) get_events #

fn (s &Shortcut) get_events() Array

fn (Shortcut) has_valid_event #

fn (s &Shortcut) has_valid_event() bool

Returns whether [member events] contains an [InputEvent] which is valid.

fn (Shortcut) matches_event #

fn (s &Shortcut) matches_event(event InputEvent) bool

Returns whether any [InputEvent] in [member events] equals [param event]. This uses [method InputEvent.is_match] to compare events.

fn (Shortcut) get_as_text #

fn (s &Shortcut) get_as_text() string

Returns the shortcut's first valid [InputEvent] as a [String].

struct Signal #

@[packed]
struct Signal {
	data_ [16]u8
}

A built-in type representing a signal of an [Object].

[Signal] is a built-in [Variant] type that represents a signal of an [Object] instance. Like all [Variant] types, it can be stored in variables and passed to functions. Signals allow all connected [Callable]s (and by extension their respective objects) to listen and react to events, without directly referencing one another. This keeps the code flexible and easier to manage. You can check whether an [Object] has a given signal name using [method Object.has_signal]. In GDScript, signals can be declared with the signal keyword. In C#, you may use the [Signal] attribute on a delegate. [codeblocks] [gdscript] signal attacked

Additional arguments may be declared.

These arguments must be passed when the signal is emitted.

signal item_dropped(item_name, amount) [/gdscript] [csharp] [Signal] delegate void AttackedEventHandler();

// Additional arguments may be declared. // These arguments must be passed when the signal is emitted. [Signal] delegate void ItemDroppedEventHandler(string itemName, int amount); [/csharp] [/codeblocks] Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach. [codeblocks] [gdscript] func _ready(): var button = Button.new()# button_down here is a Signal Variant type. We therefore call the Signal.connect() method, not Object.connect().

See discussion below for a more in-depth overview of the API.

button.button_down.connect(_on_button_down)

This assumes that a Player class exists, which defines a hit signal.

var player = Player.new()# We use Signal.connect() again, and we also use the Callable.bind() method,

which returns a new Callable with the parameter binds.

player.hit.connect(_on_player_hit.bind("sword", 100))

func _on_button_down(): print("Button down!")

func _on_player_hit(weapon_type, damage): print("Hit with weapon %s for %d damage." % [weapon_type, damage]) [/gdscript] [csharp] public override void _Ready() { var button = new Button(); // C# supports passing signals as events, so we can use this idiomatic construct: button.ButtonDown += OnButtonDown;

// This assumes that a Player class exists, which defines a Hit signal. var player = new Player(); // We can use lambdas when we need to bind additional parameters. player.Hit += () => OnPlayerHit("sword", 100); }

private void OnButtonDown() { GD.Print("Button down!"); }

private void OnPlayerHit(string weaponType, int damage) { GD.Print($"Hit with weapon {weaponType} for {damage} damage."); } [/csharp] [/codeblocks] [b][code skip-lint]Object.connect() or [code skip-lint]Signal.connect()?[/b] As seen above, the recommended method to connect signals is not [method Object.connect]. The code block below shows the four options for connecting signals, using either this legacy method or the recommended [method Signal.connect], and using either an implicit [Callable] or a manually defined one. [codeblocks] [gdscript] func _ready(): var button = Button.new()# Option 1: Object.connect() with an implicit Callable for the defined function.button.connect("button_down", _on_button_down)# Option 2: Object.connect() with a constructed Callable using a target object and method name.button.connect("button_down", Callable(self, "_on_button_down"))# Option 3: Signal.connect() with an implicit Callable for the defined function.button.button_down.connect(_on_button_down)# Option 4: Signal.connect() with a constructed Callable using a target object and method name.button.button_down.connect(Callable(self, "_on_button_down"))

func _on_button_down(): print("Button down!") [/gdscript] [csharp] public override void _Ready() { var button = new Button(); // Option 1: In C#, we can use signals as events and connect with this idiomatic syntax: button.ButtonDown += OnButtonDown; // Option 2: GodotObject.Connect() with a constructed Callable from a method group. button.Connect(Button.SignalName.ButtonDown, Callable.From(OnButtonDown)); // Option 3: GodotObject.Connect() with a constructed Callable using a target object and method name. button.Connect(Button.SignalName.ButtonDown, new Callable(this, MethodName.OnButtonDown)); }

private void OnButtonDown() { GD.Print("Button down!"); } [/csharp] [/codeblocks] While all options have the same outcome (button's [signal BaseButton.button_down] signal will be connected to _on_button_down), [b]option 3[/b] offers the best validation: it will print a compile-time error if either the button_down [Signal] or the _on_button_down [Callable] are not defined. On the other hand, [b]option 2[/b] only relies on string names and will only be able to validate either names at runtime: it will generate an error at runtime if "button_down" is not a signal, or if "_on_button_down" is not a method in the object self. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. [b]Binding and passing parameters:[/b] The syntax to bind parameters is through [method Callable.bind], which returns a copy of the [Callable] with its parameters bound. When calling [method emit] or [method Object.emit_signal], the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters. [codeblocks] [gdscript] func _ready():# This assumes that a Player class exists, which defines a hit signal.var player = Player.new()# Using Callable.bind().player.hit.connect(_on_player_hit.bind("sword", 100))

Parameters added when emitting the signal are passed first.

player.hit.emit("Dark lord", 5)

We pass two arguments when emitting (hit_by, level),

and bind two more arguments when connecting (weapon_type, damage).

func _on_player_hit(hit_by, level, weapon_type, damage): print("Hit by %s (level %d) with weapon %s for %d damage." % [hit_by, level, weapon_type, damage]) [/gdscript] [csharp] public override void _Ready() { // This assumes that a Player class exists, which defines a Hit signal. var player = new Player(); // Using lambda expressions that create a closure that captures the additional parameters. // The lambda only receives the parameters defined by the signal's delegate. player.Hit += (hitBy, level) => OnPlayerHit(hitBy, level, "sword", 100);

// Parameters added when emitting the signal are passed first. player.EmitSignal(SignalName.Hit, "Dark lord", 5); }

// We pass two arguments when emitting (hit_by, level), // and bind two more arguments when connecting (weapon_type, damage). private void OnPlayerHit(string hitBy, int level, string weaponType, int damage) { GD.Print($"Hit by {hitBy} (level {level}) with weapon {weaponType} for {damage} damage."); } [/csharp] [/codeblocks]

fn (Signal) deinit #

fn (s &Signal) deinit()

fn (Signal) is_null #

fn (s &Signal) is_null() bool

Returns true if this [Signal] has no object and the signal name is empty. Equivalent to signal == Signal().

fn (Signal) get_object #

fn (s &Signal) get_object() Object

Returns the object emitting this signal.

fn (Signal) get_object_id #

fn (s &Signal) get_object_id() i64

Returns the ID of the object emitting this signal (see [method Object.get_instance_id]).

fn (Signal) get_name #

fn (s &Signal) get_name() StringName

Returns the name of this signal.

fn (Signal) connect #

fn (s &Signal) connect(callable Callable, cfg Signal_connect_Cfg) i64

Connects this signal to the specified [param callable]. Optional [param flags] can be also added to configure the connection's behavior (see [enum Object.ConnectFlags] constants). You can provide additional arguments to the connected [param callable] by using [method Callable.bind]. A signal can only be connected once to the same [Callable]. If the signal is already connected, this method returns [constant ERR_INVALID_PARAMETER] and generates an error, unless the signal is connected with [constant Object.CONNECT_REFERENCE_COUNTED]. To prevent this, use [method is_connected] first to check for existing connections.

for button in $Buttons.get_children():
button.pressed.connect(_on_pressed.bind(button))

func _on_pressed(button):
print(button.name, ' was pressed')

[b]Note:[/b] If the [param callable]'s object is freed, the connection will be lost.

fn (Signal) disconnect #

fn (s &Signal) disconnect(callable Callable)

Disconnects this signal from the specified [Callable]. If the connection does not exist, generates an error. Use [method is_connected] to make sure that the connection exists.

fn (Signal) is_connected #

fn (s &Signal) is_connected(callable Callable) bool

Returns true if the specified [Callable] is connected to this signal.

fn (Signal) get_connections #

fn (s &Signal) get_connections() Array

Returns an [Array] of connections for this signal. Each connection is represented as a [Dictionary] that contains three entries:- signal is a reference to this signal;

  • callable is a reference to the connected [Callable];
  • flags is a combination of [enum Object.ConnectFlags].

fn (Signal) has_connections #

fn (s &Signal) has_connections() bool

Returns true if any [Callable] is connected to this signal.

fn (Signal) emit #

fn (s &Signal) emit(varargs ...ToVariant)

Emits this signal. All [Callable]s connected to this signal will be triggered. This method supports a variable number of arguments, so parameters can be passed as a comma separated list.

fn (Signal) to_variant #

fn (s &Signal) to_variant() Variant

fn (Signal) from_variant #

fn (mut s Signal) from_variant(variant &Variant)

fn (Signal) == #

fn (a Signal) == (b Signal) bool

Returns true if both signals share the same object and name.

fn (Signal) eq_signal #

fn (a Signal) eq_signal(b Signal) bool

Returns true if both signals share the same object and name.

fn (Signal) ne_signal #

fn (a Signal) ne_signal(b Signal) bool

Returns true if the signals do not share the same object and name.

fn (Signal) in_dictionary #

fn (a Signal) in_dictionary(b Dictionary) bool

fn (Signal) in_array #

fn (a Signal) in_array(b Array) bool

struct Signal_connect_Cfg #

@[params]
struct Signal_connect_Cfg {
pub:
	flags i64
}

struct Skeleton2D #

struct Skeleton2D {
	Node2D
}

The parent of a hierarchy of [Bone2D]s, used to create a 2D skeletal animation.

fn (Skeleton2D) to_variant #

fn (s &Skeleton2D) to_variant() Variant

fn (Skeleton2D) from_variant #

fn (mut s Skeleton2D) from_variant(variant &Variant)

fn (Skeleton2D) get_bone_count #

fn (s &Skeleton2D) get_bone_count() i64

Returns the number of [Bone2D] nodes in the node hierarchy parented by Skeleton2D.

fn (Skeleton2D) get_bone #

fn (s &Skeleton2D) get_bone(idx i64) Bone2D

Returns a [Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter [param idx]. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling.

fn (Skeleton2D) get_skeleton #

fn (s &Skeleton2D) get_skeleton() RID

Returns the [RID] of a Skeleton2D instance.

fn (Skeleton2D) set_modification_stack #

fn (s &Skeleton2D) set_modification_stack(modification_stack SkeletonModificationStack2D)

Sets the [SkeletonModificationStack2D] attached to this skeleton.

fn (Skeleton2D) get_modification_stack #

fn (s &Skeleton2D) get_modification_stack() SkeletonModificationStack2D

Returns the [SkeletonModificationStack2D] attached to this skeleton, if one exists.

fn (Skeleton2D) execute_modifications #

fn (s &Skeleton2D) execute_modifications(delta f64, execution_mode i64)

Executes all the modifications on the [SkeletonModificationStack2D], if the Skeleton2D has one assigned.

fn (Skeleton2D) set_bone_local_pose_override #

fn (s &Skeleton2D) set_bone_local_pose_override(bone_idx i64, override_pose Transform2D, strength f64, persistent bool)

Sets the local pose transform, [param override_pose], for the bone at [param bone_idx]. [param strength] is the interpolation strength that will be used when applying the pose, and [param persistent] determines if the applied pose will remain. [b]Note:[/b] The pose transform needs to be a local transform relative to the [Bone2D] node at [param bone_idx]!

fn (Skeleton2D) get_bone_local_pose_override #

fn (s &Skeleton2D) get_bone_local_pose_override(bone_idx i64) Transform2D

Returns the local pose override transform for [param bone_idx].

struct Skeleton3D #

struct Skeleton3D {
	Node3D
}

A node containing a bone hierarchy, used to create a 3D skeletal animation.

fn (Skeleton3D) to_variant #

fn (s &Skeleton3D) to_variant() Variant

fn (Skeleton3D) from_variant #

fn (mut s Skeleton3D) from_variant(variant &Variant)

fn (Skeleton3D) add_bone #

fn (s &Skeleton3D) add_bone(name string) i64

Adds a new bone with the given name. Returns the new bone's index, or -1 if this method fails. [b]Note:[/b] Bone names should be unique, non empty, and cannot include the : and / characters.

fn (Skeleton3D) find_bone #

fn (s &Skeleton3D) find_bone(name string) i64

Returns the bone index that matches [param name] as its name. Returns -1 if no bone with this name exists.

fn (Skeleton3D) get_bone_name #

fn (s &Skeleton3D) get_bone_name(bone_idx i64) string

Returns the name of the bone at index [param bone_idx].

fn (Skeleton3D) set_bone_name #

fn (s &Skeleton3D) set_bone_name(bone_idx i64, name string)

Sets the bone name, [param name], for the bone at [param bone_idx].

fn (Skeleton3D) get_bone_meta #

fn (s &Skeleton3D) get_bone_meta(bone_idx i64, key string) Variant

Returns the metadata for the bone at index [param bone_idx] with [param key].

fn (Skeleton3D) get_bone_meta_list #

fn (s &Skeleton3D) get_bone_meta_list(bone_idx i64) Array

Returns the list of all metadata keys for the bone at index [param bone_idx].

fn (Skeleton3D) has_bone_meta #

fn (s &Skeleton3D) has_bone_meta(bone_idx i64, key string) bool

Returns true if the bone at index [param bone_idx] has metadata with the key [param key].

fn (Skeleton3D) set_bone_meta #

fn (s &Skeleton3D) set_bone_meta(bone_idx i64, key string, value_ ToVariant)

Sets the metadata for the bone at index [param bone_idx], setting the [param key] meta to [param value].

fn (Skeleton3D) get_concatenated_bone_names #

fn (s &Skeleton3D) get_concatenated_bone_names() string

Returns all bone names concatenated with commas (,) as a single [StringName]. It is useful to set it as a hint for the enum property.

fn (Skeleton3D) get_bone_parent #

fn (s &Skeleton3D) get_bone_parent(bone_idx i64) i64

Returns the bone index which is the parent of the bone at [param bone_idx]. If -1, then bone has no parent. [b]Note:[/b] The parent bone returned will always be less than [param bone_idx].

fn (Skeleton3D) set_bone_parent #

fn (s &Skeleton3D) set_bone_parent(bone_idx i64, parent_idx i64)

Sets the bone index [param parent_idx] as the parent of the bone at [param bone_idx]. If -1, then bone has no parent. [b]Note:[/b] [param parent_idx] must be less than [param bone_idx].

fn (Skeleton3D) get_bone_count #

fn (s &Skeleton3D) get_bone_count() i64

Returns the number of bones in the skeleton.

fn (Skeleton3D) get_version #

fn (s &Skeleton3D) get_version() i64

Returns the number of times the bone hierarchy has changed within this skeleton, including renames. The Skeleton version is not serialized: only use within a single instance of Skeleton3D. Use for invalidating caches in IK solvers and other nodes which process bones.

fn (Skeleton3D) unparent_bone_and_rest #

fn (s &Skeleton3D) unparent_bone_and_rest(bone_idx i64)

Unparents the bone at [param bone_idx] and sets its rest position to that of its parent prior to being reset.

fn (Skeleton3D) get_bone_children #

fn (s &Skeleton3D) get_bone_children(bone_idx i64) PackedInt32Array

Returns an array containing the bone indexes of all the child node of the passed in bone, [param bone_idx].

fn (Skeleton3D) get_parentless_bones #

fn (s &Skeleton3D) get_parentless_bones() PackedInt32Array

Returns an array with all of the bones that are parentless. Another way to look at this is that it returns the indexes of all the bones that are not dependent or modified by other bones in the Skeleton.

fn (Skeleton3D) get_bone_rest #

fn (s &Skeleton3D) get_bone_rest(bone_idx i64) Transform3D

Returns the rest transform for a bone [param bone_idx].

fn (Skeleton3D) set_bone_rest #

fn (s &Skeleton3D) set_bone_rest(bone_idx i64, rest Transform3D)

Sets the rest transform for bone [param bone_idx].

fn (Skeleton3D) get_bone_global_rest #

fn (s &Skeleton3D) get_bone_global_rest(bone_idx i64) Transform3D

Returns the global rest transform for [param bone_idx].

fn (Skeleton3D) create_skin_from_rest_transforms #

fn (s &Skeleton3D) create_skin_from_rest_transforms() Skin

fn (Skeleton3D) register_skin #

fn (s &Skeleton3D) register_skin(skin Skin) SkinReference

Binds the given Skin to the Skeleton.

fn (Skeleton3D) localize_rests #

fn (s &Skeleton3D) localize_rests()

Returns all bones in the skeleton to their rest poses.

fn (Skeleton3D) clear_bones #

fn (s &Skeleton3D) clear_bones()

Clear all the bones in this skeleton.

fn (Skeleton3D) get_bone_pose #

fn (s &Skeleton3D) get_bone_pose(bone_idx i64) Transform3D

Returns the pose transform of the specified bone. [b]Note:[/b] This is the pose you set to the skeleton in the process, the final pose can get overridden by modifiers in the deferred process, if you want to access the final pose, use [signal SkeletonModifier3D.modification_processed].

fn (Skeleton3D) set_bone_pose #

fn (s &Skeleton3D) set_bone_pose(bone_idx i64, pose Transform3D)

Sets the pose transform, [param pose], for the bone at [param bone_idx].

fn (Skeleton3D) set_bone_pose_position #

fn (s &Skeleton3D) set_bone_pose_position(bone_idx i64, position Vector3)

Sets the pose position of the bone at [param bone_idx] to [param position]. [param position] is a [Vector3] describing a position local to the [Skeleton3D] node.

fn (Skeleton3D) set_bone_pose_rotation #

fn (s &Skeleton3D) set_bone_pose_rotation(bone_idx i64, rotation Quaternion)

Sets the pose rotation of the bone at [param bone_idx] to [param rotation]. [param rotation] is a [Quaternion] describing a rotation in the bone's local coordinate space with respect to the rotation of any parent bones.

fn (Skeleton3D) set_bone_pose_scale #

fn (s &Skeleton3D) set_bone_pose_scale(bone_idx i64, scale Vector3)

Sets the pose scale of the bone at [param bone_idx] to [param scale].

fn (Skeleton3D) get_bone_pose_position #

fn (s &Skeleton3D) get_bone_pose_position(bone_idx i64) Vector3

Returns the pose position of the bone at [param bone_idx]. The returned [Vector3] is in the local coordinate space of the [Skeleton3D] node.

fn (Skeleton3D) get_bone_pose_rotation #

fn (s &Skeleton3D) get_bone_pose_rotation(bone_idx i64) Quaternion

Returns the pose rotation of the bone at [param bone_idx]. The returned [Quaternion] is local to the bone with respect to the rotation of any parent bones.

fn (Skeleton3D) get_bone_pose_scale #

fn (s &Skeleton3D) get_bone_pose_scale(bone_idx i64) Vector3

Returns the pose scale of the bone at [param bone_idx].

fn (Skeleton3D) reset_bone_pose #

fn (s &Skeleton3D) reset_bone_pose(bone_idx i64)

Sets the bone pose to rest for [param bone_idx].

fn (Skeleton3D) reset_bone_poses #

fn (s &Skeleton3D) reset_bone_poses()

Sets all bone poses to rests.

fn (Skeleton3D) is_bone_enabled #

fn (s &Skeleton3D) is_bone_enabled(bone_idx i64) bool

Returns whether the bone pose for the bone at [param bone_idx] is enabled.

fn (Skeleton3D) set_bone_enabled #

fn (s &Skeleton3D) set_bone_enabled(bone_idx i64, cfg Skeleton3D_set_bone_enabled_Cfg)

Disables the pose for the bone at [param bone_idx] if false, enables the bone pose if true.

fn (Skeleton3D) get_bone_global_pose #

fn (s &Skeleton3D) get_bone_global_pose(bone_idx i64) Transform3D

Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. [b]Note:[/b] This is the global pose you set to the skeleton in the process, the final global pose can get overridden by modifiers in the deferred process, if you want to access the final global pose, use [signal SkeletonModifier3D.modification_processed].

fn (Skeleton3D) set_bone_global_pose #

fn (s &Skeleton3D) set_bone_global_pose(bone_idx i64, pose Transform3D)

Sets the global pose transform, [param pose], for the bone at [param bone_idx]. [b]Note:[/b] If other bone poses have been changed, this method executes a dirty poses recalculation and will cause performance to deteriorate. If you know that multiple global poses will be applied, consider using [method set_bone_pose] with precalculation.

fn (Skeleton3D) force_update_all_bone_transforms #

fn (s &Skeleton3D) force_update_all_bone_transforms()

Force updates the bone transforms/poses for all bones in the skeleton.

fn (Skeleton3D) force_update_bone_child_transform #

fn (s &Skeleton3D) force_update_bone_child_transform(bone_idx i64)

Force updates the bone transform for the bone at [param bone_idx] and all of its children.

fn (Skeleton3D) set_motion_scale #

fn (s &Skeleton3D) set_motion_scale(motion_scale f64)

fn (Skeleton3D) get_motion_scale #

fn (s &Skeleton3D) get_motion_scale() f64

fn (Skeleton3D) set_show_rest_only #

fn (s &Skeleton3D) set_show_rest_only(enabled bool)

fn (Skeleton3D) is_show_rest_only #

fn (s &Skeleton3D) is_show_rest_only() bool

fn (Skeleton3D) set_modifier_callback_mode_process #

fn (s &Skeleton3D) set_modifier_callback_mode_process(mode Skeleton3DModifierCallbackModeProcess)

fn (Skeleton3D) get_modifier_callback_mode_process #

fn (s &Skeleton3D) get_modifier_callback_mode_process() Skeleton3DModifierCallbackModeProcess

fn (Skeleton3D) advance #

fn (s &Skeleton3D) advance(delta f64)

Manually advance the child [SkeletonModifier3D]s by the specified time (in seconds). [b]Note:[/b] The [param delta] is temporarily accumulated in the [Skeleton3D], and the deferred process uses the accumulated value to process the modification.

fn (Skeleton3D) clear_bones_global_pose_override #

fn (s &Skeleton3D) clear_bones_global_pose_override()

Removes the global pose override on all bones in the skeleton.

fn (Skeleton3D) set_bone_global_pose_override #

fn (s &Skeleton3D) set_bone_global_pose_override(bone_idx i64, pose Transform3D, amount f64, cfg Skeleton3D_set_bone_global_pose_override_Cfg)

Sets the global pose transform, [param pose], for the bone at [param bone_idx]. [param amount] is the interpolation strength that will be used when applying the pose, and [param persistent] determines if the applied pose will remain. [b]Note:[/b] The pose transform needs to be a global pose! To convert a world transform from a [Node3D] to a global bone pose, multiply the [method Transform3D.affine_inverse] of the node's [member Node3D.global_transform] by the desired world transform.

fn (Skeleton3D) get_bone_global_pose_override #

fn (s &Skeleton3D) get_bone_global_pose_override(bone_idx i64) Transform3D

Returns the global pose override transform for [param bone_idx].

fn (Skeleton3D) get_bone_global_pose_no_override #

fn (s &Skeleton3D) get_bone_global_pose_no_override(bone_idx i64) Transform3D

Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.

fn (Skeleton3D) set_animate_physical_bones #

fn (s &Skeleton3D) set_animate_physical_bones(enabled bool)

fn (Skeleton3D) get_animate_physical_bones #

fn (s &Skeleton3D) get_animate_physical_bones() bool

fn (Skeleton3D) physical_bones_stop_simulation #

fn (s &Skeleton3D) physical_bones_stop_simulation()

Tells the [PhysicalBone3D] nodes in the Skeleton to stop simulating.

fn (Skeleton3D) physical_bones_start_simulation #

fn (s &Skeleton3D) physical_bones_start_simulation(cfg Skeleton3D_physical_bones_start_simulation_Cfg)

Tells the [PhysicalBone3D] nodes in the Skeleton to start simulating and reacting to the physics world. Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated.

fn (Skeleton3D) physical_bones_add_collision_exception #

fn (s &Skeleton3D) physical_bones_add_collision_exception(exception RID)

Adds a collision exception to the physical bone. Works just like the [RigidBody3D] node.

fn (Skeleton3D) physical_bones_remove_collision_exception #

fn (s &Skeleton3D) physical_bones_remove_collision_exception(exception RID)

Removes a collision exception to the physical bone. Works just like the [RigidBody3D] node.

struct Skeleton3D_physical_bones_start_simulation_Cfg #

@[params]
struct Skeleton3D_physical_bones_start_simulation_Cfg {
pub:
	bones Array
}

Optional parameters for Skeleton3D#physical_bones_start_simulation

struct Skeleton3D_set_bone_enabled_Cfg #

@[params]
struct Skeleton3D_set_bone_enabled_Cfg {
pub:
	enabled bool
}

Optional parameters for Skeleton3D#set_bone_enabled

struct Skeleton3D_set_bone_global_pose_override_Cfg #

@[params]
struct Skeleton3D_set_bone_global_pose_override_Cfg {
pub:
	persistent bool
}

Optional parameters for Skeleton3D#set_bone_global_pose_override

struct SkeletonIK3D #

struct SkeletonIK3D {
	SkeletonModifier3D
}

A node used to rotate all bones of a [Skeleton3D] bone chain a way that places the end bone at a desired 3D position.

fn (SkeletonIK3D) to_variant #

fn (s &SkeletonIK3D) to_variant() Variant

fn (SkeletonIK3D) from_variant #

fn (mut s SkeletonIK3D) from_variant(variant &Variant)

fn (SkeletonIK3D) set_root_bone #

fn (s &SkeletonIK3D) set_root_bone(root_bone string)

fn (SkeletonIK3D) get_root_bone #

fn (s &SkeletonIK3D) get_root_bone() string

fn (SkeletonIK3D) set_tip_bone #

fn (s &SkeletonIK3D) set_tip_bone(tip_bone string)

fn (SkeletonIK3D) get_tip_bone #

fn (s &SkeletonIK3D) get_tip_bone() string

fn (SkeletonIK3D) set_target_transform #

fn (s &SkeletonIK3D) set_target_transform(target Transform3D)

fn (SkeletonIK3D) get_target_transform #

fn (s &SkeletonIK3D) get_target_transform() Transform3D

fn (SkeletonIK3D) set_target_node #

fn (s &SkeletonIK3D) set_target_node(node NodePath)

fn (SkeletonIK3D) get_target_node #

fn (s &SkeletonIK3D) get_target_node() NodePath

fn (SkeletonIK3D) set_override_tip_basis #

fn (s &SkeletonIK3D) set_override_tip_basis(override bool)

fn (SkeletonIK3D) is_override_tip_basis #

fn (s &SkeletonIK3D) is_override_tip_basis() bool

fn (SkeletonIK3D) set_use_magnet #

fn (s &SkeletonIK3D) set_use_magnet(use bool)

fn (SkeletonIK3D) is_using_magnet #

fn (s &SkeletonIK3D) is_using_magnet() bool

fn (SkeletonIK3D) set_magnet_position #

fn (s &SkeletonIK3D) set_magnet_position(local_position Vector3)

fn (SkeletonIK3D) get_magnet_position #

fn (s &SkeletonIK3D) get_magnet_position() Vector3

fn (SkeletonIK3D) get_parent_skeleton #

fn (s &SkeletonIK3D) get_parent_skeleton() Skeleton3D

Returns the parent [Skeleton3D] node that was present when SkeletonIK entered the scene tree. Returns null if the parent node was not a [Skeleton3D] node when SkeletonIK3D entered the scene tree.

fn (SkeletonIK3D) is_running #

fn (s &SkeletonIK3D) is_running() bool

Returns true if SkeletonIK is applying IK effects on continues frames to the [Skeleton3D] bones. Returns false if SkeletonIK is stopped or [method start] was used with the one_time parameter set to true.

fn (SkeletonIK3D) set_min_distance #

fn (s &SkeletonIK3D) set_min_distance(min_distance f64)

fn (SkeletonIK3D) get_min_distance #

fn (s &SkeletonIK3D) get_min_distance() f64

fn (SkeletonIK3D) set_max_iterations #

fn (s &SkeletonIK3D) set_max_iterations(iterations i64)

fn (SkeletonIK3D) get_max_iterations #

fn (s &SkeletonIK3D) get_max_iterations() i64

fn (SkeletonIK3D) start #

fn (s &SkeletonIK3D) start(cfg SkeletonIK3D_start_Cfg)

Starts applying IK effects on each frame to the [Skeleton3D] bones but will only take effect starting on the next frame. If [param one_time] is true, this will take effect immediately but also reset on the next frame.

fn (SkeletonIK3D) stop #

fn (s &SkeletonIK3D) stop()

Stops applying IK effects on each frame to the [Skeleton3D] bones and also calls [method Skeleton3D.clear_bones_global_pose_override] to remove existing overrides on all bones.

fn (SkeletonIK3D) set_interpolation #

fn (s &SkeletonIK3D) set_interpolation(interpolation f64)

fn (SkeletonIK3D) get_interpolation #

fn (s &SkeletonIK3D) get_interpolation() f64

struct SkeletonIK3D_start_Cfg #

@[params]
struct SkeletonIK3D_start_Cfg {
pub:
	one_time bool
}

Optional parameters for SkeletonIK3D#start

struct SkeletonModification2D #

struct SkeletonModification2D {
	Resource
}

Base class for resources that operate on [Bone2D]s in a [Skeleton2D].

fn (SkeletonModification2D) to_variant #

fn (s &SkeletonModification2D) to_variant() Variant

fn (SkeletonModification2D) from_variant #

fn (mut s SkeletonModification2D) from_variant(variant &Variant)

fn (SkeletonModification2D) gd_execute #

fn (s &SkeletonModification2D) gd_execute(delta f64)

Executes the given modification. This is where the modification performs whatever function it is designed to do.

fn (SkeletonModification2D) gd_setup_modification #

fn (s &SkeletonModification2D) gd_setup_modification(modification_stack SkeletonModificationStack2D)

Called when the modification is setup. This is where the modification performs initialization.

fn (SkeletonModification2D) gd_draw_editor_gizmo #

fn (s &SkeletonModification2D) gd_draw_editor_gizmo()

Used for drawing [b]editor-only[/b] modification gizmos. This function will only be called in the Godot editor and can be overridden to draw custom gizmos. [b]Note:[/b] You will need to use the Skeleton2D from [method SkeletonModificationStack2D.get_skeleton] and it's draw functions, as the [SkeletonModification2D] resource cannot draw on its own.

fn (SkeletonModification2D) set_enabled #

fn (s &SkeletonModification2D) set_enabled(enabled bool)

fn (SkeletonModification2D) get_enabled #

fn (s &SkeletonModification2D) get_enabled() bool

fn (SkeletonModification2D) get_modification_stack #

fn (s &SkeletonModification2D) get_modification_stack() SkeletonModificationStack2D

Returns the [SkeletonModificationStack2D] that this modification is bound to. Through the modification stack, you can access the Skeleton2D the modification is operating on.

fn (SkeletonModification2D) set_is_setup #

fn (s &SkeletonModification2D) set_is_setup(is_setup bool)

Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack2D] the modification is bound to should handle setting the modification up.

fn (SkeletonModification2D) get_is_setup #

fn (s &SkeletonModification2D) get_is_setup() bool

Returns whether this modification has been successfully setup or not.

fn (SkeletonModification2D) set_execution_mode #

fn (s &SkeletonModification2D) set_execution_mode(execution_mode i64)

fn (SkeletonModification2D) get_execution_mode #

fn (s &SkeletonModification2D) get_execution_mode() i64

fn (SkeletonModification2D) clamp_angle #

fn (s &SkeletonModification2D) clamp_angle(angle f64, min f64, max f64, invert bool) f64

Takes an angle and clamps it so it is within the passed-in [param min] and [param max] range. [param invert] will inversely clamp the angle, clamping it to the range outside of the given bounds.

fn (SkeletonModification2D) set_editor_draw_gizmo #

fn (s &SkeletonModification2D) set_editor_draw_gizmo(draw_gizmo bool)

Sets whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.

fn (SkeletonModification2D) get_editor_draw_gizmo #

fn (s &SkeletonModification2D) get_editor_draw_gizmo() bool

Returns whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.

struct SkeletonModification2DCCDIK #

struct SkeletonModification2DCCDIK {
	SkeletonModification2D
}

A modification that uses CCDIK to manipulate a series of bones to reach a target in 2D.

fn (SkeletonModification2DCCDIK) to_variant #

fn (s &SkeletonModification2DCCDIK) to_variant() Variant

fn (SkeletonModification2DCCDIK) from_variant #

fn (mut s SkeletonModification2DCCDIK) from_variant(variant &Variant)

fn (SkeletonModification2DCCDIK) set_target_node #

fn (s &SkeletonModification2DCCDIK) set_target_node(target_nodepath NodePath)

fn (SkeletonModification2DCCDIK) get_target_node #

fn (s &SkeletonModification2DCCDIK) get_target_node() NodePath

fn (SkeletonModification2DCCDIK) set_tip_node #

fn (s &SkeletonModification2DCCDIK) set_tip_node(tip_nodepath NodePath)

fn (SkeletonModification2DCCDIK) get_tip_node #

fn (s &SkeletonModification2DCCDIK) get_tip_node() NodePath

fn (SkeletonModification2DCCDIK) set_ccdik_data_chain_length #

fn (s &SkeletonModification2DCCDIK) set_ccdik_data_chain_length(length i64)

fn (SkeletonModification2DCCDIK) get_ccdik_data_chain_length #

fn (s &SkeletonModification2DCCDIK) get_ccdik_data_chain_length() i64

fn (SkeletonModification2DCCDIK) set_ccdik_joint_bone2d_node #

fn (s &SkeletonModification2DCCDIK) set_ccdik_joint_bone2d_node(joint_idx i64, bone2d_nodepath NodePath)

Sets the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].

fn (SkeletonModification2DCCDIK) get_ccdik_joint_bone2d_node #

fn (s &SkeletonModification2DCCDIK) get_ccdik_joint_bone2d_node(joint_idx i64) NodePath

Returns the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].

fn (SkeletonModification2DCCDIK) set_ccdik_joint_bone_index #

fn (s &SkeletonModification2DCCDIK) set_ccdik_joint_bone_index(joint_idx i64, bone_idx i64)

Sets the bone index, [param bone_idx], of the CCDIK joint at [param joint_idx]. When possible, this will also update the bone2d_node of the CCDIK joint based on data provided by the linked skeleton.

fn (SkeletonModification2DCCDIK) get_ccdik_joint_bone_index #

fn (s &SkeletonModification2DCCDIK) get_ccdik_joint_bone_index(joint_idx i64) i64

Returns the index of the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].

fn (SkeletonModification2DCCDIK) set_ccdik_joint_rotate_from_joint #

fn (s &SkeletonModification2DCCDIK) set_ccdik_joint_rotate_from_joint(joint_idx i64, rotate_from_joint bool)

Sets whether the joint at [param joint_idx] is set to rotate from the joint, true, or to rotate from the tip, false.

fn (SkeletonModification2DCCDIK) get_ccdik_joint_rotate_from_joint #

fn (s &SkeletonModification2DCCDIK) get_ccdik_joint_rotate_from_joint(joint_idx i64) bool

Returns whether the joint at [param joint_idx] is set to rotate from the joint, true, or to rotate from the tip, false. The default is to rotate from the tip.

fn (SkeletonModification2DCCDIK) set_ccdik_joint_enable_constraint #

fn (s &SkeletonModification2DCCDIK) set_ccdik_joint_enable_constraint(joint_idx i64, enable_constraint bool)

Determines whether angle constraints on the CCDIK joint at [param joint_idx] are enabled. When true, constraints will be enabled and taken into account when solving.

fn (SkeletonModification2DCCDIK) get_ccdik_joint_enable_constraint #

fn (s &SkeletonModification2DCCDIK) get_ccdik_joint_enable_constraint(joint_idx i64) bool

Returns whether angle constraints on the CCDIK joint at [param joint_idx] are enabled.

fn (SkeletonModification2DCCDIK) set_ccdik_joint_constraint_angle_min #

fn (s &SkeletonModification2DCCDIK) set_ccdik_joint_constraint_angle_min(joint_idx i64, angle_min f64)

Sets the minimum angle constraint for the joint at [param joint_idx].

fn (SkeletonModification2DCCDIK) get_ccdik_joint_constraint_angle_min #

fn (s &SkeletonModification2DCCDIK) get_ccdik_joint_constraint_angle_min(joint_idx i64) f64

Returns the minimum angle constraint for the joint at [param joint_idx].

fn (SkeletonModification2DCCDIK) set_ccdik_joint_constraint_angle_max #

fn (s &SkeletonModification2DCCDIK) set_ccdik_joint_constraint_angle_max(joint_idx i64, angle_max f64)

Sets the maximum angle constraint for the joint at [param joint_idx].

fn (SkeletonModification2DCCDIK) get_ccdik_joint_constraint_angle_max #

fn (s &SkeletonModification2DCCDIK) get_ccdik_joint_constraint_angle_max(joint_idx i64) f64

Returns the maximum angle constraint for the joint at [param joint_idx].

fn (SkeletonModification2DCCDIK) set_ccdik_joint_constraint_angle_invert #

fn (s &SkeletonModification2DCCDIK) set_ccdik_joint_constraint_angle_invert(joint_idx i64, invert bool)

Sets whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.

fn (SkeletonModification2DCCDIK) get_ccdik_joint_constraint_angle_invert #

fn (s &SkeletonModification2DCCDIK) get_ccdik_joint_constraint_angle_invert(joint_idx i64) bool

Returns whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_angle_invert] for details.

struct SkeletonModification2DFABRIK #

struct SkeletonModification2DFABRIK {
	SkeletonModification2D
}

A modification that uses FABRIK to manipulate a series of [Bone2D] nodes to reach a target.

fn (SkeletonModification2DFABRIK) to_variant #

fn (s &SkeletonModification2DFABRIK) to_variant() Variant

fn (SkeletonModification2DFABRIK) from_variant #

fn (mut s SkeletonModification2DFABRIK) from_variant(variant &Variant)

fn (SkeletonModification2DFABRIK) set_target_node #

fn (s &SkeletonModification2DFABRIK) set_target_node(target_nodepath NodePath)

fn (SkeletonModification2DFABRIK) get_target_node #

fn (s &SkeletonModification2DFABRIK) get_target_node() NodePath

fn (SkeletonModification2DFABRIK) set_fabrik_data_chain_length #

fn (s &SkeletonModification2DFABRIK) set_fabrik_data_chain_length(length i64)

fn (SkeletonModification2DFABRIK) get_fabrik_data_chain_length #

fn (s &SkeletonModification2DFABRIK) get_fabrik_data_chain_length() i64

fn (SkeletonModification2DFABRIK) set_fabrik_joint_bone2d_node #

fn (s &SkeletonModification2DFABRIK) set_fabrik_joint_bone2d_node(joint_idx i64, bone2d_nodepath NodePath)

Sets the [Bone2D] node assigned to the FABRIK joint at [param joint_idx].

fn (SkeletonModification2DFABRIK) get_fabrik_joint_bone2d_node #

fn (s &SkeletonModification2DFABRIK) get_fabrik_joint_bone2d_node(joint_idx i64) NodePath

Returns the [Bone2D] node assigned to the FABRIK joint at [param joint_idx].

fn (SkeletonModification2DFABRIK) set_fabrik_joint_bone_index #

fn (s &SkeletonModification2DFABRIK) set_fabrik_joint_bone_index(joint_idx i64, bone_idx i64)

Sets the bone index, [param bone_idx], of the FABRIK joint at [param joint_idx]. When possible, this will also update the bone2d_node of the FABRIK joint based on data provided by the linked skeleton.

fn (SkeletonModification2DFABRIK) get_fabrik_joint_bone_index #

fn (s &SkeletonModification2DFABRIK) get_fabrik_joint_bone_index(joint_idx i64) i64

Returns the index of the [Bone2D] node assigned to the FABRIK joint at [param joint_idx].

fn (SkeletonModification2DFABRIK) set_fabrik_joint_magnet_position #

fn (s &SkeletonModification2DFABRIK) set_fabrik_joint_magnet_position(joint_idx i64, magnet_position Vector2)

Sets the magnet position vector for the joint at [param joint_idx].

fn (SkeletonModification2DFABRIK) get_fabrik_joint_magnet_position #

fn (s &SkeletonModification2DFABRIK) get_fabrik_joint_magnet_position(joint_idx i64) Vector2

Returns the magnet position vector for the joint at [param joint_idx].

fn (SkeletonModification2DFABRIK) set_fabrik_joint_use_target_rotation #

fn (s &SkeletonModification2DFABRIK) set_fabrik_joint_use_target_rotation(joint_idx i64, use_target_rotation bool)

Sets whether the joint at [param joint_idx] will use the target node's rotation rather than letting FABRIK rotate the node. [b]Note:[/b] This option only works for the tip/final joint in the chain. For all other nodes, this option will be ignored.

fn (SkeletonModification2DFABRIK) get_fabrik_joint_use_target_rotation #

fn (s &SkeletonModification2DFABRIK) get_fabrik_joint_use_target_rotation(joint_idx i64) bool

Returns whether the joint is using the target's rotation rather than allowing FABRIK to rotate the joint. This option only applies to the tip/final joint in the chain.

struct SkeletonModification2DJiggle #

struct SkeletonModification2DJiggle {
	SkeletonModification2D
}

A modification that jiggles [Bone2D] nodes as they move towards a target.

fn (SkeletonModification2DJiggle) to_variant #

fn (s &SkeletonModification2DJiggle) to_variant() Variant

fn (SkeletonModification2DJiggle) from_variant #

fn (mut s SkeletonModification2DJiggle) from_variant(variant &Variant)

fn (SkeletonModification2DJiggle) set_target_node #

fn (s &SkeletonModification2DJiggle) set_target_node(target_nodepath NodePath)

fn (SkeletonModification2DJiggle) get_target_node #

fn (s &SkeletonModification2DJiggle) get_target_node() NodePath

fn (SkeletonModification2DJiggle) set_jiggle_data_chain_length #

fn (s &SkeletonModification2DJiggle) set_jiggle_data_chain_length(length i64)

fn (SkeletonModification2DJiggle) get_jiggle_data_chain_length #

fn (s &SkeletonModification2DJiggle) get_jiggle_data_chain_length() i64

fn (SkeletonModification2DJiggle) set_stiffness #

fn (s &SkeletonModification2DJiggle) set_stiffness(stiffness f64)

fn (SkeletonModification2DJiggle) get_stiffness #

fn (s &SkeletonModification2DJiggle) get_stiffness() f64

fn (SkeletonModification2DJiggle) set_mass #

fn (s &SkeletonModification2DJiggle) set_mass(mass f64)

fn (SkeletonModification2DJiggle) get_mass #

fn (s &SkeletonModification2DJiggle) get_mass() f64

fn (SkeletonModification2DJiggle) set_damping #

fn (s &SkeletonModification2DJiggle) set_damping(damping f64)

fn (SkeletonModification2DJiggle) get_damping #

fn (s &SkeletonModification2DJiggle) get_damping() f64

fn (SkeletonModification2DJiggle) set_use_gravity #

fn (s &SkeletonModification2DJiggle) set_use_gravity(use_gravity bool)

fn (SkeletonModification2DJiggle) get_use_gravity #

fn (s &SkeletonModification2DJiggle) get_use_gravity() bool

fn (SkeletonModification2DJiggle) set_gravity #

fn (s &SkeletonModification2DJiggle) set_gravity(gravity Vector2)

fn (SkeletonModification2DJiggle) get_gravity #

fn (s &SkeletonModification2DJiggle) get_gravity() Vector2

fn (SkeletonModification2DJiggle) set_use_colliders #

fn (s &SkeletonModification2DJiggle) set_use_colliders(use_colliders bool)

If true, the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects.

fn (SkeletonModification2DJiggle) get_use_colliders #

fn (s &SkeletonModification2DJiggle) get_use_colliders() bool

Returns whether the jiggle modifier is taking physics colliders into account when solving.

fn (SkeletonModification2DJiggle) set_collision_mask #

fn (s &SkeletonModification2DJiggle) set_collision_mask(collision_mask i64)

Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account.

fn (SkeletonModification2DJiggle) get_collision_mask #

fn (s &SkeletonModification2DJiggle) get_collision_mask() i64

Returns the collision mask used by the Jiggle modifier when collisions are enabled.

fn (SkeletonModification2DJiggle) set_jiggle_joint_bone2d_node #

fn (s &SkeletonModification2DJiggle) set_jiggle_joint_bone2d_node(joint_idx i64, bone2d_node NodePath)

Sets the [Bone2D] node assigned to the Jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) get_jiggle_joint_bone2d_node #

fn (s &SkeletonModification2DJiggle) get_jiggle_joint_bone2d_node(joint_idx i64) NodePath

Returns the [Bone2D] node assigned to the Jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) set_jiggle_joint_bone_index #

fn (s &SkeletonModification2DJiggle) set_jiggle_joint_bone_index(joint_idx i64, bone_idx i64)

Sets the bone index, [param bone_idx], of the Jiggle joint at [param joint_idx]. When possible, this will also update the bone2d_node of the Jiggle joint based on data provided by the linked skeleton.

fn (SkeletonModification2DJiggle) get_jiggle_joint_bone_index #

fn (s &SkeletonModification2DJiggle) get_jiggle_joint_bone_index(joint_idx i64) i64

Returns the index of the [Bone2D] node assigned to the Jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) set_jiggle_joint_override #

fn (s &SkeletonModification2DJiggle) set_jiggle_joint_override(joint_idx i64, override bool)

Sets whether the Jiggle joint at [param joint_idx] should override the default Jiggle joint settings. Setting this to true will make the joint use its own settings rather than the default ones attached to the modification.

fn (SkeletonModification2DJiggle) get_jiggle_joint_override #

fn (s &SkeletonModification2DJiggle) get_jiggle_joint_override(joint_idx i64) bool

Returns a boolean that indicates whether the joint at [param joint_idx] is overriding the default Jiggle joint data defined in the modification.

fn (SkeletonModification2DJiggle) set_jiggle_joint_stiffness #

fn (s &SkeletonModification2DJiggle) set_jiggle_joint_stiffness(joint_idx i64, stiffness f64)

Sets the of stiffness of the Jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) get_jiggle_joint_stiffness #

fn (s &SkeletonModification2DJiggle) get_jiggle_joint_stiffness(joint_idx i64) f64

Returns the stiffness of the Jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) set_jiggle_joint_mass #

fn (s &SkeletonModification2DJiggle) set_jiggle_joint_mass(joint_idx i64, mass f64)

Sets the of mass of the Jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) get_jiggle_joint_mass #

fn (s &SkeletonModification2DJiggle) get_jiggle_joint_mass(joint_idx i64) f64

Returns the amount of mass of the jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) set_jiggle_joint_damping #

fn (s &SkeletonModification2DJiggle) set_jiggle_joint_damping(joint_idx i64, damping f64)

Sets the amount of damping of the Jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) get_jiggle_joint_damping #

fn (s &SkeletonModification2DJiggle) get_jiggle_joint_damping(joint_idx i64) f64

Returns the amount of damping of the Jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) set_jiggle_joint_use_gravity #

fn (s &SkeletonModification2DJiggle) set_jiggle_joint_use_gravity(joint_idx i64, use_gravity bool)

Sets whether the Jiggle joint at [param joint_idx] should use gravity.

fn (SkeletonModification2DJiggle) get_jiggle_joint_use_gravity #

fn (s &SkeletonModification2DJiggle) get_jiggle_joint_use_gravity(joint_idx i64) bool

Returns a boolean that indicates whether the joint at [param joint_idx] is using gravity or not.

fn (SkeletonModification2DJiggle) set_jiggle_joint_gravity #

fn (s &SkeletonModification2DJiggle) set_jiggle_joint_gravity(joint_idx i64, gravity Vector2)

Sets the gravity vector of the Jiggle joint at [param joint_idx].

fn (SkeletonModification2DJiggle) get_jiggle_joint_gravity #

fn (s &SkeletonModification2DJiggle) get_jiggle_joint_gravity(joint_idx i64) Vector2

Returns a [Vector2] representing the amount of gravity the Jiggle joint at [param joint_idx] is influenced by.

struct SkeletonModification2DLookAt #

struct SkeletonModification2DLookAt {
	SkeletonModification2D
}

A modification that rotates a [Bone2D] node to look at a target.

fn (SkeletonModification2DLookAt) to_variant #

fn (s &SkeletonModification2DLookAt) to_variant() Variant

fn (SkeletonModification2DLookAt) from_variant #

fn (mut s SkeletonModification2DLookAt) from_variant(variant &Variant)

fn (SkeletonModification2DLookAt) set_bone2d_node #

fn (s &SkeletonModification2DLookAt) set_bone2d_node(bone2d_nodepath NodePath)

fn (SkeletonModification2DLookAt) get_bone2d_node #

fn (s &SkeletonModification2DLookAt) get_bone2d_node() NodePath

fn (SkeletonModification2DLookAt) set_bone_index #

fn (s &SkeletonModification2DLookAt) set_bone_index(bone_idx i64)

fn (SkeletonModification2DLookAt) get_bone_index #

fn (s &SkeletonModification2DLookAt) get_bone_index() i64

fn (SkeletonModification2DLookAt) set_target_node #

fn (s &SkeletonModification2DLookAt) set_target_node(target_nodepath NodePath)

fn (SkeletonModification2DLookAt) get_target_node #

fn (s &SkeletonModification2DLookAt) get_target_node() NodePath

fn (SkeletonModification2DLookAt) set_additional_rotation #

fn (s &SkeletonModification2DLookAt) set_additional_rotation(rotation f64)

Sets the amount of additional rotation that is to be applied after executing the modification. This allows for offsetting the results by the inputted rotation amount.

fn (SkeletonModification2DLookAt) get_additional_rotation #

fn (s &SkeletonModification2DLookAt) get_additional_rotation() f64

Returns the amount of additional rotation that is applied after the LookAt modification executes.

fn (SkeletonModification2DLookAt) set_enable_constraint #

fn (s &SkeletonModification2DLookAt) set_enable_constraint(enable_constraint bool)

Sets whether this modification will use constraints or not. When true, constraints will be applied when solving the LookAt modification.

fn (SkeletonModification2DLookAt) get_enable_constraint #

fn (s &SkeletonModification2DLookAt) get_enable_constraint() bool

Returns true if the LookAt modification is using constraints.

fn (SkeletonModification2DLookAt) set_constraint_angle_min #

fn (s &SkeletonModification2DLookAt) set_constraint_angle_min(angle_min f64)

Sets the constraint's minimum allowed angle.

fn (SkeletonModification2DLookAt) get_constraint_angle_min #

fn (s &SkeletonModification2DLookAt) get_constraint_angle_min() f64

Returns the constraint's minimum allowed angle.

fn (SkeletonModification2DLookAt) set_constraint_angle_max #

fn (s &SkeletonModification2DLookAt) set_constraint_angle_max(angle_max f64)

Sets the constraint's maximum allowed angle.

fn (SkeletonModification2DLookAt) get_constraint_angle_max #

fn (s &SkeletonModification2DLookAt) get_constraint_angle_max() f64

Returns the constraint's maximum allowed angle.

fn (SkeletonModification2DLookAt) set_constraint_angle_invert #

fn (s &SkeletonModification2DLookAt) set_constraint_angle_invert(invert bool)

When true, the modification will use an inverted joint constraint. An inverted joint constraint only constraints the [Bone2D] to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.

fn (SkeletonModification2DLookAt) get_constraint_angle_invert #

fn (s &SkeletonModification2DLookAt) get_constraint_angle_invert() bool

Returns whether the constraints to this modification are inverted or not.

struct SkeletonModification2DPhysicalBones #

struct SkeletonModification2DPhysicalBones {
	SkeletonModification2D
}

A modification that applies the transforms of [PhysicalBone2D] nodes to [Bone2D] nodes.

fn (SkeletonModification2DPhysicalBones) to_variant #

fn (s &SkeletonModification2DPhysicalBones) to_variant() Variant

fn (SkeletonModification2DPhysicalBones) from_variant #

fn (mut s SkeletonModification2DPhysicalBones) from_variant(variant &Variant)

fn (SkeletonModification2DPhysicalBones) set_physical_bone_chain_length #

fn (s &SkeletonModification2DPhysicalBones) set_physical_bone_chain_length(length i64)

fn (SkeletonModification2DPhysicalBones) get_physical_bone_chain_length #

fn (s &SkeletonModification2DPhysicalBones) get_physical_bone_chain_length() i64

fn (SkeletonModification2DPhysicalBones) set_physical_bone_node #

fn (s &SkeletonModification2DPhysicalBones) set_physical_bone_node(joint_idx i64, physicalbone2d_node NodePath)

Sets the [PhysicalBone2D] node at [param joint_idx]. [b]Note:[/b] This is just the index used for this modification, not the bone index used in the [Skeleton2D].

fn (SkeletonModification2DPhysicalBones) get_physical_bone_node #

fn (s &SkeletonModification2DPhysicalBones) get_physical_bone_node(joint_idx i64) NodePath

Returns the [PhysicalBone2D] node at [param joint_idx].

fn (SkeletonModification2DPhysicalBones) fetch_physical_bones #

fn (s &SkeletonModification2DPhysicalBones) fetch_physical_bones()

Empties the list of [PhysicalBone2D] nodes and populates it with all [PhysicalBone2D] nodes that are children of the [Skeleton2D].

fn (SkeletonModification2DPhysicalBones) start_simulation #

fn (s &SkeletonModification2DPhysicalBones) start_simulation(cfg SkeletonModification2DPhysicalBones_start_simulation_Cfg)

Tell the [PhysicalBone2D] nodes to start simulating and interacting with the physics world. Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to start simulating.

fn (SkeletonModification2DPhysicalBones) stop_simulation #

fn (s &SkeletonModification2DPhysicalBones) stop_simulation(cfg SkeletonModification2DPhysicalBones_stop_simulation_Cfg)

Tell the [PhysicalBone2D] nodes to stop simulating and interacting with the physics world. Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to stop simulating.

struct SkeletonModification2DPhysicalBones_start_simulation_Cfg #

@[params]
struct SkeletonModification2DPhysicalBones_start_simulation_Cfg {
pub:
	bones Array
}

Optional parameters for SkeletonModification2DPhysicalBones#start_simulation

struct SkeletonModification2DPhysicalBones_stop_simulation_Cfg #

@[params]
struct SkeletonModification2DPhysicalBones_stop_simulation_Cfg {
pub:
	bones Array
}

Optional parameters for SkeletonModification2DPhysicalBones#stop_simulation

struct SkeletonModification2DStackHolder #

struct SkeletonModification2DStackHolder {
	SkeletonModification2D
}

A modification that holds and executes a [SkeletonModificationStack2D].

fn (SkeletonModification2DStackHolder) to_variant #

fn (s &SkeletonModification2DStackHolder) to_variant() Variant

fn (SkeletonModification2DStackHolder) from_variant #

fn (mut s SkeletonModification2DStackHolder) from_variant(variant &Variant)

fn (SkeletonModification2DStackHolder) set_held_modification_stack #

fn (s &SkeletonModification2DStackHolder) set_held_modification_stack(held_modification_stack SkeletonModificationStack2D)

Sets the [SkeletonModificationStack2D] that this modification is holding. This modification stack will then be executed when this modification is executed.

fn (SkeletonModification2DStackHolder) get_held_modification_stack #

fn (s &SkeletonModification2DStackHolder) get_held_modification_stack() SkeletonModificationStack2D

Returns the [SkeletonModificationStack2D] that this modification is holding.

struct SkeletonModification2DTwoBoneIK #

struct SkeletonModification2DTwoBoneIK {
	SkeletonModification2D
}

A modification that rotates two bones using the law of cosines to reach the target.

fn (SkeletonModification2DTwoBoneIK) to_variant #

fn (s &SkeletonModification2DTwoBoneIK) to_variant() Variant

fn (SkeletonModification2DTwoBoneIK) from_variant #

fn (mut s SkeletonModification2DTwoBoneIK) from_variant(variant &Variant)

fn (SkeletonModification2DTwoBoneIK) set_target_node #

fn (s &SkeletonModification2DTwoBoneIK) set_target_node(target_nodepath NodePath)

fn (SkeletonModification2DTwoBoneIK) get_target_node #

fn (s &SkeletonModification2DTwoBoneIK) get_target_node() NodePath

fn (SkeletonModification2DTwoBoneIK) set_target_minimum_distance #

fn (s &SkeletonModification2DTwoBoneIK) set_target_minimum_distance(minimum_distance f64)

fn (SkeletonModification2DTwoBoneIK) get_target_minimum_distance #

fn (s &SkeletonModification2DTwoBoneIK) get_target_minimum_distance() f64

fn (SkeletonModification2DTwoBoneIK) set_target_maximum_distance #

fn (s &SkeletonModification2DTwoBoneIK) set_target_maximum_distance(maximum_distance f64)

fn (SkeletonModification2DTwoBoneIK) get_target_maximum_distance #

fn (s &SkeletonModification2DTwoBoneIK) get_target_maximum_distance() f64

fn (SkeletonModification2DTwoBoneIK) set_flip_bend_direction #

fn (s &SkeletonModification2DTwoBoneIK) set_flip_bend_direction(flip_direction bool)

fn (SkeletonModification2DTwoBoneIK) get_flip_bend_direction #

fn (s &SkeletonModification2DTwoBoneIK) get_flip_bend_direction() bool

fn (SkeletonModification2DTwoBoneIK) set_joint_one_bone2d_node #

fn (s &SkeletonModification2DTwoBoneIK) set_joint_one_bone2d_node(bone2d_node NodePath)

Sets the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.

fn (SkeletonModification2DTwoBoneIK) get_joint_one_bone2d_node #

fn (s &SkeletonModification2DTwoBoneIK) get_joint_one_bone2d_node() NodePath

Returns the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.

fn (SkeletonModification2DTwoBoneIK) set_joint_one_bone_idx #

fn (s &SkeletonModification2DTwoBoneIK) set_joint_one_bone_idx(bone_idx i64)

Sets the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.

fn (SkeletonModification2DTwoBoneIK) get_joint_one_bone_idx #

fn (s &SkeletonModification2DTwoBoneIK) get_joint_one_bone_idx() i64

Returns the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.

fn (SkeletonModification2DTwoBoneIK) set_joint_two_bone2d_node #

fn (s &SkeletonModification2DTwoBoneIK) set_joint_two_bone2d_node(bone2d_node NodePath)

Sets the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.

fn (SkeletonModification2DTwoBoneIK) get_joint_two_bone2d_node #

fn (s &SkeletonModification2DTwoBoneIK) get_joint_two_bone2d_node() NodePath

Returns the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.

fn (SkeletonModification2DTwoBoneIK) set_joint_two_bone_idx #

fn (s &SkeletonModification2DTwoBoneIK) set_joint_two_bone_idx(bone_idx i64)

Sets the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.

fn (SkeletonModification2DTwoBoneIK) get_joint_two_bone_idx #

fn (s &SkeletonModification2DTwoBoneIK) get_joint_two_bone_idx() i64

Returns the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.

struct SkeletonModificationStack2D #

struct SkeletonModificationStack2D {
	Resource
}

A resource that holds a stack of [SkeletonModification2D]s.

fn (SkeletonModificationStack2D) to_variant #

fn (s &SkeletonModificationStack2D) to_variant() Variant

fn (SkeletonModificationStack2D) from_variant #

fn (mut s SkeletonModificationStack2D) from_variant(variant &Variant)

fn (SkeletonModificationStack2D) setup #

fn (s &SkeletonModificationStack2D) setup()

Sets up the modification stack so it can execute. This function should be called by [Skeleton2D] and shouldn't be manually called unless you know what you are doing.

fn (SkeletonModificationStack2D) execute #

fn (s &SkeletonModificationStack2D) execute(delta f64, execution_mode i64)

Executes all of the [SkeletonModification2D]s in the stack that use the same execution mode as the passed-in [param execution_mode], starting from index 0 to [member modification_count]. [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results.

fn (SkeletonModificationStack2D) enable_all_modifications #

fn (s &SkeletonModificationStack2D) enable_all_modifications(enabled bool)

Enables all [SkeletonModification2D]s in the stack.

fn (SkeletonModificationStack2D) get_modification #

fn (s &SkeletonModificationStack2D) get_modification(mod_idx i64) SkeletonModification2D

Returns the [SkeletonModification2D] at the passed-in index, [param mod_idx].

fn (SkeletonModificationStack2D) add_modification #

fn (s &SkeletonModificationStack2D) add_modification(modification SkeletonModification2D)

Adds the passed-in [SkeletonModification2D] to the stack.

fn (SkeletonModificationStack2D) delete_modification #

fn (s &SkeletonModificationStack2D) delete_modification(mod_idx i64)

Deletes the [SkeletonModification2D] at the index position [param mod_idx], if it exists.

fn (SkeletonModificationStack2D) set_modification #

fn (s &SkeletonModificationStack2D) set_modification(mod_idx i64, modification SkeletonModification2D)

Sets the modification at [param mod_idx] to the passed-in modification, [param modification].

fn (SkeletonModificationStack2D) set_modification_count #

fn (s &SkeletonModificationStack2D) set_modification_count(count i64)

fn (SkeletonModificationStack2D) get_modification_count #

fn (s &SkeletonModificationStack2D) get_modification_count() i64

fn (SkeletonModificationStack2D) get_is_setup #

fn (s &SkeletonModificationStack2D) get_is_setup() bool

Returns a boolean that indicates whether the modification stack is setup and can execute.

fn (SkeletonModificationStack2D) set_enabled #

fn (s &SkeletonModificationStack2D) set_enabled(enabled bool)

fn (SkeletonModificationStack2D) get_enabled #

fn (s &SkeletonModificationStack2D) get_enabled() bool

fn (SkeletonModificationStack2D) set_strength #

fn (s &SkeletonModificationStack2D) set_strength(strength f64)

fn (SkeletonModificationStack2D) get_strength #

fn (s &SkeletonModificationStack2D) get_strength() f64

fn (SkeletonModificationStack2D) get_skeleton #

fn (s &SkeletonModificationStack2D) get_skeleton() Skeleton2D

Returns the [Skeleton2D] node that the SkeletonModificationStack2D is bound to.

struct SkeletonModifier3D #

struct SkeletonModifier3D {
	Node3D
}

A node that may modify a Skeleton3D's bones.

fn (SkeletonModifier3D) to_variant #

fn (s &SkeletonModifier3D) to_variant() Variant

fn (SkeletonModifier3D) from_variant #

fn (mut s SkeletonModifier3D) from_variant(variant &Variant)

fn (SkeletonModifier3D) gd_process_modification_with_delta #

fn (s &SkeletonModifier3D) gd_process_modification_with_delta(delta f64)

Override this virtual method to implement a custom skeleton modifier. You should do things like get the [Skeleton3D]'s current pose and apply the pose here. [method _process_modification_with_delta] must not apply [member influence] to bone poses because the [Skeleton3D] automatically applies influence to all bone poses set by the modifier. [param delta] is passed from parent [Skeleton3D]. See also [method Skeleton3D.advance].

fn (SkeletonModifier3D) gd_process_modification #

fn (s &SkeletonModifier3D) gd_process_modification()

Override this virtual method to implement a custom skeleton modifier. You should do things like get the [Skeleton3D]'s current pose and apply the pose here. [method _process_modification] must not apply [member influence] to bone poses because the [Skeleton3D] automatically applies influence to all bone poses set by the modifier.

fn (SkeletonModifier3D) gd_skeleton_changed #

fn (s &SkeletonModifier3D) gd_skeleton_changed(old_skeleton Skeleton3D, new_skeleton Skeleton3D)

Called when the skeleton is changed.

fn (SkeletonModifier3D) gd_validate_bone_names #

fn (s &SkeletonModifier3D) gd_validate_bone_names()

Called when bone name and index need to be validated such as the timing of the entering tree or changing skeleton.

fn (SkeletonModifier3D) get_skeleton #

fn (s &SkeletonModifier3D) get_skeleton() Skeleton3D

Get parent [Skeleton3D] node if found.

fn (SkeletonModifier3D) set_active #

fn (s &SkeletonModifier3D) set_active(active bool)

fn (SkeletonModifier3D) is_active #

fn (s &SkeletonModifier3D) is_active() bool

fn (SkeletonModifier3D) set_influence #

fn (s &SkeletonModifier3D) set_influence(influence f64)

fn (SkeletonModifier3D) get_influence #

fn (s &SkeletonModifier3D) get_influence() f64

struct SkeletonProfile #

struct SkeletonProfile {
	Resource
}

Base class for a profile of a virtual skeleton used as a target for retargeting.

fn (SkeletonProfile) to_variant #

fn (s &SkeletonProfile) to_variant() Variant

fn (SkeletonProfile) from_variant #

fn (mut s SkeletonProfile) from_variant(variant &Variant)

fn (SkeletonProfile) set_root_bone #

fn (s &SkeletonProfile) set_root_bone(bone_name string)

fn (SkeletonProfile) get_root_bone #

fn (s &SkeletonProfile) get_root_bone() string

fn (SkeletonProfile) set_scale_base_bone #

fn (s &SkeletonProfile) set_scale_base_bone(bone_name string)

fn (SkeletonProfile) get_scale_base_bone #

fn (s &SkeletonProfile) get_scale_base_bone() string

fn (SkeletonProfile) set_group_size #

fn (s &SkeletonProfile) set_group_size(size i64)

fn (SkeletonProfile) get_group_size #

fn (s &SkeletonProfile) get_group_size() i64

fn (SkeletonProfile) get_group_name #

fn (s &SkeletonProfile) get_group_name(group_idx i64) string

Returns the name of the group at [param group_idx] that will be the drawing group in the [BoneMap] editor.

fn (SkeletonProfile) set_group_name #

fn (s &SkeletonProfile) set_group_name(group_idx i64, group_name string)

Sets the name of the group at [param group_idx] that will be the drawing group in the [BoneMap] editor.

fn (SkeletonProfile) get_texture #

fn (s &SkeletonProfile) get_texture(group_idx i64) Texture2D

Returns the texture of the group at [param group_idx] that will be the drawing group background image in the [BoneMap] editor.

fn (SkeletonProfile) set_texture #

fn (s &SkeletonProfile) set_texture(group_idx i64, texture Texture2D)

Sets the texture of the group at [param group_idx] that will be the drawing group background image in the [BoneMap] editor.

fn (SkeletonProfile) set_bone_size #

fn (s &SkeletonProfile) set_bone_size(size i64)

fn (SkeletonProfile) get_bone_size #

fn (s &SkeletonProfile) get_bone_size() i64

fn (SkeletonProfile) find_bone #

fn (s &SkeletonProfile) find_bone(bone_name string) i64

Returns the bone index that matches [param bone_name] as its name.

fn (SkeletonProfile) get_bone_name #

fn (s &SkeletonProfile) get_bone_name(bone_idx i64) string

Returns the name of the bone at [param bone_idx] that will be the key name in the [BoneMap]. In the retargeting process, the returned bone name is the bone name of the target skeleton.

fn (SkeletonProfile) set_bone_name #

fn (s &SkeletonProfile) set_bone_name(bone_idx i64, bone_name string)

Sets the name of the bone at [param bone_idx] that will be the key name in the [BoneMap]. In the retargeting process, the setting bone name is the bone name of the target skeleton.

fn (SkeletonProfile) get_bone_parent #

fn (s &SkeletonProfile) get_bone_parent(bone_idx i64) string

Returns the name of the bone which is the parent to the bone at [param bone_idx]. The result is empty if the bone has no parent.

fn (SkeletonProfile) set_bone_parent #

fn (s &SkeletonProfile) set_bone_parent(bone_idx i64, bone_parent string)

Sets the bone with name [param bone_parent] as the parent of the bone at [param bone_idx]. If an empty string is passed, then the bone has no parent.

fn (SkeletonProfile) get_tail_direction #

fn (s &SkeletonProfile) get_tail_direction(bone_idx i64) SkeletonProfileTailDirection

Returns the tail direction of the bone at [param bone_idx].

fn (SkeletonProfile) set_tail_direction #

fn (s &SkeletonProfile) set_tail_direction(bone_idx i64, tail_direction SkeletonProfileTailDirection)

Sets the tail direction of the bone at [param bone_idx]. [b]Note:[/b] This only specifies the method of calculation. The actual coordinates required should be stored in an external skeleton, so the calculation itself needs to be done externally.

fn (SkeletonProfile) get_bone_tail #

fn (s &SkeletonProfile) get_bone_tail(bone_idx i64) string

Returns the name of the bone which is the tail of the bone at [param bone_idx].

fn (SkeletonProfile) set_bone_tail #

fn (s &SkeletonProfile) set_bone_tail(bone_idx i64, bone_tail string)

Sets the bone with name [param bone_tail] as the tail of the bone at [param bone_idx].

fn (SkeletonProfile) get_reference_pose #

fn (s &SkeletonProfile) get_reference_pose(bone_idx i64) Transform3D

Returns the reference pose transform for bone [param bone_idx].

fn (SkeletonProfile) set_reference_pose #

fn (s &SkeletonProfile) set_reference_pose(bone_idx i64, bone_name Transform3D)

Sets the reference pose transform for bone [param bone_idx].

fn (SkeletonProfile) get_handle_offset #

fn (s &SkeletonProfile) get_handle_offset(bone_idx i64) Vector2

Returns the offset of the bone at [param bone_idx] that will be the button position in the [BoneMap] editor. This is the offset with origin at the top left corner of the square.

fn (SkeletonProfile) set_handle_offset #

fn (s &SkeletonProfile) set_handle_offset(bone_idx i64, handle_offset Vector2)

Sets the offset of the bone at [param bone_idx] that will be the button position in the [BoneMap] editor. This is the offset with origin at the top left corner of the square.

fn (SkeletonProfile) get_group #

fn (s &SkeletonProfile) get_group(bone_idx i64) string

Returns the group of the bone at [param bone_idx].

fn (SkeletonProfile) set_group #

fn (s &SkeletonProfile) set_group(bone_idx i64, group string)

Sets the group of the bone at [param bone_idx].

fn (SkeletonProfile) is_required #

fn (s &SkeletonProfile) is_required(bone_idx i64) bool

Returns whether the bone at [param bone_idx] is required for retargeting. This value is used by the bone map editor. If this method returns true, and no bone is assigned, the handle color will be red on the bone map editor.

fn (SkeletonProfile) set_required #

fn (s &SkeletonProfile) set_required(bone_idx i64, required bool)

Sets the required status for bone [param bone_idx] to [param required].

struct SkeletonProfileHumanoid #

struct SkeletonProfileHumanoid {
	SkeletonProfile
}

A humanoid [SkeletonProfile] preset.

fn (SkeletonProfileHumanoid) to_variant #

fn (s &SkeletonProfileHumanoid) to_variant() Variant

fn (SkeletonProfileHumanoid) from_variant #

fn (mut s SkeletonProfileHumanoid) from_variant(variant &Variant)

struct Skin #

struct Skin {
	Resource
}

fn (Skin) to_variant #

fn (s &Skin) to_variant() Variant

fn (Skin) from_variant #

fn (mut s Skin) from_variant(variant &Variant)

fn (Skin) set_bind_count #

fn (s &Skin) set_bind_count(bind_count i64)

fn (Skin) get_bind_count #

fn (s &Skin) get_bind_count() i64

fn (Skin) add_bind #

fn (s &Skin) add_bind(bone i64, pose Transform3D)

fn (Skin) add_named_bind #

fn (s &Skin) add_named_bind(name string, pose Transform3D)

fn (Skin) set_bind_pose #

fn (s &Skin) set_bind_pose(bind_index i64, pose Transform3D)

fn (Skin) get_bind_pose #

fn (s &Skin) get_bind_pose(bind_index i64) Transform3D

fn (Skin) set_bind_name #

fn (s &Skin) set_bind_name(bind_index i64, name string)

fn (Skin) get_bind_name #

fn (s &Skin) get_bind_name(bind_index i64) string

fn (Skin) set_bind_bone #

fn (s &Skin) set_bind_bone(bind_index i64, bone i64)

fn (Skin) get_bind_bone #

fn (s &Skin) get_bind_bone(bind_index i64) i64

fn (Skin) clear_binds #

fn (s &Skin) clear_binds()

struct SkinReference #

struct SkinReference {
	RefCounted
}

A reference-counted holder object for a skeleton RID used in the [RenderingServer].

fn (SkinReference) to_variant #

fn (s &SkinReference) to_variant() Variant

fn (SkinReference) from_variant #

fn (mut s SkinReference) from_variant(variant &Variant)

fn (SkinReference) get_skeleton #

fn (s &SkinReference) get_skeleton() RID

Returns the [RID] owned by this SkinReference, as returned by [method RenderingServer.skeleton_create].

fn (SkinReference) get_skin #

fn (s &SkinReference) get_skin() Skin

Returns the [Skin] connected to this SkinReference. In the case of [MeshInstance3D] with no [member MeshInstance3D.skin] assigned, this will reference an internal default [Skin] owned by that [MeshInstance3D]. Note that a single [Skin] may have more than one [SkinReference] in the case that it is shared by meshes across multiple [Skeleton3D] nodes.

struct Sky #

struct Sky {
	Resource
}

Defines a 3D environment's background by using a [Material].

fn (Sky) to_variant #

fn (s &Sky) to_variant() Variant

fn (Sky) from_variant #

fn (mut s Sky) from_variant(variant &Variant)

fn (Sky) set_radiance_size #

fn (s &Sky) set_radiance_size(size SkyRadianceSize)

fn (Sky) get_radiance_size #

fn (s &Sky) get_radiance_size() SkyRadianceSize

fn (Sky) set_process_mode #

fn (s &Sky) set_process_mode(mode SkyProcessMode)

fn (Sky) get_process_mode #

fn (s &Sky) get_process_mode() SkyProcessMode

fn (Sky) set_material #

fn (s &Sky) set_material(material Material)

fn (Sky) get_material #

fn (s &Sky) get_material() Material

struct Slider #

struct Slider {
	Range
}

Abstract base class for sliders.

fn (Slider) to_variant #

fn (s &Slider) to_variant() Variant

fn (Slider) from_variant #

fn (mut s Slider) from_variant(variant &Variant)

fn (Slider) set_ticks #

fn (s &Slider) set_ticks(count i64)

fn (Slider) get_ticks #

fn (s &Slider) get_ticks() i64

fn (Slider) get_ticks_on_borders #

fn (s &Slider) get_ticks_on_borders() bool

fn (Slider) set_ticks_on_borders #

fn (s &Slider) set_ticks_on_borders(ticks_on_border bool)

fn (Slider) get_ticks_position #

fn (s &Slider) get_ticks_position() SliderTickPosition

fn (Slider) set_ticks_position #

fn (s &Slider) set_ticks_position(ticks_on_border SliderTickPosition)

fn (Slider) set_editable #

fn (s &Slider) set_editable(editable bool)

fn (Slider) is_editable #

fn (s &Slider) is_editable() bool

fn (Slider) set_scrollable #

fn (s &Slider) set_scrollable(scrollable bool)

fn (Slider) is_scrollable #

fn (s &Slider) is_scrollable() bool

struct SliderJoint3D #

struct SliderJoint3D {
	Joint3D
}

A physics joint that restricts the movement of a 3D physics body along an axis relative to another physics body.

fn (SliderJoint3D) to_variant #

fn (s &SliderJoint3D) to_variant() Variant

fn (SliderJoint3D) from_variant #

fn (mut s SliderJoint3D) from_variant(variant &Variant)

fn (SliderJoint3D) set_param #

fn (s &SliderJoint3D) set_param(param SliderJoint3DParam, value f64)

Assigns [param value] to the given parameter.

fn (SliderJoint3D) get_param #

fn (s &SliderJoint3D) get_param(param SliderJoint3DParam) f64

Returns the value of the given parameter.

struct SoftBody3D #

struct SoftBody3D {
	MeshInstance3D
}

A deformable 3D physics mesh.

fn (SoftBody3D) to_variant #

fn (s &SoftBody3D) to_variant() Variant

fn (SoftBody3D) from_variant #

fn (mut s SoftBody3D) from_variant(variant &Variant)

fn (SoftBody3D) get_physics_rid #

fn (s &SoftBody3D) get_physics_rid() RID

Returns the internal [RID] used by the [PhysicsServer3D] for this body.

fn (SoftBody3D) set_collision_mask #

fn (s &SoftBody3D) set_collision_mask(collision_mask i64)

fn (SoftBody3D) get_collision_mask #

fn (s &SoftBody3D) get_collision_mask() i64

fn (SoftBody3D) set_collision_layer #

fn (s &SoftBody3D) set_collision_layer(collision_layer i64)

fn (SoftBody3D) get_collision_layer #

fn (s &SoftBody3D) get_collision_layer() i64

fn (SoftBody3D) set_collision_mask_value #

fn (s &SoftBody3D) set_collision_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.

fn (SoftBody3D) get_collision_mask_value #

fn (s &SoftBody3D) get_collision_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.

fn (SoftBody3D) set_collision_layer_value #

fn (s &SoftBody3D) set_collision_layer_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.

fn (SoftBody3D) get_collision_layer_value #

fn (s &SoftBody3D) get_collision_layer_value(layer_number i64) bool

Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.

fn (SoftBody3D) set_parent_collision_ignore #

fn (s &SoftBody3D) set_parent_collision_ignore(parent_collision_ignore NodePath)

fn (SoftBody3D) get_parent_collision_ignore #

fn (s &SoftBody3D) get_parent_collision_ignore() NodePath

fn (SoftBody3D) set_disable_mode #

fn (s &SoftBody3D) set_disable_mode(mode SoftBody3DDisableMode)

fn (SoftBody3D) get_disable_mode #

fn (s &SoftBody3D) get_disable_mode() SoftBody3DDisableMode

fn (SoftBody3D) get_collision_exceptions #

fn (s &SoftBody3D) get_collision_exceptions() Array

Returns an array of nodes that were added as collision exceptions for this body.

fn (SoftBody3D) add_collision_exception_with #

fn (s &SoftBody3D) add_collision_exception_with(body Node)

Adds a body to the list of bodies that this body can't collide with.

fn (SoftBody3D) remove_collision_exception_with #

fn (s &SoftBody3D) remove_collision_exception_with(body Node)

Removes a body from the list of bodies that this body can't collide with.

fn (SoftBody3D) set_simulation_precision #

fn (s &SoftBody3D) set_simulation_precision(simulation_precision i64)

fn (SoftBody3D) get_simulation_precision #

fn (s &SoftBody3D) get_simulation_precision() i64

fn (SoftBody3D) set_total_mass #

fn (s &SoftBody3D) set_total_mass(mass f64)

fn (SoftBody3D) get_total_mass #

fn (s &SoftBody3D) get_total_mass() f64

fn (SoftBody3D) set_linear_stiffness #

fn (s &SoftBody3D) set_linear_stiffness(linear_stiffness f64)

fn (SoftBody3D) get_linear_stiffness #

fn (s &SoftBody3D) get_linear_stiffness() f64

fn (SoftBody3D) set_shrinking_factor #

fn (s &SoftBody3D) set_shrinking_factor(shrinking_factor f64)

fn (SoftBody3D) get_shrinking_factor #

fn (s &SoftBody3D) get_shrinking_factor() f64

fn (SoftBody3D) set_pressure_coefficient #

fn (s &SoftBody3D) set_pressure_coefficient(pressure_coefficient f64)

fn (SoftBody3D) get_pressure_coefficient #

fn (s &SoftBody3D) get_pressure_coefficient() f64

fn (SoftBody3D) set_damping_coefficient #

fn (s &SoftBody3D) set_damping_coefficient(damping_coefficient f64)

fn (SoftBody3D) get_damping_coefficient #

fn (s &SoftBody3D) get_damping_coefficient() f64

fn (SoftBody3D) set_drag_coefficient #

fn (s &SoftBody3D) set_drag_coefficient(drag_coefficient f64)

fn (SoftBody3D) get_drag_coefficient #

fn (s &SoftBody3D) get_drag_coefficient() f64

fn (SoftBody3D) get_point_transform #

fn (s &SoftBody3D) get_point_transform(point_index i64) Vector3

Returns local translation of a vertex in the surface array.

fn (SoftBody3D) apply_impulse #

fn (s &SoftBody3D) apply_impulse(point_index i64, impulse Vector3)

Applies an impulse to a point. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).

fn (SoftBody3D) apply_force #

fn (s &SoftBody3D) apply_force(point_index i64, force Vector3)

Applies a force to a point. A force is time dependent and meant to be applied every physics update.

fn (SoftBody3D) apply_central_impulse #

fn (s &SoftBody3D) apply_central_impulse(impulse Vector3)

Distributes and applies an impulse to all points. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).

fn (SoftBody3D) apply_central_force #

fn (s &SoftBody3D) apply_central_force(force Vector3)

Distributes and applies a force to all points. A force is time dependent and meant to be applied every physics update.

fn (SoftBody3D) set_point_pinned #

fn (s &SoftBody3D) set_point_pinned(point_index i64, pinned bool, cfg SoftBody3D_set_point_pinned_Cfg)

Sets the pinned state of a surface vertex. When set to true, the optional [param attachment_path] can define a [Node3D] the pinned vertex will be attached to.

fn (SoftBody3D) is_point_pinned #

fn (s &SoftBody3D) is_point_pinned(point_index i64) bool

Returns true if vertex is set to pinned.

fn (SoftBody3D) set_ray_pickable #

fn (s &SoftBody3D) set_ray_pickable(ray_pickable bool)

fn (SoftBody3D) is_ray_pickable #

fn (s &SoftBody3D) is_ray_pickable() bool

struct SoftBody3D_set_point_pinned_Cfg #

@[params]
struct SoftBody3D_set_point_pinned_Cfg {
pub:
	attachment_path NodePath = NodePath.new0()
	insert_at       i64      = -1
}

Optional parameters for SoftBody3D#set_point_pinned

struct SphereMesh #

struct SphereMesh {
	PrimitiveMesh
}

Class representing a spherical [PrimitiveMesh].

fn (SphereMesh) to_variant #

fn (s &SphereMesh) to_variant() Variant

fn (SphereMesh) from_variant #

fn (mut s SphereMesh) from_variant(variant &Variant)

fn (SphereMesh) set_radius #

fn (s &SphereMesh) set_radius(radius f64)

fn (SphereMesh) get_radius #

fn (s &SphereMesh) get_radius() f64

fn (SphereMesh) set_height #

fn (s &SphereMesh) set_height(height f64)

fn (SphereMesh) get_height #

fn (s &SphereMesh) get_height() f64

fn (SphereMesh) set_radial_segments #

fn (s &SphereMesh) set_radial_segments(radial_segments i64)

fn (SphereMesh) get_radial_segments #

fn (s &SphereMesh) get_radial_segments() i64

fn (SphereMesh) set_rings #

fn (s &SphereMesh) set_rings(rings i64)

fn (SphereMesh) get_rings #

fn (s &SphereMesh) get_rings() i64

fn (SphereMesh) set_is_hemisphere #

fn (s &SphereMesh) set_is_hemisphere(is_hemisphere bool)

fn (SphereMesh) get_is_hemisphere #

fn (s &SphereMesh) get_is_hemisphere() bool

struct SphereOccluder3D #

struct SphereOccluder3D {
	Occluder3D
}

Spherical shape for use with occlusion culling in [OccluderInstance3D].

fn (SphereOccluder3D) to_variant #

fn (s &SphereOccluder3D) to_variant() Variant

fn (SphereOccluder3D) from_variant #

fn (mut s SphereOccluder3D) from_variant(variant &Variant)

fn (SphereOccluder3D) set_radius #

fn (s &SphereOccluder3D) set_radius(radius f64)

fn (SphereOccluder3D) get_radius #

fn (s &SphereOccluder3D) get_radius() f64

struct SphereShape3D #

struct SphereShape3D {
	Shape3D
}

A 3D sphere shape used for physics collision.

fn (SphereShape3D) to_variant #

fn (s &SphereShape3D) to_variant() Variant

fn (SphereShape3D) from_variant #

fn (mut s SphereShape3D) from_variant(variant &Variant)

fn (SphereShape3D) set_radius #

fn (s &SphereShape3D) set_radius(radius f64)

fn (SphereShape3D) get_radius #

fn (s &SphereShape3D) get_radius() f64

struct SpinBox #

struct SpinBox {
	Range
}

An input field for numbers.

fn (SpinBox) to_variant #

fn (s &SpinBox) to_variant() Variant

fn (SpinBox) from_variant #

fn (mut s SpinBox) from_variant(variant &Variant)

fn (SpinBox) set_horizontal_alignment #

fn (s &SpinBox) set_horizontal_alignment(alignment HorizontalAlignment)

fn (SpinBox) get_horizontal_alignment #

fn (s &SpinBox) get_horizontal_alignment() HorizontalAlignment

fn (SpinBox) set_suffix #

fn (s &SpinBox) set_suffix(suffix string)

fn (SpinBox) get_suffix #

fn (s &SpinBox) get_suffix() string

fn (SpinBox) set_prefix #

fn (s &SpinBox) set_prefix(prefix string)

fn (SpinBox) get_prefix #

fn (s &SpinBox) get_prefix() string

fn (SpinBox) set_editable #

fn (s &SpinBox) set_editable(enabled bool)

fn (SpinBox) set_custom_arrow_step #

fn (s &SpinBox) set_custom_arrow_step(arrow_step f64)

fn (SpinBox) get_custom_arrow_step #

fn (s &SpinBox) get_custom_arrow_step() f64

fn (SpinBox) is_editable #

fn (s &SpinBox) is_editable() bool

fn (SpinBox) set_update_on_text_changed #

fn (s &SpinBox) set_update_on_text_changed(enabled bool)

fn (SpinBox) get_update_on_text_changed #

fn (s &SpinBox) get_update_on_text_changed() bool

fn (SpinBox) set_select_all_on_focus #

fn (s &SpinBox) set_select_all_on_focus(enabled bool)

fn (SpinBox) is_select_all_on_focus #

fn (s &SpinBox) is_select_all_on_focus() bool

fn (SpinBox) apply #

fn (s &SpinBox) apply()

Applies the current value of this [SpinBox]. This is equivalent to pressing [kbd]Enter[/kbd] while editing the [LineEdit] used by the [SpinBox]. This will cause [signal LineEdit.text_submitted] to be emitted and its currently contained expression to be evaluated.

fn (SpinBox) get_line_edit #

fn (s &SpinBox) get_line_edit() LineEdit

Returns the [LineEdit] instance from this [SpinBox]. You can use it to access properties and methods of [LineEdit]. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.

struct SplitContainer #

struct SplitContainer {
	Container
}

A container that splits two child controls horizontally or vertically and provides a grabber for adjusting the split ratio.

fn (SplitContainer) to_variant #

fn (s &SplitContainer) to_variant() Variant

fn (SplitContainer) from_variant #

fn (mut s SplitContainer) from_variant(variant &Variant)

fn (SplitContainer) set_split_offset #

fn (s &SplitContainer) set_split_offset(offset i64)

fn (SplitContainer) get_split_offset #

fn (s &SplitContainer) get_split_offset() i64

fn (SplitContainer) clamp_split_offset #

fn (s &SplitContainer) clamp_split_offset()

Clamps the [member split_offset] value to not go outside the currently possible minimal and maximum values.

fn (SplitContainer) set_collapsed #

fn (s &SplitContainer) set_collapsed(collapsed bool)

fn (SplitContainer) is_collapsed #

fn (s &SplitContainer) is_collapsed() bool

fn (SplitContainer) set_dragger_visibility #

fn (s &SplitContainer) set_dragger_visibility(mode SplitContainerDraggerVisibility)

fn (SplitContainer) get_dragger_visibility #

fn (s &SplitContainer) get_dragger_visibility() SplitContainerDraggerVisibility

fn (SplitContainer) set_vertical #

fn (s &SplitContainer) set_vertical(vertical bool)

fn (SplitContainer) is_vertical #

fn (s &SplitContainer) is_vertical() bool

fn (SplitContainer) set_dragging_enabled #

fn (s &SplitContainer) set_dragging_enabled(dragging_enabled bool)

fn (SplitContainer) is_dragging_enabled #

fn (s &SplitContainer) is_dragging_enabled() bool

fn (SplitContainer) set_drag_area_margin_begin #

fn (s &SplitContainer) set_drag_area_margin_begin(margin i64)

fn (SplitContainer) get_drag_area_margin_begin #

fn (s &SplitContainer) get_drag_area_margin_begin() i64

fn (SplitContainer) set_drag_area_margin_end #

fn (s &SplitContainer) set_drag_area_margin_end(margin i64)

fn (SplitContainer) get_drag_area_margin_end #

fn (s &SplitContainer) get_drag_area_margin_end() i64

fn (SplitContainer) set_drag_area_offset #

fn (s &SplitContainer) set_drag_area_offset(offset i64)

fn (SplitContainer) get_drag_area_offset #

fn (s &SplitContainer) get_drag_area_offset() i64

fn (SplitContainer) set_drag_area_highlight_in_editor #

fn (s &SplitContainer) set_drag_area_highlight_in_editor(drag_area_highlight_in_editor bool)

fn (SplitContainer) is_drag_area_highlight_in_editor_enabled #

fn (s &SplitContainer) is_drag_area_highlight_in_editor_enabled() bool

fn (SplitContainer) get_drag_area_control #

fn (s &SplitContainer) get_drag_area_control() Control

Returns the drag area [Control]. For example, you can move a pre-configured button into the drag area [Control] so that it rides along with the split bar. Try setting the [Button] anchors to center prior to the reparent() call.

$BarnacleButton.reparent($SplitContainer.get_drag_area_control())

[b]Note:[/b] The drag area [Control] is drawn over the [SplitContainer]'s children, so [CanvasItem] draw objects called from the [Control] and children added to the [Control] will also appear over the [SplitContainer]'s children. Try setting [member Control.mouse_filter] of custom children to [constant Control.MOUSE_FILTER_IGNORE] to prevent blocking the mouse from dragging if desired. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash.

fn (SplitContainer) set_touch_dragger_enabled #

fn (s &SplitContainer) set_touch_dragger_enabled(enabled bool)

fn (SplitContainer) is_touch_dragger_enabled #

fn (s &SplitContainer) is_touch_dragger_enabled() bool

struct SpotLight3D #

struct SpotLight3D {
	Light3D
}

A spotlight, such as a reflector spotlight or a lantern.

fn (SpotLight3D) to_variant #

fn (s &SpotLight3D) to_variant() Variant

fn (SpotLight3D) from_variant #

fn (mut s SpotLight3D) from_variant(variant &Variant)

struct SpringArm3D #

struct SpringArm3D {
	Node3D
}

A 3D raycast that dynamically moves its children near the collision point.

fn (SpringArm3D) to_variant #

fn (s &SpringArm3D) to_variant() Variant

fn (SpringArm3D) from_variant #

fn (mut s SpringArm3D) from_variant(variant &Variant)

fn (SpringArm3D) get_hit_length #

fn (s &SpringArm3D) get_hit_length() f64

Returns the spring arm's current length.

fn (SpringArm3D) set_length #

fn (s &SpringArm3D) set_length(length f64)

fn (SpringArm3D) get_length #

fn (s &SpringArm3D) get_length() f64

fn (SpringArm3D) set_shape #

fn (s &SpringArm3D) set_shape(shape Shape3D)

fn (SpringArm3D) get_shape #

fn (s &SpringArm3D) get_shape() Shape3D

fn (SpringArm3D) add_excluded_object #

fn (s &SpringArm3D) add_excluded_object(rid RID)

Adds the [PhysicsBody3D] object with the given [RID] to the list of [PhysicsBody3D] objects excluded from the collision check.

fn (SpringArm3D) remove_excluded_object #

fn (s &SpringArm3D) remove_excluded_object(rid RID) bool

Removes the given [RID] from the list of [PhysicsBody3D] objects excluded from the collision check.

fn (SpringArm3D) clear_excluded_objects #

fn (s &SpringArm3D) clear_excluded_objects()

Clears the list of [PhysicsBody3D] objects excluded from the collision check.

fn (SpringArm3D) set_collision_mask #

fn (s &SpringArm3D) set_collision_mask(mask i64)

fn (SpringArm3D) get_collision_mask #

fn (s &SpringArm3D) get_collision_mask() i64

fn (SpringArm3D) set_margin #

fn (s &SpringArm3D) set_margin(margin f64)

fn (SpringArm3D) get_margin #

fn (s &SpringArm3D) get_margin() f64

struct SpringBoneCollision3D #

struct SpringBoneCollision3D {
	Node3D
}

A base class of the collision that interacts with [SpringBoneSimulator3D].

fn (SpringBoneCollision3D) to_variant #

fn (s &SpringBoneCollision3D) to_variant() Variant

fn (SpringBoneCollision3D) from_variant #

fn (mut s SpringBoneCollision3D) from_variant(variant &Variant)

fn (SpringBoneCollision3D) get_skeleton #

fn (s &SpringBoneCollision3D) get_skeleton() Skeleton3D

Get parent [Skeleton3D] node of the parent [SpringBoneSimulator3D] if found.

fn (SpringBoneCollision3D) set_bone_name #

fn (s &SpringBoneCollision3D) set_bone_name(bone_name string)

fn (SpringBoneCollision3D) get_bone_name #

fn (s &SpringBoneCollision3D) get_bone_name() string

fn (SpringBoneCollision3D) set_bone #

fn (s &SpringBoneCollision3D) set_bone(bone i64)

fn (SpringBoneCollision3D) get_bone #

fn (s &SpringBoneCollision3D) get_bone() i64

fn (SpringBoneCollision3D) set_position_offset #

fn (s &SpringBoneCollision3D) set_position_offset(offset Vector3)

fn (SpringBoneCollision3D) get_position_offset #

fn (s &SpringBoneCollision3D) get_position_offset() Vector3

fn (SpringBoneCollision3D) set_rotation_offset #

fn (s &SpringBoneCollision3D) set_rotation_offset(offset Quaternion)

fn (SpringBoneCollision3D) get_rotation_offset #

fn (s &SpringBoneCollision3D) get_rotation_offset() Quaternion

struct SpringBoneCollisionCapsule3D #

struct SpringBoneCollisionCapsule3D {
	SpringBoneCollision3D
}

A capsule shape collision that interacts with [SpringBoneSimulator3D].

fn (SpringBoneCollisionCapsule3D) to_variant #

fn (s &SpringBoneCollisionCapsule3D) to_variant() Variant

fn (SpringBoneCollisionCapsule3D) from_variant #

fn (mut s SpringBoneCollisionCapsule3D) from_variant(variant &Variant)

fn (SpringBoneCollisionCapsule3D) set_radius #

fn (s &SpringBoneCollisionCapsule3D) set_radius(radius f64)

fn (SpringBoneCollisionCapsule3D) get_radius #

fn (s &SpringBoneCollisionCapsule3D) get_radius() f64

fn (SpringBoneCollisionCapsule3D) set_height #

fn (s &SpringBoneCollisionCapsule3D) set_height(height f64)

fn (SpringBoneCollisionCapsule3D) get_height #

fn (s &SpringBoneCollisionCapsule3D) get_height() f64

fn (SpringBoneCollisionCapsule3D) set_mid_height #

fn (s &SpringBoneCollisionCapsule3D) set_mid_height(mid_height f64)

fn (SpringBoneCollisionCapsule3D) get_mid_height #

fn (s &SpringBoneCollisionCapsule3D) get_mid_height() f64

fn (SpringBoneCollisionCapsule3D) set_inside #

fn (s &SpringBoneCollisionCapsule3D) set_inside(enabled bool)

fn (SpringBoneCollisionCapsule3D) is_inside #

fn (s &SpringBoneCollisionCapsule3D) is_inside() bool

struct SpringBoneCollisionPlane3D #

struct SpringBoneCollisionPlane3D {
	SpringBoneCollision3D
}

A infinite plane collision that interacts with [SpringBoneSimulator3D].

fn (SpringBoneCollisionPlane3D) to_variant #

fn (s &SpringBoneCollisionPlane3D) to_variant() Variant

fn (SpringBoneCollisionPlane3D) from_variant #

fn (mut s SpringBoneCollisionPlane3D) from_variant(variant &Variant)

struct SpringBoneCollisionSphere3D #

struct SpringBoneCollisionSphere3D {
	SpringBoneCollision3D
}

A sphere shape collision that interacts with [SpringBoneSimulator3D].

fn (SpringBoneCollisionSphere3D) to_variant #

fn (s &SpringBoneCollisionSphere3D) to_variant() Variant

fn (SpringBoneCollisionSphere3D) from_variant #

fn (mut s SpringBoneCollisionSphere3D) from_variant(variant &Variant)

fn (SpringBoneCollisionSphere3D) set_radius #

fn (s &SpringBoneCollisionSphere3D) set_radius(radius f64)

fn (SpringBoneCollisionSphere3D) get_radius #

fn (s &SpringBoneCollisionSphere3D) get_radius() f64

fn (SpringBoneCollisionSphere3D) set_inside #

fn (s &SpringBoneCollisionSphere3D) set_inside(enabled bool)

fn (SpringBoneCollisionSphere3D) is_inside #

fn (s &SpringBoneCollisionSphere3D) is_inside() bool

struct SpringBoneSimulator3D #

struct SpringBoneSimulator3D {
	SkeletonModifier3D
}

A [SkeletonModifier3D] to apply inertial wavering to bone chains.

fn (SpringBoneSimulator3D) to_variant #

fn (s &SpringBoneSimulator3D) to_variant() Variant

fn (SpringBoneSimulator3D) from_variant #

fn (mut s SpringBoneSimulator3D) from_variant(variant &Variant)

fn (SpringBoneSimulator3D) set_root_bone_name #

fn (s &SpringBoneSimulator3D) set_root_bone_name(index i64, bone_name string)

Sets the root bone name of the bone chain.

fn (SpringBoneSimulator3D) get_root_bone_name #

fn (s &SpringBoneSimulator3D) get_root_bone_name(index i64) string

Returns the root bone name of the bone chain.

fn (SpringBoneSimulator3D) set_root_bone #

fn (s &SpringBoneSimulator3D) set_root_bone(index i64, bone i64)

Sets the root bone index of the bone chain.

fn (SpringBoneSimulator3D) get_root_bone #

fn (s &SpringBoneSimulator3D) get_root_bone(index i64) i64

Returns the root bone index of the bone chain.

fn (SpringBoneSimulator3D) set_end_bone_name #

fn (s &SpringBoneSimulator3D) set_end_bone_name(index i64, bone_name string)

Sets the end bone name of the bone chain. [b]Note:[/b] End bone must be the root bone or a child of the root bone. If they are the same, the tail must be extended by [method set_extend_end_bone] to jiggle the bone.

fn (SpringBoneSimulator3D) get_end_bone_name #

fn (s &SpringBoneSimulator3D) get_end_bone_name(index i64) string

Returns the end bone name of the bone chain.

fn (SpringBoneSimulator3D) set_end_bone #

fn (s &SpringBoneSimulator3D) set_end_bone(index i64, bone i64)

Sets the end bone index of the bone chain.

fn (SpringBoneSimulator3D) get_end_bone #

fn (s &SpringBoneSimulator3D) get_end_bone(index i64) i64

Returns the end bone index of the bone chain.

fn (SpringBoneSimulator3D) set_extend_end_bone #

fn (s &SpringBoneSimulator3D) set_extend_end_bone(index i64, enabled bool)

If [param enabled] is true, the end bone is extended to have the tail. The extended tail config is allocated to the last element in the joint list. In other words, if you set [param enabled] is false, the config of last element in the joint list has no effect in the simulated result.

fn (SpringBoneSimulator3D) is_end_bone_extended #

fn (s &SpringBoneSimulator3D) is_end_bone_extended(index i64) bool

Returns true if the end bone is extended to have the tail.

fn (SpringBoneSimulator3D) set_end_bone_direction #

fn (s &SpringBoneSimulator3D) set_end_bone_direction(index i64, bone_direction SpringBoneSimulator3DBoneDirection)

Sets the end bone tail direction of the bone chain when [method is_end_bone_extended] is true.

fn (SpringBoneSimulator3D) get_end_bone_direction #

fn (s &SpringBoneSimulator3D) get_end_bone_direction(index i64) SpringBoneSimulator3DBoneDirection

Returns the end bone's tail direction of the bone chain when [method is_end_bone_extended] is true.

fn (SpringBoneSimulator3D) set_end_bone_length #

fn (s &SpringBoneSimulator3D) set_end_bone_length(index i64, length f64)

Sets the end bone tail length of the bone chain when [method is_end_bone_extended] is true.

fn (SpringBoneSimulator3D) get_end_bone_length #

fn (s &SpringBoneSimulator3D) get_end_bone_length(index i64) f64

Returns the end bone's tail length of the bone chain when [method is_end_bone_extended] is true.

fn (SpringBoneSimulator3D) set_center_from #

fn (s &SpringBoneSimulator3D) set_center_from(index i64, center_from SpringBoneSimulator3DCenterFrom)

Sets what the center originates from in the bone chain. Bone movement is calculated based on the difference in relative distance between center and bone in the previous and next frames. For example, if the parent [Skeleton3D] is used as the center, the bones are considered to have not moved if the [Skeleton3D] moves in the world. In this case, only a change in the bone pose is considered to be a bone movement.

fn (SpringBoneSimulator3D) get_center_from #

fn (s &SpringBoneSimulator3D) get_center_from(index i64) SpringBoneSimulator3DCenterFrom

Returns what the center originates from in the bone chain.

fn (SpringBoneSimulator3D) set_center_node #

fn (s &SpringBoneSimulator3D) set_center_node(index i64, node_path NodePath)

Sets the center node path of the bone chain.

fn (SpringBoneSimulator3D) get_center_node #

fn (s &SpringBoneSimulator3D) get_center_node(index i64) NodePath

Returns the center node path of the bone chain.

fn (SpringBoneSimulator3D) set_center_bone_name #

fn (s &SpringBoneSimulator3D) set_center_bone_name(index i64, bone_name string)

Sets the center bone name of the bone chain.

fn (SpringBoneSimulator3D) get_center_bone_name #

fn (s &SpringBoneSimulator3D) get_center_bone_name(index i64) string

Returns the center bone name of the bone chain.

fn (SpringBoneSimulator3D) set_center_bone #

fn (s &SpringBoneSimulator3D) set_center_bone(index i64, bone i64)

Sets the center bone index of the bone chain.

fn (SpringBoneSimulator3D) get_center_bone #

fn (s &SpringBoneSimulator3D) get_center_bone(index i64) i64

Returns the center bone index of the bone chain.

fn (SpringBoneSimulator3D) set_radius #

fn (s &SpringBoneSimulator3D) set_radius(index i64, radius f64)

Sets the joint radius of the bone chain. It is used to move and slide with the [SpringBoneCollision3D] in the collision list. The value is scaled by [method set_radius_damping_curve] and cached in each joint setting in the joint list.

fn (SpringBoneSimulator3D) get_radius #

fn (s &SpringBoneSimulator3D) get_radius(index i64) f64

Returns the joint radius of the bone chain.

fn (SpringBoneSimulator3D) set_rotation_axis #

fn (s &SpringBoneSimulator3D) set_rotation_axis(index i64, axis SpringBoneSimulator3DRotationAxis)

Sets the rotation axis of the bone chain. If set to a specific axis, it acts like a hinge joint. The value is cached in each joint setting in the joint list. The axes are based on the [method Skeleton3D.get_bone_rest]'s space, if [param axis] is [constant ROTATION_AXIS_CUSTOM], you can specify any axis. [b]Note:[/b] The rotation axis vector and the forward vector shouldn't be colinear to avoid unintended rotation since [SpringBoneSimulator3D] does not factor in twisting forces.

fn (SpringBoneSimulator3D) get_rotation_axis #

fn (s &SpringBoneSimulator3D) get_rotation_axis(index i64) SpringBoneSimulator3DRotationAxis

Returns the rotation axis of the bone chain.

fn (SpringBoneSimulator3D) set_rotation_axis_vector #

fn (s &SpringBoneSimulator3D) set_rotation_axis_vector(index i64, vector Vector3)

Sets the rotation axis vector of the bone chain. The value is cached in each joint setting in the joint list. This vector is normalized by an internal process and represents the axis around which the bone chain can rotate. If the vector length is 0, it is considered synonymous with [constant ROTATION_AXIS_ALL].

fn (SpringBoneSimulator3D) get_rotation_axis_vector #

fn (s &SpringBoneSimulator3D) get_rotation_axis_vector(index i64) Vector3

Returns the rotation axis vector of the bone chain. This vector represents the axis around which the bone chain can rotate. It is determined based on the rotation axis set for the bone chain. If [method get_rotation_axis] is [constant ROTATION_AXIS_ALL], this method returns Vector3(0, 0, 0).

fn (SpringBoneSimulator3D) set_radius_damping_curve #

fn (s &SpringBoneSimulator3D) set_radius_damping_curve(index i64, curve Curve)

Sets the joint radius damping curve of the bone chain.

fn (SpringBoneSimulator3D) get_radius_damping_curve #

fn (s &SpringBoneSimulator3D) get_radius_damping_curve(index i64) Curve

Returns the joint radius damping curve of the bone chain.

fn (SpringBoneSimulator3D) set_stiffness #

fn (s &SpringBoneSimulator3D) set_stiffness(index i64, stiffness f64)

Sets the stiffness force of the bone chain. The greater the value, the faster it recovers to its initial pose. If [param stiffness] is 0, the modified pose will not return to the original pose. The value is scaled by [method set_stiffness_damping_curve] and cached in each joint setting in the joint list.

fn (SpringBoneSimulator3D) get_stiffness #

fn (s &SpringBoneSimulator3D) get_stiffness(index i64) f64

Returns the stiffness force of the bone chain.

fn (SpringBoneSimulator3D) set_stiffness_damping_curve #

fn (s &SpringBoneSimulator3D) set_stiffness_damping_curve(index i64, curve Curve)

Sets the stiffness force damping curve of the bone chain.

fn (SpringBoneSimulator3D) get_stiffness_damping_curve #

fn (s &SpringBoneSimulator3D) get_stiffness_damping_curve(index i64) Curve

Returns the stiffness force damping curve of the bone chain.

fn (SpringBoneSimulator3D) set_drag #

fn (s &SpringBoneSimulator3D) set_drag(index i64, drag f64)

Sets the drag force of the bone chain. The greater the value, the more suppressed the wiggling. The value is scaled by [method set_drag_damping_curve] and cached in each joint setting in the joint list.

fn (SpringBoneSimulator3D) get_drag #

fn (s &SpringBoneSimulator3D) get_drag(index i64) f64

Returns the drag force damping curve of the bone chain.

fn (SpringBoneSimulator3D) set_drag_damping_curve #

fn (s &SpringBoneSimulator3D) set_drag_damping_curve(index i64, curve Curve)

Sets the drag force damping curve of the bone chain.

fn (SpringBoneSimulator3D) get_drag_damping_curve #

fn (s &SpringBoneSimulator3D) get_drag_damping_curve(index i64) Curve

Returns the drag force damping curve of the bone chain.

fn (SpringBoneSimulator3D) set_gravity #

fn (s &SpringBoneSimulator3D) set_gravity(index i64, gravity f64)

Sets the gravity amount of the bone chain. This value is not an acceleration, but a constant velocity of movement in [method set_gravity_direction]. If [param gravity] is not 0, the modified pose will not return to the original pose since it is always affected by gravity. The value is scaled by [method set_gravity_damping_curve] and cached in each joint setting in the joint list.

fn (SpringBoneSimulator3D) get_gravity #

fn (s &SpringBoneSimulator3D) get_gravity(index i64) f64

Returns the gravity amount of the bone chain.

fn (SpringBoneSimulator3D) set_gravity_damping_curve #

fn (s &SpringBoneSimulator3D) set_gravity_damping_curve(index i64, curve Curve)

Sets the gravity amount damping curve of the bone chain.

fn (SpringBoneSimulator3D) get_gravity_damping_curve #

fn (s &SpringBoneSimulator3D) get_gravity_damping_curve(index i64) Curve

Returns the gravity amount damping curve of the bone chain.

fn (SpringBoneSimulator3D) set_gravity_direction #

fn (s &SpringBoneSimulator3D) set_gravity_direction(index i64, gravity_direction Vector3)

Sets the gravity direction of the bone chain. This value is internally normalized and then multiplied by [method set_gravity]. The value is cached in each joint setting in the joint list.

fn (SpringBoneSimulator3D) get_gravity_direction #

fn (s &SpringBoneSimulator3D) get_gravity_direction(index i64) Vector3

Returns the gravity direction of the bone chain.

fn (SpringBoneSimulator3D) set_setting_count #

fn (s &SpringBoneSimulator3D) set_setting_count(count i64)

fn (SpringBoneSimulator3D) get_setting_count #

fn (s &SpringBoneSimulator3D) get_setting_count() i64

fn (SpringBoneSimulator3D) clear_settings #

fn (s &SpringBoneSimulator3D) clear_settings()

Clears all settings.

fn (SpringBoneSimulator3D) set_individual_config #

fn (s &SpringBoneSimulator3D) set_individual_config(index i64, enabled bool)

If [param enabled] is true, the config can be edited individually for each joint.

fn (SpringBoneSimulator3D) is_config_individual #

fn (s &SpringBoneSimulator3D) is_config_individual(index i64) bool

Returns true if the config can be edited individually for each joint.

fn (SpringBoneSimulator3D) get_joint_bone_name #

fn (s &SpringBoneSimulator3D) get_joint_bone_name(index i64, joint i64) string

Returns the bone name at [param joint] in the bone chain's joint list.

fn (SpringBoneSimulator3D) get_joint_bone #

fn (s &SpringBoneSimulator3D) get_joint_bone(index i64, joint i64) i64

Returns the bone index at [param joint] in the bone chain's joint list.

fn (SpringBoneSimulator3D) set_joint_rotation_axis #

fn (s &SpringBoneSimulator3D) set_joint_rotation_axis(index i64, joint i64, axis SpringBoneSimulator3DRotationAxis)

Sets the rotation axis at [param joint] in the bone chain's joint list when [method is_config_individual] is true. The axes are based on the [method Skeleton3D.get_bone_rest]'s space, if [param axis] is [constant ROTATION_AXIS_CUSTOM], you can specify any axis. [b]Note:[/b] The rotation axis and the forward vector shouldn't be colinear to avoid unintended rotation since [SpringBoneSimulator3D] does not factor in twisting forces.

fn (SpringBoneSimulator3D) get_joint_rotation_axis #

fn (s &SpringBoneSimulator3D) get_joint_rotation_axis(index i64, joint i64) SpringBoneSimulator3DRotationAxis

Returns the rotation axis at [param joint] in the bone chain's joint list.

fn (SpringBoneSimulator3D) set_joint_rotation_axis_vector #

fn (s &SpringBoneSimulator3D) set_joint_rotation_axis_vector(index i64, joint i64, vector Vector3)

Sets the rotation axis vector for the specified joint in the bone chain. This vector is normalized by an internal process and represents the axis around which the bone chain can rotate. If the vector length is 0, it is considered synonymous with [constant ROTATION_AXIS_ALL].

fn (SpringBoneSimulator3D) get_joint_rotation_axis_vector #

fn (s &SpringBoneSimulator3D) get_joint_rotation_axis_vector(index i64, joint i64) Vector3

Returns the rotation axis vector for the specified joint in the bone chain. This vector represents the axis around which the joint can rotate. It is determined based on the rotation axis set for the joint. If [method get_joint_rotation_axis] is [constant ROTATION_AXIS_ALL], this method returns Vector3(0, 0, 0).

fn (SpringBoneSimulator3D) set_joint_radius #

fn (s &SpringBoneSimulator3D) set_joint_radius(index i64, joint i64, radius f64)

Sets the joint radius at [param joint] in the bone chain's joint list when [method is_config_individual] is true.

fn (SpringBoneSimulator3D) get_joint_radius #

fn (s &SpringBoneSimulator3D) get_joint_radius(index i64, joint i64) f64

Returns the radius at [param joint] in the bone chain's joint list.

fn (SpringBoneSimulator3D) set_joint_stiffness #

fn (s &SpringBoneSimulator3D) set_joint_stiffness(index i64, joint i64, stiffness f64)

Sets the stiffness force at [param joint] in the bone chain's joint list when [method is_config_individual] is true.

fn (SpringBoneSimulator3D) get_joint_stiffness #

fn (s &SpringBoneSimulator3D) get_joint_stiffness(index i64, joint i64) f64

Returns the stiffness force at [param joint] in the bone chain's joint list.

fn (SpringBoneSimulator3D) set_joint_drag #

fn (s &SpringBoneSimulator3D) set_joint_drag(index i64, joint i64, drag f64)

Sets the drag force at [param joint] in the bone chain's joint list when [method is_config_individual] is true.

fn (SpringBoneSimulator3D) get_joint_drag #

fn (s &SpringBoneSimulator3D) get_joint_drag(index i64, joint i64) f64

Returns the drag force at [param joint] in the bone chain's joint list.

fn (SpringBoneSimulator3D) set_joint_gravity #

fn (s &SpringBoneSimulator3D) set_joint_gravity(index i64, joint i64, gravity f64)

Sets the gravity amount at [param joint] in the bone chain's joint list when [method is_config_individual] is true.

fn (SpringBoneSimulator3D) get_joint_gravity #

fn (s &SpringBoneSimulator3D) get_joint_gravity(index i64, joint i64) f64

Returns the gravity amount at [param joint] in the bone chain's joint list.

fn (SpringBoneSimulator3D) set_joint_gravity_direction #

fn (s &SpringBoneSimulator3D) set_joint_gravity_direction(index i64, joint i64, gravity_direction Vector3)

Sets the gravity direction at [param joint] in the bone chain's joint list when [method is_config_individual] is true.

fn (SpringBoneSimulator3D) get_joint_gravity_direction #

fn (s &SpringBoneSimulator3D) get_joint_gravity_direction(index i64, joint i64) Vector3

Returns the gravity direction at [param joint] in the bone chain's joint list.

fn (SpringBoneSimulator3D) get_joint_count #

fn (s &SpringBoneSimulator3D) get_joint_count(index i64) i64

Returns the joint count of the bone chain's joint list.

fn (SpringBoneSimulator3D) set_enable_all_child_collisions #

fn (s &SpringBoneSimulator3D) set_enable_all_child_collisions(index i64, enabled bool)

If [param enabled] is true, all child [SpringBoneCollision3D]s are colliding and [method set_exclude_collision_path] is enabled as an exclusion list at [param index] in the settings. If [param enabled] is false, you need to manually register all valid collisions with [method set_collision_path].

fn (SpringBoneSimulator3D) are_all_child_collisions_enabled #

fn (s &SpringBoneSimulator3D) are_all_child_collisions_enabled(index i64) bool

Returns true if all child [SpringBoneCollision3D]s are contained in the collision list at [param index] in the settings.

fn (SpringBoneSimulator3D) set_exclude_collision_path #

fn (s &SpringBoneSimulator3D) set_exclude_collision_path(index i64, collision i64, node_path NodePath)

Sets the node path of the [SpringBoneCollision3D] at [param collision] in the bone chain's exclude collision list when [method are_all_child_collisions_enabled] is true.

fn (SpringBoneSimulator3D) get_exclude_collision_path #

fn (s &SpringBoneSimulator3D) get_exclude_collision_path(index i64, collision i64) NodePath

Returns the node path of the [SpringBoneCollision3D] at [param collision] in the bone chain's exclude collision list when [method are_all_child_collisions_enabled] is true.

fn (SpringBoneSimulator3D) set_exclude_collision_count #

fn (s &SpringBoneSimulator3D) set_exclude_collision_count(index i64, count i64)

Sets the number of exclude collisions in the exclude collision list at [param index] in the settings when [method are_all_child_collisions_enabled] is true.

fn (SpringBoneSimulator3D) get_exclude_collision_count #

fn (s &SpringBoneSimulator3D) get_exclude_collision_count(index i64) i64

Returns the exclude collision count of the bone chain's exclude collision list when [method are_all_child_collisions_enabled] is true.

fn (SpringBoneSimulator3D) clear_exclude_collisions #

fn (s &SpringBoneSimulator3D) clear_exclude_collisions(index i64)

Clears all exclude collisions from the collision list at [param index] in the settings when [method are_all_child_collisions_enabled] is true.

fn (SpringBoneSimulator3D) set_collision_path #

fn (s &SpringBoneSimulator3D) set_collision_path(index i64, collision i64, node_path NodePath)

Sets the node path of the [SpringBoneCollision3D] at [param collision] in the bone chain's collision list when [method are_all_child_collisions_enabled] is false.

fn (SpringBoneSimulator3D) get_collision_path #

fn (s &SpringBoneSimulator3D) get_collision_path(index i64, collision i64) NodePath

Returns the node path of the [SpringBoneCollision3D] at [param collision] in the bone chain's collision list when [method are_all_child_collisions_enabled] is false.

fn (SpringBoneSimulator3D) set_collision_count #

fn (s &SpringBoneSimulator3D) set_collision_count(index i64, count i64)

Sets the number of collisions in the collision list at [param index] in the settings when [method are_all_child_collisions_enabled] is false.

fn (SpringBoneSimulator3D) get_collision_count #

fn (s &SpringBoneSimulator3D) get_collision_count(index i64) i64

Returns the collision count of the bone chain's collision list when [method are_all_child_collisions_enabled] is false.

fn (SpringBoneSimulator3D) clear_collisions #

fn (s &SpringBoneSimulator3D) clear_collisions(index i64)

Clears all collisions from the collision list at [param index] in the settings when [method are_all_child_collisions_enabled] is false.

fn (SpringBoneSimulator3D) set_external_force #

fn (s &SpringBoneSimulator3D) set_external_force(force Vector3)

fn (SpringBoneSimulator3D) get_external_force #

fn (s &SpringBoneSimulator3D) get_external_force() Vector3

fn (SpringBoneSimulator3D) reset #

fn (s &SpringBoneSimulator3D) reset()

Resets a simulating state with respect to the current bone pose. It is useful to prevent the simulation result getting violent. For example, calling this immediately after a call to [method AnimationPlayer.play] without a fading, or within the previous [signal SkeletonModifier3D.modification_processed] signal if it's condition changes significantly.

struct Sprite2D #

struct Sprite2D {
	Node2D
}

General-purpose sprite node.

fn (Sprite2D) to_variant #

fn (s &Sprite2D) to_variant() Variant

fn (Sprite2D) from_variant #

fn (mut s Sprite2D) from_variant(variant &Variant)

fn (Sprite2D) set_texture #

fn (s &Sprite2D) set_texture(texture Texture2D)

fn (Sprite2D) get_texture #

fn (s &Sprite2D) get_texture() Texture2D

fn (Sprite2D) set_centered #

fn (s &Sprite2D) set_centered(centered bool)

fn (Sprite2D) is_centered #

fn (s &Sprite2D) is_centered() bool

fn (Sprite2D) set_offset #

fn (s &Sprite2D) set_offset(offset Vector2)

fn (Sprite2D) get_offset #

fn (s &Sprite2D) get_offset() Vector2

fn (Sprite2D) set_flip_h #

fn (s &Sprite2D) set_flip_h(flip_h bool)

fn (Sprite2D) is_flipped_h #

fn (s &Sprite2D) is_flipped_h() bool

fn (Sprite2D) set_flip_v #

fn (s &Sprite2D) set_flip_v(flip_v bool)

fn (Sprite2D) is_flipped_v #

fn (s &Sprite2D) is_flipped_v() bool

fn (Sprite2D) set_region_enabled #

fn (s &Sprite2D) set_region_enabled(enabled bool)

fn (Sprite2D) is_region_enabled #

fn (s &Sprite2D) is_region_enabled() bool

fn (Sprite2D) is_pixel_opaque #

fn (s &Sprite2D) is_pixel_opaque(pos Vector2) bool

Returns true, if the pixel at the given position is opaque and false in other case. The position is in local coordinates. [b]Note:[/b] It also returns false, if the sprite's texture is null or if the given position is invalid.

fn (Sprite2D) set_region_rect #

fn (s &Sprite2D) set_region_rect(rect Rect2)

fn (Sprite2D) get_region_rect #

fn (s &Sprite2D) get_region_rect() Rect2

fn (Sprite2D) set_region_filter_clip_enabled #

fn (s &Sprite2D) set_region_filter_clip_enabled(enabled bool)

fn (Sprite2D) is_region_filter_clip_enabled #

fn (s &Sprite2D) is_region_filter_clip_enabled() bool

fn (Sprite2D) set_frame #

fn (s &Sprite2D) set_frame(frame i64)

fn (Sprite2D) get_frame #

fn (s &Sprite2D) get_frame() i64

fn (Sprite2D) set_frame_coords #

fn (s &Sprite2D) set_frame_coords(coords Vector2i)

fn (Sprite2D) get_frame_coords #

fn (s &Sprite2D) get_frame_coords() Vector2i

fn (Sprite2D) set_vframes #

fn (s &Sprite2D) set_vframes(vframes i64)

fn (Sprite2D) get_vframes #

fn (s &Sprite2D) get_vframes() i64

fn (Sprite2D) set_hframes #

fn (s &Sprite2D) set_hframes(hframes i64)

fn (Sprite2D) get_hframes #

fn (s &Sprite2D) get_hframes() i64

fn (Sprite2D) get_rect #

fn (s &Sprite2D) get_rect() Rect2

Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. [b]Example:[/b] Detect if the Sprite2D was clicked: [codeblocks] [gdscript] func _input(event): if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT: if get_rect().has_point(to_local(event.position)): print("A click!") [/gdscript] [csharp] public override void _Input(InputEvent @event) { if (@event is InputEventMouseButton inputEventMouse) { if (inputEventMouse.Pressed && inputEventMouse.ButtonIndex == MouseButton.Left) { if (GetRect().HasPoint(ToLocal(inputEventMouse.Position))) { GD.Print("A click!"); } } } } [/csharp] [/codeblocks]

struct Sprite3D #

struct Sprite3D {
	SpriteBase3D
}

2D sprite node in a 3D world.

fn (Sprite3D) to_variant #

fn (s &Sprite3D) to_variant() Variant

fn (Sprite3D) from_variant #

fn (mut s Sprite3D) from_variant(variant &Variant)

fn (Sprite3D) set_texture #

fn (s &Sprite3D) set_texture(texture Texture2D)

fn (Sprite3D) get_texture #

fn (s &Sprite3D) get_texture() Texture2D

fn (Sprite3D) set_region_enabled #

fn (s &Sprite3D) set_region_enabled(enabled bool)

fn (Sprite3D) is_region_enabled #

fn (s &Sprite3D) is_region_enabled() bool

fn (Sprite3D) set_region_rect #

fn (s &Sprite3D) set_region_rect(rect Rect2)

fn (Sprite3D) get_region_rect #

fn (s &Sprite3D) get_region_rect() Rect2

fn (Sprite3D) set_frame #

fn (s &Sprite3D) set_frame(frame i64)

fn (Sprite3D) get_frame #

fn (s &Sprite3D) get_frame() i64

fn (Sprite3D) set_frame_coords #

fn (s &Sprite3D) set_frame_coords(coords Vector2i)

fn (Sprite3D) get_frame_coords #

fn (s &Sprite3D) get_frame_coords() Vector2i

fn (Sprite3D) set_vframes #

fn (s &Sprite3D) set_vframes(vframes i64)

fn (Sprite3D) get_vframes #

fn (s &Sprite3D) get_vframes() i64

fn (Sprite3D) set_hframes #

fn (s &Sprite3D) set_hframes(hframes i64)

fn (Sprite3D) get_hframes #

fn (s &Sprite3D) get_hframes() i64

struct SpriteBase3D #

struct SpriteBase3D {
	GeometryInstance3D
}

2D sprite node in 3D environment.

fn (SpriteBase3D) to_variant #

fn (s &SpriteBase3D) to_variant() Variant

fn (SpriteBase3D) from_variant #

fn (mut s SpriteBase3D) from_variant(variant &Variant)

fn (SpriteBase3D) set_centered #

fn (s &SpriteBase3D) set_centered(centered bool)

fn (SpriteBase3D) is_centered #

fn (s &SpriteBase3D) is_centered() bool

fn (SpriteBase3D) set_offset #

fn (s &SpriteBase3D) set_offset(offset Vector2)

fn (SpriteBase3D) get_offset #

fn (s &SpriteBase3D) get_offset() Vector2

fn (SpriteBase3D) set_flip_h #

fn (s &SpriteBase3D) set_flip_h(flip_h bool)

fn (SpriteBase3D) is_flipped_h #

fn (s &SpriteBase3D) is_flipped_h() bool

fn (SpriteBase3D) set_flip_v #

fn (s &SpriteBase3D) set_flip_v(flip_v bool)

fn (SpriteBase3D) is_flipped_v #

fn (s &SpriteBase3D) is_flipped_v() bool

fn (SpriteBase3D) set_modulate #

fn (s &SpriteBase3D) set_modulate(modulate Color)

fn (SpriteBase3D) get_modulate #

fn (s &SpriteBase3D) get_modulate() Color

fn (SpriteBase3D) set_render_priority #

fn (s &SpriteBase3D) set_render_priority(priority i64)

fn (SpriteBase3D) get_render_priority #

fn (s &SpriteBase3D) get_render_priority() i64

fn (SpriteBase3D) set_pixel_size #

fn (s &SpriteBase3D) set_pixel_size(pixel_size f64)

fn (SpriteBase3D) get_pixel_size #

fn (s &SpriteBase3D) get_pixel_size() f64

fn (SpriteBase3D) set_axis #

fn (s &SpriteBase3D) set_axis(axis Vector3Axis)

fn (SpriteBase3D) get_axis #

fn (s &SpriteBase3D) get_axis() Vector3Axis

fn (SpriteBase3D) set_draw_flag #

fn (s &SpriteBase3D) set_draw_flag(flag SpriteBase3DDrawFlags, enabled bool)

If true, the specified flag will be enabled.

fn (SpriteBase3D) get_draw_flag #

fn (s &SpriteBase3D) get_draw_flag(flag SpriteBase3DDrawFlags) bool

Returns the value of the specified flag.

fn (SpriteBase3D) set_alpha_cut_mode #

fn (s &SpriteBase3D) set_alpha_cut_mode(mode SpriteBase3DAlphaCutMode)

fn (SpriteBase3D) get_alpha_cut_mode #

fn (s &SpriteBase3D) get_alpha_cut_mode() SpriteBase3DAlphaCutMode

fn (SpriteBase3D) set_alpha_scissor_threshold #

fn (s &SpriteBase3D) set_alpha_scissor_threshold(threshold f64)

fn (SpriteBase3D) get_alpha_scissor_threshold #

fn (s &SpriteBase3D) get_alpha_scissor_threshold() f64

fn (SpriteBase3D) set_alpha_hash_scale #

fn (s &SpriteBase3D) set_alpha_hash_scale(threshold f64)

fn (SpriteBase3D) get_alpha_hash_scale #

fn (s &SpriteBase3D) get_alpha_hash_scale() f64

fn (SpriteBase3D) set_alpha_antialiasing #

fn (s &SpriteBase3D) set_alpha_antialiasing(alpha_aa BaseMaterial3DAlphaAntiAliasing)

fn (SpriteBase3D) get_alpha_antialiasing #

fn (s &SpriteBase3D) get_alpha_antialiasing() BaseMaterial3DAlphaAntiAliasing

fn (SpriteBase3D) set_alpha_antialiasing_edge #

fn (s &SpriteBase3D) set_alpha_antialiasing_edge(edge f64)

fn (SpriteBase3D) get_alpha_antialiasing_edge #

fn (s &SpriteBase3D) get_alpha_antialiasing_edge() f64

fn (SpriteBase3D) set_billboard_mode #

fn (s &SpriteBase3D) set_billboard_mode(mode BaseMaterial3DBillboardMode)

fn (SpriteBase3D) get_billboard_mode #

fn (s &SpriteBase3D) get_billboard_mode() BaseMaterial3DBillboardMode

fn (SpriteBase3D) set_texture_filter #

fn (s &SpriteBase3D) set_texture_filter(mode BaseMaterial3DTextureFilter)

fn (SpriteBase3D) get_texture_filter #

fn (s &SpriteBase3D) get_texture_filter() BaseMaterial3DTextureFilter

fn (SpriteBase3D) get_item_rect #

fn (s &SpriteBase3D) get_item_rect() Rect2

Returns the rectangle representing this sprite.

fn (SpriteBase3D) generate_triangle_mesh #

fn (s &SpriteBase3D) generate_triangle_mesh() TriangleMesh

Returns a [TriangleMesh] with the sprite's vertices following its current configuration (such as its [member axis] and [member pixel_size]).

struct SpriteFrames #

struct SpriteFrames {
	Resource
}

Sprite frame library for AnimatedSprite2D and AnimatedSprite3D.

fn (SpriteFrames) to_variant #

fn (s &SpriteFrames) to_variant() Variant

fn (SpriteFrames) from_variant #

fn (mut s SpriteFrames) from_variant(variant &Variant)

fn (SpriteFrames) add_animation #

fn (s &SpriteFrames) add_animation(anim string)

Adds a new [param anim] animation to the library.

fn (SpriteFrames) has_animation #

fn (s &SpriteFrames) has_animation(anim string) bool

Returns true if the [param anim] animation exists.

fn (SpriteFrames) duplicate_animation #

fn (s &SpriteFrames) duplicate_animation(anim_from string, anim_to string)

Duplicates the animation [param anim_from] to a new animation named [param anim_to]. Fails if [param anim_to] already exists, or if [param anim_from] does not exist.

fn (SpriteFrames) remove_animation #

fn (s &SpriteFrames) remove_animation(anim string)

Removes the [param anim] animation.

fn (SpriteFrames) rename_animation #

fn (s &SpriteFrames) rename_animation(anim string, newname string)

Changes the [param anim] animation's name to [param newname].

fn (SpriteFrames) get_animation_names #

fn (s &SpriteFrames) get_animation_names() PackedStringArray

Returns an array containing the names associated to each animation. Values are placed in alphabetical order.

fn (SpriteFrames) set_animation_speed #

fn (s &SpriteFrames) set_animation_speed(anim string, fps f64)

Sets the speed for the [param anim] animation in frames per second.

fn (SpriteFrames) get_animation_speed #

fn (s &SpriteFrames) get_animation_speed(anim string) f64

Returns the speed in frames per second for the [param anim] animation.

fn (SpriteFrames) set_animation_loop #

fn (s &SpriteFrames) set_animation_loop(anim string, loop bool)

If [param loop] is true, the [param anim] animation will loop when it reaches the end, or the start if it is played in reverse.

fn (SpriteFrames) get_animation_loop #

fn (s &SpriteFrames) get_animation_loop(anim string) bool

Returns true if the given animation is configured to loop when it finishes playing. Otherwise, returns false.

fn (SpriteFrames) add_frame #

fn (s &SpriteFrames) add_frame(anim string, texture Texture2D, cfg SpriteFrames_add_frame_Cfg)

Adds a frame to the [param anim] animation. If [param at_position] is -1, the frame will be added to the end of the animation. [param duration] specifies the relative duration, see [method get_frame_duration] for details.

fn (SpriteFrames) set_frame #

fn (s &SpriteFrames) set_frame(anim string, idx i64, texture Texture2D, cfg SpriteFrames_set_frame_Cfg)

Sets the [param texture] and the [param duration] of the frame [param idx] in the [param anim] animation. [param duration] specifies the relative duration, see [method get_frame_duration] for details.

fn (SpriteFrames) remove_frame #

fn (s &SpriteFrames) remove_frame(anim string, idx i64)

Removes the [param anim] animation's frame [param idx].

fn (SpriteFrames) get_frame_count #

fn (s &SpriteFrames) get_frame_count(anim string) i64

Returns the number of frames for the [param anim] animation.

fn (SpriteFrames) get_frame_texture #

fn (s &SpriteFrames) get_frame_texture(anim string, idx i64) Texture2D

Returns the texture of the frame [param idx] in the [param anim] animation.

fn (SpriteFrames) get_frame_duration #

fn (s &SpriteFrames) get_frame_duration(anim string, idx i64) f64

Returns a relative duration of the frame [param idx] in the [param anim] animation (defaults to 1.0). For example, a frame with a duration of 2.0 is displayed twice as long as a frame with a duration of 1.0. You can calculate the absolute duration (in seconds) of a frame using the following formula:

absolute_duration = relative_duration / (animation_fps * abs(playing_speed))

In this example, playing_speed refers to either [method AnimatedSprite2D.get_playing_speed] or [method AnimatedSprite3D.get_playing_speed].

fn (SpriteFrames) clear #

fn (s &SpriteFrames) clear(anim string)

Removes all frames from the [param anim] animation.

fn (SpriteFrames) clear_all #

fn (s &SpriteFrames) clear_all()

Removes all animations. An empty default animation will be created.

struct SpriteFrames_add_frame_Cfg #

@[params]
struct SpriteFrames_add_frame_Cfg {
pub:
	duration    f64 = 1.0
	at_position i64 = -1
}

Optional parameters for SpriteFrames#add_frame

struct SpriteFrames_set_frame_Cfg #

@[params]
struct SpriteFrames_set_frame_Cfg {
pub:
	duration f64 = 1.0
}

Optional parameters for SpriteFrames#set_frame

struct StandardMaterial3D #

struct StandardMaterial3D {
	BaseMaterial3D
}

A PBR (Physically Based Rendering) material to be used on 3D objects.

fn (StandardMaterial3D) to_variant #

fn (s &StandardMaterial3D) to_variant() Variant

fn (StandardMaterial3D) from_variant #

fn (mut s StandardMaterial3D) from_variant(variant &Variant)

struct StaticBody2D #

struct StaticBody2D {
	PhysicsBody2D
}

A 2D physics body that can't be moved by external forces. When moved manually, it doesn't affect other bodies in its path.

fn (StaticBody2D) to_variant #

fn (s &StaticBody2D) to_variant() Variant

fn (StaticBody2D) from_variant #

fn (mut s StaticBody2D) from_variant(variant &Variant)

fn (StaticBody2D) set_constant_linear_velocity #

fn (s &StaticBody2D) set_constant_linear_velocity(vel Vector2)

fn (StaticBody2D) set_constant_angular_velocity #

fn (s &StaticBody2D) set_constant_angular_velocity(vel f64)

fn (StaticBody2D) get_constant_linear_velocity #

fn (s &StaticBody2D) get_constant_linear_velocity() Vector2

fn (StaticBody2D) get_constant_angular_velocity #

fn (s &StaticBody2D) get_constant_angular_velocity() f64

fn (StaticBody2D) set_physics_material_override #

fn (s &StaticBody2D) set_physics_material_override(physics_material_override PhysicsMaterial)

fn (StaticBody2D) get_physics_material_override #

fn (s &StaticBody2D) get_physics_material_override() PhysicsMaterial

struct StaticBody3D #

struct StaticBody3D {
	PhysicsBody3D
}

A 3D physics body that can't be moved by external forces. When moved manually, it doesn't affect other bodies in its path.

fn (StaticBody3D) to_variant #

fn (s &StaticBody3D) to_variant() Variant

fn (StaticBody3D) from_variant #

fn (mut s StaticBody3D) from_variant(variant &Variant)

fn (StaticBody3D) set_constant_linear_velocity #

fn (s &StaticBody3D) set_constant_linear_velocity(vel Vector3)

fn (StaticBody3D) set_constant_angular_velocity #

fn (s &StaticBody3D) set_constant_angular_velocity(vel Vector3)

fn (StaticBody3D) get_constant_linear_velocity #

fn (s &StaticBody3D) get_constant_linear_velocity() Vector3

fn (StaticBody3D) get_constant_angular_velocity #

fn (s &StaticBody3D) get_constant_angular_velocity() Vector3

fn (StaticBody3D) set_physics_material_override #

fn (s &StaticBody3D) set_physics_material_override(physics_material_override PhysicsMaterial)

fn (StaticBody3D) get_physics_material_override #

fn (s &StaticBody3D) get_physics_material_override() PhysicsMaterial

struct StatusIndicator #

struct StatusIndicator {
	Node
}

Application status indicator (aka notification area icon). [b]Note:[/b] Status indicator is implemented on macOS and Windows.

fn (StatusIndicator) to_variant #

fn (s &StatusIndicator) to_variant() Variant

fn (StatusIndicator) from_variant #

fn (mut s StatusIndicator) from_variant(variant &Variant)

fn (StatusIndicator) set_tooltip #

fn (s &StatusIndicator) set_tooltip(tooltip string)

fn (StatusIndicator) get_tooltip #

fn (s &StatusIndicator) get_tooltip() string

fn (StatusIndicator) set_icon #

fn (s &StatusIndicator) set_icon(texture Texture2D)

fn (StatusIndicator) get_icon #

fn (s &StatusIndicator) get_icon() Texture2D

fn (StatusIndicator) set_visible #

fn (s &StatusIndicator) set_visible(visible bool)

fn (StatusIndicator) is_visible #

fn (s &StatusIndicator) is_visible() bool

fn (StatusIndicator) set_menu #

fn (s &StatusIndicator) set_menu(menu NodePath)

fn (StatusIndicator) get_menu #

fn (s &StatusIndicator) get_menu() NodePath

fn (StatusIndicator) get_rect #

fn (s &StatusIndicator) get_rect() Rect2

Returns the status indicator rectangle in screen coordinates. If this status indicator is not visible, returns an empty [Rect2].

struct StreamPeer #

struct StreamPeer {
	RefCounted
}

Abstract base class for interacting with streams.

fn (StreamPeer) to_variant #

fn (s &StreamPeer) to_variant() Variant

fn (StreamPeer) from_variant #

fn (mut s StreamPeer) from_variant(variant &Variant)

fn (StreamPeer) put_data #

fn (s &StreamPeer) put_data(data PackedByteArray) GDError

Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum Error] code.

fn (StreamPeer) put_partial_data #

fn (s &StreamPeer) put_partial_data(data PackedByteArray) Array

Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum Error] code and an integer, describing how much data was actually sent.

fn (StreamPeer) get_data #

fn (s &StreamPeer) get_data(bytes i64) Array

Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the [param bytes] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum Error] code and a data array.

fn (StreamPeer) get_partial_data #

fn (s &StreamPeer) get_partial_data(bytes i64) Array

Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the [param bytes] argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values: an [enum Error] code and a data array.

fn (StreamPeer) get_available_bytes #

fn (s &StreamPeer) get_available_bytes() i64

Returns the number of bytes this [StreamPeer] has available.

fn (StreamPeer) set_big_endian #

fn (s &StreamPeer) set_big_endian(enable bool)

fn (StreamPeer) is_big_endian_enabled #

fn (s &StreamPeer) is_big_endian_enabled() bool

fn (StreamPeer) put_8 #

fn (s &StreamPeer) put_8(value i64)

Puts a signed byte into the stream.

fn (StreamPeer) put_u8 #

fn (s &StreamPeer) put_u8(value i64)

Puts an unsigned byte into the stream.

fn (StreamPeer) put_16 #

fn (s &StreamPeer) put_16(value i64)

Puts a signed 16-bit value into the stream.

fn (StreamPeer) put_u16 #

fn (s &StreamPeer) put_u16(value i64)

Puts an unsigned 16-bit value into the stream.

fn (StreamPeer) put_32 #

fn (s &StreamPeer) put_32(value i64)

Puts a signed 32-bit value into the stream.

fn (StreamPeer) put_u32 #

fn (s &StreamPeer) put_u32(value i64)

Puts an unsigned 32-bit value into the stream.

fn (StreamPeer) put_64 #

fn (s &StreamPeer) put_64(value i64)

Puts a signed 64-bit value into the stream.

fn (StreamPeer) put_u64 #

fn (s &StreamPeer) put_u64(value i64)

Puts an unsigned 64-bit value into the stream.

fn (StreamPeer) put_half #

fn (s &StreamPeer) put_half(value f64)

Puts a half-precision float into the stream.

fn (StreamPeer) put_float #

fn (s &StreamPeer) put_float(value f64)

Puts a single-precision float into the stream.

fn (StreamPeer) put_double #

fn (s &StreamPeer) put_double(value f64)

Puts a double-precision float into the stream.

fn (StreamPeer) put_string #

fn (s &StreamPeer) put_string(value string)

Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size. [b]Note:[/b] To put an ASCII string without prepending its size, you can use [method put_data]: [codeblocks] [gdscript] put_data("Hello world".to_ascii_buffer()) [/gdscript] [csharp] PutData("Hello World".ToAsciiBuffer()); [/csharp] [/codeblocks]

fn (StreamPeer) put_utf8_string #

fn (s &StreamPeer) put_utf8_string(value string)

Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. [b]Note:[/b] To put a UTF-8 string without prepending its size, you can use [method put_data]: [codeblocks] [gdscript] put_data("Hello world".to_utf8_buffer()) [/gdscript] [csharp] PutData("Hello World".ToUtf8Buffer()); [/csharp] [/codeblocks]

fn (StreamPeer) put_var #

fn (s &StreamPeer) put_var(value_ ToVariant, cfg StreamPeer_put_var_Cfg)

Puts a Variant into the stream. If [param full_objects] is true encoding objects is allowed (and can potentially include code). Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method.

fn (StreamPeer) get_8 #

fn (s &StreamPeer) get_8() i64

Gets a signed byte from the stream.

fn (StreamPeer) get_u8 #

fn (s &StreamPeer) get_u8() i64

Gets an unsigned byte from the stream.

fn (StreamPeer) get_16 #

fn (s &StreamPeer) get_16() i64

Gets a signed 16-bit value from the stream.

fn (StreamPeer) get_u16 #

fn (s &StreamPeer) get_u16() i64

Gets an unsigned 16-bit value from the stream.

fn (StreamPeer) get_32 #

fn (s &StreamPeer) get_32() i64

Gets a signed 32-bit value from the stream.

fn (StreamPeer) get_u32 #

fn (s &StreamPeer) get_u32() i64

Gets an unsigned 32-bit value from the stream.

fn (StreamPeer) get_64 #

fn (s &StreamPeer) get_64() i64

Gets a signed 64-bit value from the stream.

fn (StreamPeer) get_u64 #

fn (s &StreamPeer) get_u64() i64

Gets an unsigned 64-bit value from the stream.

fn (StreamPeer) get_half #

fn (s &StreamPeer) get_half() f64

Gets a half-precision float from the stream.

fn (StreamPeer) get_float #

fn (s &StreamPeer) get_float() f64

Gets a single-precision float from the stream.

fn (StreamPeer) get_double #

fn (s &StreamPeer) get_double() f64

Gets a double-precision float from the stream.

fn (StreamPeer) get_string #

fn (s &StreamPeer) get_string(cfg StreamPeer_get_string_Cfg) string

Gets an ASCII string with byte-length [param bytes] from the stream. If [param bytes] is negative (default) the length will be read from the stream using the reverse process of [method put_string].

fn (StreamPeer) get_utf8_string #

fn (s &StreamPeer) get_utf8_string(cfg StreamPeer_get_utf8_string_Cfg) string

Gets a UTF-8 string with byte-length [param bytes] from the stream (this decodes the string sent as UTF-8). If [param bytes] is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string].

fn (StreamPeer) get_var #

fn (s &StreamPeer) get_var(cfg StreamPeer_get_var_Cfg) Variant

Gets a Variant from the stream. If [param allow_objects] is true, decoding objects is allowed. Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.

struct StreamPeerBuffer #

struct StreamPeerBuffer {
	StreamPeer
}

A stream peer used to handle binary data streams.

fn (StreamPeerBuffer) to_variant #

fn (s &StreamPeerBuffer) to_variant() Variant

fn (StreamPeerBuffer) from_variant #

fn (mut s StreamPeerBuffer) from_variant(variant &Variant)

fn (StreamPeerBuffer) seek #

fn (s &StreamPeerBuffer) seek(position i64)

Moves the cursor to the specified position. [param position] must be a valid index of [member data_array].

fn (StreamPeerBuffer) get_size #

fn (s &StreamPeerBuffer) get_size() i64

Returns the size of [member data_array].

fn (StreamPeerBuffer) get_position #

fn (s &StreamPeerBuffer) get_position() i64

Returns the current cursor position.

fn (StreamPeerBuffer) resize #

fn (s &StreamPeerBuffer) resize(size i64)

Resizes the [member data_array]. This [i]doesn't[/i] update the cursor.

fn (StreamPeerBuffer) set_data_array #

fn (s &StreamPeerBuffer) set_data_array(data PackedByteArray)

fn (StreamPeerBuffer) get_data_array #

fn (s &StreamPeerBuffer) get_data_array() PackedByteArray

fn (StreamPeerBuffer) clear #

fn (s &StreamPeerBuffer) clear()

Clears the [member data_array] and resets the cursor.

fn (StreamPeerBuffer) duplicate #

fn (s &StreamPeerBuffer) duplicate() StreamPeerBuffer

Returns a new [StreamPeerBuffer] with the same [member data_array] content.

struct StreamPeerExtension #

struct StreamPeerExtension {
	StreamPeer
}

fn (StreamPeerExtension) to_variant #

fn (s &StreamPeerExtension) to_variant() Variant

fn (StreamPeerExtension) from_variant #

fn (mut s StreamPeerExtension) from_variant(variant &Variant)

fn (StreamPeerExtension) gd_get_data #

fn (s &StreamPeerExtension) gd_get_data(r_buffer &u8, r_bytes i64, r_received &i32) GDError

fn (StreamPeerExtension) gd_get_partial_data #

fn (s &StreamPeerExtension) gd_get_partial_data(r_buffer &u8, r_bytes i64, r_received &i32) GDError

fn (StreamPeerExtension) gd_put_data #

fn (s &StreamPeerExtension) gd_put_data(p_data &u8, p_bytes i64, r_sent &i32) GDError

fn (StreamPeerExtension) gd_put_partial_data #

fn (s &StreamPeerExtension) gd_put_partial_data(p_data &u8, p_bytes i64, r_sent &i32) GDError

fn (StreamPeerExtension) gd_get_available_bytes #

fn (s &StreamPeerExtension) gd_get_available_bytes() i64

struct StreamPeerGZIP #

struct StreamPeerGZIP {
	StreamPeer
}

A stream peer that handles GZIP and deflate compression/decompression.

fn (StreamPeerGZIP) to_variant #

fn (s &StreamPeerGZIP) to_variant() Variant

fn (StreamPeerGZIP) from_variant #

fn (mut s StreamPeerGZIP) from_variant(variant &Variant)

fn (StreamPeerGZIP) start_compression #

fn (s &StreamPeerGZIP) start_compression(cfg StreamPeerGZIP_start_compression_Cfg) GDError

Start the stream in compression mode with the given [param buffer_size], if [param use_deflate] is true uses deflate instead of GZIP.

fn (StreamPeerGZIP) start_decompression #

fn (s &StreamPeerGZIP) start_decompression(cfg StreamPeerGZIP_start_decompression_Cfg) GDError

Start the stream in decompression mode with the given [param buffer_size], if [param use_deflate] is true uses deflate instead of GZIP.

fn (StreamPeerGZIP) finish #

fn (s &StreamPeerGZIP) finish() GDError

Finalizes the stream, compressing any buffered chunk left. You must call it only when you are compressing.

fn (StreamPeerGZIP) clear #

fn (s &StreamPeerGZIP) clear()

Clears this stream, resetting the internal state.

struct StreamPeerGZIP_start_compression_Cfg #

@[params]
struct StreamPeerGZIP_start_compression_Cfg {
pub:
	use_deflate bool
	buffer_size i64 = 65535
}

Optional parameters for StreamPeerGZIP#start_compression

struct StreamPeerGZIP_start_decompression_Cfg #

@[params]
struct StreamPeerGZIP_start_decompression_Cfg {
pub:
	use_deflate bool
	buffer_size i64 = 65535
}

Optional parameters for StreamPeerGZIP#start_decompression

struct StreamPeerTCP #

struct StreamPeerTCP {
	StreamPeer
}

A stream peer that handles TCP connections.

fn (StreamPeerTCP) to_variant #

fn (s &StreamPeerTCP) to_variant() Variant

fn (StreamPeerTCP) from_variant #

fn (mut s StreamPeerTCP) from_variant(variant &Variant)

fn (StreamPeerTCP) bind #

fn (s &StreamPeerTCP) bind(port i64, cfg StreamPeerTCP_bind_Cfg) GDError

Opens the TCP socket, and binds it to the specified local address. This method is generally not needed, and only used to force the subsequent call to [method connect_to_host] to use the specified [param host] and [param port] as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface.

fn (StreamPeerTCP) connect_to_host #

fn (s &StreamPeerTCP) connect_to_host(host string, port i64) GDError

Connects to the specified host:port pair. A hostname will be resolved if valid. Returns [constant OK] on success.

fn (StreamPeerTCP) poll #

fn (s &StreamPeerTCP) poll() GDError

Poll the socket, updating its state. See [method get_status].

fn (StreamPeerTCP) get_status #

fn (s &StreamPeerTCP) get_status() StreamPeerTCPStatus

Returns the status of the connection.

fn (StreamPeerTCP) get_connected_host #

fn (s &StreamPeerTCP) get_connected_host() string

Returns the IP of this peer.

fn (StreamPeerTCP) get_connected_port #

fn (s &StreamPeerTCP) get_connected_port() i64

Returns the port of this peer.

fn (StreamPeerTCP) get_local_port #

fn (s &StreamPeerTCP) get_local_port() i64

Returns the local port to which this peer is bound.

fn (StreamPeerTCP) disconnect_from_host #

fn (s &StreamPeerTCP) disconnect_from_host()

Disconnects from host.

fn (StreamPeerTCP) set_no_delay #

fn (s &StreamPeerTCP) set_no_delay(enabled bool)

If [param enabled] is true, packets will be sent immediately. If [param enabled] is false (the default), packet transfers will be delayed and combined using [url=https://en.wikipedia.org/wiki/Nagle%27s_algorithm]Nagle's algorithm[/url]. [b]Note:[/b] It's recommended to leave this disabled for applications that send large packets or need to transfer a lot of data, as enabling this can decrease the total available bandwidth.

struct StreamPeerTCP_bind_Cfg #

@[params]
struct StreamPeerTCP_bind_Cfg {
pub:
	host string
}

Optional parameters for StreamPeerTCP#bind

struct StreamPeerTLS #

struct StreamPeerTLS {
	StreamPeer
}

A stream peer that handles TLS connections.

fn (StreamPeerTLS) to_variant #

fn (s &StreamPeerTLS) to_variant() Variant

fn (StreamPeerTLS) from_variant #

fn (mut s StreamPeerTLS) from_variant(variant &Variant)

fn (StreamPeerTLS) poll #

fn (s &StreamPeerTLS) poll()

Poll the connection to check for incoming bytes. Call this right before [method StreamPeer.get_available_bytes] for it to work properly.

fn (StreamPeerTLS) accept_stream #

fn (s &StreamPeerTLS) accept_stream(stream StreamPeer, server_options TLSOptions) GDError

Accepts a peer connection as a server using the given [param server_options]. See [method TLSOptions.server].

fn (StreamPeerTLS) connect_to_stream #

fn (s &StreamPeerTLS) connect_to_stream(stream StreamPeer, common_name string, cfg StreamPeerTLS_connect_to_stream_Cfg) GDError

Connects to a peer using an underlying [StreamPeer] [param stream] and verifying the remote certificate is correctly signed for the given [param common_name]. You can pass the optional [param client_options] parameter to customize the trusted certification authorities, or disable the common name verification. See [method TLSOptions.client] and [method TLSOptions.client_unsafe].

fn (StreamPeerTLS) get_status #

fn (s &StreamPeerTLS) get_status() StreamPeerTLSStatus

Returns the status of the connection.

fn (StreamPeerTLS) get_stream #

fn (s &StreamPeerTLS) get_stream() StreamPeer

Returns the underlying [StreamPeer] connection, used in [method accept_stream] or [method connect_to_stream].

fn (StreamPeerTLS) disconnect_from_stream #

fn (s &StreamPeerTLS) disconnect_from_stream()

Disconnects from host.

struct StreamPeerTLS_connect_to_stream_Cfg #

@[params]
struct StreamPeerTLS_connect_to_stream_Cfg {
pub:
	client_options TLSOptions
}

Optional parameters for StreamPeerTLS#connect_to_stream

struct StreamPeer_get_string_Cfg #

@[params]
struct StreamPeer_get_string_Cfg {
pub:
	bytes i64 = -1
}

Optional parameters for StreamPeer#get_string

struct StreamPeer_get_utf8_string_Cfg #

@[params]
struct StreamPeer_get_utf8_string_Cfg {
pub:
	bytes i64 = -1
}

Optional parameters for StreamPeer#get_utf8_string

struct StreamPeer_get_var_Cfg #

@[params]
struct StreamPeer_get_var_Cfg {
pub:
	allow_objects bool
}

Optional parameters for StreamPeer#get_var

struct StreamPeer_put_var_Cfg #

@[params]
struct StreamPeer_put_var_Cfg {
pub:
	full_objects bool
}

Optional parameters for StreamPeer#put_var

struct String #

@[packed]
struct String {
	data_ [8]u8
}

A built-in type for strings.

This is the built-in string Variant type (and the one used by GDScript). Strings may contain any number of Unicode characters, and expose methods useful for manipulating and generating strings. Strings are reference-counted and use a copy-on-write approach (every modification to a string returns a new [String]), so passing them around is cheap in resources. Some string methods have corresponding variations. Variations suffixed with n ([method countn], [method findn], [method replacen], etc.) are [b]case-insensitive[/b] (they make no distinction between uppercase and lowercase letters). Method variations prefixed with r ([method rfind], [method rsplit], etc.) are reversed, and start from the end of the string, instead of the beginning. To convert any [Variant] to or from a string, see [method @GlobalScope.str], [method @GlobalScope.str_to_var], and [method @GlobalScope.var_to_str]. [b]Note:[/b] In a boolean context, a string will evaluate to false if it is empty (""). Otherwise, a string will always evaluate to true.

fn (String) % #

fn (a String) % (b String) String

fn (String) + #

fn (a String) + (b String) String

Appends [param right] at the end of this [String], also known as a string concatenation.

fn (String) < #

fn (a String) < (b String) bool

Returns true if the left [String] comes before [param right] in [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url], which roughly matches the alphabetical order. Useful for sorting.

fn (String) == #

fn (a String) == (b String) bool

Returns true if both strings contain the same sequence of characters.

fn (String) add_string #

fn (a String) add_string(b String) String

Appends [param right] at the end of this [String], also known as a string concatenation.

fn (String) add_stringname #

fn (a String) add_stringname(b StringName) String

Appends [param right] at the end of this [String], returning a [String]. This is also known as a string concatenation.

fn (String) begins_with #

fn (s &String) begins_with(text string) bool

Returns true if the string begins with the given [param text]. See also [method ends_with].

fn (String) bigrams #

fn (s &String) bigrams() PackedStringArray

Returns an array containing the bigrams (pairs of consecutive characters) of this string.

print('Get up!'.bigrams()) ##

fn (String) bin_to_int #

fn (s &String) bin_to_int() i64

Converts the string representing a binary number into an [int]. The string may optionally be prefixed with "0b", and an additional - prefix for negative numbers. [codeblocks] [gdscript] print("101".bin_to_int()) # Prints 5 print("0b101".bin_to_int()) # Prints 5 print("-0b10".bin_to_int()) # Prints -2 [/gdscript] [csharp] GD.Print("101".BinToInt()); // Prints 5 GD.Print("0b101".BinToInt()); // Prints 5 GD.Print("-0b10".BinToInt()); // Prints -2 [/csharp] [/codeblocks]

fn (String) c_escape #

fn (s &String) c_escape() String

Returns a copy of the string with special characters escaped using the C language standard.

fn (String) c_unescape #

fn (s &String) c_unescape() String

Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are \', \", \\, \a, \b, \f, \n, \r, \t, \v. [b]Note:[/b] Unlike the GDScript parser, this method doesn't support the \uXXXX escape sequence.

fn (String) capitalize #

fn (s &String) capitalize() String

Changes the appearance of the string: replaces underscores (_) with spaces, adds spaces before uppercase letters in the middle of a word, converts all letters to lowercase, then converts the first one and each one following a space to uppercase. [codeblocks] [gdscript] "move_local_x".capitalize() # Returns "Move Local X" "sceneFile_path".capitalize() # Returns "Scene File Path" "2D, FPS, PNG".capitalize() # Returns "2d, Fps, Png" [/gdscript] [csharp] "move_local_x".Capitalize(); // Returns "Move Local X" "sceneFile_path".Capitalize(); // Returns "Scene File Path" "2D, FPS, PNG".Capitalize(); // Returns "2d, Fps, Png" [/csharp] [/codeblocks]

fn (String) casecmp_to #

fn (s &String) casecmp_to(to string) i64

Performs a case-sensitive comparison to another string. Returns -1 if less than, 1 if greater than, or 0 if equal. "Less than" and "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. If the character comparison reaches the end of one string, but the other string contains more characters, then it will use length as the deciding factor: 1 will be returned if this string is longer than the [param to] string, or -1 if shorter. Note that the length of empty strings is always 0. To get a [bool] result from a string comparison, use the == operator instead. See also [method nocasecmp_to], [method filecasecmp_to], and [method naturalcasecmp_to].

fn (String) contains #

fn (s &String) contains(what string) bool

Returns true if the string contains [param what]. In GDScript, this corresponds to the in operator. [codeblocks] [gdscript] print("Node".contains("de")) # Prints true print("team".contains("I")) # Prints false print("I" in "team") # Prints false [/gdscript] [csharp] GD.Print("Node".Contains("de")); // Prints True GD.Print("team".Contains("I")); // Prints False [/csharp] [/codeblocks] If you need to know where [param what] is within the string, use [method find]. See also [method containsn].

fn (String) containsn #

fn (s &String) containsn(what string) bool

Returns true if the string contains [param what], [b]ignoring case[/b]. If you need to know where [param what] is within the string, use [method findn]. See also [method contains].

fn (String) count #

fn (s &String) count(what string, cfg String_count_Cfg) i64

Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions. If [param to] is 0, the search continues until the end of the string.

fn (String) countn #

fn (s &String) countn(what string, cfg String_countn_Cfg) i64

Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions, [b]ignoring case[/b]. If [param to] is 0, the search continues until the end of the string.

fn (String) dedent #

fn (s &String) dedent() String

Returns a copy of the string with indentation (leading tabs and spaces) removed. See also [method indent] to add indentation.

fn (String) deinit #

fn (s &String) deinit()

fn (String) ends_with #

fn (s &String) ends_with(text string) bool

Returns true if the string ends with the given [param text]. See also [method begins_with].

fn (String) eq_string #

fn (a String) eq_string(b String) bool

Returns true if both strings contain the same sequence of characters.

fn (String) eq_stringname #

fn (a String) eq_stringname(b StringName) bool

Returns true if this [String] is equivalent to the given [StringName].

fn (String) erase #

fn (s &String) erase(position i64, cfg String_erase_Cfg) String

Returns a string with [param chars] characters erased starting from [param position]. If [param chars] goes beyond the string's length given the specified [param position], fewer characters will be erased from the returned string. Returns an empty string if either [param position] or [param chars] is negative. Returns the original string unmodified if [param chars] is 0.

fn (String) filecasecmp_to #

fn (s &String) filecasecmp_to(to string) i64

Like [method naturalcasecmp_to] but prioritizes strings that begin with periods (.) and underscores (_) before any other character. Useful when sorting folders or file names. To get a [bool] result from a string comparison, use the == operator instead. See also [method filenocasecmp_to], [method naturalcasecmp_to], and [method casecmp_to].

fn (String) filenocasecmp_to #

fn (s &String) filenocasecmp_to(to string) i64

Like [method naturalnocasecmp_to] but prioritizes strings that begin with periods (.) and underscores (_) before any other character. Useful when sorting folders or file names. To get a [bool] result from a string comparison, use the == operator instead. See also [method filecasecmp_to], [method naturalnocasecmp_to], and [method nocasecmp_to].

fn (String) find #

fn (s &String) find(what string, cfg String_find_Cfg) i64

Returns the index of the [b]first[/b] occurrence of [param what] in this string, or -1 if there are none. The search's start can be specified with [param from], continuing to the end of the string. [codeblocks] [gdscript] print("Team".find("I")) # Prints -1

print("Potato".find("t")) # Prints 2 print("Potato".find("t", 3)) # Prints 4 print("Potato".find("t", 5)) # Prints -1 [/gdscript] [csharp] GD.Print("Team".Find("I")); // Prints -1

GD.Print("Potato".Find("t")); // Prints 2 GD.Print("Potato".Find("t", 3)); // Prints 4 GD.Print("Potato".Find("t", 5)); // Prints -1 [/csharp] [/codeblocks] [b]Note:[/b] If you just want to know whether the string contains [param what], use [method contains]. In GDScript, you may also use the in operator.

fn (String) findn #

fn (s &String) findn(what string, cfg String_findn_Cfg) i64

Returns the index of the [b]first[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or -1 if there are none. The starting search index can be specified with [param from], continuing to the end of the string.

fn (String) format #

fn (s &String) format(values_ ToVariant, cfg String_format_Cfg) String

Formats the string by replacing all occurrences of [param placeholder] with the elements of [param values]. [param values] can be a [Dictionary], an [Array], or an [Object]. Any underscores in [param placeholder] will be replaced with the corresponding keys in advance. Array elements use their index as keys.

##var use_array_values = 'Waiting for {0} is a play by {1}, and {0} Engine is named after it.'
print(use_array_values.format(['Godot', 'Samuel Beckett']))

##print('User {id} is {name}.'.format({'id': 42, 'name': 'Godot'}))

Some additional handling is performed when [param values] is an [Array]. If [param placeholder] does not contain an underscore, the elements of the [param values] array will be used to replace one occurrence of the placeholder in order; If an element of [param values] is another 2-element array, it'll be interpreted as a key-value pair.

##print('User {} is {}.'.format([42, 'Godot'], '{}'))
print('User {id} is {name}.'.format([['id', 42], ['name', 'Godot']]))

When passing an [Object], the property names from [method Object.get_property_list] are used as keys.

##var node = Node2D.new()
print('Visible {visible}, position {position}'.format(node))

See also the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format string[/url] tutorial. [b]Note:[/b] Each replacement is done sequentially for each element of [param values], [b]not[/b] all at once. This means that if any element is inserted and it contains another placeholder, it may be changed by the next replacement. While this can be very useful, it often causes unexpected results. If not necessary, make sure [param values]'s elements do not contain placeholders.

print('{0} {1}'.format(['{1}', 'x']))           ##print('{0} {1}'.format(['x', '{0}']))           ##print('{a} {b}'.format({'a': '{b}', 'b': 'c'})) ##print('{a} {b}'.format({'b': 'c', 'a': '{b}'})) ##

[b]Note:[/b] In C#, it's recommended to [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]interpolate strings with "$"[/url], instead.

fn (String) from_variant #

fn (mut s String) from_variant(variant &Variant)

fn (String) gd_match #

fn (s &String) gd_match(expr string) bool

Does a simple expression match (also called "glob" or "globbing"), where * matches zero or more arbitrary characters and ? matches any single character except a period (.). An empty string or empty expression always evaluates to false.

fn (String) ge_string #

fn (a String) ge_string(b String) bool

Returns true if the left [String] comes after [param right] in [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url], which roughly matches the alphabetical order, or if both are equal.

fn (String) get_base_dir #

fn (s &String) get_base_dir() String

If the string is a valid file path, returns the base directory name.

var dir_path = '/path/to/file.txt'.get_base_dir() ##

fn (String) get_basename #

fn (s &String) get_basename() String

If the string is a valid file path, returns the full file path, without the extension.

var base = '/path/to/file.txt'.get_basename() ##

fn (String) get_extension #

fn (s &String) get_extension() String

If the string is a valid file name or path, returns the file extension without the leading period (.). Otherwise, returns an empty string.

var a = '/path/to/file.txt'.get_extension() ##var b = 'cool.txt'.get_extension()          ##var c = 'cool.font.tres'.get_extension()    ##var d = '.pack1'.get_extension()            ##
var e = 'file.txt.'.get_extension()  ##var f = 'file.txt..'.get_extension() ##var g = 'txt'.get_extension()        ##var h = ''.get_extension()           ##

fn (String) get_file #

fn (s &String) get_file() String

If the string is a valid file path, returns the file name, including the extension.

var file = '/path/to/icon.png'.get_file() ##

fn (String) get_slice #

fn (s &String) get_slice(delimiter string, slice i64) String

Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns the original string if [param delimiter] does not occur in the string. Returns an empty string if the [param slice] does not exist. This is faster than [method split], if you only need one substring.

print('i/am/example/hi'.get_slice('/', 2)) ##

fn (String) get_slice_count #

fn (s &String) get_slice_count(delimiter string) i64

Returns the total number of slices when the string is split with the given [param delimiter] (see [method split]).

fn (String) get_slicec #

fn (s &String) get_slicec(delimiter i64, slice i64) String

Splits the string using a Unicode character with code [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist. This is faster than [method split], if you only need one substring.

fn (String) gt_string #

fn (a String) gt_string(b String) bool

Returns true if the left [String] comes after [param right] in [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url], which roughly matches the alphabetical order. Useful for sorting.

fn (String) hash #

fn (s &String) hash() i64

Returns the 32-bit hash value representing the string's contents. [b]Note:[/b] Strings with equal hash values are [i]not[/i] guaranteed to be the same, as a result of hash collisions. On the contrary, strings with different hash values are guaranteed to be different.

fn (String) hex_decode #

fn (s &String) hex_decode() PackedByteArray

Decodes a hexadecimal string as a [PackedByteArray]. [codeblocks] [gdscript] var text = "hello world" var encoded = text.to_utf8_buffer().hex_encode() # outputs "68656c6c6f20776f726c64" print(encoded.hex_decode().get_string_from_utf8()) [/gdscript] [csharp] var text = "hello world"; var encoded = text.ToUtf8Buffer().HexEncode(); // outputs "68656c6c6f20776f726c64" GD.Print(encoded.HexDecode().GetStringFromUtf8()); [/csharp] [/codeblocks]

fn (String) hex_to_int #

fn (s &String) hex_to_int() i64

Converts the string representing a hexadecimal number into an [int]. The string may be optionally prefixed with "0x", and an additional - prefix for negative numbers. [codeblocks] [gdscript] print("0xff".hex_to_int()) # Prints 255 print("ab".hex_to_int()) # Prints 171 [/gdscript] [csharp] GD.Print("0xff".HexToInt()); // Prints 255 GD.Print("ab".HexToInt()); // Prints 171 [/csharp] [/codeblocks]

fn (String) in #

fn (a String) in(b String) bool

fn (String) in_array #

fn (a String) in_array(b Array) bool

fn (String) in_dictionary #

fn (a String) in_dictionary(b Dictionary) bool

fn (String) in_object #

fn (a String) in_object(b Object) bool

fn (String) in_packedstringarray #

fn (a String) in_packedstringarray(b PackedStringArray) bool

fn (String) in_string #

fn (a String) in_string(b String) bool

fn (String) in_stringname #

fn (a String) in_stringname(b StringName) bool

fn (String) indent #

fn (s &String) indent(prefix string) String

Indents every line of the string with the given [param prefix]. Empty lines are not indented. See also [method dedent] to remove indentation. For example, the string can be indented with two tabulations using "\t\t", or four spaces using " ".

fn (String) index #

fn (v &String) index(i i64) String

fn (String) insert #

fn (s &String) insert(position i64, what string) String

Inserts [param what] at the given [param position] in the string.

fn (String) is_absolute_path #

fn (s &String) is_absolute_path() bool

Returns true if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of [method is_relative_path]. This includes all paths starting with "res://", "user://", "C:\", "/", etc.

fn (String) is_empty #

fn (s &String) is_empty() bool

Returns true if the string's length is 0 (""). See also [method length].

fn (String) is_relative_path #

fn (s &String) is_relative_path() bool

Returns true if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current [Node] (if the string is derived from a [NodePath]), and may sometimes be prefixed with "./". This method is the opposite of [method is_absolute_path].

fn (String) is_subsequence_of #

fn (s &String) is_subsequence_of(text string) bool

Returns true if all characters of this string can be found in [param text] in their original order. This is not the same as [method contains].

var text = 'Wow, incredible!'

print('inedible'.is_subsequence_of(text)) ##print('Word!'.is_subsequence_of(text))    ##print('Window'.is_subsequence_of(text))   ##print(''.is_subsequence_of(text))         ##

fn (String) is_subsequence_ofn #

fn (s &String) is_subsequence_ofn(text string) bool

Returns true if all characters of this string can be found in [param text] in their original order, [b]ignoring case[/b]. This is not the same as [method containsn].

fn (String) is_valid_ascii_identifier #

fn (s &String) is_valid_ascii_identifier() bool

Returns true if this string is a valid ASCII identifier. A valid ASCII identifier may contain only letters, digits, and underscores (_), and the first character may not be a digit.

print('node_2d'.is_valid_ascii_identifier())    ##print('TYPE_FLOAT'.is_valid_ascii_identifier()) ##print('1st_method'.is_valid_ascii_identifier()) ##print('MyMethod#2'.is_valid_ascii_identifier()) ##

See also [method is_valid_unicode_identifier].

fn (String) is_valid_filename #

fn (s &String) is_valid_filename() bool

Returns true if this string is a valid file name. A valid file name cannot be empty, begin or end with space characters, or contain characters that are not allowed (: / \ ? * " | % < >).

fn (String) is_valid_float #

fn (s &String) is_valid_float() bool

Returns true if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point (.), and the exponent letter (e). It may also be prefixed with a positive (+) or negative (-) sign. Any valid integer is also a valid float (see [method is_valid_int]). See also [method to_float].

print('1.7'.is_valid_float())   ##print('24'.is_valid_float())    ##print('7e3'.is_valid_float())   ##print('Hello'.is_valid_float()) ##

fn (String) is_valid_hex_number #

fn (s &String) is_valid_hex_number(cfg String_is_valid_hex_number_Cfg) bool

Returns true if this string is a valid hexadecimal number. A valid hexadecimal number only contains digits or letters A to F (either uppercase or lowercase), and may be prefixed with a positive (+) or negative (-) sign. If [param with_prefix] is true, the hexadecimal number needs to prefixed by "0x" to be considered valid.

print('A08E'.is_valid_hex_number())    ##print('-AbCdEf'.is_valid_hex_number()) ##print('2.5'.is_valid_hex_number())     ##
print('0xDEADC0DE'.is_valid_hex_number(true)) ##

fn (String) is_valid_html_color #

fn (s &String) is_valid_html_color() bool

Returns true if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see [method is_valid_hex_number]) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (#). Other HTML notations for colors, such as names or hsl(), are not considered valid. See also [method Color.html].

fn (String) is_valid_identifier #

fn (s &String) is_valid_identifier() bool

Returns true if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (_), and the first character may not be a digit.

print('node_2d'.is_valid_identifier())    ##print('TYPE_FLOAT'.is_valid_identifier()) ##print('1st_method'.is_valid_identifier()) ##print('MyMethod#2'.is_valid_identifier()) ##

fn (String) is_valid_int #

fn (s &String) is_valid_int() bool

Returns true if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive (+) or negative (-) sign. See also [method to_int].

print('7'.is_valid_int())    ##print('1.65'.is_valid_int()) ##print('Hi'.is_valid_int())   ##print('+3'.is_valid_int())   ##print('-12'.is_valid_int())  ##

fn (String) is_valid_ip_address #

fn (s &String) is_valid_ip_address() bool

Returns true if this string represents a well-formatted IPv4 or IPv6 address. This method considers [url=https://en.wikipedia.org/wiki/Reserved_IP_addresses]reserved IP addresses[/url] such as "0.0.0.0" and "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" as valid.

fn (String) is_valid_unicode_identifier #

fn (s &String) is_valid_unicode_identifier() bool

Returns true if this string is a valid Unicode identifier. A valid Unicode identifier must begin with a Unicode character of class XID_Start or "_", and may contain Unicode characters of class XID_Continue in the other positions.

print('node_2d'.is_valid_unicode_identifier())      ##print('1st_method'.is_valid_unicode_identifier())   ##print('MyMethod#2'.is_valid_unicode_identifier())   ##print('állóképesség'.is_valid_unicode_identifier()) ##print('выносливость'.is_valid_unicode_identifier()) ##print('体力'.is_valid_unicode_identifier())         ##

See also [method is_valid_ascii_identifier]. [b]Note:[/b] This method checks identifiers the same way as GDScript. See [method TextServer.is_valid_identifier] for more advanced checks.

fn (String) join #

fn (s &String) join(parts PackedStringArray) String

Returns the concatenation of [param parts]' elements, with each element separated by the string calling this method. This method is the opposite of [method split]. [codeblocks] [gdscript] var fruits = ["Apple", "Orange", "Pear", "Kiwi"]

print(", ".join(fruits)) # Prints "Apple, Orange, Pear, Kiwi" print("---".join(fruits)) # Prints "Apple---Orange---Pear---Kiwi" [/gdscript] [csharp] string[] fruits = ["Apple", "Orange", "Pear", "Kiwi"];

// In C#, this method is static. GD.Print(string.Join(", ", fruits)); // Prints "Apple, Orange, Pear, Kiwi" GD.Print(string.Join("---", fruits)); // Prints "Apple---Orange---Pear---Kiwi" [/csharp] [/codeblocks]

fn (String) json_escape #

fn (s &String) json_escape() String

Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use [method c_unescape] to unescape the string, if necessary.

fn (String) le_string #

fn (a String) le_string(b String) bool

Returns true if the left [String] comes before [param right] in [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url], which roughly matches the alphabetical order, or if both are equal.

fn (String) left #

fn (s &String) left(length i64) String

Returns the first [param length] characters from the beginning of the string. If [param length] is negative, strips the last [param length] characters from the string's end.

print('Hello World!'.left(3))  ##print('Hello World!'.left(-4)) ##

fn (String) length #

fn (s &String) length() i64

Returns the number of characters in the string. Empty strings ("") always return 0. See also [method is_empty].

fn (String) lpad #

fn (s &String) lpad(min_length i64, cfg String_lpad_Cfg) String

Formats the string to be at least [param min_length] long by adding [param character]s to the left of the string, if necessary. See also [method rpad].

fn (String) lstrip #

fn (s &String) lstrip(chars string) String

Removes a set of characters defined in [param chars] from the string's beginning. See also [method rstrip]. [b]Note:[/b] [param chars] is not a prefix. Use [method trim_prefix] to remove a single prefix, rather than a set of characters.

fn (String) lt_string #

fn (a String) lt_string(b String) bool

Returns true if the left [String] comes before [param right] in [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url], which roughly matches the alphabetical order. Useful for sorting.

fn (String) matchn #

fn (s &String) matchn(expr string) bool

Does a simple [b]case-insensitive[/b] expression match, where * matches zero or more arbitrary characters and ? matches any single character except a period (.). An empty string or empty expression always evaluates to false.

fn (String) md5_buffer #

fn (s &String) md5_buffer() PackedByteArray

Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as a [PackedByteArray].

fn (String) md5_text #

fn (s &String) md5_text() String

Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as another [String].

fn (String) mod_aabb #

fn (a String) mod_aabb(b AABB) String

fn (String) mod_array #

fn (a String) mod_array(b Array) String

fn (String) mod_basis #

fn (a String) mod_basis(b Basis) String

fn (String) mod_bool #

fn (a String) mod_bool(b bool) String

fn (String) mod_callable #

fn (a String) mod_callable(b Callable) String

fn (String) mod_color #

fn (a String) mod_color(b Color) String

fn (String) mod_dictionary #

fn (a String) mod_dictionary(b Dictionary) String

fn (String) mod_f64 #

fn (a String) mod_f64(b f64) String

fn (String) mod_i64 #

fn (a String) mod_i64(b i64) String

fn (String) mod_nodepath #

fn (a String) mod_nodepath(b NodePath) String

fn (String) mod_object #

fn (a String) mod_object(b Object) String

fn (String) mod_packedbytearray #

fn (a String) mod_packedbytearray(b PackedByteArray) String

fn (String) mod_packedcolorarray #

fn (a String) mod_packedcolorarray(b PackedColorArray) String

fn (String) mod_packedfloat32array #

fn (a String) mod_packedfloat32array(b PackedFloat32Array) String

fn (String) mod_packedfloat64array #

fn (a String) mod_packedfloat64array(b PackedFloat64Array) String

fn (String) mod_packedint32array #

fn (a String) mod_packedint32array(b PackedInt32Array) String

fn (String) mod_packedint64array #

fn (a String) mod_packedint64array(b PackedInt64Array) String

fn (String) mod_packedstringarray #

fn (a String) mod_packedstringarray(b PackedStringArray) String

fn (String) mod_packedvector2array #

fn (a String) mod_packedvector2array(b PackedVector2Array) String

fn (String) mod_packedvector3array #

fn (a String) mod_packedvector3array(b PackedVector3Array) String

fn (String) mod_packedvector4array #

fn (a String) mod_packedvector4array(b PackedVector4Array) String

fn (String) mod_plane #

fn (a String) mod_plane(b Plane) String

fn (String) mod_projection #

fn (a String) mod_projection(b Projection) String

fn (String) mod_quaternion #

fn (a String) mod_quaternion(b Quaternion) String

fn (String) mod_rect2 #

fn (a String) mod_rect2(b Rect2) String

fn (String) mod_rect2i #

fn (a String) mod_rect2i(b Rect2i) String

fn (String) mod_rid #

fn (a String) mod_rid(b RID) String

fn (String) mod_signal #

fn (a String) mod_signal(b Signal) String

fn (String) mod_string #

fn (a String) mod_string(b String) String

fn (String) mod_stringname #

fn (a String) mod_stringname(b StringName) String

fn (String) mod_transform2d #

fn (a String) mod_transform2d(b Transform2D) String

fn (String) mod_transform3d #

fn (a String) mod_transform3d(b Transform3D) String

fn (String) mod_vector2 #

fn (a String) mod_vector2(b Vector2) String

fn (String) mod_vector2i #

fn (a String) mod_vector2i(b Vector2i) String

fn (String) mod_vector3 #

fn (a String) mod_vector3(b Vector3) String

fn (String) mod_vector3i #

fn (a String) mod_vector3i(b Vector3i) String

fn (String) mod_vector4 #

fn (a String) mod_vector4(b Vector4) String

fn (String) mod_vector4i #

fn (a String) mod_vector4i(b Vector4i) String

fn (String) naturalcasecmp_to #

fn (s &String) naturalcasecmp_to(to string) i64

Performs a [b]case-sensitive[/b], [i]natural order[/i] comparison to another string. Returns -1 if less than, 1 if greater than, or 0 if equal. "Less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. When used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be ["1", "2", "3", ...], not ["1", "10", "2", "3", ...]. If the character comparison reaches the end of one string, but the other string contains more characters, then it will use length as the deciding factor: 1 will be returned if this string is longer than the [param to] string, or -1 if shorter. Note that the length of empty strings is always 0. To get a [bool] result from a string comparison, use the == operator instead. See also [method naturalnocasecmp_to], [method filecasecmp_to], and [method nocasecmp_to].

fn (String) naturalnocasecmp_to #

fn (s &String) naturalnocasecmp_to(to string) i64

Performs a [b]case-insensitive[/b], [i]natural order[/i] comparison to another string. Returns -1 if less than, 1 if greater than, or 0 if equal. "Less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison. When used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be ["1", "2", "3", ...], not ["1", "10", "2", "3", ...]. If the character comparison reaches the end of one string, but the other string contains more characters, then it will use length as the deciding factor: 1 will be returned if this string is longer than the [param to] string, or -1 if shorter. Note that the length of empty strings is always 0. To get a [bool] result from a string comparison, use the == operator instead. See also [method naturalcasecmp_to], [method filenocasecmp_to], and [method casecmp_to].

fn (String) ne_string #

fn (a String) ne_string(b String) bool

Returns true if both strings do not contain the same sequence of characters.

fn (String) ne_stringname #

fn (a String) ne_stringname(b StringName) bool

Returns true if this [String] is not equivalent to the given [StringName].

fn (String) nocasecmp_to #

fn (s &String) nocasecmp_to(to string) i64

Performs a [b]case-insensitive[/b] comparison to another string. Returns -1 if less than, 1 if greater than, or 0 if equal. "Less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison. If the character comparison reaches the end of one string, but the other string contains more characters, then it will use length as the deciding factor: 1 will be returned if this string is longer than the [param to] string, or -1 if shorter. Note that the length of empty strings is always 0. To get a [bool] result from a string comparison, use the == operator instead. See also [method casecmp_to], [method filenocasecmp_to], and [method naturalnocasecmp_to].

fn (String) pad_decimals #

fn (s &String) pad_decimals(digits i64) String

Formats the string representing a number to have an exact number of [param digits] [i]after[/i] the decimal point.

fn (String) pad_zeros #

fn (s &String) pad_zeros(digits i64) String

Formats the string representing a number to have an exact number of [param digits] [i]before[/i] the decimal point.

fn (String) path_join #

fn (s &String) path_join(path string) String

Concatenates [param path] at the end of the string as a subpath, adding / if necessary. [b]Example:[/b] "this/is".path_join("path") == "this/is/path".

fn (String) remove_char #

fn (s &String) remove_char(what i64) String

Removes all occurrences of the Unicode character with code [param what]. Faster version of [method replace] when the key is only one character long and the replacement is "".

fn (String) remove_chars #

fn (s &String) remove_chars(chars string) String

Removes any occurrence of the characters in [param chars]. See also [method remove_char].

fn (String) repeat #

fn (s &String) repeat(count i64) String

Repeats this string a number of times. [param count] needs to be greater than 0. Otherwise, returns an empty string.

fn (String) replace #

fn (s &String) replace(what string, forwhat string) String

Replaces all occurrences of [param what] inside the string with the given [param forwhat].

fn (String) replace_char #

fn (s &String) replace_char(key i64, with i64) String

Replaces all occurrences of the Unicode character with code [param key] with the Unicode character with code [param with]. Faster version of [method replace] when the key is only one character long. To get a single character use "X".unicode_at(0) (note that some strings, like compound letters and emoji, can be composed of multiple unicode codepoints, and will not work with this method, use [method length] to make sure).

fn (String) replace_chars #

fn (s &String) replace_chars(keys string, with i64) String

Replaces any occurrence of the characters in [param keys] with the Unicode character with code [param with]. See also [method replace_char].

fn (String) replacen #

fn (s &String) replacen(what string, forwhat string) String

Replaces all [b]case-insensitive[/b] occurrences of [param what] inside the string with the given [param forwhat].

fn (String) reverse #

fn (s &String) reverse() String

Returns the copy of this string in reverse order. This operation works on unicode codepoints, rather than sequences of codepoints, and may break things like compound letters or emojis.

fn (String) rfind #

fn (s &String) rfind(what string, cfg String_rfind_Cfg) i64

Returns the index of the [b]last[/b] occurrence of [param what] in this string, or -1 if there are none. The search's start can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method find].

fn (String) rfindn #

fn (s &String) rfindn(what string, cfg String_rfindn_Cfg) i64

Returns the index of the [b]last[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or -1 if there are none. The starting search index can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method findn].

fn (String) right #

fn (s &String) right(length i64) String

Returns the last [param length] characters from the end of the string. If [param length] is negative, strips the first [param length] characters from the string's beginning.

print('Hello World!'.right(3))  ##print('Hello World!'.right(-4)) ##

fn (String) rpad #

fn (s &String) rpad(min_length i64, cfg String_rpad_Cfg) String

Formats the string to be at least [param min_length] long, by adding [param character]s to the right of the string, if necessary. See also [method lpad].

fn (String) rsplit #

fn (s &String) rsplit(cfg String_rsplit_Cfg) PackedStringArray

Splits the string using a [param delimiter] and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If [param delimiter] is an empty string, each substring will be a single character. If [param allow_empty] is false, empty strings between adjacent delimiters are excluded from the array. If [param maxsplit] is greater than 0, the number of splits may not exceed [param maxsplit]. By default, the entire string is split, which is mostly identical to [method split]. [codeblocks] [gdscript] var some_string = "One,Two,Three,Four" var some_array = some_string.rsplit(",", true, 1)

print(some_array.size()) # Prints 2 print(some_array[0]) # Prints "One,Two,Three" print(some_array[1]) # Prints "Four" [/gdscript] [csharp] // In C#, there is no String.RSplit() method. [/csharp] [/codeblocks]

fn (String) rstrip #

fn (s &String) rstrip(chars string) String

Removes a set of characters defined in [param chars] from the string's end. See also [method lstrip]. [b]Note:[/b] [param chars] is not a suffix. Use [method trim_suffix] to remove a single suffix, rather than a set of characters.

fn (String) sha1_buffer #

fn (s &String) sha1_buffer() PackedByteArray

Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as a [PackedByteArray].

fn (String) sha1_text #

fn (s &String) sha1_text() String

Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as another [String].

fn (String) sha256_buffer #

fn (s &String) sha256_buffer() PackedByteArray

Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as a [PackedByteArray].

fn (String) sha256_text #

fn (s &String) sha256_text() String

Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as another [String].

fn (String) similarity #

fn (s &String) similarity(text string) f64

Returns the similarity index ([url=https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient]Sørensen-Dice coefficient[/url]) of this string compared to another. A result of 1.0 means totally similar, while 0.0 means totally dissimilar.

print('ABC123'.similarity('ABC123')) ##print('ABC123'.similarity('XYZ456')) ##print('ABC123'.similarity('123ABC')) ##print('ABC123'.similarity('abc123')) ##

fn (String) simplify_path #

fn (s &String) simplify_path() String

If the string is a valid file path, converts the string into a canonical path. This is the shortest possible path, without "./", and all the unnecessary ".." and "/".

var simple_path = './path/to///../file'.simplify_path()
print(simple_path) ##

fn (String) split #

fn (s &String) split(cfg String_split_Cfg) PackedStringArray

Splits the string using a [param delimiter] and returns an array of the substrings. If [param delimiter] is an empty string, each substring will be a single character. This method is the opposite of [method join]. If [param allow_empty] is false, empty strings between adjacent delimiters are excluded from the array. If [param maxsplit] is greater than 0, the number of splits may not exceed [param maxsplit]. By default, the entire string is split. [codeblocks] [gdscript] var some_array = "One,Two,Three,Four".split(",", true, 2)

print(some_array.size()) # Prints 3 print(some_array[0]) # Prints "One" print(some_array[1]) # Prints "Two" print(some_array[2]) # Prints "Three,Four" [/gdscript] [csharp] // C#'s Split() does not support the maxsplit parameter. var someArray = "One,Two,Three".Split(",");

GD.Print(someArray[0]); // Prints "One" GD.Print(someArray[1]); // Prints "Two" GD.Print(someArray[2]); // Prints "Three" [/csharp] [/codeblocks] [b]Note:[/b] If you only need one substring from the array, consider using [method get_slice] which is faster. If you need to split strings with more complex rules, use the [RegEx] class instead.

fn (String) split_floats #

fn (s &String) split_floats(delimiter string, cfg String_split_floats_Cfg) PackedFloat64Array

Splits the string into floats by using a [param delimiter] and returns a [PackedFloat64Array]. If [param allow_empty] is false, empty or invalid [float] conversions between adjacent delimiters are excluded.

var a = '1,2,4.5'.split_floats(',')         ##var c = '1| ||4.5'.split_floats('|')        ##var b = '1| ||4.5'.split_floats('|', false) ##

fn (String) str #

fn (s &String) str() string

fn (String) strip_edges #

fn (s &String) strip_edges(cfg String_strip_edges_Cfg) String

Strips all non-printable characters from the beginning and the end of the string. These include spaces, tabulations (\t), and newlines (\n \r). If [param left] is false, ignores the string's beginning. Likewise, if [param right] is false, ignores the string's end.

fn (String) strip_escapes #

fn (s &String) strip_escapes() String

Strips all escape characters from the string. These include all non-printable control characters of the first page of the ASCII table (values from 0 to 31), such as tabulation (\t) and newline (\n, \r) characters, but [i]not[/i] spaces.

fn (String) substr #

fn (s &String) substr(from i64, cfg String_substr_Cfg) String

Returns part of the string from the position [param from] with length [param len]. If [param len] is -1 (as by default), returns the rest of the string starting from the given position.

fn (String) to_ascii_buffer #

fn (s &String) to_ascii_buffer() PackedByteArray

Converts the string to an [url=https://en.wikipedia.org/wiki/ASCII]ASCII[/url]/Latin-1 encoded [PackedByteArray]. This method is slightly faster than [method to_utf8_buffer], but replaces all unsupported characters with spaces. This is the inverse of [method PackedByteArray.get_string_from_ascii].

fn (String) to_camel_case #

fn (s &String) to_camel_case() String

Returns the string converted to camelCase.

fn (String) to_float #

fn (s &String) to_float() f64

Converts the string representing a decimal number into a [float]. This method stops on the first non-number character, except the first decimal point (.) and the exponent letter (e). See also [method is_valid_float].

var a = '12.35'.to_float()  ##var b = '1.2.3'.to_float()  ##var c = '12xy3'.to_float()  ##var d = '1e3'.to_float()    ##var e = 'Hello!'.to_float() ##

fn (String) to_int #

fn (s &String) to_int() i64

Converts the string representing an integer number into an [int]. This method removes any non-number character and stops at the first decimal point (.). See also [method is_valid_int].

var a = '123'.to_int()    ##var b = 'x1y2z3'.to_int() ##var c = '-1.2.3'.to_int() ##var d = 'Hello!'.to_int() ##

fn (String) to_kebab_case #

fn (s &String) to_kebab_case() String

Returns the string converted to kebab-case. [b]Note:[/b] Numbers followed by a [i]single[/i] letter are not separated in the conversion to keep some words (such as "2D") together. [codeblocks] [gdscript] "Node2D".to_kebab_case() # Returns "node-2d" "2nd place".to_kebab_case() # Returns "2-nd-place" "Texture3DAssetFolder".to_kebab_case() # Returns "texture-3d-asset-folder" [/gdscript] [csharp] "Node2D".ToKebabCase(); // Returns "node-2d" "2nd place".ToKebabCase(); // Returns "2-nd-place" "Texture3DAssetFolder".ToKebabCase(); // Returns "texture-3d-asset-folder" [/csharp] [/codeblocks]

fn (String) to_lower #

fn (s &String) to_lower() String

Returns the string converted to lowercase.

fn (String) to_multibyte_char_buffer #

fn (s &String) to_multibyte_char_buffer(cfg String_to_multibyte_char_buffer_Cfg) PackedByteArray

Converts the string to system multibyte code page encoded [PackedByteArray]. If conversion fails, empty array is returned. The values permitted for [param encoding] are system dependent. If [param encoding] is empty string, system default encoding is used.- For Windows, see [url=https://learn.microsoft.com/en-us/windows/win32/Intl/code-page-identifiers]Code Page Identifiers[/url] .NET names.

  • For macOS and Linux/BSD, see libiconv library documentation and iconv --list for a list of supported encodings.

fn (String) to_pascal_case #

fn (s &String) to_pascal_case() String

Returns the string converted to PascalCase.

fn (String) to_snake_case #

fn (s &String) to_snake_case() String

Returns the string converted to snake_case. [b]Note:[/b] Numbers followed by a [i]single[/i] letter are not separated in the conversion to keep some words (such as "2D") together. [codeblocks] [gdscript] "Node2D".to_snake_case() # Returns "node_2d" "2nd place".to_snake_case() # Returns "2_nd_place" "Texture3DAssetFolder".to_snake_case() # Returns "texture_3d_asset_folder" [/gdscript] [csharp] "Node2D".ToSnakeCase(); // Returns "node_2d" "2nd place".ToSnakeCase(); // Returns "2_nd_place" "Texture3DAssetFolder".ToSnakeCase(); // Returns "texture_3d_asset_folder" [/csharp] [/codeblocks]

fn (String) to_upper #

fn (s &String) to_upper() String

Returns the string converted to UPPERCASE.

fn (String) to_utf16_buffer #

fn (s &String) to_utf16_buffer() PackedByteArray

Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-16]UTF-16[/url] encoded [PackedByteArray]. This is the inverse of [method PackedByteArray.get_string_from_utf16].

fn (String) to_utf32_buffer #

fn (s &String) to_utf32_buffer() PackedByteArray

Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-32]UTF-32[/url] encoded [PackedByteArray]. This is the inverse of [method PackedByteArray.get_string_from_utf32].

fn (String) to_utf8_buffer #

fn (s &String) to_utf8_buffer() PackedByteArray

Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-8]UTF-8[/url] encoded [PackedByteArray]. This method is slightly slower than [method to_ascii_buffer], but supports all UTF-8 characters. For most cases, prefer using this method. This is the inverse of [method PackedByteArray.get_string_from_utf8].

fn (String) to_v #

fn (s &String) to_v() string

fn (String) to_variant #

fn (s &String) to_variant() Variant

fn (String) to_wchar_buffer #

fn (s &String) to_wchar_buffer() PackedByteArray

Converts the string to a [url=https://en.wikipedia.org/wiki/Wide_character]wide character[/url] (wchar_t, UTF-16 on Windows, UTF-32 on other platforms) encoded [PackedByteArray]. This is the inverse of [method PackedByteArray.get_string_from_wchar].

fn (String) trim_prefix #

fn (s &String) trim_prefix(prefix string) String

Removes the given [param prefix] from the start of the string, or returns the string unchanged.

fn (String) trim_suffix #

fn (s &String) trim_suffix(suffix string) String

Removes the given [param suffix] from the end of the string, or returns the string unchanged.

fn (String) unicode_at #

fn (s &String) unicode_at(at i64) i64

Returns the character code at position [param at]. See also [method chr], [method @GDScript.char], and [method @GDScript.ord].

fn (String) uri_decode #

fn (s &String) uri_decode() String

Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also [method uri_encode]. [codeblocks] [gdscript] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" print(url.uri_decode()) # Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/gdscript] [csharp] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/csharp] [/codeblocks] [b]Note:[/b] This method decodes + as space.

fn (String) uri_encode #

fn (s &String) uri_encode() String

Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also [method uri_decode]. [codeblocks] [gdscript] var prefix = "$DOCS_URL/?highlight=" var url = prefix + "Godot Engine:docs".uri_encode()

print(url) # Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" [/gdscript] [csharp] var prefix = "$DOCS_URL/?highlight="; var url = prefix + "Godot Engine:docs".URIEncode();

GD.Print(url); // Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" [/csharp] [/codeblocks]

fn (String) uri_file_decode #

fn (s &String) uri_file_decode() String

Decodes the file path from its URL-encoded format. Unlike [method uri_decode] this method leaves + as is.

fn (String) validate_filename #

fn (s &String) validate_filename() String

Returns a copy of the string with all characters that are not allowed in [method is_valid_filename] replaced with underscores.

fn (String) validate_node_name #

fn (s &String) validate_node_name() String

Returns a copy of the string with all characters that are not allowed in [member Node.name] (. : @ / " %) replaced with underscores.

fn (String) xml_escape #

fn (s &String) xml_escape(cfg String_xml_escape_Cfg) String

Returns a copy of the string with special characters escaped using the XML standard. If [param escape_quotes] is true, the single quote (') and double quote (") characters are also escaped.

fn (String) xml_unescape #

fn (s &String) xml_unescape() String

Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard.

struct StringName #

@[packed]
struct StringName {
	data_ [8]u8
}

A built-in type for unique strings.

[StringName]s are immutable strings designed for general-purpose representation of unique names (also called "string interning"). Two [StringName]s with the same value are the same object. Comparing them is extremely fast compared to regular [String]s. You will usually pass a [String] to methods expecting a [StringName] and it will be automatically converted (often at compile time), but in rare cases you can construct a [StringName] ahead of time with the [StringName] constructor or, in GDScript, the literal syntax &"example". Manually constructing a [StringName] allows you to control when the conversion from [String] occurs or to use the literal and prevent conversions entirely. See also [NodePath], which is a similar concept specifically designed to store pre-parsed scene tree paths. All of [String]'s methods are available in this class too. They convert the [StringName] into a string, and they also return a string. This is highly inefficient and should only be used if the string is desired. [b]Note:[/b] In C#, an explicit conversion to System.String is required to use the methods listed on this page. Use the ToString() method to cast a [StringName] to a string, and then use the equivalent methods in System.String or StringExtensions. [b]Note:[/b] In a boolean context, a [StringName] will evaluate to false if it is empty (StringName("")). Otherwise, a [StringName] will always evaluate to true.

fn (StringName) % #

fn (a StringName) % (b StringName) StringName

fn (StringName) + #

fn (a StringName) + (b StringName) StringName

Appends [param right] at the end of this [StringName], returning a [String]. This is also known as a string concatenation.

fn (StringName) < #

fn (a StringName) < (b StringName) bool

Returns true if the left [StringName]'s pointer comes before [param right]. Note that this will not match their [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url].

fn (StringName) == #

fn (a StringName) == (b StringName) bool

Returns true if the [StringName] and [param right] refer to the same name. Comparisons between [StringName]s are much faster than regular [String] comparisons.

fn (StringName) add_string #

fn (a StringName) add_string(b String) String

Appends [param right] at the end of this [StringName], returning a [String]. This is also known as a string concatenation.

fn (StringName) add_stringname #

fn (a StringName) add_stringname(b StringName) String

Appends [param right] at the end of this [StringName], returning a [String]. This is also known as a string concatenation.

fn (StringName) begins_with #

fn (s &StringName) begins_with(text string) bool

Returns true if the string begins with the given [param text]. See also [method ends_with].

fn (StringName) bigrams #

fn (s &StringName) bigrams() PackedStringArray

Returns an array containing the bigrams (pairs of consecutive characters) of this string.

print('Get up!'.bigrams()) ##

fn (StringName) bin_to_int #

fn (s &StringName) bin_to_int() i64

Converts the string representing a binary number into an [int]. The string may optionally be prefixed with "0b", and an additional - prefix for negative numbers. [codeblocks] [gdscript] print("101".bin_to_int()) # Prints 5 print("0b101".bin_to_int()) # Prints 5 print("-0b10".bin_to_int()) # Prints -2 [/gdscript] [csharp] GD.Print("101".BinToInt()); // Prints 5 GD.Print("0b101".BinToInt()); // Prints 5 GD.Print("-0b10".BinToInt()); // Prints -2 [/csharp] [/codeblocks]

fn (StringName) c_escape #

fn (s &StringName) c_escape() String

Returns a copy of the string with special characters escaped using the C language standard.

fn (StringName) c_unescape #

fn (s &StringName) c_unescape() String

Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are \', \", \\, \a, \b, \f, \n, \r, \t, \v. [b]Note:[/b] Unlike the GDScript parser, this method doesn't support the \uXXXX escape sequence.

fn (StringName) capitalize #

fn (s &StringName) capitalize() String

Changes the appearance of the string: replaces underscores (_) with spaces, adds spaces before uppercase letters in the middle of a word, converts all letters to lowercase, then converts the first one and each one following a space to uppercase. [codeblocks] [gdscript] "move_local_x".capitalize() # Returns "Move Local X" "sceneFile_path".capitalize() # Returns "Scene File Path" "2D, FPS, PNG".capitalize() # Returns "2d, Fps, Png" [/gdscript] [csharp] "move_local_x".Capitalize(); // Returns "Move Local X" "sceneFile_path".Capitalize(); // Returns "Scene File Path" "2D, FPS, PNG".Capitalize(); // Returns "2d, Fps, Png" [/csharp] [/codeblocks]

fn (StringName) casecmp_to #

fn (s &StringName) casecmp_to(to string) i64

Performs a case-sensitive comparison to another string. Returns -1 if less than, 1 if greater than, or 0 if equal. "Less than" and "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. With different string lengths, returns 1 if this string is longer than the [param to] string, or -1 if shorter. Note that the length of empty strings is [i]always[/i] 0. To get a [bool] result from a string comparison, use the == operator instead. See also [method nocasecmp_to], [method filecasecmp_to], and [method naturalcasecmp_to].

fn (StringName) contains #

fn (s &StringName) contains(what string) bool

Returns true if the string contains [param what]. In GDScript, this corresponds to the in operator. [codeblocks] [gdscript] print("Node".contains("de")) # Prints true print("team".contains("I")) # Prints false print("I" in "team") # Prints false [/gdscript] [csharp] GD.Print("Node".Contains("de")); // Prints True GD.Print("team".Contains("I")); // Prints False [/csharp] [/codeblocks] If you need to know where [param what] is within the string, use [method find]. See also [method containsn].

fn (StringName) containsn #

fn (s &StringName) containsn(what string) bool

Returns true if the string contains [param what], [b]ignoring case[/b]. If you need to know where [param what] is within the string, use [method findn]. See also [method contains].

fn (StringName) count #

fn (s &StringName) count(what string, cfg StringName_count_Cfg) i64

Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions. If [param to] is 0, the search continues until the end of the string.

fn (StringName) countn #

fn (s &StringName) countn(what string, cfg StringName_countn_Cfg) i64

Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions, [b]ignoring case[/b]. If [param to] is 0, the search continues until the end of the string.

fn (StringName) dedent #

fn (s &StringName) dedent() String

Returns a copy of the string with indentation (leading tabs and spaces) removed. See also [method indent] to add indentation.

fn (StringName) deinit #

fn (s &StringName) deinit()

fn (StringName) ends_with #

fn (s &StringName) ends_with(text string) bool

Returns true if the string ends with the given [param text]. See also [method begins_with].

fn (StringName) eq_string #

fn (a StringName) eq_string(b String) bool

Returns true if this [StringName] is equivalent to the given [String].

fn (StringName) eq_stringname #

fn (a StringName) eq_stringname(b StringName) bool

Returns true if the [StringName] and [param right] refer to the same name. Comparisons between [StringName]s are much faster than regular [String] comparisons.

fn (StringName) erase #

fn (s &StringName) erase(position i64, cfg StringName_erase_Cfg) String

Returns a string with [param chars] characters erased starting from [param position]. If [param chars] goes beyond the string's length given the specified [param position], fewer characters will be erased from the returned string. Returns an empty string if either [param position] or [param chars] is negative. Returns the original string unmodified if [param chars] is 0.

fn (StringName) filecasecmp_to #

fn (s &StringName) filecasecmp_to(to string) i64

Like [method naturalcasecmp_to] but prioritizes strings that begin with periods (.) and underscores (_) before any other character. Useful when sorting folders or file names. To get a [bool] result from a string comparison, use the == operator instead. See also [method filenocasecmp_to], [method naturalcasecmp_to], and [method casecmp_to].

fn (StringName) filenocasecmp_to #

fn (s &StringName) filenocasecmp_to(to string) i64

Like [method naturalnocasecmp_to] but prioritizes strings that begin with periods (.) and underscores (_) before any other character. Useful when sorting folders or file names. To get a [bool] result from a string comparison, use the == operator instead. See also [method filecasecmp_to], [method naturalnocasecmp_to], and [method nocasecmp_to].

fn (StringName) find #

fn (s &StringName) find(what string, cfg StringName_find_Cfg) i64

Returns the index of the [b]first[/b] occurrence of [param what] in this string, or -1 if there are none. The search's start can be specified with [param from], continuing to the end of the string. [codeblocks] [gdscript] print("Team".find("I")) # Prints -1

print("Potato".find("t")) # Prints 2 print("Potato".find("t", 3)) # Prints 4 print("Potato".find("t", 5)) # Prints -1 [/gdscript] [csharp] GD.Print("Team".Find("I")); // Prints -1

GD.Print("Potato".Find("t")); // Prints 2 GD.Print("Potato".Find("t", 3)); // Prints 4 GD.Print("Potato".Find("t", 5)); // Prints -1 [/csharp] [/codeblocks] [b]Note:[/b] If you just want to know whether the string contains [param what], use [method contains]. In GDScript, you may also use the in operator.

fn (StringName) findn #

fn (s &StringName) findn(what string, cfg StringName_findn_Cfg) i64

Returns the index of the [b]first[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or -1 if there are none. The starting search index can be specified with [param from], continuing to the end of the string.

fn (StringName) format #

fn (s &StringName) format(values_ ToVariant, cfg StringName_format_Cfg) String

Formats the string by replacing all occurrences of [param placeholder] with the elements of [param values]. [param values] can be a [Dictionary], an [Array], or an [Object]. Any underscores in [param placeholder] will be replaced with the corresponding keys in advance. Array elements use their index as keys.

##var use_array_values = 'Waiting for {0} is a play by {1}, and {0} Engine is named after it.'
print(use_array_values.format(['Godot', 'Samuel Beckett']))

##print('User {id} is {name}.'.format({'id': 42, 'name': 'Godot'}))

Some additional handling is performed when [param values] is an [Array]. If [param placeholder] does not contain an underscore, the elements of the [param values] array will be used to replace one occurrence of the placeholder in order; If an element of [param values] is another 2-element array, it'll be interpreted as a key-value pair.

##print('User {} is {}.'.format([42, 'Godot'], '{}'))
print('User {id} is {name}.'.format([['id', 42], ['name', 'Godot']]))

When passing an [Object], the property names from [method Object.get_property_list] are used as keys.

##var node = Node2D.new()
print('Visible {visible}, position {position}'.format(node))

See also the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format string[/url] tutorial. [b]Note:[/b] Each replacement is done sequentially for each element of [param values], [b]not[/b] all at once. This means that if any element is inserted and it contains another placeholder, it may be changed by the next replacement. While this can be very useful, it often causes unexpected results. If not necessary, make sure [param values]'s elements do not contain placeholders.

print('{0} {1}'.format(['{1}', 'x']))           ##print('{0} {1}'.format(['x', '{0}']))           ##print('{a} {b}'.format({'a': '{b}', 'b': 'c'})) ##print('{a} {b}'.format({'b': 'c', 'a': '{b}'})) ##

[b]Note:[/b] In C#, it's recommended to [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]interpolate strings with "$"[/url], instead.

fn (StringName) from_variant #

fn (mut s StringName) from_variant(variant &Variant)

fn (StringName) gd_match #

fn (s &StringName) gd_match(expr string) bool

Does a simple expression match (also called "glob" or "globbing"), where * matches zero or more arbitrary characters and ? matches any single character except a period (.). An empty string or empty expression always evaluates to false.

fn (StringName) ge_stringname #

fn (a StringName) ge_stringname(b StringName) bool

Returns true if the left [StringName]'s pointer comes after [param right] or if they are the same. Note that this will not match their [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url].

fn (StringName) get_base_dir #

fn (s &StringName) get_base_dir() String

If the string is a valid file path, returns the base directory name.

var dir_path = '/path/to/file.txt'.get_base_dir() ##

fn (StringName) get_basename #

fn (s &StringName) get_basename() String

If the string is a valid file path, returns the full file path, without the extension.

var base = '/path/to/file.txt'.get_basename() ##

fn (StringName) get_extension #

fn (s &StringName) get_extension() String

If the string is a valid file name or path, returns the file extension without the leading period (.). Otherwise, returns an empty string.

var a = '/path/to/file.txt'.get_extension() ##var b = 'cool.txt'.get_extension()          ##var c = 'cool.font.tres'.get_extension()    ##var d = '.pack1'.get_extension()            ##
var e = 'file.txt.'.get_extension()  ##var f = 'file.txt..'.get_extension() ##var g = 'txt'.get_extension()        ##var h = ''.get_extension()           ##

fn (StringName) get_file #

fn (s &StringName) get_file() String

If the string is a valid file path, returns the file name, including the extension.

var file = '/path/to/icon.png'.get_file() ##

fn (StringName) get_slice #

fn (s &StringName) get_slice(delimiter string, slice i64) String

Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns the original string if [param delimiter] does not occur in the string. Returns an empty string if the [param slice] does not exist. This is faster than [method split], if you only need one substring.

print('i/am/example/hi'.get_slice('/', 2)) ##

fn (StringName) get_slice_count #

fn (s &StringName) get_slice_count(delimiter string) i64

Returns the total number of slices when the string is split with the given [param delimiter] (see [method split]).

fn (StringName) get_slicec #

fn (s &StringName) get_slicec(delimiter i64, slice i64) String

Splits the string using a Unicode character with code [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist. This is faster than [method split], if you only need one substring.

fn (StringName) gt_stringname #

fn (a StringName) gt_stringname(b StringName) bool

Returns true if the left [StringName]'s pointer comes after [param right]. Note that this will not match their [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url].

fn (StringName) hash #

fn (s &StringName) hash() i64

Returns the 32-bit hash value representing the string's contents. [b]Note:[/b] Strings with equal hash values are [i]not[/i] guaranteed to be the same, as a result of hash collisions. On the contrary, strings with different hash values are guaranteed to be different.

fn (StringName) hex_decode #

fn (s &StringName) hex_decode() PackedByteArray

Decodes a hexadecimal string as a [PackedByteArray]. [codeblocks] [gdscript] var text = "hello world" var encoded = text.to_utf8_buffer().hex_encode() # outputs "68656c6c6f20776f726c64" print(encoded.hex_decode().get_string_from_utf8()) [/gdscript] [csharp] var text = "hello world"; var encoded = text.ToUtf8Buffer().HexEncode(); // outputs "68656c6c6f20776f726c64" GD.Print(encoded.HexDecode().GetStringFromUtf8()); [/csharp] [/codeblocks]

fn (StringName) hex_to_int #

fn (s &StringName) hex_to_int() i64

Converts the string representing a hexadecimal number into an [int]. The string may be optionally prefixed with "0x", and an additional - prefix for negative numbers. [codeblocks] [gdscript] print("0xff".hex_to_int()) # Prints 255 print("ab".hex_to_int()) # Prints 171 [/gdscript] [csharp] GD.Print("0xff".HexToInt()); // Prints 255 GD.Print("ab".HexToInt()); // Prints 171 [/csharp] [/codeblocks]

fn (StringName) in #

fn (a StringName) in(b StringName) bool

fn (StringName) in_array #

fn (a StringName) in_array(b Array) bool

fn (StringName) in_dictionary #

fn (a StringName) in_dictionary(b Dictionary) bool

fn (StringName) in_object #

fn (a StringName) in_object(b Object) bool

fn (StringName) in_packedstringarray #

fn (a StringName) in_packedstringarray(b PackedStringArray) bool

fn (StringName) in_string #

fn (a StringName) in_string(b String) bool

fn (StringName) in_stringname #

fn (a StringName) in_stringname(b StringName) bool

fn (StringName) indent #

fn (s &StringName) indent(prefix string) String

Indents every line of the string with the given [param prefix]. Empty lines are not indented. See also [method dedent] to remove indentation. For example, the string can be indented with two tabulations using "\t\t", or four spaces using " ".

fn (StringName) insert #

fn (s &StringName) insert(position i64, what string) String

Inserts [param what] at the given [param position] in the string.

fn (StringName) is_absolute_path #

fn (s &StringName) is_absolute_path() bool

Returns true if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of [method is_relative_path]. This includes all paths starting with "res://", "user://", "C:\", "/", etc.

fn (StringName) is_empty #

fn (s &StringName) is_empty() bool

Returns true if the string's length is 0 (""). See also [method length].

fn (StringName) is_relative_path #

fn (s &StringName) is_relative_path() bool

Returns true if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current [Node] (if the string is derived from a [NodePath]), and may sometimes be prefixed with "./". This method is the opposite of [method is_absolute_path].

fn (StringName) is_subsequence_of #

fn (s &StringName) is_subsequence_of(text string) bool

Returns true if all characters of this string can be found in [param text] in their original order. This is not the same as [method contains].

var text = 'Wow, incredible!'

print('inedible'.is_subsequence_of(text)) ##print('Word!'.is_subsequence_of(text))    ##print('Window'.is_subsequence_of(text))   ##print(''.is_subsequence_of(text))         ##

fn (StringName) is_subsequence_ofn #

fn (s &StringName) is_subsequence_ofn(text string) bool

Returns true if all characters of this string can be found in [param text] in their original order, [b]ignoring case[/b]. This is not the same as [method containsn].

fn (StringName) is_valid_ascii_identifier #

fn (s &StringName) is_valid_ascii_identifier() bool

Returns true if this string is a valid ASCII identifier. A valid ASCII identifier may contain only letters, digits, and underscores (_), and the first character may not be a digit.

print('node_2d'.is_valid_ascii_identifier())    ##print('TYPE_FLOAT'.is_valid_ascii_identifier()) ##print('1st_method'.is_valid_ascii_identifier()) ##print('MyMethod#2'.is_valid_ascii_identifier()) ##

See also [method is_valid_unicode_identifier].

fn (StringName) is_valid_filename #

fn (s &StringName) is_valid_filename() bool

Returns true if this string is a valid file name. A valid file name cannot be empty, begin or end with space characters, or contain characters that are not allowed (: / \ ? * " | % < >).

fn (StringName) is_valid_float #

fn (s &StringName) is_valid_float() bool

Returns true if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point (.), and the exponent letter (e). It may also be prefixed with a positive (+) or negative (-) sign. Any valid integer is also a valid float (see [method is_valid_int]). See also [method to_float].

print('1.7'.is_valid_float())   ##print('24'.is_valid_float())    ##print('7e3'.is_valid_float())   ##print('Hello'.is_valid_float()) ##

fn (StringName) is_valid_hex_number #

fn (s &StringName) is_valid_hex_number(cfg StringName_is_valid_hex_number_Cfg) bool

Returns true if this string is a valid hexadecimal number. A valid hexadecimal number only contains digits or letters A to F (either uppercase or lowercase), and may be prefixed with a positive (+) or negative (-) sign. If [param with_prefix] is true, the hexadecimal number needs to prefixed by "0x" to be considered valid.

print('A08E'.is_valid_hex_number())    ##print('-AbCdEf'.is_valid_hex_number()) ##print('2.5'.is_valid_hex_number())     ##
print('0xDEADC0DE'.is_valid_hex_number(true)) ##

fn (StringName) is_valid_html_color #

fn (s &StringName) is_valid_html_color() bool

Returns true if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see [method is_valid_hex_number]) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (#). Other HTML notations for colors, such as names or hsl(), are not considered valid. See also [method Color.html].

fn (StringName) is_valid_identifier #

fn (s &StringName) is_valid_identifier() bool

Returns true if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (_), and the first character may not be a digit.

print('node_2d'.is_valid_identifier())    ##print('TYPE_FLOAT'.is_valid_identifier()) ##print('1st_method'.is_valid_identifier()) ##print('MyMethod#2'.is_valid_identifier()) ##

fn (StringName) is_valid_int #

fn (s &StringName) is_valid_int() bool

Returns true if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive (+) or negative (-) sign. See also [method to_int].

print('7'.is_valid_int())    ##print('1.65'.is_valid_int()) ##print('Hi'.is_valid_int())   ##print('+3'.is_valid_int())   ##print('-12'.is_valid_int())  ##

fn (StringName) is_valid_ip_address #

fn (s &StringName) is_valid_ip_address() bool

Returns true if this string represents a well-formatted IPv4 or IPv6 address. This method considers [url=https://en.wikipedia.org/wiki/Reserved_IP_addresses]reserved IP addresses[/url] such as "0.0.0.0" and "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" as valid.

fn (StringName) is_valid_unicode_identifier #

fn (s &StringName) is_valid_unicode_identifier() bool

Returns true if this string is a valid Unicode identifier. A valid Unicode identifier must begin with a Unicode character of class XID_Start or "_", and may contain Unicode characters of class XID_Continue in the other positions.

print('node_2d'.is_valid_unicode_identifier())      ##print('1st_method'.is_valid_unicode_identifier())   ##print('MyMethod#2'.is_valid_unicode_identifier())   ##print('állóképesség'.is_valid_unicode_identifier()) ##print('выносливость'.is_valid_unicode_identifier()) ##print('体力'.is_valid_unicode_identifier())         ##

See also [method is_valid_ascii_identifier]. [b]Note:[/b] This method checks identifiers the same way as GDScript. See [method TextServer.is_valid_identifier] for more advanced checks.

fn (StringName) join #

fn (s &StringName) join(parts PackedStringArray) String

Returns the concatenation of [param parts]' elements, with each element separated by the string calling this method. This method is the opposite of [method split]. [codeblocks] [gdscript] var fruits = ["Apple", "Orange", "Pear", "Kiwi"]

print(", ".join(fruits)) # Prints "Apple, Orange, Pear, Kiwi" print("---".join(fruits)) # Prints "Apple---Orange---Pear---Kiwi" [/gdscript] [csharp] string[] fruits = ["Apple", "Orange", "Pear", "Kiwi"];

// In C#, this method is static. GD.Print(string.Join(", ", fruits)); // Prints "Apple, Orange, Pear, Kiwi" GD.Print(string.Join("---", fruits)); // Prints "Apple---Orange---Pear---Kiwi" [/csharp] [/codeblocks]

fn (StringName) json_escape #

fn (s &StringName) json_escape() String

Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use [method c_unescape] to unescape the string, if necessary.

fn (StringName) le_stringname #

fn (a StringName) le_stringname(b StringName) bool

Returns true if the left [StringName]'s pointer comes before [param right] or if they are the same. Note that this will not match their [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url].

fn (StringName) left #

fn (s &StringName) left(length i64) String

Returns the first [param length] characters from the beginning of the string. If [param length] is negative, strips the last [param length] characters from the string's end.

print('Hello World!'.left(3))  ##print('Hello World!'.left(-4)) ##

fn (StringName) length #

fn (s &StringName) length() i64

Returns the number of characters in the string. Empty strings ("") always return 0. See also [method is_empty].

fn (StringName) lpad #

fn (s &StringName) lpad(min_length i64, cfg StringName_lpad_Cfg) String

Formats the string to be at least [param min_length] long by adding [param character]s to the left of the string, if necessary. See also [method rpad].

fn (StringName) lstrip #

fn (s &StringName) lstrip(chars string) String

Removes a set of characters defined in [param chars] from the string's beginning. See also [method rstrip]. [b]Note:[/b] [param chars] is not a prefix. Use [method trim_prefix] to remove a single prefix, rather than a set of characters.

fn (StringName) lt_stringname #

fn (a StringName) lt_stringname(b StringName) bool

Returns true if the left [StringName]'s pointer comes before [param right]. Note that this will not match their [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url].

fn (StringName) matchn #

fn (s &StringName) matchn(expr string) bool

Does a simple [b]case-insensitive[/b] expression match, where * matches zero or more arbitrary characters and ? matches any single character except a period (.). An empty string or empty expression always evaluates to false.

fn (StringName) md5_buffer #

fn (s &StringName) md5_buffer() PackedByteArray

Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as a [PackedByteArray].

fn (StringName) md5_text #

fn (s &StringName) md5_text() String

Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as another [String].

fn (StringName) mod_aabb #

fn (a StringName) mod_aabb(b AABB) String

fn (StringName) mod_array #

fn (a StringName) mod_array(b Array) String

fn (StringName) mod_basis #

fn (a StringName) mod_basis(b Basis) String

fn (StringName) mod_bool #

fn (a StringName) mod_bool(b bool) String

fn (StringName) mod_callable #

fn (a StringName) mod_callable(b Callable) String

fn (StringName) mod_color #

fn (a StringName) mod_color(b Color) String

fn (StringName) mod_dictionary #

fn (a StringName) mod_dictionary(b Dictionary) String

fn (StringName) mod_f64 #

fn (a StringName) mod_f64(b f64) String

fn (StringName) mod_i64 #

fn (a StringName) mod_i64(b i64) String

fn (StringName) mod_nodepath #

fn (a StringName) mod_nodepath(b NodePath) String

fn (StringName) mod_object #

fn (a StringName) mod_object(b Object) String

fn (StringName) mod_packedbytearray #

fn (a StringName) mod_packedbytearray(b PackedByteArray) String

fn (StringName) mod_packedcolorarray #

fn (a StringName) mod_packedcolorarray(b PackedColorArray) String

fn (StringName) mod_packedfloat32array #

fn (a StringName) mod_packedfloat32array(b PackedFloat32Array) String

fn (StringName) mod_packedfloat64array #

fn (a StringName) mod_packedfloat64array(b PackedFloat64Array) String

fn (StringName) mod_packedint32array #

fn (a StringName) mod_packedint32array(b PackedInt32Array) String

fn (StringName) mod_packedint64array #

fn (a StringName) mod_packedint64array(b PackedInt64Array) String

fn (StringName) mod_packedstringarray #

fn (a StringName) mod_packedstringarray(b PackedStringArray) String

fn (StringName) mod_packedvector2array #

fn (a StringName) mod_packedvector2array(b PackedVector2Array) String

fn (StringName) mod_packedvector3array #

fn (a StringName) mod_packedvector3array(b PackedVector3Array) String

fn (StringName) mod_packedvector4array #

fn (a StringName) mod_packedvector4array(b PackedVector4Array) String

fn (StringName) mod_plane #

fn (a StringName) mod_plane(b Plane) String

fn (StringName) mod_projection #

fn (a StringName) mod_projection(b Projection) String

fn (StringName) mod_quaternion #

fn (a StringName) mod_quaternion(b Quaternion) String

fn (StringName) mod_rect2 #

fn (a StringName) mod_rect2(b Rect2) String

fn (StringName) mod_rect2i #

fn (a StringName) mod_rect2i(b Rect2i) String

fn (StringName) mod_rid #

fn (a StringName) mod_rid(b RID) String

fn (StringName) mod_signal #

fn (a StringName) mod_signal(b Signal) String

fn (StringName) mod_string #

fn (a StringName) mod_string(b String) String

fn (StringName) mod_stringname #

fn (a StringName) mod_stringname(b StringName) String

fn (StringName) mod_transform2d #

fn (a StringName) mod_transform2d(b Transform2D) String

fn (StringName) mod_transform3d #

fn (a StringName) mod_transform3d(b Transform3D) String

fn (StringName) mod_vector2 #

fn (a StringName) mod_vector2(b Vector2) String

fn (StringName) mod_vector2i #

fn (a StringName) mod_vector2i(b Vector2i) String

fn (StringName) mod_vector3 #

fn (a StringName) mod_vector3(b Vector3) String

fn (StringName) mod_vector3i #

fn (a StringName) mod_vector3i(b Vector3i) String

fn (StringName) mod_vector4 #

fn (a StringName) mod_vector4(b Vector4) String

fn (StringName) mod_vector4i #

fn (a StringName) mod_vector4i(b Vector4i) String

fn (StringName) naturalcasecmp_to #

fn (s &StringName) naturalcasecmp_to(to string) i64

Performs a [b]case-sensitive[/b], [i]natural order[/i] comparison to another string. Returns -1 if less than, 1 if greater than, or 0 if equal. "Less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. When used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be ["1", "2", "3", ...], not ["1", "10", "2", "3", ...]. With different string lengths, returns 1 if this string is longer than the [param to] string, or -1 if shorter. Note that the length of empty strings is [i]always[/i] 0. To get a [bool] result from a string comparison, use the == operator instead. See also [method naturalnocasecmp_to], [method filecasecmp_to], and [method nocasecmp_to].

fn (StringName) naturalnocasecmp_to #

fn (s &StringName) naturalnocasecmp_to(to string) i64

Performs a [b]case-insensitive[/b], [i]natural order[/i] comparison to another string. Returns -1 if less than, 1 if greater than, or 0 if equal. "Less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison. When used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be ["1", "2", "3", ...], not ["1", "10", "2", "3", ...]. With different string lengths, returns 1 if this string is longer than the [param to] string, or -1 if shorter. Note that the length of empty strings is [i]always[/i] 0. To get a [bool] result from a string comparison, use the == operator instead. See also [method naturalcasecmp_to], [method filenocasecmp_to], and [method casecmp_to].

fn (StringName) ne_string #

fn (a StringName) ne_string(b String) bool

Returns true if this [StringName] is not equivalent to the given [String].

fn (StringName) ne_stringname #

fn (a StringName) ne_stringname(b StringName) bool

Returns true if the [StringName] and [param right] do not refer to the same name. Comparisons between [StringName]s are much faster than regular [String] comparisons.

fn (StringName) nocasecmp_to #

fn (s &StringName) nocasecmp_to(to string) i64

Performs a [b]case-insensitive[/b] comparison to another string. Returns -1 if less than, 1 if greater than, or 0 if equal. "Less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison. With different string lengths, returns 1 if this string is longer than the [param to] string, or -1 if shorter. Note that the length of empty strings is [i]always[/i] 0. To get a [bool] result from a string comparison, use the == operator instead. See also [method casecmp_to], [method filenocasecmp_to], and [method naturalnocasecmp_to].

fn (StringName) pad_decimals #

fn (s &StringName) pad_decimals(digits i64) String

Formats the string representing a number to have an exact number of [param digits] [i]after[/i] the decimal point.

fn (StringName) pad_zeros #

fn (s &StringName) pad_zeros(digits i64) String

Formats the string representing a number to have an exact number of [param digits] [i]before[/i] the decimal point.

fn (StringName) path_join #

fn (s &StringName) path_join(path string) String

Concatenates [param path] at the end of the string as a subpath, adding / if necessary. [b]Example:[/b] "this/is".path_join("path") == "this/is/path".

fn (StringName) remove_char #

fn (s &StringName) remove_char(what i64) String

Removes all occurrences of the Unicode character with code [param what]. Faster version of [method replace] when the key is only one character long and the replacement is "".

fn (StringName) remove_chars #

fn (s &StringName) remove_chars(chars string) String

Removes any occurrence of the characters in [param chars]. See also [method remove_char].

fn (StringName) repeat #

fn (s &StringName) repeat(count i64) String

Repeats this string a number of times. [param count] needs to be greater than 0. Otherwise, returns an empty string.

fn (StringName) replace #

fn (s &StringName) replace(what string, forwhat string) String

Replaces all occurrences of [param what] inside the string with the given [param forwhat].

fn (StringName) replace_char #

fn (s &StringName) replace_char(key i64, with i64) String

Replaces all occurrences of the Unicode character with code [param key] with the Unicode character with code [param with]. Faster version of [method replace] when the key is only one character long. To get a single character use "X".unicode_at(0) (note that some strings, like compound letters and emoji, can be composed of multiple unicode codepoints, and will not work with this method, use [method length] to make sure).

fn (StringName) replace_chars #

fn (s &StringName) replace_chars(keys string, with i64) String

Replaces any occurrence of the characters in [param keys] with the Unicode character with code [param with]. See also [method replace_char].

fn (StringName) replacen #

fn (s &StringName) replacen(what string, forwhat string) String

Replaces all [b]case-insensitive[/b] occurrences of [param what] inside the string with the given [param forwhat].

fn (StringName) reverse #

fn (s &StringName) reverse() String

Returns the copy of this string in reverse order. This operation works on unicode codepoints, rather than sequences of codepoints, and may break things like compound letters or emojis.

fn (StringName) rfind #

fn (s &StringName) rfind(what string, cfg StringName_rfind_Cfg) i64

Returns the index of the [b]last[/b] occurrence of [param what] in this string, or -1 if there are none. The search's start can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method find].

fn (StringName) rfindn #

fn (s &StringName) rfindn(what string, cfg StringName_rfindn_Cfg) i64

Returns the index of the [b]last[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or -1 if there are none. The starting search index can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method findn].

fn (StringName) right #

fn (s &StringName) right(length i64) String

Returns the last [param length] characters from the end of the string. If [param length] is negative, strips the first [param length] characters from the string's beginning.

print('Hello World!'.right(3))  ##print('Hello World!'.right(-4)) ##

fn (StringName) rpad #

fn (s &StringName) rpad(min_length i64, cfg StringName_rpad_Cfg) String

Formats the string to be at least [param min_length] long, by adding [param character]s to the right of the string, if necessary. See also [method lpad].

fn (StringName) rsplit #

fn (s &StringName) rsplit(cfg StringName_rsplit_Cfg) PackedStringArray

Splits the string using a [param delimiter] and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If [param delimiter] is an empty string, each substring will be a single character. If [param allow_empty] is false, empty strings between adjacent delimiters are excluded from the array. If [param maxsplit] is greater than 0, the number of splits may not exceed [param maxsplit]. By default, the entire string is split, which is mostly identical to [method split]. [codeblocks] [gdscript] var some_string = "One,Two,Three,Four" var some_array = some_string.rsplit(",", true, 1)

print(some_array.size()) # Prints 2 print(some_array[0]) # Prints "One,Two,Three" print(some_array[1]) # Prints "Four" [/gdscript] [csharp] // In C#, there is no String.RSplit() method. [/csharp] [/codeblocks]

fn (StringName) rstrip #

fn (s &StringName) rstrip(chars string) String

Removes a set of characters defined in [param chars] from the string's end. See also [method lstrip]. [b]Note:[/b] [param chars] is not a suffix. Use [method trim_suffix] to remove a single suffix, rather than a set of characters.

fn (StringName) sha1_buffer #

fn (s &StringName) sha1_buffer() PackedByteArray

Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as a [PackedByteArray].

fn (StringName) sha1_text #

fn (s &StringName) sha1_text() String

Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as another [String].

fn (StringName) sha256_buffer #

fn (s &StringName) sha256_buffer() PackedByteArray

Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as a [PackedByteArray].

fn (StringName) sha256_text #

fn (s &StringName) sha256_text() String

Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as another [String].

fn (StringName) similarity #

fn (s &StringName) similarity(text string) f64

Returns the similarity index ([url=https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient]Sørensen-Dice coefficient[/url]) of this string compared to another. A result of 1.0 means totally similar, while 0.0 means totally dissimilar.

print('ABC123'.similarity('ABC123')) ##print('ABC123'.similarity('XYZ456')) ##print('ABC123'.similarity('123ABC')) ##print('ABC123'.similarity('abc123')) ##

fn (StringName) simplify_path #

fn (s &StringName) simplify_path() String

If the string is a valid file path, converts the string into a canonical path. This is the shortest possible path, without "./", and all the unnecessary ".." and "/".

var simple_path = './path/to///../file'.simplify_path()
print(simple_path) ##

fn (StringName) split #

fn (s &StringName) split(cfg StringName_split_Cfg) PackedStringArray

Splits the string using a [param delimiter] and returns an array of the substrings. If [param delimiter] is an empty string, each substring will be a single character. This method is the opposite of [method join]. If [param allow_empty] is false, empty strings between adjacent delimiters are excluded from the array. If [param maxsplit] is greater than 0, the number of splits may not exceed [param maxsplit]. By default, the entire string is split. [codeblocks] [gdscript] var some_array = "One,Two,Three,Four".split(",", true, 2)

print(some_array.size()) # Prints 3 print(some_array[0]) # Prints "One" print(some_array[1]) # Prints "Two" print(some_array[2]) # Prints "Three,Four" [/gdscript] [csharp] // C#'s Split() does not support the maxsplit parameter. var someArray = "One,Two,Three".Split(",");

GD.Print(someArray[0]); // Prints "One" GD.Print(someArray[1]); // Prints "Two" GD.Print(someArray[2]); // Prints "Three" [/csharp] [/codeblocks] [b]Note:[/b] If you only need one substring from the array, consider using [method get_slice] which is faster. If you need to split strings with more complex rules, use the [RegEx] class instead.

fn (StringName) split_floats #

fn (s &StringName) split_floats(delimiter string, cfg StringName_split_floats_Cfg) PackedFloat64Array

Splits the string into floats by using a [param delimiter] and returns a [PackedFloat64Array]. If [param allow_empty] is false, empty or invalid [float] conversions between adjacent delimiters are excluded.

var a = '1,2,4.5'.split_floats(',')         ##var c = '1| ||4.5'.split_floats('|')        ##var b = '1| ||4.5'.split_floats('|', false) ##

fn (StringName) str #

fn (s &StringName) str() string

fn (StringName) strip_edges #

fn (s &StringName) strip_edges(cfg StringName_strip_edges_Cfg) String

Strips all non-printable characters from the beginning and the end of the string. These include spaces, tabulations (\t), and newlines (\n \r). If [param left] is false, ignores the string's beginning. Likewise, if [param right] is false, ignores the string's end.

fn (StringName) strip_escapes #

fn (s &StringName) strip_escapes() String

Strips all escape characters from the string. These include all non-printable control characters of the first page of the ASCII table (values from 0 to 31), such as tabulation (\t) and newline (\n, \r) characters, but [i]not[/i] spaces.

fn (StringName) substr #

fn (s &StringName) substr(from i64, cfg StringName_substr_Cfg) String

Returns part of the string from the position [param from] with length [param len]. If [param len] is -1 (as by default), returns the rest of the string starting from the given position.

fn (StringName) to_ascii_buffer #

fn (s &StringName) to_ascii_buffer() PackedByteArray

Converts the string to an [url=https://en.wikipedia.org/wiki/ASCII]ASCII[/url]/Latin-1 encoded [PackedByteArray]. This method is slightly faster than [method to_utf8_buffer], but replaces all unsupported characters with spaces. This is the inverse of [method PackedByteArray.get_string_from_ascii].

fn (StringName) to_camel_case #

fn (s &StringName) to_camel_case() String

Returns the string converted to camelCase.

fn (StringName) to_float #

fn (s &StringName) to_float() f64

Converts the string representing a decimal number into a [float]. This method stops on the first non-number character, except the first decimal point (.) and the exponent letter (e). See also [method is_valid_float].

var a = '12.35'.to_float()  ##var b = '1.2.3'.to_float()  ##var c = '12xy3'.to_float()  ##var d = '1e3'.to_float()    ##var e = 'Hello!'.to_float() ##

fn (StringName) to_int #

fn (s &StringName) to_int() i64

Converts the string representing an integer number into an [int]. This method removes any non-number character and stops at the first decimal point (.). See also [method is_valid_int].

var a = '123'.to_int()    ##var b = 'x1y2z3'.to_int() ##var c = '-1.2.3'.to_int() ##var d = 'Hello!'.to_int() ##

fn (StringName) to_kebab_case #

fn (s &StringName) to_kebab_case() String

Returns the string converted to kebab-case. [b]Note:[/b] Numbers followed by a [i]single[/i] letter are not separated in the conversion to keep some words (such as "2D") together. [codeblocks] [gdscript] "Node2D".to_kebab_case() # Returns "node-2d" "2nd place".to_kebab_case() # Returns "2-nd-place" "Texture3DAssetFolder".to_kebab_case() # Returns "texture-3d-asset-folder" [/gdscript] [csharp] "Node2D".ToKebabCase(); // Returns "node-2d" "2nd place".ToKebabCase(); // Returns "2-nd-place" "Texture3DAssetFolder".ToKebabCase(); // Returns "texture-3d-asset-folder" [/csharp] [/codeblocks]

fn (StringName) to_lower #

fn (s &StringName) to_lower() String

Returns the string converted to lowercase.

fn (StringName) to_multibyte_char_buffer #

fn (s &StringName) to_multibyte_char_buffer(cfg StringName_to_multibyte_char_buffer_Cfg) PackedByteArray

Converts the string to system multibyte code page encoded [PackedByteArray]. If conversion fails, empty array is returned. The values permitted for [param encoding] are system dependent. If [param encoding] is empty string, system default encoding is used.- For Windows, see [url=https://learn.microsoft.com/en-us/windows/win32/Intl/code-page-identifiers]Code Page Identifiers[/url] .NET names.

  • For macOS and Linux/BSD, see libiconv library documentation and iconv --list for a list of supported encodings.

fn (StringName) to_pascal_case #

fn (s &StringName) to_pascal_case() String

Returns the string converted to PascalCase.

fn (StringName) to_snake_case #

fn (s &StringName) to_snake_case() String

Returns the string converted to snake_case. [b]Note:[/b] Numbers followed by a [i]single[/i] letter are not separated in the conversion to keep some words (such as "2D") together. [codeblocks] [gdscript] "Node2D".to_snake_case() # Returns "node_2d" "2nd place".to_snake_case() # Returns "2_nd_place" "Texture3DAssetFolder".to_snake_case() # Returns "texture_3d_asset_folder" [/gdscript] [csharp] "Node2D".ToSnakeCase(); // Returns "node_2d" "2nd place".ToSnakeCase(); // Returns "2_nd_place" "Texture3DAssetFolder".ToSnakeCase(); // Returns "texture_3d_asset_folder" [/csharp] [/codeblocks]

fn (StringName) to_upper #

fn (s &StringName) to_upper() String

Returns the string converted to UPPERCASE.

fn (StringName) to_utf16_buffer #

fn (s &StringName) to_utf16_buffer() PackedByteArray

Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-16]UTF-16[/url] encoded [PackedByteArray]. This is the inverse of [method PackedByteArray.get_string_from_utf16].

fn (StringName) to_utf32_buffer #

fn (s &StringName) to_utf32_buffer() PackedByteArray

Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-32]UTF-32[/url] encoded [PackedByteArray]. This is the inverse of [method PackedByteArray.get_string_from_utf32].

fn (StringName) to_utf8_buffer #

fn (s &StringName) to_utf8_buffer() PackedByteArray

Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-8]UTF-8[/url] encoded [PackedByteArray]. This method is slightly slower than [method to_ascii_buffer], but supports all UTF-8 characters. For most cases, prefer using this method. This is the inverse of [method PackedByteArray.get_string_from_utf8].

fn (StringName) to_v #

fn (s &StringName) to_v() string

fn (StringName) to_variant #

fn (s &StringName) to_variant() Variant

fn (StringName) to_wchar_buffer #

fn (s &StringName) to_wchar_buffer() PackedByteArray

Converts the string to a [url=https://en.wikipedia.org/wiki/Wide_character]wide character[/url] (wchar_t, UTF-16 on Windows, UTF-32 on other platforms) encoded [PackedByteArray]. This is the inverse of [method PackedByteArray.get_string_from_wchar].

fn (StringName) trim_prefix #

fn (s &StringName) trim_prefix(prefix string) String

Removes the given [param prefix] from the start of the string, or returns the string unchanged.

fn (StringName) trim_suffix #

fn (s &StringName) trim_suffix(suffix string) String

Removes the given [param suffix] from the end of the string, or returns the string unchanged.

fn (StringName) unicode_at #

fn (s &StringName) unicode_at(at i64) i64

Returns the character code at position [param at]. See also [method String.chr], [method @GDScript.char], and [method @GDScript.ord].

fn (StringName) uri_decode #

fn (s &StringName) uri_decode() String

Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also [method uri_encode]. [codeblocks] [gdscript] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" print(url.uri_decode()) # Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/gdscript] [csharp] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/csharp] [/codeblocks] [b]Note:[/b] This method decodes + as space.

fn (StringName) uri_encode #

fn (s &StringName) uri_encode() String

Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also [method uri_decode]. [codeblocks] [gdscript] var prefix = "$DOCS_URL/?highlight=" var url = prefix + "Godot Engine:docs".uri_encode()

print(url) # Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" [/gdscript] [csharp] var prefix = "$DOCS_URL/?highlight="; var url = prefix + "Godot Engine:docs".URIEncode();

GD.Print(url); // Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" [/csharp] [/codeblocks]

fn (StringName) uri_file_decode #

fn (s &StringName) uri_file_decode() String

Decodes the file path from its URL-encoded format. Unlike [method uri_decode] this method leaves + as is.

fn (StringName) validate_filename #

fn (s &StringName) validate_filename() String

Returns a copy of the string with all characters that are not allowed in [method is_valid_filename] replaced with underscores.

fn (StringName) validate_node_name #

fn (s &StringName) validate_node_name() String

Returns a copy of the string with all characters that are not allowed in [member Node.name] (. : @ / " %) replaced with underscores.

fn (StringName) xml_escape #

fn (s &StringName) xml_escape(cfg StringName_xml_escape_Cfg) String

Returns a copy of the string with special characters escaped using the XML standard. If [param escape_quotes] is true, the single quote (') and double quote (") characters are also escaped.

fn (StringName) xml_unescape #

fn (s &StringName) xml_unescape() String

Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard.

struct StringName_count_Cfg #

@[params]
struct StringName_count_Cfg {
pub:
	from i64
	to   i64
}

struct StringName_countn_Cfg #

@[params]
struct StringName_countn_Cfg {
pub:
	from i64
	to   i64
}

struct StringName_erase_Cfg #

@[params]
struct StringName_erase_Cfg {
pub:
	chars i64 = 1
}

struct StringName_find_Cfg #

@[params]
struct StringName_find_Cfg {
pub:
	from i64
}

struct StringName_findn_Cfg #

@[params]
struct StringName_findn_Cfg {
pub:
	from i64
}

struct StringName_format_Cfg #

@[params]
struct StringName_format_Cfg {
pub:
	placeholder string
}

struct StringName_is_valid_hex_number_Cfg #

@[params]
struct StringName_is_valid_hex_number_Cfg {
pub:
	with_prefix bool
}

struct StringName_lpad_Cfg #

@[params]
struct StringName_lpad_Cfg {
pub:
	character string
}

struct StringName_rfind_Cfg #

@[params]
struct StringName_rfind_Cfg {
pub:
	from i64 = -1
}

struct StringName_rfindn_Cfg #

@[params]
struct StringName_rfindn_Cfg {
pub:
	from i64 = -1
}

struct StringName_rpad_Cfg #

@[params]
struct StringName_rpad_Cfg {
pub:
	character string
}

struct StringName_rsplit_Cfg #

@[params]
struct StringName_rsplit_Cfg {
pub:
	delimiter   string
	allow_empty bool
	maxsplit    i64
}

struct StringName_split_Cfg #

@[params]
struct StringName_split_Cfg {
pub:
	delimiter   string
	allow_empty bool
	maxsplit    i64
}

struct StringName_split_floats_Cfg #

@[params]
struct StringName_split_floats_Cfg {
pub:
	allow_empty bool
}

struct StringName_strip_edges_Cfg #

@[params]
struct StringName_strip_edges_Cfg {
pub:
	left  bool
	right bool
}

struct StringName_substr_Cfg #

@[params]
struct StringName_substr_Cfg {
pub:
	len i64 = -1
}

struct StringName_to_multibyte_char_buffer_Cfg #

@[params]
struct StringName_to_multibyte_char_buffer_Cfg {
pub:
	encoding string
}

struct StringName_xml_escape_Cfg #

@[params]
struct StringName_xml_escape_Cfg {
pub:
	escape_quotes bool
}

struct String_count_Cfg #

@[params]
struct String_count_Cfg {
pub:
	from i64
	to   i64
}

struct String_countn_Cfg #

@[params]
struct String_countn_Cfg {
pub:
	from i64
	to   i64
}

struct String_erase_Cfg #

@[params]
struct String_erase_Cfg {
pub:
	chars i64 = 1
}

struct String_find_Cfg #

@[params]
struct String_find_Cfg {
pub:
	from i64
}

struct String_findn_Cfg #

@[params]
struct String_findn_Cfg {
pub:
	from i64
}

struct String_format_Cfg #

@[params]
struct String_format_Cfg {
pub:
	placeholder string
}

struct String_is_valid_hex_number_Cfg #

@[params]
struct String_is_valid_hex_number_Cfg {
pub:
	with_prefix bool
}

struct String_lpad_Cfg #

@[params]
struct String_lpad_Cfg {
pub:
	character string
}

struct String_num_Cfg #

@[params]
struct String_num_Cfg {
pub:
	decimals i64 = -1
}

struct String_num_int64_Cfg #

@[params]
struct String_num_int64_Cfg {
pub:
	base           i64 = 10
	capitalize_hex bool
}

struct String_num_uint64_Cfg #

@[params]
struct String_num_uint64_Cfg {
pub:
	base           i64 = 10
	capitalize_hex bool
}

struct String_rfind_Cfg #

@[params]
struct String_rfind_Cfg {
pub:
	from i64 = -1
}

struct String_rfindn_Cfg #

@[params]
struct String_rfindn_Cfg {
pub:
	from i64 = -1
}

struct String_rpad_Cfg #

@[params]
struct String_rpad_Cfg {
pub:
	character string
}

struct String_rsplit_Cfg #

@[params]
struct String_rsplit_Cfg {
pub:
	delimiter   string
	allow_empty bool
	maxsplit    i64
}

struct String_split_Cfg #

@[params]
struct String_split_Cfg {
pub:
	delimiter   string
	allow_empty bool
	maxsplit    i64
}

struct String_split_floats_Cfg #

@[params]
struct String_split_floats_Cfg {
pub:
	allow_empty bool
}

struct String_strip_edges_Cfg #

@[params]
struct String_strip_edges_Cfg {
pub:
	left  bool
	right bool
}

struct String_substr_Cfg #

@[params]
struct String_substr_Cfg {
pub:
	len i64 = -1
}

struct String_to_multibyte_char_buffer_Cfg #

@[params]
struct String_to_multibyte_char_buffer_Cfg {
pub:
	encoding string
}

struct String_xml_escape_Cfg #

@[params]
struct String_xml_escape_Cfg {
pub:
	escape_quotes bool
}

struct StyleBox #

struct StyleBox {
	Resource
}

Abstract base class for defining stylized boxes for UI elements.

fn (StyleBox) to_variant #

fn (s &StyleBox) to_variant() Variant

fn (StyleBox) from_variant #

fn (mut s StyleBox) from_variant(variant &Variant)

fn (StyleBox) gd_draw #

fn (s &StyleBox) gd_draw(to_canvas_item RID, rect Rect2)

fn (StyleBox) gd_get_draw_rect #

fn (s &StyleBox) gd_get_draw_rect(rect Rect2) Rect2

fn (StyleBox) gd_get_minimum_size #

fn (s &StyleBox) gd_get_minimum_size() Vector2

Virtual method to be implemented by the user. Returns a custom minimum size that the stylebox must respect when drawing. By default [method get_minimum_size] only takes content margins into account. This method can be overridden to add another size restriction. A combination of the default behavior and the output of this method will be used, to account for both sizes.

fn (StyleBox) gd_test_mask #

fn (s &StyleBox) gd_test_mask(point Vector2, rect Rect2) bool

fn (StyleBox) get_minimum_size #

fn (s &StyleBox) get_minimum_size() Vector2

Returns the minimum size that this stylebox can be shrunk to.

fn (StyleBox) set_content_margin #

fn (s &StyleBox) set_content_margin(margin Side, offset f64)

Sets the default value of the specified [enum Side] to [param offset] pixels.

fn (StyleBox) set_content_margin_all #

fn (s &StyleBox) set_content_margin_all(offset f64)

Sets the default margin to [param offset] pixels for all sides.

fn (StyleBox) get_content_margin #

fn (s &StyleBox) get_content_margin(margin Side) f64

Returns the default margin of the specified [enum Side].

fn (StyleBox) get_margin #

fn (s &StyleBox) get_margin(margin Side) f64

Returns the content margin offset for the specified [enum Side]. Positive values reduce size inwards, unlike [Control]'s margin values.

fn (StyleBox) get_offset #

fn (s &StyleBox) get_offset() Vector2

Returns the "offset" of a stylebox. This helper function returns a value equivalent to Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP)).

fn (StyleBox) draw #

fn (s &StyleBox) draw(canvas_item RID, rect Rect2)

Draws this stylebox using a canvas item identified by the given [RID]. The [RID] value can either be the result of [method CanvasItem.get_canvas_item] called on an existing [CanvasItem]-derived node, or directly from creating a canvas item in the [RenderingServer] with [method RenderingServer.canvas_item_create].

fn (StyleBox) get_current_item_drawn #

fn (s &StyleBox) get_current_item_drawn() CanvasItem

Returns the [CanvasItem] that handles its [constant CanvasItem.NOTIFICATION_DRAW] or [method CanvasItem._draw] callback at this moment.

fn (StyleBox) test_mask #

fn (s &StyleBox) test_mask(point Vector2, rect Rect2) bool

Test a position in a rectangle, return whether it passes the mask test.

struct StyleBoxEmpty #

struct StyleBoxEmpty {
	StyleBox
}

An empty [StyleBox] (does not display anything).

fn (StyleBoxEmpty) to_variant #

fn (s &StyleBoxEmpty) to_variant() Variant

fn (StyleBoxEmpty) from_variant #

fn (mut s StyleBoxEmpty) from_variant(variant &Variant)

struct StyleBoxFlat #

struct StyleBoxFlat {
	StyleBox
}

A customizable [StyleBox] that doesn't use a texture.

fn (StyleBoxFlat) to_variant #

fn (s &StyleBoxFlat) to_variant() Variant

fn (StyleBoxFlat) from_variant #

fn (mut s StyleBoxFlat) from_variant(variant &Variant)

fn (StyleBoxFlat) set_bg_color #

fn (s &StyleBoxFlat) set_bg_color(color Color)

fn (StyleBoxFlat) get_bg_color #

fn (s &StyleBoxFlat) get_bg_color() Color

fn (StyleBoxFlat) set_border_color #

fn (s &StyleBoxFlat) set_border_color(color Color)

fn (StyleBoxFlat) get_border_color #

fn (s &StyleBoxFlat) get_border_color() Color

fn (StyleBoxFlat) set_border_width_all #

fn (s &StyleBoxFlat) set_border_width_all(width i64)

Sets the border width to [param width] pixels for all sides.

fn (StyleBoxFlat) get_border_width_min #

fn (s &StyleBoxFlat) get_border_width_min() i64

Returns the smallest border width out of all four borders.

fn (StyleBoxFlat) set_border_width #

fn (s &StyleBoxFlat) set_border_width(margin Side, width i64)

Sets the specified [enum Side]'s border width to [param width] pixels.

fn (StyleBoxFlat) get_border_width #

fn (s &StyleBoxFlat) get_border_width(margin Side) i64

Returns the specified [enum Side]'s border width.

fn (StyleBoxFlat) set_border_blend #

fn (s &StyleBoxFlat) set_border_blend(blend bool)

fn (StyleBoxFlat) get_border_blend #

fn (s &StyleBoxFlat) get_border_blend() bool

fn (StyleBoxFlat) set_corner_radius_all #

fn (s &StyleBoxFlat) set_corner_radius_all(radius i64)

Sets the corner radius to [param radius] pixels for all corners.

fn (StyleBoxFlat) set_corner_radius #

fn (s &StyleBoxFlat) set_corner_radius(corner Corner, radius i64)

Sets the corner radius to [param radius] pixels for the given [param corner].

fn (StyleBoxFlat) get_corner_radius #

fn (s &StyleBoxFlat) get_corner_radius(corner Corner) i64

Returns the given [param corner]'s radius.

fn (StyleBoxFlat) set_expand_margin #

fn (s &StyleBoxFlat) set_expand_margin(margin Side, size f64)

Sets the expand margin to [param size] pixels for the specified [enum Side].

fn (StyleBoxFlat) set_expand_margin_all #

fn (s &StyleBoxFlat) set_expand_margin_all(size f64)

Sets the expand margin to [param size] pixels for all sides.

fn (StyleBoxFlat) get_expand_margin #

fn (s &StyleBoxFlat) get_expand_margin(margin Side) f64

Returns the size of the specified [enum Side]'s expand margin.

fn (StyleBoxFlat) set_draw_center #

fn (s &StyleBoxFlat) set_draw_center(draw_center bool)

fn (StyleBoxFlat) is_draw_center_enabled #

fn (s &StyleBoxFlat) is_draw_center_enabled() bool

fn (StyleBoxFlat) set_skew #

fn (s &StyleBoxFlat) set_skew(skew Vector2)

fn (StyleBoxFlat) get_skew #

fn (s &StyleBoxFlat) get_skew() Vector2

fn (StyleBoxFlat) set_shadow_color #

fn (s &StyleBoxFlat) set_shadow_color(color Color)

fn (StyleBoxFlat) get_shadow_color #

fn (s &StyleBoxFlat) get_shadow_color() Color

fn (StyleBoxFlat) set_shadow_size #

fn (s &StyleBoxFlat) set_shadow_size(size i64)

fn (StyleBoxFlat) get_shadow_size #

fn (s &StyleBoxFlat) get_shadow_size() i64

fn (StyleBoxFlat) set_shadow_offset #

fn (s &StyleBoxFlat) set_shadow_offset(offset Vector2)

fn (StyleBoxFlat) get_shadow_offset #

fn (s &StyleBoxFlat) get_shadow_offset() Vector2

fn (StyleBoxFlat) set_anti_aliased #

fn (s &StyleBoxFlat) set_anti_aliased(anti_aliased bool)

fn (StyleBoxFlat) is_anti_aliased #

fn (s &StyleBoxFlat) is_anti_aliased() bool

fn (StyleBoxFlat) set_aa_size #

fn (s &StyleBoxFlat) set_aa_size(size f64)

fn (StyleBoxFlat) get_aa_size #

fn (s &StyleBoxFlat) get_aa_size() f64

fn (StyleBoxFlat) set_corner_detail #

fn (s &StyleBoxFlat) set_corner_detail(detail i64)

fn (StyleBoxFlat) get_corner_detail #

fn (s &StyleBoxFlat) get_corner_detail() i64

struct StyleBoxLine #

struct StyleBoxLine {
	StyleBox
}

A [StyleBox] that displays a single line of a given color and thickness.

fn (StyleBoxLine) to_variant #

fn (s &StyleBoxLine) to_variant() Variant

fn (StyleBoxLine) from_variant #

fn (mut s StyleBoxLine) from_variant(variant &Variant)

fn (StyleBoxLine) set_color #

fn (s &StyleBoxLine) set_color(color Color)

fn (StyleBoxLine) get_color #

fn (s &StyleBoxLine) get_color() Color

fn (StyleBoxLine) set_thickness #

fn (s &StyleBoxLine) set_thickness(thickness i64)

fn (StyleBoxLine) get_thickness #

fn (s &StyleBoxLine) get_thickness() i64

fn (StyleBoxLine) set_grow_begin #

fn (s &StyleBoxLine) set_grow_begin(offset f64)

fn (StyleBoxLine) get_grow_begin #

fn (s &StyleBoxLine) get_grow_begin() f64

fn (StyleBoxLine) set_grow_end #

fn (s &StyleBoxLine) set_grow_end(offset f64)

fn (StyleBoxLine) get_grow_end #

fn (s &StyleBoxLine) get_grow_end() f64

fn (StyleBoxLine) set_vertical #

fn (s &StyleBoxLine) set_vertical(vertical bool)

fn (StyleBoxLine) is_vertical #

fn (s &StyleBoxLine) is_vertical() bool

struct StyleBoxTexture #

struct StyleBoxTexture {
	StyleBox
}

A texture-based nine-patch [StyleBox].

fn (StyleBoxTexture) to_variant #

fn (s &StyleBoxTexture) to_variant() Variant

fn (StyleBoxTexture) from_variant #

fn (mut s StyleBoxTexture) from_variant(variant &Variant)

fn (StyleBoxTexture) set_texture #

fn (s &StyleBoxTexture) set_texture(texture Texture2D)

fn (StyleBoxTexture) get_texture #

fn (s &StyleBoxTexture) get_texture() Texture2D

fn (StyleBoxTexture) set_texture_margin #

fn (s &StyleBoxTexture) set_texture_margin(margin Side, size f64)

Sets the margin to [param size] pixels for the specified [enum Side].

fn (StyleBoxTexture) set_texture_margin_all #

fn (s &StyleBoxTexture) set_texture_margin_all(size f64)

Sets the margin to [param size] pixels for all sides.

fn (StyleBoxTexture) get_texture_margin #

fn (s &StyleBoxTexture) get_texture_margin(margin Side) f64

Returns the margin size of the specified [enum Side].

fn (StyleBoxTexture) set_expand_margin #

fn (s &StyleBoxTexture) set_expand_margin(margin Side, size f64)

Sets the expand margin to [param size] pixels for the specified [enum Side].

fn (StyleBoxTexture) set_expand_margin_all #

fn (s &StyleBoxTexture) set_expand_margin_all(size f64)

Sets the expand margin to [param size] pixels for all sides.

fn (StyleBoxTexture) get_expand_margin #

fn (s &StyleBoxTexture) get_expand_margin(margin Side) f64

Returns the expand margin size of the specified [enum Side].

fn (StyleBoxTexture) set_region_rect #

fn (s &StyleBoxTexture) set_region_rect(region Rect2)

fn (StyleBoxTexture) get_region_rect #

fn (s &StyleBoxTexture) get_region_rect() Rect2

fn (StyleBoxTexture) set_draw_center #

fn (s &StyleBoxTexture) set_draw_center(enable bool)

fn (StyleBoxTexture) is_draw_center_enabled #

fn (s &StyleBoxTexture) is_draw_center_enabled() bool

fn (StyleBoxTexture) set_modulate #

fn (s &StyleBoxTexture) set_modulate(color Color)

fn (StyleBoxTexture) get_modulate #

fn (s &StyleBoxTexture) get_modulate() Color

fn (StyleBoxTexture) set_h_axis_stretch_mode #

fn (s &StyleBoxTexture) set_h_axis_stretch_mode(mode StyleBoxTextureAxisStretchMode)

fn (StyleBoxTexture) get_h_axis_stretch_mode #

fn (s &StyleBoxTexture) get_h_axis_stretch_mode() StyleBoxTextureAxisStretchMode

fn (StyleBoxTexture) set_v_axis_stretch_mode #

fn (s &StyleBoxTexture) set_v_axis_stretch_mode(mode StyleBoxTextureAxisStretchMode)

fn (StyleBoxTexture) get_v_axis_stretch_mode #

fn (s &StyleBoxTexture) get_v_axis_stretch_mode() StyleBoxTextureAxisStretchMode

struct SubViewport #

struct SubViewport {
	Viewport
}

An interface to a game world that doesn't create a window or draw to the screen directly.

fn (SubViewport) to_variant #

fn (s &SubViewport) to_variant() Variant

fn (SubViewport) from_variant #

fn (mut s SubViewport) from_variant(variant &Variant)

fn (SubViewport) set_size #

fn (s &SubViewport) set_size(size Vector2i)

fn (SubViewport) get_size #

fn (s &SubViewport) get_size() Vector2i

fn (SubViewport) set_size_2d_override #

fn (s &SubViewport) set_size_2d_override(size Vector2i)

fn (SubViewport) get_size_2d_override #

fn (s &SubViewport) get_size_2d_override() Vector2i

fn (SubViewport) set_size_2d_override_stretch #

fn (s &SubViewport) set_size_2d_override_stretch(enable bool)

fn (SubViewport) is_size_2d_override_stretch_enabled #

fn (s &SubViewport) is_size_2d_override_stretch_enabled() bool

fn (SubViewport) set_update_mode #

fn (s &SubViewport) set_update_mode(mode SubViewportUpdateMode)

fn (SubViewport) get_update_mode #

fn (s &SubViewport) get_update_mode() SubViewportUpdateMode

fn (SubViewport) set_clear_mode #

fn (s &SubViewport) set_clear_mode(mode SubViewportClearMode)

fn (SubViewport) get_clear_mode #

fn (s &SubViewport) get_clear_mode() SubViewportClearMode

struct SubViewportContainer #

struct SubViewportContainer {
	Container
}

A container used for displaying the contents of a [SubViewport].

fn (SubViewportContainer) to_variant #

fn (s &SubViewportContainer) to_variant() Variant

fn (SubViewportContainer) from_variant #

fn (mut s SubViewportContainer) from_variant(variant &Variant)

fn (SubViewportContainer) gd_propagate_input_event #

fn (s &SubViewportContainer) gd_propagate_input_event(event InputEvent) bool

Virtual method to be implemented by the user. If it returns true, the [param event] is propagated to [SubViewport] children. Propagation doesn't happen if it returns false. If the function is not implemented, all events are propagated to SubViewports.

fn (SubViewportContainer) set_stretch #

fn (s &SubViewportContainer) set_stretch(enable bool)

fn (SubViewportContainer) is_stretch_enabled #

fn (s &SubViewportContainer) is_stretch_enabled() bool

fn (SubViewportContainer) set_stretch_shrink #

fn (s &SubViewportContainer) set_stretch_shrink(amount i64)

fn (SubViewportContainer) get_stretch_shrink #

fn (s &SubViewportContainer) get_stretch_shrink() i64

fn (SubViewportContainer) set_mouse_target #

fn (s &SubViewportContainer) set_mouse_target(amount bool)

fn (SubViewportContainer) is_mouse_target_enabled #

fn (s &SubViewportContainer) is_mouse_target_enabled() bool

struct SubtweenTweener #

struct SubtweenTweener {
	Tweener
}

Runs a [Tween] nested within another [Tween].

fn (SubtweenTweener) to_variant #

fn (s &SubtweenTweener) to_variant() Variant

fn (SubtweenTweener) from_variant #

fn (mut s SubtweenTweener) from_variant(variant &Variant)

fn (SubtweenTweener) set_delay #

fn (s &SubtweenTweener) set_delay(delay f64) SubtweenTweener

Sets the time in seconds after which the [SubtweenTweener] will start running the subtween. By default there's no delay.

struct SurfaceTool #

struct SurfaceTool {
	RefCounted
}

Helper tool to create geometry.

fn (SurfaceTool) to_variant #

fn (s &SurfaceTool) to_variant() Variant

fn (SurfaceTool) from_variant #

fn (mut s SurfaceTool) from_variant(variant &Variant)

fn (SurfaceTool) set_skin_weight_count #

fn (s &SurfaceTool) set_skin_weight_count(count SurfaceToolSkinWeightCount)

Set to [constant SKIN_8_WEIGHTS] to indicate that up to 8 bone influences per vertex may be used. By default, only 4 bone influences are used ([constant SKIN_4_WEIGHTS]). [b]Note:[/b] This function takes an enum, not the exact number of weights.

fn (SurfaceTool) get_skin_weight_count #

fn (s &SurfaceTool) get_skin_weight_count() SurfaceToolSkinWeightCount

By default, returns [constant SKIN_4_WEIGHTS] to indicate only 4 bone influences per vertex are used. Returns [constant SKIN_8_WEIGHTS] if up to 8 influences are used. [b]Note:[/b] This function returns an enum, not the exact number of weights.

fn (SurfaceTool) set_custom_format #

fn (s &SurfaceTool) set_custom_format(channel_index i64, format SurfaceToolCustomFormat)

Sets the color format for this custom [param channel_index]. Use [constant CUSTOM_MAX] to disable. Must be invoked after [method begin] and should be set before [method commit] or [method commit_to_arrays].

fn (SurfaceTool) get_custom_format #

fn (s &SurfaceTool) get_custom_format(channel_index i64) SurfaceToolCustomFormat

Returns the format for custom [param channel_index] (currently up to 4). Returns [constant CUSTOM_MAX] if this custom channel is unused.

fn (SurfaceTool) begin #

fn (s &SurfaceTool) begin(primitive MeshPrimitiveType)

Called before adding any vertices. Takes the primitive type as an argument (e.g. [constant Mesh.PRIMITIVE_TRIANGLES]).

fn (SurfaceTool) add_vertex #

fn (s &SurfaceTool) add_vertex(vertex Vector3)

Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV).

fn (SurfaceTool) set_color #

fn (s &SurfaceTool) set_color(color Color)

Specifies a [Color] to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. [b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible.

fn (SurfaceTool) set_normal #

fn (s &SurfaceTool) set_normal(normal Vector3)

Specifies a normal to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.

fn (SurfaceTool) set_tangent #

fn (s &SurfaceTool) set_tangent(tangent Plane)

Specifies a tangent to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.

fn (SurfaceTool) set_uv #

fn (s &SurfaceTool) set_uv(uv Vector2)

Specifies a set of UV coordinates to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.

fn (SurfaceTool) set_uv2 #

fn (s &SurfaceTool) set_uv2(uv2 Vector2)

Specifies an optional second set of UV coordinates to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.

fn (SurfaceTool) set_bones #

fn (s &SurfaceTool) set_bones(bones PackedInt32Array)

Specifies an array of bones to use for the [i]next[/i] vertex. [param bones] must contain 4 integers.

fn (SurfaceTool) set_weights #

fn (s &SurfaceTool) set_weights(weights PackedFloat32Array)

Specifies weight values to use for the [i]next[/i] vertex. [param weights] must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.

fn (SurfaceTool) set_custom #

fn (s &SurfaceTool) set_custom(channel_index i64, custom_color Color)

Sets the custom value on this vertex for [param channel_index]. [method set_custom_format] must be called first for this [param channel_index]. Formats which are not RGBA will ignore other color channels.

fn (SurfaceTool) set_smooth_group #

fn (s &SurfaceTool) set_smooth_group(index i64)

Specifies the smooth group to use for the [i]next[/i] vertex. If this is never called, all vertices will have the default smooth group of 0 and will be smoothed with adjacent vertices of the same group. To produce a mesh with flat normals, set the smooth group to -1. [b]Note:[/b] This function actually takes a uint32_t, so C# users should use uint32.MaxValue instead of -1 to produce a mesh with flat normals.

fn (SurfaceTool) add_triangle_fan #

fn (s &SurfaceTool) add_triangle_fan(vertices PackedVector3Array, cfg SurfaceTool_add_triangle_fan_Cfg)

Inserts a triangle fan made of array data into [Mesh] being constructed. Requires the primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES].

fn (SurfaceTool) add_index #

fn (s &SurfaceTool) add_index(index i64)

Adds a vertex to index array if you are using indexed vertices. Does not need to be called before adding vertices.

fn (SurfaceTool) index #

fn (s &SurfaceTool) index()

Shrinks the vertex array by creating an index array. This can improve performance by avoiding vertex reuse.

fn (SurfaceTool) deindex #

fn (s &SurfaceTool) deindex()

Removes the index array by expanding the vertex array.

fn (SurfaceTool) generate_normals #

fn (s &SurfaceTool) generate_normals(cfg SurfaceTool_generate_normals_Cfg)

Generates normals from vertices so you do not have to do it manually. If [param flip] is true, the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents]. [b]Note:[/b] [method generate_normals] only works if the primitive type is set to [constant Mesh.PRIMITIVE_TRIANGLES]. [b]Note:[/b] [method generate_normals] takes smooth groups into account. To generate smooth normals, set the smooth group to a value greater than or equal to 0 using [method set_smooth_group] or leave the smooth group at the default of 0. To generate flat normals, set the smooth group to -1 using [method set_smooth_group] prior to adding vertices.

fn (SurfaceTool) generate_tangents #

fn (s &SurfaceTool) generate_tangents()

Generates a tangent vector for each vertex. Requires that each vertex already has UVs and normals set (see [method generate_normals]).

fn (SurfaceTool) optimize_indices_for_cache #

fn (s &SurfaceTool) optimize_indices_for_cache()

Optimizes triangle sorting for performance. Requires that [method get_primitive_type] is [constant Mesh.PRIMITIVE_TRIANGLES].

fn (SurfaceTool) get_aabb #

fn (s &SurfaceTool) get_aabb() AABB

Returns the axis-aligned bounding box of the vertex positions.

fn (SurfaceTool) generate_lod #

fn (s &SurfaceTool) generate_lod(nd_threshold f64, cfg SurfaceTool_generate_lod_Cfg) PackedInt32Array

Generates an LOD for a given [param nd_threshold] in linear units (square root of quadric error metric), using at most [param target_index_count] indices.

fn (SurfaceTool) set_material #

fn (s &SurfaceTool) set_material(material Material)

Sets [Material] to be used by the [Mesh] you are constructing.

fn (SurfaceTool) get_primitive_type #

fn (s &SurfaceTool) get_primitive_type() MeshPrimitiveType

Returns the type of mesh geometry, such as [constant Mesh.PRIMITIVE_TRIANGLES].

fn (SurfaceTool) clear #

fn (s &SurfaceTool) clear()

Clear all information passed into the surface tool so far.

fn (SurfaceTool) create_from #

fn (s &SurfaceTool) create_from(existing Mesh, surface i64)

Creates a vertex array from an existing [Mesh].

fn (SurfaceTool) create_from_arrays #

fn (s &SurfaceTool) create_from_arrays(arrays Array, cfg SurfaceTool_create_from_arrays_Cfg)

Creates this SurfaceTool from existing vertex arrays such as returned by [method commit_to_arrays], [method Mesh.surface_get_arrays], [method Mesh.surface_get_blend_shape_arrays], [method ImporterMesh.get_surface_arrays], and [method ImporterMesh.get_surface_blend_shape_arrays]. [param primitive_type] controls the type of mesh data, defaulting to [constant Mesh.PRIMITIVE_TRIANGLES].

fn (SurfaceTool) create_from_blend_shape #

fn (s &SurfaceTool) create_from_blend_shape(existing Mesh, surface i64, blend_shape string)

Creates a vertex array from the specified blend shape of an existing [Mesh]. This can be used to extract a specific pose from a blend shape.

fn (SurfaceTool) append_from #

fn (s &SurfaceTool) append_from(existing Mesh, surface i64, transform Transform3D)

Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform3D].

fn (SurfaceTool) commit #

fn (s &SurfaceTool) commit(cfg SurfaceTool_commit_Cfg) ArrayMesh

Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. The [param flags] argument can be the bitwise OR of [constant Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE], [constant Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS], or [constant Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY].

fn (SurfaceTool) commit_to_arrays #

fn (s &SurfaceTool) commit_to_arrays() Array

Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays], [method ImporterMesh.add_surface], and [method create_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] or [ImporterMesh] APIs.

struct SurfaceTool_add_triangle_fan_Cfg #

@[params]
struct SurfaceTool_add_triangle_fan_Cfg {
pub:
	uvs      PackedVector2Array = PackedVector2Array{}
	colors   PackedColorArray   = PackedColorArray{}
	uv2s     PackedVector2Array = PackedVector2Array{}
	normals  PackedVector3Array = PackedVector3Array{}
	tangents Array
}

Optional parameters for SurfaceTool#add_triangle_fan

struct SurfaceTool_commit_Cfg #

@[params]
struct SurfaceTool_commit_Cfg {
pub:
	existing ArrayMesh
	flags    i64
}

Optional parameters for SurfaceTool#commit

struct SurfaceTool_create_from_arrays_Cfg #

@[params]
struct SurfaceTool_create_from_arrays_Cfg {
pub:
	primitive_type MeshPrimitiveType = unsafe { MeshPrimitiveType(3) }
}

Optional parameters for SurfaceTool#create_from_arrays

struct SurfaceTool_generate_lod_Cfg #

@[params]
struct SurfaceTool_generate_lod_Cfg {
pub:
	target_index_count i64 = 3
}

Optional parameters for SurfaceTool#generate_lod

struct SurfaceTool_generate_normals_Cfg #

@[params]
struct SurfaceTool_generate_normals_Cfg {
pub:
	flip bool
}

Optional parameters for SurfaceTool#generate_normals

struct SyntaxHighlighter #

struct SyntaxHighlighter {
	Resource
}

Base class for syntax highlighters. Provides syntax highlighting data to a [TextEdit].

fn (SyntaxHighlighter) to_variant #

fn (s &SyntaxHighlighter) to_variant() Variant

fn (SyntaxHighlighter) from_variant #

fn (mut s SyntaxHighlighter) from_variant(variant &Variant)

fn (SyntaxHighlighter) gd_get_line_syntax_highlighting #

fn (s &SyntaxHighlighter) gd_get_line_syntax_highlighting(line i64) Dictionary

Virtual method which can be overridden to return syntax highlighting data. See [method get_line_syntax_highlighting] for more details.

fn (SyntaxHighlighter) gd_clear_highlighting_cache #

fn (s &SyntaxHighlighter) gd_clear_highlighting_cache()

Virtual method which can be overridden to clear any local caches.

fn (SyntaxHighlighter) gd_update_cache #

fn (s &SyntaxHighlighter) gd_update_cache()

Virtual method which can be overridden to update any local caches.

fn (SyntaxHighlighter) get_line_syntax_highlighting #

fn (s &SyntaxHighlighter) get_line_syntax_highlighting(line i64) Dictionary

Returns the syntax highlighting data for the line at index [param line]. If the line is not cached, calls [method _get_line_syntax_highlighting] first to calculate the data. Each entry is a column number containing a nested [Dictionary]. The column number denotes the start of a region, the region will end if another region is found, or at the end of the line. The nested [Dictionary] contains the data for that region. Currently only the key "color" is supported. [b]Example:[/b] Possible return value. This means columns 0 to 4 should be red, and columns 5 to the end of the line should be green:

{
0: {
'color': Color(1, 0, 0)
},
5: {
'color': Color(0, 1, 0)
}
}

fn (SyntaxHighlighter) update_cache #

fn (s &SyntaxHighlighter) update_cache()

Clears then updates the [SyntaxHighlighter] caches. Override [method _update_cache] for a callback. [b]Note:[/b] This is called automatically when the associated [TextEdit] node, updates its own cache.

fn (SyntaxHighlighter) clear_highlighting_cache #

fn (s &SyntaxHighlighter) clear_highlighting_cache()

Clears all cached syntax highlighting data. Then calls overridable method [method _clear_highlighting_cache].

fn (SyntaxHighlighter) get_text_edit #

fn (s &SyntaxHighlighter) get_text_edit() TextEdit

Returns the associated [TextEdit] node.

struct SystemFont #

struct SystemFont {
	Font
}

A font loaded from a system font. Falls back to a default theme font if not implemented on the host OS.

fn (SystemFont) to_variant #

fn (s &SystemFont) to_variant() Variant

fn (SystemFont) from_variant #

fn (mut s SystemFont) from_variant(variant &Variant)

fn (SystemFont) set_antialiasing #

fn (s &SystemFont) set_antialiasing(antialiasing TextServerFontAntialiasing)

fn (SystemFont) get_antialiasing #

fn (s &SystemFont) get_antialiasing() TextServerFontAntialiasing

fn (SystemFont) set_disable_embedded_bitmaps #

fn (s &SystemFont) set_disable_embedded_bitmaps(disable_embedded_bitmaps bool)

fn (SystemFont) get_disable_embedded_bitmaps #

fn (s &SystemFont) get_disable_embedded_bitmaps() bool

fn (SystemFont) set_generate_mipmaps #

fn (s &SystemFont) set_generate_mipmaps(generate_mipmaps bool)

fn (SystemFont) get_generate_mipmaps #

fn (s &SystemFont) get_generate_mipmaps() bool

fn (SystemFont) set_allow_system_fallback #

fn (s &SystemFont) set_allow_system_fallback(allow_system_fallback bool)

fn (SystemFont) is_allow_system_fallback #

fn (s &SystemFont) is_allow_system_fallback() bool

fn (SystemFont) set_force_autohinter #

fn (s &SystemFont) set_force_autohinter(force_autohinter bool)

fn (SystemFont) is_force_autohinter #

fn (s &SystemFont) is_force_autohinter() bool

fn (SystemFont) set_modulate_color_glyphs #

fn (s &SystemFont) set_modulate_color_glyphs(modulate bool)

fn (SystemFont) is_modulate_color_glyphs #

fn (s &SystemFont) is_modulate_color_glyphs() bool

fn (SystemFont) set_hinting #

fn (s &SystemFont) set_hinting(hinting TextServerHinting)

fn (SystemFont) get_hinting #

fn (s &SystemFont) get_hinting() TextServerHinting

fn (SystemFont) set_subpixel_positioning #

fn (s &SystemFont) set_subpixel_positioning(subpixel_positioning TextServerSubpixelPositioning)

fn (SystemFont) get_subpixel_positioning #

fn (s &SystemFont) get_subpixel_positioning() TextServerSubpixelPositioning

fn (SystemFont) set_keep_rounding_remainders #

fn (s &SystemFont) set_keep_rounding_remainders(keep_rounding_remainders bool)

fn (SystemFont) get_keep_rounding_remainders #

fn (s &SystemFont) get_keep_rounding_remainders() bool

fn (SystemFont) set_multichannel_signed_distance_field #

fn (s &SystemFont) set_multichannel_signed_distance_field(msdf bool)

fn (SystemFont) is_multichannel_signed_distance_field #

fn (s &SystemFont) is_multichannel_signed_distance_field() bool

fn (SystemFont) set_msdf_pixel_range #

fn (s &SystemFont) set_msdf_pixel_range(msdf_pixel_range i64)

fn (SystemFont) get_msdf_pixel_range #

fn (s &SystemFont) get_msdf_pixel_range() i64

fn (SystemFont) set_msdf_size #

fn (s &SystemFont) set_msdf_size(msdf_size i64)

fn (SystemFont) get_msdf_size #

fn (s &SystemFont) get_msdf_size() i64

fn (SystemFont) set_oversampling #

fn (s &SystemFont) set_oversampling(oversampling f64)

fn (SystemFont) get_oversampling #

fn (s &SystemFont) get_oversampling() f64

fn (SystemFont) get_font_names #

fn (s &SystemFont) get_font_names() PackedStringArray

fn (SystemFont) set_font_names #

fn (s &SystemFont) set_font_names(names PackedStringArray)

fn (SystemFont) get_font_italic #

fn (s &SystemFont) get_font_italic() bool

fn (SystemFont) set_font_italic #

fn (s &SystemFont) set_font_italic(italic bool)

fn (SystemFont) set_font_weight #

fn (s &SystemFont) set_font_weight(weight i64)

fn (SystemFont) set_font_stretch #

fn (s &SystemFont) set_font_stretch(stretch i64)

struct TCPServer #

struct TCPServer {
	RefCounted
}

A TCP server.

fn (TCPServer) to_variant #

fn (s &TCPServer) to_variant() Variant

fn (TCPServer) from_variant #

fn (mut s TCPServer) from_variant(variant &Variant)

fn (TCPServer) listen #

fn (s &TCPServer) listen(port i64, cfg TCPServer_listen_Cfg) GDError

Listen on the [param port] binding to [param bind_address]. If [param bind_address] is set as "*" (default), the server will listen on all available addresses (both IPv4 and IPv6). If [param bind_address] is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the server will listen on all available addresses matching that IP type. If [param bind_address] is set to any valid address (e.g. "192.168.1.101", "::1", etc.), the server will only listen on the interface with that address (or fail if no interface with the given address exists).

fn (TCPServer) is_connection_available #

fn (s &TCPServer) is_connection_available() bool

Returns true if a connection is available for taking.

fn (TCPServer) is_listening #

fn (s &TCPServer) is_listening() bool

Returns true if the server is currently listening for connections.

fn (TCPServer) get_local_port #

fn (s &TCPServer) get_local_port() i64

Returns the local port this server is listening to.

fn (TCPServer) take_connection #

fn (s &TCPServer) take_connection() StreamPeerTCP

If a connection is available, returns a StreamPeerTCP with the connection.

fn (TCPServer) stop #

fn (s &TCPServer) stop()

Stops listening.

struct TCPServer_listen_Cfg #

@[params]
struct TCPServer_listen_Cfg {
pub:
	bind_address string
}

Optional parameters for TCPServer#listen

struct TLSOptions #

struct TLSOptions {
	RefCounted
}

TLS configuration for clients and servers.

fn (TLSOptions) to_variant #

fn (s &TLSOptions) to_variant() Variant

fn (TLSOptions) from_variant #

fn (mut s TLSOptions) from_variant(variant &Variant)

fn (TLSOptions) is_server #

fn (s &TLSOptions) is_server() bool

Returns true if created with [method TLSOptions.server], false otherwise.

fn (TLSOptions) is_unsafe_client #

fn (s &TLSOptions) is_unsafe_client() bool

Returns true if created with [method TLSOptions.client_unsafe], false otherwise.

fn (TLSOptions) get_common_name_override #

fn (s &TLSOptions) get_common_name_override() string

Returns the common name (domain name) override specified when creating with [method TLSOptions.client].

fn (TLSOptions) get_trusted_ca_chain #

fn (s &TLSOptions) get_trusted_ca_chain() X509Certificate

Returns the CA [X509Certificate] chain specified when creating with [method TLSOptions.client] or [method TLSOptions.client_unsafe].

fn (TLSOptions) get_private_key #

fn (s &TLSOptions) get_private_key() CryptoKey

Returns the [CryptoKey] specified when creating with [method TLSOptions.server].

fn (TLSOptions) get_own_certificate #

fn (s &TLSOptions) get_own_certificate() X509Certificate

Returns the [X509Certificate] specified when creating with [method TLSOptions.server].

struct TLSOptions_client_Cfg #

@[params]
struct TLSOptions_client_Cfg {
pub:
	trusted_chain        X509Certificate
	common_name_override string
}

Optional parameters for TLSOptions#client

struct TLSOptions_client_unsafe_Cfg #

@[params]
struct TLSOptions_client_unsafe_Cfg {
pub:
	trusted_chain X509Certificate
}

Optional parameters for TLSOptions#client_unsafe

struct TabBar #

struct TabBar {
	Control
}

A control that provides a horizontal bar with tabs.

fn (TabBar) to_variant #

fn (s &TabBar) to_variant() Variant

fn (TabBar) from_variant #

fn (mut s TabBar) from_variant(variant &Variant)

fn (TabBar) set_tab_count #

fn (s &TabBar) set_tab_count(count i64)

fn (TabBar) get_tab_count #

fn (s &TabBar) get_tab_count() i64

fn (TabBar) set_current_tab #

fn (s &TabBar) set_current_tab(tab_idx i64)

fn (TabBar) get_current_tab #

fn (s &TabBar) get_current_tab() i64

fn (TabBar) get_previous_tab #

fn (s &TabBar) get_previous_tab() i64

Returns the previously active tab index.

fn (TabBar) select_previous_available #

fn (s &TabBar) select_previous_available() bool

Selects the first available tab with lower index than the currently selected. Returns true if tab selection changed.

fn (TabBar) select_next_available #

fn (s &TabBar) select_next_available() bool

Selects the first available tab with greater index than the currently selected. Returns true if tab selection changed.

fn (TabBar) set_tab_title #

fn (s &TabBar) set_tab_title(tab_idx i64, title string)

Sets a [param title] for the tab at index [param tab_idx].

fn (TabBar) get_tab_title #

fn (s &TabBar) get_tab_title(tab_idx i64) string

Returns the title of the tab at index [param tab_idx].

fn (TabBar) set_tab_tooltip #

fn (s &TabBar) set_tab_tooltip(tab_idx i64, tooltip string)

Sets a [param tooltip] for tab at index [param tab_idx]. [b]Note:[/b] By default, if the [param tooltip] is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign " " as the [param tooltip] text.

fn (TabBar) get_tab_tooltip #

fn (s &TabBar) get_tab_tooltip(tab_idx i64) string

Returns the tooltip text of the tab at index [param tab_idx].

fn (TabBar) set_tab_text_direction #

fn (s &TabBar) set_tab_text_direction(tab_idx i64, direction ControlTextDirection)

Sets tab title base writing direction.

fn (TabBar) get_tab_text_direction #

fn (s &TabBar) get_tab_text_direction(tab_idx i64) ControlTextDirection

Returns tab title text base writing direction.

fn (TabBar) set_tab_language #

fn (s &TabBar) set_tab_language(tab_idx i64, language string)

Sets language code of tab title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.

fn (TabBar) get_tab_language #

fn (s &TabBar) get_tab_language(tab_idx i64) string

Returns tab title language code.

fn (TabBar) set_tab_icon #

fn (s &TabBar) set_tab_icon(tab_idx i64, icon Texture2D)

Sets an [param icon] for the tab at index [param tab_idx].

fn (TabBar) get_tab_icon #

fn (s &TabBar) get_tab_icon(tab_idx i64) Texture2D

Returns the icon for the tab at index [param tab_idx] or null if the tab has no icon.

fn (TabBar) set_tab_icon_max_width #

fn (s &TabBar) set_tab_icon_max_width(tab_idx i64, width i64)

Sets the maximum allowed width of the icon for the tab at index [param tab_idx]. This limit is applied on top of the default size of the icon and on top of [theme_item icon_max_width]. The height is adjusted according to the icon's ratio.

fn (TabBar) get_tab_icon_max_width #

fn (s &TabBar) get_tab_icon_max_width(tab_idx i64) i64

Returns the maximum allowed width of the icon for the tab at index [param tab_idx].

fn (TabBar) set_tab_button_icon #

fn (s &TabBar) set_tab_button_icon(tab_idx i64, icon Texture2D)

Sets an [param icon] for the button of the tab at index [param tab_idx] (located to the right, before the close button), making it visible and clickable (See [signal tab_button_pressed]). Giving it a null value will hide the button.

fn (TabBar) get_tab_button_icon #

fn (s &TabBar) get_tab_button_icon(tab_idx i64) Texture2D

Returns the icon for the right button of the tab at index [param tab_idx] or null if the right button has no icon.

fn (TabBar) set_tab_disabled #

fn (s &TabBar) set_tab_disabled(tab_idx i64, disabled bool)

If [param disabled] is true, disables the tab at index [param tab_idx], making it non-interactable.

fn (TabBar) is_tab_disabled #

fn (s &TabBar) is_tab_disabled(tab_idx i64) bool

Returns true if the tab at index [param tab_idx] is disabled.

fn (TabBar) set_tab_hidden #

fn (s &TabBar) set_tab_hidden(tab_idx i64, hidden bool)

If [param hidden] is true, hides the tab at index [param tab_idx], making it disappear from the tab area.

fn (TabBar) is_tab_hidden #

fn (s &TabBar) is_tab_hidden(tab_idx i64) bool

Returns true if the tab at index [param tab_idx] is hidden.

fn (TabBar) set_tab_metadata #

fn (s &TabBar) set_tab_metadata(tab_idx i64, metadata_ ToVariant)

Sets the metadata value for the tab at index [param tab_idx], which can be retrieved later using [method get_tab_metadata].

fn (TabBar) get_tab_metadata #

fn (s &TabBar) get_tab_metadata(tab_idx i64) Variant

Returns the metadata value set to the tab at index [param tab_idx] using [method set_tab_metadata]. If no metadata was previously set, returns null by default.

fn (TabBar) remove_tab #

fn (s &TabBar) remove_tab(tab_idx i64)

Removes the tab at index [param tab_idx].

fn (TabBar) add_tab #

fn (s &TabBar) add_tab(cfg TabBar_add_tab_Cfg)

Adds a new tab.

fn (TabBar) get_tab_idx_at_point #

fn (s &TabBar) get_tab_idx_at_point(point Vector2) i64

Returns the index of the tab at local coordinates [param point]. Returns -1 if the point is outside the control boundaries or if there's no tab at the queried position.

fn (TabBar) set_tab_alignment #

fn (s &TabBar) set_tab_alignment(alignment TabBarAlignmentMode)

fn (TabBar) get_tab_alignment #

fn (s &TabBar) get_tab_alignment() TabBarAlignmentMode

fn (TabBar) set_clip_tabs #

fn (s &TabBar) set_clip_tabs(clip_tabs bool)

fn (TabBar) get_clip_tabs #

fn (s &TabBar) get_clip_tabs() bool

fn (TabBar) get_tab_offset #

fn (s &TabBar) get_tab_offset() i64

Returns the number of hidden tabs offsetted to the left.

fn (TabBar) get_offset_buttons_visible #

fn (s &TabBar) get_offset_buttons_visible() bool

Returns true if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible.

fn (TabBar) ensure_tab_visible #

fn (s &TabBar) ensure_tab_visible(idx i64)

Moves the scroll view to make the tab visible.

fn (TabBar) get_tab_rect #

fn (s &TabBar) get_tab_rect(tab_idx i64) Rect2

Returns tab [Rect2] with local position and size.

fn (TabBar) move_tab #

fn (s &TabBar) move_tab(from i64, to i64)

Moves a tab from [param from] to [param to].

fn (TabBar) set_close_with_middle_mouse #

fn (s &TabBar) set_close_with_middle_mouse(enabled bool)

fn (TabBar) get_close_with_middle_mouse #

fn (s &TabBar) get_close_with_middle_mouse() bool

fn (TabBar) set_tab_close_display_policy #

fn (s &TabBar) set_tab_close_display_policy(policy TabBarCloseButtonDisplayPolicy)

fn (TabBar) get_tab_close_display_policy #

fn (s &TabBar) get_tab_close_display_policy() TabBarCloseButtonDisplayPolicy

fn (TabBar) set_max_tab_width #

fn (s &TabBar) set_max_tab_width(width i64)

fn (TabBar) get_max_tab_width #

fn (s &TabBar) get_max_tab_width() i64

fn (TabBar) set_scrolling_enabled #

fn (s &TabBar) set_scrolling_enabled(enabled bool)

fn (TabBar) get_scrolling_enabled #

fn (s &TabBar) get_scrolling_enabled() bool

fn (TabBar) set_drag_to_rearrange_enabled #

fn (s &TabBar) set_drag_to_rearrange_enabled(enabled bool)

fn (TabBar) get_drag_to_rearrange_enabled #

fn (s &TabBar) get_drag_to_rearrange_enabled() bool

fn (TabBar) set_tabs_rearrange_group #

fn (s &TabBar) set_tabs_rearrange_group(group_id i64)

fn (TabBar) get_tabs_rearrange_group #

fn (s &TabBar) get_tabs_rearrange_group() i64

fn (TabBar) set_scroll_to_selected #

fn (s &TabBar) set_scroll_to_selected(enabled bool)

fn (TabBar) get_scroll_to_selected #

fn (s &TabBar) get_scroll_to_selected() bool

fn (TabBar) set_select_with_rmb #

fn (s &TabBar) set_select_with_rmb(enabled bool)

fn (TabBar) get_select_with_rmb #

fn (s &TabBar) get_select_with_rmb() bool

fn (TabBar) set_deselect_enabled #

fn (s &TabBar) set_deselect_enabled(enabled bool)

fn (TabBar) get_deselect_enabled #

fn (s &TabBar) get_deselect_enabled() bool

fn (TabBar) clear_tabs #

fn (s &TabBar) clear_tabs()

Clears all tabs.

struct TabBar_add_tab_Cfg #

@[params]
struct TabBar_add_tab_Cfg {
pub:
	title string
	icon  Texture2D
}

Optional parameters for TabBar#add_tab

struct TabContainer #

struct TabContainer {
	Container
}

A container that creates a tab for each child control, displaying only the active tab's control.

fn (TabContainer) to_variant #

fn (s &TabContainer) to_variant() Variant

fn (TabContainer) from_variant #

fn (mut s TabContainer) from_variant(variant &Variant)

fn (TabContainer) get_tab_count #

fn (s &TabContainer) get_tab_count() i64

Returns the number of tabs.

fn (TabContainer) set_current_tab #

fn (s &TabContainer) set_current_tab(tab_idx i64)

fn (TabContainer) get_current_tab #

fn (s &TabContainer) get_current_tab() i64

fn (TabContainer) get_previous_tab #

fn (s &TabContainer) get_previous_tab() i64

Returns the previously active tab index.

fn (TabContainer) select_previous_available #

fn (s &TabContainer) select_previous_available() bool

Selects the first available tab with lower index than the currently selected. Returns true if tab selection changed.

fn (TabContainer) select_next_available #

fn (s &TabContainer) select_next_available() bool

Selects the first available tab with greater index than the currently selected. Returns true if tab selection changed.

fn (TabContainer) get_current_tab_control #

fn (s &TabContainer) get_current_tab_control() Control

Returns the child [Control] node located at the active tab index.

fn (TabContainer) get_tab_bar #

fn (s &TabContainer) get_tab_bar() TabBar

Returns the [TabBar] contained in this container. [b]Warning:[/b] This is a required internal node, removing and freeing it or editing its tabs may cause a crash. If you wish to edit the tabs, use the methods provided in [TabContainer].

fn (TabContainer) get_tab_control #

fn (s &TabContainer) get_tab_control(tab_idx i64) Control

Returns the [Control] node from the tab at index [param tab_idx].

fn (TabContainer) set_tab_alignment #

fn (s &TabContainer) set_tab_alignment(alignment TabBarAlignmentMode)

fn (TabContainer) get_tab_alignment #

fn (s &TabContainer) get_tab_alignment() TabBarAlignmentMode

fn (TabContainer) set_tabs_position #

fn (s &TabContainer) set_tabs_position(tabs_position TabContainerTabPosition)

fn (TabContainer) get_tabs_position #

fn (s &TabContainer) get_tabs_position() TabContainerTabPosition

fn (TabContainer) set_clip_tabs #

fn (s &TabContainer) set_clip_tabs(clip_tabs bool)

fn (TabContainer) get_clip_tabs #

fn (s &TabContainer) get_clip_tabs() bool

fn (TabContainer) set_tabs_visible #

fn (s &TabContainer) set_tabs_visible(visible bool)

fn (TabContainer) are_tabs_visible #

fn (s &TabContainer) are_tabs_visible() bool

fn (TabContainer) set_all_tabs_in_front #

fn (s &TabContainer) set_all_tabs_in_front(is_front bool)

fn (TabContainer) is_all_tabs_in_front #

fn (s &TabContainer) is_all_tabs_in_front() bool

fn (TabContainer) set_tab_title #

fn (s &TabContainer) set_tab_title(tab_idx i64, title string)

Sets a custom title for the tab at index [param tab_idx] (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again.

fn (TabContainer) get_tab_title #

fn (s &TabContainer) get_tab_title(tab_idx i64) string

Returns the title of the tab at index [param tab_idx]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].

fn (TabContainer) set_tab_tooltip #

fn (s &TabContainer) set_tab_tooltip(tab_idx i64, tooltip string)

Sets a custom tooltip text for tab at index [param tab_idx]. [b]Note:[/b] By default, if the [param tooltip] is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign " " as the [param tooltip] text.

fn (TabContainer) get_tab_tooltip #

fn (s &TabContainer) get_tab_tooltip(tab_idx i64) string

Returns the tooltip text of the tab at index [param tab_idx].

fn (TabContainer) set_tab_icon #

fn (s &TabContainer) set_tab_icon(tab_idx i64, icon Texture2D)

Sets an icon for the tab at index [param tab_idx].

fn (TabContainer) get_tab_icon #

fn (s &TabContainer) get_tab_icon(tab_idx i64) Texture2D

Returns the [Texture2D] for the tab at index [param tab_idx] or null if the tab has no [Texture2D].

fn (TabContainer) set_tab_icon_max_width #

fn (s &TabContainer) set_tab_icon_max_width(tab_idx i64, width i64)

Sets the maximum allowed width of the icon for the tab at index [param tab_idx]. This limit is applied on top of the default size of the icon and on top of [theme_item icon_max_width]. The height is adjusted according to the icon's ratio.

fn (TabContainer) get_tab_icon_max_width #

fn (s &TabContainer) get_tab_icon_max_width(tab_idx i64) i64

Returns the maximum allowed width of the icon for the tab at index [param tab_idx].

fn (TabContainer) set_tab_disabled #

fn (s &TabContainer) set_tab_disabled(tab_idx i64, disabled bool)

If [param disabled] is true, disables the tab at index [param tab_idx], making it non-interactable.

fn (TabContainer) is_tab_disabled #

fn (s &TabContainer) is_tab_disabled(tab_idx i64) bool

Returns true if the tab at index [param tab_idx] is disabled.

fn (TabContainer) set_tab_hidden #

fn (s &TabContainer) set_tab_hidden(tab_idx i64, hidden bool)

If [param hidden] is true, hides the tab at index [param tab_idx], making it disappear from the tab area.

fn (TabContainer) is_tab_hidden #

fn (s &TabContainer) is_tab_hidden(tab_idx i64) bool

Returns true if the tab at index [param tab_idx] is hidden.

fn (TabContainer) set_tab_metadata #

fn (s &TabContainer) set_tab_metadata(tab_idx i64, metadata_ ToVariant)

Sets the metadata value for the tab at index [param tab_idx], which can be retrieved later using [method get_tab_metadata].

fn (TabContainer) get_tab_metadata #

fn (s &TabContainer) get_tab_metadata(tab_idx i64) Variant

Returns the metadata value set to the tab at index [param tab_idx] using [method set_tab_metadata]. If no metadata was previously set, returns null by default.

fn (TabContainer) set_tab_button_icon #

fn (s &TabContainer) set_tab_button_icon(tab_idx i64, icon Texture2D)

Sets the button icon from the tab at index [param tab_idx].

fn (TabContainer) get_tab_button_icon #

fn (s &TabContainer) get_tab_button_icon(tab_idx i64) Texture2D

Returns the button icon from the tab at index [param tab_idx].

fn (TabContainer) get_tab_idx_at_point #

fn (s &TabContainer) get_tab_idx_at_point(point Vector2) i64

Returns the index of the tab at local coordinates [param point]. Returns -1 if the point is outside the control boundaries or if there's no tab at the queried position.

fn (TabContainer) get_tab_idx_from_control #

fn (s &TabContainer) get_tab_idx_from_control(control Control) i64

Returns the index of the tab tied to the given [param control]. The control must be a child of the [TabContainer].

fn (TabContainer) set_popup #

fn (s &TabContainer) set_popup(popup Node)

If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [TabContainer] (setting it to null will make it go away). Clicking it will expand the [Popup] node.

fn (TabContainer) get_popup #

fn (s &TabContainer) get_popup() Popup

Returns the [Popup] node instance if one has been set already with [method set_popup]. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.

fn (TabContainer) set_drag_to_rearrange_enabled #

fn (s &TabContainer) set_drag_to_rearrange_enabled(enabled bool)

fn (TabContainer) get_drag_to_rearrange_enabled #

fn (s &TabContainer) get_drag_to_rearrange_enabled() bool

fn (TabContainer) set_tabs_rearrange_group #

fn (s &TabContainer) set_tabs_rearrange_group(group_id i64)

fn (TabContainer) get_tabs_rearrange_group #

fn (s &TabContainer) get_tabs_rearrange_group() i64

fn (TabContainer) set_use_hidden_tabs_for_min_size #

fn (s &TabContainer) set_use_hidden_tabs_for_min_size(enabled bool)

fn (TabContainer) get_use_hidden_tabs_for_min_size #

fn (s &TabContainer) get_use_hidden_tabs_for_min_size() bool

fn (TabContainer) set_tab_focus_mode #

fn (s &TabContainer) set_tab_focus_mode(focus_mode ControlFocusMode)

fn (TabContainer) get_tab_focus_mode #

fn (s &TabContainer) get_tab_focus_mode() ControlFocusMode

fn (TabContainer) set_deselect_enabled #

fn (s &TabContainer) set_deselect_enabled(enabled bool)

fn (TabContainer) get_deselect_enabled #

fn (s &TabContainer) get_deselect_enabled() bool

struct TextEdit #

struct TextEdit {
	Control
}

A multiline text editor.

fn (TextEdit) to_variant #

fn (s &TextEdit) to_variant() Variant

fn (TextEdit) from_variant #

fn (mut s TextEdit) from_variant(variant &Variant)

fn (TextEdit) gd_handle_unicode_input #

fn (s &TextEdit) gd_handle_unicode_input(unicode_char i64, caret_index i64)

Override this method to define what happens when the user types in the provided key [param unicode_char].

fn (TextEdit) gd_backspace #

fn (s &TextEdit) gd_backspace(caret_index i64)

Override this method to define what happens when the user presses the backspace key.

fn (TextEdit) gd_cut #

fn (s &TextEdit) gd_cut(caret_index i64)

Override this method to define what happens when the user performs a cut operation.

fn (TextEdit) gd_copy #

fn (s &TextEdit) gd_copy(caret_index i64)

Override this method to define what happens when the user performs a copy operation.

fn (TextEdit) gd_paste #

fn (s &TextEdit) gd_paste(caret_index i64)

Override this method to define what happens when the user performs a paste operation.

fn (TextEdit) gd_paste_primary_clipboard #

fn (s &TextEdit) gd_paste_primary_clipboard(caret_index i64)

Override this method to define what happens when the user performs a paste operation with middle mouse button. [b]Note:[/b] This method is only implemented on Linux.

fn (TextEdit) has_ime_text #

fn (s &TextEdit) has_ime_text() bool

Returns true if the user has text in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME).

fn (TextEdit) cancel_ime #

fn (s &TextEdit) cancel_ime()

Closes the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME) if it is open. Any text in the IME will be lost.

fn (TextEdit) apply_ime #

fn (s &TextEdit) apply_ime()

Applies text from the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME) to each caret and closes the IME if it is open.

fn (TextEdit) set_editable #

fn (s &TextEdit) set_editable(enabled bool)

fn (TextEdit) is_editable #

fn (s &TextEdit) is_editable() bool

fn (TextEdit) set_text_direction #

fn (s &TextEdit) set_text_direction(direction ControlTextDirection)

fn (TextEdit) get_text_direction #

fn (s &TextEdit) get_text_direction() ControlTextDirection

fn (TextEdit) set_language #

fn (s &TextEdit) set_language(language string)

fn (TextEdit) get_language #

fn (s &TextEdit) get_language() string

fn (TextEdit) set_structured_text_bidi_override #

fn (s &TextEdit) set_structured_text_bidi_override(parser TextServerStructuredTextParser)

fn (TextEdit) get_structured_text_bidi_override #

fn (s &TextEdit) get_structured_text_bidi_override() TextServerStructuredTextParser

fn (TextEdit) set_structured_text_bidi_override_options #

fn (s &TextEdit) set_structured_text_bidi_override_options(gd_args Array)

fn (TextEdit) get_structured_text_bidi_override_options #

fn (s &TextEdit) get_structured_text_bidi_override_options() Array

fn (TextEdit) set_tab_size #

fn (s &TextEdit) set_tab_size(size i64)

Sets the tab size for the [TextEdit] to use.

fn (TextEdit) get_tab_size #

fn (s &TextEdit) get_tab_size() i64

Returns the [TextEdit]'s' tab size.

fn (TextEdit) set_indent_wrapped_lines #

fn (s &TextEdit) set_indent_wrapped_lines(enabled bool)

fn (TextEdit) is_indent_wrapped_lines #

fn (s &TextEdit) is_indent_wrapped_lines() bool

fn (TextEdit) set_tab_input_mode #

fn (s &TextEdit) set_tab_input_mode(enabled bool)

fn (TextEdit) get_tab_input_mode #

fn (s &TextEdit) get_tab_input_mode() bool

fn (TextEdit) set_overtype_mode_enabled #

fn (s &TextEdit) set_overtype_mode_enabled(enabled bool)

If true, enables overtype mode. In this mode, typing overrides existing text instead of inserting text. The [member ProjectSettings.input/ui_text_toggle_insert_mode] action toggles overtype mode. See [method is_overtype_mode_enabled].

fn (TextEdit) is_overtype_mode_enabled #

fn (s &TextEdit) is_overtype_mode_enabled() bool

Returns true if overtype mode is enabled. See [method set_overtype_mode_enabled].

fn (TextEdit) set_context_menu_enabled #

fn (s &TextEdit) set_context_menu_enabled(enabled bool)

fn (TextEdit) is_context_menu_enabled #

fn (s &TextEdit) is_context_menu_enabled() bool

fn (TextEdit) set_emoji_menu_enabled #

fn (s &TextEdit) set_emoji_menu_enabled(enable bool)

fn (TextEdit) is_emoji_menu_enabled #

fn (s &TextEdit) is_emoji_menu_enabled() bool

fn (TextEdit) set_backspace_deletes_composite_character_enabled #

fn (s &TextEdit) set_backspace_deletes_composite_character_enabled(enable bool)

fn (TextEdit) is_backspace_deletes_composite_character_enabled #

fn (s &TextEdit) is_backspace_deletes_composite_character_enabled() bool

fn (TextEdit) set_shortcut_keys_enabled #

fn (s &TextEdit) set_shortcut_keys_enabled(enabled bool)

fn (TextEdit) is_shortcut_keys_enabled #

fn (s &TextEdit) is_shortcut_keys_enabled() bool

fn (TextEdit) set_virtual_keyboard_enabled #

fn (s &TextEdit) set_virtual_keyboard_enabled(enabled bool)

fn (TextEdit) is_virtual_keyboard_enabled #

fn (s &TextEdit) is_virtual_keyboard_enabled() bool

fn (TextEdit) set_virtual_keyboard_show_on_focus #

fn (s &TextEdit) set_virtual_keyboard_show_on_focus(show_on_focus bool)

fn (TextEdit) get_virtual_keyboard_show_on_focus #

fn (s &TextEdit) get_virtual_keyboard_show_on_focus() bool

fn (TextEdit) set_middle_mouse_paste_enabled #

fn (s &TextEdit) set_middle_mouse_paste_enabled(enabled bool)

fn (TextEdit) is_middle_mouse_paste_enabled #

fn (s &TextEdit) is_middle_mouse_paste_enabled() bool

fn (TextEdit) set_empty_selection_clipboard_enabled #

fn (s &TextEdit) set_empty_selection_clipboard_enabled(enabled bool)

fn (TextEdit) is_empty_selection_clipboard_enabled #

fn (s &TextEdit) is_empty_selection_clipboard_enabled() bool

fn (TextEdit) clear #

fn (s &TextEdit) clear()

Performs a full reset of [TextEdit], including undo history.

fn (TextEdit) set_text #

fn (s &TextEdit) set_text(text string)

fn (TextEdit) get_text #

fn (s &TextEdit) get_text() string

fn (TextEdit) get_line_count #

fn (s &TextEdit) get_line_count() i64

Returns the number of lines in the text.

fn (TextEdit) set_placeholder #

fn (s &TextEdit) set_placeholder(text string)

fn (TextEdit) get_placeholder #

fn (s &TextEdit) get_placeholder() string

fn (TextEdit) set_line #

fn (s &TextEdit) set_line(line i64, new_text string)

Sets the text for a specific [param line]. Carets on the line will attempt to keep their visual x position.

fn (TextEdit) get_line #

fn (s &TextEdit) get_line(line i64) string

Returns the text of a specific line.

fn (TextEdit) get_line_with_ime #

fn (s &TextEdit) get_line_with_ime(line i64) string

Returns line text as it is currently displayed, including IME composition string.

fn (TextEdit) get_line_width #

fn (s &TextEdit) get_line_width(line i64, cfg TextEdit_get_line_width_Cfg) i64

Returns the width in pixels of the [param wrap_index] on [param line].

fn (TextEdit) get_line_height #

fn (s &TextEdit) get_line_height() i64

Returns the maximum value of the line height among all lines. [b]Note:[/b] The return value is influenced by [theme_item line_spacing] and [theme_item font_size]. And it will not be less than 1.

fn (TextEdit) get_indent_level #

fn (s &TextEdit) get_indent_level(line i64) i64

Returns the indent level of the given line. This is the number of spaces and tabs at the beginning of the line, with the tabs taking the tab size into account (see [method get_tab_size]).

fn (TextEdit) get_first_non_whitespace_column #

fn (s &TextEdit) get_first_non_whitespace_column(line i64) i64

Returns the first column containing a non-whitespace character on the given line. If there is only whitespace, returns the number of characters.

fn (TextEdit) swap_lines #

fn (s &TextEdit) swap_lines(from_line i64, to_line i64)

Swaps the two lines. Carets will be swapped with the lines.

fn (TextEdit) insert_line_at #

fn (s &TextEdit) insert_line_at(line i64, text string)

Inserts a new line with [param text] at [param line].

fn (TextEdit) remove_line_at #

fn (s &TextEdit) remove_line_at(line i64, cfg TextEdit_remove_line_at_Cfg)

Removes the line of text at [param line]. Carets on this line will attempt to match their previous visual x position. If [param move_carets_down] is true carets will move to the next line down, otherwise carets will move up.

fn (TextEdit) insert_text_at_caret #

fn (s &TextEdit) insert_text_at_caret(text string, cfg TextEdit_insert_text_at_caret_Cfg)

Insert the specified text at the caret position.

fn (TextEdit) insert_text #

fn (s &TextEdit) insert_text(text string, line i64, column i64, cfg TextEdit_insert_text_Cfg)

Inserts the [param text] at [param line] and [param column]. If [param before_selection_begin] is true, carets and selections that begin at [param line] and [param column] will moved to the end of the inserted text, along with all carets after it. If [param before_selection_end] is true, selections that end at [param line] and [param column] will be extended to the end of the inserted text. These parameters can be used to insert text inside of or outside of selections.

fn (TextEdit) remove_text #

fn (s &TextEdit) remove_text(from_line i64, from_column i64, to_line i64, to_column i64)

Removes text between the given positions.

fn (TextEdit) get_last_unhidden_line #

fn (s &TextEdit) get_last_unhidden_line() i64

Returns the last unhidden line in the entire [TextEdit].

fn (TextEdit) get_next_visible_line_offset_from #

fn (s &TextEdit) get_next_visible_line_offset_from(line i64, visible_amount i64) i64

Returns the count to the next visible line from [param line] to line + visible_amount. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with line = 1, visible_amount = 1 would return 3.

fn (TextEdit) get_next_visible_line_index_offset_from #

fn (s &TextEdit) get_next_visible_line_index_offset_from(line i64, wrap_index i64, visible_amount i64) Vector2i

Similar to [method get_next_visible_line_offset_from], but takes into account the line wrap indexes. In the returned vector, x is the line, y is the wrap index.

fn (TextEdit) backspace #

fn (s &TextEdit) backspace(cfg TextEdit_backspace_Cfg)

Called when the user presses the backspace key. Can be overridden with [method _backspace].

fn (TextEdit) cut #

fn (s &TextEdit) cut(cfg TextEdit_cut_Cfg)

Cut's the current selection. Can be overridden with [method _cut].

fn (TextEdit) copy #

fn (s &TextEdit) copy(cfg TextEdit_copy_Cfg)

Copies the current text selection. Can be overridden with [method _copy].

fn (TextEdit) paste #

fn (s &TextEdit) paste(cfg TextEdit_paste_Cfg)

Paste at the current location. Can be overridden with [method _paste].

fn (TextEdit) paste_primary_clipboard #

fn (s &TextEdit) paste_primary_clipboard(cfg TextEdit_paste_primary_clipboard_Cfg)

Pastes the primary clipboard.

fn (TextEdit) start_action #

fn (s &TextEdit) start_action(action TextEditEditAction)

Starts an action, will end the current action if [param action] is different. An action will also end after a call to [method end_action], after [member ProjectSettings.gui/timers/text_edit_idle_detect_sec] is triggered or a new undoable step outside the [method start_action] and [method end_action] calls.

fn (TextEdit) end_action #

fn (s &TextEdit) end_action()

Marks the end of steps in the current action started with [method start_action].

fn (TextEdit) begin_complex_operation #

fn (s &TextEdit) begin_complex_operation()

Starts a multipart edit. All edits will be treated as one action until [method end_complex_operation] is called.

fn (TextEdit) end_complex_operation #

fn (s &TextEdit) end_complex_operation()

Ends a multipart edit, started with [method begin_complex_operation]. If called outside a complex operation, the current operation is pushed onto the undo/redo stack.

fn (TextEdit) has_undo #

fn (s &TextEdit) has_undo() bool

Returns true if an "undo" action is available.

fn (TextEdit) has_redo #

fn (s &TextEdit) has_redo() bool

Returns true if a "redo" action is available.

fn (TextEdit) undo #

fn (s &TextEdit) undo()

Perform undo operation.

fn (TextEdit) redo #

fn (s &TextEdit) redo()

Perform redo operation.

fn (TextEdit) clear_undo_history #

fn (s &TextEdit) clear_undo_history()

Clears the undo history.

fn (TextEdit) tag_saved_version #

fn (s &TextEdit) tag_saved_version()

Tag the current version as saved.

fn (TextEdit) get_version #

fn (s &TextEdit) get_version() i64

Returns the current version of the [TextEdit]. The version is a count of recorded operations by the undo/redo history.

fn (TextEdit) get_saved_version #

fn (s &TextEdit) get_saved_version() i64

Returns the last tagged saved version from [method tag_saved_version].

fn (TextEdit) set_search_text #

fn (s &TextEdit) set_search_text(search_text string)

Sets the search text. See [method set_search_flags].

fn (TextEdit) set_search_flags #

fn (s &TextEdit) set_search_flags(flags i64)

Sets the search [param flags]. This is used with [method set_search_text] to highlight occurrences of the searched text. Search flags can be specified from the [enum SearchFlags] enum.

fn (TextEdit) search #

fn (s &TextEdit) search(text string, flags i64, from_line i64, from_column i64) Vector2i

Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum. In the returned vector, x is the column, y is the line. If no results are found, both are equal to -1. [codeblocks] [gdscript] var result = search("print", SEARCH_WHOLE_WORDS, 0, 0) if result.x != -1:# Result found.var line_number = result.y var column_number = result.x [/gdscript] [csharp] Vector2I result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0); if (result.X != -1) { // Result found. int lineNumber = result.Y; int columnNumber = result.X; } [/csharp] [/codeblocks]

fn (TextEdit) set_tooltip_request_func #

fn (s &TextEdit) set_tooltip_request_func(callback Callable)

Provide custom tooltip text. The callback method must take the following args: hovered_word: String.

fn (TextEdit) get_local_mouse_pos #

fn (s &TextEdit) get_local_mouse_pos() Vector2

Returns the local mouse position adjusted for the text direction.

fn (TextEdit) get_word_at_pos #

fn (s &TextEdit) get_word_at_pos(position Vector2) string

Returns the word at [param position].

fn (TextEdit) get_line_column_at_pos #

fn (s &TextEdit) get_line_column_at_pos(position Vector2i, cfg TextEdit_get_line_column_at_pos_Cfg) Vector2i

Returns the line and column at the given position. In the returned vector, x is the column and y is the line. If [param clamp_line] is false and [param position] is below the last line, Vector2i(-1, -1) is returned. If [param clamp_column] is false and [param position] is outside the column range of the line, Vector2i(-1, -1) is returned.

fn (TextEdit) get_pos_at_line_column #

fn (s &TextEdit) get_pos_at_line_column(line i64, column i64) Vector2i

Returns the local position for the given [param line] and [param column]. If x or y of the returned vector equal -1, the position is outside of the viewable area of the control. [b]Note:[/b] The Y position corresponds to the bottom side of the line. Use [method get_rect_at_line_column] to get the top side position.

fn (TextEdit) get_rect_at_line_column #

fn (s &TextEdit) get_rect_at_line_column(line i64, column i64) Rect2i

Returns the local position and size for the grapheme at the given [param line] and [param column]. If x or y position of the returned rect equal -1, the position is outside of the viewable area of the control. [b]Note:[/b] The Y position of the returned rect corresponds to the top side of the line, unlike [method get_pos_at_line_column] which returns the bottom side.

fn (TextEdit) get_minimap_line_at_pos #

fn (s &TextEdit) get_minimap_line_at_pos(position Vector2i) i64

Returns the equivalent minimap line at [param position].

fn (TextEdit) is_dragging_cursor #

fn (s &TextEdit) is_dragging_cursor() bool

Returns true if the user is dragging their mouse for scrolling, selecting, or text dragging.

fn (TextEdit) is_mouse_over_selection #

fn (s &TextEdit) is_mouse_over_selection(edges bool, cfg TextEdit_is_mouse_over_selection_Cfg) bool

Returns true if the mouse is over a selection. If [param edges] is true, the edges are considered part of the selection.

fn (TextEdit) set_caret_type #

fn (s &TextEdit) set_caret_type(gd_type TextEditCaretType)

fn (TextEdit) get_caret_type #

fn (s &TextEdit) get_caret_type() TextEditCaretType

fn (TextEdit) set_draw_caret_when_editable_disabled #

fn (s &TextEdit) set_draw_caret_when_editable_disabled(enable bool)

fn (TextEdit) is_drawing_caret_when_editable_disabled #

fn (s &TextEdit) is_drawing_caret_when_editable_disabled() bool

fn (TextEdit) set_move_caret_on_right_click_enabled #

fn (s &TextEdit) set_move_caret_on_right_click_enabled(enable bool)

fn (TextEdit) is_move_caret_on_right_click_enabled #

fn (s &TextEdit) is_move_caret_on_right_click_enabled() bool

fn (TextEdit) set_caret_mid_grapheme_enabled #

fn (s &TextEdit) set_caret_mid_grapheme_enabled(enabled bool)

fn (TextEdit) is_caret_mid_grapheme_enabled #

fn (s &TextEdit) is_caret_mid_grapheme_enabled() bool

fn (TextEdit) set_multiple_carets_enabled #

fn (s &TextEdit) set_multiple_carets_enabled(enabled bool)

fn (TextEdit) is_multiple_carets_enabled #

fn (s &TextEdit) is_multiple_carets_enabled() bool

fn (TextEdit) add_caret #

fn (s &TextEdit) add_caret(line i64, column i64) i64

Adds a new caret at the given location. Returns the index of the new caret, or -1 if the location is invalid.

fn (TextEdit) remove_caret #

fn (s &TextEdit) remove_caret(caret i64)

Removes the given caret index. [b]Note:[/b] This can result in adjustment of all other caret indices.

fn (TextEdit) remove_secondary_carets #

fn (s &TextEdit) remove_secondary_carets()

Removes all additional carets.

fn (TextEdit) get_caret_count #

fn (s &TextEdit) get_caret_count() i64

Returns the number of carets in this [TextEdit].

fn (TextEdit) add_caret_at_carets #

fn (s &TextEdit) add_caret_at_carets(below bool)

Adds an additional caret above or below every caret. If [param below] is true the new caret will be added below and above otherwise.

fn (TextEdit) get_sorted_carets #

fn (s &TextEdit) get_sorted_carets(cfg TextEdit_get_sorted_carets_Cfg) PackedInt32Array

Returns the carets sorted by selection beginning from lowest line and column to highest (from top to bottom of text). If [param include_ignored_carets] is false, carets from [method multicaret_edit_ignore_caret] will be ignored.

fn (TextEdit) collapse_carets #

fn (s &TextEdit) collapse_carets(from_line i64, from_column i64, to_line i64, to_column i64, cfg TextEdit_collapse_carets_Cfg)

Collapse all carets in the given range to the [param from_line] and [param from_column] position. [param inclusive] applies to both ends. If [method is_in_mulitcaret_edit] is true, carets that are collapsed will be true for [method multicaret_edit_ignore_caret]. [method merge_overlapping_carets] will be called if any carets were collapsed.

fn (TextEdit) merge_overlapping_carets #

fn (s &TextEdit) merge_overlapping_carets()

Merges any overlapping carets. Will favor the newest caret, or the caret with a selection. If [method is_in_mulitcaret_edit] is true, the merge will be queued to happen at the end of the multicaret edit. See [method begin_multicaret_edit] and [method end_multicaret_edit]. [b]Note:[/b] This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap.

fn (TextEdit) begin_multicaret_edit #

fn (s &TextEdit) begin_multicaret_edit()

Starts an edit for multiple carets. The edit must be ended with [method end_multicaret_edit]. Multicaret edits can be used to edit text at multiple carets and delay merging the carets until the end, so the caret indexes aren't affected immediately. [method begin_multicaret_edit] and [method end_multicaret_edit] can be nested, and the merge will happen at the last [method end_multicaret_edit].

begin_complex_operation()
begin_multicaret_edit()
for i in range(get_caret_count()):
if multicaret_edit_ignore_caret(i):
continue
##end_multicaret_edit()
end_complex_operation()

fn (TextEdit) end_multicaret_edit #

fn (s &TextEdit) end_multicaret_edit()

Ends an edit for multiple carets, that was started with [method begin_multicaret_edit]. If this was the last [method end_multicaret_edit] and [method merge_overlapping_carets] was called, carets will be merged.

fn (TextEdit) is_in_mulitcaret_edit #

fn (s &TextEdit) is_in_mulitcaret_edit() bool

Returns true if a [method begin_multicaret_edit] has been called and [method end_multicaret_edit] has not yet been called.

fn (TextEdit) multicaret_edit_ignore_caret #

fn (s &TextEdit) multicaret_edit_ignore_caret(caret_index i64) bool

Returns true if the given [param caret_index] should be ignored as part of a multicaret edit. See [method begin_multicaret_edit] and [method end_multicaret_edit]. Carets that should be ignored are ones that were part of removed text and will likely be merged at the end of the edit, or carets that were added during the edit. It is recommended to continue within a loop iterating on multiple carets if a caret should be ignored.

fn (TextEdit) is_caret_visible #

fn (s &TextEdit) is_caret_visible(cfg TextEdit_is_caret_visible_Cfg) bool

Returns true if the caret is visible, false otherwise. A caret will be considered hidden if it is outside the scrollable area when scrolling is enabled. [b]Note:[/b] [method is_caret_visible] does not account for a caret being off-screen if it is still within the scrollable area. It will return true even if the caret is off-screen as long as it meets [TextEdit]'s own conditions for being visible. This includes uses of [member scroll_fit_content_width] and [member scroll_fit_content_height] that cause the [TextEdit] to expand beyond the viewport's bounds.

fn (TextEdit) get_caret_draw_pos #

fn (s &TextEdit) get_caret_draw_pos(cfg TextEdit_get_caret_draw_pos_Cfg) Vector2

Returns the caret pixel draw position.

fn (TextEdit) set_caret_line #

fn (s &TextEdit) set_caret_line(line i64, cfg TextEdit_set_caret_line_Cfg)

Moves the caret to the specified [param line] index. The caret column will be moved to the same visual position it was at the last time [method set_caret_column] was called, or clamped to the end of the line. If [param adjust_viewport] is true, the viewport will center at the caret position after the move occurs. If [param can_be_hidden] is true, the specified [param line] can be hidden. If [param wrap_index] is -1, the caret column will be clamped to the [param line]'s length. If [param wrap_index] is greater than -1, the column will be moved to attempt to match the visual x position on the line's [param wrap_index] to the position from the last time [method set_caret_column] was called. [b]Note:[/b] If supporting multiple carets this will not check for any overlap. See [method merge_overlapping_carets].

fn (TextEdit) get_caret_line #

fn (s &TextEdit) get_caret_line(cfg TextEdit_get_caret_line_Cfg) i64

Returns the line the editing caret is on.

fn (TextEdit) set_caret_column #

fn (s &TextEdit) set_caret_column(column i64, cfg TextEdit_set_caret_column_Cfg)

Moves the caret to the specified [param column] index. If [param adjust_viewport] is true, the viewport will center at the caret position after the move occurs. [b]Note:[/b] If supporting multiple carets this will not check for any overlap. See [method merge_overlapping_carets].

fn (TextEdit) get_caret_column #

fn (s &TextEdit) get_caret_column(cfg TextEdit_get_caret_column_Cfg) i64

Returns the column the editing caret is at.

fn (TextEdit) get_next_composite_character_column #

fn (s &TextEdit) get_next_composite_character_column(line i64, column i64) i64

Returns the correct column at the end of a composite character like ❤️‍🩹 (mending heart; Unicode: U+2764 U+FE0F U+200D U+1FA79) which is comprised of more than one Unicode code point, if the caret is at the start of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters. [b]Note:[/b] To check at caret location use get_next_composite_character_column(get_caret_line(), get_caret_column())

fn (TextEdit) get_previous_composite_character_column #

fn (s &TextEdit) get_previous_composite_character_column(line i64, column i64) i64

Returns the correct column at the start of a composite character like ❤️‍🩹 (mending heart; Unicode: U+2764 U+FE0F U+200D U+1FA79) which is comprised of more than one Unicode code point, if the caret is at the end of the composite character. Also returns the correct column with the caret at mid grapheme and for non-composite characters. [b]Note:[/b] To check at caret location use get_previous_composite_character_column(get_caret_line(), get_caret_column())

fn (TextEdit) get_caret_wrap_index #

fn (s &TextEdit) get_caret_wrap_index(cfg TextEdit_get_caret_wrap_index_Cfg) i64

Returns the wrap index the editing caret is on.

fn (TextEdit) get_word_under_caret #

fn (s &TextEdit) get_word_under_caret(cfg TextEdit_get_word_under_caret_Cfg) string

Returns a [String] text with the word under the caret's location.

fn (TextEdit) set_use_default_word_separators #

fn (s &TextEdit) set_use_default_word_separators(enabled bool)

fn (TextEdit) is_default_word_separators_enabled #

fn (s &TextEdit) is_default_word_separators_enabled() bool

fn (TextEdit) set_use_custom_word_separators #

fn (s &TextEdit) set_use_custom_word_separators(enabled bool)

fn (TextEdit) is_custom_word_separators_enabled #

fn (s &TextEdit) is_custom_word_separators_enabled() bool

fn (TextEdit) set_custom_word_separators #

fn (s &TextEdit) set_custom_word_separators(custom_word_separators string)

fn (TextEdit) get_custom_word_separators #

fn (s &TextEdit) get_custom_word_separators() string

fn (TextEdit) set_selecting_enabled #

fn (s &TextEdit) set_selecting_enabled(enable bool)

fn (TextEdit) is_selecting_enabled #

fn (s &TextEdit) is_selecting_enabled() bool

fn (TextEdit) set_deselect_on_focus_loss_enabled #

fn (s &TextEdit) set_deselect_on_focus_loss_enabled(enable bool)

fn (TextEdit) is_deselect_on_focus_loss_enabled #

fn (s &TextEdit) is_deselect_on_focus_loss_enabled() bool

fn (TextEdit) set_drag_and_drop_selection_enabled #

fn (s &TextEdit) set_drag_and_drop_selection_enabled(enable bool)

fn (TextEdit) is_drag_and_drop_selection_enabled #

fn (s &TextEdit) is_drag_and_drop_selection_enabled() bool

fn (TextEdit) set_selection_mode #

fn (s &TextEdit) set_selection_mode(mode TextEditSelectionMode)

Sets the current selection mode.

fn (TextEdit) get_selection_mode #

fn (s &TextEdit) get_selection_mode() TextEditSelectionMode

Returns the current selection mode.

fn (TextEdit) select_all #

fn (s &TextEdit) select_all()

Select all the text. If [member selecting_enabled] is false, no selection will occur.

fn (TextEdit) select_word_under_caret #

fn (s &TextEdit) select_word_under_caret(cfg TextEdit_select_word_under_caret_Cfg)

Selects the word under the caret.

fn (TextEdit) add_selection_for_next_occurrence #

fn (s &TextEdit) add_selection_for_next_occurrence()

Adds a selection and a caret for the next occurrence of the current selection. If there is no active selection, selects word under caret.

fn (TextEdit) skip_selection_for_next_occurrence #

fn (s &TextEdit) skip_selection_for_next_occurrence()

Moves a selection and a caret for the next occurrence of the current selection. If there is no active selection, moves to the next occurrence of the word under caret.

fn (TextEdit) gd_select #

fn (s &TextEdit) gd_select(origin_line i64, origin_column i64, caret_line i64, caret_column i64, cfg TextEdit_gd_select_Cfg)

Selects text from [param origin_line] and [param origin_column] to [param caret_line] and [param caret_column] for the given [param caret_index]. This moves the selection origin and the caret. If the positions are the same, the selection will be deselected. If [member selecting_enabled] is false, no selection will occur. [b]Note:[/b] If supporting multiple carets this will not check for any overlap. See [method merge_overlapping_carets].

fn (TextEdit) has_selection #

fn (s &TextEdit) has_selection(cfg TextEdit_has_selection_Cfg) bool

Returns true if the user has selected text.

fn (TextEdit) get_selected_text #

fn (s &TextEdit) get_selected_text(cfg TextEdit_get_selected_text_Cfg) string

Returns the text inside the selection of a caret, or all the carets if [param caret_index] is its default value -1.

fn (TextEdit) get_selection_at_line_column #

fn (s &TextEdit) get_selection_at_line_column(line i64, column i64, cfg TextEdit_get_selection_at_line_column_Cfg) i64

Returns the caret index of the selection at the given [param line] and [param column], or -1 if there is none. If [param include_edges] is false, the position must be inside the selection and not at either end. If [param only_selections] is false, carets without a selection will also be considered.

fn (TextEdit) get_line_ranges_from_carets #

fn (s &TextEdit) get_line_ranges_from_carets(cfg TextEdit_get_line_ranges_from_carets_Cfg) Array

Returns an [Array] of line ranges where x is the first line and y is the last line. All lines within these ranges will have a caret on them or be part of a selection. Each line will only be part of one line range, even if it has multiple carets on it. If a selection's end column ([method get_selection_to_column]) is at column 0, that line will not be included. If a selection begins on the line after another selection ends and [param merge_adjacent] is true, or they begin and end on the same line, one line range will include both selections.

fn (TextEdit) get_selection_origin_line #

fn (s &TextEdit) get_selection_origin_line(cfg TextEdit_get_selection_origin_line_Cfg) i64

Returns the origin line of the selection. This is the opposite end from the caret.

fn (TextEdit) get_selection_origin_column #

fn (s &TextEdit) get_selection_origin_column(cfg TextEdit_get_selection_origin_column_Cfg) i64

Returns the origin column of the selection. This is the opposite end from the caret.

fn (TextEdit) set_selection_origin_line #

fn (s &TextEdit) set_selection_origin_line(line i64, cfg TextEdit_set_selection_origin_line_Cfg)

Sets the selection origin line to the [param line] for the given [param caret_index]. If the selection origin is moved to the caret position, the selection will deselect. If [param can_be_hidden] is false, The line will be set to the nearest unhidden line below or above. If [param wrap_index] is -1, the selection origin column will be clamped to the [param line]'s length. If [param wrap_index] is greater than -1, the column will be moved to attempt to match the visual x position on the line's [param wrap_index] to the position from the last time [method set_selection_origin_column] or [method select] was called.

fn (TextEdit) set_selection_origin_column #

fn (s &TextEdit) set_selection_origin_column(column i64, cfg TextEdit_set_selection_origin_column_Cfg)

Sets the selection origin column to the [param column] for the given [param caret_index]. If the selection origin is moved to the caret position, the selection will deselect.

fn (TextEdit) get_selection_from_line #

fn (s &TextEdit) get_selection_from_line(cfg TextEdit_get_selection_from_line_Cfg) i64

Returns the selection begin line. Returns the caret line if there is no selection.

fn (TextEdit) get_selection_from_column #

fn (s &TextEdit) get_selection_from_column(cfg TextEdit_get_selection_from_column_Cfg) i64

Returns the selection begin column. Returns the caret column if there is no selection.

fn (TextEdit) get_selection_to_line #

fn (s &TextEdit) get_selection_to_line(cfg TextEdit_get_selection_to_line_Cfg) i64

Returns the selection end line. Returns the caret line if there is no selection.

fn (TextEdit) get_selection_to_column #

fn (s &TextEdit) get_selection_to_column(cfg TextEdit_get_selection_to_column_Cfg) i64

Returns the selection end column. Returns the caret column if there is no selection.

fn (TextEdit) is_caret_after_selection_origin #

fn (s &TextEdit) is_caret_after_selection_origin(cfg TextEdit_is_caret_after_selection_origin_Cfg) bool

Returns true if the caret of the selection is after the selection origin. This can be used to determine the direction of the selection.

fn (TextEdit) deselect #

fn (s &TextEdit) deselect(cfg TextEdit_deselect_Cfg)

Deselects the current selection.

fn (TextEdit) delete_selection #

fn (s &TextEdit) delete_selection(cfg TextEdit_delete_selection_Cfg)

Deletes the selected text.

fn (TextEdit) set_line_wrapping_mode #

fn (s &TextEdit) set_line_wrapping_mode(mode TextEditLineWrappingMode)

fn (TextEdit) get_line_wrapping_mode #

fn (s &TextEdit) get_line_wrapping_mode() TextEditLineWrappingMode

fn (TextEdit) set_autowrap_mode #

fn (s &TextEdit) set_autowrap_mode(autowrap_mode TextServerAutowrapMode)

fn (TextEdit) get_autowrap_mode #

fn (s &TextEdit) get_autowrap_mode() TextServerAutowrapMode

fn (TextEdit) is_line_wrapped #

fn (s &TextEdit) is_line_wrapped(line i64) bool

Returns if the given line is wrapped.

fn (TextEdit) get_line_wrap_count #

fn (s &TextEdit) get_line_wrap_count(line i64) i64

Returns the number of times the given line is wrapped.

fn (TextEdit) get_line_wrap_index_at_column #

fn (s &TextEdit) get_line_wrap_index_at_column(line i64, column i64) i64

Returns the wrap index of the given column on the given line. This ranges from 0 to [method get_line_wrap_count].

fn (TextEdit) get_line_wrapped_text #

fn (s &TextEdit) get_line_wrapped_text(line i64) PackedStringArray

Returns an array of [String]s representing each wrapped index.

fn (TextEdit) set_smooth_scroll_enabled #

fn (s &TextEdit) set_smooth_scroll_enabled(enable bool)

fn (TextEdit) is_smooth_scroll_enabled #

fn (s &TextEdit) is_smooth_scroll_enabled() bool

fn (TextEdit) get_v_scroll_bar #

fn (s &TextEdit) get_v_scroll_bar() VScrollBar

Returns the [VScrollBar] of the [TextEdit].

fn (TextEdit) get_h_scroll_bar #

fn (s &TextEdit) get_h_scroll_bar() HScrollBar

Returns the [HScrollBar] used by [TextEdit].

fn (TextEdit) set_v_scroll #

fn (s &TextEdit) set_v_scroll(value f64)

fn (TextEdit) get_v_scroll #

fn (s &TextEdit) get_v_scroll() f64

fn (TextEdit) set_h_scroll #

fn (s &TextEdit) set_h_scroll(value i64)

fn (TextEdit) get_h_scroll #

fn (s &TextEdit) get_h_scroll() i64

fn (TextEdit) set_scroll_past_end_of_file_enabled #

fn (s &TextEdit) set_scroll_past_end_of_file_enabled(enable bool)

fn (TextEdit) is_scroll_past_end_of_file_enabled #

fn (s &TextEdit) is_scroll_past_end_of_file_enabled() bool

fn (TextEdit) set_v_scroll_speed #

fn (s &TextEdit) set_v_scroll_speed(speed f64)

fn (TextEdit) get_v_scroll_speed #

fn (s &TextEdit) get_v_scroll_speed() f64

fn (TextEdit) set_fit_content_height_enabled #

fn (s &TextEdit) set_fit_content_height_enabled(enabled bool)

fn (TextEdit) is_fit_content_height_enabled #

fn (s &TextEdit) is_fit_content_height_enabled() bool

fn (TextEdit) set_fit_content_width_enabled #

fn (s &TextEdit) set_fit_content_width_enabled(enabled bool)

fn (TextEdit) is_fit_content_width_enabled #

fn (s &TextEdit) is_fit_content_width_enabled() bool

fn (TextEdit) get_scroll_pos_for_line #

fn (s &TextEdit) get_scroll_pos_for_line(line i64, cfg TextEdit_get_scroll_pos_for_line_Cfg) f64

Returns the scroll position for [param wrap_index] of [param line].

fn (TextEdit) set_line_as_first_visible #

fn (s &TextEdit) set_line_as_first_visible(line i64, cfg TextEdit_set_line_as_first_visible_Cfg)

Positions the [param wrap_index] of [param line] at the top of the viewport.

fn (TextEdit) get_first_visible_line #

fn (s &TextEdit) get_first_visible_line() i64

Returns the first visible line.

fn (TextEdit) set_line_as_center_visible #

fn (s &TextEdit) set_line_as_center_visible(line i64, cfg TextEdit_set_line_as_center_visible_Cfg)

Positions the [param wrap_index] of [param line] at the center of the viewport.

fn (TextEdit) set_line_as_last_visible #

fn (s &TextEdit) set_line_as_last_visible(line i64, cfg TextEdit_set_line_as_last_visible_Cfg)

Positions the [param wrap_index] of [param line] at the bottom of the viewport.

fn (TextEdit) get_last_full_visible_line #

fn (s &TextEdit) get_last_full_visible_line() i64

Returns the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index.

fn (TextEdit) get_last_full_visible_line_wrap_index #

fn (s &TextEdit) get_last_full_visible_line_wrap_index() i64

Returns the last visible wrap index of the last visible line.

fn (TextEdit) get_visible_line_count #

fn (s &TextEdit) get_visible_line_count() i64

Returns the number of lines that can visually fit, rounded down, based on this control's height.

fn (TextEdit) get_visible_line_count_in_range #

fn (s &TextEdit) get_visible_line_count_in_range(from_line i64, to_line i64) i64

Returns the total number of lines between [param from_line] and [param to_line] (inclusive) in the text. This includes wrapped lines and excludes folded lines. If the range covers all lines it is equivalent to [method get_total_visible_line_count].

fn (TextEdit) get_total_visible_line_count #

fn (s &TextEdit) get_total_visible_line_count() i64

Returns the total number of lines in the text. This includes wrapped lines and excludes folded lines. If [member wrap_mode] is set to [constant LINE_WRAPPING_NONE] and no lines are folded (see [method CodeEdit.is_line_folded]) then this is equivalent to [method get_line_count]. See [method get_visible_line_count_in_range] for a limited range of lines.

fn (TextEdit) adjust_viewport_to_caret #

fn (s &TextEdit) adjust_viewport_to_caret(cfg TextEdit_adjust_viewport_to_caret_Cfg)

Adjust the viewport so the caret is visible.

fn (TextEdit) center_viewport_to_caret #

fn (s &TextEdit) center_viewport_to_caret(cfg TextEdit_center_viewport_to_caret_Cfg)

Centers the viewport on the line the editing caret is at. This also resets the [member scroll_horizontal] value to 0.

fn (TextEdit) set_draw_minimap #

fn (s &TextEdit) set_draw_minimap(enabled bool)

fn (TextEdit) is_drawing_minimap #

fn (s &TextEdit) is_drawing_minimap() bool

fn (TextEdit) set_minimap_width #

fn (s &TextEdit) set_minimap_width(width i64)

fn (TextEdit) get_minimap_width #

fn (s &TextEdit) get_minimap_width() i64

fn (TextEdit) get_minimap_visible_lines #

fn (s &TextEdit) get_minimap_visible_lines() i64

Returns the number of lines that may be drawn on the minimap.

fn (TextEdit) add_gutter #

fn (s &TextEdit) add_gutter(cfg TextEdit_add_gutter_Cfg)

Register a new gutter to this [TextEdit]. Use [param at] to have a specific gutter order. A value of -1 appends the gutter to the right.

fn (TextEdit) remove_gutter #

fn (s &TextEdit) remove_gutter(gutter i64)

Removes the gutter at the given index.

fn (TextEdit) get_gutter_count #

fn (s &TextEdit) get_gutter_count() i64

Returns the number of gutters registered.

fn (TextEdit) set_gutter_name #

fn (s &TextEdit) set_gutter_name(gutter i64, name string)

Sets the name of the gutter at the given index.

fn (TextEdit) get_gutter_name #

fn (s &TextEdit) get_gutter_name(gutter i64) string

Returns the name of the gutter at the given index.

fn (TextEdit) set_gutter_type #

fn (s &TextEdit) set_gutter_type(gutter i64, gd_type TextEditGutterType)

Sets the type of gutter at the given index. Gutters can contain icons, text, or custom visuals.

fn (TextEdit) get_gutter_type #

fn (s &TextEdit) get_gutter_type(gutter i64) TextEditGutterType

Returns the type of the gutter at the given index. Gutters can contain icons, text, or custom visuals.

fn (TextEdit) set_gutter_width #

fn (s &TextEdit) set_gutter_width(gutter i64, width i64)

Set the width of the gutter at the given index.

fn (TextEdit) get_gutter_width #

fn (s &TextEdit) get_gutter_width(gutter i64) i64

Returns the width of the gutter at the given index.

fn (TextEdit) set_gutter_draw #

fn (s &TextEdit) set_gutter_draw(gutter i64, draw bool)

If true, the gutter at the given index is drawn. The gutter type ([method set_gutter_type]) determines how it is drawn. See [method is_gutter_drawn].

fn (TextEdit) is_gutter_drawn #

fn (s &TextEdit) is_gutter_drawn(gutter i64) bool

Returns true if the gutter at the given index is currently drawn. See [method set_gutter_draw].

fn (TextEdit) set_gutter_clickable #

fn (s &TextEdit) set_gutter_clickable(gutter i64, clickable bool)

If true, the mouse cursor will change to a pointing hand ([constant Control.CURSOR_POINTING_HAND]) when hovering over the gutter at the given index. See [method is_gutter_clickable] and [method set_line_gutter_clickable].

fn (TextEdit) is_gutter_clickable #

fn (s &TextEdit) is_gutter_clickable(gutter i64) bool

Returns true if the gutter at the given index is clickable. See [method set_gutter_clickable].

fn (TextEdit) set_gutter_overwritable #

fn (s &TextEdit) set_gutter_overwritable(gutter i64, overwritable bool)

If true, the line data of the gutter at the given index can be overridden when using [method merge_gutters]. See [method is_gutter_overwritable].

fn (TextEdit) is_gutter_overwritable #

fn (s &TextEdit) is_gutter_overwritable(gutter i64) bool

Returns true if the gutter at the given index is overwritable. See [method set_gutter_overwritable].

fn (TextEdit) merge_gutters #

fn (s &TextEdit) merge_gutters(from_line i64, to_line i64)

Merge the gutters from [param from_line] into [param to_line]. Only overwritable gutters will be copied. See [method set_gutter_overwritable].

fn (TextEdit) set_gutter_custom_draw #

fn (s &TextEdit) set_gutter_custom_draw(column i64, draw_callback Callable)

Set a custom draw callback for the gutter at the given index. [param draw_callback] must take the following arguments: A line index [int], a gutter index [int], and an area [Rect2]. This callback only works when the gutter type is [constant GUTTER_TYPE_CUSTOM] (see [method set_gutter_type]).

fn (TextEdit) get_total_gutter_width #

fn (s &TextEdit) get_total_gutter_width() i64

Returns the total width of all gutters and internal padding.

fn (TextEdit) set_line_gutter_metadata #

fn (s &TextEdit) set_line_gutter_metadata(line i64, gutter i64, metadata_ ToVariant)

Sets the metadata for [param gutter] on [param line] to [param metadata].

fn (TextEdit) get_line_gutter_metadata #

fn (s &TextEdit) get_line_gutter_metadata(line i64, gutter i64) Variant

Returns the metadata currently in [param gutter] at [param line].

fn (TextEdit) set_line_gutter_text #

fn (s &TextEdit) set_line_gutter_text(line i64, gutter i64, text string)

Sets the text for [param gutter] on [param line] to [param text]. This only works when the gutter type is [constant GUTTER_TYPE_STRING] (see [method set_gutter_type]).

fn (TextEdit) get_line_gutter_text #

fn (s &TextEdit) get_line_gutter_text(line i64, gutter i64) string

Returns the text currently in [param gutter] at [param line]. This only works when the gutter type is [constant GUTTER_TYPE_STRING] (see [method set_gutter_type]).

fn (TextEdit) set_line_gutter_icon #

fn (s &TextEdit) set_line_gutter_icon(line i64, gutter i64, icon Texture2D)

Sets the icon for [param gutter] on [param line] to [param icon]. This only works when the gutter type is [constant GUTTER_TYPE_ICON] (see [method set_gutter_type]).

fn (TextEdit) get_line_gutter_icon #

fn (s &TextEdit) get_line_gutter_icon(line i64, gutter i64) Texture2D

Returns the icon currently in [param gutter] at [param line]. This only works when the gutter type is [constant GUTTER_TYPE_ICON] (see [method set_gutter_type]).

fn (TextEdit) set_line_gutter_item_color #

fn (s &TextEdit) set_line_gutter_item_color(line i64, gutter i64, color Color)

Sets the color for [param gutter] on [param line] to [param color].

fn (TextEdit) get_line_gutter_item_color #

fn (s &TextEdit) get_line_gutter_item_color(line i64, gutter i64) Color

Returns the color currently in [param gutter] at [param line].

fn (TextEdit) set_line_gutter_clickable #

fn (s &TextEdit) set_line_gutter_clickable(line i64, gutter i64, clickable bool)

If [param clickable] is true, makes the [param gutter] on the given [param line] clickable. This is like [method set_gutter_clickable], but for a single line. If [method is_gutter_clickable] is true, this will not have any effect. See [method is_line_gutter_clickable] and [signal gutter_clicked].

fn (TextEdit) is_line_gutter_clickable #

fn (s &TextEdit) is_line_gutter_clickable(line i64, gutter i64) bool

Returns true if the gutter at the given index on the given line is clickable. See [method set_line_gutter_clickable].

fn (TextEdit) set_line_background_color #

fn (s &TextEdit) set_line_background_color(line i64, color Color)

Sets the custom background color of the given line. If transparent, this color is applied on top of the default background color (See [theme_item background_color]). If set to Color(0, 0, 0, 0), no additional color is applied.

fn (TextEdit) get_line_background_color #

fn (s &TextEdit) get_line_background_color(line i64) Color

Returns the custom background color of the given line. If no color is set, returns Color(0, 0, 0, 0).

fn (TextEdit) set_syntax_highlighter #

fn (s &TextEdit) set_syntax_highlighter(syntax_highlighter SyntaxHighlighter)

fn (TextEdit) get_syntax_highlighter #

fn (s &TextEdit) get_syntax_highlighter() SyntaxHighlighter

fn (TextEdit) set_highlight_current_line #

fn (s &TextEdit) set_highlight_current_line(enabled bool)

fn (TextEdit) is_highlight_current_line_enabled #

fn (s &TextEdit) is_highlight_current_line_enabled() bool

fn (TextEdit) set_highlight_all_occurrences #

fn (s &TextEdit) set_highlight_all_occurrences(enabled bool)

fn (TextEdit) is_highlight_all_occurrences_enabled #

fn (s &TextEdit) is_highlight_all_occurrences_enabled() bool

fn (TextEdit) get_draw_control_chars #

fn (s &TextEdit) get_draw_control_chars() bool

fn (TextEdit) set_draw_control_chars #

fn (s &TextEdit) set_draw_control_chars(enabled bool)

fn (TextEdit) set_draw_tabs #

fn (s &TextEdit) set_draw_tabs(enabled bool)

fn (TextEdit) is_drawing_tabs #

fn (s &TextEdit) is_drawing_tabs() bool

fn (TextEdit) set_draw_spaces #

fn (s &TextEdit) set_draw_spaces(enabled bool)

fn (TextEdit) is_drawing_spaces #

fn (s &TextEdit) is_drawing_spaces() bool

fn (TextEdit) get_menu #

fn (s &TextEdit) get_menu() PopupMenu

Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit]. You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see [enum MenuItems]). For example: [codeblocks] [gdscript] func _ready(): var menu = get_menu()# Remove all items after "Redo".menu.item_count = menu.get_item_index(MENU_REDO) + 1# Add custom items.menu.add_separator() menu.add_item("Insert Date", MENU_MAX + 1)# Connect callback.menu.id_pressed.connect(_on_item_pressed)

func _on_item_pressed(id): if id == MENU_MAX + 1: insert_text_at_caret(Time.get_date_string_from_system()) [/gdscript] [csharp] public override void _Ready() { var menu = GetMenu(); // Remove all items after "Redo". menu.ItemCount = menu.GetItemIndex(TextEdit.MenuItems.Redo) + 1; // Add custom items. menu.AddSeparator(); menu.AddItem("Insert Date", TextEdit.MenuItems.Max + 1); // Add event handler. menu.IdPressed += OnItemPressed; }

public void OnItemPressed(int id) { if (id == TextEdit.MenuItems.Max + 1) { InsertTextAtCaret(Time.GetDateStringFromSystem()); } } [/csharp] [/codeblocks] [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.

fn (TextEdit) is_menu_visible #

fn (s &TextEdit) is_menu_visible() bool

Returns true if the menu is visible. Use this instead of get_menu().visible to improve performance (so the creation of the menu is avoided). See [method get_menu].

fn (TextEdit) menu_option #

fn (s &TextEdit) menu_option(option i64)

Executes a given action as defined in the [enum MenuItems] enum.

fn (TextEdit) adjust_carets_after_edit #

fn (s &TextEdit) adjust_carets_after_edit(caret i64, from_line i64, from_col i64, to_line i64, to_col i64)

This method does nothing.

fn (TextEdit) get_caret_index_edit_order #

fn (s &TextEdit) get_caret_index_edit_order() PackedInt32Array

Returns a list of caret indexes in their edit order, this done from bottom to top. Edit order refers to the way actions such as [method insert_text_at_caret] are applied.

fn (TextEdit) get_selection_line #

fn (s &TextEdit) get_selection_line(cfg TextEdit_get_selection_line_Cfg) i64

Returns the original start line of the selection.

fn (TextEdit) get_selection_column #

fn (s &TextEdit) get_selection_column(cfg TextEdit_get_selection_column_Cfg) i64

Returns the original start column of the selection.

struct TextEdit_add_gutter_Cfg #

@[params]
struct TextEdit_add_gutter_Cfg {
pub:
	at i64 = -1
}

Optional parameters for TextEdit#add_gutter

struct TextEdit_adjust_viewport_to_caret_Cfg #

@[params]
struct TextEdit_adjust_viewport_to_caret_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#adjust_viewport_to_caret

struct TextEdit_backspace_Cfg #

@[params]
struct TextEdit_backspace_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#backspace

struct TextEdit_center_viewport_to_caret_Cfg #

@[params]
struct TextEdit_center_viewport_to_caret_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#center_viewport_to_caret

struct TextEdit_collapse_carets_Cfg #

@[params]
struct TextEdit_collapse_carets_Cfg {
pub:
	inclusive bool
}

Optional parameters for TextEdit#collapse_carets

struct TextEdit_copy_Cfg #

@[params]
struct TextEdit_copy_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#copy

struct TextEdit_cut_Cfg #

@[params]
struct TextEdit_cut_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#cut

struct TextEdit_delete_selection_Cfg #

@[params]
struct TextEdit_delete_selection_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#delete_selection

struct TextEdit_deselect_Cfg #

@[params]
struct TextEdit_deselect_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#deselect

struct TextEdit_gd_select_Cfg #

@[params]
struct TextEdit_gd_select_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#gd_select

struct TextEdit_get_caret_column_Cfg #

@[params]
struct TextEdit_get_caret_column_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_caret_column

struct TextEdit_get_caret_draw_pos_Cfg #

@[params]
struct TextEdit_get_caret_draw_pos_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_caret_draw_pos

struct TextEdit_get_caret_line_Cfg #

@[params]
struct TextEdit_get_caret_line_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_caret_line

struct TextEdit_get_caret_wrap_index_Cfg #

@[params]
struct TextEdit_get_caret_wrap_index_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_caret_wrap_index

struct TextEdit_get_line_column_at_pos_Cfg #

@[params]
struct TextEdit_get_line_column_at_pos_Cfg {
pub:
	clamp_line   bool
	clamp_column bool
}

Optional parameters for TextEdit#get_line_column_at_pos

struct TextEdit_get_line_ranges_from_carets_Cfg #

@[params]
struct TextEdit_get_line_ranges_from_carets_Cfg {
pub:
	only_selections bool
	merge_adjacent  bool
}

Optional parameters for TextEdit#get_line_ranges_from_carets

struct TextEdit_get_line_width_Cfg #

@[params]
struct TextEdit_get_line_width_Cfg {
pub:
	wrap_index i64 = -1
}

Optional parameters for TextEdit#get_line_width

struct TextEdit_get_scroll_pos_for_line_Cfg #

@[params]
struct TextEdit_get_scroll_pos_for_line_Cfg {
pub:
	wrap_index i64
}

Optional parameters for TextEdit#get_scroll_pos_for_line

struct TextEdit_get_selected_text_Cfg #

@[params]
struct TextEdit_get_selected_text_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#get_selected_text

struct TextEdit_get_selection_at_line_column_Cfg #

@[params]
struct TextEdit_get_selection_at_line_column_Cfg {
pub:
	include_edges   bool
	only_selections bool
}

Optional parameters for TextEdit#get_selection_at_line_column

struct TextEdit_get_selection_column_Cfg #

@[params]
struct TextEdit_get_selection_column_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_selection_column

struct TextEdit_get_selection_from_column_Cfg #

@[params]
struct TextEdit_get_selection_from_column_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_selection_from_column

struct TextEdit_get_selection_from_line_Cfg #

@[params]
struct TextEdit_get_selection_from_line_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_selection_from_line

struct TextEdit_get_selection_line_Cfg #

@[params]
struct TextEdit_get_selection_line_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_selection_line

struct TextEdit_get_selection_origin_column_Cfg #

@[params]
struct TextEdit_get_selection_origin_column_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_selection_origin_column

struct TextEdit_get_selection_origin_line_Cfg #

@[params]
struct TextEdit_get_selection_origin_line_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_selection_origin_line

struct TextEdit_get_selection_to_column_Cfg #

@[params]
struct TextEdit_get_selection_to_column_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_selection_to_column

struct TextEdit_get_selection_to_line_Cfg #

@[params]
struct TextEdit_get_selection_to_line_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#get_selection_to_line

struct TextEdit_get_sorted_carets_Cfg #

@[params]
struct TextEdit_get_sorted_carets_Cfg {
pub:
	include_ignored_carets bool
}

Optional parameters for TextEdit#get_sorted_carets

struct TextEdit_get_word_under_caret_Cfg #

@[params]
struct TextEdit_get_word_under_caret_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#get_word_under_caret

struct TextEdit_has_selection_Cfg #

@[params]
struct TextEdit_has_selection_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#has_selection

struct TextEdit_insert_text_Cfg #

@[params]
struct TextEdit_insert_text_Cfg {
pub:
	before_selection_begin bool
	before_selection_end   bool
}

Optional parameters for TextEdit#insert_text

struct TextEdit_insert_text_at_caret_Cfg #

@[params]
struct TextEdit_insert_text_at_caret_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#insert_text_at_caret

struct TextEdit_is_caret_after_selection_origin_Cfg #

@[params]
struct TextEdit_is_caret_after_selection_origin_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#is_caret_after_selection_origin

struct TextEdit_is_caret_visible_Cfg #

@[params]
struct TextEdit_is_caret_visible_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#is_caret_visible

struct TextEdit_is_mouse_over_selection_Cfg #

@[params]
struct TextEdit_is_mouse_over_selection_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#is_mouse_over_selection

struct TextEdit_paste_Cfg #

@[params]
struct TextEdit_paste_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#paste

struct TextEdit_paste_primary_clipboard_Cfg #

@[params]
struct TextEdit_paste_primary_clipboard_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#paste_primary_clipboard

struct TextEdit_remove_line_at_Cfg #

@[params]
struct TextEdit_remove_line_at_Cfg {
pub:
	move_carets_down bool
}

Optional parameters for TextEdit#remove_line_at

struct TextEdit_select_word_under_caret_Cfg #

@[params]
struct TextEdit_select_word_under_caret_Cfg {
pub:
	caret_index i64 = -1
}

Optional parameters for TextEdit#select_word_under_caret

struct TextEdit_set_caret_column_Cfg #

@[params]
struct TextEdit_set_caret_column_Cfg {
pub:
	adjust_viewport bool
	caret_index     i64
}

Optional parameters for TextEdit#set_caret_column

struct TextEdit_set_caret_line_Cfg #

@[params]
struct TextEdit_set_caret_line_Cfg {
pub:
	adjust_viewport bool
	can_be_hidden   bool
	wrap_index      i64
	caret_index     i64
}

Optional parameters for TextEdit#set_caret_line

struct TextEdit_set_line_as_center_visible_Cfg #

@[params]
struct TextEdit_set_line_as_center_visible_Cfg {
pub:
	wrap_index i64
}

Optional parameters for TextEdit#set_line_as_center_visible

struct TextEdit_set_line_as_first_visible_Cfg #

@[params]
struct TextEdit_set_line_as_first_visible_Cfg {
pub:
	wrap_index i64
}

Optional parameters for TextEdit#set_line_as_first_visible

struct TextEdit_set_line_as_last_visible_Cfg #

@[params]
struct TextEdit_set_line_as_last_visible_Cfg {
pub:
	wrap_index i64
}

Optional parameters for TextEdit#set_line_as_last_visible

struct TextEdit_set_selection_origin_column_Cfg #

@[params]
struct TextEdit_set_selection_origin_column_Cfg {
pub:
	caret_index i64
}

Optional parameters for TextEdit#set_selection_origin_column

struct TextEdit_set_selection_origin_line_Cfg #

@[params]
struct TextEdit_set_selection_origin_line_Cfg {
pub:
	can_be_hidden bool
	wrap_index    i64 = -1
	caret_index   i64
}

Optional parameters for TextEdit#set_selection_origin_line

struct TextLine #

struct TextLine {
	RefCounted
}

Holds a line of text.

fn (TextLine) to_variant #

fn (s &TextLine) to_variant() Variant

fn (TextLine) from_variant #

fn (mut s TextLine) from_variant(variant &Variant)

fn (TextLine) clear #

fn (s &TextLine) clear()

Clears text line (removes text and inline objects).

fn (TextLine) set_direction #

fn (s &TextLine) set_direction(direction TextServerDirection)

fn (TextLine) get_direction #

fn (s &TextLine) get_direction() TextServerDirection

fn (TextLine) get_inferred_direction #

fn (s &TextLine) get_inferred_direction() TextServerDirection

Returns the text writing direction inferred by the BiDi algorithm.

fn (TextLine) set_orientation #

fn (s &TextLine) set_orientation(orientation TextServerOrientation)

fn (TextLine) get_orientation #

fn (s &TextLine) get_orientation() TextServerOrientation

fn (TextLine) set_preserve_invalid #

fn (s &TextLine) set_preserve_invalid(enabled bool)

fn (TextLine) get_preserve_invalid #

fn (s &TextLine) get_preserve_invalid() bool

fn (TextLine) set_preserve_control #

fn (s &TextLine) set_preserve_control(enabled bool)

fn (TextLine) get_preserve_control #

fn (s &TextLine) get_preserve_control() bool

fn (TextLine) set_bidi_override #

fn (s &TextLine) set_bidi_override(override Array)

Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.

fn (TextLine) add_string #

fn (s &TextLine) add_string(text string, font Font, font_size i64, cfg TextLine_add_string_Cfg) bool

Adds text span and font to draw it.

fn (TextLine) add_object #

fn (s &TextLine) add_object(key_ ToVariant, size Vector2, cfg TextLine_add_object_Cfg) bool

Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.

fn (TextLine) resize_object #

fn (s &TextLine) resize_object(key_ ToVariant, size Vector2, cfg TextLine_resize_object_Cfg) bool

Sets new size and alignment of embedded object.

fn (TextLine) set_width #

fn (s &TextLine) set_width(width f64)

fn (TextLine) get_width #

fn (s &TextLine) get_width() f64

fn (TextLine) set_horizontal_alignment #

fn (s &TextLine) set_horizontal_alignment(alignment HorizontalAlignment)

fn (TextLine) get_horizontal_alignment #

fn (s &TextLine) get_horizontal_alignment() HorizontalAlignment

fn (TextLine) tab_align #

fn (s &TextLine) tab_align(tab_stops PackedFloat32Array)

Aligns text to the given tab-stops.

fn (TextLine) set_flags #

fn (s &TextLine) set_flags(flags TextServerJustificationFlag)

fn (TextLine) get_flags #

fn (s &TextLine) get_flags() TextServerJustificationFlag

fn (TextLine) set_text_overrun_behavior #

fn (s &TextLine) set_text_overrun_behavior(overrun_behavior TextServerOverrunBehavior)

fn (TextLine) get_text_overrun_behavior #

fn (s &TextLine) get_text_overrun_behavior() TextServerOverrunBehavior

fn (TextLine) set_ellipsis_char #

fn (s &TextLine) set_ellipsis_char(gd_char string)

fn (TextLine) get_ellipsis_char #

fn (s &TextLine) get_ellipsis_char() string

fn (TextLine) get_objects #

fn (s &TextLine) get_objects() Array

Returns array of inline objects.

fn (TextLine) get_object_rect #

fn (s &TextLine) get_object_rect(key_ ToVariant) Rect2

Returns bounding rectangle of the inline object.

fn (TextLine) get_size #

fn (s &TextLine) get_size() Vector2

Returns size of the bounding box of the text.

fn (TextLine) get_rid #

fn (s &TextLine) get_rid() RID

Returns TextServer buffer RID.

fn (TextLine) get_line_ascent #

fn (s &TextLine) get_line_ascent() f64

Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).

fn (TextLine) get_line_descent #

fn (s &TextLine) get_line_descent() f64

Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).

fn (TextLine) get_line_width #

fn (s &TextLine) get_line_width() f64

Returns width (for horizontal layout) or height (for vertical) of the text.

fn (TextLine) get_line_underline_position #

fn (s &TextLine) get_line_underline_position() f64

Returns pixel offset of the underline below the baseline.

fn (TextLine) get_line_underline_thickness #

fn (s &TextLine) get_line_underline_thickness() f64

Returns thickness of the underline.

fn (TextLine) draw #

fn (s &TextLine) draw(canvas RID, pos Vector2, cfg TextLine_draw_Cfg)

Draw text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextLine) draw_outline #

fn (s &TextLine) draw_outline(canvas RID, pos Vector2, cfg TextLine_draw_outline_Cfg)

Draw text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextLine) hit_test #

fn (s &TextLine) hit_test(coords f64) i64

Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.

struct TextLine_add_object_Cfg #

@[params]
struct TextLine_add_object_Cfg {
pub:
	inline_align InlineAlignment = unsafe { InlineAlignment(5) }
	length       i64             = 1
	baseline     f64             = 0.0
}

Optional parameters for TextLine#add_object

struct TextLine_add_string_Cfg #

@[params]
struct TextLine_add_string_Cfg {
pub:
	language string
	meta     ToVariant
}

Optional parameters for TextLine#add_string

struct TextLine_draw_Cfg #

@[params]
struct TextLine_draw_Cfg {
pub:
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextLine#draw

struct TextLine_draw_outline_Cfg #

@[params]
struct TextLine_draw_outline_Cfg {
pub:
	outline_size i64   = 1
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextLine#draw_outline

struct TextLine_resize_object_Cfg #

@[params]
struct TextLine_resize_object_Cfg {
pub:
	inline_align InlineAlignment = unsafe { InlineAlignment(5) }
	baseline     f64             = 0.0
}

Optional parameters for TextLine#resize_object

struct TextMesh #

struct TextMesh {
	PrimitiveMesh
}

Generate an [PrimitiveMesh] from the text.

fn (TextMesh) to_variant #

fn (s &TextMesh) to_variant() Variant

fn (TextMesh) from_variant #

fn (mut s TextMesh) from_variant(variant &Variant)

fn (TextMesh) set_horizontal_alignment #

fn (s &TextMesh) set_horizontal_alignment(alignment HorizontalAlignment)

fn (TextMesh) get_horizontal_alignment #

fn (s &TextMesh) get_horizontal_alignment() HorizontalAlignment

fn (TextMesh) set_vertical_alignment #

fn (s &TextMesh) set_vertical_alignment(alignment VerticalAlignment)

fn (TextMesh) get_vertical_alignment #

fn (s &TextMesh) get_vertical_alignment() VerticalAlignment

fn (TextMesh) set_text #

fn (s &TextMesh) set_text(text string)

fn (TextMesh) get_text #

fn (s &TextMesh) get_text() string

fn (TextMesh) set_font #

fn (s &TextMesh) set_font(font Font)

fn (TextMesh) get_font #

fn (s &TextMesh) get_font() Font

fn (TextMesh) set_font_size #

fn (s &TextMesh) set_font_size(font_size i64)

fn (TextMesh) get_font_size #

fn (s &TextMesh) get_font_size() i64

fn (TextMesh) set_line_spacing #

fn (s &TextMesh) set_line_spacing(line_spacing f64)

fn (TextMesh) get_line_spacing #

fn (s &TextMesh) get_line_spacing() f64

fn (TextMesh) set_autowrap_mode #

fn (s &TextMesh) set_autowrap_mode(autowrap_mode TextServerAutowrapMode)

fn (TextMesh) get_autowrap_mode #

fn (s &TextMesh) get_autowrap_mode() TextServerAutowrapMode

fn (TextMesh) set_justification_flags #

fn (s &TextMesh) set_justification_flags(justification_flags TextServerJustificationFlag)

fn (TextMesh) get_justification_flags #

fn (s &TextMesh) get_justification_flags() TextServerJustificationFlag

fn (TextMesh) set_depth #

fn (s &TextMesh) set_depth(depth f64)

fn (TextMesh) get_depth #

fn (s &TextMesh) get_depth() f64

fn (TextMesh) set_width #

fn (s &TextMesh) set_width(width f64)

fn (TextMesh) get_width #

fn (s &TextMesh) get_width() f64

fn (TextMesh) set_pixel_size #

fn (s &TextMesh) set_pixel_size(pixel_size f64)

fn (TextMesh) get_pixel_size #

fn (s &TextMesh) get_pixel_size() f64

fn (TextMesh) set_offset #

fn (s &TextMesh) set_offset(offset Vector2)

fn (TextMesh) get_offset #

fn (s &TextMesh) get_offset() Vector2

fn (TextMesh) set_curve_step #

fn (s &TextMesh) set_curve_step(curve_step f64)

fn (TextMesh) get_curve_step #

fn (s &TextMesh) get_curve_step() f64

fn (TextMesh) set_text_direction #

fn (s &TextMesh) set_text_direction(direction TextServerDirection)

fn (TextMesh) get_text_direction #

fn (s &TextMesh) get_text_direction() TextServerDirection

fn (TextMesh) set_language #

fn (s &TextMesh) set_language(language string)

fn (TextMesh) get_language #

fn (s &TextMesh) get_language() string

fn (TextMesh) set_structured_text_bidi_override #

fn (s &TextMesh) set_structured_text_bidi_override(parser TextServerStructuredTextParser)

fn (TextMesh) get_structured_text_bidi_override #

fn (s &TextMesh) get_structured_text_bidi_override() TextServerStructuredTextParser

fn (TextMesh) set_structured_text_bidi_override_options #

fn (s &TextMesh) set_structured_text_bidi_override_options(gd_args Array)

fn (TextMesh) get_structured_text_bidi_override_options #

fn (s &TextMesh) get_structured_text_bidi_override_options() Array

fn (TextMesh) set_uppercase #

fn (s &TextMesh) set_uppercase(enable bool)

fn (TextMesh) is_uppercase #

fn (s &TextMesh) is_uppercase() bool

struct TextParagraph #

struct TextParagraph {
	RefCounted
}

Holds a paragraph of text.

fn (TextParagraph) to_variant #

fn (s &TextParagraph) to_variant() Variant

fn (TextParagraph) from_variant #

fn (mut s TextParagraph) from_variant(variant &Variant)

fn (TextParagraph) clear #

fn (s &TextParagraph) clear()

Clears text paragraph (removes text and inline objects).

fn (TextParagraph) set_direction #

fn (s &TextParagraph) set_direction(direction TextServerDirection)

fn (TextParagraph) get_direction #

fn (s &TextParagraph) get_direction() TextServerDirection

fn (TextParagraph) get_inferred_direction #

fn (s &TextParagraph) get_inferred_direction() TextServerDirection

Returns the text writing direction inferred by the BiDi algorithm.

fn (TextParagraph) set_custom_punctuation #

fn (s &TextParagraph) set_custom_punctuation(custom_punctuation string)

fn (TextParagraph) get_custom_punctuation #

fn (s &TextParagraph) get_custom_punctuation() string

fn (TextParagraph) set_orientation #

fn (s &TextParagraph) set_orientation(orientation TextServerOrientation)

fn (TextParagraph) get_orientation #

fn (s &TextParagraph) get_orientation() TextServerOrientation

fn (TextParagraph) set_preserve_invalid #

fn (s &TextParagraph) set_preserve_invalid(enabled bool)

fn (TextParagraph) get_preserve_invalid #

fn (s &TextParagraph) get_preserve_invalid() bool

fn (TextParagraph) set_preserve_control #

fn (s &TextParagraph) set_preserve_control(enabled bool)

fn (TextParagraph) get_preserve_control #

fn (s &TextParagraph) get_preserve_control() bool

fn (TextParagraph) set_bidi_override #

fn (s &TextParagraph) set_bidi_override(override Array)

Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.

fn (TextParagraph) set_dropcap #

fn (s &TextParagraph) set_dropcap(text string, font Font, font_size i64, cfg TextParagraph_set_dropcap_Cfg) bool

Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.

fn (TextParagraph) clear_dropcap #

fn (s &TextParagraph) clear_dropcap()

Removes dropcap.

fn (TextParagraph) add_string #

fn (s &TextParagraph) add_string(text string, font Font, font_size i64, cfg TextParagraph_add_string_Cfg) bool

Adds text span and font to draw it.

fn (TextParagraph) add_object #

fn (s &TextParagraph) add_object(key_ ToVariant, size Vector2, cfg TextParagraph_add_object_Cfg) bool

Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.

fn (TextParagraph) resize_object #

fn (s &TextParagraph) resize_object(key_ ToVariant, size Vector2, cfg TextParagraph_resize_object_Cfg) bool

Sets new size and alignment of embedded object.

fn (TextParagraph) set_alignment #

fn (s &TextParagraph) set_alignment(alignment HorizontalAlignment)

fn (TextParagraph) get_alignment #

fn (s &TextParagraph) get_alignment() HorizontalAlignment

fn (TextParagraph) tab_align #

fn (s &TextParagraph) tab_align(tab_stops PackedFloat32Array)

Aligns paragraph to the given tab-stops.

fn (TextParagraph) set_break_flags #

fn (s &TextParagraph) set_break_flags(flags TextServerLineBreakFlag)

fn (TextParagraph) get_break_flags #

fn (s &TextParagraph) get_break_flags() TextServerLineBreakFlag

fn (TextParagraph) set_justification_flags #

fn (s &TextParagraph) set_justification_flags(flags TextServerJustificationFlag)

fn (TextParagraph) get_justification_flags #

fn (s &TextParagraph) get_justification_flags() TextServerJustificationFlag

fn (TextParagraph) set_text_overrun_behavior #

fn (s &TextParagraph) set_text_overrun_behavior(overrun_behavior TextServerOverrunBehavior)

fn (TextParagraph) get_text_overrun_behavior #

fn (s &TextParagraph) get_text_overrun_behavior() TextServerOverrunBehavior

fn (TextParagraph) set_ellipsis_char #

fn (s &TextParagraph) set_ellipsis_char(gd_char string)

fn (TextParagraph) get_ellipsis_char #

fn (s &TextParagraph) get_ellipsis_char() string

fn (TextParagraph) set_width #

fn (s &TextParagraph) set_width(width f64)

fn (TextParagraph) get_width #

fn (s &TextParagraph) get_width() f64

fn (TextParagraph) get_non_wrapped_size #

fn (s &TextParagraph) get_non_wrapped_size() Vector2

Returns the size of the bounding box of the paragraph, without line breaks.

fn (TextParagraph) get_size #

fn (s &TextParagraph) get_size() Vector2

Returns the size of the bounding box of the paragraph.

fn (TextParagraph) get_rid #

fn (s &TextParagraph) get_rid() RID

Returns TextServer full string buffer RID.

fn (TextParagraph) get_line_rid #

fn (s &TextParagraph) get_line_rid(line i64) RID

Returns TextServer line buffer RID.

fn (TextParagraph) get_dropcap_rid #

fn (s &TextParagraph) get_dropcap_rid() RID

Returns drop cap text buffer RID.

fn (TextParagraph) get_range #

fn (s &TextParagraph) get_range() Vector2i

Returns the character range of the paragraph.

fn (TextParagraph) get_line_count #

fn (s &TextParagraph) get_line_count() i64

Returns number of lines in the paragraph.

fn (TextParagraph) set_max_lines_visible #

fn (s &TextParagraph) set_max_lines_visible(max_lines_visible i64)

fn (TextParagraph) get_max_lines_visible #

fn (s &TextParagraph) get_max_lines_visible() i64

fn (TextParagraph) set_line_spacing #

fn (s &TextParagraph) set_line_spacing(line_spacing f64)

fn (TextParagraph) get_line_spacing #

fn (s &TextParagraph) get_line_spacing() f64

fn (TextParagraph) get_line_objects #

fn (s &TextParagraph) get_line_objects(line i64) Array

Returns array of inline objects in the line.

fn (TextParagraph) get_line_object_rect #

fn (s &TextParagraph) get_line_object_rect(line i64, key_ ToVariant) Rect2

Returns bounding rectangle of the inline object.

fn (TextParagraph) get_line_size #

fn (s &TextParagraph) get_line_size(line i64) Vector2

Returns size of the bounding box of the line of text. Returned size is rounded up.

fn (TextParagraph) get_line_range #

fn (s &TextParagraph) get_line_range(line i64) Vector2i

Returns character range of the line.

fn (TextParagraph) get_line_ascent #

fn (s &TextParagraph) get_line_ascent(line i64) f64

Returns the text line ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).

fn (TextParagraph) get_line_descent #

fn (s &TextParagraph) get_line_descent(line i64) f64

Returns the text line descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).

fn (TextParagraph) get_line_width #

fn (s &TextParagraph) get_line_width(line i64) f64

Returns width (for horizontal layout) or height (for vertical) of the line of text.

fn (TextParagraph) get_line_underline_position #

fn (s &TextParagraph) get_line_underline_position(line i64) f64

Returns pixel offset of the underline below the baseline.

fn (TextParagraph) get_line_underline_thickness #

fn (s &TextParagraph) get_line_underline_thickness(line i64) f64

Returns thickness of the underline.

fn (TextParagraph) get_dropcap_size #

fn (s &TextParagraph) get_dropcap_size() Vector2

Returns drop cap bounding box size.

fn (TextParagraph) get_dropcap_lines #

fn (s &TextParagraph) get_dropcap_lines() i64

Returns number of lines used by dropcap.

fn (TextParagraph) draw #

fn (s &TextParagraph) draw(canvas RID, pos Vector2, cfg TextParagraph_draw_Cfg)

Draw all lines of the text and drop cap into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextParagraph) draw_outline #

fn (s &TextParagraph) draw_outline(canvas RID, pos Vector2, cfg TextParagraph_draw_outline_Cfg)

Draw outlines of all lines of the text and drop cap into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextParagraph) draw_line #

fn (s &TextParagraph) draw_line(canvas RID, pos Vector2, line i64, cfg TextParagraph_draw_line_Cfg)

Draw single line of text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextParagraph) draw_line_outline #

fn (s &TextParagraph) draw_line_outline(canvas RID, pos Vector2, line i64, cfg TextParagraph_draw_line_outline_Cfg)

Draw outline of the single line of text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextParagraph) draw_dropcap #

fn (s &TextParagraph) draw_dropcap(canvas RID, pos Vector2, cfg TextParagraph_draw_dropcap_Cfg)

Draw drop cap into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextParagraph) draw_dropcap_outline #

fn (s &TextParagraph) draw_dropcap_outline(canvas RID, pos Vector2, cfg TextParagraph_draw_dropcap_outline_Cfg)

Draw drop cap outline into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextParagraph) hit_test #

fn (s &TextParagraph) hit_test(coords Vector2) i64

Returns caret character offset at the specified coordinates. This function always returns a valid position.

struct TextParagraph_add_object_Cfg #

@[params]
struct TextParagraph_add_object_Cfg {
pub:
	inline_align InlineAlignment = unsafe { InlineAlignment(5) }
	length       i64             = 1
	baseline     f64             = 0.0
}

Optional parameters for TextParagraph#add_object

struct TextParagraph_add_string_Cfg #

@[params]
struct TextParagraph_add_string_Cfg {
pub:
	language string
	meta     ToVariant
}

Optional parameters for TextParagraph#add_string

struct TextParagraph_draw_Cfg #

@[params]
struct TextParagraph_draw_Cfg {
pub:
	color        Color = Color{1, 1, 1, 1}
	dc_color     Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextParagraph#draw

struct TextParagraph_draw_dropcap_Cfg #

@[params]
struct TextParagraph_draw_dropcap_Cfg {
pub:
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextParagraph#draw_dropcap

struct TextParagraph_draw_dropcap_outline_Cfg #

@[params]
struct TextParagraph_draw_dropcap_outline_Cfg {
pub:
	outline_size i64   = 1
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextParagraph#draw_dropcap_outline

struct TextParagraph_draw_line_Cfg #

@[params]
struct TextParagraph_draw_line_Cfg {
pub:
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextParagraph#draw_line

struct TextParagraph_draw_line_outline_Cfg #

@[params]
struct TextParagraph_draw_line_outline_Cfg {
pub:
	outline_size i64   = 1
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextParagraph#draw_line_outline

struct TextParagraph_draw_outline_Cfg #

@[params]
struct TextParagraph_draw_outline_Cfg {
pub:
	outline_size i64   = 1
	color        Color = Color{1, 1, 1, 1}
	dc_color     Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextParagraph#draw_outline

struct TextParagraph_resize_object_Cfg #

@[params]
struct TextParagraph_resize_object_Cfg {
pub:
	inline_align InlineAlignment = unsafe { InlineAlignment(5) }
	baseline     f64             = 0.0
}

Optional parameters for TextParagraph#resize_object

struct TextParagraph_set_dropcap_Cfg #

@[params]
struct TextParagraph_set_dropcap_Cfg {
pub:
	dropcap_margins Rect2 = Rect2{Vector2{0, 0}, Vector2{0, 0}}
	language        string
}

Optional parameters for TextParagraph#set_dropcap

struct TextServer #

struct TextServer {
	RefCounted
}

A server interface for font management and text rendering.

fn (TextServer) to_variant #

fn (s &TextServer) to_variant() Variant

fn (TextServer) from_variant #

fn (mut s TextServer) from_variant(variant &Variant)

fn (TextServer) has_feature #

fn (s &TextServer) has_feature(feature TextServerFeature) bool

Returns true if the server supports a feature.

fn (TextServer) get_name #

fn (s &TextServer) get_name() string

Returns the name of the server interface.

fn (TextServer) get_features #

fn (s &TextServer) get_features() i64

Returns text server features, see [enum Feature].

fn (TextServer) load_support_data #

fn (s &TextServer) load_support_data(filename string) bool

Loads optional TextServer database (e.g. ICU break iterators and dictionaries). [b]Note:[/b] This function should be called before any other TextServer functions used, otherwise it won't have any effect.

fn (TextServer) get_support_data_filename #

fn (s &TextServer) get_support_data_filename() string

Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.

fn (TextServer) get_support_data_info #

fn (s &TextServer) get_support_data_info() string

Returns TextServer database (e.g. ICU break iterators and dictionaries) description.

fn (TextServer) save_support_data #

fn (s &TextServer) save_support_data(filename string) bool

Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file. [b]Note:[/b] This function is used by during project export, to include TextServer database.

fn (TextServer) get_support_data #

fn (s &TextServer) get_support_data() PackedByteArray

Returns default TextServer database (e.g. ICU break iterators and dictionaries).

fn (TextServer) is_locale_right_to_left #

fn (s &TextServer) is_locale_right_to_left(locale string) bool

Returns true if locale is right-to-left.

fn (TextServer) name_to_tag #

fn (s &TextServer) name_to_tag(name string) i64

Converts readable feature, variation, script, or language name to OpenType tag.

fn (TextServer) tag_to_name #

fn (s &TextServer) tag_to_name(tag i64) string

Converts OpenType tag to readable feature, variation, script, or language name.

fn (TextServer) has #

fn (s &TextServer) has(rid RID) bool

Returns true if [param rid] is valid resource owned by this text server.

fn (TextServer) free_rid #

fn (s &TextServer) free_rid(rid RID)

Frees an object created by this [TextServer].

fn (TextServer) create_font #

fn (s &TextServer) create_font() RID

Creates a new, empty font cache entry resource. To free the resulting resource, use the [method free_rid] method.

fn (TextServer) create_font_linked_variation #

fn (s &TextServer) create_font_linked_variation(font_rid RID) RID

Creates a new variation existing font which is reusing the same glyph cache and font data. To free the resulting resource, use the [method free_rid] method.

fn (TextServer) font_set_data #

fn (s &TextServer) font_set_data(font_rid RID, data PackedByteArray)

Sets font source data, e.g contents of the dynamic font source file.

fn (TextServer) font_set_face_index #

fn (s &TextServer) font_set_face_index(font_rid RID, face_index i64)

Sets an active face index in the TrueType / OpenType collection.

fn (TextServer) font_get_face_index #

fn (s &TextServer) font_get_face_index(font_rid RID) i64

Returns an active face index in the TrueType / OpenType collection.

fn (TextServer) font_get_face_count #

fn (s &TextServer) font_get_face_count(font_rid RID) i64

Returns number of faces in the TrueType / OpenType collection.

fn (TextServer) font_set_style #

fn (s &TextServer) font_set_style(font_rid RID, style TextServerFontStyle)

Sets the font style flags. [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], [method font_set_embolden], or [method font_set_transform] instead.

fn (TextServer) font_get_style #

fn (s &TextServer) font_get_style(font_rid RID) TextServerFontStyle

Returns font style flags.

fn (TextServer) font_set_name #

fn (s &TextServer) font_set_name(font_rid RID, name string)

Sets the font family name.

fn (TextServer) font_get_name #

fn (s &TextServer) font_get_name(font_rid RID) string

Returns font family name.

fn (TextServer) font_get_ot_name_strings #

fn (s &TextServer) font_get_ot_name_strings(font_rid RID) Dictionary

Returns [Dictionary] with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).

fn (TextServer) font_set_style_name #

fn (s &TextServer) font_set_style_name(font_rid RID, name string)

Sets the font style name.

fn (TextServer) font_get_style_name #

fn (s &TextServer) font_get_style_name(font_rid RID) string

Returns font style name.

fn (TextServer) font_set_weight #

fn (s &TextServer) font_set_weight(font_rid RID, weight i64)

Sets weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700. [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_embolden] instead.

fn (TextServer) font_get_weight #

fn (s &TextServer) font_get_weight(font_rid RID) i64

Returns weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.

fn (TextServer) font_set_stretch #

fn (s &TextServer) font_set_stretch(font_rid RID, weight i64)

Sets font stretch amount, compared to a normal width. A percentage value between 50% and 200%. [b]Note:[/b] This value is used for font matching only and will not affect font rendering. Use [method font_set_face_index], [method font_set_variation_coordinates], or [method font_set_transform] instead.

fn (TextServer) font_get_stretch #

fn (s &TextServer) font_get_stretch(font_rid RID) i64

Returns font stretch amount, compared to a normal width. A percentage value between 50% and 200%.

fn (TextServer) font_set_antialiasing #

fn (s &TextServer) font_set_antialiasing(font_rid RID, antialiasing TextServerFontAntialiasing)

Sets font anti-aliasing mode.

fn (TextServer) font_get_antialiasing #

fn (s &TextServer) font_get_antialiasing(font_rid RID) TextServerFontAntialiasing

Returns font anti-aliasing mode.

fn (TextServer) font_set_disable_embedded_bitmaps #

fn (s &TextServer) font_set_disable_embedded_bitmaps(font_rid RID, disable_embedded_bitmaps bool)

If set to true, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property).

fn (TextServer) font_get_disable_embedded_bitmaps #

fn (s &TextServer) font_get_disable_embedded_bitmaps(font_rid RID) bool

Returns whether the font's embedded bitmap loading is disabled.

fn (TextServer) font_set_generate_mipmaps #

fn (s &TextServer) font_set_generate_mipmaps(font_rid RID, generate_mipmaps bool)

If set to true font texture mipmap generation is enabled.

fn (TextServer) font_get_generate_mipmaps #

fn (s &TextServer) font_get_generate_mipmaps(font_rid RID) bool

Returns true if font texture mipmap generation is enabled.

fn (TextServer) font_set_multichannel_signed_distance_field #

fn (s &TextServer) font_set_multichannel_signed_distance_field(font_rid RID, msdf bool)

If set to true, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.

fn (TextServer) font_is_multichannel_signed_distance_field #

fn (s &TextServer) font_is_multichannel_signed_distance_field(font_rid RID) bool

Returns true if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.

fn (TextServer) font_set_msdf_pixel_range #

fn (s &TextServer) font_set_msdf_pixel_range(font_rid RID, msdf_pixel_range i64)

Sets the width of the range around the shape between the minimum and maximum representable signed distance.

fn (TextServer) font_get_msdf_pixel_range #

fn (s &TextServer) font_get_msdf_pixel_range(font_rid RID) i64

Returns the width of the range around the shape between the minimum and maximum representable signed distance.

fn (TextServer) font_set_msdf_size #

fn (s &TextServer) font_set_msdf_size(font_rid RID, msdf_size i64)

Sets source font size used to generate MSDF textures.

fn (TextServer) font_get_msdf_size #

fn (s &TextServer) font_get_msdf_size(font_rid RID) i64

Returns source font size used to generate MSDF textures.

fn (TextServer) font_set_fixed_size #

fn (s &TextServer) font_set_fixed_size(font_rid RID, fixed_size i64)

Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.

fn (TextServer) font_get_fixed_size #

fn (s &TextServer) font_get_fixed_size(font_rid RID) i64

Returns bitmap font fixed size.

fn (TextServer) font_set_fixed_size_scale_mode #

fn (s &TextServer) font_set_fixed_size_scale_mode(font_rid RID, fixed_size_scale_mode TextServerFixedSizeScaleMode)

Sets bitmap font scaling mode. This property is used only if fixed_size is greater than zero.

fn (TextServer) font_get_fixed_size_scale_mode #

fn (s &TextServer) font_get_fixed_size_scale_mode(font_rid RID) TextServerFixedSizeScaleMode

Returns bitmap font scaling mode.

fn (TextServer) font_set_allow_system_fallback #

fn (s &TextServer) font_set_allow_system_fallback(font_rid RID, allow_system_fallback bool)

If set to true, system fonts can be automatically used as fallbacks.

fn (TextServer) font_is_allow_system_fallback #

fn (s &TextServer) font_is_allow_system_fallback(font_rid RID) bool

Returns true if system fonts can be automatically used as fallbacks.

fn (TextServer) font_clear_system_fallback_cache #

fn (s &TextServer) font_clear_system_fallback_cache()

Frees all automatically loaded system fonts.

fn (TextServer) font_set_force_autohinter #

fn (s &TextServer) font_set_force_autohinter(font_rid RID, force_autohinter bool)

If set to true auto-hinting is preferred over font built-in hinting.

fn (TextServer) font_is_force_autohinter #

fn (s &TextServer) font_is_force_autohinter(font_rid RID) bool

Returns true if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.

fn (TextServer) font_set_modulate_color_glyphs #

fn (s &TextServer) font_set_modulate_color_glyphs(font_rid RID, force_autohinter bool)

If set to true, color modulation is applied when drawing colored glyphs, otherwise it's applied to the monochrome glyphs only.

fn (TextServer) font_is_modulate_color_glyphs #

fn (s &TextServer) font_is_modulate_color_glyphs(font_rid RID) bool

Returns true, if color modulation is applied when drawing colored glyphs.

fn (TextServer) font_set_hinting #

fn (s &TextServer) font_set_hinting(font_rid RID, hinting TextServerHinting)

Sets font hinting mode. Used by dynamic fonts only.

fn (TextServer) font_get_hinting #

fn (s &TextServer) font_get_hinting(font_rid RID) TextServerHinting

Returns the font hinting mode. Used by dynamic fonts only.

fn (TextServer) font_set_subpixel_positioning #

fn (s &TextServer) font_set_subpixel_positioning(font_rid RID, subpixel_positioning TextServerSubpixelPositioning)

Sets font subpixel glyph positioning mode.

fn (TextServer) font_get_subpixel_positioning #

fn (s &TextServer) font_get_subpixel_positioning(font_rid RID) TextServerSubpixelPositioning

Returns font subpixel glyph positioning mode.

fn (TextServer) font_set_keep_rounding_remainders #

fn (s &TextServer) font_set_keep_rounding_remainders(font_rid RID, keep_rounding_remainders bool)

Sets glyph position rounding behavior. If set to true, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.

fn (TextServer) font_get_keep_rounding_remainders #

fn (s &TextServer) font_get_keep_rounding_remainders(font_rid RID) bool

Returns glyph position rounding behavior. If set to true, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.

fn (TextServer) font_set_embolden #

fn (s &TextServer) font_set_embolden(font_rid RID, strength f64)

Sets font embolden strength. If [param strength] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.

fn (TextServer) font_get_embolden #

fn (s &TextServer) font_get_embolden(font_rid RID) f64

Returns font embolden strength.

fn (TextServer) font_set_spacing #

fn (s &TextServer) font_set_spacing(font_rid RID, spacing TextServerSpacingType, value i64)

Sets the spacing for [param spacing] to [param value] in pixels (not relative to the font size).

fn (TextServer) font_get_spacing #

fn (s &TextServer) font_get_spacing(font_rid RID, spacing TextServerSpacingType) i64

Returns the spacing for [param spacing] in pixels (not relative to the font size).

fn (TextServer) font_set_baseline_offset #

fn (s &TextServer) font_set_baseline_offset(font_rid RID, baseline_offset f64)

Sets extra baseline offset (as a fraction of font height).

fn (TextServer) font_get_baseline_offset #

fn (s &TextServer) font_get_baseline_offset(font_rid RID) f64

Returns extra baseline offset (as a fraction of font height).

fn (TextServer) font_set_transform #

fn (s &TextServer) font_set_transform(font_rid RID, transform Transform2D)

Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. For example, to simulate italic typeface by slanting, apply the following transform Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0).

fn (TextServer) font_get_transform #

fn (s &TextServer) font_get_transform(font_rid RID) Transform2D

Returns 2D transform applied to the font outlines.

fn (TextServer) font_set_variation_coordinates #

fn (s &TextServer) font_set_variation_coordinates(font_rid RID, variation_coordinates Dictionary)

Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.

fn (TextServer) font_get_variation_coordinates #

fn (s &TextServer) font_get_variation_coordinates(font_rid RID) Dictionary

Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.

fn (TextServer) font_set_oversampling #

fn (s &TextServer) font_set_oversampling(font_rid RID, oversampling f64)

Deprecated. This method does nothing.

fn (TextServer) font_get_oversampling #

fn (s &TextServer) font_get_oversampling(font_rid RID) f64

Deprecated. This method always returns 1.0.

fn (TextServer) font_get_size_cache_list #

fn (s &TextServer) font_get_size_cache_list(font_rid RID) Array

Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size.

fn (TextServer) font_clear_size_cache #

fn (s &TextServer) font_clear_size_cache(font_rid RID)

Removes all font sizes from the cache entry.

fn (TextServer) font_remove_size_cache #

fn (s &TextServer) font_remove_size_cache(font_rid RID, size Vector2i)

Removes specified font size from the cache entry.

fn (TextServer) font_get_size_cache_info #

fn (s &TextServer) font_get_size_cache_info(font_rid RID) Array

Returns font cache information, each entry contains the following fields: Vector2i size_px - font size in pixels, float viewport_oversampling - viewport oversampling factor, int glyphs - number of rendered glyphs, int textures - number of used textures, int textures_size - size of texture data in bytes.

fn (TextServer) font_set_ascent #

fn (s &TextServer) font_set_ascent(font_rid RID, size i64, ascent f64)

Sets the font ascent (number of pixels above the baseline).

fn (TextServer) font_get_ascent #

fn (s &TextServer) font_get_ascent(font_rid RID, size i64) f64

Returns the font ascent (number of pixels above the baseline).

fn (TextServer) font_set_descent #

fn (s &TextServer) font_set_descent(font_rid RID, size i64, descent f64)

Sets the font descent (number of pixels below the baseline).

fn (TextServer) font_get_descent #

fn (s &TextServer) font_get_descent(font_rid RID, size i64) f64

Returns the font descent (number of pixels below the baseline).

fn (TextServer) font_set_underline_position #

fn (s &TextServer) font_set_underline_position(font_rid RID, size i64, underline_position f64)

Sets pixel offset of the underline below the baseline.

fn (TextServer) font_get_underline_position #

fn (s &TextServer) font_get_underline_position(font_rid RID, size i64) f64

Returns pixel offset of the underline below the baseline.

fn (TextServer) font_set_underline_thickness #

fn (s &TextServer) font_set_underline_thickness(font_rid RID, size i64, underline_thickness f64)

Sets thickness of the underline in pixels.

fn (TextServer) font_get_underline_thickness #

fn (s &TextServer) font_get_underline_thickness(font_rid RID, size i64) f64

Returns thickness of the underline in pixels.

fn (TextServer) font_set_scale #

fn (s &TextServer) font_set_scale(font_rid RID, size i64, scale f64)

Sets scaling factor of the color bitmap font.

fn (TextServer) font_get_scale #

fn (s &TextServer) font_get_scale(font_rid RID, size i64) f64

Returns scaling factor of the color bitmap font.

fn (TextServer) font_get_texture_count #

fn (s &TextServer) font_get_texture_count(font_rid RID, size Vector2i) i64

Returns number of textures used by font cache entry.

fn (TextServer) font_clear_textures #

fn (s &TextServer) font_clear_textures(font_rid RID, size Vector2i)

Removes all textures from font cache entry. [b]Note:[/b] This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually.

fn (TextServer) font_remove_texture #

fn (s &TextServer) font_remove_texture(font_rid RID, size Vector2i, texture_index i64)

Removes specified texture from the cache entry. [b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph].

fn (TextServer) font_set_texture_image #

fn (s &TextServer) font_set_texture_image(font_rid RID, size Vector2i, texture_index i64, image Image)

Sets font cache texture image data.

fn (TextServer) font_get_texture_image #

fn (s &TextServer) font_get_texture_image(font_rid RID, size Vector2i, texture_index i64) Image

Returns font cache texture image data.

fn (TextServer) font_set_texture_offsets #

fn (s &TextServer) font_set_texture_offsets(font_rid RID, size Vector2i, texture_index i64, offset PackedInt32Array)

Sets array containing glyph packing data.

fn (TextServer) font_get_texture_offsets #

fn (s &TextServer) font_get_texture_offsets(font_rid RID, size Vector2i, texture_index i64) PackedInt32Array

Returns array containing glyph packing data.

fn (TextServer) font_get_glyph_list #

fn (s &TextServer) font_get_glyph_list(font_rid RID, size Vector2i) PackedInt32Array

Returns list of rendered glyphs in the cache entry.

fn (TextServer) font_clear_glyphs #

fn (s &TextServer) font_clear_glyphs(font_rid RID, size Vector2i)

Removes all rendered glyph information from the cache entry. [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.

fn (TextServer) font_remove_glyph #

fn (s &TextServer) font_remove_glyph(font_rid RID, size Vector2i, glyph i64)

Removes specified rendered glyph information from the cache entry. [b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.

fn (TextServer) font_get_glyph_advance #

fn (s &TextServer) font_get_glyph_advance(font_rid RID, size i64, glyph i64) Vector2

Returns glyph advance (offset of the next glyph). [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.

fn (TextServer) font_set_glyph_advance #

fn (s &TextServer) font_set_glyph_advance(font_rid RID, size i64, glyph i64, advance Vector2)

Sets glyph advance (offset of the next glyph). [b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.

fn (TextServer) font_get_glyph_offset #

fn (s &TextServer) font_get_glyph_offset(font_rid RID, size Vector2i, glyph i64) Vector2

Returns glyph offset from the baseline.

fn (TextServer) font_set_glyph_offset #

fn (s &TextServer) font_set_glyph_offset(font_rid RID, size Vector2i, glyph i64, offset Vector2)

Sets glyph offset from the baseline.

fn (TextServer) font_get_glyph_size #

fn (s &TextServer) font_get_glyph_size(font_rid RID, size Vector2i, glyph i64) Vector2

Returns size of the glyph.

fn (TextServer) font_set_glyph_size #

fn (s &TextServer) font_set_glyph_size(font_rid RID, size Vector2i, glyph i64, gl_size Vector2)

Sets size of the glyph.

fn (TextServer) font_get_glyph_uv_rect #

fn (s &TextServer) font_get_glyph_uv_rect(font_rid RID, size Vector2i, glyph i64) Rect2

Returns rectangle in the cache texture containing the glyph.

fn (TextServer) font_set_glyph_uv_rect #

fn (s &TextServer) font_set_glyph_uv_rect(font_rid RID, size Vector2i, glyph i64, uv_rect Rect2)

Sets rectangle in the cache texture containing the glyph.

fn (TextServer) font_get_glyph_texture_idx #

fn (s &TextServer) font_get_glyph_texture_idx(font_rid RID, size Vector2i, glyph i64) i64

Returns index of the cache texture containing the glyph.

fn (TextServer) font_set_glyph_texture_idx #

fn (s &TextServer) font_set_glyph_texture_idx(font_rid RID, size Vector2i, glyph i64, texture_idx i64)

Sets index of the cache texture containing the glyph.

fn (TextServer) font_get_glyph_texture_rid #

fn (s &TextServer) font_get_glyph_texture_rid(font_rid RID, size Vector2i, glyph i64) RID

Returns resource ID of the cache texture containing the glyph. [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.

fn (TextServer) font_get_glyph_texture_size #

fn (s &TextServer) font_get_glyph_texture_size(font_rid RID, size Vector2i, glyph i64) Vector2

Returns size of the cache texture containing the glyph. [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.

fn (TextServer) font_get_glyph_contours #

fn (s &TextServer) font_get_glyph_contours(font RID, size i64, index i64) Dictionary

Returns outline contours of the glyph as a [Dictionary] with the following contents: points - [PackedVector3Array], containing outline points. x and y are point coordinates. z is the type of the point, using the [enum ContourPointTag] values. contours - [PackedInt32Array], containing indices the end points of each contour. orientation - [bool], contour orientation. If true, clockwise contours must be filled.- Two successive [constant CONTOUR_CURVE_TAG_ON] points indicate a line segment.

  • One [constant CONTOUR_CURVE_TAG_OFF_CONIC] point between two [constant CONTOUR_CURVE_TAG_ON] points indicates a single conic (quadratic) Bézier arc.
  • Two [constant CONTOUR_CURVE_TAG_OFF_CUBIC] points between two [constant CONTOUR_CURVE_TAG_ON] points indicate a single cubic Bézier arc.
  • Two successive [constant CONTOUR_CURVE_TAG_OFF_CONIC] points indicate two successive conic (quadratic) Bézier arcs with a virtual [constant CONTOUR_CURVE_TAG_ON] point at their middle.
  • Each contour is closed. The last point of a contour uses the first point of a contour as its next point, and vice versa. The first point can be [constant CONTOUR_CURVE_TAG_OFF_CONIC] point.

fn (TextServer) font_get_kerning_list #

fn (s &TextServer) font_get_kerning_list(font_rid RID, size i64) Array

Returns list of the kerning overrides.

fn (TextServer) font_clear_kerning_map #

fn (s &TextServer) font_clear_kerning_map(font_rid RID, size i64)

Removes all kerning overrides.

fn (TextServer) font_remove_kerning #

fn (s &TextServer) font_remove_kerning(font_rid RID, size i64, glyph_pair Vector2i)

Removes kerning override for the pair of glyphs.

fn (TextServer) font_set_kerning #

fn (s &TextServer) font_set_kerning(font_rid RID, size i64, glyph_pair Vector2i, kerning Vector2)

Sets kerning for the pair of glyphs.

fn (TextServer) font_get_kerning #

fn (s &TextServer) font_get_kerning(font_rid RID, size i64, glyph_pair Vector2i) Vector2

Returns kerning for the pair of glyphs.

fn (TextServer) font_get_glyph_index #

fn (s &TextServer) font_get_glyph_index(font_rid RID, size i64, gd_char i64, variation_selector i64) i64

Returns the glyph index of a [param char], optionally modified by the [param variation_selector]. See [method font_get_char_from_glyph_index].

fn (TextServer) font_get_char_from_glyph_index #

fn (s &TextServer) font_get_char_from_glyph_index(font_rid RID, size i64, glyph_index i64) i64

Returns character code associated with [param glyph_index], or 0 if [param glyph_index] is invalid. See [method font_get_glyph_index].

fn (TextServer) font_has_char #

fn (s &TextServer) font_has_char(font_rid RID, gd_char i64) bool

Returns true if a Unicode [param char] is available in the font.

fn (TextServer) font_get_supported_chars #

fn (s &TextServer) font_get_supported_chars(font_rid RID) string

Returns a string containing all the characters available in the font.

fn (TextServer) font_get_supported_glyphs #

fn (s &TextServer) font_get_supported_glyphs(font_rid RID) PackedInt32Array

Returns an array containing all glyph indices in the font.

fn (TextServer) font_render_range #

fn (s &TextServer) font_render_range(font_rid RID, size Vector2i, start i64, end i64)

Renders the range of characters to the font cache texture.

fn (TextServer) font_render_glyph #

fn (s &TextServer) font_render_glyph(font_rid RID, size Vector2i, index i64)

Renders specified glyph to the font cache texture.

fn (TextServer) font_draw_glyph #

fn (s &TextServer) font_draw_glyph(font_rid RID, canvas RID, size i64, pos Vector2, index i64, cfg TextServer_font_draw_glyph_Cfg)

Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size]. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. [b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index]. [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.

fn (TextServer) font_draw_glyph_outline #

fn (s &TextServer) font_draw_glyph_outline(font_rid RID, canvas RID, size i64, outline_size i64, pos Vector2, index i64, cfg TextServer_font_draw_glyph_outline_Cfg)

Draws single glyph outline of size [param outline_size] into a canvas item at the position, using [param font_rid] at the size [param size]. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. [b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index]. [b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.

fn (TextServer) font_is_language_supported #

fn (s &TextServer) font_is_language_supported(font_rid RID, language string) bool

Returns true, if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).

fn (TextServer) font_set_language_support_override #

fn (s &TextServer) font_set_language_support_override(font_rid RID, language string, supported bool)

Adds override for [method font_is_language_supported].

fn (TextServer) font_get_language_support_override #

fn (s &TextServer) font_get_language_support_override(font_rid RID, language string) bool

Returns true if support override is enabled for the [param language].

fn (TextServer) font_remove_language_support_override #

fn (s &TextServer) font_remove_language_support_override(font_rid RID, language string)

Remove language support override.

fn (TextServer) font_get_language_support_overrides #

fn (s &TextServer) font_get_language_support_overrides(font_rid RID) PackedStringArray

Returns list of language support overrides.

fn (TextServer) font_is_script_supported #

fn (s &TextServer) font_is_script_supported(font_rid RID, script string) bool

Returns true, if font supports given script (ISO 15924 code).

fn (TextServer) font_set_script_support_override #

fn (s &TextServer) font_set_script_support_override(font_rid RID, script string, supported bool)

Adds override for [method font_is_script_supported].

fn (TextServer) font_get_script_support_override #

fn (s &TextServer) font_get_script_support_override(font_rid RID, script string) bool

Returns true if support override is enabled for the [param script].

fn (TextServer) font_remove_script_support_override #

fn (s &TextServer) font_remove_script_support_override(font_rid RID, script string)

Removes script support override.

fn (TextServer) font_get_script_support_overrides #

fn (s &TextServer) font_get_script_support_overrides(font_rid RID) PackedStringArray

Returns list of script support overrides.

fn (TextServer) font_set_opentype_feature_overrides #

fn (s &TextServer) font_set_opentype_feature_overrides(font_rid RID, overrides Dictionary)

Sets font OpenType feature set override.

fn (TextServer) font_get_opentype_feature_overrides #

fn (s &TextServer) font_get_opentype_feature_overrides(font_rid RID) Dictionary

Returns font OpenType feature set override.

fn (TextServer) font_supported_feature_list #

fn (s &TextServer) font_supported_feature_list(font_rid RID) Dictionary

Returns the dictionary of the supported OpenType features.

fn (TextServer) font_supported_variation_list #

fn (s &TextServer) font_supported_variation_list(font_rid RID) Dictionary

Returns the dictionary of the supported OpenType variation coordinates.

fn (TextServer) font_get_global_oversampling #

fn (s &TextServer) font_get_global_oversampling() f64

Deprecated. This method always returns 1.0.

fn (TextServer) font_set_global_oversampling #

fn (s &TextServer) font_set_global_oversampling(oversampling f64)

Deprecated. This method does nothing.

fn (TextServer) get_hex_code_box_size #

fn (s &TextServer) get_hex_code_box_size(size i64, index i64) Vector2

Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).

fn (TextServer) draw_hex_code_box #

fn (s &TextServer) draw_hex_code_box(canvas RID, size i64, pos Vector2, index i64, color Color)

Draws box displaying character hexadecimal code. Used for replacing missing characters.

fn (TextServer) create_shaped_text #

fn (s &TextServer) create_shaped_text(cfg TextServer_create_shaped_text_Cfg) RID

Creates a new buffer for complex text layout, with the given [param direction] and [param orientation]. To free the resulting buffer, use [method free_rid] method. [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]). [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).

fn (TextServer) shaped_text_clear #

fn (s &TextServer) shaped_text_clear(rid RID)

Clears text buffer (removes text and inline objects).

fn (TextServer) shaped_text_set_direction #

fn (s &TextServer) shaped_text_set_direction(shaped RID, cfg TextServer_shaped_text_set_direction_Cfg)

Sets desired text direction. If set to [constant DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale. [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).

fn (TextServer) shaped_text_get_direction #

fn (s &TextServer) shaped_text_get_direction(shaped RID) TextServerDirection

Returns direction of the text.

fn (TextServer) shaped_text_get_inferred_direction #

fn (s &TextServer) shaped_text_get_inferred_direction(shaped RID) TextServerDirection

Returns direction of the text, inferred by the BiDi algorithm.

fn (TextServer) shaped_text_set_bidi_override #

fn (s &TextServer) shaped_text_set_bidi_override(shaped RID, override Array)

Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.

fn (TextServer) shaped_text_set_custom_punctuation #

fn (s &TextServer) shaped_text_set_custom_punctuation(shaped RID, punct string)

Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.

fn (TextServer) shaped_text_get_custom_punctuation #

fn (s &TextServer) shaped_text_get_custom_punctuation(shaped RID) string

Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.

fn (TextServer) shaped_text_set_custom_ellipsis #

fn (s &TextServer) shaped_text_set_custom_ellipsis(shaped RID, gd_char i64)

Sets ellipsis character used for text clipping.

fn (TextServer) shaped_text_get_custom_ellipsis #

fn (s &TextServer) shaped_text_get_custom_ellipsis(shaped RID) i64

Returns ellipsis character used for text clipping.

fn (TextServer) shaped_text_set_orientation #

fn (s &TextServer) shaped_text_set_orientation(shaped RID, cfg TextServer_shaped_text_set_orientation_Cfg)

Sets desired text orientation. [b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).

fn (TextServer) shaped_text_get_orientation #

fn (s &TextServer) shaped_text_get_orientation(shaped RID) TextServerOrientation

Returns text orientation.

fn (TextServer) shaped_text_set_preserve_invalid #

fn (s &TextServer) shaped_text_set_preserve_invalid(shaped RID, enabled bool)

If set to true text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.

fn (TextServer) shaped_text_get_preserve_invalid #

fn (s &TextServer) shaped_text_get_preserve_invalid(shaped RID) bool

Returns true if text buffer is configured to display hexadecimal codes in place of invalid characters. [b]Note:[/b] If set to false, nothing is displayed in place of invalid characters.

fn (TextServer) shaped_text_set_preserve_control #

fn (s &TextServer) shaped_text_set_preserve_control(shaped RID, enabled bool)

If set to true text buffer will display control characters.

fn (TextServer) shaped_text_get_preserve_control #

fn (s &TextServer) shaped_text_get_preserve_control(shaped RID) bool

Returns true if text buffer is configured to display control characters.

fn (TextServer) shaped_text_set_spacing #

fn (s &TextServer) shaped_text_set_spacing(shaped RID, spacing TextServerSpacingType, value i64)

Sets extra spacing added between glyphs or lines in pixels.

fn (TextServer) shaped_text_get_spacing #

fn (s &TextServer) shaped_text_get_spacing(shaped RID, spacing TextServerSpacingType) i64

Returns extra spacing added between glyphs or lines in pixels.

fn (TextServer) shaped_text_add_string #

fn (s &TextServer) shaped_text_add_string(shaped RID, text string, fonts Array, size i64, cfg TextServer_shaped_text_add_string_Cfg) bool

Adds text span and font to draw it to the text buffer.

fn (TextServer) shaped_text_add_object #

fn (s &TextServer) shaped_text_add_object(shaped RID, key_ ToVariant, size Vector2, cfg TextServer_shaped_text_add_object_Cfg) bool

Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.

fn (TextServer) shaped_text_resize_object #

fn (s &TextServer) shaped_text_resize_object(shaped RID, key_ ToVariant, size Vector2, cfg TextServer_shaped_text_resize_object_Cfg) bool

Sets new size and alignment of embedded object.

fn (TextServer) shaped_get_text #

fn (s &TextServer) shaped_get_text(shaped RID) string

Returns the text buffer source text, including object replacement characters.

fn (TextServer) shaped_get_span_count #

fn (s &TextServer) shaped_get_span_count(shaped RID) i64

Returns number of text spans added using [method shaped_text_add_string] or [method shaped_text_add_object].

fn (TextServer) shaped_get_span_meta #

fn (s &TextServer) shaped_get_span_meta(shaped RID, index i64) Variant

Returns text span metadata.

fn (TextServer) shaped_get_span_embedded_object #

fn (s &TextServer) shaped_get_span_embedded_object(shaped RID, index i64) Variant

Returns text embedded object key.

fn (TextServer) shaped_get_span_text #

fn (s &TextServer) shaped_get_span_text(shaped RID, index i64) string

Returns the text span source text.

fn (TextServer) shaped_get_span_object #

fn (s &TextServer) shaped_get_span_object(shaped RID, index i64) Variant

Returns the text span embedded object key.

fn (TextServer) shaped_set_span_update_font #

fn (s &TextServer) shaped_set_span_update_font(shaped RID, index i64, fonts Array, size i64, cfg TextServer_shaped_set_span_update_font_Cfg)

Changes text span font, font size, and OpenType features, without changing the text.

fn (TextServer) shaped_get_run_count #

fn (s &TextServer) shaped_get_run_count(shaped RID) i64

Returns the number of uniform text runs in the buffer.

fn (TextServer) shaped_get_run_text #

fn (s &TextServer) shaped_get_run_text(shaped RID, index i64) string

Returns the source text of the [param index] text run (in visual order).

fn (TextServer) shaped_get_run_range #

fn (s &TextServer) shaped_get_run_range(shaped RID, index i64) Vector2i

Returns the source text range of the [param index] text run (in visual order).

fn (TextServer) shaped_get_run_font_rid #

fn (s &TextServer) shaped_get_run_font_rid(shaped RID, index i64) RID

Returns the font RID of the [param index] text run (in visual order).

fn (TextServer) shaped_get_run_font_size #

fn (s &TextServer) shaped_get_run_font_size(shaped RID, index i64) i64

Returns the font size of the [param index] text run (in visual order).

fn (TextServer) shaped_get_run_language #

fn (s &TextServer) shaped_get_run_language(shaped RID, index i64) string

Returns the language of the [param index] text run (in visual order).

fn (TextServer) shaped_get_run_direction #

fn (s &TextServer) shaped_get_run_direction(shaped RID, index i64) TextServerDirection

Returns the direction of the [param index] text run (in visual order).

fn (TextServer) shaped_get_run_object #

fn (s &TextServer) shaped_get_run_object(shaped RID, index i64) Variant

Returns the embedded object of the [param index] text run (in visual order).

fn (TextServer) shaped_text_substr #

fn (s &TextServer) shaped_text_substr(shaped RID, start i64, length i64) RID

Returns text buffer for the substring of the text in the [param shaped] text buffer (including inline objects).

fn (TextServer) shaped_text_get_parent #

fn (s &TextServer) shaped_text_get_parent(shaped RID) RID

Returns the parent buffer from which the substring originates.

fn (TextServer) shaped_text_fit_to_width #

fn (s &TextServer) shaped_text_fit_to_width(shaped RID, width f64, cfg TextServer_shaped_text_fit_to_width_Cfg) f64

Adjusts text width to fit to specified width, returns new text width.

fn (TextServer) shaped_text_tab_align #

fn (s &TextServer) shaped_text_tab_align(shaped RID, tab_stops PackedFloat32Array) f64

Aligns shaped text to the given tab-stops.

fn (TextServer) shaped_text_shape #

fn (s &TextServer) shaped_text_shape(shaped RID) bool

Shapes buffer if it's not shaped. Returns true if the string is shaped successfully. [b]Note:[/b] It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested.

fn (TextServer) shaped_text_is_ready #

fn (s &TextServer) shaped_text_is_ready(shaped RID) bool

Returns true if buffer is successfully shaped.

fn (TextServer) shaped_text_has_visible_chars #

fn (s &TextServer) shaped_text_has_visible_chars(shaped RID) bool

Returns true if text buffer contains any visible characters.

fn (TextServer) shaped_text_get_glyphs #

fn (s &TextServer) shaped_text_get_glyphs(shaped RID) Array

Returns an array of glyphs in the visual order.

fn (TextServer) shaped_text_sort_logical #

fn (s &TextServer) shaped_text_sort_logical(shaped RID) Array

Returns text glyphs in the logical order.

fn (TextServer) shaped_text_get_glyph_count #

fn (s &TextServer) shaped_text_get_glyph_count(shaped RID) i64

Returns number of glyphs in the buffer.

fn (TextServer) shaped_text_get_range #

fn (s &TextServer) shaped_text_get_range(shaped RID) Vector2i

Returns substring buffer character range in the parent buffer.

fn (TextServer) shaped_text_get_line_breaks_adv #

fn (s &TextServer) shaped_text_get_line_breaks_adv(shaped RID, width PackedFloat32Array, cfg TextServer_shaped_text_get_line_breaks_adv_Cfg) PackedInt32Array

Breaks text to the lines and columns. Returns character ranges for each segment.

fn (TextServer) shaped_text_get_line_breaks #

fn (s &TextServer) shaped_text_get_line_breaks(shaped RID, width f64, cfg TextServer_shaped_text_get_line_breaks_Cfg) PackedInt32Array

Breaks text to the lines and returns character ranges for each line.

fn (TextServer) shaped_text_get_word_breaks #

fn (s &TextServer) shaped_text_get_word_breaks(shaped RID, cfg TextServer_shaped_text_get_word_breaks_Cfg) PackedInt32Array

Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking.

fn (TextServer) shaped_text_get_trim_pos #

fn (s &TextServer) shaped_text_get_trim_pos(shaped RID) i64

Returns the position of the overrun trim.

fn (TextServer) shaped_text_get_ellipsis_pos #

fn (s &TextServer) shaped_text_get_ellipsis_pos(shaped RID) i64

Returns position of the ellipsis.

fn (TextServer) shaped_text_get_ellipsis_glyphs #

fn (s &TextServer) shaped_text_get_ellipsis_glyphs(shaped RID) Array

Returns array of the glyphs in the ellipsis.

fn (TextServer) shaped_text_get_ellipsis_glyph_count #

fn (s &TextServer) shaped_text_get_ellipsis_glyph_count(shaped RID) i64

Returns number of glyphs in the ellipsis.

fn (TextServer) shaped_text_overrun_trim_to_width #

fn (s &TextServer) shaped_text_overrun_trim_to_width(shaped RID, cfg TextServer_shaped_text_overrun_trim_to_width_Cfg)

Trims text if it exceeds the given width.

fn (TextServer) shaped_text_get_objects #

fn (s &TextServer) shaped_text_get_objects(shaped RID) Array

Returns array of inline objects.

fn (TextServer) shaped_text_get_object_rect #

fn (s &TextServer) shaped_text_get_object_rect(shaped RID, key_ ToVariant) Rect2

Returns bounding rectangle of the inline object.

fn (TextServer) shaped_text_get_object_range #

fn (s &TextServer) shaped_text_get_object_range(shaped RID, key_ ToVariant) Vector2i

Returns the character range of the inline object.

fn (TextServer) shaped_text_get_object_glyph #

fn (s &TextServer) shaped_text_get_object_glyph(shaped RID, key_ ToVariant) i64

Returns the glyph index of the inline object.

fn (TextServer) shaped_text_get_size #

fn (s &TextServer) shaped_text_get_size(shaped RID) Vector2

Returns size of the text.

fn (TextServer) shaped_text_get_ascent #

fn (s &TextServer) shaped_text_get_ascent(shaped RID) f64

Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). [b]Note:[/b] Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.

fn (TextServer) shaped_text_get_descent #

fn (s &TextServer) shaped_text_get_descent(shaped RID) f64

Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). [b]Note:[/b] Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.

fn (TextServer) shaped_text_get_width #

fn (s &TextServer) shaped_text_get_width(shaped RID) f64

Returns width (for horizontal layout) or height (for vertical) of the text.

fn (TextServer) shaped_text_get_underline_position #

fn (s &TextServer) shaped_text_get_underline_position(shaped RID) f64

Returns pixel offset of the underline below the baseline.

fn (TextServer) shaped_text_get_underline_thickness #

fn (s &TextServer) shaped_text_get_underline_thickness(shaped RID) f64

Returns thickness of the underline.

fn (TextServer) shaped_text_get_carets #

fn (s &TextServer) shaped_text_get_carets(shaped RID, position i64) Dictionary

Returns shapes of the carets corresponding to the character offset [param position] in the text. Returned caret shape is 1 pixel wide rectangle.

fn (TextServer) shaped_text_get_selection #

fn (s &TextServer) shaped_text_get_selection(shaped RID, start i64, end i64) PackedVector2Array

Returns selection rectangles for the specified character range.

fn (TextServer) shaped_text_hit_test_grapheme #

fn (s &TextServer) shaped_text_hit_test_grapheme(shaped RID, coords f64) i64

Returns grapheme index at the specified pixel offset at the baseline, or -1 if none is found.

fn (TextServer) shaped_text_hit_test_position #

fn (s &TextServer) shaped_text_hit_test_position(shaped RID, coords f64) i64

Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.

fn (TextServer) shaped_text_get_grapheme_bounds #

fn (s &TextServer) shaped_text_get_grapheme_bounds(shaped RID, pos i64) Vector2

Returns composite character's bounds as offsets from the start of the line.

fn (TextServer) shaped_text_next_grapheme_pos #

fn (s &TextServer) shaped_text_next_grapheme_pos(shaped RID, pos i64) i64

Returns grapheme end position closest to the [param pos].

fn (TextServer) shaped_text_prev_grapheme_pos #

fn (s &TextServer) shaped_text_prev_grapheme_pos(shaped RID, pos i64) i64

Returns grapheme start position closest to the [param pos].

fn (TextServer) shaped_text_get_character_breaks #

fn (s &TextServer) shaped_text_get_character_breaks(shaped RID) PackedInt32Array

Returns array of the composite character boundaries.

fn (TextServer) shaped_text_next_character_pos #

fn (s &TextServer) shaped_text_next_character_pos(shaped RID, pos i64) i64

Returns composite character end position closest to the [param pos].

fn (TextServer) shaped_text_prev_character_pos #

fn (s &TextServer) shaped_text_prev_character_pos(shaped RID, pos i64) i64

Returns composite character start position closest to the [param pos].

fn (TextServer) shaped_text_closest_character_pos #

fn (s &TextServer) shaped_text_closest_character_pos(shaped RID, pos i64) i64

Returns composite character position closest to the [param pos].

fn (TextServer) shaped_text_draw #

fn (s &TextServer) shaped_text_draw(shaped RID, canvas RID, pos Vector2, cfg TextServer_shaped_text_draw_Cfg)

Draw shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. [param clip_l] and [param clip_r] are offsets relative to [param pos], going to the right in horizontal layout and downward in vertical layout. If [param clip_l] is not negative, glyphs starting before the offset are clipped. If [param clip_r] is not negative, glyphs ending after the offset are clipped.

fn (TextServer) shaped_text_draw_outline #

fn (s &TextServer) shaped_text_draw_outline(shaped RID, canvas RID, pos Vector2, cfg TextServer_shaped_text_draw_outline_Cfg)

Draw the outline of the shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. [param clip_l] and [param clip_r] are offsets relative to [param pos], going to the right in horizontal layout and downward in vertical layout. If [param clip_l] is not negative, glyphs starting before the offset are clipped. If [param clip_r] is not negative, glyphs ending after the offset are clipped.

fn (TextServer) shaped_text_get_dominant_direction_in_range #

fn (s &TextServer) shaped_text_get_dominant_direction_in_range(shaped RID, start i64, end i64) TextServerDirection

Returns dominant direction of in the range of text.

fn (TextServer) format_number #

fn (s &TextServer) format_number(number string, cfg TextServer_format_number_Cfg) string

Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language]. If [param language] is omitted, the active locale will be used.

fn (TextServer) parse_number #

fn (s &TextServer) parse_number(number string, cfg TextServer_parse_number_Cfg) string

Converts [param number] from the numeral systems used in [param language] to Western Arabic (0..9).

fn (TextServer) percent_sign #

fn (s &TextServer) percent_sign(cfg TextServer_percent_sign_Cfg) string

Returns percent sign used in the [param language].

fn (TextServer) string_get_word_breaks #

fn (s &TextServer) string_get_word_breaks(gd_string string, cfg TextServer_string_get_word_breaks_Cfg) PackedInt32Array

Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even. When [param chars_per_line] is greater than zero, line break boundaries are returned instead.

var ts = TextServerManager.get_primary_interface()
##print(ts.string_get_word_breaks('The Godot Engine, 4')) ####print(ts.string_get_word_breaks('The Godot Engine, 4', 'en', 5)) ####print(ts.string_get_word_breaks('The Godot Engine, 4', 'en', 10)) ##

fn (TextServer) string_get_character_breaks #

fn (s &TextServer) string_get_character_breaks(gd_string string, cfg TextServer_string_get_character_breaks_Cfg) PackedInt32Array

Returns array of the composite character boundaries.

var ts = TextServerManager.get_primary_interface()
print(ts.string_get_character_breaks('Test ❤️‍🔥 Test')) ##

fn (TextServer) is_confusable #

fn (s &TextServer) is_confusable(gd_string string, dict PackedStringArray) i64

Returns index of the first string in [param dict] which is visually confusable with the [param string], or -1 if none is found. [b]Note:[/b] This method doesn't detect invisible characters, for spoof detection use it in combination with [method spoof_check]. [b]Note:[/b] Always returns -1 if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.

fn (TextServer) spoof_check #

fn (s &TextServer) spoof_check(gd_string string) bool

Returns true if [param string] is likely to be an attempt at confusing the reader. [b]Note:[/b] Always returns false if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.

fn (TextServer) strip_diacritics #

fn (s &TextServer) strip_diacritics(gd_string string) string

Strips diacritics from the string. [b]Note:[/b] The result may be longer or shorter than the original.

fn (TextServer) is_valid_identifier #

fn (s &TextServer) is_valid_identifier(gd_string string) bool

Returns true if [param string] is a valid identifier. If the text server supports the [constant FEATURE_UNICODE_IDENTIFIERS] feature, a valid identifier must:- Conform to normalization form C.

  • Begin with a Unicode character of class XID_Start or "_".
  • May contain Unicode characters of class XID_Continue in the other positions.
  • Use UAX #31 recommended scripts only (mixed scripts are allowed).If the [constant FEATURE_UNICODE_IDENTIFIERS] feature is not supported, a valid identifier must:- Begin with a Unicode character of class XID_Start or "_".
  • May contain Unicode characters of class XID_Continue in the other positions.

fn (TextServer) is_valid_letter #

fn (s &TextServer) is_valid_letter(unicode i64) bool

Returns true if the given code point is a valid letter, i.e. it belongs to the Unicode category "L".

fn (TextServer) string_to_upper #

fn (s &TextServer) string_to_upper(gd_string string, cfg TextServer_string_to_upper_Cfg) string

Returns the string converted to uppercase. [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]). [b]Note:[/b] The result may be longer or shorter than the original.

fn (TextServer) string_to_lower #

fn (s &TextServer) string_to_lower(gd_string string, cfg TextServer_string_to_lower_Cfg) string

Returns the string converted to lowercase. [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]). [b]Note:[/b] The result may be longer or shorter than the original.

fn (TextServer) string_to_title #

fn (s &TextServer) string_to_title(gd_string string, cfg TextServer_string_to_title_Cfg) string

Returns the string converted to title case. [b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]). [b]Note:[/b] The result may be longer or shorter than the original.

fn (TextServer) parse_structured_text #

fn (s &TextServer) parse_structured_text(parser_type TextServerStructuredTextParser, gd_args Array, text string) Array

Default implementation of the BiDi algorithm override function.

struct TextServerAdvanced #

struct TextServerAdvanced {
	TextServerExtension
}

An advanced text server with support for BiDi, complex text layout, and contextual OpenType features. Used in Godot by default.

fn (TextServerAdvanced) to_variant #

fn (s &TextServerAdvanced) to_variant() Variant

fn (TextServerAdvanced) from_variant #

fn (mut s TextServerAdvanced) from_variant(variant &Variant)

struct TextServerDummy #

struct TextServerDummy {
	TextServerExtension
}

A dummy text server that can't render text or manage fonts.

fn (TextServerDummy) to_variant #

fn (s &TextServerDummy) to_variant() Variant

fn (TextServerDummy) from_variant #

fn (mut s TextServerDummy) from_variant(variant &Variant)

struct TextServerExtension #

struct TextServerExtension {
	TextServer
}

Base class for custom [TextServer] implementations (plugins).

fn (TextServerExtension) to_variant #

fn (s &TextServerExtension) to_variant() Variant

fn (TextServerExtension) from_variant #

fn (mut s TextServerExtension) from_variant(variant &Variant)

fn (TextServerExtension) gd_has_feature #

fn (s &TextServerExtension) gd_has_feature(feature TextServerFeature) bool

Returns true if the server supports a feature.

fn (TextServerExtension) gd_get_name #

fn (s &TextServerExtension) gd_get_name() string

Returns the name of the server interface.

fn (TextServerExtension) gd_get_features #

fn (s &TextServerExtension) gd_get_features() i64

Returns text server features, see [enum TextServer.Feature].

fn (TextServerExtension) gd_free_rid #

fn (s &TextServerExtension) gd_free_rid(rid RID)

Frees an object created by this [TextServer].

fn (TextServerExtension) gd_has #

fn (s &TextServerExtension) gd_has(rid RID) bool

Returns true if [param rid] is valid resource owned by this text server.

fn (TextServerExtension) gd_load_support_data #

fn (s &TextServerExtension) gd_load_support_data(filename string) bool

Loads optional TextServer database (e.g. ICU break iterators and dictionaries).

fn (TextServerExtension) gd_get_support_data_filename #

fn (s &TextServerExtension) gd_get_support_data_filename() string

Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.

fn (TextServerExtension) gd_get_support_data_info #

fn (s &TextServerExtension) gd_get_support_data_info() string

Returns TextServer database (e.g. ICU break iterators and dictionaries) description.

fn (TextServerExtension) gd_save_support_data #

fn (s &TextServerExtension) gd_save_support_data(filename string) bool

Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.

fn (TextServerExtension) gd_get_support_data #

fn (s &TextServerExtension) gd_get_support_data() PackedByteArray

Returns default TextServer database (e.g. ICU break iterators and dictionaries).

fn (TextServerExtension) gd_is_locale_right_to_left #

fn (s &TextServerExtension) gd_is_locale_right_to_left(locale string) bool

Returns true if locale is right-to-left.

fn (TextServerExtension) gd_name_to_tag #

fn (s &TextServerExtension) gd_name_to_tag(name string) i64

Converts readable feature, variation, script, or language name to OpenType tag.

fn (TextServerExtension) gd_tag_to_name #

fn (s &TextServerExtension) gd_tag_to_name(tag i64) string

Converts OpenType tag to readable feature, variation, script, or language name.

fn (TextServerExtension) gd_create_font #

fn (s &TextServerExtension) gd_create_font() RID

Creates a new, empty font cache entry resource.

fn (TextServerExtension) gd_create_font_linked_variation #

fn (s &TextServerExtension) gd_create_font_linked_variation(font_rid RID) RID

Optional, implement if font supports extra spacing or baseline offset. Creates a new variation existing font which is reusing the same glyph cache and font data.

fn (TextServerExtension) gd_font_set_data #

fn (s &TextServerExtension) gd_font_set_data(font_rid RID, data PackedByteArray)

Sets font source data, e.g contents of the dynamic font source file.

fn (TextServerExtension) gd_font_set_data_ptr #

fn (s &TextServerExtension) gd_font_set_data_ptr(font_rid RID, data_ptr &u8, data_size i64)

Sets pointer to the font source data, e.g contents of the dynamic font source file.

fn (TextServerExtension) gd_font_set_face_index #

fn (s &TextServerExtension) gd_font_set_face_index(font_rid RID, face_index i64)

Sets an active face index in the TrueType / OpenType collection.

fn (TextServerExtension) gd_font_get_face_index #

fn (s &TextServerExtension) gd_font_get_face_index(font_rid RID) i64

Returns an active face index in the TrueType / OpenType collection.

fn (TextServerExtension) gd_font_get_face_count #

fn (s &TextServerExtension) gd_font_get_face_count(font_rid RID) i64

Returns number of faces in the TrueType / OpenType collection.

fn (TextServerExtension) gd_font_set_style #

fn (s &TextServerExtension) gd_font_set_style(font_rid RID, style TextServerFontStyle)

Sets the font style flags.

fn (TextServerExtension) gd_font_get_style #

fn (s &TextServerExtension) gd_font_get_style(font_rid RID) TextServerFontStyle

Returns font style flags.

fn (TextServerExtension) gd_font_set_name #

fn (s &TextServerExtension) gd_font_set_name(font_rid RID, name string)

Sets the font family name.

fn (TextServerExtension) gd_font_get_name #

fn (s &TextServerExtension) gd_font_get_name(font_rid RID) string

Returns font family name.

fn (TextServerExtension) gd_font_get_ot_name_strings #

fn (s &TextServerExtension) gd_font_get_ot_name_strings(font_rid RID) Dictionary

Returns [Dictionary] with OpenType font name strings (localized font names, version, description, license information, sample text, etc.).

fn (TextServerExtension) gd_font_set_style_name #

fn (s &TextServerExtension) gd_font_set_style_name(font_rid RID, name_style string)

Sets the font style name.

fn (TextServerExtension) gd_font_get_style_name #

fn (s &TextServerExtension) gd_font_get_style_name(font_rid RID) string

Returns font style name.

fn (TextServerExtension) gd_font_set_weight #

fn (s &TextServerExtension) gd_font_set_weight(font_rid RID, weight i64)

Sets weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.

fn (TextServerExtension) gd_font_get_weight #

fn (s &TextServerExtension) gd_font_get_weight(font_rid RID) i64

Returns weight (boldness) of the font. A value in the 100...999 range, normal font weight is 400, bold font weight is 700.

fn (TextServerExtension) gd_font_set_stretch #

fn (s &TextServerExtension) gd_font_set_stretch(font_rid RID, stretch i64)

Sets font stretch amount, compared to a normal width. A percentage value between 50% and 200%.

fn (TextServerExtension) gd_font_get_stretch #

fn (s &TextServerExtension) gd_font_get_stretch(font_rid RID) i64

Returns font stretch amount, compared to a normal width. A percentage value between 50% and 200%.

fn (TextServerExtension) gd_font_set_antialiasing #

fn (s &TextServerExtension) gd_font_set_antialiasing(font_rid RID, antialiasing TextServerFontAntialiasing)

Sets font anti-aliasing mode.

fn (TextServerExtension) gd_font_get_antialiasing #

fn (s &TextServerExtension) gd_font_get_antialiasing(font_rid RID) TextServerFontAntialiasing

Returns font anti-aliasing mode.

fn (TextServerExtension) gd_font_set_disable_embedded_bitmaps #

fn (s &TextServerExtension) gd_font_set_disable_embedded_bitmaps(font_rid RID, disable_embedded_bitmaps bool)

If set to true, embedded font bitmap loading is disabled.

fn (TextServerExtension) gd_font_get_disable_embedded_bitmaps #

fn (s &TextServerExtension) gd_font_get_disable_embedded_bitmaps(font_rid RID) bool

Returns whether the font's embedded bitmap loading is disabled.

fn (TextServerExtension) gd_font_set_generate_mipmaps #

fn (s &TextServerExtension) gd_font_set_generate_mipmaps(font_rid RID, generate_mipmaps bool)

If set to true font texture mipmap generation is enabled.

fn (TextServerExtension) gd_font_get_generate_mipmaps #

fn (s &TextServerExtension) gd_font_get_generate_mipmaps(font_rid RID) bool

Returns true if font texture mipmap generation is enabled.

fn (TextServerExtension) gd_font_set_multichannel_signed_distance_field #

fn (s &TextServerExtension) gd_font_set_multichannel_signed_distance_field(font_rid RID, msdf bool)

If set to true, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.

fn (TextServerExtension) gd_font_is_multichannel_signed_distance_field #

fn (s &TextServerExtension) gd_font_is_multichannel_signed_distance_field(font_rid RID) bool

Returns true if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.

fn (TextServerExtension) gd_font_set_msdf_pixel_range #

fn (s &TextServerExtension) gd_font_set_msdf_pixel_range(font_rid RID, msdf_pixel_range i64)

Sets the width of the range around the shape between the minimum and maximum representable signed distance.

fn (TextServerExtension) gd_font_get_msdf_pixel_range #

fn (s &TextServerExtension) gd_font_get_msdf_pixel_range(font_rid RID) i64

Returns the width of the range around the shape between the minimum and maximum representable signed distance.

fn (TextServerExtension) gd_font_set_msdf_size #

fn (s &TextServerExtension) gd_font_set_msdf_size(font_rid RID, msdf_size i64)

Sets source font size used to generate MSDF textures.

fn (TextServerExtension) gd_font_get_msdf_size #

fn (s &TextServerExtension) gd_font_get_msdf_size(font_rid RID) i64

Returns source font size used to generate MSDF textures.

fn (TextServerExtension) gd_font_set_fixed_size #

fn (s &TextServerExtension) gd_font_set_fixed_size(font_rid RID, fixed_size i64)

Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.

fn (TextServerExtension) gd_font_get_fixed_size #

fn (s &TextServerExtension) gd_font_get_fixed_size(font_rid RID) i64

Returns bitmap font fixed size.

fn (TextServerExtension) gd_font_set_fixed_size_scale_mode #

fn (s &TextServerExtension) gd_font_set_fixed_size_scale_mode(font_rid RID, fixed_size_scale_mode TextServerFixedSizeScaleMode)

Sets bitmap font scaling mode. This property is used only if fixed_size is greater than zero.

fn (TextServerExtension) gd_font_get_fixed_size_scale_mode #

fn (s &TextServerExtension) gd_font_get_fixed_size_scale_mode(font_rid RID) TextServerFixedSizeScaleMode

Returns bitmap font scaling mode.

fn (TextServerExtension) gd_font_set_allow_system_fallback #

fn (s &TextServerExtension) gd_font_set_allow_system_fallback(font_rid RID, allow_system_fallback bool)

If set to true, system fonts can be automatically used as fallbacks.

fn (TextServerExtension) gd_font_is_allow_system_fallback #

fn (s &TextServerExtension) gd_font_is_allow_system_fallback(font_rid RID) bool

Returns true if system fonts can be automatically used as fallbacks.

fn (TextServerExtension) gd_font_clear_system_fallback_cache #

fn (s &TextServerExtension) gd_font_clear_system_fallback_cache()

Frees all automatically loaded system fonts.

fn (TextServerExtension) gd_font_set_force_autohinter #

fn (s &TextServerExtension) gd_font_set_force_autohinter(font_rid RID, force_autohinter bool)

If set to true auto-hinting is preferred over font built-in hinting.

fn (TextServerExtension) gd_font_is_force_autohinter #

fn (s &TextServerExtension) gd_font_is_force_autohinter(font_rid RID) bool

Returns true if auto-hinting is supported and preferred over font built-in hinting.

fn (TextServerExtension) gd_font_set_modulate_color_glyphs #

fn (s &TextServerExtension) gd_font_set_modulate_color_glyphs(font_rid RID, modulate bool)

If set to true, color modulation is applied when drawing colored glyphs, otherwise it's applied to the monochrome glyphs only.

fn (TextServerExtension) gd_font_is_modulate_color_glyphs #

fn (s &TextServerExtension) gd_font_is_modulate_color_glyphs(font_rid RID) bool

Returns true, if color modulation is applied when drawing colored glyphs.

fn (TextServerExtension) gd_font_set_hinting #

fn (s &TextServerExtension) gd_font_set_hinting(font_rid RID, hinting TextServerHinting)

Sets font hinting mode. Used by dynamic fonts only.

fn (TextServerExtension) gd_font_get_hinting #

fn (s &TextServerExtension) gd_font_get_hinting(font_rid RID) TextServerHinting

Returns the font hinting mode. Used by dynamic fonts only.

fn (TextServerExtension) gd_font_set_subpixel_positioning #

fn (s &TextServerExtension) gd_font_set_subpixel_positioning(font_rid RID, subpixel_positioning TextServerSubpixelPositioning)

Sets font subpixel glyph positioning mode.

fn (TextServerExtension) gd_font_get_subpixel_positioning #

fn (s &TextServerExtension) gd_font_get_subpixel_positioning(font_rid RID) TextServerSubpixelPositioning

Returns font subpixel glyph positioning mode.

fn (TextServerExtension) gd_font_set_keep_rounding_remainders #

fn (s &TextServerExtension) gd_font_set_keep_rounding_remainders(font_rid RID, keep_rounding_remainders bool)

Sets glyph position rounding behavior. If set to true, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.

fn (TextServerExtension) gd_font_get_keep_rounding_remainders #

fn (s &TextServerExtension) gd_font_get_keep_rounding_remainders(font_rid RID) bool

Returns glyph position rounding behavior. If set to true, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled.

fn (TextServerExtension) gd_font_set_embolden #

fn (s &TextServerExtension) gd_font_set_embolden(font_rid RID, strength f64)

Sets font embolden strength. If [param strength] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.

fn (TextServerExtension) gd_font_get_embolden #

fn (s &TextServerExtension) gd_font_get_embolden(font_rid RID) f64

Returns font embolden strength.

fn (TextServerExtension) gd_font_set_spacing #

fn (s &TextServerExtension) gd_font_set_spacing(font_rid RID, spacing TextServerSpacingType, value i64)

Sets the spacing for [param spacing] to [param value] in pixels (not relative to the font size).

fn (TextServerExtension) gd_font_get_spacing #

fn (s &TextServerExtension) gd_font_get_spacing(font_rid RID, spacing TextServerSpacingType) i64

Returns the spacing for [param spacing] in pixels (not relative to the font size).

fn (TextServerExtension) gd_font_set_baseline_offset #

fn (s &TextServerExtension) gd_font_set_baseline_offset(font_rid RID, baseline_offset f64)

Sets extra baseline offset (as a fraction of font height).

fn (TextServerExtension) gd_font_get_baseline_offset #

fn (s &TextServerExtension) gd_font_get_baseline_offset(font_rid RID) f64

Returns extra baseline offset (as a fraction of font height).

fn (TextServerExtension) gd_font_set_transform #

fn (s &TextServerExtension) gd_font_set_transform(font_rid RID, transform Transform2D)

Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs.

fn (TextServerExtension) gd_font_get_transform #

fn (s &TextServerExtension) gd_font_get_transform(font_rid RID) Transform2D

Returns 2D transform applied to the font outlines.

fn (TextServerExtension) gd_font_set_variation_coordinates #

fn (s &TextServerExtension) gd_font_set_variation_coordinates(font_rid RID, variation_coordinates Dictionary)

Sets variation coordinates for the specified font cache entry.

fn (TextServerExtension) gd_font_get_variation_coordinates #

fn (s &TextServerExtension) gd_font_get_variation_coordinates(font_rid RID) Dictionary

Returns variation coordinates for the specified font cache entry.

fn (TextServerExtension) gd_font_set_oversampling #

fn (s &TextServerExtension) gd_font_set_oversampling(font_rid RID, oversampling f64)

Sets font oversampling factor, if set to 0.0 global oversampling factor is used instead. Used by dynamic fonts only.

fn (TextServerExtension) gd_font_get_oversampling #

fn (s &TextServerExtension) gd_font_get_oversampling(font_rid RID) f64

Returns font oversampling factor, if set to 0.0 global oversampling factor is used instead. Used by dynamic fonts only.

fn (TextServerExtension) gd_font_get_size_cache_list #

fn (s &TextServerExtension) gd_font_get_size_cache_list(font_rid RID) Array

Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size.

fn (TextServerExtension) gd_font_clear_size_cache #

fn (s &TextServerExtension) gd_font_clear_size_cache(font_rid RID)

Removes all font sizes from the cache entry.

fn (TextServerExtension) gd_font_remove_size_cache #

fn (s &TextServerExtension) gd_font_remove_size_cache(font_rid RID, size Vector2i)

Removes specified font size from the cache entry.

fn (TextServerExtension) gd_font_get_size_cache_info #

fn (s &TextServerExtension) gd_font_get_size_cache_info(font_rid RID) Array

Returns font cache information, each entry contains the following fields: Vector2i size_px - font size in pixels, float viewport_oversampling - viewport oversampling factor, int glyphs - number of rendered glyphs, int textures - number of used textures, int textures_size - size of texture data in bytes.

fn (TextServerExtension) gd_font_set_ascent #

fn (s &TextServerExtension) gd_font_set_ascent(font_rid RID, size i64, ascent f64)

Sets the font ascent (number of pixels above the baseline).

fn (TextServerExtension) gd_font_get_ascent #

fn (s &TextServerExtension) gd_font_get_ascent(font_rid RID, size i64) f64

Returns the font ascent (number of pixels above the baseline).

fn (TextServerExtension) gd_font_set_descent #

fn (s &TextServerExtension) gd_font_set_descent(font_rid RID, size i64, descent f64)

Sets the font descent (number of pixels below the baseline).

fn (TextServerExtension) gd_font_get_descent #

fn (s &TextServerExtension) gd_font_get_descent(font_rid RID, size i64) f64

Returns the font descent (number of pixels below the baseline).

fn (TextServerExtension) gd_font_set_underline_position #

fn (s &TextServerExtension) gd_font_set_underline_position(font_rid RID, size i64, underline_position f64)

Sets pixel offset of the underline below the baseline.

fn (TextServerExtension) gd_font_get_underline_position #

fn (s &TextServerExtension) gd_font_get_underline_position(font_rid RID, size i64) f64

Returns pixel offset of the underline below the baseline.

fn (TextServerExtension) gd_font_set_underline_thickness #

fn (s &TextServerExtension) gd_font_set_underline_thickness(font_rid RID, size i64, underline_thickness f64)

Sets thickness of the underline in pixels.

fn (TextServerExtension) gd_font_get_underline_thickness #

fn (s &TextServerExtension) gd_font_get_underline_thickness(font_rid RID, size i64) f64

Returns thickness of the underline in pixels.

fn (TextServerExtension) gd_font_set_scale #

fn (s &TextServerExtension) gd_font_set_scale(font_rid RID, size i64, scale f64)

Sets scaling factor of the color bitmap font.

fn (TextServerExtension) gd_font_get_scale #

fn (s &TextServerExtension) gd_font_get_scale(font_rid RID, size i64) f64

Returns scaling factor of the color bitmap font.

fn (TextServerExtension) gd_font_get_texture_count #

fn (s &TextServerExtension) gd_font_get_texture_count(font_rid RID, size Vector2i) i64

Returns number of textures used by font cache entry.

fn (TextServerExtension) gd_font_clear_textures #

fn (s &TextServerExtension) gd_font_clear_textures(font_rid RID, size Vector2i)

Removes all textures from font cache entry.

fn (TextServerExtension) gd_font_remove_texture #

fn (s &TextServerExtension) gd_font_remove_texture(font_rid RID, size Vector2i, texture_index i64)

Removes specified texture from the cache entry.

fn (TextServerExtension) gd_font_set_texture_image #

fn (s &TextServerExtension) gd_font_set_texture_image(font_rid RID, size Vector2i, texture_index i64, image Image)

Sets font cache texture image data.

fn (TextServerExtension) gd_font_get_texture_image #

fn (s &TextServerExtension) gd_font_get_texture_image(font_rid RID, size Vector2i, texture_index i64) Image

Returns font cache texture image data.

fn (TextServerExtension) gd_font_set_texture_offsets #

fn (s &TextServerExtension) gd_font_set_texture_offsets(font_rid RID, size Vector2i, texture_index i64, offset PackedInt32Array)

Sets array containing glyph packing data.

fn (TextServerExtension) gd_font_get_texture_offsets #

fn (s &TextServerExtension) gd_font_get_texture_offsets(font_rid RID, size Vector2i, texture_index i64) PackedInt32Array

Returns array containing glyph packing data.

fn (TextServerExtension) gd_font_get_glyph_list #

fn (s &TextServerExtension) gd_font_get_glyph_list(font_rid RID, size Vector2i) PackedInt32Array

Returns list of rendered glyphs in the cache entry.

fn (TextServerExtension) gd_font_clear_glyphs #

fn (s &TextServerExtension) gd_font_clear_glyphs(font_rid RID, size Vector2i)

Removes all rendered glyph information from the cache entry.

fn (TextServerExtension) gd_font_remove_glyph #

fn (s &TextServerExtension) gd_font_remove_glyph(font_rid RID, size Vector2i, glyph i64)

Removes specified rendered glyph information from the cache entry.

fn (TextServerExtension) gd_font_get_glyph_advance #

fn (s &TextServerExtension) gd_font_get_glyph_advance(font_rid RID, size i64, glyph i64) Vector2

Returns glyph advance (offset of the next glyph).

fn (TextServerExtension) gd_font_set_glyph_advance #

fn (s &TextServerExtension) gd_font_set_glyph_advance(font_rid RID, size i64, glyph i64, advance Vector2)

Sets glyph advance (offset of the next glyph).

fn (TextServerExtension) gd_font_get_glyph_offset #

fn (s &TextServerExtension) gd_font_get_glyph_offset(font_rid RID, size Vector2i, glyph i64) Vector2

Returns glyph offset from the baseline.

fn (TextServerExtension) gd_font_set_glyph_offset #

fn (s &TextServerExtension) gd_font_set_glyph_offset(font_rid RID, size Vector2i, glyph i64, offset Vector2)

Sets glyph offset from the baseline.

fn (TextServerExtension) gd_font_get_glyph_size #

fn (s &TextServerExtension) gd_font_get_glyph_size(font_rid RID, size Vector2i, glyph i64) Vector2

Returns size of the glyph.

fn (TextServerExtension) gd_font_set_glyph_size #

fn (s &TextServerExtension) gd_font_set_glyph_size(font_rid RID, size Vector2i, glyph i64, gl_size Vector2)

Sets size of the glyph.

fn (TextServerExtension) gd_font_get_glyph_uv_rect #

fn (s &TextServerExtension) gd_font_get_glyph_uv_rect(font_rid RID, size Vector2i, glyph i64) Rect2

Returns rectangle in the cache texture containing the glyph.

fn (TextServerExtension) gd_font_set_glyph_uv_rect #

fn (s &TextServerExtension) gd_font_set_glyph_uv_rect(font_rid RID, size Vector2i, glyph i64, uv_rect Rect2)

Sets rectangle in the cache texture containing the glyph.

fn (TextServerExtension) gd_font_get_glyph_texture_idx #

fn (s &TextServerExtension) gd_font_get_glyph_texture_idx(font_rid RID, size Vector2i, glyph i64) i64

Returns index of the cache texture containing the glyph.

fn (TextServerExtension) gd_font_set_glyph_texture_idx #

fn (s &TextServerExtension) gd_font_set_glyph_texture_idx(font_rid RID, size Vector2i, glyph i64, texture_idx i64)

Sets index of the cache texture containing the glyph.

fn (TextServerExtension) gd_font_get_glyph_texture_rid #

fn (s &TextServerExtension) gd_font_get_glyph_texture_rid(font_rid RID, size Vector2i, glyph i64) RID

Returns resource ID of the cache texture containing the glyph.

fn (TextServerExtension) gd_font_get_glyph_texture_size #

fn (s &TextServerExtension) gd_font_get_glyph_texture_size(font_rid RID, size Vector2i, glyph i64) Vector2

Returns size of the cache texture containing the glyph.

fn (TextServerExtension) gd_font_get_glyph_contours #

fn (s &TextServerExtension) gd_font_get_glyph_contours(font_rid RID, size i64, index i64) Dictionary

Returns outline contours of the glyph.

fn (TextServerExtension) gd_font_get_kerning_list #

fn (s &TextServerExtension) gd_font_get_kerning_list(font_rid RID, size i64) Array

Returns list of the kerning overrides.

fn (TextServerExtension) gd_font_clear_kerning_map #

fn (s &TextServerExtension) gd_font_clear_kerning_map(font_rid RID, size i64)

Removes all kerning overrides.

fn (TextServerExtension) gd_font_remove_kerning #

fn (s &TextServerExtension) gd_font_remove_kerning(font_rid RID, size i64, glyph_pair Vector2i)

Removes kerning override for the pair of glyphs.

fn (TextServerExtension) gd_font_set_kerning #

fn (s &TextServerExtension) gd_font_set_kerning(font_rid RID, size i64, glyph_pair Vector2i, kerning Vector2)

Sets kerning for the pair of glyphs.

fn (TextServerExtension) gd_font_get_kerning #

fn (s &TextServerExtension) gd_font_get_kerning(font_rid RID, size i64, glyph_pair Vector2i) Vector2

Returns kerning for the pair of glyphs.

fn (TextServerExtension) gd_font_get_glyph_index #

fn (s &TextServerExtension) gd_font_get_glyph_index(font_rid RID, size i64, gd_char i64, variation_selector i64) i64

Returns the glyph index of a [param char], optionally modified by the [param variation_selector].

fn (TextServerExtension) gd_font_get_char_from_glyph_index #

fn (s &TextServerExtension) gd_font_get_char_from_glyph_index(font_rid RID, size i64, glyph_index i64) i64

Returns character code associated with [param glyph_index], or 0 if [param glyph_index] is invalid.

fn (TextServerExtension) gd_font_has_char #

fn (s &TextServerExtension) gd_font_has_char(font_rid RID, gd_char i64) bool

Returns true if a Unicode [param char] is available in the font.

fn (TextServerExtension) gd_font_get_supported_chars #

fn (s &TextServerExtension) gd_font_get_supported_chars(font_rid RID) string

Returns a string containing all the characters available in the font.

fn (TextServerExtension) gd_font_get_supported_glyphs #

fn (s &TextServerExtension) gd_font_get_supported_glyphs(font_rid RID) PackedInt32Array

Returns an array containing all glyph indices in the font.

fn (TextServerExtension) gd_font_render_range #

fn (s &TextServerExtension) gd_font_render_range(font_rid RID, size Vector2i, start i64, end i64)

Renders the range of characters to the font cache texture.

fn (TextServerExtension) gd_font_render_glyph #

fn (s &TextServerExtension) gd_font_render_glyph(font_rid RID, size Vector2i, index i64)

Renders specified glyph to the font cache texture.

fn (TextServerExtension) gd_font_draw_glyph #

fn (s &TextServerExtension) gd_font_draw_glyph(font_rid RID, canvas RID, size i64, pos Vector2, index i64, color Color, oversampling f64)

Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size]. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextServerExtension) gd_font_draw_glyph_outline #

fn (s &TextServerExtension) gd_font_draw_glyph_outline(font_rid RID, canvas RID, size i64, outline_size i64, pos Vector2, index i64, color Color, oversampling f64)

Draws single glyph outline of size [param outline_size] into a canvas item at the position, using [param font_rid] at the size [param size]. If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextServerExtension) gd_font_is_language_supported #

fn (s &TextServerExtension) gd_font_is_language_supported(font_rid RID, language string) bool

Returns true, if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).

fn (TextServerExtension) gd_font_set_language_support_override #

fn (s &TextServerExtension) gd_font_set_language_support_override(font_rid RID, language string, supported bool)

Adds override for [method _font_is_language_supported].

fn (TextServerExtension) gd_font_get_language_support_override #

fn (s &TextServerExtension) gd_font_get_language_support_override(font_rid RID, language string) bool

Returns true if support override is enabled for the [param language].

fn (TextServerExtension) gd_font_remove_language_support_override #

fn (s &TextServerExtension) gd_font_remove_language_support_override(font_rid RID, language string)

Remove language support override.

fn (TextServerExtension) gd_font_get_language_support_overrides #

fn (s &TextServerExtension) gd_font_get_language_support_overrides(font_rid RID) PackedStringArray

Returns list of language support overrides.

fn (TextServerExtension) gd_font_is_script_supported #

fn (s &TextServerExtension) gd_font_is_script_supported(font_rid RID, script string) bool

Returns true, if font supports given script (ISO 15924 code).

fn (TextServerExtension) gd_font_set_script_support_override #

fn (s &TextServerExtension) gd_font_set_script_support_override(font_rid RID, script string, supported bool)

Adds override for [method _font_is_script_supported].

fn (TextServerExtension) gd_font_get_script_support_override #

fn (s &TextServerExtension) gd_font_get_script_support_override(font_rid RID, script string) bool

Returns true if support override is enabled for the [param script].

fn (TextServerExtension) gd_font_remove_script_support_override #

fn (s &TextServerExtension) gd_font_remove_script_support_override(font_rid RID, script string)

Removes script support override.

fn (TextServerExtension) gd_font_get_script_support_overrides #

fn (s &TextServerExtension) gd_font_get_script_support_overrides(font_rid RID) PackedStringArray

Returns list of script support overrides.

fn (TextServerExtension) gd_font_set_opentype_feature_overrides #

fn (s &TextServerExtension) gd_font_set_opentype_feature_overrides(font_rid RID, overrides Dictionary)

Sets font OpenType feature set override.

fn (TextServerExtension) gd_font_get_opentype_feature_overrides #

fn (s &TextServerExtension) gd_font_get_opentype_feature_overrides(font_rid RID) Dictionary

Returns font OpenType feature set override.

fn (TextServerExtension) gd_font_supported_feature_list #

fn (s &TextServerExtension) gd_font_supported_feature_list(font_rid RID) Dictionary

Returns the dictionary of the supported OpenType features.

fn (TextServerExtension) gd_font_supported_variation_list #

fn (s &TextServerExtension) gd_font_supported_variation_list(font_rid RID) Dictionary

Returns the dictionary of the supported OpenType variation coordinates.

fn (TextServerExtension) gd_font_get_global_oversampling #

fn (s &TextServerExtension) gd_font_get_global_oversampling() f64

Returns the font oversampling factor, shared by all fonts in the TextServer.

fn (TextServerExtension) gd_font_set_global_oversampling #

fn (s &TextServerExtension) gd_font_set_global_oversampling(oversampling f64)

Sets oversampling factor, shared by all font in the TextServer.

fn (TextServerExtension) gd_reference_oversampling_level #

fn (s &TextServerExtension) gd_reference_oversampling_level(oversampling f64)

Increases the reference count of the specified oversampling level. This method is called by [Viewport], and should not be used directly.

fn (TextServerExtension) gd_unreference_oversampling_level #

fn (s &TextServerExtension) gd_unreference_oversampling_level(oversampling f64)

Decreases the reference count of the specified oversampling level, and frees the font cache for oversampling level when the reference count reaches zero. This method is called by [Viewport], and should not be used directly.

fn (TextServerExtension) gd_get_hex_code_box_size #

fn (s &TextServerExtension) gd_get_hex_code_box_size(size i64, index i64) Vector2

Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).

fn (TextServerExtension) gd_draw_hex_code_box #

fn (s &TextServerExtension) gd_draw_hex_code_box(canvas RID, size i64, pos Vector2, index i64, color Color)

Draws box displaying character hexadecimal code.

fn (TextServerExtension) gd_create_shaped_text #

fn (s &TextServerExtension) gd_create_shaped_text(direction TextServerDirection, orientation TextServerOrientation) RID

Creates a new buffer for complex text layout, with the given [param direction] and [param orientation].

fn (TextServerExtension) gd_shaped_text_clear #

fn (s &TextServerExtension) gd_shaped_text_clear(shaped RID)

Clears text buffer (removes text and inline objects).

fn (TextServerExtension) gd_shaped_text_set_direction #

fn (s &TextServerExtension) gd_shaped_text_set_direction(shaped RID, direction TextServerDirection)

Sets desired text direction. If set to [constant TextServer.DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale.

fn (TextServerExtension) gd_shaped_text_get_direction #

fn (s &TextServerExtension) gd_shaped_text_get_direction(shaped RID) TextServerDirection

Returns direction of the text.

fn (TextServerExtension) gd_shaped_text_get_inferred_direction #

fn (s &TextServerExtension) gd_shaped_text_get_inferred_direction(shaped RID) TextServerDirection

Returns direction of the text, inferred by the BiDi algorithm.

fn (TextServerExtension) gd_shaped_text_set_bidi_override #

fn (s &TextServerExtension) gd_shaped_text_set_bidi_override(shaped RID, override Array)

Overrides BiDi for the structured text.

fn (TextServerExtension) gd_shaped_text_set_custom_punctuation #

fn (s &TextServerExtension) gd_shaped_text_set_custom_punctuation(shaped RID, punct string)

Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.

fn (TextServerExtension) gd_shaped_text_get_custom_punctuation #

fn (s &TextServerExtension) gd_shaped_text_get_custom_punctuation(shaped RID) string

Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.

fn (TextServerExtension) gd_shaped_text_set_custom_ellipsis #

fn (s &TextServerExtension) gd_shaped_text_set_custom_ellipsis(shaped RID, gd_char i64)

Sets ellipsis character used for text clipping.

fn (TextServerExtension) gd_shaped_text_get_custom_ellipsis #

fn (s &TextServerExtension) gd_shaped_text_get_custom_ellipsis(shaped RID) i64

Returns ellipsis character used for text clipping.

fn (TextServerExtension) gd_shaped_text_set_orientation #

fn (s &TextServerExtension) gd_shaped_text_set_orientation(shaped RID, orientation TextServerOrientation)

Sets desired text orientation.

fn (TextServerExtension) gd_shaped_text_get_orientation #

fn (s &TextServerExtension) gd_shaped_text_get_orientation(shaped RID) TextServerOrientation

Returns text orientation.

fn (TextServerExtension) gd_shaped_text_set_preserve_invalid #

fn (s &TextServerExtension) gd_shaped_text_set_preserve_invalid(shaped RID, enabled bool)

If set to true text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.

fn (TextServerExtension) gd_shaped_text_get_preserve_invalid #

fn (s &TextServerExtension) gd_shaped_text_get_preserve_invalid(shaped RID) bool

Returns true if text buffer is configured to display hexadecimal codes in place of invalid characters.

fn (TextServerExtension) gd_shaped_text_set_preserve_control #

fn (s &TextServerExtension) gd_shaped_text_set_preserve_control(shaped RID, enabled bool)

If set to true text buffer will display control characters.

fn (TextServerExtension) gd_shaped_text_get_preserve_control #

fn (s &TextServerExtension) gd_shaped_text_get_preserve_control(shaped RID) bool

Returns true if text buffer is configured to display control characters.

fn (TextServerExtension) gd_shaped_text_set_spacing #

fn (s &TextServerExtension) gd_shaped_text_set_spacing(shaped RID, spacing TextServerSpacingType, value i64)

Sets extra spacing added between glyphs or lines in pixels.

fn (TextServerExtension) gd_shaped_text_get_spacing #

fn (s &TextServerExtension) gd_shaped_text_get_spacing(shaped RID, spacing TextServerSpacingType) i64

Returns extra spacing added between glyphs or lines in pixels.

fn (TextServerExtension) gd_shaped_text_add_string #

fn (s &TextServerExtension) gd_shaped_text_add_string(shaped RID, text string, fonts Array, size i64, opentype_features Dictionary, language string, meta_ ToVariant) bool

Adds text span and font to draw it to the text buffer.

fn (TextServerExtension) gd_shaped_text_add_object #

fn (s &TextServerExtension) gd_shaped_text_add_object(shaped RID, key_ ToVariant, size Vector2, inline_align InlineAlignment, length i64, baseline f64) bool

Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.

fn (TextServerExtension) gd_shaped_text_resize_object #

fn (s &TextServerExtension) gd_shaped_text_resize_object(shaped RID, key_ ToVariant, size Vector2, inline_align InlineAlignment, baseline f64) bool

Sets new size and alignment of embedded object.

fn (TextServerExtension) gd_shaped_get_text #

fn (s &TextServerExtension) gd_shaped_get_text(shaped RID) string

Returns the text buffer source text, including object replacement characters.

fn (TextServerExtension) gd_shaped_get_span_count #

fn (s &TextServerExtension) gd_shaped_get_span_count(shaped RID) i64

Returns number of text spans added using [method _shaped_text_add_string] or [method _shaped_text_add_object].

fn (TextServerExtension) gd_shaped_get_span_meta #

fn (s &TextServerExtension) gd_shaped_get_span_meta(shaped RID, index i64) Variant

Returns text span metadata.

fn (TextServerExtension) gd_shaped_get_span_embedded_object #

fn (s &TextServerExtension) gd_shaped_get_span_embedded_object(shaped RID, index i64) Variant

Returns text embedded object key.

fn (TextServerExtension) gd_shaped_get_span_text #

fn (s &TextServerExtension) gd_shaped_get_span_text(shaped RID, index i64) string

Returns the text span source text.

fn (TextServerExtension) gd_shaped_get_span_object #

fn (s &TextServerExtension) gd_shaped_get_span_object(shaped RID, index i64) Variant

Returns the text span embedded object key.

fn (TextServerExtension) gd_shaped_set_span_update_font #

fn (s &TextServerExtension) gd_shaped_set_span_update_font(shaped RID, index i64, fonts Array, size i64, opentype_features Dictionary)

Changes text span font, font size, and OpenType features, without changing the text.

fn (TextServerExtension) gd_shaped_get_run_count #

fn (s &TextServerExtension) gd_shaped_get_run_count(shaped RID) i64

Returns the number of uniform text runs in the buffer.

fn (TextServerExtension) gd_shaped_get_run_text #

fn (s &TextServerExtension) gd_shaped_get_run_text(shaped RID, index i64) string

Returns the source text of the [param index] text run (in visual order).

fn (TextServerExtension) gd_shaped_get_run_range #

fn (s &TextServerExtension) gd_shaped_get_run_range(shaped RID, index i64) Vector2i

Returns the source text range of the [param index] text run (in visual order).

fn (TextServerExtension) gd_shaped_get_run_font_rid #

fn (s &TextServerExtension) gd_shaped_get_run_font_rid(shaped RID, index i64) RID

Returns the font RID of the [param index] text run (in visual order).

fn (TextServerExtension) gd_shaped_get_run_font_size #

fn (s &TextServerExtension) gd_shaped_get_run_font_size(shaped RID, index i64) i64

Returns the font size of the [param index] text run (in visual order).

fn (TextServerExtension) gd_shaped_get_run_language #

fn (s &TextServerExtension) gd_shaped_get_run_language(shaped RID, index i64) string

Returns the language of the [param index] text run (in visual order).

fn (TextServerExtension) gd_shaped_get_run_direction #

fn (s &TextServerExtension) gd_shaped_get_run_direction(shaped RID, index i64) TextServerDirection

Returns the direction of the [param index] text run (in visual order).

fn (TextServerExtension) gd_shaped_get_run_object #

fn (s &TextServerExtension) gd_shaped_get_run_object(shaped RID, index i64) Variant

Returns the embedded object of the [param index] text run (in visual order).

fn (TextServerExtension) gd_shaped_text_substr #

fn (s &TextServerExtension) gd_shaped_text_substr(shaped RID, start i64, length i64) RID

Returns text buffer for the substring of the text in the [param shaped] text buffer (including inline objects).

fn (TextServerExtension) gd_shaped_text_get_parent #

fn (s &TextServerExtension) gd_shaped_text_get_parent(shaped RID) RID

Returns the parent buffer from which the substring originates.

fn (TextServerExtension) gd_shaped_text_fit_to_width #

fn (s &TextServerExtension) gd_shaped_text_fit_to_width(shaped RID, width f64, justification_flags TextServerJustificationFlag) f64

Adjusts text width to fit to specified width, returns new text width.

fn (TextServerExtension) gd_shaped_text_tab_align #

fn (s &TextServerExtension) gd_shaped_text_tab_align(shaped RID, tab_stops PackedFloat32Array) f64

Aligns shaped text to the given tab-stops.

fn (TextServerExtension) gd_shaped_text_shape #

fn (s &TextServerExtension) gd_shaped_text_shape(shaped RID) bool

Shapes buffer if it's not shaped. Returns true if the string is shaped successfully.

fn (TextServerExtension) gd_shaped_text_update_breaks #

fn (s &TextServerExtension) gd_shaped_text_update_breaks(shaped RID) bool

Updates break points in the shaped text. This method is called by default implementation of text breaking functions.

fn (TextServerExtension) gd_shaped_text_update_justification_ops #

fn (s &TextServerExtension) gd_shaped_text_update_justification_ops(shaped RID) bool

Updates justification points in the shaped text. This method is called by default implementation of text justification functions.

fn (TextServerExtension) gd_shaped_text_is_ready #

fn (s &TextServerExtension) gd_shaped_text_is_ready(shaped RID) bool

Returns true if buffer is successfully shaped.

fn (TextServerExtension) gd_shaped_text_get_glyphs #

fn (s &TextServerExtension) gd_shaped_text_get_glyphs(shaped RID) &Glyph

Returns an array of glyphs in the visual order.

fn (TextServerExtension) gd_shaped_text_sort_logical #

fn (s &TextServerExtension) gd_shaped_text_sort_logical(shaped RID) &Glyph

Returns text glyphs in the logical order.

fn (TextServerExtension) gd_shaped_text_get_glyph_count #

fn (s &TextServerExtension) gd_shaped_text_get_glyph_count(shaped RID) i64

Returns number of glyphs in the buffer.

fn (TextServerExtension) gd_shaped_text_get_range #

fn (s &TextServerExtension) gd_shaped_text_get_range(shaped RID) Vector2i

Returns substring buffer character range in the parent buffer.

fn (TextServerExtension) gd_shaped_text_get_line_breaks_adv #

fn (s &TextServerExtension) gd_shaped_text_get_line_breaks_adv(shaped RID, width PackedFloat32Array, start i64, once bool, break_flags TextServerLineBreakFlag) PackedInt32Array

Breaks text to the lines and columns. Returns character ranges for each segment.

fn (TextServerExtension) gd_shaped_text_get_line_breaks #

fn (s &TextServerExtension) gd_shaped_text_get_line_breaks(shaped RID, width f64, start i64, break_flags TextServerLineBreakFlag) PackedInt32Array

Breaks text to the lines and returns character ranges for each line.

fn (TextServerExtension) gd_shaped_text_get_word_breaks #

fn (s &TextServerExtension) gd_shaped_text_get_word_breaks(shaped RID, grapheme_flags TextServerGraphemeFlag, skip_grapheme_flags TextServerGraphemeFlag) PackedInt32Array

Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking.

fn (TextServerExtension) gd_shaped_text_get_trim_pos #

fn (s &TextServerExtension) gd_shaped_text_get_trim_pos(shaped RID) i64

Returns the position of the overrun trim.

fn (TextServerExtension) gd_shaped_text_get_ellipsis_pos #

fn (s &TextServerExtension) gd_shaped_text_get_ellipsis_pos(shaped RID) i64

Returns position of the ellipsis.

fn (TextServerExtension) gd_shaped_text_get_ellipsis_glyph_count #

fn (s &TextServerExtension) gd_shaped_text_get_ellipsis_glyph_count(shaped RID) i64

Returns number of glyphs in the ellipsis.

fn (TextServerExtension) gd_shaped_text_get_ellipsis_glyphs #

fn (s &TextServerExtension) gd_shaped_text_get_ellipsis_glyphs(shaped RID) &Glyph

Returns array of the glyphs in the ellipsis.

fn (TextServerExtension) gd_shaped_text_overrun_trim_to_width #

fn (s &TextServerExtension) gd_shaped_text_overrun_trim_to_width(shaped RID, width f64, trim_flags TextServerTextOverrunFlag)

Trims text if it exceeds the given width.

fn (TextServerExtension) gd_shaped_text_get_objects #

fn (s &TextServerExtension) gd_shaped_text_get_objects(shaped RID) Array

Returns array of inline objects.

fn (TextServerExtension) gd_shaped_text_get_object_rect #

fn (s &TextServerExtension) gd_shaped_text_get_object_rect(shaped RID, key_ ToVariant) Rect2

Returns bounding rectangle of the inline object.

fn (TextServerExtension) gd_shaped_text_get_object_range #

fn (s &TextServerExtension) gd_shaped_text_get_object_range(shaped RID, key_ ToVariant) Vector2i

Returns the character range of the inline object.

fn (TextServerExtension) gd_shaped_text_get_object_glyph #

fn (s &TextServerExtension) gd_shaped_text_get_object_glyph(shaped RID, key_ ToVariant) i64

Returns the glyph index of the inline object.

fn (TextServerExtension) gd_shaped_text_get_size #

fn (s &TextServerExtension) gd_shaped_text_get_size(shaped RID) Vector2

Returns size of the text.

fn (TextServerExtension) gd_shaped_text_get_ascent #

fn (s &TextServerExtension) gd_shaped_text_get_ascent(shaped RID) f64

Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).

fn (TextServerExtension) gd_shaped_text_get_descent #

fn (s &TextServerExtension) gd_shaped_text_get_descent(shaped RID) f64

Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).

fn (TextServerExtension) gd_shaped_text_get_width #

fn (s &TextServerExtension) gd_shaped_text_get_width(shaped RID) f64

Returns width (for horizontal layout) or height (for vertical) of the text.

fn (TextServerExtension) gd_shaped_text_get_underline_position #

fn (s &TextServerExtension) gd_shaped_text_get_underline_position(shaped RID) f64

Returns pixel offset of the underline below the baseline.

fn (TextServerExtension) gd_shaped_text_get_underline_thickness #

fn (s &TextServerExtension) gd_shaped_text_get_underline_thickness(shaped RID) f64

Returns thickness of the underline.

fn (TextServerExtension) gd_shaped_text_get_dominant_direction_in_range #

fn (s &TextServerExtension) gd_shaped_text_get_dominant_direction_in_range(shaped RID, start i64, end i64) i64

Returns dominant direction of in the range of text.

fn (TextServerExtension) gd_shaped_text_get_carets #

fn (s &TextServerExtension) gd_shaped_text_get_carets(shaped RID, position i64, caret &CaretInfo)

Returns shapes of the carets corresponding to the character offset [param position] in the text. Returned caret shape is 1 pixel wide rectangle.

fn (TextServerExtension) gd_shaped_text_get_selection #

fn (s &TextServerExtension) gd_shaped_text_get_selection(shaped RID, start i64, end i64) PackedVector2Array

Returns selection rectangles for the specified character range.

fn (TextServerExtension) gd_shaped_text_hit_test_grapheme #

fn (s &TextServerExtension) gd_shaped_text_hit_test_grapheme(shaped RID, coord f64) i64

Returns grapheme index at the specified pixel offset at the baseline, or -1 if none is found.

fn (TextServerExtension) gd_shaped_text_hit_test_position #

fn (s &TextServerExtension) gd_shaped_text_hit_test_position(shaped RID, coord f64) i64

Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.

fn (TextServerExtension) gd_shaped_text_draw #

fn (s &TextServerExtension) gd_shaped_text_draw(shaped RID, canvas RID, pos Vector2, clip_l f64, clip_r f64, color Color, oversampling f64)

Draw shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextServerExtension) gd_shaped_text_draw_outline #

fn (s &TextServerExtension) gd_shaped_text_draw_outline(shaped RID, canvas RID, pos Vector2, clip_l f64, clip_r f64, outline_size i64, color Color, oversampling f64)

Draw the outline of the shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). If [param oversampling] is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used.

fn (TextServerExtension) gd_shaped_text_get_grapheme_bounds #

fn (s &TextServerExtension) gd_shaped_text_get_grapheme_bounds(shaped RID, pos i64) Vector2

Returns composite character's bounds as offsets from the start of the line.

fn (TextServerExtension) gd_shaped_text_next_grapheme_pos #

fn (s &TextServerExtension) gd_shaped_text_next_grapheme_pos(shaped RID, pos i64) i64

Returns grapheme end position closest to the [param pos].

fn (TextServerExtension) gd_shaped_text_prev_grapheme_pos #

fn (s &TextServerExtension) gd_shaped_text_prev_grapheme_pos(shaped RID, pos i64) i64

Returns grapheme start position closest to the [param pos].

fn (TextServerExtension) gd_shaped_text_get_character_breaks #

fn (s &TextServerExtension) gd_shaped_text_get_character_breaks(shaped RID) PackedInt32Array

Returns array of the composite character boundaries.

fn (TextServerExtension) gd_shaped_text_next_character_pos #

fn (s &TextServerExtension) gd_shaped_text_next_character_pos(shaped RID, pos i64) i64

Returns composite character end position closest to the [param pos].

fn (TextServerExtension) gd_shaped_text_prev_character_pos #

fn (s &TextServerExtension) gd_shaped_text_prev_character_pos(shaped RID, pos i64) i64

Returns composite character start position closest to the [param pos].

fn (TextServerExtension) gd_shaped_text_closest_character_pos #

fn (s &TextServerExtension) gd_shaped_text_closest_character_pos(shaped RID, pos i64) i64

Returns composite character position closest to the [param pos].

fn (TextServerExtension) gd_format_number #

fn (s &TextServerExtension) gd_format_number(number string, language string) string

Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language].

fn (TextServerExtension) gd_parse_number #

fn (s &TextServerExtension) gd_parse_number(number string, language string) string

Converts [param number] from the numeral systems used in [param language] to Western Arabic (0..9).

fn (TextServerExtension) gd_percent_sign #

fn (s &TextServerExtension) gd_percent_sign(language string) string

Returns percent sign used in the [param language].

fn (TextServerExtension) gd_strip_diacritics #

fn (s &TextServerExtension) gd_strip_diacritics(gd_string string) string

Strips diacritics from the string.

fn (TextServerExtension) gd_is_valid_identifier #

fn (s &TextServerExtension) gd_is_valid_identifier(gd_string string) bool

Returns true if [param string] is a valid identifier.

fn (TextServerExtension) gd_is_valid_letter #

fn (s &TextServerExtension) gd_is_valid_letter(unicode i64) bool

fn (TextServerExtension) gd_string_get_word_breaks #

fn (s &TextServerExtension) gd_string_get_word_breaks(gd_string string, language string, chars_per_line i64) PackedInt32Array

Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even.

fn (TextServerExtension) gd_string_get_character_breaks #

fn (s &TextServerExtension) gd_string_get_character_breaks(gd_string string, language string) PackedInt32Array

Returns array of the composite character boundaries.

fn (TextServerExtension) gd_is_confusable #

fn (s &TextServerExtension) gd_is_confusable(gd_string string, dict PackedStringArray) i64

Returns index of the first string in [param dict] which is visually confusable with the [param string], or -1 if none is found.

fn (TextServerExtension) gd_spoof_check #

fn (s &TextServerExtension) gd_spoof_check(gd_string string) bool

Returns true if [param string] is likely to be an attempt at confusing the reader.

fn (TextServerExtension) gd_string_to_upper #

fn (s &TextServerExtension) gd_string_to_upper(gd_string string, language string) string

Returns the string converted to uppercase.

fn (TextServerExtension) gd_string_to_lower #

fn (s &TextServerExtension) gd_string_to_lower(gd_string string, language string) string

Returns the string converted to lowercase.

fn (TextServerExtension) gd_string_to_title #

fn (s &TextServerExtension) gd_string_to_title(gd_string string, language string) string

Returns the string converted to title case.

fn (TextServerExtension) gd_parse_structured_text #

fn (s &TextServerExtension) gd_parse_structured_text(parser_type TextServerStructuredTextParser, gd_args Array, text string) Array

Default implementation of the BiDi algorithm override function.

fn (TextServerExtension) gd_cleanup #

fn (s &TextServerExtension) gd_cleanup()

This method is called before text server is unregistered.

struct TextServerManager #

struct TextServerManager {
	Object
}

A singleton for managing [TextServer] implementations.

fn (TextServerManager) to_variant #

fn (s &TextServerManager) to_variant() Variant

fn (TextServerManager) from_variant #

fn (mut s TextServerManager) from_variant(variant &Variant)

fn (TextServerManager) add_interface #

fn (s &TextServerManager) add_interface(gd_interface TextServer)

Registers a [TextServer] interface.

fn (TextServerManager) get_interface_count #

fn (s &TextServerManager) get_interface_count() i64

Returns the number of interfaces currently registered.

fn (TextServerManager) remove_interface #

fn (s &TextServerManager) remove_interface(gd_interface TextServer)

Removes an interface. All fonts and shaped text caches should be freed before removing an interface.

fn (TextServerManager) get_interface #

fn (s &TextServerManager) get_interface(idx i64) TextServer

Returns the interface registered at a given index.

fn (TextServerManager) get_interfaces #

fn (s &TextServerManager) get_interfaces() Array

Returns a list of available interfaces, with the index and name of each interface.

fn (TextServerManager) find_interface #

fn (s &TextServerManager) find_interface(name string) TextServer

Finds an interface by its [param name].

fn (TextServerManager) set_primary_interface #

fn (s &TextServerManager) set_primary_interface(index TextServer)

Sets the primary [TextServer] interface.

fn (TextServerManager) get_primary_interface #

fn (s &TextServerManager) get_primary_interface() TextServer

Returns the primary [TextServer] interface currently in use.

struct TextServer_create_shaped_text_Cfg #

@[params]
struct TextServer_create_shaped_text_Cfg {
pub:
	direction   TextServerDirection   = unsafe { TextServerDirection(0) }
	orientation TextServerOrientation = unsafe { TextServerOrientation(0) }
}

Optional parameters for TextServer#create_shaped_text

struct TextServer_font_draw_glyph_Cfg #

@[params]
struct TextServer_font_draw_glyph_Cfg {
pub:
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextServer#font_draw_glyph

struct TextServer_font_draw_glyph_outline_Cfg #

@[params]
struct TextServer_font_draw_glyph_outline_Cfg {
pub:
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextServer#font_draw_glyph_outline

struct TextServer_format_number_Cfg #

@[params]
struct TextServer_format_number_Cfg {
pub:
	language string
}

Optional parameters for TextServer#format_number

struct TextServer_parse_number_Cfg #

@[params]
struct TextServer_parse_number_Cfg {
pub:
	language string
}

Optional parameters for TextServer#parse_number

struct TextServer_percent_sign_Cfg #

@[params]
struct TextServer_percent_sign_Cfg {
pub:
	language string
}

Optional parameters for TextServer#percent_sign

struct TextServer_shaped_set_span_update_font_Cfg #

@[params]
struct TextServer_shaped_set_span_update_font_Cfg {
pub:
	opentype_features Dictionary
}

Optional parameters for TextServer#shaped_set_span_update_font

struct TextServer_shaped_text_add_object_Cfg #

@[params]
struct TextServer_shaped_text_add_object_Cfg {
pub:
	inline_align InlineAlignment = unsafe { InlineAlignment(5) }
	length       i64             = 1
	baseline     f64             = 0.0
}

Optional parameters for TextServer#shaped_text_add_object

struct TextServer_shaped_text_add_string_Cfg #

@[params]
struct TextServer_shaped_text_add_string_Cfg {
pub:
	opentype_features Dictionary
	language          string
	meta              ToVariant
}

Optional parameters for TextServer#shaped_text_add_string

struct TextServer_shaped_text_draw_Cfg #

@[params]
struct TextServer_shaped_text_draw_Cfg {
pub:
	clip_l       f64   = -1
	clip_r       f64   = -1
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextServer#shaped_text_draw

struct TextServer_shaped_text_draw_outline_Cfg #

@[params]
struct TextServer_shaped_text_draw_outline_Cfg {
pub:
	clip_l       f64   = -1
	clip_r       f64   = -1
	outline_size i64   = 1
	color        Color = Color{1, 1, 1, 1}
	oversampling f64   = 0.0
}

Optional parameters for TextServer#shaped_text_draw_outline

struct TextServer_shaped_text_fit_to_width_Cfg #

@[params]
struct TextServer_shaped_text_fit_to_width_Cfg {
pub:
	justification_flags TextServerJustificationFlag
}

Optional parameters for TextServer#shaped_text_fit_to_width

struct TextServer_shaped_text_get_line_breaks_Cfg #

@[params]
struct TextServer_shaped_text_get_line_breaks_Cfg {
pub:
	start       i64
	break_flags TextServerLineBreakFlag
}

Optional parameters for TextServer#shaped_text_get_line_breaks

struct TextServer_shaped_text_get_line_breaks_adv_Cfg #

@[params]
struct TextServer_shaped_text_get_line_breaks_adv_Cfg {
pub:
	start       i64
	once        bool
	break_flags TextServerLineBreakFlag
}

Optional parameters for TextServer#shaped_text_get_line_breaks_adv

struct TextServer_shaped_text_get_word_breaks_Cfg #

@[params]
struct TextServer_shaped_text_get_word_breaks_Cfg {
pub:
	grapheme_flags      TextServerGraphemeFlag
	skip_grapheme_flags TextServerGraphemeFlag
}

Optional parameters for TextServer#shaped_text_get_word_breaks

struct TextServer_shaped_text_overrun_trim_to_width_Cfg #

@[params]
struct TextServer_shaped_text_overrun_trim_to_width_Cfg {
pub:
	width              f64
	overrun_trim_flags TextServerTextOverrunFlag
}

Optional parameters for TextServer#shaped_text_overrun_trim_to_width

struct TextServer_shaped_text_resize_object_Cfg #

@[params]
struct TextServer_shaped_text_resize_object_Cfg {
pub:
	inline_align InlineAlignment = unsafe { InlineAlignment(5) }
	baseline     f64             = 0.0
}

Optional parameters for TextServer#shaped_text_resize_object

struct TextServer_shaped_text_set_direction_Cfg #

@[params]
struct TextServer_shaped_text_set_direction_Cfg {
pub:
	direction TextServerDirection = unsafe { TextServerDirection(0) }
}

Optional parameters for TextServer#shaped_text_set_direction

struct TextServer_shaped_text_set_orientation_Cfg #

@[params]
struct TextServer_shaped_text_set_orientation_Cfg {
pub:
	orientation TextServerOrientation = unsafe { TextServerOrientation(0) }
}

Optional parameters for TextServer#shaped_text_set_orientation

struct TextServer_string_get_character_breaks_Cfg #

@[params]
struct TextServer_string_get_character_breaks_Cfg {
pub:
	language string
}

Optional parameters for TextServer#string_get_character_breaks

struct TextServer_string_get_word_breaks_Cfg #

@[params]
struct TextServer_string_get_word_breaks_Cfg {
pub:
	language       string
	chars_per_line i64
}

Optional parameters for TextServer#string_get_word_breaks

struct TextServer_string_to_lower_Cfg #

@[params]
struct TextServer_string_to_lower_Cfg {
pub:
	language string
}

Optional parameters for TextServer#string_to_lower

struct TextServer_string_to_title_Cfg #

@[params]
struct TextServer_string_to_title_Cfg {
pub:
	language string
}

Optional parameters for TextServer#string_to_title

struct TextServer_string_to_upper_Cfg #

@[params]
struct TextServer_string_to_upper_Cfg {
pub:
	language string
}

Optional parameters for TextServer#string_to_upper

struct Texture #

struct Texture {
	Resource
}

Base class for all texture types.

fn (Texture) to_variant #

fn (s &Texture) to_variant() Variant

fn (Texture) from_variant #

fn (mut s Texture) from_variant(variant &Variant)

struct Texture2D #

struct Texture2D {
	Texture
}

Texture for 2D and 3D.

fn (Texture2D) to_variant #

fn (s &Texture2D) to_variant() Variant

fn (Texture2D) from_variant #

fn (mut s Texture2D) from_variant(variant &Variant)

fn (Texture2D) gd_get_width #

fn (s &Texture2D) gd_get_width() i64

Called when the [Texture2D]'s width is queried.

fn (Texture2D) gd_get_height #

fn (s &Texture2D) gd_get_height() i64

Called when the [Texture2D]'s height is queried.

fn (Texture2D) gd_is_pixel_opaque #

fn (s &Texture2D) gd_is_pixel_opaque(x i64, y i64) bool

Called when a pixel's opaque state in the [Texture2D] is queried at the specified (x, y) position.

fn (Texture2D) gd_has_alpha #

fn (s &Texture2D) gd_has_alpha() bool

Called when the presence of an alpha channel in the [Texture2D] is queried.

fn (Texture2D) gd_draw #

fn (s &Texture2D) gd_draw(to_canvas_item RID, pos Vector2, modulate Color, transpose bool)

Called when the entire [Texture2D] is requested to be drawn over a [CanvasItem], with the top-left offset specified in [param pos]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation). [b]Note:[/b] This is only used in 2D rendering, not 3D.

fn (Texture2D) gd_draw_rect #

fn (s &Texture2D) gd_draw_rect(to_canvas_item RID, rect Rect2, tile bool, modulate Color, transpose bool)

Called when the [Texture2D] is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation). [b]Note:[/b] This is only used in 2D rendering, not 3D.

fn (Texture2D) gd_draw_rect_region #

fn (s &Texture2D) gd_draw_rect_region(to_canvas_item RID, rect Rect2, src_rect Rect2, modulate Color, transpose bool, clip_uv bool)

Called when a part of the [Texture2D] specified by [param src_rect]'s coordinates is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation). [b]Note:[/b] This is only used in 2D rendering, not 3D.

fn (Texture2D) get_width #

fn (s &Texture2D) get_width() i64

Returns the texture width in pixels.

fn (Texture2D) get_height #

fn (s &Texture2D) get_height() i64

Returns the texture height in pixels.

fn (Texture2D) get_size #

fn (s &Texture2D) get_size() Vector2

Returns the texture size in pixels.

fn (Texture2D) has_alpha #

fn (s &Texture2D) has_alpha() bool

Returns true if this [Texture2D] has an alpha channel.

fn (Texture2D) draw #

fn (s &Texture2D) draw(canvas_item RID, position Vector2, cfg Texture2D_draw_Cfg)

Draws the texture using a [CanvasItem] with the [RenderingServer] API at the specified [param position].

fn (Texture2D) draw_rect #

fn (s &Texture2D) draw_rect(canvas_item RID, rect Rect2, tile bool, cfg Texture2D_draw_rect_Cfg)

Draws the texture using a [CanvasItem] with the [RenderingServer] API.

fn (Texture2D) draw_rect_region #

fn (s &Texture2D) draw_rect_region(canvas_item RID, rect Rect2, src_rect Rect2, cfg Texture2D_draw_rect_region_Cfg)

Draws a part of the texture using a [CanvasItem] with the [RenderingServer] API.

fn (Texture2D) get_image #

fn (s &Texture2D) get_image() Image

Returns an [Image] that is a copy of data from this [Texture2D] (a new [Image] is created each time). [Image]s can be accessed and manipulated directly. [b]Note:[/b] This will return null if this [Texture2D] is invalid. [b]Note:[/b] This will fetch the texture data from the GPU, which might cause performance problems when overused. Avoid calling [method get_image] every frame, especially on large textures.

fn (Texture2D) create_placeholder #

fn (s &Texture2D) create_placeholder() Resource

Creates a placeholder version of this resource ([PlaceholderTexture2D]).

struct Texture2DArray #

struct Texture2DArray {
	ImageTextureLayered
}

A single texture resource which consists of multiple, separate images. Each image has the same dimensions and number of mipmap levels.

fn (Texture2DArray) to_variant #

fn (s &Texture2DArray) to_variant() Variant

fn (Texture2DArray) from_variant #

fn (mut s Texture2DArray) from_variant(variant &Variant)

fn (Texture2DArray) create_placeholder #

fn (s &Texture2DArray) create_placeholder() Resource

Creates a placeholder version of this resource ([PlaceholderTexture2DArray]).

struct Texture2DArrayRD #

struct Texture2DArrayRD {
	TextureLayeredRD
}

Texture Array for 2D that is bound to a texture created on the [RenderingDevice].

fn (Texture2DArrayRD) to_variant #

fn (s &Texture2DArrayRD) to_variant() Variant

fn (Texture2DArrayRD) from_variant #

fn (mut s Texture2DArrayRD) from_variant(variant &Variant)

struct Texture2DRD #

struct Texture2DRD {
	Texture2D
}

Texture for 2D that is bound to a texture created on the [RenderingDevice].

fn (Texture2DRD) to_variant #

fn (s &Texture2DRD) to_variant() Variant

fn (Texture2DRD) from_variant #

fn (mut s Texture2DRD) from_variant(variant &Variant)

fn (Texture2DRD) set_texture_rd_rid #

fn (s &Texture2DRD) set_texture_rd_rid(texture_rd_rid RID)

fn (Texture2DRD) get_texture_rd_rid #

fn (s &Texture2DRD) get_texture_rd_rid() RID

struct Texture2D_draw_Cfg #

@[params]
struct Texture2D_draw_Cfg {
pub:
	modulate  Color = Color{1, 1, 1, 1}
	transpose bool
}

Optional parameters for Texture2D#draw

struct Texture2D_draw_rect_Cfg #

@[params]
struct Texture2D_draw_rect_Cfg {
pub:
	modulate  Color = Color{1, 1, 1, 1}
	transpose bool
}

Optional parameters for Texture2D#draw_rect

struct Texture2D_draw_rect_region_Cfg #

@[params]
struct Texture2D_draw_rect_region_Cfg {
pub:
	modulate  Color = Color{1, 1, 1, 1}
	transpose bool
	clip_uv   bool
}

Optional parameters for Texture2D#draw_rect_region

struct Texture3D #

struct Texture3D {
	Texture
}

Base class for 3-dimensional textures.

fn (Texture3D) to_variant #

fn (s &Texture3D) to_variant() Variant

fn (Texture3D) from_variant #

fn (mut s Texture3D) from_variant(variant &Variant)

fn (Texture3D) gd_get_format #

fn (s &Texture3D) gd_get_format() ImageFormat

Called when the [Texture3D]'s format is queried.

fn (Texture3D) gd_get_width #

fn (s &Texture3D) gd_get_width() i64

Called when the [Texture3D]'s width is queried.

fn (Texture3D) gd_get_height #

fn (s &Texture3D) gd_get_height() i64

Called when the [Texture3D]'s height is queried.

fn (Texture3D) gd_get_depth #

fn (s &Texture3D) gd_get_depth() i64

Called when the [Texture3D]'s depth is queried.

fn (Texture3D) gd_has_mipmaps #

fn (s &Texture3D) gd_has_mipmaps() bool

Called when the presence of mipmaps in the [Texture3D] is queried.

fn (Texture3D) gd_get_data #

fn (s &Texture3D) gd_get_data() Array

Called when the [Texture3D]'s data is queried.

fn (Texture3D) get_format #

fn (s &Texture3D) get_format() ImageFormat

Returns the current format being used by this texture.

fn (Texture3D) get_width #

fn (s &Texture3D) get_width() i64

Returns the [Texture3D]'s width in pixels. Width is typically represented by the X axis.

fn (Texture3D) get_height #

fn (s &Texture3D) get_height() i64

Returns the [Texture3D]'s height in pixels. Width is typically represented by the Y axis.

fn (Texture3D) get_depth #

fn (s &Texture3D) get_depth() i64

Returns the [Texture3D]'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in [Texture2D]).

fn (Texture3D) has_mipmaps #

fn (s &Texture3D) has_mipmaps() bool

Returns true if the [Texture3D] has generated mipmaps.

fn (Texture3D) get_data #

fn (s &Texture3D) get_data() Array

Returns the [Texture3D]'s data as an array of [Image]s. Each [Image] represents a [i]slice[/i] of the [Texture3D], with different slices mapping to different depth (Z axis) levels.

fn (Texture3D) create_placeholder #

fn (s &Texture3D) create_placeholder() Resource

Creates a placeholder version of this resource ([PlaceholderTexture3D]).

struct Texture3DRD #

struct Texture3DRD {
	Texture3D
}

Texture for 3D that is bound to a texture created on the [RenderingDevice].

fn (Texture3DRD) to_variant #

fn (s &Texture3DRD) to_variant() Variant

fn (Texture3DRD) from_variant #

fn (mut s Texture3DRD) from_variant(variant &Variant)

fn (Texture3DRD) set_texture_rd_rid #

fn (s &Texture3DRD) set_texture_rd_rid(texture_rd_rid RID)

fn (Texture3DRD) get_texture_rd_rid #

fn (s &Texture3DRD) get_texture_rd_rid() RID

struct TextureButton #

struct TextureButton {
	BaseButton
}

Texture-based button. Supports Pressed, Hover, Disabled and Focused states.

fn (TextureButton) to_variant #

fn (s &TextureButton) to_variant() Variant

fn (TextureButton) from_variant #

fn (mut s TextureButton) from_variant(variant &Variant)

fn (TextureButton) set_texture_normal #

fn (s &TextureButton) set_texture_normal(texture Texture2D)

fn (TextureButton) set_texture_pressed #

fn (s &TextureButton) set_texture_pressed(texture Texture2D)

fn (TextureButton) set_texture_hover #

fn (s &TextureButton) set_texture_hover(texture Texture2D)

fn (TextureButton) set_texture_disabled #

fn (s &TextureButton) set_texture_disabled(texture Texture2D)

fn (TextureButton) set_texture_focused #

fn (s &TextureButton) set_texture_focused(texture Texture2D)

fn (TextureButton) set_click_mask #

fn (s &TextureButton) set_click_mask(mask BitMap)

fn (TextureButton) set_ignore_texture_size #

fn (s &TextureButton) set_ignore_texture_size(ignore bool)

fn (TextureButton) set_stretch_mode #

fn (s &TextureButton) set_stretch_mode(mode TextureButtonStretchMode)

fn (TextureButton) set_flip_h #

fn (s &TextureButton) set_flip_h(enable bool)

fn (TextureButton) is_flipped_h #

fn (s &TextureButton) is_flipped_h() bool

fn (TextureButton) set_flip_v #

fn (s &TextureButton) set_flip_v(enable bool)

fn (TextureButton) is_flipped_v #

fn (s &TextureButton) is_flipped_v() bool

fn (TextureButton) get_texture_normal #

fn (s &TextureButton) get_texture_normal() Texture2D

fn (TextureButton) get_texture_pressed #

fn (s &TextureButton) get_texture_pressed() Texture2D

fn (TextureButton) get_texture_hover #

fn (s &TextureButton) get_texture_hover() Texture2D

fn (TextureButton) get_texture_disabled #

fn (s &TextureButton) get_texture_disabled() Texture2D

fn (TextureButton) get_texture_focused #

fn (s &TextureButton) get_texture_focused() Texture2D

fn (TextureButton) get_click_mask #

fn (s &TextureButton) get_click_mask() BitMap

fn (TextureButton) get_ignore_texture_size #

fn (s &TextureButton) get_ignore_texture_size() bool

fn (TextureButton) get_stretch_mode #

fn (s &TextureButton) get_stretch_mode() TextureButtonStretchMode

struct TextureCubemapArrayRD #

struct TextureCubemapArrayRD {
	TextureLayeredRD
}

Texture Array for Cubemaps that is bound to a texture created on the [RenderingDevice].

fn (TextureCubemapArrayRD) to_variant #

fn (s &TextureCubemapArrayRD) to_variant() Variant

fn (TextureCubemapArrayRD) from_variant #

fn (mut s TextureCubemapArrayRD) from_variant(variant &Variant)

struct TextureCubemapRD #

struct TextureCubemapRD {
	TextureLayeredRD
}

Texture for Cubemap that is bound to a texture created on the [RenderingDevice].

fn (TextureCubemapRD) to_variant #

fn (s &TextureCubemapRD) to_variant() Variant

fn (TextureCubemapRD) from_variant #

fn (mut s TextureCubemapRD) from_variant(variant &Variant)

struct TextureLayered #

struct TextureLayered {
	Texture
}

Base class for texture types which contain the data of multiple [Image]s. Each image is of the same size and format.

fn (TextureLayered) to_variant #

fn (s &TextureLayered) to_variant() Variant

fn (TextureLayered) from_variant #

fn (mut s TextureLayered) from_variant(variant &Variant)

fn (TextureLayered) gd_get_format #

fn (s &TextureLayered) gd_get_format() ImageFormat

Called when the [TextureLayered]'s format is queried.

fn (TextureLayered) gd_get_layered_type #

fn (s &TextureLayered) gd_get_layered_type() i64

Called when the layers' type in the [TextureLayered] is queried.

fn (TextureLayered) gd_get_width #

fn (s &TextureLayered) gd_get_width() i64

Called when the [TextureLayered]'s width queried.

fn (TextureLayered) gd_get_height #

fn (s &TextureLayered) gd_get_height() i64

Called when the [TextureLayered]'s height is queried.

fn (TextureLayered) gd_get_layers #

fn (s &TextureLayered) gd_get_layers() i64

Called when the number of layers in the [TextureLayered] is queried.

fn (TextureLayered) gd_has_mipmaps #

fn (s &TextureLayered) gd_has_mipmaps() bool

Called when the presence of mipmaps in the [TextureLayered] is queried.

fn (TextureLayered) gd_get_layer_data #

fn (s &TextureLayered) gd_get_layer_data(layer_index i64) Image

Called when the data for a layer in the [TextureLayered] is queried.

fn (TextureLayered) get_format #

fn (s &TextureLayered) get_format() ImageFormat

Returns the current format being used by this texture.

fn (TextureLayered) get_layered_type #

fn (s &TextureLayered) get_layered_type() TextureLayeredLayeredType

Returns the [TextureLayered]'s type. The type determines how the data is accessed, with cubemaps having special types.

fn (TextureLayered) get_width #

fn (s &TextureLayered) get_width() i64

Returns the width of the texture in pixels. Width is typically represented by the X axis.

fn (TextureLayered) get_height #

fn (s &TextureLayered) get_height() i64

Returns the height of the texture in pixels. Height is typically represented by the Y axis.

fn (TextureLayered) get_layers #

fn (s &TextureLayered) get_layers() i64

Returns the number of referenced [Image]s.

fn (TextureLayered) has_mipmaps #

fn (s &TextureLayered) has_mipmaps() bool

Returns true if the layers have generated mipmaps.

fn (TextureLayered) get_layer_data #

fn (s &TextureLayered) get_layer_data(layer i64) Image

Returns an [Image] resource with the data from specified [param layer].

struct TextureLayeredRD #

struct TextureLayeredRD {
	TextureLayered
}

Abstract base class for layered texture RD types.

fn (TextureLayeredRD) to_variant #

fn (s &TextureLayeredRD) to_variant() Variant

fn (TextureLayeredRD) from_variant #

fn (mut s TextureLayeredRD) from_variant(variant &Variant)

fn (TextureLayeredRD) set_texture_rd_rid #

fn (s &TextureLayeredRD) set_texture_rd_rid(texture_rd_rid RID)

fn (TextureLayeredRD) get_texture_rd_rid #

fn (s &TextureLayeredRD) get_texture_rd_rid() RID

struct TextureProgressBar #

struct TextureProgressBar {
	Range
}

Texture-based progress bar. Useful for loading screens and life or stamina bars.

fn (TextureProgressBar) to_variant #

fn (s &TextureProgressBar) to_variant() Variant

fn (TextureProgressBar) from_variant #

fn (mut s TextureProgressBar) from_variant(variant &Variant)

fn (TextureProgressBar) set_under_texture #

fn (s &TextureProgressBar) set_under_texture(tex Texture2D)

fn (TextureProgressBar) get_under_texture #

fn (s &TextureProgressBar) get_under_texture() Texture2D

fn (TextureProgressBar) set_progress_texture #

fn (s &TextureProgressBar) set_progress_texture(tex Texture2D)

fn (TextureProgressBar) get_progress_texture #

fn (s &TextureProgressBar) get_progress_texture() Texture2D

fn (TextureProgressBar) set_over_texture #

fn (s &TextureProgressBar) set_over_texture(tex Texture2D)

fn (TextureProgressBar) get_over_texture #

fn (s &TextureProgressBar) get_over_texture() Texture2D

fn (TextureProgressBar) set_fill_mode #

fn (s &TextureProgressBar) set_fill_mode(mode i64)

fn (TextureProgressBar) get_fill_mode #

fn (s &TextureProgressBar) get_fill_mode() i64

fn (TextureProgressBar) set_tint_under #

fn (s &TextureProgressBar) set_tint_under(tint Color)

fn (TextureProgressBar) get_tint_under #

fn (s &TextureProgressBar) get_tint_under() Color

fn (TextureProgressBar) set_tint_progress #

fn (s &TextureProgressBar) set_tint_progress(tint Color)

fn (TextureProgressBar) get_tint_progress #

fn (s &TextureProgressBar) get_tint_progress() Color

fn (TextureProgressBar) set_tint_over #

fn (s &TextureProgressBar) set_tint_over(tint Color)

fn (TextureProgressBar) get_tint_over #

fn (s &TextureProgressBar) get_tint_over() Color

fn (TextureProgressBar) set_texture_progress_offset #

fn (s &TextureProgressBar) set_texture_progress_offset(offset Vector2)

fn (TextureProgressBar) get_texture_progress_offset #

fn (s &TextureProgressBar) get_texture_progress_offset() Vector2

fn (TextureProgressBar) set_radial_initial_angle #

fn (s &TextureProgressBar) set_radial_initial_angle(mode f64)

fn (TextureProgressBar) get_radial_initial_angle #

fn (s &TextureProgressBar) get_radial_initial_angle() f64

fn (TextureProgressBar) set_radial_center_offset #

fn (s &TextureProgressBar) set_radial_center_offset(mode Vector2)

fn (TextureProgressBar) get_radial_center_offset #

fn (s &TextureProgressBar) get_radial_center_offset() Vector2

fn (TextureProgressBar) set_fill_degrees #

fn (s &TextureProgressBar) set_fill_degrees(mode f64)

fn (TextureProgressBar) get_fill_degrees #

fn (s &TextureProgressBar) get_fill_degrees() f64

fn (TextureProgressBar) set_stretch_margin #

fn (s &TextureProgressBar) set_stretch_margin(margin Side, value i64)

Sets the stretch margin with the specified index. See [member stretch_margin_bottom] and related properties.

fn (TextureProgressBar) get_stretch_margin #

fn (s &TextureProgressBar) get_stretch_margin(margin Side) i64

Returns the stretch margin with the specified index. See [member stretch_margin_bottom] and related properties.

fn (TextureProgressBar) set_nine_patch_stretch #

fn (s &TextureProgressBar) set_nine_patch_stretch(stretch bool)

fn (TextureProgressBar) get_nine_patch_stretch #

fn (s &TextureProgressBar) get_nine_patch_stretch() bool

struct TextureRect #

struct TextureRect {
	Control
}

A control that displays a texture.

fn (TextureRect) to_variant #

fn (s &TextureRect) to_variant() Variant

fn (TextureRect) from_variant #

fn (mut s TextureRect) from_variant(variant &Variant)

fn (TextureRect) set_texture #

fn (s &TextureRect) set_texture(texture Texture2D)

fn (TextureRect) get_texture #

fn (s &TextureRect) get_texture() Texture2D

fn (TextureRect) set_expand_mode #

fn (s &TextureRect) set_expand_mode(expand_mode TextureRectExpandMode)

fn (TextureRect) get_expand_mode #

fn (s &TextureRect) get_expand_mode() TextureRectExpandMode

fn (TextureRect) set_flip_h #

fn (s &TextureRect) set_flip_h(enable bool)

fn (TextureRect) is_flipped_h #

fn (s &TextureRect) is_flipped_h() bool

fn (TextureRect) set_flip_v #

fn (s &TextureRect) set_flip_v(enable bool)

fn (TextureRect) is_flipped_v #

fn (s &TextureRect) is_flipped_v() bool

fn (TextureRect) set_stretch_mode #

fn (s &TextureRect) set_stretch_mode(stretch_mode TextureRectStretchMode)

fn (TextureRect) get_stretch_mode #

fn (s &TextureRect) get_stretch_mode() TextureRectStretchMode

struct Theme #

struct Theme {
	Resource
}

A resource used for styling/skinning [Control]s and [Window]s.

fn (Theme) to_variant #

fn (s &Theme) to_variant() Variant

fn (Theme) from_variant #

fn (mut s Theme) from_variant(variant &Variant)

fn (Theme) set_icon #

fn (s &Theme) set_icon(name string, theme_type string, texture Texture2D)

Creates or changes the value of the icon property defined by [param name] and [param theme_type]. Use [method clear_icon] to remove the property.

fn (Theme) get_icon #

fn (s &Theme) get_icon(name string, theme_type string) Texture2D

Returns the icon property defined by [param name] and [param theme_type], if it exists. Returns the engine fallback icon value if the property doesn't exist (see [member ThemeDB.fallback_icon]). Use [method has_icon] to check for existence.

fn (Theme) has_icon #

fn (s &Theme) has_icon(name string, theme_type string) bool

Returns true if the icon property defined by [param name] and [param theme_type] exists. Returns false if it doesn't exist. Use [method set_icon] to define it.

fn (Theme) rename_icon #

fn (s &Theme) rename_icon(old_name string, name string, theme_type string)

Renames the icon property defined by [param old_name] and [param theme_type] to [param name], if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_icon] to check for existence, and [method clear_icon] to remove the existing property.

fn (Theme) clear_icon #

fn (s &Theme) clear_icon(name string, theme_type string)

Removes the icon property defined by [param name] and [param theme_type], if it exists. Fails if it doesn't exist. Use [method has_icon] to check for existence.

fn (Theme) get_icon_list #

fn (s &Theme) get_icon_list(theme_type string) PackedStringArray

Returns a list of names for icon properties defined with [param theme_type]. Use [method get_icon_type_list] to get a list of possible theme type names.

fn (Theme) get_icon_type_list #

fn (s &Theme) get_icon_type_list() PackedStringArray

Returns a list of all unique theme type names for icon properties. Use [method get_type_list] to get a list of all unique theme types.

fn (Theme) set_stylebox #

fn (s &Theme) set_stylebox(name string, theme_type string, texture StyleBox)

Creates or changes the value of the [StyleBox] property defined by [param name] and [param theme_type]. Use [method clear_stylebox] to remove the property.

fn (Theme) get_stylebox #

fn (s &Theme) get_stylebox(name string, theme_type string) StyleBox

Returns the [StyleBox] property defined by [param name] and [param theme_type], if it exists. Returns the engine fallback stylebox value if the property doesn't exist (see [member ThemeDB.fallback_stylebox]). Use [method has_stylebox] to check for existence.

fn (Theme) has_stylebox #

fn (s &Theme) has_stylebox(name string, theme_type string) bool

Returns true if the [StyleBox] property defined by [param name] and [param theme_type] exists. Returns false if it doesn't exist. Use [method set_stylebox] to define it.

fn (Theme) rename_stylebox #

fn (s &Theme) rename_stylebox(old_name string, name string, theme_type string)

Renames the [StyleBox] property defined by [param old_name] and [param theme_type] to [param name], if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_stylebox] to check for existence, and [method clear_stylebox] to remove the existing property.

fn (Theme) clear_stylebox #

fn (s &Theme) clear_stylebox(name string, theme_type string)

Removes the [StyleBox] property defined by [param name] and [param theme_type], if it exists. Fails if it doesn't exist. Use [method has_stylebox] to check for existence.

fn (Theme) get_stylebox_list #

fn (s &Theme) get_stylebox_list(theme_type string) PackedStringArray

Returns a list of names for [StyleBox] properties defined with [param theme_type]. Use [method get_stylebox_type_list] to get a list of possible theme type names.

fn (Theme) get_stylebox_type_list #

fn (s &Theme) get_stylebox_type_list() PackedStringArray

Returns a list of all unique theme type names for [StyleBox] properties. Use [method get_type_list] to get a list of all unique theme types.

fn (Theme) set_font #

fn (s &Theme) set_font(name string, theme_type string, font Font)

Creates or changes the value of the [Font] property defined by [param name] and [param theme_type]. Use [method clear_font] to remove the property.

fn (Theme) get_font #

fn (s &Theme) get_font(name string, theme_type string) Font

Returns the [Font] property defined by [param name] and [param theme_type], if it exists. Returns the default theme font if the property doesn't exist and the default theme font is set up (see [member default_font]). Use [method has_font] to check for existence of the property and [method has_default_font] to check for existence of the default theme font. Returns the engine fallback font value, if neither exist (see [member ThemeDB.fallback_font]).

fn (Theme) has_font #

fn (s &Theme) has_font(name string, theme_type string) bool

Returns true if the [Font] property defined by [param name] and [param theme_type] exists, or if the default theme font is set up (see [method has_default_font]). Returns false if neither exist. Use [method set_font] to define the property.

fn (Theme) rename_font #

fn (s &Theme) rename_font(old_name string, name string, theme_type string)

Renames the [Font] property defined by [param old_name] and [param theme_type] to [param name], if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_font] to check for existence, and [method clear_font] to remove the existing property.

fn (Theme) clear_font #

fn (s &Theme) clear_font(name string, theme_type string)

Removes the [Font] property defined by [param name] and [param theme_type], if it exists. Fails if it doesn't exist. Use [method has_font] to check for existence.

fn (Theme) get_font_list #

fn (s &Theme) get_font_list(theme_type string) PackedStringArray

Returns a list of names for [Font] properties defined with [param theme_type]. Use [method get_font_type_list] to get a list of possible theme type names.

fn (Theme) get_font_type_list #

fn (s &Theme) get_font_type_list() PackedStringArray

Returns a list of all unique theme type names for [Font] properties. Use [method get_type_list] to get a list of all unique theme types.

fn (Theme) set_font_size #

fn (s &Theme) set_font_size(name string, theme_type string, font_size i64)

Creates or changes the value of the font size property defined by [param name] and [param theme_type]. Use [method clear_font_size] to remove the property.

fn (Theme) get_font_size #

fn (s &Theme) get_font_size(name string, theme_type string) i64

Returns the font size property defined by [param name] and [param theme_type], if it exists. Returns the default theme font size if the property doesn't exist and the default theme font size is set up (see [member default_font_size]). Use [method has_font_size] to check for existence of the property and [method has_default_font_size] to check for existence of the default theme font. Returns the engine fallback font size value, if neither exist (see [member ThemeDB.fallback_font_size]).

fn (Theme) has_font_size #

fn (s &Theme) has_font_size(name string, theme_type string) bool

Returns true if the font size property defined by [param name] and [param theme_type] exists, or if the default theme font size is set up (see [method has_default_font_size]). Returns false if neither exist. Use [method set_font_size] to define the property.

fn (Theme) rename_font_size #

fn (s &Theme) rename_font_size(old_name string, name string, theme_type string)

Renames the font size property defined by [param old_name] and [param theme_type] to [param name], if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_font_size] to check for existence, and [method clear_font_size] to remove the existing property.

fn (Theme) clear_font_size #

fn (s &Theme) clear_font_size(name string, theme_type string)

Removes the font size property defined by [param name] and [param theme_type], if it exists. Fails if it doesn't exist. Use [method has_font_size] to check for existence.

fn (Theme) get_font_size_list #

fn (s &Theme) get_font_size_list(theme_type string) PackedStringArray

Returns a list of names for font size properties defined with [param theme_type]. Use [method get_font_size_type_list] to get a list of possible theme type names.

fn (Theme) get_font_size_type_list #

fn (s &Theme) get_font_size_type_list() PackedStringArray

Returns a list of all unique theme type names for font size properties. Use [method get_type_list] to get a list of all unique theme types.

fn (Theme) set_color #

fn (s &Theme) set_color(name string, theme_type string, color Color)

Creates or changes the value of the [Color] property defined by [param name] and [param theme_type]. Use [method clear_color] to remove the property.

fn (Theme) get_color #

fn (s &Theme) get_color(name string, theme_type string) Color

Returns the [Color] property defined by [param name] and [param theme_type], if it exists. Returns the default color value if the property doesn't exist. Use [method has_color] to check for existence.

fn (Theme) has_color #

fn (s &Theme) has_color(name string, theme_type string) bool

Returns true if the [Color] property defined by [param name] and [param theme_type] exists. Returns false if it doesn't exist. Use [method set_color] to define it.

fn (Theme) rename_color #

fn (s &Theme) rename_color(old_name string, name string, theme_type string)

Renames the [Color] property defined by [param old_name] and [param theme_type] to [param name], if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_color] to check for existence, and [method clear_color] to remove the existing property.

fn (Theme) clear_color #

fn (s &Theme) clear_color(name string, theme_type string)

Removes the [Color] property defined by [param name] and [param theme_type], if it exists. Fails if it doesn't exist. Use [method has_color] to check for existence.

fn (Theme) get_color_list #

fn (s &Theme) get_color_list(theme_type string) PackedStringArray

Returns a list of names for [Color] properties defined with [param theme_type]. Use [method get_color_type_list] to get a list of possible theme type names.

fn (Theme) get_color_type_list #

fn (s &Theme) get_color_type_list() PackedStringArray

Returns a list of all unique theme type names for [Color] properties. Use [method get_type_list] to get a list of all unique theme types.

fn (Theme) set_constant #

fn (s &Theme) set_constant(name string, theme_type string, constant i64)

Creates or changes the value of the constant property defined by [param name] and [param theme_type]. Use [method clear_constant] to remove the property.

fn (Theme) get_constant #

fn (s &Theme) get_constant(name string, theme_type string) i64

Returns the constant property defined by [param name] and [param theme_type], if it exists. Returns 0 if the property doesn't exist. Use [method has_constant] to check for existence.

fn (Theme) has_constant #

fn (s &Theme) has_constant(name string, theme_type string) bool

Returns true if the constant property defined by [param name] and [param theme_type] exists. Returns false if it doesn't exist. Use [method set_constant] to define it.

fn (Theme) rename_constant #

fn (s &Theme) rename_constant(old_name string, name string, theme_type string)

Renames the constant property defined by [param old_name] and [param theme_type] to [param name], if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_constant] to check for existence, and [method clear_constant] to remove the existing property.

fn (Theme) clear_constant #

fn (s &Theme) clear_constant(name string, theme_type string)

Removes the constant property defined by [param name] and [param theme_type], if it exists. Fails if it doesn't exist. Use [method has_constant] to check for existence.

fn (Theme) get_constant_list #

fn (s &Theme) get_constant_list(theme_type string) PackedStringArray

Returns a list of names for constant properties defined with [param theme_type]. Use [method get_constant_type_list] to get a list of possible theme type names.

fn (Theme) get_constant_type_list #

fn (s &Theme) get_constant_type_list() PackedStringArray

Returns a list of all unique theme type names for constant properties. Use [method get_type_list] to get a list of all unique theme types.

fn (Theme) set_default_base_scale #

fn (s &Theme) set_default_base_scale(base_scale f64)

fn (Theme) get_default_base_scale #

fn (s &Theme) get_default_base_scale() f64

fn (Theme) has_default_base_scale #

fn (s &Theme) has_default_base_scale() bool

Returns true if [member default_base_scale] has a valid value. Returns false if it doesn't. The value must be greater than 0.0 to be considered valid.

fn (Theme) set_default_font #

fn (s &Theme) set_default_font(font Font)

fn (Theme) get_default_font #

fn (s &Theme) get_default_font() Font

fn (Theme) has_default_font #

fn (s &Theme) has_default_font() bool

Returns true if [member default_font] has a valid value. Returns false if it doesn't.

fn (Theme) set_default_font_size #

fn (s &Theme) set_default_font_size(font_size i64)

fn (Theme) get_default_font_size #

fn (s &Theme) get_default_font_size() i64

fn (Theme) has_default_font_size #

fn (s &Theme) has_default_font_size() bool

Returns true if [member default_font_size] has a valid value. Returns false if it doesn't. The value must be greater than 0 to be considered valid.

fn (Theme) set_theme_item #

fn (s &Theme) set_theme_item(data_type ThemeDataType, name string, theme_type string, value_ ToVariant)

Creates or changes the value of the theme property of [param data_type] defined by [param name] and [param theme_type]. Use [method clear_theme_item] to remove the property. Fails if the [param value] type is not accepted by [param data_type]. [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

fn (Theme) get_theme_item #

fn (s &Theme) get_theme_item(data_type ThemeDataType, name string, theme_type string) Variant

Returns the theme property of [param data_type] defined by [param name] and [param theme_type], if it exists. Returns the engine fallback value if the property doesn't exist (see [ThemeDB]). Use [method has_theme_item] to check for existence. [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

fn (Theme) has_theme_item #

fn (s &Theme) has_theme_item(data_type ThemeDataType, name string, theme_type string) bool

Returns true if the theme property of [param data_type] defined by [param name] and [param theme_type] exists. Returns false if it doesn't exist. Use [method set_theme_item] to define it. [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

fn (Theme) rename_theme_item #

fn (s &Theme) rename_theme_item(data_type ThemeDataType, old_name string, name string, theme_type string)

Renames the theme property of [param data_type] defined by [param old_name] and [param theme_type] to [param name], if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_theme_item] to check for existence, and [method clear_theme_item] to remove the existing property. [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

fn (Theme) clear_theme_item #

fn (s &Theme) clear_theme_item(data_type ThemeDataType, name string, theme_type string)

Removes the theme property of [param data_type] defined by [param name] and [param theme_type], if it exists. Fails if it doesn't exist. Use [method has_theme_item] to check for existence. [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

fn (Theme) get_theme_item_list #

fn (s &Theme) get_theme_item_list(data_type ThemeDataType, theme_type string) PackedStringArray

Returns a list of names for properties of [param data_type] defined with [param theme_type]. Use [method get_theme_item_type_list] to get a list of possible theme type names. [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

fn (Theme) get_theme_item_type_list #

fn (s &Theme) get_theme_item_type_list(data_type ThemeDataType) PackedStringArray

Returns a list of all unique theme type names for [param data_type] properties. Use [method get_type_list] to get a list of all unique theme types. [b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

fn (Theme) set_type_variation #

fn (s &Theme) set_type_variation(theme_type string, base_type string)

Marks [param theme_type] as a variation of [param base_type]. This adds [param theme_type] as a suggested option for [member Control.theme_type_variation] on a [Control] that is of the [param base_type] class. Variations can also be nested, i.e. [param base_type] can be another variation. If a chain of variations ends with a [param base_type] matching the class of the [Control], the whole chain is going to be suggested as options. [b]Note:[/b] Suggestions only show up if this theme resource is set as the project default theme. See [member ProjectSettings.gui/theme/custom].

fn (Theme) is_type_variation #

fn (s &Theme) is_type_variation(theme_type string, base_type string) bool

Returns true if [param theme_type] is marked as a variation of [param base_type].

fn (Theme) clear_type_variation #

fn (s &Theme) clear_type_variation(theme_type string)

Unmarks [param theme_type] as being a variation of another theme type. See [method set_type_variation].

fn (Theme) get_type_variation_base #

fn (s &Theme) get_type_variation_base(theme_type string) string

Returns the name of the base theme type if [param theme_type] is a valid variation type. Returns an empty string otherwise.

fn (Theme) get_type_variation_list #

fn (s &Theme) get_type_variation_list(base_type string) PackedStringArray

Returns a list of all type variations for the given [param base_type].

fn (Theme) add_type #

fn (s &Theme) add_type(theme_type string)

Adds an empty theme type for every valid data type. [b]Note:[/b] Empty types are not saved with the theme. This method only exists to perform in-memory changes to the resource. Use available set_* methods to add theme items.

fn (Theme) remove_type #

fn (s &Theme) remove_type(theme_type string)

Removes the theme type, gracefully discarding defined theme items. If the type is a variation, this information is also erased. If the type is a base for type variations, those variations lose their base.

fn (Theme) rename_type #

fn (s &Theme) rename_type(old_theme_type string, theme_type string)

Renames the theme type [param old_theme_type] to [param theme_type], if the old type exists and the new one doesn't exist. [b]Note:[/b] Renaming a theme type to an empty name or a variation to a type associated with a built-in class removes type variation connections in a way that cannot be undone by reversing the rename alone.

fn (Theme) get_type_list #

fn (s &Theme) get_type_list() PackedStringArray

Returns a list of all unique theme type names. Use the appropriate get_*_type_list method to get a list of unique theme types for a single data type.

fn (Theme) merge_with #

fn (s &Theme) merge_with(other Theme)

Adds missing and overrides existing definitions with values from the [param other] theme resource. [b]Note:[/b] This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another.

fn (Theme) clear #

fn (s &Theme) clear()

Removes all the theme properties defined on the theme resource.

struct ThemeDB #

struct ThemeDB {
	Object
}

A singleton that provides access to static information about [Theme] resources used by the engine and by your project.

fn (ThemeDB) to_variant #

fn (s &ThemeDB) to_variant() Variant

fn (ThemeDB) from_variant #

fn (mut s ThemeDB) from_variant(variant &Variant)

fn (ThemeDB) get_default_theme #

fn (s &ThemeDB) get_default_theme() Theme

Returns a reference to the default engine [Theme]. This theme resource is responsible for the out-of-the-box look of [Control] nodes and cannot be overridden.

fn (ThemeDB) get_project_theme #

fn (s &ThemeDB) get_project_theme() Theme

Returns a reference to the custom project [Theme]. This theme resources allows to override the default engine theme for every control node in the project. To set the project theme, see [member ProjectSettings.gui/theme/custom].

fn (ThemeDB) set_fallback_base_scale #

fn (s &ThemeDB) set_fallback_base_scale(base_scale f64)

fn (ThemeDB) get_fallback_base_scale #

fn (s &ThemeDB) get_fallback_base_scale() f64

fn (ThemeDB) set_fallback_font #

fn (s &ThemeDB) set_fallback_font(font Font)

fn (ThemeDB) get_fallback_font #

fn (s &ThemeDB) get_fallback_font() Font

fn (ThemeDB) set_fallback_font_size #

fn (s &ThemeDB) set_fallback_font_size(font_size i64)

fn (ThemeDB) get_fallback_font_size #

fn (s &ThemeDB) get_fallback_font_size() i64

fn (ThemeDB) set_fallback_icon #

fn (s &ThemeDB) set_fallback_icon(icon Texture2D)

fn (ThemeDB) get_fallback_icon #

fn (s &ThemeDB) get_fallback_icon() Texture2D

fn (ThemeDB) set_fallback_stylebox #

fn (s &ThemeDB) set_fallback_stylebox(stylebox StyleBox)

fn (ThemeDB) get_fallback_stylebox #

fn (s &ThemeDB) get_fallback_stylebox() StyleBox

struct Thread #

struct Thread {
	RefCounted
}

A unit of execution in a process.

fn (Thread) to_variant #

fn (s &Thread) to_variant() Variant

fn (Thread) from_variant #

fn (mut s Thread) from_variant(variant &Variant)

fn (Thread) start #

fn (s &Thread) start(callable Callable, cfg Thread_start_Cfg) GDError

Starts a new [Thread] that calls [param callable]. If the method takes some arguments, you can pass them using [method Callable.bind]. The [param priority] of the [Thread] can be changed by passing a value from the [enum Priority] enum. Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure.

fn (Thread) get_id #

fn (s &Thread) get_id() string

Returns the current [Thread]'s ID, uniquely identifying it among all threads. If the [Thread] has not started running or if [method wait_to_finish] has been called, this returns an empty string.

fn (Thread) is_started #

fn (s &Thread) is_started() bool

Returns true if this [Thread] has been started. Once started, this will return true until it is joined using [method wait_to_finish]. For checking if a [Thread] is still executing its task, use [method is_alive].

fn (Thread) is_alive #

fn (s &Thread) is_alive() bool

Returns true if this [Thread] is currently running the provided function. This is useful for determining if [method wait_to_finish] can be called without blocking the calling thread. To check if a [Thread] is joinable, use [method is_started].

fn (Thread) wait_to_finish #

fn (s &Thread) wait_to_finish() Variant

Joins the [Thread] and waits for it to finish. Returns the output of the [Callable] passed to [method start]. Should either be used when you want to retrieve the value returned from the method called by the [Thread] or before freeing the instance that contains the [Thread]. To determine if this can be called without blocking the calling thread, check if [method is_alive] is false.

struct Thread_start_Cfg #

@[params]
struct Thread_start_Cfg {
pub:
	priority ThreadPriority = unsafe { ThreadPriority(1) }
}

Optional parameters for Thread#start

struct TileData #

struct TileData {
	Object
}

Settings for a single tile in a [TileSet].

fn (TileData) to_variant #

fn (s &TileData) to_variant() Variant

fn (TileData) from_variant #

fn (mut s TileData) from_variant(variant &Variant)

fn (TileData) set_flip_h #

fn (s &TileData) set_flip_h(flip_h bool)

fn (TileData) get_flip_h #

fn (s &TileData) get_flip_h() bool

fn (TileData) set_flip_v #

fn (s &TileData) set_flip_v(flip_v bool)

fn (TileData) get_flip_v #

fn (s &TileData) get_flip_v() bool

fn (TileData) set_transpose #

fn (s &TileData) set_transpose(transpose bool)

fn (TileData) get_transpose #

fn (s &TileData) get_transpose() bool

fn (TileData) set_material #

fn (s &TileData) set_material(material Material)

fn (TileData) get_material #

fn (s &TileData) get_material() Material

fn (TileData) set_texture_origin #

fn (s &TileData) set_texture_origin(texture_origin Vector2i)

fn (TileData) get_texture_origin #

fn (s &TileData) get_texture_origin() Vector2i

fn (TileData) set_modulate #

fn (s &TileData) set_modulate(modulate Color)

fn (TileData) get_modulate #

fn (s &TileData) get_modulate() Color

fn (TileData) set_z_index #

fn (s &TileData) set_z_index(z_index i64)

fn (TileData) get_z_index #

fn (s &TileData) get_z_index() i64

fn (TileData) set_y_sort_origin #

fn (s &TileData) set_y_sort_origin(y_sort_origin i64)

fn (TileData) get_y_sort_origin #

fn (s &TileData) get_y_sort_origin() i64

fn (TileData) set_occluder_polygons_count #

fn (s &TileData) set_occluder_polygons_count(layer_id i64, polygons_count i64)

Sets the occluder polygon count in the TileSet occlusion layer with index [param layer_id].

fn (TileData) get_occluder_polygons_count #

fn (s &TileData) get_occluder_polygons_count(layer_id i64) i64

Returns the number of occluder polygons of the tile in the TileSet occlusion layer with index [param layer_id].

fn (TileData) add_occluder_polygon #

fn (s &TileData) add_occluder_polygon(layer_id i64)

Adds an occlusion polygon to the tile on the TileSet occlusion layer with index [param layer_id].

fn (TileData) remove_occluder_polygon #

fn (s &TileData) remove_occluder_polygon(layer_id i64, polygon_index i64)

Removes the polygon at index [param polygon_index] for TileSet occlusion layer with index [param layer_id].

fn (TileData) set_occluder_polygon #

fn (s &TileData) set_occluder_polygon(layer_id i64, polygon_index i64, polygon OccluderPolygon2D)

Sets the occluder for polygon with index [param polygon_index] in the TileSet occlusion layer with index [param layer_id].

fn (TileData) get_occluder_polygon #

fn (s &TileData) get_occluder_polygon(layer_id i64, polygon_index i64, cfg TileData_get_occluder_polygon_Cfg) OccluderPolygon2D

Returns the occluder polygon at index [param polygon_index] from the TileSet occlusion layer with index [param layer_id]. The [param flip_h], [param flip_v], and [param transpose] parameters can be true to transform the returned polygon.

fn (TileData) set_occluder #

fn (s &TileData) set_occluder(layer_id i64, occluder_polygon OccluderPolygon2D)

Sets the occluder for the TileSet occlusion layer with index [param layer_id].

fn (TileData) get_occluder #

fn (s &TileData) get_occluder(layer_id i64, cfg TileData_get_occluder_Cfg) OccluderPolygon2D

Returns the occluder polygon of the tile for the TileSet occlusion layer with index [param layer_id]. [param flip_h], [param flip_v], and [param transpose] allow transforming the returned polygon.

fn (TileData) set_constant_linear_velocity #

fn (s &TileData) set_constant_linear_velocity(layer_id i64, velocity Vector2)

Sets the constant linear velocity. This does not move the tile. This linear velocity is applied to objects colliding with this tile. This is useful to create conveyor belts.

fn (TileData) get_constant_linear_velocity #

fn (s &TileData) get_constant_linear_velocity(layer_id i64) Vector2

Returns the constant linear velocity applied to objects colliding with this tile.

fn (TileData) set_constant_angular_velocity #

fn (s &TileData) set_constant_angular_velocity(layer_id i64, velocity f64)

Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile.

fn (TileData) get_constant_angular_velocity #

fn (s &TileData) get_constant_angular_velocity(layer_id i64) f64

Returns the constant angular velocity applied to objects colliding with this tile.

fn (TileData) set_collision_polygons_count #

fn (s &TileData) set_collision_polygons_count(layer_id i64, polygons_count i64)

Sets the polygons count for TileSet physics layer with index [param layer_id].

fn (TileData) get_collision_polygons_count #

fn (s &TileData) get_collision_polygons_count(layer_id i64) i64

Returns how many polygons the tile has for TileSet physics layer with index [param layer_id].

fn (TileData) add_collision_polygon #

fn (s &TileData) add_collision_polygon(layer_id i64)

Adds a collision polygon to the tile on the given TileSet physics layer.

fn (TileData) remove_collision_polygon #

fn (s &TileData) remove_collision_polygon(layer_id i64, polygon_index i64)

Removes the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].

fn (TileData) set_collision_polygon_points #

fn (s &TileData) set_collision_polygon_points(layer_id i64, polygon_index i64, polygon PackedVector2Array)

Sets the points of the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].

fn (TileData) get_collision_polygon_points #

fn (s &TileData) get_collision_polygon_points(layer_id i64, polygon_index i64) PackedVector2Array

Returns the points of the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].

fn (TileData) set_collision_polygon_one_way #

fn (s &TileData) set_collision_polygon_one_way(layer_id i64, polygon_index i64, one_way bool)

Enables/disables one-way collisions on the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].

fn (TileData) is_collision_polygon_one_way #

fn (s &TileData) is_collision_polygon_one_way(layer_id i64, polygon_index i64) bool

Returns whether one-way collisions are enabled for the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].

fn (TileData) set_collision_polygon_one_way_margin #

fn (s &TileData) set_collision_polygon_one_way_margin(layer_id i64, polygon_index i64, one_way_margin f64)

Sets the one-way margin (for one-way platforms) of the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].

fn (TileData) get_collision_polygon_one_way_margin #

fn (s &TileData) get_collision_polygon_one_way_margin(layer_id i64, polygon_index i64) f64

Returns the one-way margin (for one-way platforms) of the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].

fn (TileData) set_terrain_set #

fn (s &TileData) set_terrain_set(terrain_set i64)

fn (TileData) get_terrain_set #

fn (s &TileData) get_terrain_set() i64

fn (TileData) set_terrain #

fn (s &TileData) set_terrain(terrain i64)

fn (TileData) get_terrain #

fn (s &TileData) get_terrain() i64

fn (TileData) set_terrain_peering_bit #

fn (s &TileData) set_terrain_peering_bit(peering_bit TileSetCellNeighbor, terrain i64)

Sets the tile's terrain bit for the given [param peering_bit] direction. To check that a direction is valid, use [method is_valid_terrain_peering_bit].

fn (TileData) get_terrain_peering_bit #

fn (s &TileData) get_terrain_peering_bit(peering_bit TileSetCellNeighbor) i64

Returns the tile's terrain bit for the given [param peering_bit] direction. To check that a direction is valid, use [method is_valid_terrain_peering_bit].

fn (TileData) is_valid_terrain_peering_bit #

fn (s &TileData) is_valid_terrain_peering_bit(peering_bit TileSetCellNeighbor) bool

Returns whether the given [param peering_bit] direction is valid for this tile.

fn (TileData) set_navigation_polygon #

fn (s &TileData) set_navigation_polygon(layer_id i64, navigation_polygon NavigationPolygon)

Sets the navigation polygon for the TileSet navigation layer with index [param layer_id].

fn (TileData) get_navigation_polygon #

fn (s &TileData) get_navigation_polygon(layer_id i64, cfg TileData_get_navigation_polygon_Cfg) NavigationPolygon

Returns the navigation polygon of the tile for the TileSet navigation layer with index [param layer_id]. [param flip_h], [param flip_v], and [param transpose] allow transforming the returned polygon.

fn (TileData) set_probability #

fn (s &TileData) set_probability(probability f64)

fn (TileData) get_probability #

fn (s &TileData) get_probability() f64

fn (TileData) set_custom_data #

fn (s &TileData) set_custom_data(layer_name string, value_ ToVariant)

Sets the tile's custom data value for the TileSet custom data layer with name [param layer_name].

fn (TileData) get_custom_data #

fn (s &TileData) get_custom_data(layer_name string) Variant

Returns the custom data value for custom data layer named [param layer_name]. To check if a custom data layer exists, use [method has_custom_data].

fn (TileData) has_custom_data #

fn (s &TileData) has_custom_data(layer_name string) bool

Returns whether there exists a custom data layer named [param layer_name].

fn (TileData) set_custom_data_by_layer_id #

fn (s &TileData) set_custom_data_by_layer_id(layer_id i64, value_ ToVariant)

Sets the tile's custom data value for the TileSet custom data layer with index [param layer_id].

fn (TileData) get_custom_data_by_layer_id #

fn (s &TileData) get_custom_data_by_layer_id(layer_id i64) Variant

Returns the custom data value for custom data layer with index [param layer_id].

struct TileData_get_navigation_polygon_Cfg #

@[params]
struct TileData_get_navigation_polygon_Cfg {
pub:
	flip_h    bool
	flip_v    bool
	transpose bool
}

Optional parameters for TileData#get_navigation_polygon

struct TileData_get_occluder_Cfg #

@[params]
struct TileData_get_occluder_Cfg {
pub:
	flip_h    bool
	flip_v    bool
	transpose bool
}

Optional parameters for TileData#get_occluder

struct TileData_get_occluder_polygon_Cfg #

@[params]
struct TileData_get_occluder_polygon_Cfg {
pub:
	flip_h    bool
	flip_v    bool
	transpose bool
}

Optional parameters for TileData#get_occluder_polygon

struct TileMap #

struct TileMap {
	Node2D
}

Node for 2D tile-based maps.

fn (TileMap) to_variant #

fn (s &TileMap) to_variant() Variant

fn (TileMap) from_variant #

fn (mut s TileMap) from_variant(variant &Variant)

fn (TileMap) gd_use_tile_data_runtime_update #

fn (s &TileMap) gd_use_tile_data_runtime_update(layer i64, coords Vector2i) bool

Should return true if the tile at coordinates [param coords] on layer [param layer] requires a runtime update. [b]Warning:[/b] Make sure this function only return true when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. [b]Note:[/b] If the result of this function should changed, use [method notify_runtime_tile_data_update] to notify the TileMap it needs an update.

fn (TileMap) gd_tile_data_runtime_update #

fn (s &TileMap) gd_tile_data_runtime_update(layer i64, coords Vector2i, tile_data TileData)

Called with a TileData object about to be used internally by the TileMap, allowing its modification at runtime. This method is only called if [method _use_tile_data_runtime_update] is implemented and returns true for the given tile [param coords] and [param layer]. [b]Warning:[/b] The [param tile_data] object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources. [b]Note:[/b] If the properties of [param tile_data] object should change over time, use [method notify_runtime_tile_data_update] to notify the TileMap it needs an update.

fn (TileMap) set_navigation_map #

fn (s &TileMap) set_navigation_map(layer i64, gd_map RID)

Assigns [param map] as a [NavigationServer2D] navigation map for the specified TileMap layer [param layer].

fn (TileMap) get_navigation_map #

fn (s &TileMap) get_navigation_map(layer i64) RID

Returns the [RID] of the [NavigationServer2D] navigation map assigned to the specified TileMap layer [param layer].

fn (TileMap) force_update #

fn (s &TileMap) force_update(cfg TileMap_force_update_Cfg)

Forces the TileMap and the layer [param layer] to update.

fn (TileMap) set_tileset #

fn (s &TileMap) set_tileset(tileset TileSet)

fn (TileMap) get_tileset #

fn (s &TileMap) get_tileset() TileSet

fn (TileMap) set_rendering_quadrant_size #

fn (s &TileMap) set_rendering_quadrant_size(size i64)

fn (TileMap) get_rendering_quadrant_size #

fn (s &TileMap) get_rendering_quadrant_size() i64

fn (TileMap) get_layers_count #

fn (s &TileMap) get_layers_count() i64

Returns the number of layers in the TileMap.

fn (TileMap) add_layer #

fn (s &TileMap) add_layer(to_position i64)

Adds a layer at the given position [param to_position] in the array. If [param to_position] is negative, the position is counted from the end, with -1 adding the layer at the end of the array.

fn (TileMap) move_layer #

fn (s &TileMap) move_layer(layer i64, to_position i64)

Moves the layer at index [param layer] to the given position [param to_position] in the array.

fn (TileMap) remove_layer #

fn (s &TileMap) remove_layer(layer i64)

Removes the layer at index [param layer].

fn (TileMap) set_layer_name #

fn (s &TileMap) set_layer_name(layer i64, name string)

Sets a layer's name. This is mostly useful in the editor. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_layer_name #

fn (s &TileMap) get_layer_name(layer i64) string

Returns a TileMap layer's name. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) set_layer_enabled #

fn (s &TileMap) set_layer_enabled(layer i64, enabled bool)

Enables or disables the layer [param layer]. A disabled layer is not processed at all (no rendering, no physics, etc.). If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) is_layer_enabled #

fn (s &TileMap) is_layer_enabled(layer i64) bool

Returns if a layer is enabled. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) set_layer_modulate #

fn (s &TileMap) set_layer_modulate(layer i64, modulate Color)

Sets a layer's color. It will be multiplied by tile's color and TileMap's modulate. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_layer_modulate #

fn (s &TileMap) get_layer_modulate(layer i64) Color

Returns a TileMap layer's modulate. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) set_layer_y_sort_enabled #

fn (s &TileMap) set_layer_y_sort_enabled(layer i64, y_sort_enabled bool)

Enables or disables a layer's Y-sorting. If a layer is Y-sorted, the layer will behave as a CanvasItem node where each of its tile gets Y-sorted. Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behavior. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) is_layer_y_sort_enabled #

fn (s &TileMap) is_layer_y_sort_enabled(layer i64) bool

Returns if a layer Y-sorts its tiles. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) set_layer_y_sort_origin #

fn (s &TileMap) set_layer_y_sort_origin(layer i64, y_sort_origin i64)

Sets a layer's Y-sort origin value. This Y-sort origin value is added to each tile's Y-sort origin value. This allows, for example, to fake a different height level on each layer. This can be useful for top-down view games. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_layer_y_sort_origin #

fn (s &TileMap) get_layer_y_sort_origin(layer i64) i64

Returns a TileMap layer's Y sort origin. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) set_layer_z_index #

fn (s &TileMap) set_layer_z_index(layer i64, z_index i64)

Sets a layers Z-index value. This Z-index is added to each tile's Z-index value. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_layer_z_index #

fn (s &TileMap) get_layer_z_index(layer i64) i64

Returns a TileMap layer's Z-index value. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) set_layer_navigation_enabled #

fn (s &TileMap) set_layer_navigation_enabled(layer i64, enabled bool)

Enables or disables a layer's built-in navigation regions generation. Disable this if you need to bake navigation regions from a TileMap using a [NavigationRegion2D] node.

fn (TileMap) is_layer_navigation_enabled #

fn (s &TileMap) is_layer_navigation_enabled(layer i64) bool

Returns if a layer's built-in navigation regions generation is enabled.

fn (TileMap) set_layer_navigation_map #

fn (s &TileMap) set_layer_navigation_map(layer i64, gd_map RID)

Assigns [param map] as a [NavigationServer2D] navigation map for the specified TileMap layer [param layer]. By default the TileMap uses the default [World2D] navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. In order to make [NavigationAgent2D] switch between TileMap layer navigation maps use [method NavigationAgent2D.set_navigation_map] with the navigation map received from [method get_layer_navigation_map]. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_layer_navigation_map #

fn (s &TileMap) get_layer_navigation_map(layer i64) RID

Returns the [RID] of the [NavigationServer2D] navigation map assigned to the specified TileMap layer [param layer]. By default the TileMap uses the default [World2D] navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. In order to make [NavigationAgent2D] switch between TileMap layer navigation maps use [method NavigationAgent2D.set_navigation_map] with the navigation map received from [method get_layer_navigation_map]. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) set_collision_animatable #

fn (s &TileMap) set_collision_animatable(enabled bool)

fn (TileMap) is_collision_animatable #

fn (s &TileMap) is_collision_animatable() bool

fn (TileMap) set_collision_visibility_mode #

fn (s &TileMap) set_collision_visibility_mode(collision_visibility_mode TileMapVisibilityMode)

fn (TileMap) get_collision_visibility_mode #

fn (s &TileMap) get_collision_visibility_mode() TileMapVisibilityMode

fn (TileMap) set_navigation_visibility_mode #

fn (s &TileMap) set_navigation_visibility_mode(navigation_visibility_mode TileMapVisibilityMode)

fn (TileMap) get_navigation_visibility_mode #

fn (s &TileMap) get_navigation_visibility_mode() TileMapVisibilityMode

fn (TileMap) set_cell #

fn (s &TileMap) set_cell(layer i64, coords Vector2i, cfg TileMap_set_cell_Cfg)

Sets the tile identifiers for the cell on layer [param layer] at coordinates [param coords]. Each tile of the [TileSet] is identified using three parts:- The source identifier [param source_id] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id],

  • The atlas coordinates identifier [param atlas_coords] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]). For [TileSetScenesCollectionSource] it should always be Vector2i(0, 0)),
  • The alternative tile identifier [param alternative_tile] identifies a tile alternative in the atlas (if the source is a [TileSetAtlasSource]), and the scene for a [TileSetScenesCollectionSource].If [param source_id] is set to -1, [param atlas_coords] to Vector2i(-1, -1) or [param alternative_tile] to -1, the cell will be erased. An erased cell gets [b]all[/b] its identifiers automatically set to their respective invalid values, namely -1, Vector2i(-1, -1) and -1. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) erase_cell #

fn (s &TileMap) erase_cell(layer i64, coords Vector2i)

Erases the cell on layer [param layer] at coordinates [param coords]. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_cell_source_id #

fn (s &TileMap) get_cell_source_id(layer i64, coords Vector2i, cfg TileMap_get_cell_source_id_Cfg) i64

Returns the tile source ID of the cell on layer [param layer] at coordinates [param coords]. Returns -1 if the cell does not exist. If [param use_proxies] is false, ignores the [TileSet]'s tile proxies, returning the raw source identifier. See [method TileSet.map_tile_proxy]. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_cell_atlas_coords #

fn (s &TileMap) get_cell_atlas_coords(layer i64, coords Vector2i, cfg TileMap_get_cell_atlas_coords_Cfg) Vector2i

Returns the tile atlas coordinates ID of the cell on layer [param layer] at coordinates [param coords]. Returns Vector2i(-1, -1) if the cell does not exist. If [param use_proxies] is false, ignores the [TileSet]'s tile proxies, returning the raw atlas coordinate identifier. See [method TileSet.map_tile_proxy]. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_cell_alternative_tile #

fn (s &TileMap) get_cell_alternative_tile(layer i64, coords Vector2i, cfg TileMap_get_cell_alternative_tile_Cfg) i64

Returns the tile alternative ID of the cell on layer [param layer] at [param coords]. If [param use_proxies] is false, ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_cell_tile_data #

fn (s &TileMap) get_cell_tile_data(layer i64, coords Vector2i, cfg TileMap_get_cell_tile_data_Cfg) TileData

Returns the [TileData] object associated with the given cell, or null if the cell does not exist or is not a [TileSetAtlasSource]. If [param layer] is negative, the layers are accessed from the last one.

func get_clicked_tile_power():
var clicked_cell = tile_map.local_to_map(tile_map.get_local_mouse_position())
var data = tile_map.get_cell_tile_data(0, clicked_cell)
if data:
return data.get_custom_data('power')
else:
return 0

If [param use_proxies] is false, ignores the [TileSet]'s tile proxies. See [method TileSet.map_tile_proxy].

fn (TileMap) is_cell_flipped_h #

fn (s &TileMap) is_cell_flipped_h(layer i64, coords Vector2i, cfg TileMap_is_cell_flipped_h_Cfg) bool

Returns true if the cell on layer [param layer] at coordinates [param coords] is flipped horizontally. The result is valid only for atlas sources.

fn (TileMap) is_cell_flipped_v #

fn (s &TileMap) is_cell_flipped_v(layer i64, coords Vector2i, cfg TileMap_is_cell_flipped_v_Cfg) bool

Returns true if the cell on layer [param layer] at coordinates [param coords] is flipped vertically. The result is valid only for atlas sources.

fn (TileMap) is_cell_transposed #

fn (s &TileMap) is_cell_transposed(layer i64, coords Vector2i, cfg TileMap_is_cell_transposed_Cfg) bool

Returns true if the cell on layer [param layer] at coordinates [param coords] is transposed. The result is valid only for atlas sources.

fn (TileMap) get_coords_for_body_rid #

fn (s &TileMap) get_coords_for_body_rid(body RID) Vector2i

Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile.

fn (TileMap) get_layer_for_body_rid #

fn (s &TileMap) get_layer_for_body_rid(body RID) i64

Returns the tilemap layer of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile.

fn (TileMap) get_pattern #

fn (s &TileMap) get_pattern(layer i64, coords_array Array) TileMapPattern

Creates a new [TileMapPattern] from the given layer and set of cells. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) map_pattern #

fn (s &TileMap) map_pattern(position_in_tilemap Vector2i, coords_in_pattern Vector2i, pattern TileMapPattern) Vector2i

Returns for the given coordinate [param coords_in_pattern] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [param position_in_tilemap] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating position_in_tile_map + coords_in_pattern.

fn (TileMap) set_pattern #

fn (s &TileMap) set_pattern(layer i64, position Vector2i, pattern TileMapPattern)

Paste the given [TileMapPattern] at the given [param position] and [param layer] in the tile map. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) set_cells_terrain_connect #

fn (s &TileMap) set_cells_terrain_connect(layer i64, cells Array, terrain_set i64, terrain i64, cfg TileMap_set_cells_terrain_connect_Cfg)

Update all the cells in the [param cells] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. If [param layer] is negative, the layers are accessed from the last one. [b]Note:[/b] To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.

fn (TileMap) set_cells_terrain_path #

fn (s &TileMap) set_cells_terrain_path(layer i64, path Array, terrain_set i64, terrain i64, cfg TileMap_set_cells_terrain_path_Cfg)

Update all the cells in the [param path] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. If [param layer] is negative, the layers are accessed from the last one. [b]Note:[/b] To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.

fn (TileMap) fix_invalid_tiles #

fn (s &TileMap) fix_invalid_tiles()

Clears cells that do not exist in the tileset.

fn (TileMap) clear_layer #

fn (s &TileMap) clear_layer(layer i64)

Clears all cells on the given layer. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) clear #

fn (s &TileMap) clear()

Clears all cells.

fn (TileMap) update_internals #

fn (s &TileMap) update_internals()

Triggers a direct update of the TileMap. Usually, calling this function is not needed, as TileMap node updates automatically when one of its properties or cells is modified. However, for performance reasons, those updates are batched and delayed to the end of the frame. Calling this function will force the TileMap to update right away instead. [b]Warning:[/b] Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and how many tiles they impact.

fn (TileMap) notify_runtime_tile_data_update #

fn (s &TileMap) notify_runtime_tile_data_update(cfg TileMap_notify_runtime_tile_data_update_Cfg)

Notifies the TileMap node that calls to [method _use_tile_data_runtime_update] or [method _tile_data_runtime_update] will lead to different results. This will thus trigger a TileMap update. If [param layer] is provided, only notifies changes for the given layer. Providing the [param layer] argument (when applicable) is usually preferred for performance reasons. [b]Warning:[/b] Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of calls to this function to avoid unnecessary update. [b]Note:[/b] This does not trigger a direct update of the TileMap, the update will be done at the end of the frame as usual (unless you call [method update_internals]).

fn (TileMap) get_surrounding_cells #

fn (s &TileMap) get_surrounding_cells(coords Vector2i) Array

Returns the list of all neighbourings cells to the one at [param coords].

fn (TileMap) get_used_cells #

fn (s &TileMap) get_used_cells(layer i64) Array

Returns a [Vector2i] array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is Vector2(-1, -1) and its alternative identifier is -1. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_used_cells_by_id #

fn (s &TileMap) get_used_cells_by_id(layer i64, cfg TileMap_get_used_cells_by_id_Cfg) Array

Returns a [Vector2i] array with the positions of all cells containing a tile in the given layer. Tiles may be filtered according to their source ([param source_id]), their atlas coordinates ([param atlas_coords]) or alternative id ([param alternative_tile]). If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default value, this method returns the same result as [method get_used_cells]. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is Vector2(-1, -1) and its alternative identifier is -1. If [param layer] is negative, the layers are accessed from the last one.

fn (TileMap) get_used_rect #

fn (s &TileMap) get_used_rect() Rect2i

Returns a rectangle enclosing the used (non-empty) tiles of the map, including all layers.

fn (TileMap) map_to_local #

fn (s &TileMap) map_to_local(map_position Vector2i) Vector2

Returns the centered position of a cell in the TileMap's local coordinate space. To convert the returned value into global coordinates, use [method Node2D.to_global]. See also [method local_to_map]. [b]Note:[/b] This may not correspond to the visual position of the tile, i.e. it ignores the [member TileData.texture_origin] property of individual tiles.

fn (TileMap) local_to_map #

fn (s &TileMap) local_to_map(local_position Vector2) Vector2i

Returns the map coordinates of the cell containing the given [param local_position]. If [param local_position] is in global coordinates, consider using [method Node2D.to_local] before passing it to this method. See also [method map_to_local].

fn (TileMap) get_neighbor_cell #

fn (s &TileMap) get_neighbor_cell(coords Vector2i, neighbor TileSetCellNeighbor) Vector2i

Returns the neighboring cell to the one at coordinates [param coords], identified by the [param neighbor] direction. This method takes into account the different layouts a TileMap can take.

struct TileMapLayer #

struct TileMapLayer {
	Node2D
}

Node for 2D tile-based maps.

fn (TileMapLayer) to_variant #

fn (s &TileMapLayer) to_variant() Variant

fn (TileMapLayer) from_variant #

fn (mut s TileMapLayer) from_variant(variant &Variant)

fn (TileMapLayer) gd_use_tile_data_runtime_update #

fn (s &TileMapLayer) gd_use_tile_data_runtime_update(coords Vector2i) bool

Should return true if the tile at coordinates [param coords] requires a runtime update. [b]Warning:[/b] Make sure this function only returns true when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. [b]Note:[/b] If the result of this function should change, use [method notify_runtime_tile_data_update] to notify the [TileMapLayer] it needs an update.

fn (TileMapLayer) gd_tile_data_runtime_update #

fn (s &TileMapLayer) gd_tile_data_runtime_update(coords Vector2i, tile_data TileData)

Called with a [TileData] object about to be used internally by the [TileMapLayer], allowing its modification at runtime. This method is only called if [method _use_tile_data_runtime_update] is implemented and returns true for the given tile [param coords]. [b]Warning:[/b] The [param tile_data] object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources. [b]Note:[/b] If the properties of [param tile_data] object should change over time, use [method notify_runtime_tile_data_update] to notify the [TileMapLayer] it needs an update.

fn (TileMapLayer) gd_update_cells #

fn (s &TileMapLayer) gd_update_cells(coords Array, forced_cleanup bool)

Called when this [TileMapLayer]'s cells need an internal update. This update may be caused from individual cells being modified or by a change in the [member tile_set] (causing all cells to be queued for an update). The first call to this function is always for initializing all the [TileMapLayer]'s cells. [param coords] contains the coordinates of all modified cells, roughly in the order they were modified. [param forced_cleanup] is true when the [TileMapLayer]'s internals should be fully cleaned up. This is the case when:- The layer is disabled;

  • The layer is not visible;
  • [member tile_set] is set to null;
  • The node is removed from the tree;
  • The node is freed.Note that any internal update happening while one of these conditions is verified is considered to be a "cleanup". See also [method update_internals]. [b]Warning:[/b] Implementing this method may degrade the [TileMapLayer]'s performance.

fn (TileMapLayer) set_cell #

fn (s &TileMapLayer) set_cell(coords Vector2i, cfg TileMapLayer_set_cell_Cfg)

Sets the tile identifiers for the cell at coordinates [param coords]. Each tile of the [TileSet] is identified using three parts:- The source identifier [param source_id] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id],

  • The atlas coordinate identifier [param atlas_coords] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]). For [TileSetScenesCollectionSource] it should always be Vector2i(0, 0),
  • The alternative tile identifier [param alternative_tile] identifies a tile alternative in the atlas (if the source is a [TileSetAtlasSource]), and the scene for a [TileSetScenesCollectionSource].If [param source_id] is set to -1, [param atlas_coords] to Vector2i(-1, -1), or [param alternative_tile] to -1, the cell will be erased. An erased cell gets [b]all[/b] its identifiers automatically set to their respective invalid values, namely -1, Vector2i(-1, -1) and -1.

fn (TileMapLayer) erase_cell #

fn (s &TileMapLayer) erase_cell(coords Vector2i)

Erases the cell at coordinates [param coords].

fn (TileMapLayer) fix_invalid_tiles #

fn (s &TileMapLayer) fix_invalid_tiles()

Clears cells containing tiles that do not exist in the [member tile_set].

fn (TileMapLayer) clear #

fn (s &TileMapLayer) clear()

Clears all cells.

fn (TileMapLayer) get_cell_source_id #

fn (s &TileMapLayer) get_cell_source_id(coords Vector2i) i64

Returns the tile source ID of the cell at coordinates [param coords]. Returns -1 if the cell does not exist.

fn (TileMapLayer) get_cell_atlas_coords #

fn (s &TileMapLayer) get_cell_atlas_coords(coords Vector2i) Vector2i

Returns the tile atlas coordinates ID of the cell at coordinates [param coords]. Returns Vector2i(-1, -1) if the cell does not exist.

fn (TileMapLayer) get_cell_alternative_tile #

fn (s &TileMapLayer) get_cell_alternative_tile(coords Vector2i) i64

Returns the tile alternative ID of the cell at coordinates [param coords].

fn (TileMapLayer) get_cell_tile_data #

fn (s &TileMapLayer) get_cell_tile_data(coords Vector2i) TileData

Returns the [TileData] object associated with the given cell, or null if the cell does not exist or is not a [TileSetAtlasSource].

func get_clicked_tile_power():
var clicked_cell = tile_map_layer.local_to_map(tile_map_layer.get_local_mouse_position())
var data = tile_map_layer.get_cell_tile_data(clicked_cell)
if data:
return data.get_custom_data('power')
else:
return 0

fn (TileMapLayer) is_cell_flipped_h #

fn (s &TileMapLayer) is_cell_flipped_h(coords Vector2i) bool

Returns true if the cell at coordinates [param coords] is flipped horizontally. The result is valid only for atlas sources.

fn (TileMapLayer) is_cell_flipped_v #

fn (s &TileMapLayer) is_cell_flipped_v(coords Vector2i) bool

Returns true if the cell at coordinates [param coords] is flipped vertically. The result is valid only for atlas sources.

fn (TileMapLayer) is_cell_transposed #

fn (s &TileMapLayer) is_cell_transposed(coords Vector2i) bool

Returns true if the cell at coordinates [param coords] is transposed. The result is valid only for atlas sources.

fn (TileMapLayer) get_used_cells #

fn (s &TileMapLayer) get_used_cells() Array

Returns a [Vector2i] array with the positions of all cells containing a tile. A cell is considered empty if its source identifier equals -1, its atlas coordinate identifier is Vector2(-1, -1) and its alternative identifier is -1.

fn (TileMapLayer) get_used_cells_by_id #

fn (s &TileMapLayer) get_used_cells_by_id(cfg TileMapLayer_get_used_cells_by_id_Cfg) Array

Returns a [Vector2i] array with the positions of all cells containing a tile. Tiles may be filtered according to their source ([param source_id]), their atlas coordinates ([param atlas_coords]), or alternative id ([param alternative_tile]). If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default values, this method returns the same result as [method get_used_cells]. A cell is considered empty if its source identifier equals -1, its atlas coordinate identifier is Vector2(-1, -1) and its alternative identifier is -1.

fn (TileMapLayer) get_used_rect #

fn (s &TileMapLayer) get_used_rect() Rect2i

Returns a rectangle enclosing the used (non-empty) tiles of the map.

fn (TileMapLayer) get_pattern #

fn (s &TileMapLayer) get_pattern(coords_array Array) TileMapPattern

Creates and returns a new [TileMapPattern] from the given array of cells. See also [method set_pattern].

fn (TileMapLayer) set_pattern #

fn (s &TileMapLayer) set_pattern(position Vector2i, pattern TileMapPattern)

Pastes the [TileMapPattern] at the given [param position] in the tile map. See also [method get_pattern].

fn (TileMapLayer) set_cells_terrain_connect #

fn (s &TileMapLayer) set_cells_terrain_connect(cells Array, terrain_set i64, terrain i64, cfg TileMapLayer_set_cells_terrain_connect_Cfg)

Update all the cells in the [param cells] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. [b]Note:[/b] To work correctly, this method requires the [TileMapLayer]'s TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.

fn (TileMapLayer) set_cells_terrain_path #

fn (s &TileMapLayer) set_cells_terrain_path(path Array, terrain_set i64, terrain i64, cfg TileMapLayer_set_cells_terrain_path_Cfg)

Update all the cells in the [param path] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. [b]Note:[/b] To work correctly, this method requires the [TileMapLayer]'s TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.

fn (TileMapLayer) has_body_rid #

fn (s &TileMapLayer) has_body_rid(body RID) bool

Returns whether the provided [param body] [RID] belongs to one of this [TileMapLayer]'s cells.

fn (TileMapLayer) get_coords_for_body_rid #

fn (s &TileMapLayer) get_coords_for_body_rid(body RID) Vector2i

Returns the coordinates of the physics quadrant (see [member physics_quadrant_size]) for given physics body [RID]. Such an [RID] can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile.

fn (TileMapLayer) update_internals #

fn (s &TileMapLayer) update_internals()

Triggers a direct update of the [TileMapLayer]. Usually, calling this function is not needed, as [TileMapLayer] node updates automatically when one of its properties or cells is modified. However, for performance reasons, those updates are batched and delayed to the end of the frame. Calling this function will force the [TileMapLayer] to update right away instead. [b]Warning:[/b] Updating the [TileMapLayer] is computationally expensive and may impact performance. Try to limit the number of updates and how many tiles they impact.

fn (TileMapLayer) notify_runtime_tile_data_update #

fn (s &TileMapLayer) notify_runtime_tile_data_update()

Notifies the [TileMapLayer] node that calls to [method _use_tile_data_runtime_update] or [method _tile_data_runtime_update] will lead to different results. This will thus trigger a [TileMapLayer] update. [b]Warning:[/b] Updating the [TileMapLayer] is computationally expensive and may impact performance. Try to limit the number of calls to this function to avoid unnecessary update. [b]Note:[/b] This does not trigger a direct update of the [TileMapLayer], the update will be done at the end of the frame as usual (unless you call [method update_internals]).

fn (TileMapLayer) map_pattern #

fn (s &TileMapLayer) map_pattern(position_in_tilemap Vector2i, coords_in_pattern Vector2i, pattern TileMapPattern) Vector2i

Returns for the given coordinates [param coords_in_pattern] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [param position_in_tilemap] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating position_in_tile_map + coords_in_pattern.

fn (TileMapLayer) get_surrounding_cells #

fn (s &TileMapLayer) get_surrounding_cells(coords Vector2i) Array

Returns the list of all neighboring cells to the one at [param coords]. Any neighboring cell is one that is touching edges, so for a square cell 4 cells would be returned, for a hexagon 6 cells are returned.

fn (TileMapLayer) get_neighbor_cell #

fn (s &TileMapLayer) get_neighbor_cell(coords Vector2i, neighbor TileSetCellNeighbor) Vector2i

Returns the neighboring cell to the one at coordinates [param coords], identified by the [param neighbor] direction. This method takes into account the different layouts a TileMap can take.

fn (TileMapLayer) map_to_local #

fn (s &TileMapLayer) map_to_local(map_position Vector2i) Vector2

Returns the centered position of a cell in the [TileMapLayer]'s local coordinate space. To convert the returned value into global coordinates, use [method Node2D.to_global]. See also [method local_to_map]. [b]Note:[/b] This may not correspond to the visual position of the tile, i.e. it ignores the [member TileData.texture_origin] property of individual tiles.

fn (TileMapLayer) local_to_map #

fn (s &TileMapLayer) local_to_map(local_position Vector2) Vector2i

Returns the map coordinates of the cell containing the given [param local_position]. If [param local_position] is in global coordinates, consider using [method Node2D.to_local] before passing it to this method. See also [method map_to_local].

fn (TileMapLayer) set_tile_map_data_from_array #

fn (s &TileMapLayer) set_tile_map_data_from_array(tile_map_layer_data PackedByteArray)

fn (TileMapLayer) get_tile_map_data_as_array #

fn (s &TileMapLayer) get_tile_map_data_as_array() PackedByteArray

fn (TileMapLayer) set_enabled #

fn (s &TileMapLayer) set_enabled(enabled bool)

fn (TileMapLayer) is_enabled #

fn (s &TileMapLayer) is_enabled() bool

fn (TileMapLayer) set_tile_set #

fn (s &TileMapLayer) set_tile_set(tile_set TileSet)

fn (TileMapLayer) get_tile_set #

fn (s &TileMapLayer) get_tile_set() TileSet

fn (TileMapLayer) set_y_sort_origin #

fn (s &TileMapLayer) set_y_sort_origin(y_sort_origin i64)

fn (TileMapLayer) get_y_sort_origin #

fn (s &TileMapLayer) get_y_sort_origin() i64

fn (TileMapLayer) set_x_draw_order_reversed #

fn (s &TileMapLayer) set_x_draw_order_reversed(x_draw_order_reversed bool)

fn (TileMapLayer) is_x_draw_order_reversed #

fn (s &TileMapLayer) is_x_draw_order_reversed() bool

fn (TileMapLayer) set_rendering_quadrant_size #

fn (s &TileMapLayer) set_rendering_quadrant_size(size i64)

fn (TileMapLayer) get_rendering_quadrant_size #

fn (s &TileMapLayer) get_rendering_quadrant_size() i64

fn (TileMapLayer) set_collision_enabled #

fn (s &TileMapLayer) set_collision_enabled(enabled bool)

fn (TileMapLayer) is_collision_enabled #

fn (s &TileMapLayer) is_collision_enabled() bool

fn (TileMapLayer) set_use_kinematic_bodies #

fn (s &TileMapLayer) set_use_kinematic_bodies(use_kinematic_bodies bool)

fn (TileMapLayer) is_using_kinematic_bodies #

fn (s &TileMapLayer) is_using_kinematic_bodies() bool

fn (TileMapLayer) set_collision_visibility_mode #

fn (s &TileMapLayer) set_collision_visibility_mode(visibility_mode TileMapLayerDebugVisibilityMode)

fn (TileMapLayer) get_collision_visibility_mode #

fn (s &TileMapLayer) get_collision_visibility_mode() TileMapLayerDebugVisibilityMode

fn (TileMapLayer) set_physics_quadrant_size #

fn (s &TileMapLayer) set_physics_quadrant_size(size i64)

fn (TileMapLayer) get_physics_quadrant_size #

fn (s &TileMapLayer) get_physics_quadrant_size() i64

fn (TileMapLayer) set_occlusion_enabled #

fn (s &TileMapLayer) set_occlusion_enabled(enabled bool)

fn (TileMapLayer) is_occlusion_enabled #

fn (s &TileMapLayer) is_occlusion_enabled() bool

fn (TileMapLayer) set_navigation_enabled #

fn (s &TileMapLayer) set_navigation_enabled(enabled bool)

fn (TileMapLayer) is_navigation_enabled #

fn (s &TileMapLayer) is_navigation_enabled() bool

fn (TileMapLayer) set_navigation_map #

fn (s &TileMapLayer) set_navigation_map(gd_map RID)

Sets a custom [param map] as a [NavigationServer2D] navigation map. If not set, uses the default [World2D] navigation map instead.

fn (TileMapLayer) get_navigation_map #

fn (s &TileMapLayer) get_navigation_map() RID

Returns the [RID] of the [NavigationServer2D] navigation used by this [TileMapLayer]. By default this returns the default [World2D] navigation map, unless a custom map was provided using [method set_navigation_map].

fn (TileMapLayer) set_navigation_visibility_mode #

fn (s &TileMapLayer) set_navigation_visibility_mode(show_navigation TileMapLayerDebugVisibilityMode)

fn (TileMapLayer) get_navigation_visibility_mode #

fn (s &TileMapLayer) get_navigation_visibility_mode() TileMapLayerDebugVisibilityMode

struct TileMapLayer_get_used_cells_by_id_Cfg #

@[params]
struct TileMapLayer_get_used_cells_by_id_Cfg {
pub:
	source_id        i64      = -1
	atlas_coords     Vector2i = Vector2i{-1, -1}
	alternative_tile i64      = -1
}

Optional parameters for TileMapLayer#get_used_cells_by_id

struct TileMapLayer_set_cell_Cfg #

@[params]
struct TileMapLayer_set_cell_Cfg {
pub:
	source_id        i64      = -1
	atlas_coords     Vector2i = Vector2i{-1, -1}
	alternative_tile i64
}

Optional parameters for TileMapLayer#set_cell

struct TileMapLayer_set_cells_terrain_connect_Cfg #

@[params]
struct TileMapLayer_set_cells_terrain_connect_Cfg {
pub:
	ignore_empty_terrains bool
}

Optional parameters for TileMapLayer#set_cells_terrain_connect

struct TileMapLayer_set_cells_terrain_path_Cfg #

@[params]
struct TileMapLayer_set_cells_terrain_path_Cfg {
pub:
	ignore_empty_terrains bool
}

Optional parameters for TileMapLayer#set_cells_terrain_path

struct TileMapPattern #

struct TileMapPattern {
	Resource
}

Holds a pattern to be copied from or pasted into [TileMap]s.

fn (TileMapPattern) to_variant #

fn (s &TileMapPattern) to_variant() Variant

fn (TileMapPattern) from_variant #

fn (mut s TileMapPattern) from_variant(variant &Variant)

fn (TileMapPattern) set_cell #

fn (s &TileMapPattern) set_cell(coords Vector2i, cfg TileMapPattern_set_cell_Cfg)

Sets the tile identifiers for the cell at coordinates [param coords]. See [method TileMap.set_cell].

fn (TileMapPattern) has_cell #

fn (s &TileMapPattern) has_cell(coords Vector2i) bool

Returns whether the pattern has a tile at the given coordinates.

fn (TileMapPattern) remove_cell #

fn (s &TileMapPattern) remove_cell(coords Vector2i, update_size bool)

Remove the cell at the given coordinates.

fn (TileMapPattern) get_cell_source_id #

fn (s &TileMapPattern) get_cell_source_id(coords Vector2i) i64

Returns the tile source ID of the cell at [param coords].

fn (TileMapPattern) get_cell_atlas_coords #

fn (s &TileMapPattern) get_cell_atlas_coords(coords Vector2i) Vector2i

Returns the tile atlas coordinates ID of the cell at [param coords].

fn (TileMapPattern) get_cell_alternative_tile #

fn (s &TileMapPattern) get_cell_alternative_tile(coords Vector2i) i64

Returns the tile alternative ID of the cell at [param coords].

fn (TileMapPattern) get_used_cells #

fn (s &TileMapPattern) get_used_cells() Array

Returns the list of used cell coordinates in the pattern.

fn (TileMapPattern) get_size #

fn (s &TileMapPattern) get_size() Vector2i

Returns the size, in cells, of the pattern.

fn (TileMapPattern) set_size #

fn (s &TileMapPattern) set_size(size Vector2i)

Sets the size of the pattern.

fn (TileMapPattern) is_empty #

fn (s &TileMapPattern) is_empty() bool

Returns whether the pattern is empty or not.

struct TileMapPattern_set_cell_Cfg #

@[params]
struct TileMapPattern_set_cell_Cfg {
pub:
	source_id        i64      = -1
	atlas_coords     Vector2i = Vector2i{-1, -1}
	alternative_tile i64      = -1
}

Optional parameters for TileMapPattern#set_cell

struct TileMap_force_update_Cfg #

@[params]
struct TileMap_force_update_Cfg {
pub:
	layer i64 = -1
}

Optional parameters for TileMap#force_update

struct TileMap_get_cell_alternative_tile_Cfg #

@[params]
struct TileMap_get_cell_alternative_tile_Cfg {
pub:
	use_proxies bool
}

Optional parameters for TileMap#get_cell_alternative_tile

struct TileMap_get_cell_atlas_coords_Cfg #

@[params]
struct TileMap_get_cell_atlas_coords_Cfg {
pub:
	use_proxies bool
}

Optional parameters for TileMap#get_cell_atlas_coords

struct TileMap_get_cell_source_id_Cfg #

@[params]
struct TileMap_get_cell_source_id_Cfg {
pub:
	use_proxies bool
}

Optional parameters for TileMap#get_cell_source_id

struct TileMap_get_cell_tile_data_Cfg #

@[params]
struct TileMap_get_cell_tile_data_Cfg {
pub:
	use_proxies bool
}

Optional parameters for TileMap#get_cell_tile_data

struct TileMap_get_used_cells_by_id_Cfg #

@[params]
struct TileMap_get_used_cells_by_id_Cfg {
pub:
	source_id        i64      = -1
	atlas_coords     Vector2i = Vector2i{-1, -1}
	alternative_tile i64      = -1
}

Optional parameters for TileMap#get_used_cells_by_id

struct TileMap_is_cell_flipped_h_Cfg #

@[params]
struct TileMap_is_cell_flipped_h_Cfg {
pub:
	use_proxies bool
}

Optional parameters for TileMap#is_cell_flipped_h

struct TileMap_is_cell_flipped_v_Cfg #

@[params]
struct TileMap_is_cell_flipped_v_Cfg {
pub:
	use_proxies bool
}

Optional parameters for TileMap#is_cell_flipped_v

struct TileMap_is_cell_transposed_Cfg #

@[params]
struct TileMap_is_cell_transposed_Cfg {
pub:
	use_proxies bool
}

Optional parameters for TileMap#is_cell_transposed

struct TileMap_notify_runtime_tile_data_update_Cfg #

@[params]
struct TileMap_notify_runtime_tile_data_update_Cfg {
pub:
	layer i64 = -1
}

Optional parameters for TileMap#notify_runtime_tile_data_update

struct TileMap_set_cell_Cfg #

@[params]
struct TileMap_set_cell_Cfg {
pub:
	source_id        i64      = -1
	atlas_coords     Vector2i = Vector2i{-1, -1}
	alternative_tile i64
}

Optional parameters for TileMap#set_cell

struct TileMap_set_cells_terrain_connect_Cfg #

@[params]
struct TileMap_set_cells_terrain_connect_Cfg {
pub:
	ignore_empty_terrains bool
}

Optional parameters for TileMap#set_cells_terrain_connect

struct TileMap_set_cells_terrain_path_Cfg #

@[params]
struct TileMap_set_cells_terrain_path_Cfg {
pub:
	ignore_empty_terrains bool
}

Optional parameters for TileMap#set_cells_terrain_path

struct TileSet #

struct TileSet {
	Resource
}

Tile library for tilemaps.

fn (TileSet) to_variant #

fn (s &TileSet) to_variant() Variant

fn (TileSet) from_variant #

fn (mut s TileSet) from_variant(variant &Variant)

fn (TileSet) get_next_source_id #

fn (s &TileSet) get_next_source_id() i64

Returns a new unused source ID. This generated ID is the same that a call to [method add_source] would return.

fn (TileSet) add_source #

fn (s &TileSet) add_source(source TileSetSource, cfg TileSet_add_source_Cfg) i64

Adds a [TileSetSource] to the TileSet. If [param atlas_source_id_override] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. The function returns the added source ID or -1 if the source could not be added. [b]Warning:[/b] A source cannot belong to two TileSets at the same time. If the added source was attached to another [TileSet], it will be removed from that one.

fn (TileSet) remove_source #

fn (s &TileSet) remove_source(source_id i64)

Removes the source with the given source ID.

fn (TileSet) set_source_id #

fn (s &TileSet) set_source_id(source_id i64, new_source_id i64)

Changes a source's ID.

fn (TileSet) get_source_count #

fn (s &TileSet) get_source_count() i64

Returns the number of [TileSetSource] in this TileSet.

fn (TileSet) get_source_id #

fn (s &TileSet) get_source_id(index i64) i64

Returns the source ID for source with index [param index].

fn (TileSet) has_source #

fn (s &TileSet) has_source(source_id i64) bool

Returns if this TileSet has a source for the given source ID.

fn (TileSet) get_source #

fn (s &TileSet) get_source(source_id i64) TileSetSource

Returns the [TileSetSource] with ID [param source_id].

fn (TileSet) set_tile_shape #

fn (s &TileSet) set_tile_shape(shape TileSetTileShape)

fn (TileSet) get_tile_shape #

fn (s &TileSet) get_tile_shape() TileSetTileShape

fn (TileSet) set_tile_layout #

fn (s &TileSet) set_tile_layout(layout TileSetTileLayout)

fn (TileSet) get_tile_layout #

fn (s &TileSet) get_tile_layout() TileSetTileLayout

fn (TileSet) set_tile_offset_axis #

fn (s &TileSet) set_tile_offset_axis(alignment TileSetTileOffsetAxis)

fn (TileSet) get_tile_offset_axis #

fn (s &TileSet) get_tile_offset_axis() TileSetTileOffsetAxis

fn (TileSet) set_tile_size #

fn (s &TileSet) set_tile_size(size Vector2i)

fn (TileSet) get_tile_size #

fn (s &TileSet) get_tile_size() Vector2i

fn (TileSet) set_uv_clipping #

fn (s &TileSet) set_uv_clipping(uv_clipping bool)

fn (TileSet) is_uv_clipping #

fn (s &TileSet) is_uv_clipping() bool

fn (TileSet) get_occlusion_layers_count #

fn (s &TileSet) get_occlusion_layers_count() i64

Returns the occlusion layers count.

fn (TileSet) add_occlusion_layer #

fn (s &TileSet) add_occlusion_layer(cfg TileSet_add_occlusion_layer_Cfg)

Adds an occlusion layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Occlusion layers allow assigning occlusion polygons to atlas tiles.

fn (TileSet) move_occlusion_layer #

fn (s &TileSet) move_occlusion_layer(layer_index i64, to_position i64)

Moves the occlusion layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.

fn (TileSet) remove_occlusion_layer #

fn (s &TileSet) remove_occlusion_layer(layer_index i64)

Removes the occlusion layer at index [param layer_index]. Also updates the atlas tiles accordingly.

fn (TileSet) set_occlusion_layer_light_mask #

fn (s &TileSet) set_occlusion_layer_light_mask(layer_index i64, light_mask i64)

Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer.

fn (TileSet) get_occlusion_layer_light_mask #

fn (s &TileSet) get_occlusion_layer_light_mask(layer_index i64) i64

Returns the light mask of the occlusion layer.

fn (TileSet) set_occlusion_layer_sdf_collision #

fn (s &TileSet) set_occlusion_layer_sdf_collision(layer_index i64, sdf_collision bool)

Enables or disables SDF collision for occluders in the given TileSet occlusion layer.

fn (TileSet) get_occlusion_layer_sdf_collision #

fn (s &TileSet) get_occlusion_layer_sdf_collision(layer_index i64) bool

Returns if the occluders from this layer use sdf_collision.

fn (TileSet) get_physics_layers_count #

fn (s &TileSet) get_physics_layers_count() i64

Returns the physics layers count.

fn (TileSet) add_physics_layer #

fn (s &TileSet) add_physics_layer(cfg TileSet_add_physics_layer_Cfg)

Adds a physics layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Physics layers allow assigning collision polygons to atlas tiles.

fn (TileSet) move_physics_layer #

fn (s &TileSet) move_physics_layer(layer_index i64, to_position i64)

Moves the physics layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.

fn (TileSet) remove_physics_layer #

fn (s &TileSet) remove_physics_layer(layer_index i64)

Removes the physics layer at index [param layer_index]. Also updates the atlas tiles accordingly.

fn (TileSet) set_physics_layer_collision_layer #

fn (s &TileSet) set_physics_layer_collision_layer(layer_index i64, layer i64)

Sets the collision layer (as in the physics server) for bodies in the given TileSet physics layer.

fn (TileSet) get_physics_layer_collision_layer #

fn (s &TileSet) get_physics_layer_collision_layer(layer_index i64) i64

Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in.

fn (TileSet) set_physics_layer_collision_mask #

fn (s &TileSet) set_physics_layer_collision_mask(layer_index i64, mask i64)

Sets the collision mask for bodies in the given TileSet physics layer.

fn (TileSet) get_physics_layer_collision_mask #

fn (s &TileSet) get_physics_layer_collision_mask(layer_index i64) i64

Returns the collision mask of bodies on the given TileSet's physics layer.

fn (TileSet) set_physics_layer_collision_priority #

fn (s &TileSet) set_physics_layer_collision_priority(layer_index i64, priority f64)

Sets the collision priority for bodies in the given TileSet physics layer.

fn (TileSet) get_physics_layer_collision_priority #

fn (s &TileSet) get_physics_layer_collision_priority(layer_index i64) f64

Returns the collision priority of bodies on the given TileSet's physics layer.

fn (TileSet) set_physics_layer_physics_material #

fn (s &TileSet) set_physics_layer_physics_material(layer_index i64, physics_material PhysicsMaterial)

Sets the physics material for bodies in the given TileSet physics layer.

fn (TileSet) get_physics_layer_physics_material #

fn (s &TileSet) get_physics_layer_physics_material(layer_index i64) PhysicsMaterial

Returns the physics material of bodies on the given TileSet's physics layer.

fn (TileSet) get_terrain_sets_count #

fn (s &TileSet) get_terrain_sets_count() i64

Returns the terrain sets count.

fn (TileSet) add_terrain_set #

fn (s &TileSet) add_terrain_set(cfg TileSet_add_terrain_set_Cfg)

Adds a new terrain set at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.

fn (TileSet) move_terrain_set #

fn (s &TileSet) move_terrain_set(terrain_set i64, to_position i64)

Moves the terrain set at index [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.

fn (TileSet) remove_terrain_set #

fn (s &TileSet) remove_terrain_set(terrain_set i64)

Removes the terrain set at index [param terrain_set]. Also updates the atlas tiles accordingly.

fn (TileSet) set_terrain_set_mode #

fn (s &TileSet) set_terrain_set_mode(terrain_set i64, mode TileSetTerrainMode)

Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighboring tiles' terrains.

fn (TileSet) get_terrain_set_mode #

fn (s &TileSet) get_terrain_set_mode(terrain_set i64) TileSetTerrainMode

Returns a terrain set mode.

fn (TileSet) get_terrains_count #

fn (s &TileSet) get_terrains_count(terrain_set i64) i64

Returns the number of terrains in the given terrain set.

fn (TileSet) add_terrain #

fn (s &TileSet) add_terrain(terrain_set i64, cfg TileSet_add_terrain_Cfg)

Adds a new terrain to the given terrain set [param terrain_set] at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.

fn (TileSet) move_terrain #

fn (s &TileSet) move_terrain(terrain_set i64, terrain_index i64, to_position i64)

Moves the terrain at index [param terrain_index] for terrain set [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.

fn (TileSet) remove_terrain #

fn (s &TileSet) remove_terrain(terrain_set i64, terrain_index i64)

Removes the terrain at index [param terrain_index] in the given terrain set [param terrain_set]. Also updates the atlas tiles accordingly.

fn (TileSet) set_terrain_name #

fn (s &TileSet) set_terrain_name(terrain_set i64, terrain_index i64, name string)

Sets a terrain's name.

fn (TileSet) get_terrain_name #

fn (s &TileSet) get_terrain_name(terrain_set i64, terrain_index i64) string

Returns a terrain's name.

fn (TileSet) set_terrain_color #

fn (s &TileSet) set_terrain_color(terrain_set i64, terrain_index i64, color Color)

Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor.

fn (TileSet) get_terrain_color #

fn (s &TileSet) get_terrain_color(terrain_set i64, terrain_index i64) Color

Returns a terrain's color.

fn (TileSet) get_navigation_layers_count #

fn (s &TileSet) get_navigation_layers_count() i64

Returns the navigation layers count.

fn (TileSet) add_navigation_layer #

fn (s &TileSet) add_navigation_layer(cfg TileSet_add_navigation_layer_Cfg)

Adds a navigation layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Navigation layers allow assigning a navigable area to atlas tiles.

fn (TileSet) move_navigation_layer #

fn (s &TileSet) move_navigation_layer(layer_index i64, to_position i64)

Moves the navigation layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.

fn (TileSet) remove_navigation_layer #

fn (s &TileSet) remove_navigation_layer(layer_index i64)

Removes the navigation layer at index [param layer_index]. Also updates the atlas tiles accordingly.

fn (TileSet) set_navigation_layer_layers #

fn (s &TileSet) set_navigation_layer_layers(layer_index i64, layers i64)

Sets the navigation layers (as in the navigation server) for navigation regions in the given TileSet navigation layer.

fn (TileSet) get_navigation_layer_layers #

fn (s &TileSet) get_navigation_layer_layers(layer_index i64) i64

Returns the navigation layers (as in the Navigation server) of the given TileSet navigation layer.

fn (TileSet) set_navigation_layer_layer_value #

fn (s &TileSet) set_navigation_layer_layer_value(layer_index i64, layer_number i64, value bool)

Based on [param value], enables or disables the specified navigation layer of the TileSet navigation data layer identified by the given [param layer_index], given a navigation_layers [param layer_number] between 1 and 32.

fn (TileSet) get_navigation_layer_layer_value #

fn (s &TileSet) get_navigation_layer_layer_value(layer_index i64, layer_number i64) bool

Returns whether or not the specified navigation layer of the TileSet navigation data layer identified by the given [param layer_index] is enabled, given a navigation_layers [param layer_number] between 1 and 32.

fn (TileSet) get_custom_data_layers_count #

fn (s &TileSet) get_custom_data_layers_count() i64

Returns the custom data layers count.

fn (TileSet) add_custom_data_layer #

fn (s &TileSet) add_custom_data_layer(cfg TileSet_add_custom_data_layer_Cfg)

Adds a custom data layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Custom data layers allow assigning custom properties to atlas tiles.

fn (TileSet) move_custom_data_layer #

fn (s &TileSet) move_custom_data_layer(layer_index i64, to_position i64)

Moves the custom data layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.

fn (TileSet) remove_custom_data_layer #

fn (s &TileSet) remove_custom_data_layer(layer_index i64)

Removes the custom data layer at index [param layer_index]. Also updates the atlas tiles accordingly.

fn (TileSet) get_custom_data_layer_by_name #

fn (s &TileSet) get_custom_data_layer_by_name(layer_name string) i64

Returns the index of the custom data layer identified by the given name.

fn (TileSet) set_custom_data_layer_name #

fn (s &TileSet) set_custom_data_layer_name(layer_index i64, layer_name string)

Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error.

fn (TileSet) has_custom_data_layer_by_name #

fn (s &TileSet) has_custom_data_layer_by_name(layer_name string) bool

Returns if there is a custom data layer named [param layer_name].

fn (TileSet) get_custom_data_layer_name #

fn (s &TileSet) get_custom_data_layer_name(layer_index i64) string

Returns the name of the custom data layer identified by the given index.

fn (TileSet) set_custom_data_layer_type #

fn (s &TileSet) set_custom_data_layer_type(layer_index i64, layer_type VariantType)

Sets the type of the custom data layer identified by the given index.

fn (TileSet) get_custom_data_layer_type #

fn (s &TileSet) get_custom_data_layer_type(layer_index i64) VariantType

Returns the type of the custom data layer identified by the given index.

fn (TileSet) set_source_level_tile_proxy #

fn (s &TileSet) set_source_level_tile_proxy(source_from i64, source_to i64)

Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies. Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.

fn (TileSet) get_source_level_tile_proxy #

fn (s &TileSet) get_source_level_tile_proxy(source_from i64) i64

Returns the source-level proxy for the given source identifier. If the TileSet has no proxy for the given identifier, returns -1.

fn (TileSet) has_source_level_tile_proxy #

fn (s &TileSet) has_source_level_tile_proxy(source_from i64) bool

Returns if there is a source-level proxy for the given source ID.

fn (TileSet) remove_source_level_tile_proxy #

fn (s &TileSet) remove_source_level_tile_proxy(source_from i64)

Removes a source-level tile proxy.

fn (TileSet) set_coords_level_tile_proxy #

fn (s &TileSet) set_coords_level_tile_proxy(p_source_from i64, coords_from Vector2i, source_to i64, coords_to Vector2i)

Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies. Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.

fn (TileSet) get_coords_level_tile_proxy #

fn (s &TileSet) get_coords_level_tile_proxy(source_from i64, coords_from Vector2i) Array

Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID). If the TileSet has no proxy for the given identifiers, returns an empty Array.

fn (TileSet) has_coords_level_tile_proxy #

fn (s &TileSet) has_coords_level_tile_proxy(source_from i64, coords_from Vector2i) bool

Returns if there is a coodinates-level proxy for the given identifiers.

fn (TileSet) remove_coords_level_tile_proxy #

fn (s &TileSet) remove_coords_level_tile_proxy(source_from i64, coords_from Vector2i)

Removes a coordinates-level proxy for the given identifiers.

fn (TileSet) set_alternative_level_tile_proxy #

fn (s &TileSet) set_alternative_level_tile_proxy(source_from i64, coords_from Vector2i, alternative_from i64, source_to i64, coords_to Vector2i, alternative_to i64)

Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.

fn (TileSet) get_alternative_level_tile_proxy #

fn (s &TileSet) get_alternative_level_tile_proxy(source_from i64, coords_from Vector2i, alternative_from i64) Array

Returns the alternative-level proxy for the given identifiers. The returned array contains the three proxie's target identifiers (source ID, atlas coords ID and alternative tile ID). If the TileSet has no proxy for the given identifiers, returns an empty Array.

fn (TileSet) has_alternative_level_tile_proxy #

fn (s &TileSet) has_alternative_level_tile_proxy(source_from i64, coords_from Vector2i, alternative_from i64) bool

Returns if there is an alternative-level proxy for the given identifiers.

fn (TileSet) remove_alternative_level_tile_proxy #

fn (s &TileSet) remove_alternative_level_tile_proxy(source_from i64, coords_from Vector2i, alternative_from i64)

Removes an alternative-level proxy for the given identifiers.

fn (TileSet) map_tile_proxy #

fn (s &TileSet) map_tile_proxy(source_from i64, coords_from Vector2i, alternative_from i64) Array

According to the configured proxies, maps the provided identifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies. If no proxy corresponding to provided identifiers are found, returns the same values the ones used as arguments.

fn (TileSet) cleanup_invalid_tile_proxies #

fn (s &TileSet) cleanup_invalid_tile_proxies()

Clears tile proxies pointing to invalid tiles.

fn (TileSet) clear_tile_proxies #

fn (s &TileSet) clear_tile_proxies()

Clears all tile proxies.

fn (TileSet) add_pattern #

fn (s &TileSet) add_pattern(pattern TileMapPattern, cfg TileSet_add_pattern_Cfg) i64

Adds a [TileMapPattern] to be stored in the TileSet resource. If provided, insert it at the given [param index].

fn (TileSet) get_pattern #

fn (s &TileSet) get_pattern(cfg TileSet_get_pattern_Cfg) TileMapPattern

Returns the [TileMapPattern] at the given [param index].

fn (TileSet) remove_pattern #

fn (s &TileSet) remove_pattern(index i64)

Remove the [TileMapPattern] at the given index.

fn (TileSet) get_patterns_count #

fn (s &TileSet) get_patterns_count() i64

Returns the number of [TileMapPattern] this tile set handles.

struct TileSetAtlasSource #

struct TileSetAtlasSource {
	TileSetSource
}

Exposes a 2D atlas texture as a set of tiles for a [TileSet] resource.

fn (TileSetAtlasSource) to_variant #

fn (s &TileSetAtlasSource) to_variant() Variant

fn (TileSetAtlasSource) from_variant #

fn (mut s TileSetAtlasSource) from_variant(variant &Variant)

fn (TileSetAtlasSource) set_texture #

fn (s &TileSetAtlasSource) set_texture(texture Texture2D)

fn (TileSetAtlasSource) get_texture #

fn (s &TileSetAtlasSource) get_texture() Texture2D

fn (TileSetAtlasSource) set_margins #

fn (s &TileSetAtlasSource) set_margins(margins Vector2i)

fn (TileSetAtlasSource) get_margins #

fn (s &TileSetAtlasSource) get_margins() Vector2i

fn (TileSetAtlasSource) set_separation #

fn (s &TileSetAtlasSource) set_separation(separation Vector2i)

fn (TileSetAtlasSource) get_separation #

fn (s &TileSetAtlasSource) get_separation() Vector2i

fn (TileSetAtlasSource) set_texture_region_size #

fn (s &TileSetAtlasSource) set_texture_region_size(texture_region_size Vector2i)

fn (TileSetAtlasSource) get_texture_region_size #

fn (s &TileSetAtlasSource) get_texture_region_size() Vector2i

fn (TileSetAtlasSource) set_use_texture_padding #

fn (s &TileSetAtlasSource) set_use_texture_padding(use_texture_padding bool)

fn (TileSetAtlasSource) get_use_texture_padding #

fn (s &TileSetAtlasSource) get_use_texture_padding() bool

fn (TileSetAtlasSource) create_tile #

fn (s &TileSetAtlasSource) create_tile(atlas_coords Vector2i, cfg TileSetAtlasSource_create_tile_Cfg)

Creates a new tile at coordinates [param atlas_coords] with the given [param size].

fn (TileSetAtlasSource) remove_tile #

fn (s &TileSetAtlasSource) remove_tile(atlas_coords Vector2i)

Remove a tile and its alternative at coordinates [param atlas_coords].

fn (TileSetAtlasSource) move_tile_in_atlas #

fn (s &TileSetAtlasSource) move_tile_in_atlas(atlas_coords Vector2i, cfg TileSetAtlasSource_move_tile_in_atlas_Cfg)

Move the tile and its alternatives at the [param atlas_coords] coordinates to the [param new_atlas_coords] coordinates with the [param new_size] size. This functions will fail if a tile is already present in the given area. If [param new_atlas_coords] is Vector2i(-1, -1), keeps the tile's coordinates. If [param new_size] is Vector2i(-1, -1), keeps the tile's size. To avoid an error, first check if a move is possible using [method has_room_for_tile].

fn (TileSetAtlasSource) get_tile_size_in_atlas #

fn (s &TileSetAtlasSource) get_tile_size_in_atlas(atlas_coords Vector2i) Vector2i

Returns the size of the tile (in the grid coordinates system) at coordinates [param atlas_coords].

fn (TileSetAtlasSource) has_room_for_tile #

fn (s &TileSetAtlasSource) has_room_for_tile(atlas_coords Vector2i, size Vector2i, animation_columns i64, animation_separation Vector2i, frames_count i64, cfg TileSetAtlasSource_has_room_for_tile_Cfg) bool

Returns whether there is enough room in an atlas to create/modify a tile with the given properties. If [param ignored_tile] is provided, act as is the given tile was not present in the atlas. This may be used when you want to modify a tile's properties.

fn (TileSetAtlasSource) get_tiles_to_be_removed_on_change #

fn (s &TileSetAtlasSource) get_tiles_to_be_removed_on_change(texture Texture2D, margins Vector2i, separation Vector2i, texture_region_size Vector2i) PackedVector2Array

Returns an array of tiles coordinates ID that will be automatically removed when modifying one or several of those properties: [param texture], [param margins], [param separation] or [param texture_region_size]. This can be used to undo changes that would have caused tiles data loss.

fn (TileSetAtlasSource) get_tile_at_coords #

fn (s &TileSetAtlasSource) get_tile_at_coords(atlas_coords Vector2i) Vector2i

If there is a tile covering the [param atlas_coords] coordinates, returns the top-left coordinates of the tile (thus its coordinate ID). Returns Vector2i(-1, -1) otherwise.

fn (TileSetAtlasSource) has_tiles_outside_texture #

fn (s &TileSetAtlasSource) has_tiles_outside_texture() bool

Checks if the source has any tiles that don't fit the texture area (either partially or completely).

fn (TileSetAtlasSource) clear_tiles_outside_texture #

fn (s &TileSetAtlasSource) clear_tiles_outside_texture()

Removes all tiles that don't fit the available texture area. This method iterates over all the source's tiles, so it's advised to use [method has_tiles_outside_texture] beforehand.

fn (TileSetAtlasSource) set_tile_animation_columns #

fn (s &TileSetAtlasSource) set_tile_animation_columns(atlas_coords Vector2i, frame_columns i64)

Sets the number of columns in the animation layout of the tile at coordinates [param atlas_coords]. If set to 0, then the different frames of the animation are laid out as a single horizontal line in the atlas.

fn (TileSetAtlasSource) get_tile_animation_columns #

fn (s &TileSetAtlasSource) get_tile_animation_columns(atlas_coords Vector2i) i64

Returns how many columns the tile at [param atlas_coords] has in its animation layout.

fn (TileSetAtlasSource) set_tile_animation_separation #

fn (s &TileSetAtlasSource) set_tile_animation_separation(atlas_coords Vector2i, separation Vector2i)

Sets the margin (in grid tiles) between each tile in the animation layout of the tile at coordinates [param atlas_coords] has.

fn (TileSetAtlasSource) get_tile_animation_separation #

fn (s &TileSetAtlasSource) get_tile_animation_separation(atlas_coords Vector2i) Vector2i

Returns the separation (as in the atlas grid) between each frame of an animated tile at coordinates [param atlas_coords].

fn (TileSetAtlasSource) set_tile_animation_speed #

fn (s &TileSetAtlasSource) set_tile_animation_speed(atlas_coords Vector2i, speed f64)

Sets the animation speed of the tile at coordinates [param atlas_coords] has.

fn (TileSetAtlasSource) get_tile_animation_speed #

fn (s &TileSetAtlasSource) get_tile_animation_speed(atlas_coords Vector2i) f64

Returns the animation speed of the tile at coordinates [param atlas_coords].

fn (TileSetAtlasSource) set_tile_animation_mode #

fn (s &TileSetAtlasSource) set_tile_animation_mode(atlas_coords Vector2i, mode TileSetAtlasSourceTileAnimationMode)

Sets the tile animation mode of the tile at [param atlas_coords] to [param mode]. See also [method get_tile_animation_mode].

fn (TileSetAtlasSource) get_tile_animation_mode #

fn (s &TileSetAtlasSource) get_tile_animation_mode(atlas_coords Vector2i) TileSetAtlasSourceTileAnimationMode

Returns the tile animation mode of the tile at [param atlas_coords]. See also [method set_tile_animation_mode].

fn (TileSetAtlasSource) set_tile_animation_frames_count #

fn (s &TileSetAtlasSource) set_tile_animation_frames_count(atlas_coords Vector2i, frames_count i64)

Sets how many animation frames the tile at coordinates [param atlas_coords] has.

fn (TileSetAtlasSource) get_tile_animation_frames_count #

fn (s &TileSetAtlasSource) get_tile_animation_frames_count(atlas_coords Vector2i) i64

Returns how many animation frames has the tile at coordinates [param atlas_coords].

fn (TileSetAtlasSource) set_tile_animation_frame_duration #

fn (s &TileSetAtlasSource) set_tile_animation_frame_duration(atlas_coords Vector2i, frame_index i64, duration f64)

Sets the animation frame [param duration] of frame [param frame_index] for the tile at coordinates [param atlas_coords].

fn (TileSetAtlasSource) get_tile_animation_frame_duration #

fn (s &TileSetAtlasSource) get_tile_animation_frame_duration(atlas_coords Vector2i, frame_index i64) f64

Returns the animation frame duration of frame [param frame_index] for the tile at coordinates [param atlas_coords].

fn (TileSetAtlasSource) get_tile_animation_total_duration #

fn (s &TileSetAtlasSource) get_tile_animation_total_duration(atlas_coords Vector2i) f64

Returns the sum of the sum of the frame durations of the tile at coordinates [param atlas_coords]. This value needs to be divided by the animation speed to get the actual animation loop duration.

fn (TileSetAtlasSource) create_alternative_tile #

fn (s &TileSetAtlasSource) create_alternative_tile(atlas_coords Vector2i, cfg TileSetAtlasSource_create_alternative_tile_Cfg) i64

Creates an alternative tile for the tile at coordinates [param atlas_coords]. If [param alternative_id_override] is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise. Returns the new alternative identifier, or -1 if the alternative could not be created with a provided [param alternative_id_override].

fn (TileSetAtlasSource) remove_alternative_tile #

fn (s &TileSetAtlasSource) remove_alternative_tile(atlas_coords Vector2i, alternative_tile i64)

Remove a tile's alternative with alternative ID [param alternative_tile]. Calling this function with [param alternative_tile] equals to 0 will fail, as the base tile alternative cannot be removed.

fn (TileSetAtlasSource) set_alternative_tile_id #

fn (s &TileSetAtlasSource) set_alternative_tile_id(atlas_coords Vector2i, alternative_tile i64, new_id i64)

Change a tile's alternative ID from [param alternative_tile] to [param new_id]. Calling this function with [param new_id] of 0 will fail, as the base tile alternative cannot be moved.

fn (TileSetAtlasSource) get_next_alternative_tile_id #

fn (s &TileSetAtlasSource) get_next_alternative_tile_id(atlas_coords Vector2i) i64

Returns the alternative ID a following call to [method create_alternative_tile] would return.

fn (TileSetAtlasSource) get_tile_data #

fn (s &TileSetAtlasSource) get_tile_data(atlas_coords Vector2i, alternative_tile i64) TileData

Returns the [TileData] object for the given atlas coordinates and alternative ID.

fn (TileSetAtlasSource) get_atlas_grid_size #

fn (s &TileSetAtlasSource) get_atlas_grid_size() Vector2i

Returns the atlas grid size, which depends on how many tiles can fit in the texture. It thus depends on the [member texture]'s size, the atlas [member margins], and the tiles' [member texture_region_size].

fn (TileSetAtlasSource) get_tile_texture_region #

fn (s &TileSetAtlasSource) get_tile_texture_region(atlas_coords Vector2i, cfg TileSetAtlasSource_get_tile_texture_region_Cfg) Rect2i

Returns a tile's texture region in the atlas texture. For animated tiles, a [param frame] argument might be provided for the different frames of the animation.

fn (TileSetAtlasSource) get_runtime_texture #

fn (s &TileSetAtlasSource) get_runtime_texture() Texture2D

If [member use_texture_padding] is false, returns [member texture]. Otherwise, returns and internal [ImageTexture] created that includes the padding.

fn (TileSetAtlasSource) get_runtime_tile_texture_region #

fn (s &TileSetAtlasSource) get_runtime_tile_texture_region(atlas_coords Vector2i, frame i64) Rect2i

Returns the region of the tile at coordinates [param atlas_coords] for the given [param frame] inside the texture returned by [method get_runtime_texture]. [b]Note:[/b] If [member use_texture_padding] is false, returns the same as [method get_tile_texture_region].

struct TileSetAtlasSource_create_alternative_tile_Cfg #

@[params]
struct TileSetAtlasSource_create_alternative_tile_Cfg {
pub:
	alternative_id_override i64 = -1
}

Optional parameters for TileSetAtlasSource#create_alternative_tile

struct TileSetAtlasSource_create_tile_Cfg #

@[params]
struct TileSetAtlasSource_create_tile_Cfg {
pub:
	size Vector2i = Vector2i{1, 1}
}

Optional parameters for TileSetAtlasSource#create_tile

struct TileSetAtlasSource_get_tile_texture_region_Cfg #

@[params]
struct TileSetAtlasSource_get_tile_texture_region_Cfg {
pub:
	frame i64
}

Optional parameters for TileSetAtlasSource#get_tile_texture_region

struct TileSetAtlasSource_has_room_for_tile_Cfg #

@[params]
struct TileSetAtlasSource_has_room_for_tile_Cfg {
pub:
	ignored_tile Vector2i = Vector2i{-1, -1}
}

Optional parameters for TileSetAtlasSource#has_room_for_tile

struct TileSetAtlasSource_move_tile_in_atlas_Cfg #

@[params]
struct TileSetAtlasSource_move_tile_in_atlas_Cfg {
pub:
	new_atlas_coords Vector2i = Vector2i{-1, -1}
	new_size         Vector2i = Vector2i{-1, -1}
}

Optional parameters for TileSetAtlasSource#move_tile_in_atlas

struct TileSetScenesCollectionSource #

struct TileSetScenesCollectionSource {
	TileSetSource
}

Exposes a set of scenes as tiles for a [TileSet] resource.

fn (TileSetScenesCollectionSource) to_variant #

fn (s &TileSetScenesCollectionSource) to_variant() Variant

fn (TileSetScenesCollectionSource) from_variant #

fn (mut s TileSetScenesCollectionSource) from_variant(variant &Variant)

fn (TileSetScenesCollectionSource) get_scene_tiles_count #

fn (s &TileSetScenesCollectionSource) get_scene_tiles_count() i64

Returns the number or scene tiles this TileSet source has.

fn (TileSetScenesCollectionSource) get_scene_tile_id #

fn (s &TileSetScenesCollectionSource) get_scene_tile_id(index i64) i64

Returns the scene tile ID of the scene tile at [param index].

fn (TileSetScenesCollectionSource) has_scene_tile_id #

fn (s &TileSetScenesCollectionSource) has_scene_tile_id(id i64) bool

Returns whether this TileSet source has a scene tile with [param id].

fn (TileSetScenesCollectionSource) create_scene_tile #

fn (s &TileSetScenesCollectionSource) create_scene_tile(packed_scene PackedScene, cfg TileSetScenesCollectionSource_create_scene_tile_Cfg) i64

Creates a scene-based tile out of the given scene. Returns a newly generated unique ID.

fn (TileSetScenesCollectionSource) set_scene_tile_id #

fn (s &TileSetScenesCollectionSource) set_scene_tile_id(id i64, new_id i64)

Changes a scene tile's ID from [param id] to [param new_id]. This will fail if there is already a tile with an ID equal to [param new_id].

fn (TileSetScenesCollectionSource) set_scene_tile_scene #

fn (s &TileSetScenesCollectionSource) set_scene_tile_scene(id i64, packed_scene PackedScene)

Assigns a [PackedScene] resource to the scene tile with [param id]. This will fail if the scene does not extend [CanvasItem], as positioning properties are needed to place the scene on the [TileMapLayer].

fn (TileSetScenesCollectionSource) get_scene_tile_scene #

fn (s &TileSetScenesCollectionSource) get_scene_tile_scene(id i64) PackedScene

Returns the [PackedScene] resource of scene tile with [param id].

fn (TileSetScenesCollectionSource) set_scene_tile_display_placeholder #

fn (s &TileSetScenesCollectionSource) set_scene_tile_display_placeholder(id i64, display_placeholder bool)

Sets whether or not the scene tile with [param id] should display a placeholder in the editor. This might be useful for scenes that are not visible.

fn (TileSetScenesCollectionSource) get_scene_tile_display_placeholder #

fn (s &TileSetScenesCollectionSource) get_scene_tile_display_placeholder(id i64) bool

Returns whether the scene tile with [param id] displays a placeholder in the editor.

fn (TileSetScenesCollectionSource) remove_scene_tile #

fn (s &TileSetScenesCollectionSource) remove_scene_tile(id i64)

Remove the scene tile with [param id].

fn (TileSetScenesCollectionSource) get_next_scene_tile_id #

fn (s &TileSetScenesCollectionSource) get_next_scene_tile_id() i64

Returns the scene ID a following call to [method create_scene_tile] would return.

struct TileSetScenesCollectionSource_create_scene_tile_Cfg #

@[params]
struct TileSetScenesCollectionSource_create_scene_tile_Cfg {
pub:
	id_override i64 = -1
}

Optional parameters for TileSetScenesCollectionSource#create_scene_tile

struct TileSetSource #

struct TileSetSource {
	Resource
}

Exposes a set of tiles for a [TileSet] resource.

fn (TileSetSource) to_variant #

fn (s &TileSetSource) to_variant() Variant

fn (TileSetSource) from_variant #

fn (mut s TileSetSource) from_variant(variant &Variant)

fn (TileSetSource) get_tiles_count #

fn (s &TileSetSource) get_tiles_count() i64

Returns how many tiles this atlas source defines (not including alternative tiles).

fn (TileSetSource) get_tile_id #

fn (s &TileSetSource) get_tile_id(index i64) Vector2i

Returns the tile coordinates ID of the tile with index [param index].

fn (TileSetSource) has_tile #

fn (s &TileSetSource) has_tile(atlas_coords Vector2i) bool

Returns if this atlas has a tile with coordinates ID [param atlas_coords].

fn (TileSetSource) get_alternative_tiles_count #

fn (s &TileSetSource) get_alternative_tiles_count(atlas_coords Vector2i) i64

Returns the number of alternatives tiles for the coordinates ID [param atlas_coords]. For [TileSetAtlasSource], this always return at least 1, as the base tile with ID 0 is always part of the alternatives list. Returns -1 if there is not tile at the given coords.

fn (TileSetSource) get_alternative_tile_id #

fn (s &TileSetSource) get_alternative_tile_id(atlas_coords Vector2i, index i64) i64

Returns the alternative ID for the tile with coordinates ID [param atlas_coords] at index [param index].

fn (TileSetSource) has_alternative_tile #

fn (s &TileSetSource) has_alternative_tile(atlas_coords Vector2i, alternative_tile i64) bool

Returns if the base tile at coordinates [param atlas_coords] has an alternative with ID [param alternative_tile].

struct TileSet_add_custom_data_layer_Cfg #

@[params]
struct TileSet_add_custom_data_layer_Cfg {
pub:
	to_position i64 = -1
}

Optional parameters for TileSet#add_custom_data_layer

struct TileSet_add_navigation_layer_Cfg #

@[params]
struct TileSet_add_navigation_layer_Cfg {
pub:
	to_position i64 = -1
}

Optional parameters for TileSet#add_navigation_layer

struct TileSet_add_occlusion_layer_Cfg #

@[params]
struct TileSet_add_occlusion_layer_Cfg {
pub:
	to_position i64 = -1
}

Optional parameters for TileSet#add_occlusion_layer

struct TileSet_add_pattern_Cfg #

@[params]
struct TileSet_add_pattern_Cfg {
pub:
	index i64 = -1
}

Optional parameters for TileSet#add_pattern

struct TileSet_add_physics_layer_Cfg #

@[params]
struct TileSet_add_physics_layer_Cfg {
pub:
	to_position i64 = -1
}

Optional parameters for TileSet#add_physics_layer

struct TileSet_add_source_Cfg #

@[params]
struct TileSet_add_source_Cfg {
pub:
	atlas_source_id_override i64 = -1
}

Optional parameters for TileSet#add_source

struct TileSet_add_terrain_Cfg #

@[params]
struct TileSet_add_terrain_Cfg {
pub:
	to_position i64 = -1
}

Optional parameters for TileSet#add_terrain

struct TileSet_add_terrain_set_Cfg #

@[params]
struct TileSet_add_terrain_set_Cfg {
pub:
	to_position i64 = -1
}

Optional parameters for TileSet#add_terrain_set

struct TileSet_get_pattern_Cfg #

@[params]
struct TileSet_get_pattern_Cfg {
pub:
	index i64 = -1
}

Optional parameters for TileSet#get_pattern

struct Time #

struct Time {
	Object
}

A singleton for working with time data.

fn (Time) to_variant #

fn (s &Time) to_variant() Variant

fn (Time) from_variant #

fn (mut s Time) from_variant(variant &Variant)

fn (Time) get_datetime_dict_from_unix_time #

fn (s &Time) get_datetime_dict_from_unix_time(unix_time_val i64) Dictionary

Converts the given Unix timestamp to a dictionary of keys: year, month, day, weekday, hour, minute, and second. The returned Dictionary's values will be the same as the [method get_datetime_dict_from_system] if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch.

fn (Time) get_date_dict_from_unix_time #

fn (s &Time) get_date_dict_from_unix_time(unix_time_val i64) Dictionary

Converts the given Unix timestamp to a dictionary of keys: year, month, day, and weekday.

fn (Time) get_time_dict_from_unix_time #

fn (s &Time) get_time_dict_from_unix_time(unix_time_val i64) Dictionary

Converts the given time to a dictionary of keys: hour, minute, and second.

fn (Time) get_datetime_string_from_unix_time #

fn (s &Time) get_datetime_string_from_unix_time(unix_time_val i64, cfg Time_get_datetime_string_from_unix_time_Cfg) string

Converts the given Unix timestamp to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). If [param use_space] is true, the date and time bits are separated by an empty space character instead of the letter T.

fn (Time) get_date_string_from_unix_time #

fn (s &Time) get_date_string_from_unix_time(unix_time_val i64) string

Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD).

fn (Time) get_time_string_from_unix_time #

fn (s &Time) get_time_string_from_unix_time(unix_time_val i64) string

Converts the given Unix timestamp to an ISO 8601 time string (HH:MM:SS).

fn (Time) get_datetime_dict_from_datetime_string #

fn (s &Time) get_datetime_dict_from_datetime_string(datetime string, weekday bool) Dictionary

Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: year, month, day, [code skip-lint]weekday, hour, minute, and second. If [param weekday] is false, then the [code skip-lint]weekday entry is excluded (the calculation is relatively expensive). [b]Note:[/b] Any decimal fraction in the time string will be ignored silently.

fn (Time) get_datetime_string_from_datetime_dict #

fn (s &Time) get_datetime_string_from_datetime_dict(datetime Dictionary, use_space bool) string

Converts the given dictionary of keys to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). The given dictionary can be populated with the following keys: year, month, day, hour, minute, and second. Any other entries (including dst) are ignored. If the dictionary is empty, 0 is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00). If [param use_space] is true, the date and time bits are separated by an empty space character instead of the letter T.

fn (Time) get_unix_time_from_datetime_dict #

fn (s &Time) get_unix_time_from_datetime_dict(datetime Dictionary) i64

Converts a dictionary of time values to a Unix timestamp. The given dictionary can be populated with the following keys: year, month, day, hour, minute, and second. Any other entries (including dst) are ignored. If the dictionary is empty, 0 is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00). You can pass the output from [method get_datetime_dict_from_unix_time] directly into this function and get the same as what was put in. [b]Note:[/b] Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime dictionary.

fn (Time) get_unix_time_from_datetime_string #

fn (s &Time) get_unix_time_from_datetime_string(datetime string) i64

Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both. [b]Note:[/b] Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime string. [b]Note:[/b] Any decimal fraction in the time string will be ignored silently.

fn (Time) get_offset_string_from_offset_minutes #

fn (s &Time) get_offset_string_from_offset_minutes(offset_minutes i64) string

Converts the given timezone offset in minutes to a timezone offset string. For example, -480 returns "-08:00", 345 returns "+05:45", and 0 returns "+00:00".

fn (Time) get_datetime_dict_from_system #

fn (s &Time) get_datetime_dict_from_system(cfg Time_get_datetime_dict_from_system_Cfg) Dictionary

Returns the current date as a dictionary of keys: year, month, day, weekday, hour, minute, second, and dst (Daylight Savings Time).

fn (Time) get_date_dict_from_system #

fn (s &Time) get_date_dict_from_system(cfg Time_get_date_dict_from_system_Cfg) Dictionary

Returns the current date as a dictionary of keys: year, month, day, and weekday. The returned values are in the system's local time when [param utc] is false, otherwise they are in UTC.

fn (Time) get_time_dict_from_system #

fn (s &Time) get_time_dict_from_system(cfg Time_get_time_dict_from_system_Cfg) Dictionary

Returns the current time as a dictionary of keys: hour, minute, and second. The returned values are in the system's local time when [param utc] is false, otherwise they are in UTC.

fn (Time) get_datetime_string_from_system #

fn (s &Time) get_datetime_string_from_system(cfg Time_get_datetime_string_from_system_Cfg) string

Returns the current date and time as an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). The returned values are in the system's local time when [param utc] is false, otherwise they are in UTC. If [param use_space] is true, the date and time bits are separated by an empty space character instead of the letter T.

fn (Time) get_date_string_from_system #

fn (s &Time) get_date_string_from_system(cfg Time_get_date_string_from_system_Cfg) string

Returns the current date as an ISO 8601 date string (YYYY-MM-DD). The returned values are in the system's local time when [param utc] is false, otherwise they are in UTC.

fn (Time) get_time_string_from_system #

fn (s &Time) get_time_string_from_system(cfg Time_get_time_string_from_system_Cfg) string

Returns the current time as an ISO 8601 time string (HH:MM:SS). The returned values are in the system's local time when [param utc] is false, otherwise they are in UTC.

fn (Time) get_time_zone_from_system #

fn (s &Time) get_time_zone_from_system() Dictionary

Returns the current time zone as a dictionary of keys: bias and name.- bias is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC.

  • name is the localized name of the time zone, according to the OS locale settings of the current user.

fn (Time) get_unix_time_from_system #

fn (s &Time) get_unix_time_from_system() f64

Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC. The Unix timestamp is the number of seconds passed since 1970-01-01 at 00:00:00, the [url=https://en.wikipedia.org/wiki/Unix_time]Unix epoch[/url]. [b]Note:[/b] Unlike other methods that use integer timestamps, this method returns the timestamp as a [float] for sub-second precision.

fn (Time) get_ticks_msec #

fn (s &Time) get_ticks_msec() i64

Returns the amount of time passed in milliseconds since the engine started. Will always be positive or 0 and uses a 64-bit value (it will wrap after roughly 500 million years).

fn (Time) get_ticks_usec #

fn (s &Time) get_ticks_usec() i64

Returns the amount of time passed in microseconds since the engine started. Will always be positive or 0 and uses a 64-bit value (it will wrap after roughly half a million years).

struct Time_get_date_dict_from_system_Cfg #

@[params]
struct Time_get_date_dict_from_system_Cfg {
pub:
	utc bool
}

Optional parameters for Time#get_date_dict_from_system

struct Time_get_date_string_from_system_Cfg #

@[params]
struct Time_get_date_string_from_system_Cfg {
pub:
	utc bool
}

Optional parameters for Time#get_date_string_from_system

struct Time_get_datetime_dict_from_system_Cfg #

@[params]
struct Time_get_datetime_dict_from_system_Cfg {
pub:
	utc bool
}

Optional parameters for Time#get_datetime_dict_from_system

struct Time_get_datetime_string_from_system_Cfg #

@[params]
struct Time_get_datetime_string_from_system_Cfg {
pub:
	utc       bool
	use_space bool
}

Optional parameters for Time#get_datetime_string_from_system

struct Time_get_datetime_string_from_unix_time_Cfg #

@[params]
struct Time_get_datetime_string_from_unix_time_Cfg {
pub:
	use_space bool
}

Optional parameters for Time#get_datetime_string_from_unix_time

struct Time_get_time_dict_from_system_Cfg #

@[params]
struct Time_get_time_dict_from_system_Cfg {
pub:
	utc bool
}

Optional parameters for Time#get_time_dict_from_system

struct Time_get_time_string_from_system_Cfg #

@[params]
struct Time_get_time_string_from_system_Cfg {
pub:
	utc bool
}

Optional parameters for Time#get_time_string_from_system

struct Timer #

struct Timer {
	Node
}

A countdown timer.

fn (Timer) to_variant #

fn (s &Timer) to_variant() Variant

fn (Timer) from_variant #

fn (mut s Timer) from_variant(variant &Variant)

fn (Timer) set_wait_time #

fn (s &Timer) set_wait_time(time_sec f64)

fn (Timer) get_wait_time #

fn (s &Timer) get_wait_time() f64

fn (Timer) set_one_shot #

fn (s &Timer) set_one_shot(enable bool)

fn (Timer) is_one_shot #

fn (s &Timer) is_one_shot() bool

fn (Timer) set_autostart #

fn (s &Timer) set_autostart(enable bool)

fn (Timer) has_autostart #

fn (s &Timer) has_autostart() bool

fn (Timer) start #

fn (s &Timer) start(cfg Timer_start_Cfg)

Starts the timer, or resets the timer if it was started already. Fails if the timer is not inside the scene tree. If [param time_sec] is greater than 0, this value is used for the [member wait_time]. [b]Note:[/b] This method does not resume a paused timer. See [member paused].

fn (Timer) stop #

fn (s &Timer) stop()

Stops the timer. See also [member paused]. Unlike [method start], this can safely be called if the timer is not inside the scene tree. [b]Note:[/b] Calling [method stop] does not emit the [signal timeout] signal, as the timer is not considered to have timed out. If this is desired, use $Timer.timeout.emit() after calling [method stop] to manually emit the signal.

fn (Timer) set_paused #

fn (s &Timer) set_paused(paused bool)

fn (Timer) is_paused #

fn (s &Timer) is_paused() bool

fn (Timer) set_ignore_time_scale #

fn (s &Timer) set_ignore_time_scale(ignore bool)

fn (Timer) is_ignoring_time_scale #

fn (s &Timer) is_ignoring_time_scale() bool

fn (Timer) is_stopped #

fn (s &Timer) is_stopped() bool

Returns true if the timer is stopped or has not started.

fn (Timer) get_time_left #

fn (s &Timer) get_time_left() f64

fn (Timer) set_timer_process_callback #

fn (s &Timer) set_timer_process_callback(callback TimerProcessCallback)

fn (Timer) get_timer_process_callback #

fn (s &Timer) get_timer_process_callback() TimerProcessCallback

struct Timer_start_Cfg #

@[params]
struct Timer_start_Cfg {
pub:
	time_sec f64 = -1
}

Optional parameters for Timer#start

struct TorusMesh #

struct TorusMesh {
	PrimitiveMesh
}

Class representing a torus [PrimitiveMesh].

fn (TorusMesh) to_variant #

fn (s &TorusMesh) to_variant() Variant

fn (TorusMesh) from_variant #

fn (mut s TorusMesh) from_variant(variant &Variant)

fn (TorusMesh) set_inner_radius #

fn (s &TorusMesh) set_inner_radius(radius f64)

fn (TorusMesh) get_inner_radius #

fn (s &TorusMesh) get_inner_radius() f64

fn (TorusMesh) set_outer_radius #

fn (s &TorusMesh) set_outer_radius(radius f64)

fn (TorusMesh) get_outer_radius #

fn (s &TorusMesh) get_outer_radius() f64

fn (TorusMesh) set_rings #

fn (s &TorusMesh) set_rings(rings i64)

fn (TorusMesh) get_rings #

fn (s &TorusMesh) get_rings() i64

fn (TorusMesh) set_ring_segments #

fn (s &TorusMesh) set_ring_segments(rings i64)

fn (TorusMesh) get_ring_segments #

fn (s &TorusMesh) get_ring_segments() i64

struct TouchScreenButton #

struct TouchScreenButton {
	Node2D
}

Button for touch screen devices for gameplay use.

fn (TouchScreenButton) to_variant #

fn (s &TouchScreenButton) to_variant() Variant

fn (TouchScreenButton) from_variant #

fn (mut s TouchScreenButton) from_variant(variant &Variant)

fn (TouchScreenButton) set_texture_normal #

fn (s &TouchScreenButton) set_texture_normal(texture Texture2D)

fn (TouchScreenButton) get_texture_normal #

fn (s &TouchScreenButton) get_texture_normal() Texture2D

fn (TouchScreenButton) set_texture_pressed #

fn (s &TouchScreenButton) set_texture_pressed(texture Texture2D)

fn (TouchScreenButton) get_texture_pressed #

fn (s &TouchScreenButton) get_texture_pressed() Texture2D

fn (TouchScreenButton) set_bitmask #

fn (s &TouchScreenButton) set_bitmask(bitmask BitMap)

fn (TouchScreenButton) get_bitmask #

fn (s &TouchScreenButton) get_bitmask() BitMap

fn (TouchScreenButton) set_shape #

fn (s &TouchScreenButton) set_shape(shape Shape2D)

fn (TouchScreenButton) get_shape #

fn (s &TouchScreenButton) get_shape() Shape2D

fn (TouchScreenButton) set_shape_centered #

fn (s &TouchScreenButton) set_shape_centered(gd_bool bool)

fn (TouchScreenButton) is_shape_centered #

fn (s &TouchScreenButton) is_shape_centered() bool

fn (TouchScreenButton) set_shape_visible #

fn (s &TouchScreenButton) set_shape_visible(gd_bool bool)

fn (TouchScreenButton) is_shape_visible #

fn (s &TouchScreenButton) is_shape_visible() bool

fn (TouchScreenButton) set_action #

fn (s &TouchScreenButton) set_action(action string)

fn (TouchScreenButton) get_action #

fn (s &TouchScreenButton) get_action() string

fn (TouchScreenButton) set_visibility_mode #

fn (s &TouchScreenButton) set_visibility_mode(mode TouchScreenButtonVisibilityMode)

fn (TouchScreenButton) get_visibility_mode #

fn (s &TouchScreenButton) get_visibility_mode() TouchScreenButtonVisibilityMode

fn (TouchScreenButton) set_passby_press #

fn (s &TouchScreenButton) set_passby_press(enabled bool)

fn (TouchScreenButton) is_passby_press_enabled #

fn (s &TouchScreenButton) is_passby_press_enabled() bool

fn (TouchScreenButton) is_pressed #

fn (s &TouchScreenButton) is_pressed() bool

Returns true if this button is currently pressed.

struct Transform2D #

@[packed]
struct Transform2D {
pub mut:
	// The transform basis's X axis, and the column `0` of the matrix. Combined with [member y], this represents the transform's rotation, scale, and skew.
	// On the identity transform, this vector points right ([constant Vector2.RIGHT]).
	x Vector2 // offset 0
	// The transform basis's Y axis, and the column `1` of the matrix. Combined with [member x], this represents the transform's rotation, scale, and skew.
	// On the identity transform, this vector points down ([constant Vector2.DOWN]).
	y Vector2 // offset 8
	// The translation offset of this transform, and the column `2` of the matrix. In 2D space, this can be seen as the position.
	origin Vector2 // offset 16
}

A 2×3 matrix representing a 2D transformation.

The [Transform2D] built-in [Variant] type is a 2×3 [url=https://en.wikipedia.org/wiki/Matrix_(mathematics)]matrix[/url] representing a transformation in 2D space. It contains three [Vector2] values: [member x], [member y], and [member origin]. Together, they can represent translation, rotation, scale, and skew. The [member x] and [member y] axes form a 2×2 matrix, known as the transform's [b]basis[/b]. The length of each axis ([method Vector2.length]) influences the transform's scale, while the direction of all axes influence the rotation. Usually, both axes are perpendicular to one another. However, when you rotate one axis individually, the transform becomes skewed. Applying a skewed transform to a 2D sprite will make the sprite appear distorted. For a general introduction, see the [url=$DOCS_URL/tutorials/math/matrices_and_transforms.html]Matrices and transforms[/url] tutorial. [b]Note:[/b] Unlike [Transform3D], there is no 2D equivalent to the [Basis] type. All mentions of "basis" refer to the [member x] and [member y] components of [Transform2D].

fn (Transform2D) inverse #

fn (s &Transform2D) inverse() Transform2D

Returns the [url=https://en.wikipedia.org/wiki/Invertible_matrix]inverted version of this transform[/url]. [b]Note:[/b] For this method to return correctly, the transform's basis needs to be [i]orthonormal[/i] (see [method orthonormalized]). That means the basis should only represent a rotation. If it does not, use [method affine_inverse] instead.

fn (Transform2D) affine_inverse #

fn (s &Transform2D) affine_inverse() Transform2D

Returns the inverted version of this transform. Unlike [method inverse], this method works with almost any basis, including non-uniform ones, but is slower. [b]Note:[/b] For this method to return correctly, the transform's basis needs to have a determinant that is not exactly 0.0 (see [method determinant]).

fn (Transform2D) get_rotation #

fn (s &Transform2D) get_rotation() f64

Returns this transform's rotation (in radians). This is equivalent to [member x]'s angle (see [method Vector2.angle]).

fn (Transform2D) get_origin #

fn (s &Transform2D) get_origin() Vector2

Returns this transform's translation. Equivalent to [member origin].

fn (Transform2D) get_scale #

fn (s &Transform2D) get_scale() Vector2

Returns the length of both [member x] and [member y], as a [Vector2]. If this transform's basis is not skewed, this value is the scaling factor. It is not affected by rotation. [codeblocks] [gdscript] var my_transform = Transform2D( Vector2(2, 0), Vector2(0, 4), Vector2(0, 0) )# Rotating the Transform2D in any way preserves its scale.my_transform = my_transform.rotated(TAU / 2)

print(my_transform.get_scale()) # Prints (2.0, 4.0) [/gdscript] [csharp] var myTransform = new Transform2D( Vector3(2.0f, 0.0f), Vector3(0.0f, 4.0f), Vector3(0.0f, 0.0f) ); // Rotating the Transform2D in any way preserves its scale. myTransform = myTransform.Rotated(Mathf.Tau / 2.0f);

GD.Print(myTransform.GetScale()); // Prints (2, 4) [/csharp] [/codeblocks] [b]Note:[/b] If the value returned by [method determinant] is negative, the scale is also negative.

fn (Transform2D) get_skew #

fn (s &Transform2D) get_skew() f64

Returns this transform's skew (in radians).

fn (Transform2D) orthonormalized #

fn (s &Transform2D) orthonormalized() Transform2D

Returns a copy of this transform with its basis orthonormalized. An orthonormal basis is both [i]orthogonal[/i] (the axes are perpendicular to each other) and [i]normalized[/i] (the axes have a length of 1.0), which also means it can only represent a rotation.

fn (Transform2D) rotated #

fn (s &Transform2D) rotated(angle f64) Transform2D

Returns a copy of this transform rotated by the given [param angle] (in radians). If [param angle] is positive, the transform is rotated clockwise. This method is an optimized version of multiplying the given transform X with a corresponding rotation transform R from the left, i.e., R * X. This can be seen as transforming with respect to the global/parent frame.

fn (Transform2D) rotated_local #

fn (s &Transform2D) rotated_local(angle f64) Transform2D

Returns a copy of the transform rotated by the given [param angle] (in radians). This method is an optimized version of multiplying the given transform X with a corresponding rotation transform R from the right, i.e., X * R. This can be seen as transforming with respect to the local frame.

fn (Transform2D) scaled #

fn (s &Transform2D) scaled(scale Vector2) Transform2D

Returns a copy of the transform scaled by the given [param scale] factor. This method is an optimized version of multiplying the given transform X with a corresponding scaling transform S from the left, i.e., S * X. This can be seen as transforming with respect to the global/parent frame.

fn (Transform2D) scaled_local #

fn (s &Transform2D) scaled_local(scale Vector2) Transform2D

Returns a copy of the transform scaled by the given [param scale] factor. This method is an optimized version of multiplying the given transform X with a corresponding scaling transform S from the right, i.e., X * S. This can be seen as transforming with respect to the local frame.

fn (Transform2D) translated #

fn (s &Transform2D) translated(offset Vector2) Transform2D

Returns a copy of the transform translated by the given [param offset]. This method is an optimized version of multiplying the given transform X with a corresponding translation transform T from the left, i.e., T * X. This can be seen as transforming with respect to the global/parent frame.

fn (Transform2D) translated_local #

fn (s &Transform2D) translated_local(offset Vector2) Transform2D

Returns a copy of the transform translated by the given [param offset]. This method is an optimized version of multiplying the given transform X with a corresponding translation transform T from the right, i.e., X * T. This can be seen as transforming with respect to the local frame.

fn (Transform2D) determinant #

fn (s &Transform2D) determinant() f64

Returns the [url=https://en.wikipedia.org/wiki/Determinant]determinant[/url] of this transform basis's matrix. For advanced math, this number can be used to determine a few attributes:- If the determinant is exactly 0.0, the basis is not invertible (see [method inverse]).

  • If the determinant is a negative number, the basis represents a negative scale.[b]Note:[/b] If the basis's scale is the same for every axis, its determinant is always that scale by the power of 2.

fn (Transform2D) basis_xform #

fn (s &Transform2D) basis_xform(v Vector2) Vector2

Returns a copy of the [param v] vector, transformed (multiplied) by the transform basis's matrix. Unlike the multiplication operator (*), this method ignores the [member origin].

fn (Transform2D) basis_xform_inv #

fn (s &Transform2D) basis_xform_inv(v Vector2) Vector2

Returns a copy of the [param v] vector, transformed (multiplied) by the inverse transform basis's matrix (see [method inverse]). This method ignores the [member origin]. [b]Note:[/b] This method assumes that this transform's basis is [i]orthonormal[/i] (see [method orthonormalized]). If the basis is not orthonormal, transform.affine_inverse().basis_xform(vector) should be used instead (see [method affine_inverse]).

fn (Transform2D) interpolate_with #

fn (s &Transform2D) interpolate_with(xform Transform2D, weight f64) Transform2D

Returns the result of the linear interpolation between this transform and [param xform] by the given [param weight]. The [param weight] should be between 0.0 and 1.0 (inclusive). Values outside this range are allowed and can be used to perform [i]extrapolation[/i] instead.

fn (Transform2D) is_conformal #

fn (s &Transform2D) is_conformal() bool

Returns true if this transform's basis is conformal. A conformal basis is both [i]orthogonal[/i] (the axes are perpendicular to each other) and [i]uniform[/i] (the axes share the same length). This method can be especially useful during physics calculations.

fn (Transform2D) is_equal_approx #

fn (s &Transform2D) is_equal_approx(xform Transform2D) bool

Returns true if this transform and [param xform] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.

fn (Transform2D) is_finite #

fn (s &Transform2D) is_finite() bool

Returns true if this transform is finite, by calling [method @GlobalScope.is_finite] on each component.

fn (Transform2D) looking_at #

fn (s &Transform2D) looking_at(cfg Transform2D_looking_at_Cfg) Transform2D

Returns a copy of the transform rotated such that the rotated X-axis points towards the [param target] position, in global space.

fn (Transform2D) to_variant #

fn (s &Transform2D) to_variant() Variant

fn (Transform2D) from_variant #

fn (mut s Transform2D) from_variant(variant &Variant)

fn (Transform2D) index #

fn (v &Transform2D) index(i i64) Vector2

fn (Transform2D) mul_i64 #

fn (a Transform2D) mul_i64(b i64) Transform2D

Multiplies all components of the [Transform2D] by the given [int], including the [member origin]. This affects the transform's scale uniformly.

fn (Transform2D) div_i64 #

fn (a Transform2D) div_i64(b i64) Transform2D

Divides all components of the [Transform2D] by the given [int], including the [member origin]. This affects the transform's scale uniformly.

fn (Transform2D) mul_f64 #

fn (a Transform2D) mul_f64(b f64) Transform2D

Multiplies all components of the [Transform2D] by the given [float], including the [member origin]. This affects the transform's scale uniformly.

fn (Transform2D) div_f64 #

fn (a Transform2D) div_f64(b f64) Transform2D

Divides all components of the [Transform2D] by the given [float], including the [member origin]. This affects the transform's scale uniformly.

fn (Transform2D) mul_vector2 #

fn (a Transform2D) mul_vector2(b Vector2) Vector2

Transforms (multiplies) the [Vector2] by this transformation matrix.

fn (Transform2D) mul_rect2 #

fn (a Transform2D) mul_rect2(b Rect2) Rect2

Transforms (multiplies) the [Rect2] by this transformation matrix.

fn (Transform2D) == #

fn (a Transform2D) == (b Transform2D) bool

Returns true if the components of both transforms are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Transform2D) eq_transform2d #

fn (a Transform2D) eq_transform2d(b Transform2D) bool

Returns true if the components of both transforms are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Transform2D) ne_transform2d #

fn (a Transform2D) ne_transform2d(b Transform2D) bool

Returns true if the components of both transforms are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Transform2D) * #

fn (a Transform2D) * (b Transform2D) Transform2D

Transforms (multiplies) this transform by the [param right] transform. This is the operation performed between parent and child [CanvasItem] nodes. [b]Note:[/b] If you need to only modify one attribute of this transform, consider using one of the following methods, instead:- For translation, see [method translated] or [method translated_local].

  • For rotation, see [method rotated] or [method rotated_local].
  • For scale, see [method scaled] or [method scaled_local].

fn (Transform2D) mul_transform2d #

fn (a Transform2D) mul_transform2d(b Transform2D) Transform2D

Transforms (multiplies) this transform by the [param right] transform. This is the operation performed between parent and child [CanvasItem] nodes. [b]Note:[/b] If you need to only modify one attribute of this transform, consider using one of the following methods, instead:- For translation, see [method translated] or [method translated_local].

  • For rotation, see [method rotated] or [method rotated_local].
  • For scale, see [method scaled] or [method scaled_local].

fn (Transform2D) in_dictionary #

fn (a Transform2D) in_dictionary(b Dictionary) bool

fn (Transform2D) in_array #

fn (a Transform2D) in_array(b Array) bool

fn (Transform2D) mul_packedvector2array #

fn (a Transform2D) mul_packedvector2array(b PackedVector2Array) PackedVector2Array

Transforms (multiplies) every [Vector2] element of the given [PackedVector2Array] by this transformation matrix. On larger arrays, this operation is much faster than transforming each [Vector2] individually.

struct Transform2D_looking_at_Cfg #

@[params]
struct Transform2D_looking_at_Cfg {
pub:
	target Vector2 = Vector2{0, 0}
}

struct Transform3D #

@[packed]
struct Transform3D {
pub mut:
	// The [Basis] of this transform. It is composed by 3 axes ([member Basis.x], [member Basis.y], and [member Basis.z]). Together, these represent the transform's rotation, scale, and shear.
	basis Basis // offset 0
	// The translation offset of this transform. In 3D space, this can be seen as the position.
	origin Vector3 // offset 36
}

A 3×4 matrix representing a 3D transformation.

The [Transform3D] built-in [Variant] type is a 3×4 matrix representing a transformation in 3D space. It contains a [Basis], which on its own can represent rotation, scale, and shear. Additionally, combined with its own [member origin], the transform can also represent a translation. For a general introduction, see the [url=$DOCS_URL/tutorials/math/matrices_and_transforms.html]Matrices and transforms[/url] tutorial. [b]Note:[/b] Godot uses a [url=https://en.wikipedia.org/wiki/Right-hand_rule]right-handed coordinate system[/url], which is a common standard. For directions, the convention for built-in types like [Camera3D] is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the [url=$DOCS_URL/tutorials/assets_pipeline/importing_3d_scenes/model_export_considerations.html#d-asset-direction-conventions]3D asset direction conventions[/url] tutorial.

fn (Transform3D) inverse #

fn (s &Transform3D) inverse() Transform3D

Returns the [url=https://en.wikipedia.org/wiki/Invertible_matrix]inverted version of this transform[/url]. See also [method Basis.inverse]. [b]Note:[/b] For this method to return correctly, the transform's [member basis] needs to be [i]orthonormal[/i] (see [method orthonormalized]). That means the basis should only represent a rotation. If it does not, use [method affine_inverse] instead.

fn (Transform3D) affine_inverse #

fn (s &Transform3D) affine_inverse() Transform3D

Returns the inverted version of this transform. Unlike [method inverse], this method works with almost any [member basis], including non-uniform ones, but is slower. See also [method Basis.inverse]. [b]Note:[/b] For this method to return correctly, the transform's [member basis] needs to have a determinant that is not exactly 0.0 (see [method Basis.determinant]).

fn (Transform3D) orthonormalized #

fn (s &Transform3D) orthonormalized() Transform3D

Returns a copy of this transform with its [member basis] orthonormalized. An orthonormal basis is both [i]orthogonal[/i] (the axes are perpendicular to each other) and [i]normalized[/i] (the axes have a length of 1.0), which also means it can only represent a rotation. See also [method Basis.orthonormalized].

fn (Transform3D) rotated #

fn (s &Transform3D) rotated(axis Vector3, angle f64) Transform3D

Returns a copy of this transform rotated around the given [param axis] by the given [param angle] (in radians). The [param axis] must be a normalized vector (see [method Vector3.normalized]). If [param angle] is positive, the basis is rotated counter-clockwise around the axis. This method is an optimized version of multiplying the given transform X with a corresponding rotation transform R from the left, i.e., R * X. This can be seen as transforming with respect to the global/parent frame.

fn (Transform3D) rotated_local #

fn (s &Transform3D) rotated_local(axis Vector3, angle f64) Transform3D

Returns a copy of this transform rotated around the given [param axis] by the given [param angle] (in radians). The [param axis] must be a normalized vector in the transform's local coordinate system. For example, to rotate around the local X-axis, use [constant Vector3.RIGHT]. This method is an optimized version of multiplying the given transform X with a corresponding rotation transform R from the right, i.e., X * R. This can be seen as transforming with respect to the local frame.

fn (Transform3D) scaled #

fn (s &Transform3D) scaled(scale Vector3) Transform3D

Returns a copy of this transform scaled by the given [param scale] factor. This method is an optimized version of multiplying the given transform X with a corresponding scaling transform S from the left, i.e., S * X. This can be seen as transforming with respect to the global/parent frame.

fn (Transform3D) scaled_local #

fn (s &Transform3D) scaled_local(scale Vector3) Transform3D

Returns a copy of this transform scaled by the given [param scale] factor. This method is an optimized version of multiplying the given transform X with a corresponding scaling transform S from the right, i.e., X * S. This can be seen as transforming with respect to the local frame.

fn (Transform3D) translated #

fn (s &Transform3D) translated(offset Vector3) Transform3D

Returns a copy of this transform translated by the given [param offset]. This method is an optimized version of multiplying the given transform X with a corresponding translation transform T from the left, i.e., T * X. This can be seen as transforming with respect to the global/parent frame.

fn (Transform3D) translated_local #

fn (s &Transform3D) translated_local(offset Vector3) Transform3D

Returns a copy of this transform translated by the given [param offset]. This method is an optimized version of multiplying the given transform X with a corresponding translation transform T from the right, i.e., X * T. This can be seen as transforming with respect to the local frame.

fn (Transform3D) looking_at #

fn (s &Transform3D) looking_at(target Vector3, cfg Transform3D_looking_at_Cfg) Transform3D

Returns a copy of this transform rotated so that the forward axis (-Z) points towards the [param target] position. The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The [param target] and [param up] vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space. If [param use_model_front] is true, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right).

fn (Transform3D) interpolate_with #

fn (s &Transform3D) interpolate_with(xform Transform3D, weight f64) Transform3D

Returns the result of the linear interpolation between this transform and [param xform] by the given [param weight]. The [param weight] should be between 0.0 and 1.0 (inclusive). Values outside this range are allowed and can be used to perform [i]extrapolation[/i] instead.

fn (Transform3D) is_equal_approx #

fn (s &Transform3D) is_equal_approx(xform Transform3D) bool

Returns true if this transform and [param xform] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.

fn (Transform3D) is_finite #

fn (s &Transform3D) is_finite() bool

Returns true if this transform is finite, by calling [method @GlobalScope.is_finite] on each component.

fn (Transform3D) to_variant #

fn (s &Transform3D) to_variant() Variant

fn (Transform3D) from_variant #

fn (mut s Transform3D) from_variant(variant &Variant)

fn (Transform3D) mul_i64 #

fn (a Transform3D) mul_i64(b i64) Transform3D

Multiplies all components of the [Transform3D] by the given [int], including the [member origin]. This affects the transform's scale uniformly, scaling the [member basis].

fn (Transform3D) div_i64 #

fn (a Transform3D) div_i64(b i64) Transform3D

Divides all components of the [Transform3D] by the given [int], including the [member origin]. This affects the transform's scale uniformly, scaling the [member basis].

fn (Transform3D) mul_f64 #

fn (a Transform3D) mul_f64(b f64) Transform3D

Multiplies all components of the [Transform3D] by the given [float], including the [member origin]. This affects the transform's scale uniformly, scaling the [member basis].

fn (Transform3D) div_f64 #

fn (a Transform3D) div_f64(b f64) Transform3D

Divides all components of the [Transform3D] by the given [float], including the [member origin]. This affects the transform's scale uniformly, scaling the [member basis].

fn (Transform3D) mul_vector3 #

fn (a Transform3D) mul_vector3(b Vector3) Vector3

Transforms (multiplies) the [Vector3] by this transformation matrix.

fn (Transform3D) mul_plane #

fn (a Transform3D) mul_plane(b Plane) Plane

Transforms (multiplies) the [Plane] by this transformation matrix.

fn (Transform3D) mul_aabb #

fn (a Transform3D) mul_aabb(b AABB) AABB

Transforms (multiplies) the [AABB] by this transformation matrix.

fn (Transform3D) == #

fn (a Transform3D) == (b Transform3D) bool

Returns true if the components of both transforms are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Transform3D) eq_transform3d #

fn (a Transform3D) eq_transform3d(b Transform3D) bool

Returns true if the components of both transforms are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Transform3D) ne_transform3d #

fn (a Transform3D) ne_transform3d(b Transform3D) bool

Returns true if the components of both transforms are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.

fn (Transform3D) * #

fn (a Transform3D) * (b Transform3D) Transform3D

Transforms (multiplies) this transform by the [param right] transform. This is the operation performed between parent and child [Node3D]s. [b]Note:[/b] If you need to only modify one attribute of this transform, consider using one of the following methods, instead:- For translation, see [method translated] or [method translated_local].

  • For rotation, see [method rotated] or [method rotated_local].
  • For scale, see [method scaled] or [method scaled_local].

fn (Transform3D) mul_transform3d #

fn (a Transform3D) mul_transform3d(b Transform3D) Transform3D

Transforms (multiplies) this transform by the [param right] transform. This is the operation performed between parent and child [Node3D]s. [b]Note:[/b] If you need to only modify one attribute of this transform, consider using one of the following methods, instead:- For translation, see [method translated] or [method translated_local].

  • For rotation, see [method rotated] or [method rotated_local].
  • For scale, see [method scaled] or [method scaled_local].

fn (Transform3D) in_dictionary #

fn (a Transform3D) in_dictionary(b Dictionary) bool

fn (Transform3D) in_array #

fn (a Transform3D) in_array(b Array) bool

fn (Transform3D) mul_packedvector3array #

fn (a Transform3D) mul_packedvector3array(b PackedVector3Array) PackedVector3Array

Transforms (multiplies) every [Vector3] element of the given [PackedVector3Array] by this transformation matrix. On larger arrays, this operation is much faster than transforming each [Vector3] individually.

struct Transform3D_looking_at_Cfg #

@[params]
struct Transform3D_looking_at_Cfg {
pub:
	up              Vector3 = Vector3{0, 1, 0}
	use_model_front bool
}

struct Translation #

struct Translation {
	Resource
}

A language translation that maps a collection of strings to their individual translations.

fn (Translation) to_variant #

fn (s &Translation) to_variant() Variant

fn (Translation) from_variant #

fn (mut s Translation) from_variant(variant &Variant)

fn (Translation) gd_get_plural_message #

fn (s &Translation) gd_get_plural_message(src_message string, src_plural_message string, n i64, context string) string

Virtual method to override [method get_plural_message].

fn (Translation) gd_get_message #

fn (s &Translation) gd_get_message(src_message string, context string) string

Virtual method to override [method get_message].

fn (Translation) set_locale #

fn (s &Translation) set_locale(locale string)

fn (Translation) get_locale #

fn (s &Translation) get_locale() string

fn (Translation) add_message #

fn (s &Translation) add_message(src_message string, xlated_message string, cfg Translation_add_message_Cfg)

Adds a message if nonexistent, followed by its translation. An additional context could be used to specify the translation context or differentiate polysemic words.

fn (Translation) add_plural_message #

fn (s &Translation) add_plural_message(src_message string, xlated_messages PackedStringArray, cfg Translation_add_plural_message_Cfg)

Adds a message involving plural translation if nonexistent, followed by its translation. An additional context could be used to specify the translation context or differentiate polysemic words.

fn (Translation) get_message #

fn (s &Translation) get_message(src_message string, cfg Translation_get_message_Cfg) string

Returns a message's translation.

fn (Translation) get_plural_message #

fn (s &Translation) get_plural_message(src_message string, src_plural_message string, n i64, cfg Translation_get_plural_message_Cfg) string

Returns a message's translation involving plurals. The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.

fn (Translation) erase_message #

fn (s &Translation) erase_message(src_message string, cfg Translation_erase_message_Cfg)

Erases a message.

fn (Translation) get_message_list #

fn (s &Translation) get_message_list() PackedStringArray

Returns all the messages (keys).

fn (Translation) get_translated_message_list #

fn (s &Translation) get_translated_message_list() PackedStringArray

Returns all the messages (translated text).

fn (Translation) get_message_count #

fn (s &Translation) get_message_count() i64

Returns the number of existing messages.

struct TranslationDomain #

struct TranslationDomain {
	RefCounted
}

A self-contained collection of [Translation] resources.

fn (TranslationDomain) to_variant #

fn (s &TranslationDomain) to_variant() Variant

fn (TranslationDomain) from_variant #

fn (mut s TranslationDomain) from_variant(variant &Variant)

fn (TranslationDomain) get_translation_object #

fn (s &TranslationDomain) get_translation_object(locale string) Translation

Returns the [Translation] instance that best matches [param locale]. Returns null if there are no matches.

fn (TranslationDomain) add_translation #

fn (s &TranslationDomain) add_translation(translation Translation)

Adds a translation.

fn (TranslationDomain) remove_translation #

fn (s &TranslationDomain) remove_translation(translation Translation)

Removes the given translation.

fn (TranslationDomain) clear #

fn (s &TranslationDomain) clear()

Removes all translations.

fn (TranslationDomain) translate #

fn (s &TranslationDomain) translate(message string, cfg TranslationDomain_translate_Cfg) string

Returns the current locale's translation for the given message and context.

fn (TranslationDomain) translate_plural #

fn (s &TranslationDomain) translate_plural(message string, message_plural string, n i64, cfg TranslationDomain_translate_plural_Cfg) string

Returns the current locale's translation for the given message, plural message and context. The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.

fn (TranslationDomain) get_locale_override #

fn (s &TranslationDomain) get_locale_override() string

Returns the locale override of the domain. Returns an empty string if locale override is disabled.

fn (TranslationDomain) set_locale_override #

fn (s &TranslationDomain) set_locale_override(locale string)

Sets the locale override of the domain. If [param locale] is an empty string, locale override is disabled. Otherwise, [param locale] will be standardized to match known locales (e.g. en-US would be matched to en_US). [b]Note:[/b] Calling this method does not automatically update texts in the scene tree. Please propagate the [constant MainLoop.NOTIFICATION_TRANSLATION_CHANGED] signal manually.

fn (TranslationDomain) is_enabled #

fn (s &TranslationDomain) is_enabled() bool

fn (TranslationDomain) set_enabled #

fn (s &TranslationDomain) set_enabled(enabled bool)

fn (TranslationDomain) is_pseudolocalization_enabled #

fn (s &TranslationDomain) is_pseudolocalization_enabled() bool

fn (TranslationDomain) set_pseudolocalization_enabled #

fn (s &TranslationDomain) set_pseudolocalization_enabled(enabled bool)

fn (TranslationDomain) is_pseudolocalization_accents_enabled #

fn (s &TranslationDomain) is_pseudolocalization_accents_enabled() bool

fn (TranslationDomain) set_pseudolocalization_accents_enabled #

fn (s &TranslationDomain) set_pseudolocalization_accents_enabled(enabled bool)

fn (TranslationDomain) is_pseudolocalization_double_vowels_enabled #

fn (s &TranslationDomain) is_pseudolocalization_double_vowels_enabled() bool

fn (TranslationDomain) set_pseudolocalization_double_vowels_enabled #

fn (s &TranslationDomain) set_pseudolocalization_double_vowels_enabled(enabled bool)

fn (TranslationDomain) is_pseudolocalization_fake_bidi_enabled #

fn (s &TranslationDomain) is_pseudolocalization_fake_bidi_enabled() bool

fn (TranslationDomain) set_pseudolocalization_fake_bidi_enabled #

fn (s &TranslationDomain) set_pseudolocalization_fake_bidi_enabled(enabled bool)

fn (TranslationDomain) is_pseudolocalization_override_enabled #

fn (s &TranslationDomain) is_pseudolocalization_override_enabled() bool

fn (TranslationDomain) set_pseudolocalization_override_enabled #

fn (s &TranslationDomain) set_pseudolocalization_override_enabled(enabled bool)

fn (TranslationDomain) is_pseudolocalization_skip_placeholders_enabled #

fn (s &TranslationDomain) is_pseudolocalization_skip_placeholders_enabled() bool

fn (TranslationDomain) set_pseudolocalization_skip_placeholders_enabled #

fn (s &TranslationDomain) set_pseudolocalization_skip_placeholders_enabled(enabled bool)

fn (TranslationDomain) get_pseudolocalization_expansion_ratio #

fn (s &TranslationDomain) get_pseudolocalization_expansion_ratio() f64

fn (TranslationDomain) set_pseudolocalization_expansion_ratio #

fn (s &TranslationDomain) set_pseudolocalization_expansion_ratio(ratio f64)

fn (TranslationDomain) get_pseudolocalization_prefix #

fn (s &TranslationDomain) get_pseudolocalization_prefix() string

fn (TranslationDomain) set_pseudolocalization_prefix #

fn (s &TranslationDomain) set_pseudolocalization_prefix(prefix string)

fn (TranslationDomain) get_pseudolocalization_suffix #

fn (s &TranslationDomain) get_pseudolocalization_suffix() string

fn (TranslationDomain) set_pseudolocalization_suffix #

fn (s &TranslationDomain) set_pseudolocalization_suffix(suffix string)

fn (TranslationDomain) pseudolocalize #

fn (s &TranslationDomain) pseudolocalize(message string) string

Returns the pseudolocalized string based on the [param message] passed in.

struct TranslationDomain_translate_Cfg #

@[params]
struct TranslationDomain_translate_Cfg {
pub:
	context string
}

Optional parameters for TranslationDomain#translate

struct TranslationDomain_translate_plural_Cfg #

@[params]
struct TranslationDomain_translate_plural_Cfg {
pub:
	context string
}

Optional parameters for TranslationDomain#translate_plural

struct TranslationServer #

struct TranslationServer {
	Object
}

The server responsible for language translations.

fn (TranslationServer) to_variant #

fn (s &TranslationServer) to_variant() Variant

fn (TranslationServer) from_variant #

fn (mut s TranslationServer) from_variant(variant &Variant)

fn (TranslationServer) set_locale #

fn (s &TranslationServer) set_locale(locale string)

Sets the locale of the project. The [param locale] string will be standardized to match known locales (e.g. en-US would be matched to en_US). If translations have been loaded beforehand for the new locale, they will be applied.

fn (TranslationServer) get_locale #

fn (s &TranslationServer) get_locale() string

Returns the current locale of the project. See also [method OS.get_locale] and [method OS.get_locale_language] to query the locale of the user system.

fn (TranslationServer) get_tool_locale #

fn (s &TranslationServer) get_tool_locale() string

Returns the current locale of the editor. [b]Note:[/b] When called from an exported project returns the same value as [method get_locale].

fn (TranslationServer) compare_locales #

fn (s &TranslationServer) compare_locales(locale_a string, locale_b string) i64

Compares two locales and returns a similarity score between 0 (no match) and 10 (full match).

fn (TranslationServer) standardize_locale #

fn (s &TranslationServer) standardize_locale(locale string, cfg TranslationServer_standardize_locale_Cfg) string

Returns a [param locale] string standardized to match known locales (e.g. en-US would be matched to en_US). If [param add_defaults] is true, the locale may have a default script or country added.

fn (TranslationServer) get_all_languages #

fn (s &TranslationServer) get_all_languages() PackedStringArray

Returns array of known language codes.

fn (TranslationServer) get_language_name #

fn (s &TranslationServer) get_language_name(language string) string

Returns a readable language name for the [param language] code.

fn (TranslationServer) get_all_scripts #

fn (s &TranslationServer) get_all_scripts() PackedStringArray

Returns an array of known script codes.

fn (TranslationServer) get_script_name #

fn (s &TranslationServer) get_script_name(script string) string

Returns a readable script name for the [param script] code.

fn (TranslationServer) get_all_countries #

fn (s &TranslationServer) get_all_countries() PackedStringArray

Returns an array of known country codes.

fn (TranslationServer) get_country_name #

fn (s &TranslationServer) get_country_name(country string) string

Returns a readable country name for the [param country] code.

fn (TranslationServer) get_locale_name #

fn (s &TranslationServer) get_locale_name(locale string) string

Returns a locale's language and its variant (e.g. "en_US" would return "English (United States)").

fn (TranslationServer) translate #

fn (s &TranslationServer) translate(message string, cfg TranslationServer_translate_Cfg) string

Returns the current locale's translation for the given message and context. [b]Note:[/b] This method always uses the main translation domain.

fn (TranslationServer) translate_plural #

fn (s &TranslationServer) translate_plural(message string, plural_message string, n i64, cfg TranslationServer_translate_plural_Cfg) string

Returns the current locale's translation for the given message, plural message and context. The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. [b]Note:[/b] This method always uses the main translation domain.

fn (TranslationServer) add_translation #

fn (s &TranslationServer) add_translation(translation Translation)

Adds a translation to the main translation domain.

fn (TranslationServer) remove_translation #

fn (s &TranslationServer) remove_translation(translation Translation)

Removes the given translation from the main translation domain.

fn (TranslationServer) get_translation_object #

fn (s &TranslationServer) get_translation_object(locale string) Translation

Returns the [Translation] instance that best matches [param locale] in the main translation domain. Returns null if there are no matches.

fn (TranslationServer) has_domain #

fn (s &TranslationServer) has_domain(domain string) bool

Returns true if a translation domain with the specified name exists.

fn (TranslationServer) get_or_add_domain #

fn (s &TranslationServer) get_or_add_domain(domain string) TranslationDomain

Returns the translation domain with the specified name. An empty translation domain will be created and added if it does not exist.

fn (TranslationServer) remove_domain #

fn (s &TranslationServer) remove_domain(domain string)

Removes the translation domain with the specified name. [b]Note:[/b] Trying to remove the main translation domain is an error.

fn (TranslationServer) clear #

fn (s &TranslationServer) clear()

Removes all translations from the main translation domain.

fn (TranslationServer) get_loaded_locales #

fn (s &TranslationServer) get_loaded_locales() PackedStringArray

Returns an array of all loaded locales of the project.

fn (TranslationServer) is_pseudolocalization_enabled #

fn (s &TranslationServer) is_pseudolocalization_enabled() bool

fn (TranslationServer) set_pseudolocalization_enabled #

fn (s &TranslationServer) set_pseudolocalization_enabled(enabled bool)

fn (TranslationServer) reload_pseudolocalization #

fn (s &TranslationServer) reload_pseudolocalization()

Reparses the pseudolocalization options and reloads the translation for the main translation domain.

fn (TranslationServer) pseudolocalize #

fn (s &TranslationServer) pseudolocalize(message string) string

Returns the pseudolocalized string based on the [param message] passed in. [b]Note:[/b] This method always uses the main translation domain.

struct TranslationServer_standardize_locale_Cfg #

@[params]
struct TranslationServer_standardize_locale_Cfg {
pub:
	add_defaults bool
}

Optional parameters for TranslationServer#standardize_locale

struct TranslationServer_translate_Cfg #

@[params]
struct TranslationServer_translate_Cfg {
pub:
	context string
}

Optional parameters for TranslationServer#translate

struct TranslationServer_translate_plural_Cfg #

@[params]
struct TranslationServer_translate_plural_Cfg {
pub:
	context string
}

Optional parameters for TranslationServer#translate_plural

struct Translation_add_message_Cfg #

@[params]
struct Translation_add_message_Cfg {
pub:
	context string
}

Optional parameters for Translation#add_message

struct Translation_add_plural_message_Cfg #

@[params]
struct Translation_add_plural_message_Cfg {
pub:
	context string
}

Optional parameters for Translation#add_plural_message

struct Translation_erase_message_Cfg #

@[params]
struct Translation_erase_message_Cfg {
pub:
	context string
}

Optional parameters for Translation#erase_message

struct Translation_get_message_Cfg #

@[params]
struct Translation_get_message_Cfg {
pub:
	context string
}

Optional parameters for Translation#get_message

struct Translation_get_plural_message_Cfg #

@[params]
struct Translation_get_plural_message_Cfg {
pub:
	context string
}

Optional parameters for Translation#get_plural_message

struct Tree #

struct Tree {
	Control
}

A control used to show a set of internal [TreeItem]s in a hierarchical structure.

fn (Tree) to_variant #

fn (s &Tree) to_variant() Variant

fn (Tree) from_variant #

fn (mut s Tree) from_variant(variant &Variant)

fn (Tree) clear #

fn (s &Tree) clear()

Clears the tree. This removes all items.

fn (Tree) create_item #

fn (s &Tree) create_item(cfg Tree_create_item_Cfg) TreeItem

Creates an item in the tree and adds it as a child of [param parent], which can be either a valid [TreeItem] or null. If [param parent] is null, the root item will be the parent, or the new item will be the root itself if the tree is empty. The new item will be the [param index]-th child of parent, or it will be the last child if there are not enough siblings.

fn (Tree) get_root #

fn (s &Tree) get_root() TreeItem

Returns the tree's root item, or null if the tree is empty.

fn (Tree) set_column_custom_minimum_width #

fn (s &Tree) set_column_custom_minimum_width(column i64, min_width i64)

Overrides the calculated minimum width of a column. It can be set to 0 to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].

fn (Tree) set_column_expand #

fn (s &Tree) set_column_expand(column i64, expand bool)

If true, the column will have the "Expand" flag of [Control]. Columns that have the "Expand" flag will use their expand ratio in a similar fashion to [member Control.size_flags_stretch_ratio] (see [method set_column_expand_ratio]).

fn (Tree) set_column_expand_ratio #

fn (s &Tree) set_column_expand_ratio(column i64, ratio i64)

Sets the relative expand ratio for a column. See [method set_column_expand].

fn (Tree) set_column_clip_content #

fn (s &Tree) set_column_clip_content(column i64, enable bool)

Allows to enable clipping for column's content, making the content size ignored.

fn (Tree) is_column_expanding #

fn (s &Tree) is_column_expanding(column i64) bool

Returns true if the column has enabled expanding (see [method set_column_expand]).

fn (Tree) is_column_clipping_content #

fn (s &Tree) is_column_clipping_content(column i64) bool

Returns true if the column has enabled clipping (see [method set_column_clip_content]).

fn (Tree) get_column_expand_ratio #

fn (s &Tree) get_column_expand_ratio(column i64) i64

Returns the expand ratio assigned to the column.

fn (Tree) get_column_width #

fn (s &Tree) get_column_width(column i64) i64

Returns the column's width in pixels.

fn (Tree) set_hide_root #

fn (s &Tree) set_hide_root(enable bool)

fn (Tree) is_root_hidden #

fn (s &Tree) is_root_hidden() bool

fn (Tree) get_next_selected #

fn (s &Tree) get_next_selected(from TreeItem) TreeItem

Returns the next selected [TreeItem] after the given one, or null if the end is reached. If [param from] is null, this returns the first selected item.

fn (Tree) get_selected #

fn (s &Tree) get_selected() TreeItem

Returns the currently focused item, or null if no item is focused. In [constant SELECT_ROW] and [constant SELECT_SINGLE] modes, the focused item is same as the selected item. In [constant SELECT_MULTI] mode, the focused item is the item under the focus cursor, not necessarily selected. To get the currently selected item(s), use [method get_next_selected].

fn (Tree) set_selected #

fn (s &Tree) set_selected(item TreeItem, column i64)

Selects the specified [TreeItem] and column.

fn (Tree) get_selected_column #

fn (s &Tree) get_selected_column() i64

Returns the currently focused column, or -1 if no column is focused. In [constant SELECT_SINGLE] mode, the focused column is the selected column. In [constant SELECT_ROW] mode, the focused column is always 0 if any item is selected. In [constant SELECT_MULTI] mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected. To tell whether a column of an item is selected, use [method TreeItem.is_selected].

fn (Tree) get_pressed_button #

fn (s &Tree) get_pressed_button() i64

Returns the last pressed button's index.

fn (Tree) set_select_mode #

fn (s &Tree) set_select_mode(mode TreeSelectMode)

fn (Tree) get_select_mode #

fn (s &Tree) get_select_mode() TreeSelectMode

fn (Tree) deselect_all #

fn (s &Tree) deselect_all()

Deselects all tree items (rows and columns). In [constant SELECT_MULTI] mode also removes selection cursor.

fn (Tree) set_columns #

fn (s &Tree) set_columns(amount i64)

fn (Tree) get_columns #

fn (s &Tree) get_columns() i64

fn (Tree) get_edited #

fn (s &Tree) get_edited() TreeItem

Returns the currently edited item. Can be used with [signal item_edited] to get the item that was modified. [codeblocks] [gdscript] func _ready(): $Tree.item_edited.connect(on_Tree_item_edited)

func on_Tree_item_edited(): print($Tree.get_edited()) # This item just got edited (e.g. checked). [/gdscript] [csharp] public override void _Ready() { GetNode("Tree").ItemEdited += OnTreeItemEdited; }

public void OnTreeItemEdited() { GD.Print(GetNode("Tree").GetEdited()); // This item just got edited (e.g. checked). } [/csharp] [/codeblocks]

fn (Tree) get_edited_column #

fn (s &Tree) get_edited_column() i64

Returns the column for the currently edited item.

fn (Tree) edit_selected #

fn (s &Tree) edit_selected(cfg Tree_edit_selected_Cfg) bool

Edits the selected tree item as if it was clicked. Either the item must be set editable with [method TreeItem.set_editable] or [param force_edit] must be true. Returns true if the item could be edited. Fails if no item is selected.

fn (Tree) get_custom_popup_rect #

fn (s &Tree) get_custom_popup_rect() Rect2

Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode].

fn (Tree) get_item_area_rect #

fn (s &Tree) get_item_area_rect(item TreeItem, cfg Tree_get_item_area_rect_Cfg) Rect2

Returns the rectangle area for the specified [TreeItem]. If [param column] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned.

fn (Tree) get_item_at_position #

fn (s &Tree) get_item_at_position(position Vector2) TreeItem

Returns the tree item at the specified position (relative to the tree origin position).

fn (Tree) get_column_at_position #

fn (s &Tree) get_column_at_position(position Vector2) i64

Returns the column index at [param position], or -1 if no item is there.

fn (Tree) get_drop_section_at_position #

fn (s &Tree) get_drop_section_at_position(position Vector2) i64

Returns the drop section at [param position], or -100 if no item is there. Values -1, 0, or 1 will be returned for the "above item", "on item", and "below item" drop sections, respectively. See [enum DropModeFlags] for a description of each drop section. To get the item which the returned drop section is relative to, use [method get_item_at_position].

fn (Tree) get_button_id_at_position #

fn (s &Tree) get_button_id_at_position(position Vector2) i64

Returns the button ID at [param position], or -1 if no button is there.

fn (Tree) ensure_cursor_is_visible #

fn (s &Tree) ensure_cursor_is_visible()

Makes the currently focused cell visible. This will scroll the tree if necessary. In [constant SELECT_ROW] mode, this will not do horizontal scrolling, as all the cells in the selected row is focused logically. [b]Note:[/b] Despite the name of this method, the focus cursor itself is only visible in [constant SELECT_MULTI] mode.

fn (Tree) set_column_titles_visible #

fn (s &Tree) set_column_titles_visible(visible bool)

fn (Tree) are_column_titles_visible #

fn (s &Tree) are_column_titles_visible() bool

fn (Tree) set_column_title #

fn (s &Tree) set_column_title(column i64, title string)

Sets the title of a column.

fn (Tree) get_column_title #

fn (s &Tree) get_column_title(column i64) string

Returns the column's title.

fn (Tree) set_column_title_alignment #

fn (s &Tree) set_column_title_alignment(column i64, title_alignment HorizontalAlignment)

Sets the column title alignment. Note that [constant @GlobalScope.HORIZONTAL_ALIGNMENT_FILL] is not supported for column titles.

fn (Tree) get_column_title_alignment #

fn (s &Tree) get_column_title_alignment(column i64) HorizontalAlignment

Returns the column title alignment.

fn (Tree) set_column_title_direction #

fn (s &Tree) set_column_title_direction(column i64, direction ControlTextDirection)

Sets column title base writing direction.

fn (Tree) get_column_title_direction #

fn (s &Tree) get_column_title_direction(column i64) ControlTextDirection

Returns column title base writing direction.

fn (Tree) set_column_title_language #

fn (s &Tree) set_column_title_language(column i64, language string)

Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.

fn (Tree) get_column_title_language #

fn (s &Tree) get_column_title_language(column i64) string

Returns column title language code.

fn (Tree) get_scroll #

fn (s &Tree) get_scroll() Vector2

Returns the current scrolling position.

fn (Tree) scroll_to_item #

fn (s &Tree) scroll_to_item(item TreeItem, cfg Tree_scroll_to_item_Cfg)

Causes the [Tree] to jump to the specified [TreeItem].

fn (Tree) set_h_scroll_enabled #

fn (s &Tree) set_h_scroll_enabled(h_scroll bool)

fn (Tree) is_h_scroll_enabled #

fn (s &Tree) is_h_scroll_enabled() bool

fn (Tree) set_v_scroll_enabled #

fn (s &Tree) set_v_scroll_enabled(h_scroll bool)

fn (Tree) is_v_scroll_enabled #

fn (s &Tree) is_v_scroll_enabled() bool

fn (Tree) set_hide_folding #

fn (s &Tree) set_hide_folding(hide bool)

fn (Tree) is_folding_hidden #

fn (s &Tree) is_folding_hidden() bool

fn (Tree) set_enable_recursive_folding #

fn (s &Tree) set_enable_recursive_folding(enable bool)

fn (Tree) is_recursive_folding_enabled #

fn (s &Tree) is_recursive_folding_enabled() bool

fn (Tree) set_drop_mode_flags #

fn (s &Tree) set_drop_mode_flags(flags i64)

fn (Tree) get_drop_mode_flags #

fn (s &Tree) get_drop_mode_flags() i64

fn (Tree) set_allow_rmb_select #

fn (s &Tree) set_allow_rmb_select(allow bool)

fn (Tree) get_allow_rmb_select #

fn (s &Tree) get_allow_rmb_select() bool

fn (Tree) set_allow_reselect #

fn (s &Tree) set_allow_reselect(allow bool)

fn (Tree) get_allow_reselect #

fn (s &Tree) get_allow_reselect() bool

fn (Tree) set_auto_tooltip #

fn (s &Tree) set_auto_tooltip(enable bool)

fn (Tree) is_auto_tooltip_enabled #

fn (s &Tree) is_auto_tooltip_enabled() bool

struct TreeItem #

struct TreeItem {
	Object
}

An internal control for a single item inside [Tree].

fn (TreeItem) to_variant #

fn (s &TreeItem) to_variant() Variant

fn (TreeItem) from_variant #

fn (mut s TreeItem) from_variant(variant &Variant)

fn (TreeItem) set_cell_mode #

fn (s &TreeItem) set_cell_mode(column i64, mode TreeItemTreeCellMode)

Sets the given column's cell mode to [param mode]. This determines how the cell is displayed and edited.

fn (TreeItem) get_cell_mode #

fn (s &TreeItem) get_cell_mode(column i64) TreeItemTreeCellMode

Returns the column's cell mode.

fn (TreeItem) set_auto_translate_mode #

fn (s &TreeItem) set_auto_translate_mode(column i64, mode NodeAutoTranslateMode)

Sets the given column's auto translate mode to [param mode]. All columns use [constant Node.AUTO_TRANSLATE_MODE_INHERIT] by default, which uses the same auto translate mode as the [Tree] itself.

fn (TreeItem) get_auto_translate_mode #

fn (s &TreeItem) get_auto_translate_mode(column i64) NodeAutoTranslateMode

Returns the column's auto translate mode.

fn (TreeItem) set_edit_multiline #

fn (s &TreeItem) set_edit_multiline(column i64, multiline bool)

If [param multiline] is true, the given [param column] is multiline editable. [b]Note:[/b] This option only affects the type of control ([LineEdit] or [TextEdit]) that appears when editing the column. You can set multiline values with [method set_text] even if the column is not multiline editable.

fn (TreeItem) is_edit_multiline #

fn (s &TreeItem) is_edit_multiline(column i64) bool

Returns true if the given [param column] is multiline editable.

fn (TreeItem) set_checked #

fn (s &TreeItem) set_checked(column i64, checked bool)

If [param checked] is true, the given [param column] is checked. Clears column's indeterminate status.

fn (TreeItem) set_indeterminate #

fn (s &TreeItem) set_indeterminate(column i64, indeterminate bool)

If [param indeterminate] is true, the given [param column] is marked indeterminate. [b]Note:[/b] If set true from false, then column is cleared of checked status.

fn (TreeItem) is_checked #

fn (s &TreeItem) is_checked(column i64) bool

Returns true if the given [param column] is checked.

fn (TreeItem) is_indeterminate #

fn (s &TreeItem) is_indeterminate(column i64) bool

Returns true if the given [param column] is indeterminate.

fn (TreeItem) propagate_check #

fn (s &TreeItem) propagate_check(column i64, cfg TreeItem_propagate_check_Cfg)

Propagates this item's checked status to its children and parents for the given [param column]. It is possible to process the items affected by this method call by connecting to [signal Tree.check_propagated_to_item]. The order that the items affected will be processed is as follows: the item invoking this method, children of that item, and finally parents of that item. If [param emit_signal] is false, then [signal Tree.check_propagated_to_item] will not be emitted.

fn (TreeItem) set_text #

fn (s &TreeItem) set_text(column i64, text string)

Sets the given column's text value.

fn (TreeItem) get_text #

fn (s &TreeItem) get_text(column i64) string

Returns the given column's text.

fn (TreeItem) set_description #

fn (s &TreeItem) set_description(column i64, description string)

Sets the given column's description for assistive apps.

fn (TreeItem) get_description #

fn (s &TreeItem) get_description(column i64) string

Returns the given column's description for assistive apps.

fn (TreeItem) set_text_direction #

fn (s &TreeItem) set_text_direction(column i64, direction ControlTextDirection)

Sets item's text base writing direction.

fn (TreeItem) get_text_direction #

fn (s &TreeItem) get_text_direction(column i64) ControlTextDirection

Returns item's text base writing direction.

fn (TreeItem) set_autowrap_mode #

fn (s &TreeItem) set_autowrap_mode(column i64, autowrap_mode TextServerAutowrapMode)

Sets the autowrap mode in the given [param column]. If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the cell's bounding rectangle.

fn (TreeItem) get_autowrap_mode #

fn (s &TreeItem) get_autowrap_mode(column i64) TextServerAutowrapMode

Returns the text autowrap mode in the given [param column]. By default it is [constant TextServer.AUTOWRAP_OFF].

fn (TreeItem) set_text_overrun_behavior #

fn (s &TreeItem) set_text_overrun_behavior(column i64, overrun_behavior TextServerOverrunBehavior)

Sets the clipping behavior when the text exceeds the item's bounding rectangle in the given [param column].

fn (TreeItem) get_text_overrun_behavior #

fn (s &TreeItem) get_text_overrun_behavior(column i64) TextServerOverrunBehavior

Returns the clipping behavior when the text exceeds the item's bounding rectangle in the given [param column]. By default it is [constant TextServer.OVERRUN_TRIM_ELLIPSIS].

fn (TreeItem) set_structured_text_bidi_override #

fn (s &TreeItem) set_structured_text_bidi_override(column i64, parser TextServerStructuredTextParser)

Set BiDi algorithm override for the structured text. Has effect for cells that display text.

fn (TreeItem) get_structured_text_bidi_override #

fn (s &TreeItem) get_structured_text_bidi_override(column i64) TextServerStructuredTextParser

Returns the BiDi algorithm override set for this cell.

fn (TreeItem) set_structured_text_bidi_override_options #

fn (s &TreeItem) set_structured_text_bidi_override_options(column i64, gd_args Array)

Set additional options for BiDi override. Has effect for cells that display text.

fn (TreeItem) get_structured_text_bidi_override_options #

fn (s &TreeItem) get_structured_text_bidi_override_options(column i64) Array

Returns the additional BiDi options set for this cell.

fn (TreeItem) set_language #

fn (s &TreeItem) set_language(column i64, language string)

Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.

fn (TreeItem) get_language #

fn (s &TreeItem) get_language(column i64) string

Returns item's text language code.

fn (TreeItem) set_suffix #

fn (s &TreeItem) set_suffix(column i64, text string)

Sets a string to be shown after a column's value (for example, a unit abbreviation).

fn (TreeItem) get_suffix #

fn (s &TreeItem) get_suffix(column i64) string

Gets the suffix string shown after the column value.

fn (TreeItem) set_icon #

fn (s &TreeItem) set_icon(column i64, texture Texture2D)

Sets the given cell's icon [Texture2D]. If the cell is in [constant CELL_MODE_ICON] mode, the icon is displayed in the center of the cell. Otherwise, the icon is displayed before the cell's text. [constant CELL_MODE_RANGE] does not display an icon.

fn (TreeItem) get_icon #

fn (s &TreeItem) get_icon(column i64) Texture2D

Returns the given column's icon [Texture2D]. Error if no icon is set.

fn (TreeItem) set_icon_overlay #

fn (s &TreeItem) set_icon_overlay(column i64, texture Texture2D)

Sets the given cell's icon overlay [Texture2D]. The cell has to be in [constant CELL_MODE_ICON] mode, and icon has to be set. Overlay is drawn on top of icon, in the bottom left corner.

fn (TreeItem) get_icon_overlay #

fn (s &TreeItem) get_icon_overlay(column i64) Texture2D

Returns the given column's icon overlay [Texture2D].

fn (TreeItem) set_icon_region #

fn (s &TreeItem) set_icon_region(column i64, region Rect2)

Sets the given column's icon's texture region.

fn (TreeItem) get_icon_region #

fn (s &TreeItem) get_icon_region(column i64) Rect2

Returns the icon [Texture2D] region as [Rect2].

fn (TreeItem) set_icon_max_width #

fn (s &TreeItem) set_icon_max_width(column i64, width i64)

Sets the maximum allowed width of the icon in the given [param column]. This limit is applied on top of the default size of the icon and on top of [theme_item Tree.icon_max_width]. The height is adjusted according to the icon's ratio.

fn (TreeItem) get_icon_max_width #

fn (s &TreeItem) get_icon_max_width(column i64) i64

Returns the maximum allowed width of the icon in the given [param column].

fn (TreeItem) set_icon_modulate #

fn (s &TreeItem) set_icon_modulate(column i64, modulate Color)

Modulates the given column's icon with [param modulate].

fn (TreeItem) get_icon_modulate #

fn (s &TreeItem) get_icon_modulate(column i64) Color

Returns the [Color] modulating the column's icon.

fn (TreeItem) set_range #

fn (s &TreeItem) set_range(column i64, value f64)

Sets the value of a [constant CELL_MODE_RANGE] column.

fn (TreeItem) get_range #

fn (s &TreeItem) get_range(column i64) f64

Returns the value of a [constant CELL_MODE_RANGE] column.

fn (TreeItem) set_range_config #

fn (s &TreeItem) set_range_config(column i64, min f64, max f64, step f64, cfg TreeItem_set_range_config_Cfg)

Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode. If [param expr] is true, the edit mode slider will use an exponential scale as with [member Range.exp_edit].

fn (TreeItem) get_range_config #

fn (s &TreeItem) get_range_config(column i64) Dictionary

Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".

fn (TreeItem) set_metadata #

fn (s &TreeItem) set_metadata(column i64, meta_ ToVariant)

Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data.

fn (TreeItem) get_metadata #

fn (s &TreeItem) get_metadata(column i64) Variant

Returns the metadata value that was set for the given column using [method set_metadata].

fn (TreeItem) set_custom_draw #

fn (s &TreeItem) set_custom_draw(column i64, object Object, callback string)

Sets the given column's custom draw callback to the [param callback] method on [param object]. The method named [param callback] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].

fn (TreeItem) set_custom_draw_callback #

fn (s &TreeItem) set_custom_draw_callback(column i64, callback Callable)

Sets the given column's custom draw callback. Use an empty [Callable] ([code skip-lint]Callable()`) to clear the custom callback. The cell has to be in [constant CELL_MODE_CUSTOM] to use this feature. The [param callback] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].

fn (TreeItem) get_custom_draw_callback #

fn (s &TreeItem) get_custom_draw_callback(column i64) Callable

Returns the custom callback of column [param column].

fn (TreeItem) set_collapsed #

fn (s &TreeItem) set_collapsed(enable bool)

fn (TreeItem) is_collapsed #

fn (s &TreeItem) is_collapsed() bool

fn (TreeItem) set_collapsed_recursive #

fn (s &TreeItem) set_collapsed_recursive(enable bool)

Collapses or uncollapses this [TreeItem] and all the descendants of this item.

fn (TreeItem) is_any_collapsed #

fn (s &TreeItem) is_any_collapsed(cfg TreeItem_is_any_collapsed_Cfg) bool

Returns true if this [TreeItem], or any of its descendants, is collapsed. If [param only_visible] is true it ignores non-visible [TreeItem]s.

fn (TreeItem) set_visible #

fn (s &TreeItem) set_visible(enable bool)

fn (TreeItem) is_visible #

fn (s &TreeItem) is_visible() bool

fn (TreeItem) is_visible_in_tree #

fn (s &TreeItem) is_visible_in_tree() bool

Returns true if [member visible] is true and all its ancestors are also visible.

fn (TreeItem) uncollapse_tree #

fn (s &TreeItem) uncollapse_tree()

Uncollapses all [TreeItem]s necessary to reveal this [TreeItem], i.e. all ancestor [TreeItem]s.

fn (TreeItem) set_custom_minimum_height #

fn (s &TreeItem) set_custom_minimum_height(height i64)

fn (TreeItem) get_custom_minimum_height #

fn (s &TreeItem) get_custom_minimum_height() i64

fn (TreeItem) set_selectable #

fn (s &TreeItem) set_selectable(column i64, selectable bool)

If [param selectable] is true, the given [param column] is selectable.

fn (TreeItem) is_selectable #

fn (s &TreeItem) is_selectable(column i64) bool

Returns true if the given [param column] is selectable.

fn (TreeItem) is_selected #

fn (s &TreeItem) is_selected(column i64) bool

Returns true if the given [param column] is selected.

fn (TreeItem) gd_select #

fn (s &TreeItem) gd_select(column i64)

Selects the given [param column].

fn (TreeItem) deselect #

fn (s &TreeItem) deselect(column i64)

Deselects the given column.

fn (TreeItem) set_editable #

fn (s &TreeItem) set_editable(column i64, enabled bool)

If [param enabled] is true, the given [param column] is editable.

fn (TreeItem) is_editable #

fn (s &TreeItem) is_editable(column i64) bool

Returns true if the given [param column] is editable.

fn (TreeItem) set_custom_color #

fn (s &TreeItem) set_custom_color(column i64, color Color)

Sets the given column's custom color.

fn (TreeItem) get_custom_color #

fn (s &TreeItem) get_custom_color(column i64) Color

Returns the custom color of column [param column].

fn (TreeItem) clear_custom_color #

fn (s &TreeItem) clear_custom_color(column i64)

Resets the color for the given column to default.

fn (TreeItem) set_custom_font #

fn (s &TreeItem) set_custom_font(column i64, font Font)

Sets custom font used to draw text in the given [param column].

fn (TreeItem) get_custom_font #

fn (s &TreeItem) get_custom_font(column i64) Font

Returns custom font used to draw text in the column [param column].

fn (TreeItem) set_custom_font_size #

fn (s &TreeItem) set_custom_font_size(column i64, font_size i64)

Sets custom font size used to draw text in the given [param column].

fn (TreeItem) get_custom_font_size #

fn (s &TreeItem) get_custom_font_size(column i64) i64

Returns custom font size used to draw text in the column [param column].

fn (TreeItem) set_custom_bg_color #

fn (s &TreeItem) set_custom_bg_color(column i64, color Color, cfg TreeItem_set_custom_bg_color_Cfg)

Sets the given column's custom background color and whether to just use it as an outline.

fn (TreeItem) clear_custom_bg_color #

fn (s &TreeItem) clear_custom_bg_color(column i64)

Resets the background color for the given column to default.

fn (TreeItem) get_custom_bg_color #

fn (s &TreeItem) get_custom_bg_color(column i64) Color

Returns the custom background color of column [param column].

fn (TreeItem) set_custom_as_button #

fn (s &TreeItem) set_custom_as_button(column i64, enable bool)

Makes a cell with [constant CELL_MODE_CUSTOM] display as a non-flat button with a [StyleBox].

fn (TreeItem) is_custom_set_as_button #

fn (s &TreeItem) is_custom_set_as_button(column i64) bool

Returns true if the cell was made into a button with [method set_custom_as_button].

fn (TreeItem) clear_buttons #

fn (s &TreeItem) clear_buttons()

Removes all buttons from all columns of this item.

fn (TreeItem) add_button #

fn (s &TreeItem) add_button(column i64, button Texture2D, cfg TreeItem_add_button_Cfg)

Adds a button with [Texture2D] [param button] to the end of the cell at column [param column]. The [param id] is used to identify the button in the according [signal Tree.button_clicked] signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately before this method. Optionally, the button can be [param disabled] and have a [param tooltip_text]. [param description] is used as the button description for assistive apps.

fn (TreeItem) get_button_count #

fn (s &TreeItem) get_button_count(column i64) i64

Returns the number of buttons in column [param column].

fn (TreeItem) get_button_tooltip_text #

fn (s &TreeItem) get_button_tooltip_text(column i64, button_index i64) string

Returns the tooltip text for the button at index [param button_index] in column [param column].

fn (TreeItem) get_button_id #

fn (s &TreeItem) get_button_id(column i64, button_index i64) i64

Returns the ID for the button at index [param button_index] in column [param column].

fn (TreeItem) get_button_by_id #

fn (s &TreeItem) get_button_by_id(column i64, id i64) i64

Returns the button index if there is a button with ID [param id] in column [param column], otherwise returns -1.

fn (TreeItem) get_button_color #

fn (s &TreeItem) get_button_color(column i64, id i64) Color

Returns the color of the button with ID [param id] in column [param column]. If the specified button does not exist, returns [constant Color.BLACK].

fn (TreeItem) get_button #

fn (s &TreeItem) get_button(column i64, button_index i64) Texture2D

Returns the [Texture2D] of the button at index [param button_index] in column [param column].

fn (TreeItem) set_button_tooltip_text #

fn (s &TreeItem) set_button_tooltip_text(column i64, button_index i64, tooltip string)

Sets the tooltip text for the button at index [param button_index] in the given [param column].

fn (TreeItem) set_button #

fn (s &TreeItem) set_button(column i64, button_index i64, button Texture2D)

Sets the given column's button [Texture2D] at index [param button_index] to [param button].

fn (TreeItem) erase_button #

fn (s &TreeItem) erase_button(column i64, button_index i64)

Removes the button at index [param button_index] in column [param column].

fn (TreeItem) set_button_description #

fn (s &TreeItem) set_button_description(column i64, button_index i64, description string)

Sets the given column's button description at index [param button_index] for assistive apps.

fn (TreeItem) set_button_disabled #

fn (s &TreeItem) set_button_disabled(column i64, button_index i64, disabled bool)

If true, disables the button at index [param button_index] in the given [param column].

fn (TreeItem) set_button_color #

fn (s &TreeItem) set_button_color(column i64, button_index i64, color Color)

Sets the given column's button color at index [param button_index] to [param color].

fn (TreeItem) is_button_disabled #

fn (s &TreeItem) is_button_disabled(column i64, button_index i64) bool

Returns true if the button at index [param button_index] for the given [param column] is disabled.

fn (TreeItem) set_tooltip_text #

fn (s &TreeItem) set_tooltip_text(column i64, tooltip string)

Sets the given column's tooltip text.

fn (TreeItem) get_tooltip_text #

fn (s &TreeItem) get_tooltip_text(column i64) string

Returns the given column's tooltip text.

fn (TreeItem) set_text_alignment #

fn (s &TreeItem) set_text_alignment(column i64, text_alignment HorizontalAlignment)

Sets the given column's text alignment to [param text_alignment].

fn (TreeItem) get_text_alignment #

fn (s &TreeItem) get_text_alignment(column i64) HorizontalAlignment

Returns the given column's text alignment.

fn (TreeItem) set_expand_right #

fn (s &TreeItem) set_expand_right(column i64, enable bool)

If [param enable] is true, the given [param column] is expanded to the right.

fn (TreeItem) get_expand_right #

fn (s &TreeItem) get_expand_right(column i64) bool

Returns true if expand_right is set.

fn (TreeItem) set_disable_folding #

fn (s &TreeItem) set_disable_folding(disable bool)

fn (TreeItem) is_folding_disabled #

fn (s &TreeItem) is_folding_disabled() bool

fn (TreeItem) create_child #

fn (s &TreeItem) create_child(cfg TreeItem_create_child_Cfg) TreeItem

Creates an item and adds it as a child. The new item will be inserted as position [param index] (the default value -1 means the last position), or it will be the last child if [param index] is higher than the child count.

fn (TreeItem) add_child #

fn (s &TreeItem) add_child(child TreeItem)

Adds a previously unparented [TreeItem] as a direct child of this one. The [param child] item must not be a part of any [Tree] or parented to any [TreeItem]. See also [method remove_child].

fn (TreeItem) remove_child #

fn (s &TreeItem) remove_child(child TreeItem)

Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later (see [method add_child]). To completely remove a [TreeItem] use [method Object.free]. [b]Note:[/b] If you want to move a child from one [Tree] to another, then instead of removing and adding it manually you can use [method move_before] or [method move_after].

fn (TreeItem) get_tree #

fn (s &TreeItem) get_tree() Tree

Returns the [Tree] that owns this TreeItem.

fn (TreeItem) get_next #

fn (s &TreeItem) get_next() TreeItem

Returns the next sibling TreeItem in the tree or a null object if there is none.

fn (TreeItem) get_prev #

fn (s &TreeItem) get_prev() TreeItem

Returns the previous sibling TreeItem in the tree or a null object if there is none.

fn (TreeItem) get_parent #

fn (s &TreeItem) get_parent() TreeItem

Returns the parent TreeItem or a null object if there is none.

fn (TreeItem) get_first_child #

fn (s &TreeItem) get_first_child() TreeItem

Returns the TreeItem's first child.

fn (TreeItem) get_next_in_tree #

fn (s &TreeItem) get_next_in_tree(cfg TreeItem_get_next_in_tree_Cfg) TreeItem

Returns the next TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If [param wrap] is enabled, the method will wrap around to the first element in the tree when called on the last element, otherwise it returns null.

fn (TreeItem) get_prev_in_tree #

fn (s &TreeItem) get_prev_in_tree(cfg TreeItem_get_prev_in_tree_Cfg) TreeItem

Returns the previous TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If [param wrap] is enabled, the method will wrap around to the last element in the tree when called on the first visible element, otherwise it returns null.

fn (TreeItem) get_next_visible #

fn (s &TreeItem) get_next_visible(cfg TreeItem_get_next_visible_Cfg) TreeItem

Returns the next visible TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If [param wrap] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns null.

fn (TreeItem) get_prev_visible #

fn (s &TreeItem) get_prev_visible(cfg TreeItem_get_prev_visible_Cfg) TreeItem

Returns the previous visible sibling TreeItem in the tree (in the context of a depth-first search) or a null object if there is none. If [param wrap] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns null.

fn (TreeItem) get_child #

fn (s &TreeItem) get_child(index i64) TreeItem

Returns a child item by its [param index] (see [method get_child_count]). This method is often used for iterating all children of an item. Negative indices access the children from the last one.

fn (TreeItem) get_child_count #

fn (s &TreeItem) get_child_count() i64

Returns the number of child items.

fn (TreeItem) get_children #

fn (s &TreeItem) get_children() Array

Returns an array of references to the item's children.

fn (TreeItem) get_index #

fn (s &TreeItem) get_index() i64

Returns the node's order in the tree. For example, if called on the first child item the position is 0.

fn (TreeItem) move_before #

fn (s &TreeItem) move_before(item TreeItem)

Moves this TreeItem right before the given [param item]. [b]Note:[/b] You can't move to the root or move the root.

fn (TreeItem) move_after #

fn (s &TreeItem) move_after(item TreeItem)

Moves this TreeItem right after the given [param item]. [b]Note:[/b] You can't move to the root or move the root.

fn (TreeItem) call_recursive #

fn (s &TreeItem) call_recursive(method string, varargs ...ToVariant)

Calls the [param method] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.

struct TreeItem_add_button_Cfg #

@[params]
struct TreeItem_add_button_Cfg {
pub:
	id           i64 = -1
	disabled     bool
	tooltip_text string
	description  string
}

Optional parameters for TreeItem#add_button

struct TreeItem_create_child_Cfg #

@[params]
struct TreeItem_create_child_Cfg {
pub:
	index i64 = -1
}

Optional parameters for TreeItem#create_child

struct TreeItem_get_next_in_tree_Cfg #

@[params]
struct TreeItem_get_next_in_tree_Cfg {
pub:
	wrap bool
}

Optional parameters for TreeItem#get_next_in_tree

struct TreeItem_get_next_visible_Cfg #

@[params]
struct TreeItem_get_next_visible_Cfg {
pub:
	wrap bool
}

Optional parameters for TreeItem#get_next_visible

struct TreeItem_get_prev_in_tree_Cfg #

@[params]
struct TreeItem_get_prev_in_tree_Cfg {
pub:
	wrap bool
}

Optional parameters for TreeItem#get_prev_in_tree

struct TreeItem_get_prev_visible_Cfg #

@[params]
struct TreeItem_get_prev_visible_Cfg {
pub:
	wrap bool
}

Optional parameters for TreeItem#get_prev_visible

struct TreeItem_is_any_collapsed_Cfg #

@[params]
struct TreeItem_is_any_collapsed_Cfg {
pub:
	only_visible bool
}

Optional parameters for TreeItem#is_any_collapsed

struct TreeItem_propagate_check_Cfg #

@[params]
struct TreeItem_propagate_check_Cfg {
pub:
	emit_signal bool
}

Optional parameters for TreeItem#propagate_check

struct TreeItem_set_custom_bg_color_Cfg #

@[params]
struct TreeItem_set_custom_bg_color_Cfg {
pub:
	just_outline bool
}

Optional parameters for TreeItem#set_custom_bg_color

struct TreeItem_set_range_config_Cfg #

@[params]
struct TreeItem_set_range_config_Cfg {
pub:
	expr bool
}

Optional parameters for TreeItem#set_range_config

struct Tree_create_item_Cfg #

@[params]
struct Tree_create_item_Cfg {
pub:
	parent TreeItem
	index  i64 = -1
}

Optional parameters for Tree#create_item

struct Tree_edit_selected_Cfg #

@[params]
struct Tree_edit_selected_Cfg {
pub:
	force_edit bool
}

Optional parameters for Tree#edit_selected

struct Tree_get_item_area_rect_Cfg #

@[params]
struct Tree_get_item_area_rect_Cfg {
pub:
	column       i64 = -1
	button_index i64 = -1
}

Optional parameters for Tree#get_item_area_rect

struct Tree_scroll_to_item_Cfg #

@[params]
struct Tree_scroll_to_item_Cfg {
pub:
	center_on_item bool
}

Optional parameters for Tree#scroll_to_item

struct TriangleMesh #

struct TriangleMesh {
	RefCounted
}

Triangle geometry for efficient, physicsless intersection queries.

fn (TriangleMesh) to_variant #

fn (s &TriangleMesh) to_variant() Variant

fn (TriangleMesh) from_variant #

fn (mut s TriangleMesh) from_variant(variant &Variant)

fn (TriangleMesh) create_from_faces #

fn (s &TriangleMesh) create_from_faces(faces PackedVector3Array) bool

Creates the BVH tree from an array of faces. Each 3 vertices of the input [param faces] array represent one triangle (face). Returns true if the tree is successfully built, false otherwise.

fn (TriangleMesh) get_faces #

fn (s &TriangleMesh) get_faces() PackedVector3Array

Returns a copy of the geometry faces. Each 3 vertices of the array represent one triangle (face).

fn (TriangleMesh) intersect_segment #

fn (s &TriangleMesh) intersect_segment(begin Vector3, end Vector3) Dictionary

Tests for intersection with a segment going from [param begin] to [param end]. If an intersection with a triangle happens returns a [Dictionary] with the following fields: position: The position on the intersected triangle. normal: The normal of the intersected triangle. face_index: The index of the intersected triangle. Returns an empty [Dictionary] if no intersection happens. See also [method intersect_ray], which is similar but uses an infinite-length ray.

fn (TriangleMesh) intersect_ray #

fn (s &TriangleMesh) intersect_ray(begin Vector3, dir Vector3) Dictionary

Tests for intersection with a ray starting at [param begin] and facing [param dir] and extending toward infinity. If an intersection with a triangle happens, returns a [Dictionary] with the following fields: position: The position on the intersected triangle. normal: The normal of the intersected triangle. face_index: The index of the intersected triangle. Returns an empty [Dictionary] if no intersection happens. See also [method intersect_segment], which is similar but uses a finite-length segment.

struct TubeTrailMesh #

struct TubeTrailMesh {
	PrimitiveMesh
}

Represents a straight tube-shaped [PrimitiveMesh] with variable width.

fn (TubeTrailMesh) to_variant #

fn (s &TubeTrailMesh) to_variant() Variant

fn (TubeTrailMesh) from_variant #

fn (mut s TubeTrailMesh) from_variant(variant &Variant)

fn (TubeTrailMesh) set_radius #

fn (s &TubeTrailMesh) set_radius(radius f64)

fn (TubeTrailMesh) get_radius #

fn (s &TubeTrailMesh) get_radius() f64

fn (TubeTrailMesh) set_radial_steps #

fn (s &TubeTrailMesh) set_radial_steps(radial_steps i64)

fn (TubeTrailMesh) get_radial_steps #

fn (s &TubeTrailMesh) get_radial_steps() i64

fn (TubeTrailMesh) set_sections #

fn (s &TubeTrailMesh) set_sections(sections i64)

fn (TubeTrailMesh) get_sections #

fn (s &TubeTrailMesh) get_sections() i64

fn (TubeTrailMesh) set_section_length #

fn (s &TubeTrailMesh) set_section_length(section_length f64)

fn (TubeTrailMesh) get_section_length #

fn (s &TubeTrailMesh) get_section_length() f64

fn (TubeTrailMesh) set_section_rings #

fn (s &TubeTrailMesh) set_section_rings(section_rings i64)

fn (TubeTrailMesh) get_section_rings #

fn (s &TubeTrailMesh) get_section_rings() i64

fn (TubeTrailMesh) set_cap_top #

fn (s &TubeTrailMesh) set_cap_top(cap_top bool)

fn (TubeTrailMesh) is_cap_top #

fn (s &TubeTrailMesh) is_cap_top() bool

fn (TubeTrailMesh) set_cap_bottom #

fn (s &TubeTrailMesh) set_cap_bottom(cap_bottom bool)

fn (TubeTrailMesh) is_cap_bottom #

fn (s &TubeTrailMesh) is_cap_bottom() bool

fn (TubeTrailMesh) set_curve #

fn (s &TubeTrailMesh) set_curve(curve Curve)

fn (TubeTrailMesh) get_curve #

fn (s &TubeTrailMesh) get_curve() Curve

struct Tween #

struct Tween {
	RefCounted
}

Lightweight object used for general-purpose animation via script, using [Tweener]s.

fn (Tween) to_variant #

fn (s &Tween) to_variant() Variant

fn (Tween) from_variant #

fn (mut s Tween) from_variant(variant &Variant)

fn (Tween) tween_property #

fn (s &Tween) tween_property(object Object, property NodePath, final_val_ ToVariant, duration f64) PropertyTweener

Creates and appends a [PropertyTweener]. This method tweens a [param property] of an [param object] between an initial value and [param final_val] in a span of time equal to [param duration], in seconds. The initial value by default is the property's value at the time the tweening of the [PropertyTweener] starts. [codeblocks] [gdscript] var tween = create_tween() tween.tween_property($Sprite, "position", Vector2(100, 200), 1.0) tween.tween_property($Sprite, "position", Vector2(200, 300), 1.0) [/gdscript] [csharp] Tween tween = CreateTween(); tween.TweenProperty(GetNode("Sprite"), "position", new Vector2(100.0f, 200.0f), 1.0f); tween.TweenProperty(GetNode("Sprite"), "position", new Vector2(200.0f, 300.0f), 1.0f); [/csharp] [/codeblocks] will move the sprite to position (100, 200) and then to (200, 300). If you use [method PropertyTweener.from] or [method PropertyTweener.from_current], the starting position will be overwritten by the given value instead. See other methods in [PropertyTweener] to see how the tweening can be tweaked further. [b]Note:[/b] You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using "property:component" (eg. position:x), where it would only apply to that particular component. [b]Example:[/b] Moving an object twice from the same position, with different transition types: [codeblocks] [gdscript] var tween = create_tween() tween.tween_property($Sprite, "position", Vector2.RIGHT * 300, 1.0).as_relative().set_trans(Tween.TRANS_SINE) tween.tween_property($Sprite, "position", Vector2.RIGHT * 300, 1.0).as_relative().from_current().set_trans(Tween.TRANS_EXPO) [/gdscript] [csharp] Tween tween = CreateTween(); tween.TweenProperty(GetNode("Sprite"), "position", Vector2.Right * 300.0f, 1.0f).AsRelative().SetTrans(Tween.TransitionType.Sine); tween.TweenProperty(GetNode("Sprite"), "position", Vector2.Right * 300.0f, 1.0f).AsRelative().FromCurrent().SetTrans(Tween.TransitionType.Expo); [/csharp] [/codeblocks]

fn (Tween) tween_interval #

fn (s &Tween) tween_interval(time f64) IntervalTweener

Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative to using the delay in other [Tweener]s, or when there's no animation (in which case the [Tween] acts as a timer). [param time] is the length of the interval, in seconds. [b]Example:[/b] Creating an interval in code execution: [codeblocks] [gdscript]# ... some codeawait create_tween().tween_interval(2).finished# ... more code[/gdscript] [csharp] // ... some code await ToSignal(CreateTween().TweenInterval(2.0f), Tween.SignalName.Finished); // ... more code [/csharp] [/codeblocks] [b]Example:[/b] Creating an object that moves back and forth and jumps every few seconds: [codeblocks] [gdscript] var tween = create_tween().set_loops() tween.tween_property($Sprite, "position:x", 200.0, 1.0).as_relative() tween.tween_callback(jump) tween.tween_interval(2) tween.tween_property($Sprite, "position:x", -200.0, 1.0).as_relative() tween.tween_callback(jump) tween.tween_interval(2) [/gdscript] [csharp] Tween tween = CreateTween().SetLoops(); tween.TweenProperty(GetNode("Sprite"), "position:x", 200.0f, 1.0f).AsRelative(); tween.TweenCallback(Callable.From(Jump)); tween.TweenInterval(2.0f); tween.TweenProperty(GetNode("Sprite"), "position:x", -200.0f, 1.0f).AsRelative(); tween.TweenCallback(Callable.From(Jump)); tween.TweenInterval(2.0f); [/csharp] [/codeblocks]

fn (Tween) tween_callback #

fn (s &Tween) tween_callback(callback Callable) CallbackTweener

Creates and appends a [CallbackTweener]. This method can be used to call an arbitrary method in any object. Use [method Callable.bind] to bind additional arguments for the call. [b]Example:[/b] Object that keeps shooting every 1 second: [codeblocks] [gdscript] var tween = get_tree().create_tween().set_loops() tween.tween_callback(shoot).set_delay(1.0) [/gdscript] [csharp] Tween tween = GetTree().CreateTween().SetLoops(); tween.TweenCallback(Callable.From(Shoot)).SetDelay(1.0f); [/csharp] [/codeblocks] [b]Example:[/b] Turning a sprite red and then blue, with 2 second delay: [codeblocks] [gdscript] var tween = get_tree().create_tween() tween.tween_callback($Sprite.set_modulate.bind(Color.RED)).set_delay(2) tween.tween_callback($Sprite.set_modulate.bind(Color.BLUE)).set_delay(2) [/gdscript] [csharp] Tween tween = GetTree().CreateTween(); Sprite2D sprite = GetNode("Sprite"); tween.TweenCallback(Callable.From(() => sprite.Modulate = Colors.Red)).SetDelay(2.0f); tween.TweenCallback(Callable.From(() => sprite.Modulate = Colors.Blue)).SetDelay(2.0f); [/csharp] [/codeblocks]

fn (Tween) tween_method #

fn (s &Tween) tween_method(method Callable, from_ ToVariant, to_ ToVariant, duration f64) MethodTweener

Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [param from] and [param to] over the time specified by [param duration], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening. [b]Example:[/b] Making a 3D object look from one point to another point: [codeblocks] [gdscript] var tween = create_tween() tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1.0) # The look_at() method takes up vector as second argument. [/gdscript] [csharp] Tween tween = CreateTween(); tween.TweenMethod(Callable.From((Vector3 target) => LookAt(target, Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // Use lambdas to bind additional arguments for the call. [/csharp] [/codeblocks] [b]Example:[/b] Setting the text of a [Label], using an intermediate method and after a delay: [codeblocks] [gdscript] func _ready(): var tween = create_tween() tween.tween_method(set_label_text, 0, 10, 1.0).set_delay(1.0)

func set_label_text(value: int): $Label.text = "Counting " + str(value) [/gdscript] [csharp] public override void _Ready() { base._Ready();

Tween tween = CreateTween(); tween.TweenMethod(Callable.From(SetLabelText), 0.0f, 10.0f, 1.0f).SetDelay(1.0f); }

private void SetLabelText(int value) { GetNode

fn (Tween) tween_subtween #

fn (s &Tween) tween_subtween(subtween Tween) SubtweenTweener

Creates and appends a [SubtweenTweener]. This method can be used to nest [param subtween] within this [Tween], allowing for the creation of more complex and composable sequences.

##var subtween = create_tween()
subtween.tween_property(self, 'rotation_degrees', 45.0, 1.0)
subtween.tween_property(self, 'rotation_degrees', 0.0, 1.0)

##var tween = create_tween()
tween.tween_property(self, 'position:x', 500, 3.0)
tween.tween_subtween(subtween)
tween.tween_property(self, 'position:x', 300, 2.0)

[b]Note:[/b] The methods [method pause], [method stop], and [method set_loops] can cause the parent [Tween] to get stuck on the subtween step; see the documentation for those methods for more information. [b]Note:[/b] The pause and process modes set by [method set_pause_mode] and [method set_process_mode] on [param subtween] will be overridden by the parent [Tween]'s settings.

fn (Tween) custom_step #

fn (s &Tween) custom_step(delta f64) bool

Processes the [Tween] by the given [param delta] value, in seconds. This is mostly useful for manual control when the [Tween] is paused. It can also be used to end the [Tween] animation immediately, by setting [param delta] longer than the whole duration of the [Tween] animation. Returns true if the [Tween] still has [Tweener]s that haven't finished.

fn (Tween) stop #

fn (s &Tween) stop()

Stops the tweening and resets the [Tween] to its initial state. This will not remove any appended [Tweener]s. [b]Note:[/b] This does [i]not[/i] reset targets of [PropertyTweener]s to their values when the [Tween] first started.

var tween = create_tween()

##position.x = 0.0
tween.tween_property(self, 'position:x', 500, 1.0)

##await get_tree().create_timer(0.5).timeout

####tween.stop()
tween.play()

[b]Note:[/b] If a Tween is stopped and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using [method SceneTree.get_processed_tweens].

fn (Tween) pause #

fn (s &Tween) pause()

Pauses the tweening. The animation can be resumed by using [method play]. [b]Note:[/b] If a Tween is paused and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using [method SceneTree.get_processed_tweens].

fn (Tween) play #

fn (s &Tween) play()

Resumes a paused or stopped [Tween].

fn (Tween) kill #

fn (s &Tween) kill()

Aborts all tweening operations and invalidates the [Tween].

fn (Tween) get_total_elapsed_time #

fn (s &Tween) get_total_elapsed_time() f64

Returns the total time in seconds the [Tween] has been animating (i.e. the time since it started, not counting pauses etc.). The time is affected by [method set_speed_scale], and [method stop] will reset it to 0. [b]Note:[/b] As it results from accumulating frame deltas, the time returned after the [Tween] has finished animating will be slightly greater than the actual [Tween] duration.

fn (Tween) is_running #

fn (s &Tween) is_running() bool

Returns whether the [Tween] is currently running, i.e. it wasn't paused and it's not finished.

fn (Tween) is_valid #

fn (s &Tween) is_valid() bool

Returns whether the [Tween] is valid. A valid [Tween] is a [Tween] contained by the scene tree (i.e. the array from [method SceneTree.get_processed_tweens] will contain this [Tween]). A [Tween] might become invalid when it has finished tweening, is killed, or when created with Tween.new(). Invalid [Tween]s can't have [Tweener]s appended.

fn (Tween) bind_node #

fn (s &Tween) bind_node(node Node) Tween

Binds this [Tween] with the given [param node]. [Tween]s are processed directly by the [SceneTree], so they run independently of the animated nodes. When you bind a [Node] with the [Tween], the [Tween] will halt the animation when the object is not inside tree and the [Tween] will be automatically killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node. For a shorter way to create and bind a [Tween], you can use [method Node.create_tween].

fn (Tween) set_process_mode #

fn (s &Tween) set_process_mode(mode TweenProcessMode) Tween

Determines whether the [Tween] should run after process frames (see [method Node._process]) or physics frames (see [method Node._physics_process]). Default value is [constant TWEEN_PROCESS_IDLE].

fn (Tween) set_pause_mode #

fn (s &Tween) set_pause_mode(mode TweenPauseMode) Tween

Determines the behavior of the [Tween] when the [SceneTree] is paused. Default value is [constant TWEEN_PAUSE_BOUND].

fn (Tween) set_ignore_time_scale #

fn (s &Tween) set_ignore_time_scale(cfg Tween_set_ignore_time_scale_Cfg) Tween

If [param ignore] is true, the tween will ignore [member Engine.time_scale] and update with the real, elapsed time. This affects all [Tweener]s and their delays. Default value is false.

fn (Tween) set_parallel #

fn (s &Tween) set_parallel(cfg Tween_set_parallel_Cfg) Tween

If [param parallel] is true, the [Tweener]s appended after this method will by default run simultaneously, as opposed to sequentially. [b]Note:[/b] Just like with [method parallel], the tweener added right before this method will also be part of the parallel step.

tween.tween_property(self, 'position', Vector2(300, 0), 0.5)
tween.set_parallel()
tween.tween_property(self, 'modulate', Color.GREEN, 0.5) ##

fn (Tween) set_loops #

fn (s &Tween) set_loops(cfg Tween_set_loops_Cfg) Tween

Sets the number of times the tweening sequence will be repeated, i.e. set_loops(2) will run the animation twice. Calling this method without arguments will make the [Tween] run infinitely, until either it is killed with [method kill], the [Tween]'s bound node is freed, or all the animated objects have been freed (which makes further animation impossible). [b]Warning:[/b] Make sure to always add some duration/delay when using infinite loops. To prevent the game freezing, 0-duration looped animations (e.g. a single [CallbackTweener] with no delay) are stopped after a small number of loops, which may produce unexpected results. If a [Tween]'s lifetime depends on some node, always use [method bind_node].

fn (Tween) get_loops_left #

fn (s &Tween) get_loops_left() i64

Returns the number of remaining loops for this [Tween] (see [method set_loops]). A return value of -1 indicates an infinitely looping [Tween], and a return value of 0 indicates that the [Tween] has already finished.

fn (Tween) set_speed_scale #

fn (s &Tween) set_speed_scale(speed f64) Tween

Scales the speed of tweening. This affects all [Tweener]s and their delays.

fn (Tween) set_trans #

fn (s &Tween) set_trans(trans TweenTransitionType) Tween

Sets the default transition type for [PropertyTweener]s and [MethodTweener]s appended after this method. Before this method is called, the default transition type is [constant TRANS_LINEAR].

var tween = create_tween()
tween.tween_property(self, 'position', Vector2(300, 0), 0.5) ##tween.set_trans(Tween.TRANS_SINE)
tween.tween_property(self, 'rotation_degrees', 45.0, 0.5) ##

fn (Tween) set_ease #

fn (s &Tween) set_ease(ease TweenEaseType) Tween

Sets the default ease type for [PropertyTweener]s and [MethodTweener]s appended after this method. Before this method is called, the default ease type is [constant EASE_IN_OUT].

var tween = create_tween()
tween.tween_property(self, 'position', Vector2(300, 0), 0.5) ##tween.set_ease(Tween.EASE_IN)
tween.tween_property(self, 'rotation_degrees', 45.0, 0.5) ##

fn (Tween) parallel #

fn (s &Tween) parallel() Tween

Makes the next [Tweener] run parallelly to the previous one. [codeblocks] [gdscript] var tween = create_tween() tween.tween_property(...) tween.parallel().tween_property(...) tween.parallel().tween_property(...) [/gdscript] [csharp] Tween tween = CreateTween(); tween.TweenProperty(...); tween.Parallel().TweenProperty(...); tween.Parallel().TweenProperty(...); [/csharp] [/codeblocks] All [Tweener]s in the example will run at the same time. You can make the [Tween] parallel by default by using [method set_parallel].

fn (Tween) chain #

fn (s &Tween) chain() Tween

Used to chain two [Tweener]s after [method set_parallel] is called with true. [codeblocks] [gdscript] var tween = create_tween().set_parallel(true) tween.tween_property(...) tween.tween_property(...) # Will run parallelly with above. tween.chain().tween_property(...) # Will run after two above are finished. [/gdscript] [csharp] Tween tween = CreateTween().SetParallel(true); tween.TweenProperty(...); tween.TweenProperty(...); // Will run parallelly with above. tween.Chain().TweenProperty(...); // Will run after two above are finished. [/csharp] [/codeblocks]

struct Tween_set_ignore_time_scale_Cfg #

@[params]
struct Tween_set_ignore_time_scale_Cfg {
pub:
	ignore bool
}

Optional parameters for Tween#set_ignore_time_scale

struct Tween_set_loops_Cfg #

@[params]
struct Tween_set_loops_Cfg {
pub:
	loops i64
}

Optional parameters for Tween#set_loops

struct Tween_set_parallel_Cfg #

@[params]
struct Tween_set_parallel_Cfg {
pub:
	parallel bool
}

Optional parameters for Tween#set_parallel

struct Tweener #

struct Tweener {
	RefCounted
}

Abstract class for all Tweeners used by [Tween].

fn (Tweener) to_variant #

fn (s &Tweener) to_variant() Variant

fn (Tweener) from_variant #

fn (mut s Tweener) from_variant(variant &Variant)

struct UDPServer #

struct UDPServer {
	RefCounted
}

Helper class to implement a UDP server.

fn (UDPServer) to_variant #

fn (s &UDPServer) to_variant() Variant

fn (UDPServer) from_variant #

fn (mut s UDPServer) from_variant(variant &Variant)

fn (UDPServer) listen #

fn (s &UDPServer) listen(port i64, cfg UDPServer_listen_Cfg) GDError

Starts the server by opening a UDP socket listening on the given [param port]. You can optionally specify a [param bind_address] to only listen for packets sent to that address. See also [method PacketPeerUDP.bind].

fn (UDPServer) poll #

fn (s &UDPServer) poll() GDError

Call this method at regular intervals (e.g. inside [method Node._process]) to process new packets. Any packet from a known address/port pair will be delivered to the appropriate [PacketPeerUDP], while any packet received from an unknown address/port pair will be added as a pending connection (see [method is_connection_available] and [method take_connection]). The maximum number of pending connections is defined via [member max_pending_connections].

fn (UDPServer) is_connection_available #

fn (s &UDPServer) is_connection_available() bool

Returns true if a packet with a new address/port combination was received on the socket.

fn (UDPServer) get_local_port #

fn (s &UDPServer) get_local_port() i64

Returns the local port this server is listening to.

fn (UDPServer) is_listening #

fn (s &UDPServer) is_listening() bool

Returns true if the socket is open and listening on a port.

fn (UDPServer) take_connection #

fn (s &UDPServer) take_connection() PacketPeerUDP

Returns the first pending connection (connected to the appropriate address/port). Will return null if no new connection is available. See also [method is_connection_available], [method PacketPeerUDP.connect_to_host].

fn (UDPServer) stop #

fn (s &UDPServer) stop()

Stops the server, closing the UDP socket if open. Will close all connected [PacketPeerUDP] accepted via [method take_connection] (remote peers will not be notified).

fn (UDPServer) set_max_pending_connections #

fn (s &UDPServer) set_max_pending_connections(max_pending_connections i64)

fn (UDPServer) get_max_pending_connections #

fn (s &UDPServer) get_max_pending_connections() i64

struct UDPServer_listen_Cfg #

@[params]
struct UDPServer_listen_Cfg {
pub:
	bind_address string
}

Optional parameters for UDPServer#listen

struct UPNP #

struct UPNP {
	RefCounted
}

Universal Plug and Play (UPnP) functions for network device discovery, querying and port forwarding.

fn (UPNP) to_variant #

fn (s &UPNP) to_variant() Variant

fn (UPNP) from_variant #

fn (mut s UPNP) from_variant(variant &Variant)

fn (UPNP) get_device_count #

fn (s &UPNP) get_device_count() i64

Returns the number of discovered [UPNPDevice]s.

fn (UPNP) get_device #

fn (s &UPNP) get_device(index i64) UPNPDevice

Returns the [UPNPDevice] at the given [param index].

fn (UPNP) add_device #

fn (s &UPNP) add_device(device UPNPDevice)

Adds the given [UPNPDevice] to the list of discovered devices.

fn (UPNP) set_device #

fn (s &UPNP) set_device(index i64, device UPNPDevice)

Sets the device at [param index] from the list of discovered devices to [param device].

fn (UPNP) remove_device #

fn (s &UPNP) remove_device(index i64)

Removes the device at [param index] from the list of discovered devices.

fn (UPNP) clear_devices #

fn (s &UPNP) clear_devices()

Clears the list of discovered devices.

fn (UPNP) get_gateway #

fn (s &UPNP) get_gateway() UPNPDevice

Returns the default gateway. That is the first discovered [UPNPDevice] that is also a valid IGD (InternetGatewayDevice).

fn (UPNP) discover #

fn (s &UPNP) discover(cfg UPNP_discover_Cfg) i64

Discovers local [UPNPDevice]s. Clears the list of previously discovered devices. Filters for IGD (InternetGatewayDevice) type devices by default, as those manage port forwarding. [param timeout] is the time to wait for responses in milliseconds. [param ttl] is the time-to-live; only touch this if you know what you're doing. See [enum UPNPResult] for possible return values.

fn (UPNP) query_external_address #

fn (s &UPNP) query_external_address() string

Returns the external [IP] address of the default gateway (see [method get_gateway]) as string. Returns an empty string on error.

fn (UPNP) add_port_mapping #

fn (s &UPNP) add_port_mapping(port i64, cfg UPNP_add_port_mapping_Cfg) i64

Adds a mapping to forward the external [param port] (between 1 and 65535, although recommended to use port 1024 or above) on the default gateway (see [method get_gateway]) to the [param port_internal] on the local machine for the given protocol [param proto] (either "TCP" or "UDP", with UDP being the default). If a port mapping for the given port and protocol combination already exists on that gateway device, this method tries to overwrite it. If that is not desired, you can retrieve the gateway manually with [method get_gateway] and call [method add_port_mapping] on it, if any. Note that forwarding a well-known port (below 1024) with UPnP may fail depending on the device. Depending on the gateway device, if a mapping for that port already exists, it will either be updated or it will refuse this command due to that conflict, especially if the existing mapping for that port wasn't created via UPnP or points to a different network address (or device) than this one. If [param port_internal] is 0 (the default), the same port number is used for both the external and the internal port (the [param port] value). The description ([param desc]) is shown in some routers management UIs and can be used to point out which application added the mapping. The mapping's lease [param duration] can be limited by specifying a duration in seconds. The default of 0 means no duration, i.e. a permanent lease and notably some devices only support these permanent leases. Note that whether permanent or not, this is only a request and the gateway may still decide at any point to remove the mapping (which usually happens on a reboot of the gateway, when its external IP address changes, or on some models when it detects a port mapping has become inactive, i.e. had no traffic for multiple minutes). If not 0 (permanent), the allowed range according to spec is between 120 (2 minutes) and 86400 seconds (24 hours). See [enum UPNPResult] for possible return values.

fn (UPNP) delete_port_mapping #

fn (s &UPNP) delete_port_mapping(port i64, cfg UPNP_delete_port_mapping_Cfg) i64

Deletes the port mapping for the given port and protocol combination on the default gateway (see [method get_gateway]) if one exists. [param port] must be a valid port between 1 and 65535, [param proto] can be either "TCP" or "UDP". May be refused for mappings pointing to addresses other than this one, for well-known ports (below 1024), or for mappings not added via UPnP. See [enum UPNPResult] for possible return values.

fn (UPNP) set_discover_multicast_if #

fn (s &UPNP) set_discover_multicast_if(m_if string)

fn (UPNP) get_discover_multicast_if #

fn (s &UPNP) get_discover_multicast_if() string

fn (UPNP) set_discover_local_port #

fn (s &UPNP) set_discover_local_port(port i64)

fn (UPNP) get_discover_local_port #

fn (s &UPNP) get_discover_local_port() i64

fn (UPNP) set_discover_ipv6 #

fn (s &UPNP) set_discover_ipv6(ipv6 bool)

fn (UPNP) is_discover_ipv6 #

fn (s &UPNP) is_discover_ipv6() bool

struct UPNPDevice #

struct UPNPDevice {
	RefCounted
}

Universal Plug and Play (UPnP) device.

fn (UPNPDevice) to_variant #

fn (s &UPNPDevice) to_variant() Variant

fn (UPNPDevice) from_variant #

fn (mut s UPNPDevice) from_variant(variant &Variant)

fn (UPNPDevice) is_valid_gateway #

fn (s &UPNPDevice) is_valid_gateway() bool

Returns true if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding.

fn (UPNPDevice) query_external_address #

fn (s &UPNPDevice) query_external_address() string

Returns the external IP address of this [UPNPDevice] or an empty string.

fn (UPNPDevice) add_port_mapping #

fn (s &UPNPDevice) add_port_mapping(port i64, cfg UPNPDevice_add_port_mapping_Cfg) i64

Adds a port mapping to forward the given external port on this [UPNPDevice] for the given protocol to the local machine. See [method UPNP.add_port_mapping].

fn (UPNPDevice) delete_port_mapping #

fn (s &UPNPDevice) delete_port_mapping(port i64, cfg UPNPDevice_delete_port_mapping_Cfg) i64

Deletes the port mapping identified by the given port and protocol combination on this device. See [method UPNP.delete_port_mapping].

fn (UPNPDevice) set_description_url #

fn (s &UPNPDevice) set_description_url(url string)

fn (UPNPDevice) get_description_url #

fn (s &UPNPDevice) get_description_url() string

fn (UPNPDevice) set_service_type #

fn (s &UPNPDevice) set_service_type(gd_type string)

fn (UPNPDevice) get_service_type #

fn (s &UPNPDevice) get_service_type() string

fn (UPNPDevice) set_igd_control_url #

fn (s &UPNPDevice) set_igd_control_url(url string)

fn (UPNPDevice) get_igd_control_url #

fn (s &UPNPDevice) get_igd_control_url() string

fn (UPNPDevice) set_igd_service_type #

fn (s &UPNPDevice) set_igd_service_type(gd_type string)

fn (UPNPDevice) get_igd_service_type #

fn (s &UPNPDevice) get_igd_service_type() string

fn (UPNPDevice) set_igd_our_addr #

fn (s &UPNPDevice) set_igd_our_addr(addr string)

fn (UPNPDevice) get_igd_our_addr #

fn (s &UPNPDevice) get_igd_our_addr() string

fn (UPNPDevice) set_igd_status #

fn (s &UPNPDevice) set_igd_status(status UPNPDeviceIGDStatus)

fn (UPNPDevice) get_igd_status #

fn (s &UPNPDevice) get_igd_status() UPNPDeviceIGDStatus

struct UPNPDevice_add_port_mapping_Cfg #

@[params]
struct UPNPDevice_add_port_mapping_Cfg {
pub:
	port_internal i64
	desc          string
	proto         string
	duration      i64
}

Optional parameters for UPNPDevice#add_port_mapping

struct UPNPDevice_delete_port_mapping_Cfg #

@[params]
struct UPNPDevice_delete_port_mapping_Cfg {
pub:
	proto string
}

Optional parameters for UPNPDevice#delete_port_mapping

struct UPNP_add_port_mapping_Cfg #

@[params]
struct UPNP_add_port_mapping_Cfg {
pub:
	port_internal i64
	desc          string
	proto         string
	duration      i64
}

Optional parameters for UPNP#add_port_mapping

struct UPNP_delete_port_mapping_Cfg #

@[params]
struct UPNP_delete_port_mapping_Cfg {
pub:
	proto string
}

Optional parameters for UPNP#delete_port_mapping

struct UPNP_discover_Cfg #

@[params]
struct UPNP_discover_Cfg {
pub:
	timeout       i64 = 2000
	ttl           i64 = 2
	device_filter string
}

Optional parameters for UPNP#discover

struct UndoRedo #

struct UndoRedo {
	Object
}

Provides a high-level interface for implementing undo and redo operations.

fn (UndoRedo) to_variant #

fn (s &UndoRedo) to_variant() Variant

fn (UndoRedo) from_variant #

fn (mut s UndoRedo) from_variant(variant &Variant)

fn (UndoRedo) create_action #

fn (s &UndoRedo) create_action(name string, cfg UndoRedo_create_action_Cfg)

Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action]. The way actions are merged is dictated by [param merge_mode]. The way undo operation are ordered in actions is dictated by [param backward_undo_ops]. When [param backward_undo_ops] is false undo option are ordered in the same order they were added. Which means the first operation to be added will be the first to be undone.

fn (UndoRedo) commit_action #

fn (s &UndoRedo) commit_action(cfg UndoRedo_commit_action_Cfg)

Commit the action. If [param execute] is true (which it is by default), all "do" methods/properties are called/set when this function is called.

fn (UndoRedo) is_committing_action #

fn (s &UndoRedo) is_committing_action() bool

Returns true if the [UndoRedo] is currently committing the action, i.e. running its "do" method or property change (see [method commit_action]).

fn (UndoRedo) add_do_method #

fn (s &UndoRedo) add_do_method(callable Callable)

Register a [Callable] that will be called when the action is committed.

fn (UndoRedo) add_undo_method #

fn (s &UndoRedo) add_undo_method(callable Callable)

Register a [Callable] that will be called when the action is undone.

fn (UndoRedo) add_do_property #

fn (s &UndoRedo) add_do_property(object Object, property string, value_ ToVariant)

Register a [param property] that would change its value to [param value] when the action is committed.

fn (UndoRedo) add_undo_property #

fn (s &UndoRedo) add_undo_property(object Object, property string, value_ ToVariant)

Register a [param property] that would change its value to [param value] when the action is undone.

fn (UndoRedo) add_do_reference #

fn (s &UndoRedo) add_do_reference(object Object)

Register a reference to an object that will be erased if the "do" history is deleted. This is useful for objects added by the "do" action and removed by the "undo" action. When the "do" history is deleted, if the object is a [RefCounted], it will be unreferenced. Otherwise, it will be freed. Do not use for resources.

var node = Node2D.new()
undo_redo.create_action('Add node')
undo_redo.add_do_method(add_child.bind(node))
undo_redo.add_do_reference(node)
undo_redo.add_undo_method(remove_child.bind(node))
undo_redo.commit_action()

fn (UndoRedo) add_undo_reference #

fn (s &UndoRedo) add_undo_reference(object Object)

Register a reference to an object that will be erased if the "undo" history is deleted. This is useful for objects added by the "undo" action and removed by the "do" action. When the "undo" history is deleted, if the object is a [RefCounted], it will be unreferenced. Otherwise, it will be freed. Do not use for resources.

var node = $Node2D
undo_redo.create_action('Remove node')
undo_redo.add_do_method(remove_child.bind(node))
undo_redo.add_undo_method(add_child.bind(node))
undo_redo.add_undo_reference(node)
undo_redo.commit_action()

fn (UndoRedo) start_force_keep_in_merge_ends #

fn (s &UndoRedo) start_force_keep_in_merge_ends()

Marks the next "do" and "undo" operations to be processed even if the action gets merged with another in the [constant MERGE_ENDS] mode. Return to normal operation using [method end_force_keep_in_merge_ends].

fn (UndoRedo) end_force_keep_in_merge_ends #

fn (s &UndoRedo) end_force_keep_in_merge_ends()

Stops marking operations as to be processed even if the action gets merged with another in the [constant MERGE_ENDS] mode. See [method start_force_keep_in_merge_ends].

fn (UndoRedo) get_history_count #

fn (s &UndoRedo) get_history_count() i64

Returns how many elements are in the history.

fn (UndoRedo) get_current_action #

fn (s &UndoRedo) get_current_action() i64

Gets the index of the current action.

fn (UndoRedo) get_action_name #

fn (s &UndoRedo) get_action_name(id i64) string

Gets the action name from its index.

fn (UndoRedo) clear_history #

fn (s &UndoRedo) clear_history(cfg UndoRedo_clear_history_Cfg)

Clear the undo/redo history and associated references. Passing false to [param increase_version] will prevent the version number from increasing when the history is cleared.

fn (UndoRedo) get_current_action_name #

fn (s &UndoRedo) get_current_action_name() string

Gets the name of the current action, equivalent to get_action_name(get_current_action()).

fn (UndoRedo) has_undo #

fn (s &UndoRedo) has_undo() bool

Returns true if an "undo" action is available.

fn (UndoRedo) has_redo #

fn (s &UndoRedo) has_redo() bool

Returns true if a "redo" action is available.

fn (UndoRedo) get_version #

fn (s &UndoRedo) get_version() i64

Gets the version. Every time a new action is committed, the [UndoRedo]'s version number is increased automatically. This is useful mostly to check if something changed from a saved version.

fn (UndoRedo) set_max_steps #

fn (s &UndoRedo) set_max_steps(max_steps i64)

fn (UndoRedo) get_max_steps #

fn (s &UndoRedo) get_max_steps() i64

fn (UndoRedo) redo #

fn (s &UndoRedo) redo() bool

Redo the last action.

fn (UndoRedo) undo #

fn (s &UndoRedo) undo() bool

Undo the last action.

struct UndoRedo_clear_history_Cfg #

@[params]
struct UndoRedo_clear_history_Cfg {
pub:
	increase_version bool
}

Optional parameters for UndoRedo#clear_history

struct UndoRedo_commit_action_Cfg #

@[params]
struct UndoRedo_commit_action_Cfg {
pub:
	execute bool
}

Optional parameters for UndoRedo#commit_action

struct UndoRedo_create_action_Cfg #

@[params]
struct UndoRedo_create_action_Cfg {
pub:
	merge_mode        UndoRedoMergeMode = unsafe { UndoRedoMergeMode(0) }
	backward_undo_ops bool
}

Optional parameters for UndoRedo#create_action

struct UniformSetCacheRD #

struct UniformSetCacheRD {
	Object
}

Uniform set cache manager for Rendering Device based renderers.

fn (UniformSetCacheRD) to_variant #

fn (s &UniformSetCacheRD) to_variant() Variant

fn (UniformSetCacheRD) from_variant #

fn (mut s UniformSetCacheRD) from_variant(variant &Variant)

struct VBoxContainer #

struct VBoxContainer {
	BoxContainer
}

A container that arranges its child controls vertically.

fn (VBoxContainer) to_variant #

fn (s &VBoxContainer) to_variant() Variant

fn (VBoxContainer) from_variant #

fn (mut s VBoxContainer) from_variant(variant &Variant)

struct VFlowContainer #

struct VFlowContainer {
	FlowContainer
}

A container that arranges its child controls vertically and wraps them around at the borders.

fn (VFlowContainer) to_variant #

fn (s &VFlowContainer) to_variant() Variant

fn (VFlowContainer) from_variant #

fn (mut s VFlowContainer) from_variant(variant &Variant)

struct VScrollBar #

struct VScrollBar {
	ScrollBar
}

A vertical scrollbar that goes from top (min) to bottom (max).

fn (VScrollBar) to_variant #

fn (s &VScrollBar) to_variant() Variant

fn (VScrollBar) from_variant #

fn (mut s VScrollBar) from_variant(variant &Variant)

struct VSeparator #

struct VSeparator {
	Separator
}

A vertical line used for separating other controls.

fn (VSeparator) to_variant #

fn (s &VSeparator) to_variant() Variant

fn (VSeparator) from_variant #

fn (mut s VSeparator) from_variant(variant &Variant)

struct VSlider #

struct VSlider {
	Slider
}

A vertical slider that goes from bottom (min) to top (max).

fn (VSlider) to_variant #

fn (s &VSlider) to_variant() Variant

fn (VSlider) from_variant #

fn (mut s VSlider) from_variant(variant &Variant)

struct VSplitContainer #

struct VSplitContainer {
	SplitContainer
}

A container that splits two child controls vertically and provides a grabber for adjusting the split ratio.

fn (VSplitContainer) to_variant #

fn (s &VSplitContainer) to_variant() Variant

fn (VSplitContainer) from_variant #

fn (mut s VSplitContainer) from_variant(variant &Variant)

struct Variant #

@[heap]
struct Variant {
	data_ [24]u8
}

fn (Variant) deinit #

fn (s &Variant) deinit()

fn (Variant) to_variant #

fn (s Variant) to_variant() Variant

fn (Variant) from_variant #

fn (s &Variant) from_variant(src &Variant)

fn (Variant) to_bool #

fn (s &Variant) to_bool() bool

fn (Variant) from_bool #

fn (s &Variant) from_bool(src bool)

fn (Variant) to_int #

fn (s &Variant) to_int() int

fn (Variant) to_f64 #

fn (s &Variant) to_f64() f64

fn (Variant) from_int #

fn (s &Variant) from_int(src int)

fn (Variant) to_string #

fn (s &Variant) to_string() string

struct Vector2 #

@[packed]
struct Vector2 {
pub mut:
	// The vector's X component. Also accessible by using the index position `[0]`.
	x f32 // offset 0
	// The vector's Y component. Also accessible by using the index position `[1]`.
	y f32 // offset 4
}

A 2D vector using floating-point coordinates.

A 2-element structure that can be used to represent 2D coordinates or any other pair of numeric values. It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option precision=double. See [Vector2i] for its integer counterpart. [b]Note:[/b] In a boolean context, a Vector2 will evaluate to false if it's equal to Vector2(0, 0). Otherwise, a Vector2 will always evaluate to true.

fn (Vector2) angle #

fn (s &Vector2) angle() f64

Returns this vector's angle with respect to the positive X axis, or (1, 0) vector, in radians. For example, Vector2.RIGHT.angle() will return zero, Vector2.DOWN.angle() will return PI / 2 (a quarter turn, or 90 degrees), and Vector2(1, -1).angle() will return -PI / 4 (a negative eighth turn, or -45 degrees). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle.png]Illustration of the returned angle.[/url] Equivalent to the result of [method @GlobalScope.atan2] when called with the vector's [member y] and [member x] as parameters: atan2(y, x).

fn (Vector2) angle_to #

fn (s &Vector2) angle_to(to Vector2) f64

Returns the signed angle to the given vector, in radians. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to.png]Illustration of the returned angle.[/url]

fn (Vector2) angle_to_point #

fn (s &Vector2) angle_to_point(to Vector2) f64

Returns the angle between the line connecting the two points and the X axis, in radians. a.angle_to_point(b) is equivalent of doing (b - a).angle(). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to_point.png]Illustration of the returned angle.[/url]

fn (Vector2) direction_to #

fn (s &Vector2) direction_to(to Vector2) Vector2

Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using (b - a).normalized().

fn (Vector2) distance_to #

fn (s &Vector2) distance_to(to Vector2) f64

Returns the distance between this vector and [param to].

fn (Vector2) distance_squared_to #

fn (s &Vector2) distance_squared_to(to Vector2) f64

Returns the squared distance between this vector and [param to]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector2) length #

fn (s &Vector2) length() f64

Returns the length (magnitude) of this vector.

fn (Vector2) length_squared #

fn (s &Vector2) length_squared() f64

Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector2) limit_length #

fn (s &Vector2) limit_length(cfg Vector2_limit_length_Cfg) Vector2

Returns the vector with a maximum length by limiting its length to [param length]. If the vector is non-finite, the result is undefined.

fn (Vector2) normalized #

fn (s &Vector2) normalized() Vector2

Returns the result of scaling the vector to unit length. Equivalent to v / v.length(). Returns (0, 0) if v.length() == 0. See also [method is_normalized]. [b]Note:[/b] This function may return incorrect values if the input vector length is near zero.

fn (Vector2) is_normalized #

fn (s &Vector2) is_normalized() bool

Returns true if the vector is normalized, i.e. its length is approximately equal to 1.

fn (Vector2) is_equal_approx #

fn (s &Vector2) is_equal_approx(to Vector2) bool

Returns true if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.

fn (Vector2) is_zero_approx #

fn (s &Vector2) is_zero_approx() bool

Returns true if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component. This method is faster than using [method is_equal_approx] with one value as a zero vector.

fn (Vector2) is_finite #

fn (s &Vector2) is_finite() bool

Returns true if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.

fn (Vector2) posmod #

fn (s &Vector2) posmod(mod f64) Vector2

Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod].

fn (Vector2) posmodv #

fn (s &Vector2) posmodv(modv Vector2) Vector2

Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components.

fn (Vector2) project #

fn (s &Vector2) project(b Vector2) Vector2

Returns a new vector resulting from projecting this vector onto the given vector [param b]. The resulting new vector is parallel to [param b]. See also [method slide]. [b]Note:[/b] If the vector [param b] is a zero vector, the components of the resulting new vector will be [constant @GDScript.NAN].

fn (Vector2) lerp #

fn (s &Vector2) lerp(to Vector2, weight f64) Vector2

Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.

fn (Vector2) slerp #

fn (s &Vector2) slerp(to Vector2, weight f64) Vector2

Returns the result of spherical linear interpolation between this vector and [param to], by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp].

fn (Vector2) cubic_interpolate #

fn (s &Vector2) cubic_interpolate(b Vector2, pre_a Vector2, post_b Vector2, weight f64) Vector2

Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.

fn (Vector2) cubic_interpolate_in_time #

fn (s &Vector2) cubic_interpolate_in_time(b Vector2, pre_a Vector2, post_b Vector2, weight f64, b_t f64, pre_a_t f64, post_b_t f64) Vector2

Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. It can perform smoother interpolation than [method cubic_interpolate] by the time values.

fn (Vector2) bezier_interpolate #

fn (s &Vector2) bezier_interpolate(control_1 Vector2, control_2 Vector2, end Vector2, t f64) Vector2

Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.

fn (Vector2) bezier_derivative #

fn (s &Vector2) bezier_derivative(control_1 Vector2, control_2 Vector2, end Vector2, t f64) Vector2

Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.

fn (Vector2) max_axis_index #

fn (s &Vector2) max_axis_index() i64

Returns the axis of the vector's highest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_X].

fn (Vector2) min_axis_index #

fn (s &Vector2) min_axis_index() i64

Returns the axis of the vector's lowest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_Y].

fn (Vector2) move_toward #

fn (s &Vector2) move_toward(to Vector2, delta f64) Vector2

Returns a new vector moved toward [param to] by the fixed [param delta] amount. Will not go past the final value.

fn (Vector2) rotated #

fn (s &Vector2) rotated(angle f64) Vector2

Returns the result of rotating this vector by [param angle] (in radians). See also [method @GlobalScope.deg_to_rad].

fn (Vector2) orthogonal #

fn (s &Vector2) orthogonal() Vector2

Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length.

fn (Vector2) floor #

fn (s &Vector2) floor() Vector2

Returns a new vector with all components rounded down (towards negative infinity).

fn (Vector2) ceil #

fn (s &Vector2) ceil() Vector2

Returns a new vector with all components rounded up (towards positive infinity).

fn (Vector2) round #

fn (s &Vector2) round() Vector2

Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.

fn (Vector2) aspect #

fn (s &Vector2) aspect() f64

Returns the aspect ratio of this vector, the ratio of [member x] to [member y].

fn (Vector2) dot #

fn (s &Vector2) dot(with Vector2) f64

Returns the dot product of this vector and [param with]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. The dot product will be 0 for a right angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. When using unit (normalized) vectors, the result will always be between -1.0 (180 degree angle) when the vectors are facing opposite directions, and 1.0 (0 degree angle) when the vectors are aligned. [b]Note:[/b] a.dot(b) is equivalent to b.dot(a).

fn (Vector2) slide #

fn (s &Vector2) slide(n Vector2) Vector2

Returns a new vector resulting from sliding this vector along a line with normal [param n]. The resulting new vector is perpendicular to [param n], and is equivalent to this vector minus its projection on [param n]. See also [method project]. [b]Note:[/b] The vector [param n] must be normalized. See also [method normalized].

fn (Vector2) bounce #

fn (s &Vector2) bounce(n Vector2) Vector2

Returns the vector "bounced off" from a line defined by the given normal [param n] perpendicular to the line. [b]Note:[/b] [method bounce] performs the operation that most engines and frameworks call [code skip-lint]reflect()`.

fn (Vector2) reflect #

fn (s &Vector2) reflect(line Vector2) Vector2

Returns the result of reflecting the vector from a line defined by the given direction vector [param line]. [b]Note:[/b] [method reflect] differs from what other engines and frameworks call [code skip-lint]reflect(). In other engines, [code skip-lint]reflect() takes a normal direction which is a direction perpendicular to the line. In Godot, you specify the direction of the line directly. See also [method bounce] which does what most engines call [code skip-lint]reflect()`.

fn (Vector2) cross #

fn (s &Vector2) cross(with Vector2) f64

Returns the 2D analog of the cross product for this vector and [param with]. This is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area. If the two vectors are parallel this returns zero, making it useful for testing if two vectors are parallel. [b]Note:[/b] Cross product is not defined in 2D mathematically. This method embeds the 2D vectors in the XY plane of 3D space and uses their cross product's Z component as the analog.

fn (Vector2) abs #

fn (s &Vector2) abs() Vector2

Returns a new vector with all components in absolute values (i.e. positive).

fn (Vector2) sign #

fn (s &Vector2) sign() Vector2

Returns a new vector with each component set to 1.0 if it's positive, -1.0 if it's negative, and 0.0 if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component.

fn (Vector2) clamp #

fn (s &Vector2) clamp(min Vector2, max Vector2) Vector2

Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector2) clampf #

fn (s &Vector2) clampf(min f64, max f64) Vector2

Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector2) snapped #

fn (s &Vector2) snapped(step Vector2) Vector2

Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals.

fn (Vector2) snappedf #

fn (s &Vector2) snappedf(step f64) Vector2

Returns a new vector with each component snapped to the nearest multiple of [param step]. This can also be used to round the components to an arbitrary number of decimals.

fn (Vector2) min #

fn (s &Vector2) min(with Vector2) Vector2

Returns the component-wise minimum of this and [param with], equivalent to Vector2(minf(x, with.x), minf(y, with.y)).

fn (Vector2) minf #

fn (s &Vector2) minf(with f64) Vector2

Returns the component-wise minimum of this and [param with], equivalent to Vector2(minf(x, with), minf(y, with)).

fn (Vector2) max #

fn (s &Vector2) max(with Vector2) Vector2

Returns the component-wise maximum of this and [param with], equivalent to Vector2(maxf(x, with.x), maxf(y, with.y)).

fn (Vector2) maxf #

fn (s &Vector2) maxf(with f64) Vector2

Returns the component-wise maximum of this and [param with], equivalent to Vector2(maxf(x, with), maxf(y, with)).

fn (Vector2) to_variant #

fn (s &Vector2) to_variant() Variant

fn (Vector2) from_variant #

fn (mut s Vector2) from_variant(variant &Variant)

fn (Vector2) index #

fn (v &Vector2) index(i i64) f64

fn (Vector2) mul_i64 #

fn (a Vector2) mul_i64(b i64) Vector2

Multiplies each component of the [Vector2] by the given [int].

fn (Vector2) div_i64 #

fn (a Vector2) div_i64(b i64) Vector2

Divides each component of the [Vector2] by the given [int].

fn (Vector2) mul_f64 #

fn (a Vector2) mul_f64(b f64) Vector2

Multiplies each component of the [Vector2] by the given [float].

fn (Vector2) div_f64 #

fn (a Vector2) div_f64(b f64) Vector2

Divides each component of the [Vector2] by the given [float].

fn (Vector2) == #

fn (a Vector2) == (b Vector2) bool

Returns true if the vectors are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector2) eq_vector2 #

fn (a Vector2) eq_vector2(b Vector2) bool

Returns true if the vectors are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector2) ne_vector2 #

fn (a Vector2) ne_vector2(b Vector2) bool

Returns true if the vectors are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector2) < #

fn (a Vector2) < (b Vector2) bool

Compares two [Vector2] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector2) lt_vector2 #

fn (a Vector2) lt_vector2(b Vector2) bool

Compares two [Vector2] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector2) le_vector2 #

fn (a Vector2) le_vector2(b Vector2) bool

Compares two [Vector2] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector2) gt_vector2 #

fn (a Vector2) gt_vector2(b Vector2) bool

Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector2) ge_vector2 #

fn (a Vector2) ge_vector2(b Vector2) bool

Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector2) + #

fn (a Vector2) + (b Vector2) Vector2

Adds each component of the [Vector2] by the components of the given [Vector2].

print(Vector2(10, 20) + Vector2(3, 4)) ##

fn (Vector2) add_vector2 #

fn (a Vector2) add_vector2(b Vector2) Vector2

Adds each component of the [Vector2] by the components of the given [Vector2].

print(Vector2(10, 20) + Vector2(3, 4)) ##

fn (Vector2) - #

fn (a Vector2) - (b Vector2) Vector2

Subtracts each component of the [Vector2] by the components of the given [Vector2].

print(Vector2(10, 20) - Vector2(3, 4)) ##

fn (Vector2) sub_vector2 #

fn (a Vector2) sub_vector2(b Vector2) Vector2

Subtracts each component of the [Vector2] by the components of the given [Vector2].

print(Vector2(10, 20) - Vector2(3, 4)) ##

fn (Vector2) * #

fn (a Vector2) * (b Vector2) Vector2

Multiplies each component of the [Vector2] by the components of the given [Vector2].

print(Vector2(10, 20) * Vector2(3, 4)) ##

fn (Vector2) mul_vector2 #

fn (a Vector2) mul_vector2(b Vector2) Vector2

Multiplies each component of the [Vector2] by the components of the given [Vector2].

print(Vector2(10, 20) * Vector2(3, 4)) ##

fn (Vector2) / #

fn (a Vector2) / (b Vector2) Vector2

Divides each component of the [Vector2] by the components of the given [Vector2].

print(Vector2(10, 20) / Vector2(2, 5)) ##

fn (Vector2) div_vector2 #

fn (a Vector2) div_vector2(b Vector2) Vector2

Divides each component of the [Vector2] by the components of the given [Vector2].

print(Vector2(10, 20) / Vector2(2, 5)) ##

fn (Vector2) mul_transform2d #

fn (a Vector2) mul_transform2d(b Transform2D) Vector2

Inversely transforms (multiplies) the [Vector2] by the given [Transform2D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). vector * transform is equivalent to transform.inverse() * vector. See [method Transform2D.inverse]. For transforming by inverse of an affine transformation (e.g. with scaling) transform.affine_inverse() * vector can be used instead. See [method Transform2D.affine_inverse].

fn (Vector2) in_dictionary #

fn (a Vector2) in_dictionary(b Dictionary) bool

fn (Vector2) in_array #

fn (a Vector2) in_array(b Array) bool

fn (Vector2) in_packedvector2array #

fn (a Vector2) in_packedvector2array(b PackedVector2Array) bool

struct Vector2_limit_length_Cfg #

@[params]
struct Vector2_limit_length_Cfg {
pub:
	length f64 = 1.0
}

struct Vector2i #

@[packed]
struct Vector2i {
pub mut:
	// The vector's X component. Also accessible by using the index position `[0]`.
	x i32 // offset 0
	// The vector's Y component. Also accessible by using the index position `[1]`.
	y i32 // offset 4
}

A 2D vector using integer coordinates.

A 2-element structure that can be used to represent 2D grid coordinates or any other pair of integers. It uses integer coordinates and is therefore preferable to [Vector2] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector2] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed. [b]Note:[/b] In a boolean context, a Vector2i will evaluate to false if it's equal to Vector2i(0, 0). Otherwise, a Vector2i will always evaluate to true.

fn (Vector2i) aspect #

fn (s &Vector2i) aspect() f64

Returns the aspect ratio of this vector, the ratio of [member x] to [member y].

fn (Vector2i) max_axis_index #

fn (s &Vector2i) max_axis_index() i64

Returns the axis of the vector's highest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_X].

fn (Vector2i) min_axis_index #

fn (s &Vector2i) min_axis_index() i64

Returns the axis of the vector's lowest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_Y].

fn (Vector2i) distance_to #

fn (s &Vector2i) distance_to(to Vector2i) f64

Returns the distance between this vector and [param to].

fn (Vector2i) distance_squared_to #

fn (s &Vector2i) distance_squared_to(to Vector2i) i64

Returns the squared distance between this vector and [param to]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector2i) length #

fn (s &Vector2i) length() f64

Returns the length (magnitude) of this vector.

fn (Vector2i) length_squared #

fn (s &Vector2i) length_squared() i64

Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector2i) sign #

fn (s &Vector2i) sign() Vector2i

Returns a new vector with each component set to 1 if it's positive, -1 if it's negative, and 0 if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component.

fn (Vector2i) abs #

fn (s &Vector2i) abs() Vector2i

Returns a new vector with all components in absolute values (i.e. positive).

fn (Vector2i) clamp #

fn (s &Vector2i) clamp(min Vector2i, max Vector2i) Vector2i

Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector2i) clampi #

fn (s &Vector2i) clampi(min i64, max i64) Vector2i

Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector2i) snapped #

fn (s &Vector2i) snapped(step Vector2i) Vector2i

Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step].

fn (Vector2i) snappedi #

fn (s &Vector2i) snappedi(step i64) Vector2i

Returns a new vector with each component snapped to the closest multiple of [param step].

fn (Vector2i) min #

fn (s &Vector2i) min(with Vector2i) Vector2i

Returns the component-wise minimum of this and [param with], equivalent to Vector2i(mini(x, with.x), mini(y, with.y)).

fn (Vector2i) mini #

fn (s &Vector2i) mini(with i64) Vector2i

Returns the component-wise minimum of this and [param with], equivalent to Vector2i(mini(x, with), mini(y, with)).

fn (Vector2i) max #

fn (s &Vector2i) max(with Vector2i) Vector2i

Returns the component-wise maximum of this and [param with], equivalent to Vector2i(maxi(x, with.x), maxi(y, with.y)).

fn (Vector2i) maxi #

fn (s &Vector2i) maxi(with i64) Vector2i

Returns the component-wise maximum of this and [param with], equivalent to Vector2i(maxi(x, with), maxi(y, with)).

fn (Vector2i) to_variant #

fn (s &Vector2i) to_variant() Variant

fn (Vector2i) from_variant #

fn (mut s Vector2i) from_variant(variant &Variant)

fn (Vector2i) index #

fn (v &Vector2i) index(i i64) i64

fn (Vector2i) mul_i64 #

fn (a Vector2i) mul_i64(b i64) Vector2i

Multiplies each component of the [Vector2i] by the given [int].

fn (Vector2i) div_i64 #

fn (a Vector2i) div_i64(b i64) Vector2i

Divides each component of the [Vector2i] by the given [int].

fn (Vector2i) mod_i64 #

fn (a Vector2i) mod_i64(b i64) Vector2i

Gets the remainder of each component of the [Vector2i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.

print(Vector2i(10, -20) % 7) ##

fn (Vector2i) mul_f64 #

fn (a Vector2i) mul_f64(b f64) Vector2

Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].

print(Vector2i(10, 15) * 0.9) ##

fn (Vector2i) div_f64 #

fn (a Vector2i) div_f64(b f64) Vector2

Divides each component of the [Vector2i] by the given [float]. Returns a [Vector2].

print(Vector2i(10, 20) / 2.9) ##

fn (Vector2i) == #

fn (a Vector2i) == (b Vector2i) bool

Returns true if the vectors are equal.

fn (Vector2i) eq_vector2i #

fn (a Vector2i) eq_vector2i(b Vector2i) bool

Returns true if the vectors are equal.

fn (Vector2i) ne_vector2i #

fn (a Vector2i) ne_vector2i(b Vector2i) bool

Returns true if the vectors are not equal.

fn (Vector2i) < #

fn (a Vector2i) < (b Vector2i) bool

Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.

fn (Vector2i) lt_vector2i #

fn (a Vector2i) lt_vector2i(b Vector2i) bool

Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.

fn (Vector2i) le_vector2i #

fn (a Vector2i) le_vector2i(b Vector2i) bool

Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.

fn (Vector2i) gt_vector2i #

fn (a Vector2i) gt_vector2i(b Vector2i) bool

Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.

fn (Vector2i) ge_vector2i #

fn (a Vector2i) ge_vector2i(b Vector2i) bool

Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.

fn (Vector2i) + #

fn (a Vector2i) + (b Vector2i) Vector2i

Adds each component of the [Vector2i] by the components of the given [Vector2i].

print(Vector2i(10, 20) + Vector2i(3, 4)) ##

fn (Vector2i) add_vector2i #

fn (a Vector2i) add_vector2i(b Vector2i) Vector2i

Adds each component of the [Vector2i] by the components of the given [Vector2i].

print(Vector2i(10, 20) + Vector2i(3, 4)) ##

fn (Vector2i) - #

fn (a Vector2i) - (b Vector2i) Vector2i

Subtracts each component of the [Vector2i] by the components of the given [Vector2i].

print(Vector2i(10, 20) - Vector2i(3, 4)) ##

fn (Vector2i) sub_vector2i #

fn (a Vector2i) sub_vector2i(b Vector2i) Vector2i

Subtracts each component of the [Vector2i] by the components of the given [Vector2i].

print(Vector2i(10, 20) - Vector2i(3, 4)) ##

fn (Vector2i) * #

fn (a Vector2i) * (b Vector2i) Vector2i

Multiplies each component of the [Vector2i] by the components of the given [Vector2i].

print(Vector2i(10, 20) * Vector2i(3, 4)) ##

fn (Vector2i) mul_vector2i #

fn (a Vector2i) mul_vector2i(b Vector2i) Vector2i

Multiplies each component of the [Vector2i] by the components of the given [Vector2i].

print(Vector2i(10, 20) * Vector2i(3, 4)) ##

fn (Vector2i) / #

fn (a Vector2i) / (b Vector2i) Vector2i

Divides each component of the [Vector2i] by the components of the given [Vector2i].

print(Vector2i(10, 20) / Vector2i(2, 5)) ##

fn (Vector2i) div_vector2i #

fn (a Vector2i) div_vector2i(b Vector2i) Vector2i

Divides each component of the [Vector2i] by the components of the given [Vector2i].

print(Vector2i(10, 20) / Vector2i(2, 5)) ##

fn (Vector2i) % #

fn (a Vector2i) % (b Vector2i) Vector2i

Gets the remainder of each component of the [Vector2i] with the components of the given [Vector2i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.

print(Vector2i(10, -20) % Vector2i(7, 8)) ##

fn (Vector2i) mod_vector2i #

fn (a Vector2i) mod_vector2i(b Vector2i) Vector2i

Gets the remainder of each component of the [Vector2i] with the components of the given [Vector2i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.

print(Vector2i(10, -20) % Vector2i(7, 8)) ##

fn (Vector2i) in_dictionary #

fn (a Vector2i) in_dictionary(b Dictionary) bool

fn (Vector2i) in_array #

fn (a Vector2i) in_array(b Array) bool

struct Vector3 #

@[packed]
struct Vector3 {
pub mut:
	// The vector's X component. Also accessible by using the index position `[0]`.
	x f32 // offset 0
	// The vector's Y component. Also accessible by using the index position `[1]`.
	y f32 // offset 4
	// The vector's Z component. Also accessible by using the index position `[2]`.
	z f32 // offset 8
}

A 3D vector using floating-point coordinates.

A 3-element structure that can be used to represent 3D coordinates or any other triplet of numeric values. It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option precision=double. See [Vector3i] for its integer counterpart. [b]Note:[/b] In a boolean context, a Vector3 will evaluate to false if it's equal to Vector3(0, 0, 0). Otherwise, a Vector3 will always evaluate to true.

fn (Vector3) min_axis_index #

fn (s &Vector3) min_axis_index() i64

Returns the axis of the vector's lowest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_Z].

fn (Vector3) max_axis_index #

fn (s &Vector3) max_axis_index() i64

Returns the axis of the vector's highest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_X].

fn (Vector3) angle_to #

fn (s &Vector3) angle_to(to Vector3) f64

Returns the unsigned minimum angle to the given vector, in radians.

fn (Vector3) signed_angle_to #

fn (s &Vector3) signed_angle_to(to Vector3, axis Vector3) f64

Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [param axis].

fn (Vector3) direction_to #

fn (s &Vector3) direction_to(to Vector3) Vector3

Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using (b - a).normalized().

fn (Vector3) distance_to #

fn (s &Vector3) distance_to(to Vector3) f64

Returns the distance between this vector and [param to].

fn (Vector3) distance_squared_to #

fn (s &Vector3) distance_squared_to(to Vector3) f64

Returns the squared distance between this vector and [param to]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector3) length #

fn (s &Vector3) length() f64

Returns the length (magnitude) of this vector.

fn (Vector3) length_squared #

fn (s &Vector3) length_squared() f64

Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector3) limit_length #

fn (s &Vector3) limit_length(cfg Vector3_limit_length_Cfg) Vector3

Returns the vector with a maximum length by limiting its length to [param length]. If the vector is non-finite, the result is undefined.

fn (Vector3) normalized #

fn (s &Vector3) normalized() Vector3

Returns the result of scaling the vector to unit length. Equivalent to v / v.length(). Returns (0, 0, 0) if v.length() == 0. See also [method is_normalized]. [b]Note:[/b] This function may return incorrect values if the input vector length is near zero.

fn (Vector3) is_normalized #

fn (s &Vector3) is_normalized() bool

Returns true if the vector is normalized, i.e. its length is approximately equal to 1.

fn (Vector3) is_equal_approx #

fn (s &Vector3) is_equal_approx(to Vector3) bool

Returns true if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.

fn (Vector3) is_zero_approx #

fn (s &Vector3) is_zero_approx() bool

Returns true if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component. This method is faster than using [method is_equal_approx] with one value as a zero vector.

fn (Vector3) is_finite #

fn (s &Vector3) is_finite() bool

Returns true if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.

fn (Vector3) inverse #

fn (s &Vector3) inverse() Vector3

Returns the inverse of the vector. This is the same as Vector3(1.0 / v.x, 1.0 / v.y, 1.0 / v.z).

fn (Vector3) clamp #

fn (s &Vector3) clamp(min Vector3, max Vector3) Vector3

Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector3) clampf #

fn (s &Vector3) clampf(min f64, max f64) Vector3

Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector3) snapped #

fn (s &Vector3) snapped(step Vector3) Vector3

Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals.

fn (Vector3) snappedf #

fn (s &Vector3) snappedf(step f64) Vector3

Returns a new vector with each component snapped to the nearest multiple of [param step]. This can also be used to round the components to an arbitrary number of decimals.

fn (Vector3) rotated #

fn (s &Vector3) rotated(axis Vector3, angle f64) Vector3

Returns the result of rotating this vector around a given axis by [param angle] (in radians). The axis must be a normalized vector. See also [method @GlobalScope.deg_to_rad].

fn (Vector3) lerp #

fn (s &Vector3) lerp(to Vector3, weight f64) Vector3

Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.

fn (Vector3) slerp #

fn (s &Vector3) slerp(to Vector3, weight f64) Vector3

Returns the result of spherical linear interpolation between this vector and [param to], by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp].

fn (Vector3) cubic_interpolate #

fn (s &Vector3) cubic_interpolate(b Vector3, pre_a Vector3, post_b Vector3, weight f64) Vector3

Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.

fn (Vector3) cubic_interpolate_in_time #

fn (s &Vector3) cubic_interpolate_in_time(b Vector3, pre_a Vector3, post_b Vector3, weight f64, b_t f64, pre_a_t f64, post_b_t f64) Vector3

Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. It can perform smoother interpolation than [method cubic_interpolate] by the time values.

fn (Vector3) bezier_interpolate #

fn (s &Vector3) bezier_interpolate(control_1 Vector3, control_2 Vector3, end Vector3, t f64) Vector3

Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.

fn (Vector3) bezier_derivative #

fn (s &Vector3) bezier_derivative(control_1 Vector3, control_2 Vector3, end Vector3, t f64) Vector3

Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.

fn (Vector3) move_toward #

fn (s &Vector3) move_toward(to Vector3, delta f64) Vector3

Returns a new vector moved toward [param to] by the fixed [param delta] amount. Will not go past the final value.

fn (Vector3) dot #

fn (s &Vector3) dot(with Vector3) f64

Returns the dot product of this vector and [param with]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. The dot product will be 0 for a right angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. When using unit (normalized) vectors, the result will always be between -1.0 (180 degree angle) when the vectors are facing opposite directions, and 1.0 (0 degree angle) when the vectors are aligned. [b]Note:[/b] a.dot(b) is equivalent to b.dot(a).

fn (Vector3) cross #

fn (s &Vector3) cross(with Vector3) Vector3

Returns the cross product of this vector and [param with]. This returns a vector perpendicular to both this and [param with], which would be the normal vector of the plane defined by the two vectors. As there are two such vectors, in opposite directions, this method returns the vector defined by a right-handed coordinate system. If the two vectors are parallel this returns an empty vector, making it useful for testing if two vectors are parallel.

fn (Vector3) outer #

fn (s &Vector3) outer(with Vector3) Basis

Returns the outer product with [param with].

fn (Vector3) abs #

fn (s &Vector3) abs() Vector3

Returns a new vector with all components in absolute values (i.e. positive).

fn (Vector3) floor #

fn (s &Vector3) floor() Vector3

Returns a new vector with all components rounded down (towards negative infinity).

fn (Vector3) ceil #

fn (s &Vector3) ceil() Vector3

Returns a new vector with all components rounded up (towards positive infinity).

fn (Vector3) round #

fn (s &Vector3) round() Vector3

Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.

fn (Vector3) posmod #

fn (s &Vector3) posmod(mod f64) Vector3

Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod].

fn (Vector3) posmodv #

fn (s &Vector3) posmodv(modv Vector3) Vector3

Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components.

fn (Vector3) project #

fn (s &Vector3) project(b Vector3) Vector3

Returns a new vector resulting from projecting this vector onto the given vector [param b]. The resulting new vector is parallel to [param b]. See also [method slide]. [b]Note:[/b] If the vector [param b] is a zero vector, the components of the resulting new vector will be [constant @GDScript.NAN].

fn (Vector3) slide #

fn (s &Vector3) slide(n Vector3) Vector3

Returns a new vector resulting from sliding this vector along a plane with normal [param n]. The resulting new vector is perpendicular to [param n], and is equivalent to this vector minus its projection on [param n]. See also [method project]. [b]Note:[/b] The vector [param n] must be normalized. See also [method normalized].

fn (Vector3) bounce #

fn (s &Vector3) bounce(n Vector3) Vector3

Returns the vector "bounced off" from a plane defined by the given normal [param n]. [b]Note:[/b] [method bounce] performs the operation that most engines and frameworks call [code skip-lint]reflect()`.

fn (Vector3) reflect #

fn (s &Vector3) reflect(n Vector3) Vector3

Returns the result of reflecting the vector through a plane defined by the given normal vector [param n]. [b]Note:[/b] [method reflect] differs from what other engines and frameworks call [code skip-lint]reflect(). In other engines, [code skip-lint]reflect() returns the result of the vector reflected by the given plane. The reflection thus passes through the given normal. While in Godot the reflection passes through the plane and can be thought of as bouncing off the normal. See also [method bounce] which does what most engines call [code skip-lint]reflect()`.

fn (Vector3) sign #

fn (s &Vector3) sign() Vector3

Returns a new vector with each component set to 1.0 if it's positive, -1.0 if it's negative, and 0.0 if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component.

fn (Vector3) octahedron_encode #

fn (s &Vector3) octahedron_encode() Vector2

Returns the octahedral-encoded (oct32) form of this [Vector3] as a [Vector2]. Since a [Vector2] occupies 1/3 less memory compared to [Vector3], this form of compression can be used to pass greater amounts of [method normalized] [Vector3]s without increasing storage or memory requirements. See also [method octahedron_decode]. [b]Note:[/b] [method octahedron_encode] can only be used for [method normalized] vectors. [method octahedron_encode] does [i]not[/i] check whether this [Vector3] is normalized, and will return a value that does not decompress to the original value if the [Vector3] is not normalized. [b]Note:[/b] Octahedral compression is [i]lossy[/i], although visual differences are rarely perceptible in real world scenarios.

fn (Vector3) min #

fn (s &Vector3) min(with Vector3) Vector3

Returns the component-wise minimum of this and [param with], equivalent to Vector3(minf(x, with.x), minf(y, with.y), minf(z, with.z)).

fn (Vector3) minf #

fn (s &Vector3) minf(with f64) Vector3

Returns the component-wise minimum of this and [param with], equivalent to Vector3(minf(x, with), minf(y, with), minf(z, with)).

fn (Vector3) max #

fn (s &Vector3) max(with Vector3) Vector3

Returns the component-wise maximum of this and [param with], equivalent to Vector3(maxf(x, with.x), maxf(y, with.y), maxf(z, with.z)).

fn (Vector3) maxf #

fn (s &Vector3) maxf(with f64) Vector3

Returns the component-wise maximum of this and [param with], equivalent to Vector3(maxf(x, with), maxf(y, with), maxf(z, with)).

fn (Vector3) to_variant #

fn (s &Vector3) to_variant() Variant

fn (Vector3) from_variant #

fn (mut s Vector3) from_variant(variant &Variant)

fn (Vector3) index #

fn (v &Vector3) index(i i64) f64

fn (Vector3) mul_i64 #

fn (a Vector3) mul_i64(b i64) Vector3

Multiplies each component of the [Vector3] by the given [int].

fn (Vector3) div_i64 #

fn (a Vector3) div_i64(b i64) Vector3

Divides each component of the [Vector3] by the given [int].

fn (Vector3) mul_f64 #

fn (a Vector3) mul_f64(b f64) Vector3

Multiplies each component of the [Vector3] by the given [float].

fn (Vector3) div_f64 #

fn (a Vector3) div_f64(b f64) Vector3

Divides each component of the [Vector3] by the given [float].

fn (Vector3) == #

fn (a Vector3) == (b Vector3) bool

Returns true if the vectors are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector3) eq_vector3 #

fn (a Vector3) eq_vector3(b Vector3) bool

Returns true if the vectors are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector3) ne_vector3 #

fn (a Vector3) ne_vector3(b Vector3) bool

Returns true if the vectors are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector3) < #

fn (a Vector3) < (b Vector3) bool

Compares two [Vector3] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector3) lt_vector3 #

fn (a Vector3) lt_vector3(b Vector3) bool

Compares two [Vector3] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector3) le_vector3 #

fn (a Vector3) le_vector3(b Vector3) bool

Compares two [Vector3] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector3) gt_vector3 #

fn (a Vector3) gt_vector3(b Vector3) bool

Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector3) ge_vector3 #

fn (a Vector3) ge_vector3(b Vector3) bool

Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector3) + #

fn (a Vector3) + (b Vector3) Vector3

Adds each component of the [Vector3] by the components of the given [Vector3].

print(Vector3(10, 20, 30) + Vector3(3, 4, 5)) ##

fn (Vector3) add_vector3 #

fn (a Vector3) add_vector3(b Vector3) Vector3

Adds each component of the [Vector3] by the components of the given [Vector3].

print(Vector3(10, 20, 30) + Vector3(3, 4, 5)) ##

fn (Vector3) - #

fn (a Vector3) - (b Vector3) Vector3

Subtracts each component of the [Vector3] by the components of the given [Vector3].

print(Vector3(10, 20, 30) - Vector3(3, 4, 5)) ##

fn (Vector3) sub_vector3 #

fn (a Vector3) sub_vector3(b Vector3) Vector3

Subtracts each component of the [Vector3] by the components of the given [Vector3].

print(Vector3(10, 20, 30) - Vector3(3, 4, 5)) ##

fn (Vector3) * #

fn (a Vector3) * (b Vector3) Vector3

Multiplies each component of the [Vector3] by the components of the given [Vector3].

print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) ##

fn (Vector3) mul_vector3 #

fn (a Vector3) mul_vector3(b Vector3) Vector3

Multiplies each component of the [Vector3] by the components of the given [Vector3].

print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) ##

fn (Vector3) / #

fn (a Vector3) / (b Vector3) Vector3

Divides each component of the [Vector3] by the components of the given [Vector3].

print(Vector3(10, 20, 30) / Vector3(2, 5, 3)) ##

fn (Vector3) div_vector3 #

fn (a Vector3) div_vector3(b Vector3) Vector3

Divides each component of the [Vector3] by the components of the given [Vector3].

print(Vector3(10, 20, 30) / Vector3(2, 5, 3)) ##

fn (Vector3) mul_quaternion #

fn (a Vector3) mul_quaternion(b Quaternion) Vector3

Inversely transforms (multiplies) the [Vector3] by the given [Quaternion]. vector * quaternion is equivalent to quaternion.inverse() * vector. See [method Quaternion.inverse].

fn (Vector3) mul_basis #

fn (a Vector3) mul_basis(b Basis) Vector3

Inversely transforms (multiplies) the [Vector3] by the given [Basis] matrix, under the assumption that the basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). vector * basis is equivalent to basis.transposed() * vector. See [method Basis.transposed]. For transforming by inverse of a non-orthonormal basis (e.g. with scaling) basis.inverse() * vector can be used instead. See [method Basis.inverse].

fn (Vector3) mul_transform3d #

fn (a Vector3) mul_transform3d(b Transform3D) Vector3

Inversely transforms (multiplies) the [Vector3] by the given [Transform3D] transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). vector * transform is equivalent to transform.inverse() * vector. See [method Transform3D.inverse]. For transforming by inverse of an affine transformation (e.g. with scaling) transform.affine_inverse() * vector can be used instead. See [method Transform3D.affine_inverse].

fn (Vector3) in_dictionary #

fn (a Vector3) in_dictionary(b Dictionary) bool

fn (Vector3) in_array #

fn (a Vector3) in_array(b Array) bool

fn (Vector3) in_packedvector3array #

fn (a Vector3) in_packedvector3array(b PackedVector3Array) bool

struct Vector3_limit_length_Cfg #

@[params]
struct Vector3_limit_length_Cfg {
pub:
	length f64 = 1.0
}

struct Vector3i #

@[packed]
struct Vector3i {
pub mut:
	// The vector's X component. Also accessible by using the index position `[0]`.
	x i32 // offset 0
	// The vector's Y component. Also accessible by using the index position `[1]`.
	y i32 // offset 4
	// The vector's Z component. Also accessible by using the index position `[2]`.
	z i32 // offset 8
}

A 3D vector using integer coordinates.

A 3-element structure that can be used to represent 3D grid coordinates or any other triplet of integers. It uses integer coordinates and is therefore preferable to [Vector3] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector3] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed. [b]Note:[/b] In a boolean context, a Vector3i will evaluate to false if it's equal to Vector3i(0, 0, 0). Otherwise, a Vector3i will always evaluate to true.

fn (Vector3i) min_axis_index #

fn (s &Vector3i) min_axis_index() i64

Returns the axis of the vector's lowest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_Z].

fn (Vector3i) max_axis_index #

fn (s &Vector3i) max_axis_index() i64

Returns the axis of the vector's highest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_X].

fn (Vector3i) distance_to #

fn (s &Vector3i) distance_to(to Vector3i) f64

Returns the distance between this vector and [param to].

fn (Vector3i) distance_squared_to #

fn (s &Vector3i) distance_squared_to(to Vector3i) i64

Returns the squared distance between this vector and [param to]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector3i) length #

fn (s &Vector3i) length() f64

Returns the length (magnitude) of this vector.

fn (Vector3i) length_squared #

fn (s &Vector3i) length_squared() i64

Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector3i) sign #

fn (s &Vector3i) sign() Vector3i

Returns a new vector with each component set to 1 if it's positive, -1 if it's negative, and 0 if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component.

fn (Vector3i) abs #

fn (s &Vector3i) abs() Vector3i

Returns a new vector with all components in absolute values (i.e. positive).

fn (Vector3i) clamp #

fn (s &Vector3i) clamp(min Vector3i, max Vector3i) Vector3i

Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector3i) clampi #

fn (s &Vector3i) clampi(min i64, max i64) Vector3i

Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector3i) snapped #

fn (s &Vector3i) snapped(step Vector3i) Vector3i

Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step].

fn (Vector3i) snappedi #

fn (s &Vector3i) snappedi(step i64) Vector3i

Returns a new vector with each component snapped to the closest multiple of [param step].

fn (Vector3i) min #

fn (s &Vector3i) min(with Vector3i) Vector3i

Returns the component-wise minimum of this and [param with], equivalent to Vector3i(mini(x, with.x), mini(y, with.y), mini(z, with.z)).

fn (Vector3i) mini #

fn (s &Vector3i) mini(with i64) Vector3i

Returns the component-wise minimum of this and [param with], equivalent to Vector3i(mini(x, with), mini(y, with), mini(z, with)).

fn (Vector3i) max #

fn (s &Vector3i) max(with Vector3i) Vector3i

Returns the component-wise maximum of this and [param with], equivalent to Vector3i(maxi(x, with.x), maxi(y, with.y), maxi(z, with.z)).

fn (Vector3i) maxi #

fn (s &Vector3i) maxi(with i64) Vector3i

Returns the component-wise maximum of this and [param with], equivalent to Vector3i(maxi(x, with), maxi(y, with), maxi(z, with)).

fn (Vector3i) to_variant #

fn (s &Vector3i) to_variant() Variant

fn (Vector3i) from_variant #

fn (mut s Vector3i) from_variant(variant &Variant)

fn (Vector3i) index #

fn (v &Vector3i) index(i i64) i64

fn (Vector3i) mul_i64 #

fn (a Vector3i) mul_i64(b i64) Vector3i

Multiplies each component of the [Vector3i] by the given [int].

fn (Vector3i) div_i64 #

fn (a Vector3i) div_i64(b i64) Vector3i

Divides each component of the [Vector3i] by the given [int].

fn (Vector3i) mod_i64 #

fn (a Vector3i) mod_i64(b i64) Vector3i

Gets the remainder of each component of the [Vector3i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.

print(Vector3i(10, -20, 30) % 7) ##

fn (Vector3i) mul_f64 #

fn (a Vector3i) mul_f64(b f64) Vector3

Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3].

print(Vector3i(10, 15, 20) * 0.9) ##

fn (Vector3i) div_f64 #

fn (a Vector3i) div_f64(b f64) Vector3

Divides each component of the [Vector3i] by the given [float]. Returns a [Vector3].

print(Vector3i(10, 20, 30) / 2.9) ##

fn (Vector3i) == #

fn (a Vector3i) == (b Vector3i) bool

Returns true if the vectors are equal.

fn (Vector3i) eq_vector3i #

fn (a Vector3i) eq_vector3i(b Vector3i) bool

Returns true if the vectors are equal.

fn (Vector3i) ne_vector3i #

fn (a Vector3i) ne_vector3i(b Vector3i) bool

Returns true if the vectors are not equal.

fn (Vector3i) < #

fn (a Vector3i) < (b Vector3i) bool

Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.

fn (Vector3i) lt_vector3i #

fn (a Vector3i) lt_vector3i(b Vector3i) bool

Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.

fn (Vector3i) le_vector3i #

fn (a Vector3i) le_vector3i(b Vector3i) bool

Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.

fn (Vector3i) gt_vector3i #

fn (a Vector3i) gt_vector3i(b Vector3i) bool

Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.

fn (Vector3i) ge_vector3i #

fn (a Vector3i) ge_vector3i(b Vector3i) bool

Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.

fn (Vector3i) + #

fn (a Vector3i) + (b Vector3i) Vector3i

Adds each component of the [Vector3i] by the components of the given [Vector3i].

print(Vector3i(10, 20, 30) + Vector3i(3, 4, 5)) ##

fn (Vector3i) add_vector3i #

fn (a Vector3i) add_vector3i(b Vector3i) Vector3i

Adds each component of the [Vector3i] by the components of the given [Vector3i].

print(Vector3i(10, 20, 30) + Vector3i(3, 4, 5)) ##

fn (Vector3i) - #

fn (a Vector3i) - (b Vector3i) Vector3i

Subtracts each component of the [Vector3i] by the components of the given [Vector3i].

print(Vector3i(10, 20, 30) - Vector3i(3, 4, 5)) ##

fn (Vector3i) sub_vector3i #

fn (a Vector3i) sub_vector3i(b Vector3i) Vector3i

Subtracts each component of the [Vector3i] by the components of the given [Vector3i].

print(Vector3i(10, 20, 30) - Vector3i(3, 4, 5)) ##

fn (Vector3i) * #

fn (a Vector3i) * (b Vector3i) Vector3i

Multiplies each component of the [Vector3i] by the components of the given [Vector3i].

print(Vector3i(10, 20, 30) * Vector3i(3, 4, 5)) ##

fn (Vector3i) mul_vector3i #

fn (a Vector3i) mul_vector3i(b Vector3i) Vector3i

Multiplies each component of the [Vector3i] by the components of the given [Vector3i].

print(Vector3i(10, 20, 30) * Vector3i(3, 4, 5)) ##

fn (Vector3i) / #

fn (a Vector3i) / (b Vector3i) Vector3i

Divides each component of the [Vector3i] by the components of the given [Vector3i].

print(Vector3i(10, 20, 30) / Vector3i(2, 5, 3)) ##

fn (Vector3i) div_vector3i #

fn (a Vector3i) div_vector3i(b Vector3i) Vector3i

Divides each component of the [Vector3i] by the components of the given [Vector3i].

print(Vector3i(10, 20, 30) / Vector3i(2, 5, 3)) ##

fn (Vector3i) % #

fn (a Vector3i) % (b Vector3i) Vector3i

Gets the remainder of each component of the [Vector3i] with the components of the given [Vector3i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.

print(Vector3i(10, -20, 30) % Vector3i(7, 8, 9)) ##

fn (Vector3i) mod_vector3i #

fn (a Vector3i) mod_vector3i(b Vector3i) Vector3i

Gets the remainder of each component of the [Vector3i] with the components of the given [Vector3i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.

print(Vector3i(10, -20, 30) % Vector3i(7, 8, 9)) ##

fn (Vector3i) in_dictionary #

fn (a Vector3i) in_dictionary(b Dictionary) bool

fn (Vector3i) in_array #

fn (a Vector3i) in_array(b Array) bool

struct Vector4 #

@[packed]
struct Vector4 {
pub mut:
	// The vector's X component. Also accessible by using the index position `[0]`.
	x f32 // offset 0
	// The vector's Y component. Also accessible by using the index position `[1]`.
	y f32 // offset 4
	// The vector's Z component. Also accessible by using the index position `[2]`.
	z f32 // offset 8
	// The vector's W component. Also accessible by using the index position `[3]`.
	w f32 // offset 12
}

A 4D vector using floating-point coordinates.

A 4-element structure that can be used to represent 4D coordinates or any other quadruplet of numeric values. It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option precision=double. See [Vector4i] for its integer counterpart. [b]Note:[/b] In a boolean context, a Vector4 will evaluate to false if it's equal to Vector4(0, 0, 0, 0). Otherwise, a Vector4 will always evaluate to true.

fn (Vector4) min_axis_index #

fn (s &Vector4) min_axis_index() i64

Returns the axis of the vector's lowest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_W].

fn (Vector4) max_axis_index #

fn (s &Vector4) max_axis_index() i64

Returns the axis of the vector's highest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_X].

fn (Vector4) length #

fn (s &Vector4) length() f64

Returns the length (magnitude) of this vector.

fn (Vector4) length_squared #

fn (s &Vector4) length_squared() f64

Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector4) abs #

fn (s &Vector4) abs() Vector4

Returns a new vector with all components in absolute values (i.e. positive).

fn (Vector4) sign #

fn (s &Vector4) sign() Vector4

Returns a new vector with each component set to 1.0 if it's positive, -1.0 if it's negative, and 0.0 if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component.

fn (Vector4) floor #

fn (s &Vector4) floor() Vector4

Returns a new vector with all components rounded down (towards negative infinity).

fn (Vector4) ceil #

fn (s &Vector4) ceil() Vector4

Returns a new vector with all components rounded up (towards positive infinity).

fn (Vector4) round #

fn (s &Vector4) round() Vector4

Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.

fn (Vector4) lerp #

fn (s &Vector4) lerp(to Vector4, weight f64) Vector4

Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.

fn (Vector4) cubic_interpolate #

fn (s &Vector4) cubic_interpolate(b Vector4, pre_a Vector4, post_b Vector4, weight f64) Vector4

Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.

fn (Vector4) cubic_interpolate_in_time #

fn (s &Vector4) cubic_interpolate_in_time(b Vector4, pre_a Vector4, post_b Vector4, weight f64, b_t f64, pre_a_t f64, post_b_t f64) Vector4

Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. It can perform smoother interpolation than [method cubic_interpolate] by the time values.

fn (Vector4) posmod #

fn (s &Vector4) posmod(mod f64) Vector4

Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod].

fn (Vector4) posmodv #

fn (s &Vector4) posmodv(modv Vector4) Vector4

Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components.

fn (Vector4) snapped #

fn (s &Vector4) snapped(step Vector4) Vector4

Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals.

fn (Vector4) snappedf #

fn (s &Vector4) snappedf(step f64) Vector4

Returns a new vector with each component snapped to the nearest multiple of [param step]. This can also be used to round the components to an arbitrary number of decimals.

fn (Vector4) clamp #

fn (s &Vector4) clamp(min Vector4, max Vector4) Vector4

Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector4) clampf #

fn (s &Vector4) clampf(min f64, max f64) Vector4

Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector4) normalized #

fn (s &Vector4) normalized() Vector4

Returns the result of scaling the vector to unit length. Equivalent to v / v.length(). Returns (0, 0, 0, 0) if v.length() == 0. See also [method is_normalized]. [b]Note:[/b] This function may return incorrect values if the input vector length is near zero.

fn (Vector4) is_normalized #

fn (s &Vector4) is_normalized() bool

Returns true if the vector is normalized, i.e. its length is approximately equal to 1.

fn (Vector4) direction_to #

fn (s &Vector4) direction_to(to Vector4) Vector4

Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using (b - a).normalized().

fn (Vector4) distance_to #

fn (s &Vector4) distance_to(to Vector4) f64

Returns the distance between this vector and [param to].

fn (Vector4) distance_squared_to #

fn (s &Vector4) distance_squared_to(to Vector4) f64

Returns the squared distance between this vector and [param to]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector4) dot #

fn (s &Vector4) dot(with Vector4) f64

Returns the dot product of this vector and [param with].

fn (Vector4) inverse #

fn (s &Vector4) inverse() Vector4

Returns the inverse of the vector. This is the same as Vector4(1.0 / v.x, 1.0 / v.y, 1.0 / v.z, 1.0 / v.w).

fn (Vector4) is_equal_approx #

fn (s &Vector4) is_equal_approx(to Vector4) bool

Returns true if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.

fn (Vector4) is_zero_approx #

fn (s &Vector4) is_zero_approx() bool

Returns true if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component. This method is faster than using [method is_equal_approx] with one value as a zero vector.

fn (Vector4) is_finite #

fn (s &Vector4) is_finite() bool

Returns true if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.

fn (Vector4) min #

fn (s &Vector4) min(with Vector4) Vector4

Returns the component-wise minimum of this and [param with], equivalent to Vector4(minf(x, with.x), minf(y, with.y), minf(z, with.z), minf(w, with.w)).

fn (Vector4) minf #

fn (s &Vector4) minf(with f64) Vector4

Returns the component-wise minimum of this and [param with], equivalent to Vector4(minf(x, with), minf(y, with), minf(z, with), minf(w, with)).

fn (Vector4) max #

fn (s &Vector4) max(with Vector4) Vector4

Returns the component-wise maximum of this and [param with], equivalent to Vector4(maxf(x, with.x), maxf(y, with.y), maxf(z, with.z), maxf(w, with.w)).

fn (Vector4) maxf #

fn (s &Vector4) maxf(with f64) Vector4

Returns the component-wise maximum of this and [param with], equivalent to Vector4(maxf(x, with), maxf(y, with), maxf(z, with), maxf(w, with)).

fn (Vector4) to_variant #

fn (s &Vector4) to_variant() Variant

fn (Vector4) from_variant #

fn (mut s Vector4) from_variant(variant &Variant)

fn (Vector4) index #

fn (v &Vector4) index(i i64) f64

fn (Vector4) mul_i64 #

fn (a Vector4) mul_i64(b i64) Vector4

Multiplies each component of the [Vector4] by the given [int].

fn (Vector4) div_i64 #

fn (a Vector4) div_i64(b i64) Vector4

Divides each component of the [Vector4] by the given [int].

fn (Vector4) mul_f64 #

fn (a Vector4) mul_f64(b f64) Vector4

Multiplies each component of the [Vector4] by the given [float].

print(Vector4(10, 20, 30, 40) * 2) ##

fn (Vector4) div_f64 #

fn (a Vector4) div_f64(b f64) Vector4

Divides each component of the [Vector4] by the given [float].

print(Vector4(10, 20, 30, 40) / 2) ##

fn (Vector4) == #

fn (a Vector4) == (b Vector4) bool

Returns true if the vectors are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector4) eq_vector4 #

fn (a Vector4) eq_vector4(b Vector4) bool

Returns true if the vectors are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector4) ne_vector4 #

fn (a Vector4) ne_vector4(b Vector4) bool

Returns true if the vectors are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector4) < #

fn (a Vector4) < (b Vector4) bool

Compares two [Vector4] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector4) lt_vector4 #

fn (a Vector4) lt_vector4(b Vector4) bool

Compares two [Vector4] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector4) le_vector4 #

fn (a Vector4) le_vector4(b Vector4) bool

Compares two [Vector4] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector4) gt_vector4 #

fn (a Vector4) gt_vector4(b Vector4) bool

Compares two [Vector4] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector4) ge_vector4 #

fn (a Vector4) ge_vector4(b Vector4) bool

Compares two [Vector4] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included.

fn (Vector4) + #

fn (a Vector4) + (b Vector4) Vector4

Adds each component of the [Vector4] by the components of the given [Vector4].

print(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) ##

fn (Vector4) add_vector4 #

fn (a Vector4) add_vector4(b Vector4) Vector4

Adds each component of the [Vector4] by the components of the given [Vector4].

print(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) ##

fn (Vector4) - #

fn (a Vector4) - (b Vector4) Vector4

Subtracts each component of the [Vector4] by the components of the given [Vector4].

print(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) ##

fn (Vector4) sub_vector4 #

fn (a Vector4) sub_vector4(b Vector4) Vector4

Subtracts each component of the [Vector4] by the components of the given [Vector4].

print(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) ##

fn (Vector4) * #

fn (a Vector4) * (b Vector4) Vector4

Multiplies each component of the [Vector4] by the components of the given [Vector4].

print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) ##

fn (Vector4) mul_vector4 #

fn (a Vector4) mul_vector4(b Vector4) Vector4

Multiplies each component of the [Vector4] by the components of the given [Vector4].

print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) ##

fn (Vector4) / #

fn (a Vector4) / (b Vector4) Vector4

Divides each component of the [Vector4] by the components of the given [Vector4].

print(Vector4(10, 20, 30, 40) / Vector4(2, 5, 3, 4)) ##

fn (Vector4) div_vector4 #

fn (a Vector4) div_vector4(b Vector4) Vector4

Divides each component of the [Vector4] by the components of the given [Vector4].

print(Vector4(10, 20, 30, 40) / Vector4(2, 5, 3, 4)) ##

fn (Vector4) mul_projection #

fn (a Vector4) mul_projection(b Projection) Vector4

Transforms (multiplies) the [Vector4] by the transpose of the given [Projection] matrix. For transforming by inverse of a projection projection.inverse() * vector can be used instead. See [method Projection.inverse].

fn (Vector4) in_dictionary #

fn (a Vector4) in_dictionary(b Dictionary) bool

fn (Vector4) in_array #

fn (a Vector4) in_array(b Array) bool

fn (Vector4) in_packedvector4array #

fn (a Vector4) in_packedvector4array(b PackedVector4Array) bool

struct Vector4i #

@[packed]
struct Vector4i {
pub mut:
	// The vector's X component. Also accessible by using the index position `[0]`.
	x i32 // offset 0
	// The vector's Y component. Also accessible by using the index position `[1]`.
	y i32 // offset 4
	// The vector's Z component. Also accessible by using the index position `[2]`.
	z i32 // offset 8
	// The vector's W component. Also accessible by using the index position `[3]`.
	w i32 // offset 12
}

A 4D vector using integer coordinates.

A 4-element structure that can be used to represent 4D grid coordinates or any other quadruplet of integers. It uses integer coordinates and is therefore preferable to [Vector4] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector4] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed. [b]Note:[/b] In a boolean context, a Vector4i will evaluate to false if it's equal to Vector4i(0, 0, 0, 0). Otherwise, a Vector4i will always evaluate to true.

fn (Vector4i) min_axis_index #

fn (s &Vector4i) min_axis_index() i64

Returns the axis of the vector's lowest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_W].

fn (Vector4i) max_axis_index #

fn (s &Vector4i) max_axis_index() i64

Returns the axis of the vector's highest value. See AXIS_* constants. If all components are equal, this method returns [constant AXIS_X].

fn (Vector4i) length #

fn (s &Vector4i) length() f64

Returns the length (magnitude) of this vector.

fn (Vector4i) length_squared #

fn (s &Vector4i) length_squared() i64

Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector4i) sign #

fn (s &Vector4i) sign() Vector4i

Returns a new vector with each component set to 1 if it's positive, -1 if it's negative, and 0 if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component.

fn (Vector4i) abs #

fn (s &Vector4i) abs() Vector4i

Returns a new vector with all components in absolute values (i.e. positive).

fn (Vector4i) clamp #

fn (s &Vector4i) clamp(min Vector4i, max Vector4i) Vector4i

Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector4i) clampi #

fn (s &Vector4i) clampi(min i64, max i64) Vector4i

Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component.

fn (Vector4i) snapped #

fn (s &Vector4i) snapped(step Vector4i) Vector4i

Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step].

fn (Vector4i) snappedi #

fn (s &Vector4i) snappedi(step i64) Vector4i

Returns a new vector with each component snapped to the closest multiple of [param step].

fn (Vector4i) min #

fn (s &Vector4i) min(with Vector4i) Vector4i

Returns the component-wise minimum of this and [param with], equivalent to Vector4i(mini(x, with.x), mini(y, with.y), mini(z, with.z), mini(w, with.w)).

fn (Vector4i) mini #

fn (s &Vector4i) mini(with i64) Vector4i

Returns the component-wise minimum of this and [param with], equivalent to Vector4i(mini(x, with), mini(y, with), mini(z, with), mini(w, with)).

fn (Vector4i) max #

fn (s &Vector4i) max(with Vector4i) Vector4i

Returns the component-wise maximum of this and [param with], equivalent to Vector4i(maxi(x, with.x), maxi(y, with.y), maxi(z, with.z), maxi(w, with.w)).

fn (Vector4i) maxi #

fn (s &Vector4i) maxi(with i64) Vector4i

Returns the component-wise maximum of this and [param with], equivalent to Vector4i(maxi(x, with), maxi(y, with), maxi(z, with), maxi(w, with)).

fn (Vector4i) distance_to #

fn (s &Vector4i) distance_to(to Vector4i) f64

Returns the distance between this vector and [param to].

fn (Vector4i) distance_squared_to #

fn (s &Vector4i) distance_squared_to(to Vector4i) i64

Returns the squared distance between this vector and [param to]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.

fn (Vector4i) to_variant #

fn (s &Vector4i) to_variant() Variant

fn (Vector4i) from_variant #

fn (mut s Vector4i) from_variant(variant &Variant)

fn (Vector4i) index #

fn (v &Vector4i) index(i i64) i64

fn (Vector4i) mul_i64 #

fn (a Vector4i) mul_i64(b i64) Vector4i

Multiplies each component of the [Vector4i] by the given [int].

fn (Vector4i) div_i64 #

fn (a Vector4i) div_i64(b i64) Vector4i

Divides each component of the [Vector4i] by the given [int].

fn (Vector4i) mod_i64 #

fn (a Vector4i) mod_i64(b i64) Vector4i

Gets the remainder of each component of the [Vector4i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.

print(Vector4i(10, -20, 30, -40) % 7) ##

fn (Vector4i) mul_f64 #

fn (a Vector4i) mul_f64(b f64) Vector4

Multiplies each component of the [Vector4i] by the given [float]. Returns a Vector4 value due to floating-point operations.

print(Vector4i(10, 20, 30, 40) * 2) ##

fn (Vector4i) div_f64 #

fn (a Vector4i) div_f64(b f64) Vector4

Divides each component of the [Vector4i] by the given [float]. Returns a Vector4 value due to floating-point operations.

print(Vector4i(10, 20, 30, 40) / 2) ##

fn (Vector4i) == #

fn (a Vector4i) == (b Vector4i) bool

Returns true if the vectors are exactly equal.

fn (Vector4i) eq_vector4i #

fn (a Vector4i) eq_vector4i(b Vector4i) bool

Returns true if the vectors are exactly equal.

fn (Vector4i) ne_vector4i #

fn (a Vector4i) ne_vector4i(b Vector4i) bool

Returns true if the vectors are not equal.

fn (Vector4i) < #

fn (a Vector4i) < (b Vector4i) bool

Compares two [Vector4i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.

fn (Vector4i) lt_vector4i #

fn (a Vector4i) lt_vector4i(b Vector4i) bool

Compares two [Vector4i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.

fn (Vector4i) le_vector4i #

fn (a Vector4i) le_vector4i(b Vector4i) bool

Compares two [Vector4i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.

fn (Vector4i) gt_vector4i #

fn (a Vector4i) gt_vector4i(b Vector4i) bool

Compares two [Vector4i] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.

fn (Vector4i) ge_vector4i #

fn (a Vector4i) ge_vector4i(b Vector4i) bool

Compares two [Vector4i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.

fn (Vector4i) + #

fn (a Vector4i) + (b Vector4i) Vector4i

Adds each component of the [Vector4i] by the components of the given [Vector4i].

print(Vector4i(10, 20, 30, 40) + Vector4i(3, 4, 5, 6)) ##

fn (Vector4i) add_vector4i #

fn (a Vector4i) add_vector4i(b Vector4i) Vector4i

Adds each component of the [Vector4i] by the components of the given [Vector4i].

print(Vector4i(10, 20, 30, 40) + Vector4i(3, 4, 5, 6)) ##

fn (Vector4i) - #

fn (a Vector4i) - (b Vector4i) Vector4i

Subtracts each component of the [Vector4i] by the components of the given [Vector4i].

print(Vector4i(10, 20, 30, 40) - Vector4i(3, 4, 5, 6)) ##

fn (Vector4i) sub_vector4i #

fn (a Vector4i) sub_vector4i(b Vector4i) Vector4i

Subtracts each component of the [Vector4i] by the components of the given [Vector4i].

print(Vector4i(10, 20, 30, 40) - Vector4i(3, 4, 5, 6)) ##

fn (Vector4i) * #

fn (a Vector4i) * (b Vector4i) Vector4i

Multiplies each component of the [Vector4i] by the components of the given [Vector4i].

print(Vector4i(10, 20, 30, 40) * Vector4i(3, 4, 5, 6)) ##

fn (Vector4i) mul_vector4i #

fn (a Vector4i) mul_vector4i(b Vector4i) Vector4i

Multiplies each component of the [Vector4i] by the components of the given [Vector4i].

print(Vector4i(10, 20, 30, 40) * Vector4i(3, 4, 5, 6)) ##

fn (Vector4i) / #

fn (a Vector4i) / (b Vector4i) Vector4i

Divides each component of the [Vector4i] by the components of the given [Vector4i].

print(Vector4i(10, 20, 30, 40) / Vector4i(2, 5, 3, 4)) ##

fn (Vector4i) div_vector4i #

fn (a Vector4i) div_vector4i(b Vector4i) Vector4i

Divides each component of the [Vector4i] by the components of the given [Vector4i].

print(Vector4i(10, 20, 30, 40) / Vector4i(2, 5, 3, 4)) ##

fn (Vector4i) % #

fn (a Vector4i) % (b Vector4i) Vector4i

Gets the remainder of each component of the [Vector4i] with the components of the given [Vector4i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.

print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) ##

fn (Vector4i) mod_vector4i #

fn (a Vector4i) mod_vector4i(b Vector4i) Vector4i

Gets the remainder of each component of the [Vector4i] with the components of the given [Vector4i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.

print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) ##

fn (Vector4i) in_dictionary #

fn (a Vector4i) in_dictionary(b Dictionary) bool

fn (Vector4i) in_array #

fn (a Vector4i) in_array(b Array) bool

struct VehicleBody3D #

struct VehicleBody3D {
	RigidBody3D
}

A 3D physics body that simulates the behavior of a car.

fn (VehicleBody3D) to_variant #

fn (s &VehicleBody3D) to_variant() Variant

fn (VehicleBody3D) from_variant #

fn (mut s VehicleBody3D) from_variant(variant &Variant)

fn (VehicleBody3D) set_engine_force #

fn (s &VehicleBody3D) set_engine_force(engine_force f64)

fn (VehicleBody3D) get_engine_force #

fn (s &VehicleBody3D) get_engine_force() f64

fn (VehicleBody3D) set_brake #

fn (s &VehicleBody3D) set_brake(brake f64)

fn (VehicleBody3D) get_brake #

fn (s &VehicleBody3D) get_brake() f64

fn (VehicleBody3D) set_steering #

fn (s &VehicleBody3D) set_steering(steering f64)

fn (VehicleBody3D) get_steering #

fn (s &VehicleBody3D) get_steering() f64

struct VehicleWheel3D #

struct VehicleWheel3D {
	Node3D
}

A 3D physics body for a [VehicleBody3D] that simulates the behavior of a wheel.

fn (VehicleWheel3D) to_variant #

fn (s &VehicleWheel3D) to_variant() Variant

fn (VehicleWheel3D) from_variant #

fn (mut s VehicleWheel3D) from_variant(variant &Variant)

fn (VehicleWheel3D) set_radius #

fn (s &VehicleWheel3D) set_radius(length f64)

fn (VehicleWheel3D) get_radius #

fn (s &VehicleWheel3D) get_radius() f64

fn (VehicleWheel3D) set_suspension_rest_length #

fn (s &VehicleWheel3D) set_suspension_rest_length(length f64)

fn (VehicleWheel3D) get_suspension_rest_length #

fn (s &VehicleWheel3D) get_suspension_rest_length() f64

fn (VehicleWheel3D) set_suspension_travel #

fn (s &VehicleWheel3D) set_suspension_travel(length f64)

fn (VehicleWheel3D) get_suspension_travel #

fn (s &VehicleWheel3D) get_suspension_travel() f64

fn (VehicleWheel3D) set_suspension_stiffness #

fn (s &VehicleWheel3D) set_suspension_stiffness(length f64)

fn (VehicleWheel3D) get_suspension_stiffness #

fn (s &VehicleWheel3D) get_suspension_stiffness() f64

fn (VehicleWheel3D) set_suspension_max_force #

fn (s &VehicleWheel3D) set_suspension_max_force(length f64)

fn (VehicleWheel3D) get_suspension_max_force #

fn (s &VehicleWheel3D) get_suspension_max_force() f64

fn (VehicleWheel3D) set_damping_compression #

fn (s &VehicleWheel3D) set_damping_compression(length f64)

fn (VehicleWheel3D) get_damping_compression #

fn (s &VehicleWheel3D) get_damping_compression() f64

fn (VehicleWheel3D) set_damping_relaxation #

fn (s &VehicleWheel3D) set_damping_relaxation(length f64)

fn (VehicleWheel3D) get_damping_relaxation #

fn (s &VehicleWheel3D) get_damping_relaxation() f64

fn (VehicleWheel3D) set_use_as_traction #

fn (s &VehicleWheel3D) set_use_as_traction(enable bool)

fn (VehicleWheel3D) is_used_as_traction #

fn (s &VehicleWheel3D) is_used_as_traction() bool

fn (VehicleWheel3D) set_use_as_steering #

fn (s &VehicleWheel3D) set_use_as_steering(enable bool)

fn (VehicleWheel3D) is_used_as_steering #

fn (s &VehicleWheel3D) is_used_as_steering() bool

fn (VehicleWheel3D) set_friction_slip #

fn (s &VehicleWheel3D) set_friction_slip(length f64)

fn (VehicleWheel3D) get_friction_slip #

fn (s &VehicleWheel3D) get_friction_slip() f64

fn (VehicleWheel3D) is_in_contact #

fn (s &VehicleWheel3D) is_in_contact() bool

Returns true if this wheel is in contact with a surface.

fn (VehicleWheel3D) get_contact_body #

fn (s &VehicleWheel3D) get_contact_body() Node3D

Returns the contacting body node if valid in the tree, as [Node3D]. At the moment, [GridMap] is not supported so the node will be always of type [PhysicsBody3D]. Returns null if the wheel is not in contact with a surface, or the contact body is not a [PhysicsBody3D].

fn (VehicleWheel3D) get_contact_point #

fn (s &VehicleWheel3D) get_contact_point() Vector3

Returns the point of the suspension's collision in world space if the wheel is in contact. If the wheel isn't in contact with anything, returns the maximum point of the wheel's ray cast in world space, which is defined by wheel_rest_length + wheel_radius.

fn (VehicleWheel3D) get_contact_normal #

fn (s &VehicleWheel3D) get_contact_normal() Vector3

Returns the normal of the suspension's collision in world space if the wheel is in contact. If the wheel isn't in contact with anything, returns a vector pointing directly along the suspension axis toward the vehicle in world space.

fn (VehicleWheel3D) set_roll_influence #

fn (s &VehicleWheel3D) set_roll_influence(roll_influence f64)

fn (VehicleWheel3D) get_roll_influence #

fn (s &VehicleWheel3D) get_roll_influence() f64

fn (VehicleWheel3D) get_skidinfo #

fn (s &VehicleWheel3D) get_skidinfo() f64

Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is skidding (the wheel has lost grip, e.g. icy terrain), 1.0 means not skidding (the wheel has full grip, e.g. dry asphalt road).

fn (VehicleWheel3D) get_rpm #

fn (s &VehicleWheel3D) get_rpm() f64

Returns the rotational speed of the wheel in revolutions per minute.

fn (VehicleWheel3D) set_engine_force #

fn (s &VehicleWheel3D) set_engine_force(engine_force f64)

fn (VehicleWheel3D) get_engine_force #

fn (s &VehicleWheel3D) get_engine_force() f64

fn (VehicleWheel3D) set_brake #

fn (s &VehicleWheel3D) set_brake(brake f64)

fn (VehicleWheel3D) get_brake #

fn (s &VehicleWheel3D) get_brake() f64

fn (VehicleWheel3D) set_steering #

fn (s &VehicleWheel3D) set_steering(steering f64)

fn (VehicleWheel3D) get_steering #

fn (s &VehicleWheel3D) get_steering() f64

struct VideoStream #

struct VideoStream {
	Resource
}

Base resource for video streams.

fn (VideoStream) to_variant #

fn (s &VideoStream) to_variant() Variant

fn (VideoStream) from_variant #

fn (mut s VideoStream) from_variant(variant &Variant)

fn (VideoStream) gd_instantiate_playback #

fn (s &VideoStream) gd_instantiate_playback() VideoStreamPlayback

Called when the video starts playing, to initialize and return a subclass of [VideoStreamPlayback].

fn (VideoStream) set_file #

fn (s &VideoStream) set_file(file string)

fn (VideoStream) get_file #

fn (s &VideoStream) get_file() string

struct VideoStreamPlayback #

struct VideoStreamPlayback {
	Resource
}

Internal class used by [VideoStream] to manage playback state when played from a [VideoStreamPlayer].

fn (VideoStreamPlayback) to_variant #

fn (s &VideoStreamPlayback) to_variant() Variant

fn (VideoStreamPlayback) from_variant #

fn (mut s VideoStreamPlayback) from_variant(variant &Variant)

fn (VideoStreamPlayback) gd_stop #

fn (s &VideoStreamPlayback) gd_stop()

Stops playback. May be called multiple times before [method _play], or in response to [method VideoStreamPlayer.stop]. [method _is_playing] should return false once stopped.

fn (VideoStreamPlayback) gd_play #

fn (s &VideoStreamPlayback) gd_play()

Called in response to [member VideoStreamPlayer.autoplay] or [method VideoStreamPlayer.play]. Note that manual playback may also invoke [method _stop] multiple times before this method is called. [method _is_playing] should return true once playing.

fn (VideoStreamPlayback) gd_is_playing #

fn (s &VideoStreamPlayback) gd_is_playing() bool

Returns the playback state, as determined by calls to [method _play] and [method _stop].

fn (VideoStreamPlayback) gd_set_paused #

fn (s &VideoStreamPlayback) gd_set_paused(paused bool)

Set the paused status of video playback. [method _is_paused] must return [param paused]. Called in response to the [member VideoStreamPlayer.paused] setter.

fn (VideoStreamPlayback) gd_is_paused #

fn (s &VideoStreamPlayback) gd_is_paused() bool

Returns the paused status, as set by [method _set_paused].

fn (VideoStreamPlayback) gd_get_length #

fn (s &VideoStreamPlayback) gd_get_length() f64

Returns the video duration in seconds, if known, or 0 if unknown.

fn (VideoStreamPlayback) gd_get_playback_position #

fn (s &VideoStreamPlayback) gd_get_playback_position() f64

Return the current playback timestamp. Called in response to the [member VideoStreamPlayer.stream_position] getter.

fn (VideoStreamPlayback) gd_seek #

fn (s &VideoStreamPlayback) gd_seek(time f64)

Seeks to [param time] seconds. Called in response to the [member VideoStreamPlayer.stream_position] setter.

fn (VideoStreamPlayback) gd_set_audio_track #

fn (s &VideoStreamPlayback) gd_set_audio_track(idx i64)

Select the audio track [param idx]. Called when playback starts, and in response to the [member VideoStreamPlayer.audio_track] setter.

fn (VideoStreamPlayback) gd_get_texture #

fn (s &VideoStreamPlayback) gd_get_texture() Texture2D

Allocates a [Texture2D] in which decoded video frames will be drawn.

fn (VideoStreamPlayback) gd_update #

fn (s &VideoStreamPlayback) gd_update(delta f64)

Ticks video playback for [param delta] seconds. Called every frame as long as both [method _is_paused] and [method _is_playing] return true.

fn (VideoStreamPlayback) gd_get_channels #

fn (s &VideoStreamPlayback) gd_get_channels() i64

Returns the number of audio channels.

fn (VideoStreamPlayback) gd_get_mix_rate #

fn (s &VideoStreamPlayback) gd_get_mix_rate() i64

Returns the audio sample rate used for mixing.

fn (VideoStreamPlayback) mix_audio #

fn (s &VideoStreamPlayback) mix_audio(num_frames i64, cfg VideoStreamPlayback_mix_audio_Cfg) i64

Render [param num_frames] audio frames (of [method _get_channels] floats each) from [param buffer], starting from index [param offset] in the array. Returns the number of audio frames rendered, or -1 on error.

struct VideoStreamPlayback_mix_audio_Cfg #

@[params]
struct VideoStreamPlayback_mix_audio_Cfg {
pub:
	buffer PackedFloat32Array = PackedFloat32Array{}
	offset i64
}

Optional parameters for VideoStreamPlayback#mix_audio

struct VideoStreamPlayer #

struct VideoStreamPlayer {
	Control
}

A control used for video playback.

fn (VideoStreamPlayer) to_variant #

fn (s &VideoStreamPlayer) to_variant() Variant

fn (VideoStreamPlayer) from_variant #

fn (mut s VideoStreamPlayer) from_variant(variant &Variant)

fn (VideoStreamPlayer) set_stream #

fn (s &VideoStreamPlayer) set_stream(stream VideoStream)

fn (VideoStreamPlayer) get_stream #

fn (s &VideoStreamPlayer) get_stream() VideoStream

fn (VideoStreamPlayer) play #

fn (s &VideoStreamPlayer) play()

Starts the video playback from the beginning. If the video is paused, this will not unpause the video.

fn (VideoStreamPlayer) stop #

fn (s &VideoStreamPlayer) stop()

Stops the video playback and sets the stream position to 0. [b]Note:[/b] Although the stream position will be set to 0, the first frame of the video stream won't become the current frame.

fn (VideoStreamPlayer) is_playing #

fn (s &VideoStreamPlayer) is_playing() bool

Returns true if the video is playing. [b]Note:[/b] The video is still considered playing if paused during playback.

fn (VideoStreamPlayer) set_paused #

fn (s &VideoStreamPlayer) set_paused(paused bool)

fn (VideoStreamPlayer) is_paused #

fn (s &VideoStreamPlayer) is_paused() bool

fn (VideoStreamPlayer) set_loop #

fn (s &VideoStreamPlayer) set_loop(loop bool)

fn (VideoStreamPlayer) has_loop #

fn (s &VideoStreamPlayer) has_loop() bool

fn (VideoStreamPlayer) set_volume #

fn (s &VideoStreamPlayer) set_volume(volume f64)

fn (VideoStreamPlayer) get_volume #

fn (s &VideoStreamPlayer) get_volume() f64

fn (VideoStreamPlayer) set_volume_db #

fn (s &VideoStreamPlayer) set_volume_db(db f64)

fn (VideoStreamPlayer) get_volume_db #

fn (s &VideoStreamPlayer) get_volume_db() f64

fn (VideoStreamPlayer) set_speed_scale #

fn (s &VideoStreamPlayer) set_speed_scale(speed_scale f64)

fn (VideoStreamPlayer) get_speed_scale #

fn (s &VideoStreamPlayer) get_speed_scale() f64

fn (VideoStreamPlayer) set_audio_track #

fn (s &VideoStreamPlayer) set_audio_track(track i64)

fn (VideoStreamPlayer) get_audio_track #

fn (s &VideoStreamPlayer) get_audio_track() i64

fn (VideoStreamPlayer) get_stream_name #

fn (s &VideoStreamPlayer) get_stream_name() string

Returns the video stream's name, or "<No Stream>" if no video stream is assigned.

fn (VideoStreamPlayer) get_stream_length #

fn (s &VideoStreamPlayer) get_stream_length() f64

The length of the current stream, in seconds.

fn (VideoStreamPlayer) set_stream_position #

fn (s &VideoStreamPlayer) set_stream_position(position f64)

fn (VideoStreamPlayer) get_stream_position #

fn (s &VideoStreamPlayer) get_stream_position() f64

fn (VideoStreamPlayer) set_autoplay #

fn (s &VideoStreamPlayer) set_autoplay(enabled bool)

fn (VideoStreamPlayer) has_autoplay #

fn (s &VideoStreamPlayer) has_autoplay() bool

fn (VideoStreamPlayer) set_expand #

fn (s &VideoStreamPlayer) set_expand(enable bool)

fn (VideoStreamPlayer) has_expand #

fn (s &VideoStreamPlayer) has_expand() bool

fn (VideoStreamPlayer) set_buffering_msec #

fn (s &VideoStreamPlayer) set_buffering_msec(msec i64)

fn (VideoStreamPlayer) get_buffering_msec #

fn (s &VideoStreamPlayer) get_buffering_msec() i64

fn (VideoStreamPlayer) set_bus #

fn (s &VideoStreamPlayer) set_bus(bus string)

fn (VideoStreamPlayer) get_bus #

fn (s &VideoStreamPlayer) get_bus() string

fn (VideoStreamPlayer) get_video_texture #

fn (s &VideoStreamPlayer) get_video_texture() Texture2D

Returns the current frame as a [Texture2D].

struct VideoStreamTheora #

struct VideoStreamTheora {
	VideoStream
}

[VideoStream] resource for Ogg Theora videos.

fn (VideoStreamTheora) to_variant #

fn (s &VideoStreamTheora) to_variant() Variant

fn (VideoStreamTheora) from_variant #

fn (mut s VideoStreamTheora) from_variant(variant &Variant)

struct Viewport #

struct Viewport {
	Node
}

Abstract base class for viewports. Encapsulates drawing and interaction with a game world.

fn (Viewport) to_variant #

fn (s &Viewport) to_variant() Variant

fn (Viewport) from_variant #

fn (mut s Viewport) from_variant(variant &Variant)

fn (Viewport) set_world_2d #

fn (s &Viewport) set_world_2d(world_2d World2D)

fn (Viewport) get_world_2d #

fn (s &Viewport) get_world_2d() World2D

fn (Viewport) find_world_2d #

fn (s &Viewport) find_world_2d() World2D

Returns the first valid [World2D] for this viewport, searching the [member world_2d] property of itself and any Viewport ancestor.

fn (Viewport) set_canvas_transform #

fn (s &Viewport) set_canvas_transform(xform Transform2D)

fn (Viewport) get_canvas_transform #

fn (s &Viewport) get_canvas_transform() Transform2D

fn (Viewport) set_global_canvas_transform #

fn (s &Viewport) set_global_canvas_transform(xform Transform2D)

fn (Viewport) get_global_canvas_transform #

fn (s &Viewport) get_global_canvas_transform() Transform2D

fn (Viewport) get_stretch_transform #

fn (s &Viewport) get_stretch_transform() Transform2D

Returns the automatically computed 2D stretch transform, taking the [Viewport]'s stretch settings into account. The final value is multiplied by [member Window.content_scale_factor], but only for the root viewport. If this method is called on a [SubViewport] (e.g., in a scene tree with [SubViewportContainer] and [SubViewport]), the scale factor of the root window will not be applied. Using [method Transform2D.get_scale] on the returned value, this can be used to compensate for scaling when zooming a [Camera2D] node, or to scale down a [TextureRect] to be pixel-perfect regardless of the automatically computed scale factor. [b]Note:[/b] Due to how pixel scaling works, the returned transform's X and Y scale may differ slightly, even when [member Window.content_scale_aspect] is set to a mode that preserves the pixels' aspect ratio. If [member Window.content_scale_aspect] is [constant Window.CONTENT_SCALE_ASPECT_IGNORE], the X and Y scale may differ [i]significantly[/i].

fn (Viewport) get_final_transform #

fn (s &Viewport) get_final_transform() Transform2D

Returns the transform from the viewport's coordinate system to the embedder's coordinate system.

fn (Viewport) get_screen_transform #

fn (s &Viewport) get_screen_transform() Transform2D

Returns the transform from the Viewport's coordinates to the screen coordinates of the containing window manager window.

fn (Viewport) get_visible_rect #

fn (s &Viewport) get_visible_rect() Rect2

Returns the visible rectangle in global screen coordinates.

fn (Viewport) set_transparent_background #

fn (s &Viewport) set_transparent_background(enable bool)

fn (Viewport) has_transparent_background #

fn (s &Viewport) has_transparent_background() bool

fn (Viewport) set_use_hdr_2d #

fn (s &Viewport) set_use_hdr_2d(enable bool)

fn (Viewport) is_using_hdr_2d #

fn (s &Viewport) is_using_hdr_2d() bool

fn (Viewport) set_msaa_2d #

fn (s &Viewport) set_msaa_2d(msaa ViewportMSAA)

fn (Viewport) get_msaa_2d #

fn (s &Viewport) get_msaa_2d() ViewportMSAA

fn (Viewport) set_msaa_3d #

fn (s &Viewport) set_msaa_3d(msaa ViewportMSAA)

fn (Viewport) get_msaa_3d #

fn (s &Viewport) get_msaa_3d() ViewportMSAA

fn (Viewport) set_screen_space_aa #

fn (s &Viewport) set_screen_space_aa(screen_space_aa ViewportScreenSpaceAA)

fn (Viewport) get_screen_space_aa #

fn (s &Viewport) get_screen_space_aa() ViewportScreenSpaceAA

fn (Viewport) set_use_taa #

fn (s &Viewport) set_use_taa(enable bool)

fn (Viewport) is_using_taa #

fn (s &Viewport) is_using_taa() bool

fn (Viewport) set_use_debanding #

fn (s &Viewport) set_use_debanding(enable bool)

fn (Viewport) is_using_debanding #

fn (s &Viewport) is_using_debanding() bool

fn (Viewport) set_use_occlusion_culling #

fn (s &Viewport) set_use_occlusion_culling(enable bool)

fn (Viewport) is_using_occlusion_culling #

fn (s &Viewport) is_using_occlusion_culling() bool

fn (Viewport) set_debug_draw #

fn (s &Viewport) set_debug_draw(debug_draw ViewportDebugDraw)

fn (Viewport) get_debug_draw #

fn (s &Viewport) get_debug_draw() ViewportDebugDraw

fn (Viewport) set_use_oversampling #

fn (s &Viewport) set_use_oversampling(enable bool)

fn (Viewport) is_using_oversampling #

fn (s &Viewport) is_using_oversampling() bool

fn (Viewport) set_oversampling_override #

fn (s &Viewport) set_oversampling_override(oversampling f64)

fn (Viewport) get_oversampling_override #

fn (s &Viewport) get_oversampling_override() f64

fn (Viewport) get_oversampling #

fn (s &Viewport) get_oversampling() f64

Returns viewport oversampling factor.

fn (Viewport) get_render_info #

fn (s &Viewport) get_render_info(gd_type ViewportRenderInfoType, info ViewportRenderInfo) i64

Returns rendering statistics of the given type.

fn (Viewport) get_texture #

fn (s &Viewport) get_texture() ViewportTexture

Returns the viewport's texture. [b]Note:[/b] When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. [method Node._ready]. To make sure the texture you get is correct, you can await [signal RenderingServer.frame_post_draw] signal.

func _ready():
await RenderingServer.frame_post_draw
$Viewport.get_texture().get_image().save_png('user://Screenshot.png')

[b]Note:[/b] When [member use_hdr_2d] is true the returned texture will be an HDR image encoded in linear space.

fn (Viewport) set_physics_object_picking #

fn (s &Viewport) set_physics_object_picking(enable bool)

fn (Viewport) get_physics_object_picking #

fn (s &Viewport) get_physics_object_picking() bool

fn (Viewport) set_physics_object_picking_sort #

fn (s &Viewport) set_physics_object_picking_sort(enable bool)

fn (Viewport) get_physics_object_picking_sort #

fn (s &Viewport) get_physics_object_picking_sort() bool

fn (Viewport) set_physics_object_picking_first_only #

fn (s &Viewport) set_physics_object_picking_first_only(enable bool)

fn (Viewport) get_physics_object_picking_first_only #

fn (s &Viewport) get_physics_object_picking_first_only() bool

fn (Viewport) get_viewport_rid #

fn (s &Viewport) get_viewport_rid() RID

Returns the viewport's RID from the [RenderingServer].

fn (Viewport) push_text_input #

fn (s &Viewport) push_text_input(text string)

Helper method which calls the set_text() method on the currently focused [Control], provided that it is defined (e.g. if the focused Control is [Button] or [LineEdit]).

fn (Viewport) push_input #

fn (s &Viewport) push_input(event InputEvent, cfg Viewport_push_input_Cfg)

Triggers the given [param event] in this [Viewport]. This can be used to pass an [InputEvent] between viewports, or to locally apply inputs that were sent over the network or saved to a file. If [param in_local_coords] is false, the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If [param in_local_coords] is true, the event's position is in viewport coordinates. While this method serves a similar purpose as [method Input.parse_input_event], it does not remap the specified [param event] based on project settings like [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse]. Calling this method will propagate calls to child nodes for following methods in the given order:- [method Node._input]

  • [method Control._gui_input] for [Control] nodes
  • [method Node._shortcut_input]
  • [method Node._unhandled_key_input]
  • [method Node._unhandled_input]If an earlier method marks the input as handled via [method set_input_as_handled], any later method in this list will not be called. If none of the methods handle the event and [member physics_object_picking] is true, the event is used for physics object picking.

fn (Viewport) push_unhandled_input #

fn (s &Viewport) push_unhandled_input(event InputEvent, cfg Viewport_push_unhandled_input_Cfg)

Triggers the given [param event] in this [Viewport]. This can be used to pass an [InputEvent] between viewports, or to locally apply inputs that were sent over the network or saved to a file. If [param in_local_coords] is false, the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If [param in_local_coords] is true, the event's position is in viewport coordinates. Calling this method will propagate calls to child nodes for following methods in the given order:- [method Node._shortcut_input]

  • [method Node._unhandled_key_input]
  • [method Node._unhandled_input]If an earlier method marks the input as handled via [method set_input_as_handled], any later method in this list will not be called. If none of the methods handle the event and [member physics_object_picking] is true, the event is used for physics object picking. [b]Note:[/b] This method doesn't propagate input events to embedded [Window]s or [SubViewport]s.

fn (Viewport) notify_mouse_entered #

fn (s &Viewport) notify_mouse_entered()

Inform the Viewport that the mouse has entered its area. Use this function before sending an [InputEventMouseButton] or [InputEventMouseMotion] to the [Viewport] with [method Viewport.push_input]. See also [method notify_mouse_exited]. [b]Note:[/b] In most cases, it is not necessary to call this function because [SubViewport] nodes that are children of [SubViewportContainer] are notified automatically. This is only necessary when interacting with viewports in non-default ways, for example as textures in [TextureRect] or with an [Area3D] that forwards input events.

fn (Viewport) notify_mouse_exited #

fn (s &Viewport) notify_mouse_exited()

Inform the Viewport that the mouse has left its area. Use this function when the node that displays the viewport notices the mouse has left the area of the displayed viewport. See also [method notify_mouse_entered]. [b]Note:[/b] In most cases, it is not necessary to call this function because [SubViewport] nodes that are children of [SubViewportContainer] are notified automatically. This is only necessary when interacting with viewports in non-default ways, for example as textures in [TextureRect] or with an [Area3D] that forwards input events.

fn (Viewport) get_mouse_position #

fn (s &Viewport) get_mouse_position() Vector2

Returns the mouse's position in this [Viewport] using the coordinate system of this [Viewport].

fn (Viewport) warp_mouse #

fn (s &Viewport) warp_mouse(position Vector2)

Moves the mouse pointer to the specified position in this [Viewport] using the coordinate system of this [Viewport]. [b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.

fn (Viewport) update_mouse_cursor_state #

fn (s &Viewport) update_mouse_cursor_state()

Force instantly updating the display based on the current mouse cursor position. This includes updating the mouse cursor shape and sending necessary [signal Control.mouse_entered], [signal CollisionObject2D.mouse_entered], [signal CollisionObject3D.mouse_entered] and [signal Window.mouse_entered] signals and their respective mouse_exited counterparts.

fn (Viewport) gui_cancel_drag #

fn (s &Viewport) gui_cancel_drag()

Cancels the drag operation that was previously started through [method Control._get_drag_data] or forced with [method Control.force_drag].

fn (Viewport) gui_get_drag_data #

fn (s &Viewport) gui_get_drag_data() Variant

Returns the drag data from the GUI, that was previously returned by [method Control._get_drag_data].

fn (Viewport) gui_get_drag_description #

fn (s &Viewport) gui_get_drag_description() string

Returns the drag data human-readable description.

fn (Viewport) gui_set_drag_description #

fn (s &Viewport) gui_set_drag_description(description string)

Sets the drag data human-readable description.

fn (Viewport) gui_is_dragging #

fn (s &Viewport) gui_is_dragging() bool

Returns true if a drag operation is currently ongoing and where the drop action could happen in this viewport. Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node.NOTIFICATION_DRAG_END] when you prefer polling the value.

fn (Viewport) gui_is_drag_successful #

fn (s &Viewport) gui_is_drag_successful() bool

Returns true if the drag operation is successful.

fn (Viewport) gui_release_focus #

fn (s &Viewport) gui_release_focus()

Removes the focus from the currently focused [Control] within this viewport. If no [Control] has the focus, does nothing.

fn (Viewport) gui_get_focus_owner #

fn (s &Viewport) gui_get_focus_owner() Control

Returns the currently focused [Control] within this viewport. If no [Control] is focused, returns null.

fn (Viewport) gui_get_hovered_control #

fn (s &Viewport) gui_get_hovered_control() Control

Returns the [Control] that the mouse is currently hovering over in this viewport. If no [Control] has the cursor, returns null. Typically the leaf [Control] node or deepest level of the subtree which claims hover. This is very useful when used together with [method Node.is_ancestor_of] to find if the mouse is within a control tree.

fn (Viewport) set_disable_input #

fn (s &Viewport) set_disable_input(disable bool)

fn (Viewport) is_input_disabled #

fn (s &Viewport) is_input_disabled() bool

fn (Viewport) set_positional_shadow_atlas_size #

fn (s &Viewport) set_positional_shadow_atlas_size(size i64)

fn (Viewport) get_positional_shadow_atlas_size #

fn (s &Viewport) get_positional_shadow_atlas_size() i64

fn (Viewport) set_positional_shadow_atlas_16_bits #

fn (s &Viewport) set_positional_shadow_atlas_16_bits(enable bool)

fn (Viewport) get_positional_shadow_atlas_16_bits #

fn (s &Viewport) get_positional_shadow_atlas_16_bits() bool

fn (Viewport) set_snap_controls_to_pixels #

fn (s &Viewport) set_snap_controls_to_pixels(enabled bool)

fn (Viewport) is_snap_controls_to_pixels_enabled #

fn (s &Viewport) is_snap_controls_to_pixels_enabled() bool

fn (Viewport) set_snap_2d_transforms_to_pixel #

fn (s &Viewport) set_snap_2d_transforms_to_pixel(enabled bool)

fn (Viewport) is_snap_2d_transforms_to_pixel_enabled #

fn (s &Viewport) is_snap_2d_transforms_to_pixel_enabled() bool

fn (Viewport) set_snap_2d_vertices_to_pixel #

fn (s &Viewport) set_snap_2d_vertices_to_pixel(enabled bool)

fn (Viewport) is_snap_2d_vertices_to_pixel_enabled #

fn (s &Viewport) is_snap_2d_vertices_to_pixel_enabled() bool

fn (Viewport) set_positional_shadow_atlas_quadrant_subdiv #

fn (s &Viewport) set_positional_shadow_atlas_quadrant_subdiv(quadrant i64, subdiv ViewportPositionalShadowAtlasQuadrantSubdiv)

Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.

fn (Viewport) get_positional_shadow_atlas_quadrant_subdiv #

fn (s &Viewport) get_positional_shadow_atlas_quadrant_subdiv(quadrant i64) ViewportPositionalShadowAtlasQuadrantSubdiv

Returns the positional shadow atlas quadrant subdivision of the specified quadrant.

fn (Viewport) set_input_as_handled #

fn (s &Viewport) set_input_as_handled()

Stops the input from propagating further down the [SceneTree]. [b]Note:[/b] This does not affect the methods in [Input], only the way events are propagated.

fn (Viewport) is_input_handled #

fn (s &Viewport) is_input_handled() bool

Returns whether the current [InputEvent] has been handled. Input events are not handled until [method set_input_as_handled] has been called during the lifetime of an [InputEvent]. This is usually done as part of input handling methods like [method Node._input], [method Control._gui_input] or others, as well as in corresponding signal handlers. If [member handle_input_locally] is set to false, this method will try finding the first parent viewport that is set to handle input locally, and return its value for [method is_input_handled] instead.

fn (Viewport) set_handle_input_locally #

fn (s &Viewport) set_handle_input_locally(enable bool)

fn (Viewport) is_handling_input_locally #

fn (s &Viewport) is_handling_input_locally() bool

fn (Viewport) set_default_canvas_item_texture_filter #

fn (s &Viewport) set_default_canvas_item_texture_filter(mode ViewportDefaultCanvasItemTextureFilter)

fn (Viewport) get_default_canvas_item_texture_filter #

fn (s &Viewport) get_default_canvas_item_texture_filter() ViewportDefaultCanvasItemTextureFilter

fn (Viewport) set_embedding_subwindows #

fn (s &Viewport) set_embedding_subwindows(enable bool)

fn (Viewport) is_embedding_subwindows #

fn (s &Viewport) is_embedding_subwindows() bool

fn (Viewport) get_embedded_subwindows #

fn (s &Viewport) get_embedded_subwindows() Array

Returns a list of the visible embedded [Window]s inside the viewport. [b]Note:[/b] [Window]s inside other viewports will not be listed.

fn (Viewport) set_canvas_cull_mask #

fn (s &Viewport) set_canvas_cull_mask(mask i64)

fn (Viewport) get_canvas_cull_mask #

fn (s &Viewport) get_canvas_cull_mask() i64

fn (Viewport) set_canvas_cull_mask_bit #

fn (s &Viewport) set_canvas_cull_mask_bit(layer i64, enable bool)

Set/clear individual bits on the rendering layer mask. This simplifies editing this [Viewport]'s layers.

fn (Viewport) get_canvas_cull_mask_bit #

fn (s &Viewport) get_canvas_cull_mask_bit(layer i64) bool

Returns an individual bit on the rendering layer mask.

fn (Viewport) set_default_canvas_item_texture_repeat #

fn (s &Viewport) set_default_canvas_item_texture_repeat(mode ViewportDefaultCanvasItemTextureRepeat)

fn (Viewport) get_default_canvas_item_texture_repeat #

fn (s &Viewport) get_default_canvas_item_texture_repeat() ViewportDefaultCanvasItemTextureRepeat

fn (Viewport) set_sdf_oversize #

fn (s &Viewport) set_sdf_oversize(oversize ViewportSDFOversize)

fn (Viewport) get_sdf_oversize #

fn (s &Viewport) get_sdf_oversize() ViewportSDFOversize

fn (Viewport) set_sdf_scale #

fn (s &Viewport) set_sdf_scale(scale ViewportSDFScale)

fn (Viewport) get_sdf_scale #

fn (s &Viewport) get_sdf_scale() ViewportSDFScale

fn (Viewport) set_mesh_lod_threshold #

fn (s &Viewport) set_mesh_lod_threshold(pixels f64)

fn (Viewport) get_mesh_lod_threshold #

fn (s &Viewport) get_mesh_lod_threshold() f64

fn (Viewport) set_as_audio_listener_2d #

fn (s &Viewport) set_as_audio_listener_2d(enable bool)

fn (Viewport) is_audio_listener_2d #

fn (s &Viewport) is_audio_listener_2d() bool

fn (Viewport) get_audio_listener_2d #

fn (s &Viewport) get_audio_listener_2d() AudioListener2D

Returns the currently active 2D audio listener. Returns null if there are no active 2D audio listeners, in which case the active 2D camera will be treated as listener.

fn (Viewport) get_camera_2d #

fn (s &Viewport) get_camera_2d() Camera2D

Returns the currently active 2D camera. Returns null if there are no active cameras.

fn (Viewport) set_world_3d #

fn (s &Viewport) set_world_3d(world_3d World3D)

fn (Viewport) get_world_3d #

fn (s &Viewport) get_world_3d() World3D

fn (Viewport) find_world_3d #

fn (s &Viewport) find_world_3d() World3D

Returns the first valid [World3D] for this viewport, searching the [member world_3d] property of itself and any Viewport ancestor.

fn (Viewport) set_use_own_world_3d #

fn (s &Viewport) set_use_own_world_3d(enable bool)

fn (Viewport) is_using_own_world_3d #

fn (s &Viewport) is_using_own_world_3d() bool

fn (Viewport) get_audio_listener_3d #

fn (s &Viewport) get_audio_listener_3d() AudioListener3D

Returns the currently active 3D audio listener. Returns null if there are no active 3D audio listeners, in which case the active 3D camera will be treated as listener.

fn (Viewport) get_camera_3d #

fn (s &Viewport) get_camera_3d() Camera3D

Returns the currently active 3D camera.

fn (Viewport) set_as_audio_listener_3d #

fn (s &Viewport) set_as_audio_listener_3d(enable bool)

fn (Viewport) is_audio_listener_3d #

fn (s &Viewport) is_audio_listener_3d() bool

fn (Viewport) set_disable_3d #

fn (s &Viewport) set_disable_3d(disable bool)

fn (Viewport) is_3d_disabled #

fn (s &Viewport) is_3d_disabled() bool

fn (Viewport) set_use_xr #

fn (s &Viewport) set_use_xr(use bool)

fn (Viewport) is_using_xr #

fn (s &Viewport) is_using_xr() bool

fn (Viewport) set_scaling_3d_mode #

fn (s &Viewport) set_scaling_3d_mode(scaling_3d_mode ViewportScaling3DMode)

fn (Viewport) get_scaling_3d_mode #

fn (s &Viewport) get_scaling_3d_mode() ViewportScaling3DMode

fn (Viewport) set_scaling_3d_scale #

fn (s &Viewport) set_scaling_3d_scale(scale f64)

fn (Viewport) get_scaling_3d_scale #

fn (s &Viewport) get_scaling_3d_scale() f64

fn (Viewport) set_fsr_sharpness #

fn (s &Viewport) set_fsr_sharpness(fsr_sharpness f64)

fn (Viewport) get_fsr_sharpness #

fn (s &Viewport) get_fsr_sharpness() f64

fn (Viewport) set_texture_mipmap_bias #

fn (s &Viewport) set_texture_mipmap_bias(texture_mipmap_bias f64)

fn (Viewport) get_texture_mipmap_bias #

fn (s &Viewport) get_texture_mipmap_bias() f64

fn (Viewport) set_anisotropic_filtering_level #

fn (s &Viewport) set_anisotropic_filtering_level(anisotropic_filtering_level ViewportAnisotropicFiltering)

fn (Viewport) get_anisotropic_filtering_level #

fn (s &Viewport) get_anisotropic_filtering_level() ViewportAnisotropicFiltering

fn (Viewport) set_vrs_mode #

fn (s &Viewport) set_vrs_mode(mode ViewportVRSMode)

fn (Viewport) get_vrs_mode #

fn (s &Viewport) get_vrs_mode() ViewportVRSMode

fn (Viewport) set_vrs_update_mode #

fn (s &Viewport) set_vrs_update_mode(mode ViewportVRSUpdateMode)

fn (Viewport) get_vrs_update_mode #

fn (s &Viewport) get_vrs_update_mode() ViewportVRSUpdateMode

fn (Viewport) set_vrs_texture #

fn (s &Viewport) set_vrs_texture(texture Texture2D)

fn (Viewport) get_vrs_texture #

fn (s &Viewport) get_vrs_texture() Texture2D

struct ViewportTexture #

struct ViewportTexture {
	Texture2D
}

Provides the content of a [Viewport] as a dynamic texture.

fn (ViewportTexture) to_variant #

fn (s &ViewportTexture) to_variant() Variant

fn (ViewportTexture) from_variant #

fn (mut s ViewportTexture) from_variant(variant &Variant)

fn (ViewportTexture) set_viewport_path_in_scene #

fn (s &ViewportTexture) set_viewport_path_in_scene(path NodePath)

fn (ViewportTexture) get_viewport_path_in_scene #

fn (s &ViewportTexture) get_viewport_path_in_scene() NodePath

struct Viewport_push_input_Cfg #

@[params]
struct Viewport_push_input_Cfg {
pub:
	in_local_coords bool
}

Optional parameters for Viewport#push_input

struct Viewport_push_unhandled_input_Cfg #

@[params]
struct Viewport_push_unhandled_input_Cfg {
pub:
	in_local_coords bool
}

Optional parameters for Viewport#push_unhandled_input

struct VisibleOnScreenEnabler2D #

struct VisibleOnScreenEnabler2D {
	VisibleOnScreenNotifier2D
}

A rectangular region of 2D space that, when visible on screen, enables a target node.

fn (VisibleOnScreenEnabler2D) to_variant #

fn (s &VisibleOnScreenEnabler2D) to_variant() Variant

fn (VisibleOnScreenEnabler2D) from_variant #

fn (mut s VisibleOnScreenEnabler2D) from_variant(variant &Variant)

fn (VisibleOnScreenEnabler2D) set_enable_mode #

fn (s &VisibleOnScreenEnabler2D) set_enable_mode(mode VisibleOnScreenEnabler2DEnableMode)

fn (VisibleOnScreenEnabler2D) get_enable_mode #

fn (s &VisibleOnScreenEnabler2D) get_enable_mode() VisibleOnScreenEnabler2DEnableMode

fn (VisibleOnScreenEnabler2D) set_enable_node_path #

fn (s &VisibleOnScreenEnabler2D) set_enable_node_path(path NodePath)

fn (VisibleOnScreenEnabler2D) get_enable_node_path #

fn (s &VisibleOnScreenEnabler2D) get_enable_node_path() NodePath

struct VisibleOnScreenEnabler3D #

struct VisibleOnScreenEnabler3D {
	VisibleOnScreenNotifier3D
}

A box-shaped region of 3D space that, when visible on screen, enables a target node.

fn (VisibleOnScreenEnabler3D) to_variant #

fn (s &VisibleOnScreenEnabler3D) to_variant() Variant

fn (VisibleOnScreenEnabler3D) from_variant #

fn (mut s VisibleOnScreenEnabler3D) from_variant(variant &Variant)

fn (VisibleOnScreenEnabler3D) set_enable_mode #

fn (s &VisibleOnScreenEnabler3D) set_enable_mode(mode VisibleOnScreenEnabler3DEnableMode)

fn (VisibleOnScreenEnabler3D) get_enable_mode #

fn (s &VisibleOnScreenEnabler3D) get_enable_mode() VisibleOnScreenEnabler3DEnableMode

fn (VisibleOnScreenEnabler3D) set_enable_node_path #

fn (s &VisibleOnScreenEnabler3D) set_enable_node_path(path NodePath)

fn (VisibleOnScreenEnabler3D) get_enable_node_path #

fn (s &VisibleOnScreenEnabler3D) get_enable_node_path() NodePath

struct VisibleOnScreenNotifier2D #

struct VisibleOnScreenNotifier2D {
	Node2D
}

A rectangular region of 2D space that detects whether it is visible on screen.

fn (VisibleOnScreenNotifier2D) to_variant #

fn (s &VisibleOnScreenNotifier2D) to_variant() Variant

fn (VisibleOnScreenNotifier2D) from_variant #

fn (mut s VisibleOnScreenNotifier2D) from_variant(variant &Variant)

fn (VisibleOnScreenNotifier2D) set_rect #

fn (s &VisibleOnScreenNotifier2D) set_rect(rect Rect2)

fn (VisibleOnScreenNotifier2D) get_rect #

fn (s &VisibleOnScreenNotifier2D) get_rect() Rect2

fn (VisibleOnScreenNotifier2D) set_show_rect #

fn (s &VisibleOnScreenNotifier2D) set_show_rect(show_rect bool)

fn (VisibleOnScreenNotifier2D) is_showing_rect #

fn (s &VisibleOnScreenNotifier2D) is_showing_rect() bool

fn (VisibleOnScreenNotifier2D) is_on_screen #

fn (s &VisibleOnScreenNotifier2D) is_on_screen() bool

If true, the bounding rectangle is on the screen. [b]Note:[/b] It takes one frame for the [VisibleOnScreenNotifier2D]'s visibility to be determined once added to the scene tree, so this method will always return false right after it is instantiated, before the draw pass.

struct VisibleOnScreenNotifier3D #

struct VisibleOnScreenNotifier3D {
	VisualInstance3D
}

A box-shaped region of 3D space that detects whether it is visible on screen.

fn (VisibleOnScreenNotifier3D) to_variant #

fn (s &VisibleOnScreenNotifier3D) to_variant() Variant

fn (VisibleOnScreenNotifier3D) from_variant #

fn (mut s VisibleOnScreenNotifier3D) from_variant(variant &Variant)

fn (VisibleOnScreenNotifier3D) set_aabb #

fn (s &VisibleOnScreenNotifier3D) set_aabb(rect AABB)

fn (VisibleOnScreenNotifier3D) is_on_screen #

fn (s &VisibleOnScreenNotifier3D) is_on_screen() bool

Returns true if the bounding box is on the screen. [b]Note:[/b] It takes one frame for the [VisibleOnScreenNotifier3D]'s visibility to be assessed once added to the scene tree, so this method will always return false right after it is instantiated.

struct VisualInstance3D #

struct VisualInstance3D {
	Node3D
}

Parent of all visual 3D nodes.

fn (VisualInstance3D) to_variant #

fn (s &VisualInstance3D) to_variant() Variant

fn (VisualInstance3D) from_variant #

fn (mut s VisualInstance3D) from_variant(variant &Variant)

fn (VisualInstance3D) gd_get_aabb #

fn (s &VisualInstance3D) gd_get_aabb() AABB

fn (VisualInstance3D) set_base #

fn (s &VisualInstance3D) set_base(base RID)

Sets the resource that is instantiated by this [VisualInstance3D], which changes how the engine handles the [VisualInstance3D] under the hood. Equivalent to [method RenderingServer.instance_set_base].

fn (VisualInstance3D) get_base #

fn (s &VisualInstance3D) get_base() RID

Returns the RID of the resource associated with this [VisualInstance3D]. For example, if the Node is a [MeshInstance3D], this will return the RID of the associated [Mesh].

fn (VisualInstance3D) get_instance #

fn (s &VisualInstance3D) get_instance() RID

Returns the RID of this instance. This RID is the same as the RID returned by [method RenderingServer.instance_create]. This RID is needed if you want to call [RenderingServer] functions directly on this [VisualInstance3D].

fn (VisualInstance3D) set_layer_mask #

fn (s &VisualInstance3D) set_layer_mask(mask i64)

fn (VisualInstance3D) get_layer_mask #

fn (s &VisualInstance3D) get_layer_mask() i64

fn (VisualInstance3D) set_layer_mask_value #

fn (s &VisualInstance3D) set_layer_mask_value(layer_number i64, value bool)

Based on [param value], enables or disables the specified layer in the [member layers], given a [param layer_number] between 1 and 20.

fn (VisualInstance3D) get_layer_mask_value #

fn (s &VisualInstance3D) get_layer_mask_value(layer_number i64) bool

Returns whether or not the specified layer of the [member layers] is enabled, given a [param layer_number] between 1 and 20.

fn (VisualInstance3D) set_sorting_offset #

fn (s &VisualInstance3D) set_sorting_offset(offset f64)

fn (VisualInstance3D) get_sorting_offset #

fn (s &VisualInstance3D) get_sorting_offset() f64

fn (VisualInstance3D) set_sorting_use_aabb_center #

fn (s &VisualInstance3D) set_sorting_use_aabb_center(enabled bool)

fn (VisualInstance3D) is_sorting_use_aabb_center #

fn (s &VisualInstance3D) is_sorting_use_aabb_center() bool

fn (VisualInstance3D) get_aabb #

fn (s &VisualInstance3D) get_aabb() AABB

Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D].

struct VisualShader #

struct VisualShader {
	Shader
}

A custom shader program with a visual editor.

fn (VisualShader) to_variant #

fn (s &VisualShader) to_variant() Variant

fn (VisualShader) from_variant #

fn (mut s VisualShader) from_variant(variant &Variant)

fn (VisualShader) set_mode #

fn (s &VisualShader) set_mode(mode ShaderMode)

Sets the mode of this shader.

fn (VisualShader) add_node #

fn (s &VisualShader) add_node(gd_type VisualShaderType, node VisualShaderNode, position Vector2, id i64)

Adds the specified [param node] to the shader.

fn (VisualShader) get_node #

fn (s &VisualShader) get_node(gd_type VisualShaderType, id i64) VisualShaderNode

Returns the shader node instance with specified [param type] and [param id].

fn (VisualShader) set_node_position #

fn (s &VisualShader) set_node_position(gd_type VisualShaderType, id i64, position Vector2)

Sets the position of the specified node.

fn (VisualShader) get_node_position #

fn (s &VisualShader) get_node_position(gd_type VisualShaderType, id i64) Vector2

Returns the position of the specified node within the shader graph.

fn (VisualShader) get_node_list #

fn (s &VisualShader) get_node_list(gd_type VisualShaderType) PackedInt32Array

Returns the list of all nodes in the shader with the specified type.

fn (VisualShader) get_valid_node_id #

fn (s &VisualShader) get_valid_node_id(gd_type VisualShaderType) i64

Returns next valid node ID that can be added to the shader graph.

fn (VisualShader) remove_node #

fn (s &VisualShader) remove_node(gd_type VisualShaderType, id i64)

Removes the specified node from the shader.

fn (VisualShader) replace_node #

fn (s &VisualShader) replace_node(gd_type VisualShaderType, id i64, new_class string)

Replaces the specified node with a node of new class type.

fn (VisualShader) is_node_connection #

fn (s &VisualShader) is_node_connection(gd_type VisualShaderType, from_node i64, from_port i64, to_node i64, to_port i64) bool

Returns true if the specified node and port connection exist.

fn (VisualShader) can_connect_nodes #

fn (s &VisualShader) can_connect_nodes(gd_type VisualShaderType, from_node i64, from_port i64, to_node i64, to_port i64) bool

Returns true if the specified nodes and ports can be connected together.

fn (VisualShader) connect_nodes #

fn (s &VisualShader) connect_nodes(gd_type VisualShaderType, from_node i64, from_port i64, to_node i64, to_port i64) GDError

Connects the specified nodes and ports.

fn (VisualShader) disconnect_nodes #

fn (s &VisualShader) disconnect_nodes(gd_type VisualShaderType, from_node i64, from_port i64, to_node i64, to_port i64)

Connects the specified nodes and ports.

fn (VisualShader) connect_nodes_forced #

fn (s &VisualShader) connect_nodes_forced(gd_type VisualShaderType, from_node i64, from_port i64, to_node i64, to_port i64)

Connects the specified nodes and ports, even if they can't be connected. Such connection is invalid and will not function properly.

fn (VisualShader) get_node_connections #

fn (s &VisualShader) get_node_connections(gd_type VisualShaderType) Array

Returns the list of connected nodes with the specified type.

fn (VisualShader) set_graph_offset #

fn (s &VisualShader) set_graph_offset(offset Vector2)

fn (VisualShader) get_graph_offset #

fn (s &VisualShader) get_graph_offset() Vector2

fn (VisualShader) attach_node_to_frame #

fn (s &VisualShader) attach_node_to_frame(gd_type VisualShaderType, id i64, frame i64)

Attaches the given node to the given frame.

fn (VisualShader) detach_node_from_frame #

fn (s &VisualShader) detach_node_from_frame(gd_type VisualShaderType, id i64)

Detaches the given node from the frame it is attached to.

fn (VisualShader) add_varying #

fn (s &VisualShader) add_varying(name string, mode VisualShaderVaryingMode, gd_type VisualShaderVaryingType)

Adds a new varying value node to the shader.

fn (VisualShader) remove_varying #

fn (s &VisualShader) remove_varying(name string)

Removes a varying value node with the given [param name]. Prints an error if a node with this name is not found.

fn (VisualShader) has_varying #

fn (s &VisualShader) has_varying(name string) bool

Returns true if the shader has a varying with the given [param name].

struct VisualShaderNode #

struct VisualShaderNode {
	Resource
}

Base class for [VisualShader] nodes. Not related to scene nodes.

fn (VisualShaderNode) to_variant #

fn (s &VisualShaderNode) to_variant() Variant

fn (VisualShaderNode) from_variant #

fn (mut s VisualShaderNode) from_variant(variant &Variant)

fn (VisualShaderNode) get_default_input_port #

fn (s &VisualShaderNode) get_default_input_port(gd_type VisualShaderNodePortType) i64

Returns the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph.

fn (VisualShaderNode) set_output_port_for_preview #

fn (s &VisualShaderNode) set_output_port_for_preview(port i64)

fn (VisualShaderNode) get_output_port_for_preview #

fn (s &VisualShaderNode) get_output_port_for_preview() i64

fn (VisualShaderNode) set_input_port_default_value #

fn (s &VisualShaderNode) set_input_port_default_value(port i64, value_ ToVariant, cfg VisualShaderNode_set_input_port_default_value_Cfg)

Sets the default [param value] for the selected input [param port].

fn (VisualShaderNode) get_input_port_default_value #

fn (s &VisualShaderNode) get_input_port_default_value(port i64) Variant

Returns the default value of the input [param port].

fn (VisualShaderNode) remove_input_port_default_value #

fn (s &VisualShaderNode) remove_input_port_default_value(port i64)

Removes the default value of the input [param port].

fn (VisualShaderNode) clear_default_input_values #

fn (s &VisualShaderNode) clear_default_input_values()

Clears the default input ports value.

fn (VisualShaderNode) set_default_input_values #

fn (s &VisualShaderNode) set_default_input_values(values Array)

Sets the default input ports values using an [Array] of the form [index0, value0, index1, value1, ...]. For example: [0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)].

fn (VisualShaderNode) get_default_input_values #

fn (s &VisualShaderNode) get_default_input_values() Array

Returns an [Array] containing default values for all of the input ports of the node in the form [index0, value0, index1, value1, ...].

fn (VisualShaderNode) set_frame #

fn (s &VisualShaderNode) set_frame(frame i64)

fn (VisualShaderNode) get_frame #

fn (s &VisualShaderNode) get_frame() i64

struct VisualShaderNodeBillboard #

struct VisualShaderNodeBillboard {
	VisualShaderNode
}

A node that controls how the object faces the camera to be used within the visual shader graph.

fn (VisualShaderNodeBillboard) to_variant #

fn (s &VisualShaderNodeBillboard) to_variant() Variant

fn (VisualShaderNodeBillboard) from_variant #

fn (mut s VisualShaderNodeBillboard) from_variant(variant &Variant)

fn (VisualShaderNodeBillboard) set_billboard_type #

fn (s &VisualShaderNodeBillboard) set_billboard_type(billboard_type VisualShaderNodeBillboardBillboardType)

fn (VisualShaderNodeBillboard) get_billboard_type #

fn (s &VisualShaderNodeBillboard) get_billboard_type() VisualShaderNodeBillboardBillboardType

fn (VisualShaderNodeBillboard) set_keep_scale_enabled #

fn (s &VisualShaderNodeBillboard) set_keep_scale_enabled(enabled bool)

fn (VisualShaderNodeBillboard) is_keep_scale_enabled #

fn (s &VisualShaderNodeBillboard) is_keep_scale_enabled() bool

struct VisualShaderNodeBooleanConstant #

struct VisualShaderNodeBooleanConstant {
	VisualShaderNodeConstant
}

A boolean constant to be used within the visual shader graph.

fn (VisualShaderNodeBooleanConstant) to_variant #

fn (s &VisualShaderNodeBooleanConstant) to_variant() Variant

fn (VisualShaderNodeBooleanConstant) from_variant #

fn (mut s VisualShaderNodeBooleanConstant) from_variant(variant &Variant)

fn (VisualShaderNodeBooleanConstant) set_constant #

fn (s &VisualShaderNodeBooleanConstant) set_constant(constant bool)

fn (VisualShaderNodeBooleanConstant) get_constant #

fn (s &VisualShaderNodeBooleanConstant) get_constant() bool

struct VisualShaderNodeBooleanParameter #

struct VisualShaderNodeBooleanParameter {
	VisualShaderNodeParameter
}

A boolean parameter to be used within the visual shader graph.

fn (VisualShaderNodeBooleanParameter) to_variant #

fn (s &VisualShaderNodeBooleanParameter) to_variant() Variant

fn (VisualShaderNodeBooleanParameter) from_variant #

fn (mut s VisualShaderNodeBooleanParameter) from_variant(variant &Variant)

fn (VisualShaderNodeBooleanParameter) set_default_value_enabled #

fn (s &VisualShaderNodeBooleanParameter) set_default_value_enabled(enabled bool)

fn (VisualShaderNodeBooleanParameter) is_default_value_enabled #

fn (s &VisualShaderNodeBooleanParameter) is_default_value_enabled() bool

fn (VisualShaderNodeBooleanParameter) set_default_value #

fn (s &VisualShaderNodeBooleanParameter) set_default_value(value bool)

fn (VisualShaderNodeBooleanParameter) get_default_value #

fn (s &VisualShaderNodeBooleanParameter) get_default_value() bool

struct VisualShaderNodeClamp #

struct VisualShaderNodeClamp {
	VisualShaderNode
}

Clamps a value within the visual shader graph.

fn (VisualShaderNodeClamp) to_variant #

fn (s &VisualShaderNodeClamp) to_variant() Variant

fn (VisualShaderNodeClamp) from_variant #

fn (mut s VisualShaderNodeClamp) from_variant(variant &Variant)

fn (VisualShaderNodeClamp) set_op_type #

fn (s &VisualShaderNodeClamp) set_op_type(op_type VisualShaderNodeClampOpType)

fn (VisualShaderNodeClamp) get_op_type #

fn (s &VisualShaderNodeClamp) get_op_type() VisualShaderNodeClampOpType

struct VisualShaderNodeColorConstant #

struct VisualShaderNodeColorConstant {
	VisualShaderNodeConstant
}

A [Color] constant to be used within the visual shader graph.

fn (VisualShaderNodeColorConstant) to_variant #

fn (s &VisualShaderNodeColorConstant) to_variant() Variant

fn (VisualShaderNodeColorConstant) from_variant #

fn (mut s VisualShaderNodeColorConstant) from_variant(variant &Variant)

fn (VisualShaderNodeColorConstant) set_constant #

fn (s &VisualShaderNodeColorConstant) set_constant(constant Color)

fn (VisualShaderNodeColorConstant) get_constant #

fn (s &VisualShaderNodeColorConstant) get_constant() Color

struct VisualShaderNodeColorFunc #

struct VisualShaderNodeColorFunc {
	VisualShaderNode
}

A [Color] function to be used within the visual shader graph.

fn (VisualShaderNodeColorFunc) to_variant #

fn (s &VisualShaderNodeColorFunc) to_variant() Variant

fn (VisualShaderNodeColorFunc) from_variant #

fn (mut s VisualShaderNodeColorFunc) from_variant(variant &Variant)

fn (VisualShaderNodeColorFunc) set_function #

fn (s &VisualShaderNodeColorFunc) set_function(func VisualShaderNodeColorFuncFunction)

fn (VisualShaderNodeColorFunc) get_function #

fn (s &VisualShaderNodeColorFunc) get_function() VisualShaderNodeColorFuncFunction

struct VisualShaderNodeColorOp #

struct VisualShaderNodeColorOp {
	VisualShaderNode
}

A [Color] operator to be used within the visual shader graph.

fn (VisualShaderNodeColorOp) to_variant #

fn (s &VisualShaderNodeColorOp) to_variant() Variant

fn (VisualShaderNodeColorOp) from_variant #

fn (mut s VisualShaderNodeColorOp) from_variant(variant &Variant)

fn (VisualShaderNodeColorOp) set_operator #

fn (s &VisualShaderNodeColorOp) set_operator(op VisualShaderNodeColorOpOperator)

fn (VisualShaderNodeColorOp) get_operator #

fn (s &VisualShaderNodeColorOp) get_operator() VisualShaderNodeColorOpOperator

struct VisualShaderNodeColorParameter #

struct VisualShaderNodeColorParameter {
	VisualShaderNodeParameter
}

A [Color] parameter to be used within the visual shader graph.

fn (VisualShaderNodeColorParameter) to_variant #

fn (s &VisualShaderNodeColorParameter) to_variant() Variant

fn (VisualShaderNodeColorParameter) from_variant #

fn (mut s VisualShaderNodeColorParameter) from_variant(variant &Variant)

fn (VisualShaderNodeColorParameter) set_default_value_enabled #

fn (s &VisualShaderNodeColorParameter) set_default_value_enabled(enabled bool)

fn (VisualShaderNodeColorParameter) is_default_value_enabled #

fn (s &VisualShaderNodeColorParameter) is_default_value_enabled() bool

fn (VisualShaderNodeColorParameter) set_default_value #

fn (s &VisualShaderNodeColorParameter) set_default_value(value Color)

fn (VisualShaderNodeColorParameter) get_default_value #

fn (s &VisualShaderNodeColorParameter) get_default_value() Color

struct VisualShaderNodeComment #

struct VisualShaderNodeComment {
	VisualShaderNodeFrame
}

Only exists for compatibility. Use [VisualShaderNodeFrame] as a replacement.

fn (VisualShaderNodeComment) to_variant #

fn (s &VisualShaderNodeComment) to_variant() Variant

fn (VisualShaderNodeComment) from_variant #

fn (mut s VisualShaderNodeComment) from_variant(variant &Variant)

fn (VisualShaderNodeComment) set_description #

fn (s &VisualShaderNodeComment) set_description(description string)

fn (VisualShaderNodeComment) get_description #

fn (s &VisualShaderNodeComment) get_description() string

struct VisualShaderNodeCompare #

struct VisualShaderNodeCompare {
	VisualShaderNode
}

A comparison function for common types within the visual shader graph.

fn (VisualShaderNodeCompare) to_variant #

fn (s &VisualShaderNodeCompare) to_variant() Variant

fn (VisualShaderNodeCompare) from_variant #

fn (mut s VisualShaderNodeCompare) from_variant(variant &Variant)

fn (VisualShaderNodeCompare) set_comparison_type #

fn (s &VisualShaderNodeCompare) set_comparison_type(gd_type VisualShaderNodeCompareComparisonType)

fn (VisualShaderNodeCompare) get_comparison_type #

fn (s &VisualShaderNodeCompare) get_comparison_type() VisualShaderNodeCompareComparisonType

fn (VisualShaderNodeCompare) set_function #

fn (s &VisualShaderNodeCompare) set_function(func VisualShaderNodeCompareFunction)

fn (VisualShaderNodeCompare) get_function #

fn (s &VisualShaderNodeCompare) get_function() VisualShaderNodeCompareFunction

fn (VisualShaderNodeCompare) set_condition #

fn (s &VisualShaderNodeCompare) set_condition(condition VisualShaderNodeCompareCondition)

fn (VisualShaderNodeCompare) get_condition #

fn (s &VisualShaderNodeCompare) get_condition() VisualShaderNodeCompareCondition

struct VisualShaderNodeConstant #

struct VisualShaderNodeConstant {
	VisualShaderNode
}

A base type for the constants within the visual shader graph.

fn (VisualShaderNodeConstant) to_variant #

fn (s &VisualShaderNodeConstant) to_variant() Variant

fn (VisualShaderNodeConstant) from_variant #

fn (mut s VisualShaderNodeConstant) from_variant(variant &Variant)

struct VisualShaderNodeCubemap #

struct VisualShaderNodeCubemap {
	VisualShaderNode
}

A [Cubemap] sampling node to be used within the visual shader graph.

fn (VisualShaderNodeCubemap) to_variant #

fn (s &VisualShaderNodeCubemap) to_variant() Variant

fn (VisualShaderNodeCubemap) from_variant #

fn (mut s VisualShaderNodeCubemap) from_variant(variant &Variant)

fn (VisualShaderNodeCubemap) set_source #

fn (s &VisualShaderNodeCubemap) set_source(value VisualShaderNodeCubemapSource)

fn (VisualShaderNodeCubemap) get_source #

fn (s &VisualShaderNodeCubemap) get_source() VisualShaderNodeCubemapSource

fn (VisualShaderNodeCubemap) set_cube_map #

fn (s &VisualShaderNodeCubemap) set_cube_map(value TextureLayered)

fn (VisualShaderNodeCubemap) get_cube_map #

fn (s &VisualShaderNodeCubemap) get_cube_map() TextureLayered

fn (VisualShaderNodeCubemap) set_texture_type #

fn (s &VisualShaderNodeCubemap) set_texture_type(value VisualShaderNodeCubemapTextureType)

fn (VisualShaderNodeCubemap) get_texture_type #

fn (s &VisualShaderNodeCubemap) get_texture_type() VisualShaderNodeCubemapTextureType

struct VisualShaderNodeCubemapParameter #

struct VisualShaderNodeCubemapParameter {
	VisualShaderNodeTextureParameter
}

A [Cubemap] parameter node to be used within the visual shader graph.

fn (VisualShaderNodeCubemapParameter) to_variant #

fn (s &VisualShaderNodeCubemapParameter) to_variant() Variant

fn (VisualShaderNodeCubemapParameter) from_variant #

fn (mut s VisualShaderNodeCubemapParameter) from_variant(variant &Variant)

struct VisualShaderNodeCurveTexture #

struct VisualShaderNodeCurveTexture {
	VisualShaderNodeResizableBase
}

Performs a [CurveTexture] lookup within the visual shader graph.

fn (VisualShaderNodeCurveTexture) to_variant #

fn (s &VisualShaderNodeCurveTexture) to_variant() Variant

fn (VisualShaderNodeCurveTexture) from_variant #

fn (mut s VisualShaderNodeCurveTexture) from_variant(variant &Variant)

fn (VisualShaderNodeCurveTexture) set_texture #

fn (s &VisualShaderNodeCurveTexture) set_texture(texture CurveTexture)

fn (VisualShaderNodeCurveTexture) get_texture #

fn (s &VisualShaderNodeCurveTexture) get_texture() CurveTexture

struct VisualShaderNodeCurveXYZTexture #

struct VisualShaderNodeCurveXYZTexture {
	VisualShaderNodeResizableBase
}

Performs a [CurveXYZTexture] lookup within the visual shader graph.

fn (VisualShaderNodeCurveXYZTexture) to_variant #

fn (s &VisualShaderNodeCurveXYZTexture) to_variant() Variant

fn (VisualShaderNodeCurveXYZTexture) from_variant #

fn (mut s VisualShaderNodeCurveXYZTexture) from_variant(variant &Variant)

fn (VisualShaderNodeCurveXYZTexture) set_texture #

fn (s &VisualShaderNodeCurveXYZTexture) set_texture(texture CurveXYZTexture)

fn (VisualShaderNodeCurveXYZTexture) get_texture #

fn (s &VisualShaderNodeCurveXYZTexture) get_texture() CurveXYZTexture

struct VisualShaderNodeCustom #

struct VisualShaderNodeCustom {
	VisualShaderNode
}

Virtual class to define custom [VisualShaderNode]s for use in the Visual Shader Editor.

fn (VisualShaderNodeCustom) to_variant #

fn (s &VisualShaderNodeCustom) to_variant() Variant

fn (VisualShaderNodeCustom) from_variant #

fn (mut s VisualShaderNodeCustom) from_variant(variant &Variant)

fn (VisualShaderNodeCustom) gd_get_name #

fn (s &VisualShaderNodeCustom) gd_get_name() string

Override this method to define the name of the associated custom node in the Visual Shader Editor's members dialog and graph. Defining this method is [b]optional[/b], but recommended. If not overridden, the node will be named as "Unnamed".

fn (VisualShaderNodeCustom) gd_get_description #

fn (s &VisualShaderNodeCustom) gd_get_description() string

Override this method to define the description of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b].

fn (VisualShaderNodeCustom) gd_get_category #

fn (s &VisualShaderNodeCustom) gd_get_category() string

Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may look like "MyGame/MyFunctions/Noise". Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category.

fn (VisualShaderNodeCustom) gd_get_return_icon_type #

fn (s &VisualShaderNodeCustom) gd_get_return_icon_type() VisualShaderNodePortType

Override this method to define the return icon of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b]. If not overridden, no return icon is shown.

fn (VisualShaderNodeCustom) gd_get_input_port_count #

fn (s &VisualShaderNodeCustom) gd_get_input_port_count() i64

Override this method to define the number of input ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no input ports.

fn (VisualShaderNodeCustom) gd_get_input_port_type #

fn (s &VisualShaderNodeCustom) gd_get_input_port_type(port i64) VisualShaderNodePortType

Override this method to define the returned type of each input port of the associated custom node. Defining this method is [b]optional[/b], but recommended. If not overridden, input ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type.

fn (VisualShaderNodeCustom) gd_get_input_port_name #

fn (s &VisualShaderNodeCustom) gd_get_input_port_name(port i64) string

Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the input_vars array in [method _get_code]. Defining this method is [b]optional[/b], but recommended. If not overridden, input ports are named as "in" + str(port).

fn (VisualShaderNodeCustom) gd_get_input_port_default_value #

fn (s &VisualShaderNodeCustom) gd_get_input_port_default_value(port i64) Variant

Override this method to define the default value for the specified input port. Prefer use this over [method VisualShaderNode.set_input_port_default_value]. Defining this method is [b]required[/b]. If not overridden, the node has no default values for their input ports.

fn (VisualShaderNodeCustom) gd_get_default_input_port #

fn (s &VisualShaderNodeCustom) gd_get_default_input_port(gd_type VisualShaderNodePortType) i64

Override this method to define the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph. Defining this method is [b]optional[/b]. If not overridden, the connection will be created to the first valid port.

fn (VisualShaderNodeCustom) gd_get_output_port_count #

fn (s &VisualShaderNodeCustom) gd_get_output_port_count() i64

Override this method to define the number of output ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no output ports.

fn (VisualShaderNodeCustom) gd_get_output_port_type #

fn (s &VisualShaderNodeCustom) gd_get_output_port_type(port i64) VisualShaderNodePortType

Override this method to define the returned type of each output port of the associated custom node. Defining this method is [b]optional[/b], but recommended. If not overridden, output ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type.

fn (VisualShaderNodeCustom) gd_get_output_port_name #

fn (s &VisualShaderNodeCustom) gd_get_output_port_name(port i64) string

Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the output_vars array in [method _get_code]. Defining this method is [b]optional[/b], but recommended. If not overridden, output ports are named as "out" + str(port).

fn (VisualShaderNodeCustom) gd_get_property_count #

fn (s &VisualShaderNodeCustom) gd_get_property_count() i64

Override this method to define the number of the properties. Defining this method is [b]optional[/b].

fn (VisualShaderNodeCustom) gd_get_property_name #

fn (s &VisualShaderNodeCustom) gd_get_property_name(index i64) string

Override this method to define the names of the property of the associated custom node. Defining this method is [b]optional[/b].

fn (VisualShaderNodeCustom) gd_get_property_default_index #

fn (s &VisualShaderNodeCustom) gd_get_property_default_index(index i64) i64

Override this method to define the default index of the property of the associated custom node. Defining this method is [b]optional[/b].

fn (VisualShaderNodeCustom) gd_get_property_options #

fn (s &VisualShaderNodeCustom) gd_get_property_options(index i64) PackedStringArray

Override this method to define the options inside the drop-down list property of the associated custom node. Defining this method is [b]optional[/b].

fn (VisualShaderNodeCustom) gd_get_code #

fn (s &VisualShaderNodeCustom) gd_get_code(input_vars Array, output_vars Array, mode ShaderMode, gd_type VisualShaderType) string

Override this method to define the actual shader code of the associated custom node. The shader code should be returned as a string, which can have multiple lines (the """ multiline string construct can be used for convenience). The [param input_vars] and [param output_vars] arrays contain the string names of the various input and output variables, as defined by _get_input_* and _get_output_* virtual methods in this class. The output ports can be assigned values in the shader code. For example, return output_vars[0] + " = " + input_vars[0] + ";". You can customize the generated code based on the shader [param mode] and/or [param type]. Defining this method is [b]required[/b].

fn (VisualShaderNodeCustom) gd_get_func_code #

fn (s &VisualShaderNodeCustom) gd_get_func_code(mode ShaderMode, gd_type VisualShaderType) string

Override this method to add a shader code to the beginning of each shader function (once). The shader code should be returned as a string, which can have multiple lines (the """ multiline string construct can be used for convenience). If there are multiple custom nodes of different types which use this feature the order of each insertion is undefined. You can customize the generated code based on the shader [param mode] and/or [param type]. Defining this method is [b]optional[/b].

fn (VisualShaderNodeCustom) gd_get_global_code #

fn (s &VisualShaderNodeCustom) gd_get_global_code(mode ShaderMode) string

Override this method to add shader code on top of the global shader, to define your own standard library of reusable methods, varyings, constants, uniforms, etc. The shader code should be returned as a string, which can have multiple lines (the """ multiline string construct can be used for convenience). Be careful with this functionality as it can cause name conflicts with other custom nodes, so be sure to give the defined entities unique names. You can customize the generated code based on the shader [param mode]. Defining this method is [b]optional[/b].

fn (VisualShaderNodeCustom) gd_is_highend #

fn (s &VisualShaderNodeCustom) gd_is_highend() bool

Override this method to enable high-end mark in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b]. If not overridden, it's false.

fn (VisualShaderNodeCustom) gd_is_available #

fn (s &VisualShaderNodeCustom) gd_is_available(mode ShaderMode, gd_type VisualShaderType) bool

Override this method to prevent the node to be visible in the member dialog for the certain [param mode] and/or [param type]. Defining this method is [b]optional[/b]. If not overridden, it's true.

fn (VisualShaderNodeCustom) get_option_index #

fn (s &VisualShaderNodeCustom) get_option_index(option i64) i64

Returns the selected index of the drop-down list option within a graph. You may use this function to define the specific behavior in the [method _get_code] or [method _get_global_code].

struct VisualShaderNodeDerivativeFunc #

struct VisualShaderNodeDerivativeFunc {
	VisualShaderNode
}

Calculates a derivative within the visual shader graph.

fn (VisualShaderNodeDerivativeFunc) to_variant #

fn (s &VisualShaderNodeDerivativeFunc) to_variant() Variant

fn (VisualShaderNodeDerivativeFunc) from_variant #

fn (mut s VisualShaderNodeDerivativeFunc) from_variant(variant &Variant)

fn (VisualShaderNodeDerivativeFunc) set_op_type #

fn (s &VisualShaderNodeDerivativeFunc) set_op_type(gd_type VisualShaderNodeDerivativeFuncOpType)

fn (VisualShaderNodeDerivativeFunc) get_op_type #

fn (s &VisualShaderNodeDerivativeFunc) get_op_type() VisualShaderNodeDerivativeFuncOpType

fn (VisualShaderNodeDerivativeFunc) set_function #

fn (s &VisualShaderNodeDerivativeFunc) set_function(func VisualShaderNodeDerivativeFuncFunction)

fn (VisualShaderNodeDerivativeFunc) get_function #

fn (s &VisualShaderNodeDerivativeFunc) get_function() VisualShaderNodeDerivativeFuncFunction

fn (VisualShaderNodeDerivativeFunc) set_precision #

fn (s &VisualShaderNodeDerivativeFunc) set_precision(precision VisualShaderNodeDerivativeFuncPrecision)

fn (VisualShaderNodeDerivativeFunc) get_precision #

fn (s &VisualShaderNodeDerivativeFunc) get_precision() VisualShaderNodeDerivativeFuncPrecision

struct VisualShaderNodeDeterminant #

struct VisualShaderNodeDeterminant {
	VisualShaderNode
}

Calculates the determinant of a [Transform3D] within the visual shader graph.

fn (VisualShaderNodeDeterminant) to_variant #

fn (s &VisualShaderNodeDeterminant) to_variant() Variant

fn (VisualShaderNodeDeterminant) from_variant #

fn (mut s VisualShaderNodeDeterminant) from_variant(variant &Variant)

struct VisualShaderNodeDistanceFade #

struct VisualShaderNodeDistanceFade {
	VisualShaderNode
}

A visual shader node representing distance fade effect.

fn (VisualShaderNodeDistanceFade) to_variant #

fn (s &VisualShaderNodeDistanceFade) to_variant() Variant

fn (VisualShaderNodeDistanceFade) from_variant #

fn (mut s VisualShaderNodeDistanceFade) from_variant(variant &Variant)

struct VisualShaderNodeDotProduct #

struct VisualShaderNodeDotProduct {
	VisualShaderNode
}

Calculates a dot product of two vectors within the visual shader graph.

fn (VisualShaderNodeDotProduct) to_variant #

fn (s &VisualShaderNodeDotProduct) to_variant() Variant

fn (VisualShaderNodeDotProduct) from_variant #

fn (mut s VisualShaderNodeDotProduct) from_variant(variant &Variant)

struct VisualShaderNodeExpression #

struct VisualShaderNodeExpression {
	VisualShaderNodeGroupBase
}

A custom visual shader graph expression written in Godot Shading Language.

fn (VisualShaderNodeExpression) to_variant #

fn (s &VisualShaderNodeExpression) to_variant() Variant

fn (VisualShaderNodeExpression) from_variant #

fn (mut s VisualShaderNodeExpression) from_variant(variant &Variant)

fn (VisualShaderNodeExpression) set_expression #

fn (s &VisualShaderNodeExpression) set_expression(expression string)

fn (VisualShaderNodeExpression) get_expression #

fn (s &VisualShaderNodeExpression) get_expression() string

struct VisualShaderNodeFaceForward #

struct VisualShaderNodeFaceForward {
	VisualShaderNodeVectorBase
}

Returns the vector that points in the same direction as a reference vector within the visual shader graph.

fn (VisualShaderNodeFaceForward) to_variant #

fn (s &VisualShaderNodeFaceForward) to_variant() Variant

fn (VisualShaderNodeFaceForward) from_variant #

fn (mut s VisualShaderNodeFaceForward) from_variant(variant &Variant)

struct VisualShaderNodeFloatConstant #

struct VisualShaderNodeFloatConstant {
	VisualShaderNodeConstant
}

A scalar floating-point constant to be used within the visual shader graph.

fn (VisualShaderNodeFloatConstant) to_variant #

fn (s &VisualShaderNodeFloatConstant) to_variant() Variant

fn (VisualShaderNodeFloatConstant) from_variant #

fn (mut s VisualShaderNodeFloatConstant) from_variant(variant &Variant)

fn (VisualShaderNodeFloatConstant) set_constant #

fn (s &VisualShaderNodeFloatConstant) set_constant(constant f64)

fn (VisualShaderNodeFloatConstant) get_constant #

fn (s &VisualShaderNodeFloatConstant) get_constant() f64

struct VisualShaderNodeFloatFunc #

struct VisualShaderNodeFloatFunc {
	VisualShaderNode
}

A scalar floating-point function to be used within the visual shader graph.

fn (VisualShaderNodeFloatFunc) to_variant #

fn (s &VisualShaderNodeFloatFunc) to_variant() Variant

fn (VisualShaderNodeFloatFunc) from_variant #

fn (mut s VisualShaderNodeFloatFunc) from_variant(variant &Variant)

fn (VisualShaderNodeFloatFunc) set_function #

fn (s &VisualShaderNodeFloatFunc) set_function(func VisualShaderNodeFloatFuncFunction)

fn (VisualShaderNodeFloatFunc) get_function #

fn (s &VisualShaderNodeFloatFunc) get_function() VisualShaderNodeFloatFuncFunction

struct VisualShaderNodeFloatOp #

struct VisualShaderNodeFloatOp {
	VisualShaderNode
}

A floating-point scalar operator to be used within the visual shader graph.

fn (VisualShaderNodeFloatOp) to_variant #

fn (s &VisualShaderNodeFloatOp) to_variant() Variant

fn (VisualShaderNodeFloatOp) from_variant #

fn (mut s VisualShaderNodeFloatOp) from_variant(variant &Variant)

fn (VisualShaderNodeFloatOp) set_operator #

fn (s &VisualShaderNodeFloatOp) set_operator(op VisualShaderNodeFloatOpOperator)

fn (VisualShaderNodeFloatOp) get_operator #

fn (s &VisualShaderNodeFloatOp) get_operator() VisualShaderNodeFloatOpOperator

struct VisualShaderNodeFloatParameter #

struct VisualShaderNodeFloatParameter {
	VisualShaderNodeParameter
}

A scalar float parameter to be used within the visual shader graph.

fn (VisualShaderNodeFloatParameter) to_variant #

fn (s &VisualShaderNodeFloatParameter) to_variant() Variant

fn (VisualShaderNodeFloatParameter) from_variant #

fn (mut s VisualShaderNodeFloatParameter) from_variant(variant &Variant)

fn (VisualShaderNodeFloatParameter) set_hint #

fn (s &VisualShaderNodeFloatParameter) set_hint(hint VisualShaderNodeFloatParameterHint)

fn (VisualShaderNodeFloatParameter) get_hint #

fn (s &VisualShaderNodeFloatParameter) get_hint() VisualShaderNodeFloatParameterHint

fn (VisualShaderNodeFloatParameter) set_min #

fn (s &VisualShaderNodeFloatParameter) set_min(value f64)

fn (VisualShaderNodeFloatParameter) get_min #

fn (s &VisualShaderNodeFloatParameter) get_min() f64

fn (VisualShaderNodeFloatParameter) set_max #

fn (s &VisualShaderNodeFloatParameter) set_max(value f64)

fn (VisualShaderNodeFloatParameter) get_max #

fn (s &VisualShaderNodeFloatParameter) get_max() f64

fn (VisualShaderNodeFloatParameter) set_step #

fn (s &VisualShaderNodeFloatParameter) set_step(value f64)

fn (VisualShaderNodeFloatParameter) get_step #

fn (s &VisualShaderNodeFloatParameter) get_step() f64

fn (VisualShaderNodeFloatParameter) set_default_value_enabled #

fn (s &VisualShaderNodeFloatParameter) set_default_value_enabled(enabled bool)

fn (VisualShaderNodeFloatParameter) is_default_value_enabled #

fn (s &VisualShaderNodeFloatParameter) is_default_value_enabled() bool

fn (VisualShaderNodeFloatParameter) set_default_value #

fn (s &VisualShaderNodeFloatParameter) set_default_value(value f64)

fn (VisualShaderNodeFloatParameter) get_default_value #

fn (s &VisualShaderNodeFloatParameter) get_default_value() f64

struct VisualShaderNodeFrame #

struct VisualShaderNodeFrame {
	VisualShaderNodeResizableBase
}

A frame other visual shader nodes can be attached to for better organization.

fn (VisualShaderNodeFrame) to_variant #

fn (s &VisualShaderNodeFrame) to_variant() Variant

fn (VisualShaderNodeFrame) from_variant #

fn (mut s VisualShaderNodeFrame) from_variant(variant &Variant)

fn (VisualShaderNodeFrame) set_title #

fn (s &VisualShaderNodeFrame) set_title(title string)

fn (VisualShaderNodeFrame) get_title #

fn (s &VisualShaderNodeFrame) get_title() string

fn (VisualShaderNodeFrame) set_tint_color_enabled #

fn (s &VisualShaderNodeFrame) set_tint_color_enabled(enable bool)

fn (VisualShaderNodeFrame) is_tint_color_enabled #

fn (s &VisualShaderNodeFrame) is_tint_color_enabled() bool

fn (VisualShaderNodeFrame) set_tint_color #

fn (s &VisualShaderNodeFrame) set_tint_color(color Color)

fn (VisualShaderNodeFrame) get_tint_color #

fn (s &VisualShaderNodeFrame) get_tint_color() Color

fn (VisualShaderNodeFrame) set_autoshrink_enabled #

fn (s &VisualShaderNodeFrame) set_autoshrink_enabled(enable bool)

fn (VisualShaderNodeFrame) is_autoshrink_enabled #

fn (s &VisualShaderNodeFrame) is_autoshrink_enabled() bool

fn (VisualShaderNodeFrame) add_attached_node #

fn (s &VisualShaderNodeFrame) add_attached_node(node i64)

Adds a node to the list of nodes attached to the frame. Should not be called directly, use the [method VisualShader.attach_node_to_frame] method instead.

fn (VisualShaderNodeFrame) remove_attached_node #

fn (s &VisualShaderNodeFrame) remove_attached_node(node i64)

Removes a node from the list of nodes attached to the frame. Should not be called directly, use the [method VisualShader.detach_node_from_frame] method instead.

fn (VisualShaderNodeFrame) set_attached_nodes #

fn (s &VisualShaderNodeFrame) set_attached_nodes(attached_nodes PackedInt32Array)

fn (VisualShaderNodeFrame) get_attached_nodes #

fn (s &VisualShaderNodeFrame) get_attached_nodes() PackedInt32Array

struct VisualShaderNodeFresnel #

struct VisualShaderNodeFresnel {
	VisualShaderNode
}

A Fresnel effect to be used within the visual shader graph.

fn (VisualShaderNodeFresnel) to_variant #

fn (s &VisualShaderNodeFresnel) to_variant() Variant

fn (VisualShaderNodeFresnel) from_variant #

fn (mut s VisualShaderNodeFresnel) from_variant(variant &Variant)

struct VisualShaderNodeGlobalExpression #

struct VisualShaderNodeGlobalExpression {
	VisualShaderNodeExpression
}

A custom global visual shader graph expression written in Godot Shading Language.

fn (VisualShaderNodeGlobalExpression) to_variant #

fn (s &VisualShaderNodeGlobalExpression) to_variant() Variant

fn (VisualShaderNodeGlobalExpression) from_variant #

fn (mut s VisualShaderNodeGlobalExpression) from_variant(variant &Variant)

struct VisualShaderNodeGroupBase #

struct VisualShaderNodeGroupBase {
	VisualShaderNodeResizableBase
}

Base class for a family of nodes with variable number of input and output ports within the visual shader graph.

fn (VisualShaderNodeGroupBase) to_variant #

fn (s &VisualShaderNodeGroupBase) to_variant() Variant

fn (VisualShaderNodeGroupBase) from_variant #

fn (mut s VisualShaderNodeGroupBase) from_variant(variant &Variant)

fn (VisualShaderNodeGroupBase) set_inputs #

fn (s &VisualShaderNodeGroupBase) set_inputs(inputs string)

Defines all input ports using a [String] formatted as a colon-separated list: id,type,name; (see [method add_input_port]).

fn (VisualShaderNodeGroupBase) get_inputs #

fn (s &VisualShaderNodeGroupBase) get_inputs() string

Returns a [String] description of the input ports as a colon-separated list using the format id,type,name; (see [method add_input_port]).

fn (VisualShaderNodeGroupBase) set_outputs #

fn (s &VisualShaderNodeGroupBase) set_outputs(outputs string)

Defines all output ports using a [String] formatted as a colon-separated list: id,type,name; (see [method add_output_port]).

fn (VisualShaderNodeGroupBase) get_outputs #

fn (s &VisualShaderNodeGroupBase) get_outputs() string

Returns a [String] description of the output ports as a colon-separated list using the format id,type,name; (see [method add_output_port]).

fn (VisualShaderNodeGroupBase) is_valid_port_name #

fn (s &VisualShaderNodeGroupBase) is_valid_port_name(name string) bool

Returns true if the specified port name does not override an existed port name and is valid within the shader.

fn (VisualShaderNodeGroupBase) add_input_port #

fn (s &VisualShaderNodeGroupBase) add_input_port(id i64, gd_type i64, name string)

Adds an input port with the specified [param type] (see [enum VisualShaderNode.PortType]) and [param name].

fn (VisualShaderNodeGroupBase) remove_input_port #

fn (s &VisualShaderNodeGroupBase) remove_input_port(id i64)

Removes the specified input port.

fn (VisualShaderNodeGroupBase) get_input_port_count #

fn (s &VisualShaderNodeGroupBase) get_input_port_count() i64

Returns the number of input ports in use. Alternative for [method get_free_input_port_id].

fn (VisualShaderNodeGroupBase) has_input_port #

fn (s &VisualShaderNodeGroupBase) has_input_port(id i64) bool

Returns true if the specified input port exists.

fn (VisualShaderNodeGroupBase) clear_input_ports #

fn (s &VisualShaderNodeGroupBase) clear_input_ports()

Removes all previously specified input ports.

fn (VisualShaderNodeGroupBase) add_output_port #

fn (s &VisualShaderNodeGroupBase) add_output_port(id i64, gd_type i64, name string)

Adds an output port with the specified [param type] (see [enum VisualShaderNode.PortType]) and [param name].

fn (VisualShaderNodeGroupBase) remove_output_port #

fn (s &VisualShaderNodeGroupBase) remove_output_port(id i64)

Removes the specified output port.

fn (VisualShaderNodeGroupBase) get_output_port_count #

fn (s &VisualShaderNodeGroupBase) get_output_port_count() i64

Returns the number of output ports in use. Alternative for [method get_free_output_port_id].

fn (VisualShaderNodeGroupBase) has_output_port #

fn (s &VisualShaderNodeGroupBase) has_output_port(id i64) bool

Returns true if the specified output port exists.

fn (VisualShaderNodeGroupBase) clear_output_ports #

fn (s &VisualShaderNodeGroupBase) clear_output_ports()

Removes all previously specified output ports.

fn (VisualShaderNodeGroupBase) set_input_port_name #

fn (s &VisualShaderNodeGroupBase) set_input_port_name(id i64, name string)

Renames the specified input port.

fn (VisualShaderNodeGroupBase) set_input_port_type #

fn (s &VisualShaderNodeGroupBase) set_input_port_type(id i64, gd_type i64)

Sets the specified input port's type (see [enum VisualShaderNode.PortType]).

fn (VisualShaderNodeGroupBase) set_output_port_name #

fn (s &VisualShaderNodeGroupBase) set_output_port_name(id i64, name string)

Renames the specified output port.

fn (VisualShaderNodeGroupBase) set_output_port_type #

fn (s &VisualShaderNodeGroupBase) set_output_port_type(id i64, gd_type i64)

Sets the specified output port's type (see [enum VisualShaderNode.PortType]).

fn (VisualShaderNodeGroupBase) get_free_input_port_id #

fn (s &VisualShaderNodeGroupBase) get_free_input_port_id() i64

Returns a free input port ID which can be used in [method add_input_port].

fn (VisualShaderNodeGroupBase) get_free_output_port_id #

fn (s &VisualShaderNodeGroupBase) get_free_output_port_id() i64

Returns a free output port ID which can be used in [method add_output_port].

struct VisualShaderNodeIf #

struct VisualShaderNodeIf {
	VisualShaderNode
}

Outputs a 3D vector based on the result of a floating-point comparison within the visual shader graph.

fn (VisualShaderNodeIf) to_variant #

fn (s &VisualShaderNodeIf) to_variant() Variant

fn (VisualShaderNodeIf) from_variant #

fn (mut s VisualShaderNodeIf) from_variant(variant &Variant)

struct VisualShaderNodeInput #

struct VisualShaderNodeInput {
	VisualShaderNode
}

Represents the input shader parameter within the visual shader graph.

fn (VisualShaderNodeInput) to_variant #

fn (s &VisualShaderNodeInput) to_variant() Variant

fn (VisualShaderNodeInput) from_variant #

fn (mut s VisualShaderNodeInput) from_variant(variant &Variant)

fn (VisualShaderNodeInput) set_input_name #

fn (s &VisualShaderNodeInput) set_input_name(name string)

fn (VisualShaderNodeInput) get_input_name #

fn (s &VisualShaderNodeInput) get_input_name() string

fn (VisualShaderNodeInput) get_input_real_name #

fn (s &VisualShaderNodeInput) get_input_real_name() string

Returns a translated name of the current constant in the Godot Shader Language. E.g. "ALBEDO" if the [member input_name] equal to "albedo".

struct VisualShaderNodeIntConstant #

struct VisualShaderNodeIntConstant {
	VisualShaderNodeConstant
}

A scalar integer constant to be used within the visual shader graph.

fn (VisualShaderNodeIntConstant) to_variant #

fn (s &VisualShaderNodeIntConstant) to_variant() Variant

fn (VisualShaderNodeIntConstant) from_variant #

fn (mut s VisualShaderNodeIntConstant) from_variant(variant &Variant)

fn (VisualShaderNodeIntConstant) set_constant #

fn (s &VisualShaderNodeIntConstant) set_constant(constant i64)

fn (VisualShaderNodeIntConstant) get_constant #

fn (s &VisualShaderNodeIntConstant) get_constant() i64

struct VisualShaderNodeIntFunc #

struct VisualShaderNodeIntFunc {
	VisualShaderNode
}

A scalar integer function to be used within the visual shader graph.

fn (VisualShaderNodeIntFunc) to_variant #

fn (s &VisualShaderNodeIntFunc) to_variant() Variant

fn (VisualShaderNodeIntFunc) from_variant #

fn (mut s VisualShaderNodeIntFunc) from_variant(variant &Variant)

fn (VisualShaderNodeIntFunc) set_function #

fn (s &VisualShaderNodeIntFunc) set_function(func VisualShaderNodeIntFuncFunction)

fn (VisualShaderNodeIntFunc) get_function #

fn (s &VisualShaderNodeIntFunc) get_function() VisualShaderNodeIntFuncFunction

struct VisualShaderNodeIntOp #

struct VisualShaderNodeIntOp {
	VisualShaderNode
}

An integer scalar operator to be used within the visual shader graph.

fn (VisualShaderNodeIntOp) to_variant #

fn (s &VisualShaderNodeIntOp) to_variant() Variant

fn (VisualShaderNodeIntOp) from_variant #

fn (mut s VisualShaderNodeIntOp) from_variant(variant &Variant)

fn (VisualShaderNodeIntOp) set_operator #

fn (s &VisualShaderNodeIntOp) set_operator(op VisualShaderNodeIntOpOperator)

fn (VisualShaderNodeIntOp) get_operator #

fn (s &VisualShaderNodeIntOp) get_operator() VisualShaderNodeIntOpOperator

struct VisualShaderNodeIntParameter #

struct VisualShaderNodeIntParameter {
	VisualShaderNodeParameter
}

A visual shader node for shader parameter (uniform) of type [int].

fn (VisualShaderNodeIntParameter) to_variant #

fn (s &VisualShaderNodeIntParameter) to_variant() Variant

fn (VisualShaderNodeIntParameter) from_variant #

fn (mut s VisualShaderNodeIntParameter) from_variant(variant &Variant)

fn (VisualShaderNodeIntParameter) set_hint #

fn (s &VisualShaderNodeIntParameter) set_hint(hint VisualShaderNodeIntParameterHint)

fn (VisualShaderNodeIntParameter) get_hint #

fn (s &VisualShaderNodeIntParameter) get_hint() VisualShaderNodeIntParameterHint

fn (VisualShaderNodeIntParameter) set_min #

fn (s &VisualShaderNodeIntParameter) set_min(value i64)

fn (VisualShaderNodeIntParameter) get_min #

fn (s &VisualShaderNodeIntParameter) get_min() i64

fn (VisualShaderNodeIntParameter) set_max #

fn (s &VisualShaderNodeIntParameter) set_max(value i64)

fn (VisualShaderNodeIntParameter) get_max #

fn (s &VisualShaderNodeIntParameter) get_max() i64

fn (VisualShaderNodeIntParameter) set_step #

fn (s &VisualShaderNodeIntParameter) set_step(value i64)

fn (VisualShaderNodeIntParameter) get_step #

fn (s &VisualShaderNodeIntParameter) get_step() i64

fn (VisualShaderNodeIntParameter) set_enum_names #

fn (s &VisualShaderNodeIntParameter) set_enum_names(names PackedStringArray)

fn (VisualShaderNodeIntParameter) get_enum_names #

fn (s &VisualShaderNodeIntParameter) get_enum_names() PackedStringArray

fn (VisualShaderNodeIntParameter) set_default_value_enabled #

fn (s &VisualShaderNodeIntParameter) set_default_value_enabled(enabled bool)

fn (VisualShaderNodeIntParameter) is_default_value_enabled #

fn (s &VisualShaderNodeIntParameter) is_default_value_enabled() bool

fn (VisualShaderNodeIntParameter) set_default_value #

fn (s &VisualShaderNodeIntParameter) set_default_value(value i64)

fn (VisualShaderNodeIntParameter) get_default_value #

fn (s &VisualShaderNodeIntParameter) get_default_value() i64

struct VisualShaderNodeIs #

struct VisualShaderNodeIs {
	VisualShaderNode
}

A boolean comparison operator to be used within the visual shader graph.

fn (VisualShaderNodeIs) to_variant #

fn (s &VisualShaderNodeIs) to_variant() Variant

fn (VisualShaderNodeIs) from_variant #

fn (mut s VisualShaderNodeIs) from_variant(variant &Variant)

fn (VisualShaderNodeIs) set_function #

fn (s &VisualShaderNodeIs) set_function(func VisualShaderNodeIsFunction)

fn (VisualShaderNodeIs) get_function #

fn (s &VisualShaderNodeIs) get_function() VisualShaderNodeIsFunction

struct VisualShaderNodeLinearSceneDepth #

struct VisualShaderNodeLinearSceneDepth {
	VisualShaderNode
}

A visual shader node that returns the depth value of the DEPTH_TEXTURE node in a linear space.

fn (VisualShaderNodeLinearSceneDepth) to_variant #

fn (s &VisualShaderNodeLinearSceneDepth) to_variant() Variant

fn (VisualShaderNodeLinearSceneDepth) from_variant #

fn (mut s VisualShaderNodeLinearSceneDepth) from_variant(variant &Variant)

struct VisualShaderNodeMix #

struct VisualShaderNodeMix {
	VisualShaderNode
}

Linearly interpolates between two values within the visual shader graph.

fn (VisualShaderNodeMix) to_variant #

fn (s &VisualShaderNodeMix) to_variant() Variant

fn (VisualShaderNodeMix) from_variant #

fn (mut s VisualShaderNodeMix) from_variant(variant &Variant)

fn (VisualShaderNodeMix) set_op_type #

fn (s &VisualShaderNodeMix) set_op_type(op_type VisualShaderNodeMixOpType)

fn (VisualShaderNodeMix) get_op_type #

fn (s &VisualShaderNodeMix) get_op_type() VisualShaderNodeMixOpType

struct VisualShaderNodeMultiplyAdd #

struct VisualShaderNodeMultiplyAdd {
	VisualShaderNode
}

Performs a fused multiply-add operation within the visual shader graph.

fn (VisualShaderNodeMultiplyAdd) to_variant #

fn (s &VisualShaderNodeMultiplyAdd) to_variant() Variant

fn (VisualShaderNodeMultiplyAdd) from_variant #

fn (mut s VisualShaderNodeMultiplyAdd) from_variant(variant &Variant)

fn (VisualShaderNodeMultiplyAdd) set_op_type #

fn (s &VisualShaderNodeMultiplyAdd) set_op_type(gd_type VisualShaderNodeMultiplyAddOpType)

fn (VisualShaderNodeMultiplyAdd) get_op_type #

fn (s &VisualShaderNodeMultiplyAdd) get_op_type() VisualShaderNodeMultiplyAddOpType

struct VisualShaderNodeOuterProduct #

struct VisualShaderNodeOuterProduct {
	VisualShaderNode
}

Calculates an outer product of two vectors within the visual shader graph.

fn (VisualShaderNodeOuterProduct) to_variant #

fn (s &VisualShaderNodeOuterProduct) to_variant() Variant

fn (VisualShaderNodeOuterProduct) from_variant #

fn (mut s VisualShaderNodeOuterProduct) from_variant(variant &Variant)

struct VisualShaderNodeOutput #

struct VisualShaderNodeOutput {
	VisualShaderNode
}

Represents the output shader parameters within the visual shader graph.

fn (VisualShaderNodeOutput) to_variant #

fn (s &VisualShaderNodeOutput) to_variant() Variant

fn (VisualShaderNodeOutput) from_variant #

fn (mut s VisualShaderNodeOutput) from_variant(variant &Variant)

struct VisualShaderNodeParameter #

struct VisualShaderNodeParameter {
	VisualShaderNode
}

A base type for the parameters within the visual shader graph.

fn (VisualShaderNodeParameter) to_variant #

fn (s &VisualShaderNodeParameter) to_variant() Variant

fn (VisualShaderNodeParameter) from_variant #

fn (mut s VisualShaderNodeParameter) from_variant(variant &Variant)

fn (VisualShaderNodeParameter) set_parameter_name #

fn (s &VisualShaderNodeParameter) set_parameter_name(name string)

fn (VisualShaderNodeParameter) get_parameter_name #

fn (s &VisualShaderNodeParameter) get_parameter_name() string

fn (VisualShaderNodeParameter) set_qualifier #

fn (s &VisualShaderNodeParameter) set_qualifier(qualifier VisualShaderNodeParameterQualifier)

fn (VisualShaderNodeParameter) get_qualifier #

fn (s &VisualShaderNodeParameter) get_qualifier() VisualShaderNodeParameterQualifier

struct VisualShaderNodeParameterRef #

struct VisualShaderNodeParameterRef {
	VisualShaderNode
}

A reference to an existing [VisualShaderNodeParameter].

fn (VisualShaderNodeParameterRef) to_variant #

fn (s &VisualShaderNodeParameterRef) to_variant() Variant

fn (VisualShaderNodeParameterRef) from_variant #

fn (mut s VisualShaderNodeParameterRef) from_variant(variant &Variant)

fn (VisualShaderNodeParameterRef) set_parameter_name #

fn (s &VisualShaderNodeParameterRef) set_parameter_name(name string)

fn (VisualShaderNodeParameterRef) get_parameter_name #

fn (s &VisualShaderNodeParameterRef) get_parameter_name() string

struct VisualShaderNodeParticleAccelerator #

struct VisualShaderNodeParticleAccelerator {
	VisualShaderNode
}

A visual shader node that accelerates particles.

fn (VisualShaderNodeParticleAccelerator) to_variant #

fn (s &VisualShaderNodeParticleAccelerator) to_variant() Variant

fn (VisualShaderNodeParticleAccelerator) from_variant #

fn (mut s VisualShaderNodeParticleAccelerator) from_variant(variant &Variant)

fn (VisualShaderNodeParticleAccelerator) set_mode #

fn (s &VisualShaderNodeParticleAccelerator) set_mode(mode VisualShaderNodeParticleAcceleratorMode)

fn (VisualShaderNodeParticleAccelerator) get_mode #

fn (s &VisualShaderNodeParticleAccelerator) get_mode() VisualShaderNodeParticleAcceleratorMode

struct VisualShaderNodeParticleBoxEmitter #

struct VisualShaderNodeParticleBoxEmitter {
	VisualShaderNodeParticleEmitter
}

A visual shader node that makes particles emitted in a box shape.

fn (VisualShaderNodeParticleBoxEmitter) to_variant #

fn (s &VisualShaderNodeParticleBoxEmitter) to_variant() Variant

fn (VisualShaderNodeParticleBoxEmitter) from_variant #

fn (mut s VisualShaderNodeParticleBoxEmitter) from_variant(variant &Variant)

struct VisualShaderNodeParticleConeVelocity #

struct VisualShaderNodeParticleConeVelocity {
	VisualShaderNode
}

A visual shader node that makes particles move in a cone shape.

fn (VisualShaderNodeParticleConeVelocity) to_variant #

fn (s &VisualShaderNodeParticleConeVelocity) to_variant() Variant

fn (VisualShaderNodeParticleConeVelocity) from_variant #

fn (mut s VisualShaderNodeParticleConeVelocity) from_variant(variant &Variant)

struct VisualShaderNodeParticleEmit #

struct VisualShaderNodeParticleEmit {
	VisualShaderNode
}

A visual shader node that forces to emit a particle from a sub-emitter.

fn (VisualShaderNodeParticleEmit) to_variant #

fn (s &VisualShaderNodeParticleEmit) to_variant() Variant

fn (VisualShaderNodeParticleEmit) from_variant #

fn (mut s VisualShaderNodeParticleEmit) from_variant(variant &Variant)

fn (VisualShaderNodeParticleEmit) set_flags #

fn (s &VisualShaderNodeParticleEmit) set_flags(flags VisualShaderNodeParticleEmitEmitFlags)

fn (VisualShaderNodeParticleEmit) get_flags #

fn (s &VisualShaderNodeParticleEmit) get_flags() VisualShaderNodeParticleEmitEmitFlags

struct VisualShaderNodeParticleEmitter #

struct VisualShaderNodeParticleEmitter {
	VisualShaderNode
}

A base class for particle emitters.

fn (VisualShaderNodeParticleEmitter) to_variant #

fn (s &VisualShaderNodeParticleEmitter) to_variant() Variant

fn (VisualShaderNodeParticleEmitter) from_variant #

fn (mut s VisualShaderNodeParticleEmitter) from_variant(variant &Variant)

fn (VisualShaderNodeParticleEmitter) set_mode_2d #

fn (s &VisualShaderNodeParticleEmitter) set_mode_2d(enabled bool)

fn (VisualShaderNodeParticleEmitter) is_mode_2d #

fn (s &VisualShaderNodeParticleEmitter) is_mode_2d() bool

struct VisualShaderNodeParticleMeshEmitter #

struct VisualShaderNodeParticleMeshEmitter {
	VisualShaderNodeParticleEmitter
}

A visual shader node that makes particles emitted in a shape defined by a [Mesh].

fn (VisualShaderNodeParticleMeshEmitter) to_variant #

fn (s &VisualShaderNodeParticleMeshEmitter) to_variant() Variant

fn (VisualShaderNodeParticleMeshEmitter) from_variant #

fn (mut s VisualShaderNodeParticleMeshEmitter) from_variant(variant &Variant)

fn (VisualShaderNodeParticleMeshEmitter) set_mesh #

fn (s &VisualShaderNodeParticleMeshEmitter) set_mesh(mesh Mesh)

fn (VisualShaderNodeParticleMeshEmitter) get_mesh #

fn (s &VisualShaderNodeParticleMeshEmitter) get_mesh() Mesh

fn (VisualShaderNodeParticleMeshEmitter) set_use_all_surfaces #

fn (s &VisualShaderNodeParticleMeshEmitter) set_use_all_surfaces(enabled bool)

fn (VisualShaderNodeParticleMeshEmitter) is_use_all_surfaces #

fn (s &VisualShaderNodeParticleMeshEmitter) is_use_all_surfaces() bool

fn (VisualShaderNodeParticleMeshEmitter) set_surface_index #

fn (s &VisualShaderNodeParticleMeshEmitter) set_surface_index(surface_index i64)

fn (VisualShaderNodeParticleMeshEmitter) get_surface_index #

fn (s &VisualShaderNodeParticleMeshEmitter) get_surface_index() i64

struct VisualShaderNodeParticleMultiplyByAxisAngle #

struct VisualShaderNodeParticleMultiplyByAxisAngle {
	VisualShaderNode
}

A visual shader helper node for multiplying position and rotation of particles.

fn (VisualShaderNodeParticleMultiplyByAxisAngle) to_variant #

fn (s &VisualShaderNodeParticleMultiplyByAxisAngle) to_variant() Variant

fn (VisualShaderNodeParticleMultiplyByAxisAngle) from_variant #

fn (mut s VisualShaderNodeParticleMultiplyByAxisAngle) from_variant(variant &Variant)

fn (VisualShaderNodeParticleMultiplyByAxisAngle) set_degrees_mode #

fn (s &VisualShaderNodeParticleMultiplyByAxisAngle) set_degrees_mode(enabled bool)

fn (VisualShaderNodeParticleMultiplyByAxisAngle) is_degrees_mode #

fn (s &VisualShaderNodeParticleMultiplyByAxisAngle) is_degrees_mode() bool

struct VisualShaderNodeParticleOutput #

struct VisualShaderNodeParticleOutput {
	VisualShaderNodeOutput
}

Visual shader node that defines output values for particle emitting.

fn (VisualShaderNodeParticleOutput) to_variant #

fn (s &VisualShaderNodeParticleOutput) to_variant() Variant

fn (VisualShaderNodeParticleOutput) from_variant #

fn (mut s VisualShaderNodeParticleOutput) from_variant(variant &Variant)

struct VisualShaderNodeParticleRandomness #

struct VisualShaderNodeParticleRandomness {
	VisualShaderNode
}

Visual shader node for randomizing particle values.

fn (VisualShaderNodeParticleRandomness) to_variant #

fn (s &VisualShaderNodeParticleRandomness) to_variant() Variant

fn (VisualShaderNodeParticleRandomness) from_variant #

fn (mut s VisualShaderNodeParticleRandomness) from_variant(variant &Variant)

fn (VisualShaderNodeParticleRandomness) set_op_type #

fn (s &VisualShaderNodeParticleRandomness) set_op_type(gd_type VisualShaderNodeParticleRandomnessOpType)

fn (VisualShaderNodeParticleRandomness) get_op_type #

fn (s &VisualShaderNodeParticleRandomness) get_op_type() VisualShaderNodeParticleRandomnessOpType

struct VisualShaderNodeParticleRingEmitter #

struct VisualShaderNodeParticleRingEmitter {
	VisualShaderNodeParticleEmitter
}

A visual shader node that makes particles emitted in a ring shape.

fn (VisualShaderNodeParticleRingEmitter) to_variant #

fn (s &VisualShaderNodeParticleRingEmitter) to_variant() Variant

fn (VisualShaderNodeParticleRingEmitter) from_variant #

fn (mut s VisualShaderNodeParticleRingEmitter) from_variant(variant &Variant)

struct VisualShaderNodeParticleSphereEmitter #

struct VisualShaderNodeParticleSphereEmitter {
	VisualShaderNodeParticleEmitter
}

A visual shader node that makes particles emitted in a sphere shape.

fn (VisualShaderNodeParticleSphereEmitter) to_variant #

fn (s &VisualShaderNodeParticleSphereEmitter) to_variant() Variant

fn (VisualShaderNodeParticleSphereEmitter) from_variant #

fn (mut s VisualShaderNodeParticleSphereEmitter) from_variant(variant &Variant)

struct VisualShaderNodeProximityFade #

struct VisualShaderNodeProximityFade {
	VisualShaderNode
}

A visual shader node representing proximity fade effect.

fn (VisualShaderNodeProximityFade) to_variant #

fn (s &VisualShaderNodeProximityFade) to_variant() Variant

fn (VisualShaderNodeProximityFade) from_variant #

fn (mut s VisualShaderNodeProximityFade) from_variant(variant &Variant)

struct VisualShaderNodeRandomRange #

struct VisualShaderNodeRandomRange {
	VisualShaderNode
}

A visual shader node that generates a pseudo-random scalar.

fn (VisualShaderNodeRandomRange) to_variant #

fn (s &VisualShaderNodeRandomRange) to_variant() Variant

fn (VisualShaderNodeRandomRange) from_variant #

fn (mut s VisualShaderNodeRandomRange) from_variant(variant &Variant)

struct VisualShaderNodeRemap #

struct VisualShaderNodeRemap {
	VisualShaderNode
}

A visual shader node for remap function.

fn (VisualShaderNodeRemap) to_variant #

fn (s &VisualShaderNodeRemap) to_variant() Variant

fn (VisualShaderNodeRemap) from_variant #

fn (mut s VisualShaderNodeRemap) from_variant(variant &Variant)

fn (VisualShaderNodeRemap) set_op_type #

fn (s &VisualShaderNodeRemap) set_op_type(op_type VisualShaderNodeRemapOpType)

fn (VisualShaderNodeRemap) get_op_type #

fn (s &VisualShaderNodeRemap) get_op_type() VisualShaderNodeRemapOpType

struct VisualShaderNodeReroute #

struct VisualShaderNodeReroute {
	VisualShaderNode
}

A node that allows rerouting a connection within the visual shader graph.

fn (VisualShaderNodeReroute) to_variant #

fn (s &VisualShaderNodeReroute) to_variant() Variant

fn (VisualShaderNodeReroute) from_variant #

fn (mut s VisualShaderNodeReroute) from_variant(variant &Variant)

fn (VisualShaderNodeReroute) get_port_type #

fn (s &VisualShaderNodeReroute) get_port_type() VisualShaderNodePortType

Returns the port type of the reroute node.

struct VisualShaderNodeResizableBase #

struct VisualShaderNodeResizableBase {
	VisualShaderNode
}

Base class for resizable nodes in a visual shader graph.

fn (VisualShaderNodeResizableBase) to_variant #

fn (s &VisualShaderNodeResizableBase) to_variant() Variant

fn (VisualShaderNodeResizableBase) from_variant #

fn (mut s VisualShaderNodeResizableBase) from_variant(variant &Variant)

fn (VisualShaderNodeResizableBase) set_size #

fn (s &VisualShaderNodeResizableBase) set_size(size Vector2)

fn (VisualShaderNodeResizableBase) get_size #

fn (s &VisualShaderNodeResizableBase) get_size() Vector2

struct VisualShaderNodeRotationByAxis #

struct VisualShaderNodeRotationByAxis {
	VisualShaderNode
}

A visual shader node that modifies the rotation of the object using a rotation matrix.

fn (VisualShaderNodeRotationByAxis) to_variant #

fn (s &VisualShaderNodeRotationByAxis) to_variant() Variant

fn (VisualShaderNodeRotationByAxis) from_variant #

fn (mut s VisualShaderNodeRotationByAxis) from_variant(variant &Variant)

struct VisualShaderNodeSDFRaymarch #

struct VisualShaderNodeSDFRaymarch {
	VisualShaderNode
}

SDF raymarching algorithm to be used within the visual shader graph.

fn (VisualShaderNodeSDFRaymarch) to_variant #

fn (s &VisualShaderNodeSDFRaymarch) to_variant() Variant

fn (VisualShaderNodeSDFRaymarch) from_variant #

fn (mut s VisualShaderNodeSDFRaymarch) from_variant(variant &Variant)

struct VisualShaderNodeSDFToScreenUV #

struct VisualShaderNodeSDFToScreenUV {
	VisualShaderNode
}

A function to convert an SDF (signed-distance field) to screen UV, to be used within the visual shader graph.

fn (VisualShaderNodeSDFToScreenUV) to_variant #

fn (s &VisualShaderNodeSDFToScreenUV) to_variant() Variant

fn (VisualShaderNodeSDFToScreenUV) from_variant #

fn (mut s VisualShaderNodeSDFToScreenUV) from_variant(variant &Variant)

struct VisualShaderNodeSample3D #

struct VisualShaderNodeSample3D {
	VisualShaderNode
}

A base node for nodes which samples 3D textures in the visual shader graph.

fn (VisualShaderNodeSample3D) to_variant #

fn (s &VisualShaderNodeSample3D) to_variant() Variant

fn (VisualShaderNodeSample3D) from_variant #

fn (mut s VisualShaderNodeSample3D) from_variant(variant &Variant)

fn (VisualShaderNodeSample3D) set_source #

fn (s &VisualShaderNodeSample3D) set_source(value VisualShaderNodeSample3DSource)

fn (VisualShaderNodeSample3D) get_source #

fn (s &VisualShaderNodeSample3D) get_source() VisualShaderNodeSample3DSource

struct VisualShaderNodeScreenNormalWorldSpace #

struct VisualShaderNodeScreenNormalWorldSpace {
	VisualShaderNode
}

A visual shader node that unpacks the screen normal texture in World Space.

fn (VisualShaderNodeScreenNormalWorldSpace) to_variant #

fn (s &VisualShaderNodeScreenNormalWorldSpace) to_variant() Variant

fn (VisualShaderNodeScreenNormalWorldSpace) from_variant #

fn (mut s VisualShaderNodeScreenNormalWorldSpace) from_variant(variant &Variant)

struct VisualShaderNodeScreenUVToSDF #

struct VisualShaderNodeScreenUVToSDF {
	VisualShaderNode
}

A function to convert screen UV to an SDF (signed-distance field), to be used within the visual shader graph.

fn (VisualShaderNodeScreenUVToSDF) to_variant #

fn (s &VisualShaderNodeScreenUVToSDF) to_variant() Variant

fn (VisualShaderNodeScreenUVToSDF) from_variant #

fn (mut s VisualShaderNodeScreenUVToSDF) from_variant(variant &Variant)

struct VisualShaderNodeSmoothStep #

struct VisualShaderNodeSmoothStep {
	VisualShaderNode
}

Calculates a SmoothStep function within the visual shader graph.

fn (VisualShaderNodeSmoothStep) to_variant #

fn (s &VisualShaderNodeSmoothStep) to_variant() Variant

fn (VisualShaderNodeSmoothStep) from_variant #

fn (mut s VisualShaderNodeSmoothStep) from_variant(variant &Variant)

fn (VisualShaderNodeSmoothStep) set_op_type #

fn (s &VisualShaderNodeSmoothStep) set_op_type(op_type VisualShaderNodeSmoothStepOpType)

fn (VisualShaderNodeSmoothStep) get_op_type #

fn (s &VisualShaderNodeSmoothStep) get_op_type() VisualShaderNodeSmoothStepOpType

struct VisualShaderNodeStep #

struct VisualShaderNodeStep {
	VisualShaderNode
}

Calculates a Step function within the visual shader graph.

fn (VisualShaderNodeStep) to_variant #

fn (s &VisualShaderNodeStep) to_variant() Variant

fn (VisualShaderNodeStep) from_variant #

fn (mut s VisualShaderNodeStep) from_variant(variant &Variant)

fn (VisualShaderNodeStep) set_op_type #

fn (s &VisualShaderNodeStep) set_op_type(op_type VisualShaderNodeStepOpType)

fn (VisualShaderNodeStep) get_op_type #

fn (s &VisualShaderNodeStep) get_op_type() VisualShaderNodeStepOpType

struct VisualShaderNodeSwitch #

struct VisualShaderNodeSwitch {
	VisualShaderNode
}

A selector function for use within the visual shader graph.

fn (VisualShaderNodeSwitch) to_variant #

fn (s &VisualShaderNodeSwitch) to_variant() Variant

fn (VisualShaderNodeSwitch) from_variant #

fn (mut s VisualShaderNodeSwitch) from_variant(variant &Variant)

fn (VisualShaderNodeSwitch) set_op_type #

fn (s &VisualShaderNodeSwitch) set_op_type(gd_type VisualShaderNodeSwitchOpType)

fn (VisualShaderNodeSwitch) get_op_type #

fn (s &VisualShaderNodeSwitch) get_op_type() VisualShaderNodeSwitchOpType

struct VisualShaderNodeTexture #

struct VisualShaderNodeTexture {
	VisualShaderNode
}

Performs a 2D texture lookup within the visual shader graph.

fn (VisualShaderNodeTexture) to_variant #

fn (s &VisualShaderNodeTexture) to_variant() Variant

fn (VisualShaderNodeTexture) from_variant #

fn (mut s VisualShaderNodeTexture) from_variant(variant &Variant)

fn (VisualShaderNodeTexture) set_source #

fn (s &VisualShaderNodeTexture) set_source(value VisualShaderNodeTextureSource)

fn (VisualShaderNodeTexture) get_source #

fn (s &VisualShaderNodeTexture) get_source() VisualShaderNodeTextureSource

fn (VisualShaderNodeTexture) set_texture #

fn (s &VisualShaderNodeTexture) set_texture(value Texture2D)

fn (VisualShaderNodeTexture) get_texture #

fn (s &VisualShaderNodeTexture) get_texture() Texture2D

fn (VisualShaderNodeTexture) set_texture_type #

fn (s &VisualShaderNodeTexture) set_texture_type(value VisualShaderNodeTextureTextureType)

fn (VisualShaderNodeTexture) get_texture_type #

fn (s &VisualShaderNodeTexture) get_texture_type() VisualShaderNodeTextureTextureType

struct VisualShaderNodeTexture2DArray #

struct VisualShaderNodeTexture2DArray {
	VisualShaderNodeSample3D
}

A 2D texture uniform array to be used within the visual shader graph.

fn (VisualShaderNodeTexture2DArray) to_variant #

fn (s &VisualShaderNodeTexture2DArray) to_variant() Variant

fn (VisualShaderNodeTexture2DArray) from_variant #

fn (mut s VisualShaderNodeTexture2DArray) from_variant(variant &Variant)

fn (VisualShaderNodeTexture2DArray) set_texture_array #

fn (s &VisualShaderNodeTexture2DArray) set_texture_array(value TextureLayered)

fn (VisualShaderNodeTexture2DArray) get_texture_array #

fn (s &VisualShaderNodeTexture2DArray) get_texture_array() TextureLayered

struct VisualShaderNodeTexture2DArrayParameter #

struct VisualShaderNodeTexture2DArrayParameter {
	VisualShaderNodeTextureParameter
}

A visual shader node for shader parameter (uniform) of type [Texture2DArray].

fn (VisualShaderNodeTexture2DArrayParameter) to_variant #

fn (s &VisualShaderNodeTexture2DArrayParameter) to_variant() Variant

fn (VisualShaderNodeTexture2DArrayParameter) from_variant #

fn (mut s VisualShaderNodeTexture2DArrayParameter) from_variant(variant &Variant)

struct VisualShaderNodeTexture2DParameter #

struct VisualShaderNodeTexture2DParameter {
	VisualShaderNodeTextureParameter
}

Provides a 2D texture parameter within the visual shader graph.

fn (VisualShaderNodeTexture2DParameter) to_variant #

fn (s &VisualShaderNodeTexture2DParameter) to_variant() Variant

fn (VisualShaderNodeTexture2DParameter) from_variant #

fn (mut s VisualShaderNodeTexture2DParameter) from_variant(variant &Variant)

struct VisualShaderNodeTexture3D #

struct VisualShaderNodeTexture3D {
	VisualShaderNodeSample3D
}

Performs a 3D texture lookup within the visual shader graph.

fn (VisualShaderNodeTexture3D) to_variant #

fn (s &VisualShaderNodeTexture3D) to_variant() Variant

fn (VisualShaderNodeTexture3D) from_variant #

fn (mut s VisualShaderNodeTexture3D) from_variant(variant &Variant)

fn (VisualShaderNodeTexture3D) set_texture #

fn (s &VisualShaderNodeTexture3D) set_texture(value Texture3D)

fn (VisualShaderNodeTexture3D) get_texture #

fn (s &VisualShaderNodeTexture3D) get_texture() Texture3D

struct VisualShaderNodeTexture3DParameter #

struct VisualShaderNodeTexture3DParameter {
	VisualShaderNodeTextureParameter
}

Provides a 3D texture parameter within the visual shader graph.

fn (VisualShaderNodeTexture3DParameter) to_variant #

fn (s &VisualShaderNodeTexture3DParameter) to_variant() Variant

fn (VisualShaderNodeTexture3DParameter) from_variant #

fn (mut s VisualShaderNodeTexture3DParameter) from_variant(variant &Variant)

struct VisualShaderNodeTextureParameter #

struct VisualShaderNodeTextureParameter {
	VisualShaderNodeParameter
}

Performs a uniform texture lookup within the visual shader graph.

fn (VisualShaderNodeTextureParameter) to_variant #

fn (s &VisualShaderNodeTextureParameter) to_variant() Variant

fn (VisualShaderNodeTextureParameter) from_variant #

fn (mut s VisualShaderNodeTextureParameter) from_variant(variant &Variant)

fn (VisualShaderNodeTextureParameter) set_texture_type #

fn (s &VisualShaderNodeTextureParameter) set_texture_type(gd_type VisualShaderNodeTextureParameterTextureType)

fn (VisualShaderNodeTextureParameter) get_texture_type #

fn (s &VisualShaderNodeTextureParameter) get_texture_type() VisualShaderNodeTextureParameterTextureType

fn (VisualShaderNodeTextureParameter) set_color_default #

fn (s &VisualShaderNodeTextureParameter) set_color_default(color VisualShaderNodeTextureParameterColorDefault)

fn (VisualShaderNodeTextureParameter) get_color_default #

fn (s &VisualShaderNodeTextureParameter) get_color_default() VisualShaderNodeTextureParameterColorDefault

fn (VisualShaderNodeTextureParameter) set_texture_filter #

fn (s &VisualShaderNodeTextureParameter) set_texture_filter(filter VisualShaderNodeTextureParameterTextureFilter)

fn (VisualShaderNodeTextureParameter) get_texture_filter #

fn (s &VisualShaderNodeTextureParameter) get_texture_filter() VisualShaderNodeTextureParameterTextureFilter

fn (VisualShaderNodeTextureParameter) set_texture_repeat #

fn (s &VisualShaderNodeTextureParameter) set_texture_repeat(repeat VisualShaderNodeTextureParameterTextureRepeat)

fn (VisualShaderNodeTextureParameter) get_texture_repeat #

fn (s &VisualShaderNodeTextureParameter) get_texture_repeat() VisualShaderNodeTextureParameterTextureRepeat

fn (VisualShaderNodeTextureParameter) set_texture_source #

fn (s &VisualShaderNodeTextureParameter) set_texture_source(source VisualShaderNodeTextureParameterTextureSource)

fn (VisualShaderNodeTextureParameter) get_texture_source #

fn (s &VisualShaderNodeTextureParameter) get_texture_source() VisualShaderNodeTextureParameterTextureSource

struct VisualShaderNodeTextureParameterTriplanar #

struct VisualShaderNodeTextureParameterTriplanar {
	VisualShaderNodeTextureParameter
}

Performs a uniform texture lookup with triplanar within the visual shader graph.

fn (VisualShaderNodeTextureParameterTriplanar) to_variant #

fn (s &VisualShaderNodeTextureParameterTriplanar) to_variant() Variant

fn (VisualShaderNodeTextureParameterTriplanar) from_variant #

fn (mut s VisualShaderNodeTextureParameterTriplanar) from_variant(variant &Variant)

struct VisualShaderNodeTextureSDF #

struct VisualShaderNodeTextureSDF {
	VisualShaderNode
}

Performs an SDF (signed-distance field) texture lookup within the visual shader graph.

fn (VisualShaderNodeTextureSDF) to_variant #

fn (s &VisualShaderNodeTextureSDF) to_variant() Variant

fn (VisualShaderNodeTextureSDF) from_variant #

fn (mut s VisualShaderNodeTextureSDF) from_variant(variant &Variant)

struct VisualShaderNodeTextureSDFNormal #

struct VisualShaderNodeTextureSDFNormal {
	VisualShaderNode
}

Performs an SDF (signed-distance field) normal texture lookup within the visual shader graph.

fn (VisualShaderNodeTextureSDFNormal) to_variant #

fn (s &VisualShaderNodeTextureSDFNormal) to_variant() Variant

fn (VisualShaderNodeTextureSDFNormal) from_variant #

fn (mut s VisualShaderNodeTextureSDFNormal) from_variant(variant &Variant)

struct VisualShaderNodeTransformCompose #

struct VisualShaderNodeTransformCompose {
	VisualShaderNode
}

Composes a [Transform3D] from four [Vector3]s within the visual shader graph.

fn (VisualShaderNodeTransformCompose) to_variant #

fn (s &VisualShaderNodeTransformCompose) to_variant() Variant

fn (VisualShaderNodeTransformCompose) from_variant #

fn (mut s VisualShaderNodeTransformCompose) from_variant(variant &Variant)

struct VisualShaderNodeTransformConstant #

struct VisualShaderNodeTransformConstant {
	VisualShaderNodeConstant
}

A [Transform3D] constant for use within the visual shader graph.

fn (VisualShaderNodeTransformConstant) to_variant #

fn (s &VisualShaderNodeTransformConstant) to_variant() Variant

fn (VisualShaderNodeTransformConstant) from_variant #

fn (mut s VisualShaderNodeTransformConstant) from_variant(variant &Variant)

fn (VisualShaderNodeTransformConstant) set_constant #

fn (s &VisualShaderNodeTransformConstant) set_constant(constant Transform3D)

fn (VisualShaderNodeTransformConstant) get_constant #

fn (s &VisualShaderNodeTransformConstant) get_constant() Transform3D

struct VisualShaderNodeTransformDecompose #

struct VisualShaderNodeTransformDecompose {
	VisualShaderNode
}

Decomposes a [Transform3D] into four [Vector3]s within the visual shader graph.

fn (VisualShaderNodeTransformDecompose) to_variant #

fn (s &VisualShaderNodeTransformDecompose) to_variant() Variant

fn (VisualShaderNodeTransformDecompose) from_variant #

fn (mut s VisualShaderNodeTransformDecompose) from_variant(variant &Variant)

struct VisualShaderNodeTransformFunc #

struct VisualShaderNodeTransformFunc {
	VisualShaderNode
}

Computes a [Transform3D] function within the visual shader graph.

fn (VisualShaderNodeTransformFunc) to_variant #

fn (s &VisualShaderNodeTransformFunc) to_variant() Variant

fn (VisualShaderNodeTransformFunc) from_variant #

fn (mut s VisualShaderNodeTransformFunc) from_variant(variant &Variant)

fn (VisualShaderNodeTransformFunc) set_function #

fn (s &VisualShaderNodeTransformFunc) set_function(func VisualShaderNodeTransformFuncFunction)

fn (VisualShaderNodeTransformFunc) get_function #

fn (s &VisualShaderNodeTransformFunc) get_function() VisualShaderNodeTransformFuncFunction

struct VisualShaderNodeTransformOp #

struct VisualShaderNodeTransformOp {
	VisualShaderNode
}

A [Transform3D] operator to be used within the visual shader graph.

fn (VisualShaderNodeTransformOp) to_variant #

fn (s &VisualShaderNodeTransformOp) to_variant() Variant

fn (VisualShaderNodeTransformOp) from_variant #

fn (mut s VisualShaderNodeTransformOp) from_variant(variant &Variant)

fn (VisualShaderNodeTransformOp) set_operator #

fn (s &VisualShaderNodeTransformOp) set_operator(op VisualShaderNodeTransformOpOperator)

fn (VisualShaderNodeTransformOp) get_operator #

fn (s &VisualShaderNodeTransformOp) get_operator() VisualShaderNodeTransformOpOperator

struct VisualShaderNodeTransformParameter #

struct VisualShaderNodeTransformParameter {
	VisualShaderNodeParameter
}

A [Transform3D] parameter for use within the visual shader graph.

fn (VisualShaderNodeTransformParameter) to_variant #

fn (s &VisualShaderNodeTransformParameter) to_variant() Variant

fn (VisualShaderNodeTransformParameter) from_variant #

fn (mut s VisualShaderNodeTransformParameter) from_variant(variant &Variant)

fn (VisualShaderNodeTransformParameter) set_default_value_enabled #

fn (s &VisualShaderNodeTransformParameter) set_default_value_enabled(enabled bool)

fn (VisualShaderNodeTransformParameter) is_default_value_enabled #

fn (s &VisualShaderNodeTransformParameter) is_default_value_enabled() bool

fn (VisualShaderNodeTransformParameter) set_default_value #

fn (s &VisualShaderNodeTransformParameter) set_default_value(value Transform3D)

fn (VisualShaderNodeTransformParameter) get_default_value #

fn (s &VisualShaderNodeTransformParameter) get_default_value() Transform3D

struct VisualShaderNodeTransformVecMult #

struct VisualShaderNodeTransformVecMult {
	VisualShaderNode
}

Multiplies a [Transform3D] and a [Vector3] within the visual shader graph.

fn (VisualShaderNodeTransformVecMult) to_variant #

fn (s &VisualShaderNodeTransformVecMult) to_variant() Variant

fn (VisualShaderNodeTransformVecMult) from_variant #

fn (mut s VisualShaderNodeTransformVecMult) from_variant(variant &Variant)

fn (VisualShaderNodeTransformVecMult) set_operator #

fn (s &VisualShaderNodeTransformVecMult) set_operator(op VisualShaderNodeTransformVecMultOperator)

fn (VisualShaderNodeTransformVecMult) get_operator #

fn (s &VisualShaderNodeTransformVecMult) get_operator() VisualShaderNodeTransformVecMultOperator

struct VisualShaderNodeUIntConstant #

struct VisualShaderNodeUIntConstant {
	VisualShaderNodeConstant
}

An unsigned scalar integer constant to be used within the visual shader graph.

fn (VisualShaderNodeUIntConstant) to_variant #

fn (s &VisualShaderNodeUIntConstant) to_variant() Variant

fn (VisualShaderNodeUIntConstant) from_variant #

fn (mut s VisualShaderNodeUIntConstant) from_variant(variant &Variant)

fn (VisualShaderNodeUIntConstant) set_constant #

fn (s &VisualShaderNodeUIntConstant) set_constant(constant i64)

fn (VisualShaderNodeUIntConstant) get_constant #

fn (s &VisualShaderNodeUIntConstant) get_constant() i64

struct VisualShaderNodeUIntFunc #

struct VisualShaderNodeUIntFunc {
	VisualShaderNode
}

An unsigned scalar integer function to be used within the visual shader graph.

fn (VisualShaderNodeUIntFunc) to_variant #

fn (s &VisualShaderNodeUIntFunc) to_variant() Variant

fn (VisualShaderNodeUIntFunc) from_variant #

fn (mut s VisualShaderNodeUIntFunc) from_variant(variant &Variant)

fn (VisualShaderNodeUIntFunc) set_function #

fn (s &VisualShaderNodeUIntFunc) set_function(func VisualShaderNodeUIntFuncFunction)

fn (VisualShaderNodeUIntFunc) get_function #

fn (s &VisualShaderNodeUIntFunc) get_function() VisualShaderNodeUIntFuncFunction

struct VisualShaderNodeUIntOp #

struct VisualShaderNodeUIntOp {
	VisualShaderNode
}

An unsigned integer scalar operator to be used within the visual shader graph.

fn (VisualShaderNodeUIntOp) to_variant #

fn (s &VisualShaderNodeUIntOp) to_variant() Variant

fn (VisualShaderNodeUIntOp) from_variant #

fn (mut s VisualShaderNodeUIntOp) from_variant(variant &Variant)

fn (VisualShaderNodeUIntOp) set_operator #

fn (s &VisualShaderNodeUIntOp) set_operator(op VisualShaderNodeUIntOpOperator)

fn (VisualShaderNodeUIntOp) get_operator #

fn (s &VisualShaderNodeUIntOp) get_operator() VisualShaderNodeUIntOpOperator

struct VisualShaderNodeUIntParameter #

struct VisualShaderNodeUIntParameter {
	VisualShaderNodeParameter
}

A visual shader node for shader parameter (uniform) of type unsigned [int].

fn (VisualShaderNodeUIntParameter) to_variant #

fn (s &VisualShaderNodeUIntParameter) to_variant() Variant

fn (VisualShaderNodeUIntParameter) from_variant #

fn (mut s VisualShaderNodeUIntParameter) from_variant(variant &Variant)

fn (VisualShaderNodeUIntParameter) set_default_value_enabled #

fn (s &VisualShaderNodeUIntParameter) set_default_value_enabled(enabled bool)

fn (VisualShaderNodeUIntParameter) is_default_value_enabled #

fn (s &VisualShaderNodeUIntParameter) is_default_value_enabled() bool

fn (VisualShaderNodeUIntParameter) set_default_value #

fn (s &VisualShaderNodeUIntParameter) set_default_value(value i64)

fn (VisualShaderNodeUIntParameter) get_default_value #

fn (s &VisualShaderNodeUIntParameter) get_default_value() i64

struct VisualShaderNodeUVFunc #

struct VisualShaderNodeUVFunc {
	VisualShaderNode
}

Contains functions to modify texture coordinates (uv) to be used within the visual shader graph.

fn (VisualShaderNodeUVFunc) to_variant #

fn (s &VisualShaderNodeUVFunc) to_variant() Variant

fn (VisualShaderNodeUVFunc) from_variant #

fn (mut s VisualShaderNodeUVFunc) from_variant(variant &Variant)

fn (VisualShaderNodeUVFunc) set_function #

fn (s &VisualShaderNodeUVFunc) set_function(func VisualShaderNodeUVFuncFunction)

fn (VisualShaderNodeUVFunc) get_function #

fn (s &VisualShaderNodeUVFunc) get_function() VisualShaderNodeUVFuncFunction

struct VisualShaderNodeUVPolarCoord #

struct VisualShaderNodeUVPolarCoord {
	VisualShaderNode
}

A visual shader node that modifies the texture UV using polar coordinates.

fn (VisualShaderNodeUVPolarCoord) to_variant #

fn (s &VisualShaderNodeUVPolarCoord) to_variant() Variant

fn (VisualShaderNodeUVPolarCoord) from_variant #

fn (mut s VisualShaderNodeUVPolarCoord) from_variant(variant &Variant)

struct VisualShaderNodeVarying #

struct VisualShaderNodeVarying {
	VisualShaderNode
}

A visual shader node that represents a "varying" shader value.

fn (VisualShaderNodeVarying) to_variant #

fn (s &VisualShaderNodeVarying) to_variant() Variant

fn (VisualShaderNodeVarying) from_variant #

fn (mut s VisualShaderNodeVarying) from_variant(variant &Variant)

fn (VisualShaderNodeVarying) set_varying_name #

fn (s &VisualShaderNodeVarying) set_varying_name(name string)

fn (VisualShaderNodeVarying) get_varying_name #

fn (s &VisualShaderNodeVarying) get_varying_name() string

fn (VisualShaderNodeVarying) set_varying_type #

fn (s &VisualShaderNodeVarying) set_varying_type(gd_type VisualShaderVaryingType)

fn (VisualShaderNodeVarying) get_varying_type #

fn (s &VisualShaderNodeVarying) get_varying_type() VisualShaderVaryingType

struct VisualShaderNodeVaryingGetter #

struct VisualShaderNodeVaryingGetter {
	VisualShaderNodeVarying
}

A visual shader node that gets a value of a varying.

fn (VisualShaderNodeVaryingGetter) to_variant #

fn (s &VisualShaderNodeVaryingGetter) to_variant() Variant

fn (VisualShaderNodeVaryingGetter) from_variant #

fn (mut s VisualShaderNodeVaryingGetter) from_variant(variant &Variant)

struct VisualShaderNodeVaryingSetter #

struct VisualShaderNodeVaryingSetter {
	VisualShaderNodeVarying
}

A visual shader node that sets a value of a varying.

fn (VisualShaderNodeVaryingSetter) to_variant #

fn (s &VisualShaderNodeVaryingSetter) to_variant() Variant

fn (VisualShaderNodeVaryingSetter) from_variant #

fn (mut s VisualShaderNodeVaryingSetter) from_variant(variant &Variant)

struct VisualShaderNodeVec2Constant #

struct VisualShaderNodeVec2Constant {
	VisualShaderNodeConstant
}

A [Vector2] constant to be used within the visual shader graph.

fn (VisualShaderNodeVec2Constant) to_variant #

fn (s &VisualShaderNodeVec2Constant) to_variant() Variant

fn (VisualShaderNodeVec2Constant) from_variant #

fn (mut s VisualShaderNodeVec2Constant) from_variant(variant &Variant)

fn (VisualShaderNodeVec2Constant) set_constant #

fn (s &VisualShaderNodeVec2Constant) set_constant(constant Vector2)

fn (VisualShaderNodeVec2Constant) get_constant #

fn (s &VisualShaderNodeVec2Constant) get_constant() Vector2

struct VisualShaderNodeVec2Parameter #

struct VisualShaderNodeVec2Parameter {
	VisualShaderNodeParameter
}

A [Vector2] parameter to be used within the visual shader graph.

fn (VisualShaderNodeVec2Parameter) to_variant #

fn (s &VisualShaderNodeVec2Parameter) to_variant() Variant

fn (VisualShaderNodeVec2Parameter) from_variant #

fn (mut s VisualShaderNodeVec2Parameter) from_variant(variant &Variant)

fn (VisualShaderNodeVec2Parameter) set_default_value_enabled #

fn (s &VisualShaderNodeVec2Parameter) set_default_value_enabled(enabled bool)

fn (VisualShaderNodeVec2Parameter) is_default_value_enabled #

fn (s &VisualShaderNodeVec2Parameter) is_default_value_enabled() bool

fn (VisualShaderNodeVec2Parameter) set_default_value #

fn (s &VisualShaderNodeVec2Parameter) set_default_value(value Vector2)

fn (VisualShaderNodeVec2Parameter) get_default_value #

fn (s &VisualShaderNodeVec2Parameter) get_default_value() Vector2

struct VisualShaderNodeVec3Constant #

struct VisualShaderNodeVec3Constant {
	VisualShaderNodeConstant
}

A [Vector3] constant to be used within the visual shader graph.

fn (VisualShaderNodeVec3Constant) to_variant #

fn (s &VisualShaderNodeVec3Constant) to_variant() Variant

fn (VisualShaderNodeVec3Constant) from_variant #

fn (mut s VisualShaderNodeVec3Constant) from_variant(variant &Variant)

fn (VisualShaderNodeVec3Constant) set_constant #

fn (s &VisualShaderNodeVec3Constant) set_constant(constant Vector3)

fn (VisualShaderNodeVec3Constant) get_constant #

fn (s &VisualShaderNodeVec3Constant) get_constant() Vector3

struct VisualShaderNodeVec3Parameter #

struct VisualShaderNodeVec3Parameter {
	VisualShaderNodeParameter
}

A [Vector3] parameter to be used within the visual shader graph.

fn (VisualShaderNodeVec3Parameter) to_variant #

fn (s &VisualShaderNodeVec3Parameter) to_variant() Variant

fn (VisualShaderNodeVec3Parameter) from_variant #

fn (mut s VisualShaderNodeVec3Parameter) from_variant(variant &Variant)

fn (VisualShaderNodeVec3Parameter) set_default_value_enabled #

fn (s &VisualShaderNodeVec3Parameter) set_default_value_enabled(enabled bool)

fn (VisualShaderNodeVec3Parameter) is_default_value_enabled #

fn (s &VisualShaderNodeVec3Parameter) is_default_value_enabled() bool

fn (VisualShaderNodeVec3Parameter) set_default_value #

fn (s &VisualShaderNodeVec3Parameter) set_default_value(value Vector3)

fn (VisualShaderNodeVec3Parameter) get_default_value #

fn (s &VisualShaderNodeVec3Parameter) get_default_value() Vector3

struct VisualShaderNodeVec4Constant #

struct VisualShaderNodeVec4Constant {
	VisualShaderNodeConstant
}

A 4D vector constant to be used within the visual shader graph.

fn (VisualShaderNodeVec4Constant) to_variant #

fn (s &VisualShaderNodeVec4Constant) to_variant() Variant

fn (VisualShaderNodeVec4Constant) from_variant #

fn (mut s VisualShaderNodeVec4Constant) from_variant(variant &Variant)

fn (VisualShaderNodeVec4Constant) set_constant #

fn (s &VisualShaderNodeVec4Constant) set_constant(constant Quaternion)

fn (VisualShaderNodeVec4Constant) get_constant #

fn (s &VisualShaderNodeVec4Constant) get_constant() Quaternion

struct VisualShaderNodeVec4Parameter #

struct VisualShaderNodeVec4Parameter {
	VisualShaderNodeParameter
}

A 4D vector parameter to be used within the visual shader graph.

fn (VisualShaderNodeVec4Parameter) to_variant #

fn (s &VisualShaderNodeVec4Parameter) to_variant() Variant

fn (VisualShaderNodeVec4Parameter) from_variant #

fn (mut s VisualShaderNodeVec4Parameter) from_variant(variant &Variant)

fn (VisualShaderNodeVec4Parameter) set_default_value_enabled #

fn (s &VisualShaderNodeVec4Parameter) set_default_value_enabled(enabled bool)

fn (VisualShaderNodeVec4Parameter) is_default_value_enabled #

fn (s &VisualShaderNodeVec4Parameter) is_default_value_enabled() bool

fn (VisualShaderNodeVec4Parameter) set_default_value #

fn (s &VisualShaderNodeVec4Parameter) set_default_value(value Vector4)

fn (VisualShaderNodeVec4Parameter) get_default_value #

fn (s &VisualShaderNodeVec4Parameter) get_default_value() Vector4

struct VisualShaderNodeVectorBase #

struct VisualShaderNodeVectorBase {
	VisualShaderNode
}

A base type for the nodes that perform vector operations within the visual shader graph.

fn (VisualShaderNodeVectorBase) to_variant #

fn (s &VisualShaderNodeVectorBase) to_variant() Variant

fn (VisualShaderNodeVectorBase) from_variant #

fn (mut s VisualShaderNodeVectorBase) from_variant(variant &Variant)

fn (VisualShaderNodeVectorBase) set_op_type #

fn (s &VisualShaderNodeVectorBase) set_op_type(gd_type VisualShaderNodeVectorBaseOpType)

fn (VisualShaderNodeVectorBase) get_op_type #

fn (s &VisualShaderNodeVectorBase) get_op_type() VisualShaderNodeVectorBaseOpType

struct VisualShaderNodeVectorCompose #

struct VisualShaderNodeVectorCompose {
	VisualShaderNodeVectorBase
}

Composes a [Vector2], [Vector3] or 4D vector (represented as a [Quaternion]) from scalars within the visual shader graph.

fn (VisualShaderNodeVectorCompose) to_variant #

fn (s &VisualShaderNodeVectorCompose) to_variant() Variant

fn (VisualShaderNodeVectorCompose) from_variant #

fn (mut s VisualShaderNodeVectorCompose) from_variant(variant &Variant)

struct VisualShaderNodeVectorDecompose #

struct VisualShaderNodeVectorDecompose {
	VisualShaderNodeVectorBase
}

Decomposes a [Vector2], [Vector3] or 4D vector (represented as a [Quaternion]) into scalars within the visual shader graph.

fn (VisualShaderNodeVectorDecompose) to_variant #

fn (s &VisualShaderNodeVectorDecompose) to_variant() Variant

fn (VisualShaderNodeVectorDecompose) from_variant #

fn (mut s VisualShaderNodeVectorDecompose) from_variant(variant &Variant)

struct VisualShaderNodeVectorDistance #

struct VisualShaderNodeVectorDistance {
	VisualShaderNodeVectorBase
}

Returns the distance between two points. To be used within the visual shader graph.

fn (VisualShaderNodeVectorDistance) to_variant #

fn (s &VisualShaderNodeVectorDistance) to_variant() Variant

fn (VisualShaderNodeVectorDistance) from_variant #

fn (mut s VisualShaderNodeVectorDistance) from_variant(variant &Variant)

struct VisualShaderNodeVectorFunc #

struct VisualShaderNodeVectorFunc {
	VisualShaderNodeVectorBase
}

A vector function to be used within the visual shader graph.

fn (VisualShaderNodeVectorFunc) to_variant #

fn (s &VisualShaderNodeVectorFunc) to_variant() Variant

fn (VisualShaderNodeVectorFunc) from_variant #

fn (mut s VisualShaderNodeVectorFunc) from_variant(variant &Variant)

fn (VisualShaderNodeVectorFunc) set_function #

fn (s &VisualShaderNodeVectorFunc) set_function(func VisualShaderNodeVectorFuncFunction)

fn (VisualShaderNodeVectorFunc) get_function #

fn (s &VisualShaderNodeVectorFunc) get_function() VisualShaderNodeVectorFuncFunction

struct VisualShaderNodeVectorLen #

struct VisualShaderNodeVectorLen {
	VisualShaderNodeVectorBase
}

Returns the length of a [Vector3] within the visual shader graph.

fn (VisualShaderNodeVectorLen) to_variant #

fn (s &VisualShaderNodeVectorLen) to_variant() Variant

fn (VisualShaderNodeVectorLen) from_variant #

fn (mut s VisualShaderNodeVectorLen) from_variant(variant &Variant)

struct VisualShaderNodeVectorOp #

struct VisualShaderNodeVectorOp {
	VisualShaderNodeVectorBase
}

A vector operator to be used within the visual shader graph.

fn (VisualShaderNodeVectorOp) to_variant #

fn (s &VisualShaderNodeVectorOp) to_variant() Variant

fn (VisualShaderNodeVectorOp) from_variant #

fn (mut s VisualShaderNodeVectorOp) from_variant(variant &Variant)

fn (VisualShaderNodeVectorOp) set_operator #

fn (s &VisualShaderNodeVectorOp) set_operator(op VisualShaderNodeVectorOpOperator)

fn (VisualShaderNodeVectorOp) get_operator #

fn (s &VisualShaderNodeVectorOp) get_operator() VisualShaderNodeVectorOpOperator

struct VisualShaderNodeVectorRefract #

struct VisualShaderNodeVectorRefract {
	VisualShaderNodeVectorBase
}

Returns the vector that points in the direction of refraction. For use within the visual shader graph.

fn (VisualShaderNodeVectorRefract) to_variant #

fn (s &VisualShaderNodeVectorRefract) to_variant() Variant

fn (VisualShaderNodeVectorRefract) from_variant #

fn (mut s VisualShaderNodeVectorRefract) from_variant(variant &Variant)

struct VisualShaderNodeWorldPositionFromDepth #

struct VisualShaderNodeWorldPositionFromDepth {
	VisualShaderNode
}

A visual shader node that calculates the position of the pixel in world space using the depth texture.

fn (VisualShaderNodeWorldPositionFromDepth) to_variant #

fn (s &VisualShaderNodeWorldPositionFromDepth) to_variant() Variant

fn (VisualShaderNodeWorldPositionFromDepth) from_variant #

fn (mut s VisualShaderNodeWorldPositionFromDepth) from_variant(variant &Variant)

struct VisualShaderNode_set_input_port_default_value_Cfg #

@[params]
struct VisualShaderNode_set_input_port_default_value_Cfg {
pub:
	prev_value ToVariant
}

Optional parameters for VisualShaderNode#set_input_port_default_value

struct VoxelGI #

struct VoxelGI {
	VisualInstance3D
}

Real-time global illumination (GI) probe.

fn (VoxelGI) to_variant #

fn (s &VoxelGI) to_variant() Variant

fn (VoxelGI) from_variant #

fn (mut s VoxelGI) from_variant(variant &Variant)

fn (VoxelGI) set_probe_data #

fn (s &VoxelGI) set_probe_data(data VoxelGIData)

fn (VoxelGI) get_probe_data #

fn (s &VoxelGI) get_probe_data() VoxelGIData

fn (VoxelGI) set_subdiv #

fn (s &VoxelGI) set_subdiv(subdiv VoxelGISubdiv)

fn (VoxelGI) get_subdiv #

fn (s &VoxelGI) get_subdiv() VoxelGISubdiv

fn (VoxelGI) set_size #

fn (s &VoxelGI) set_size(size Vector3)

fn (VoxelGI) get_size #

fn (s &VoxelGI) get_size() Vector3

fn (VoxelGI) set_camera_attributes #

fn (s &VoxelGI) set_camera_attributes(camera_attributes CameraAttributes)

fn (VoxelGI) get_camera_attributes #

fn (s &VoxelGI) get_camera_attributes() CameraAttributes

fn (VoxelGI) bake #

fn (s &VoxelGI) bake(cfg VoxelGI_bake_Cfg)

Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_STATIC] and [Light3D]s marked with either [constant Light3D.BAKE_STATIC] or [constant Light3D.BAKE_DYNAMIC]. If [param create_visual_debug] is true, after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [VoxelGI]'s data and debug any issues that may be occurring. [b]Note:[/b] [method bake] works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a [VoxelGI] node generally takes from 5 to 20 seconds in most scenes. Reducing [member subdiv] can speed up baking. [b]Note:[/b] [GeometryInstance3D]s and [Light3D]s must be fully ready before [method bake] is called. If you are procedurally creating those and some meshes or lights are missing from your baked [VoxelGI], use call_deferred("bake") instead of calling [method bake] directly.

fn (VoxelGI) debug_bake #

fn (s &VoxelGI) debug_bake()

Calls [method bake] with create_visual_debug enabled.

struct VoxelGIData #

struct VoxelGIData {
	Resource
}

Contains baked voxel global illumination data for use in a [VoxelGI] node.

fn (VoxelGIData) to_variant #

fn (s &VoxelGIData) to_variant() Variant

fn (VoxelGIData) from_variant #

fn (mut s VoxelGIData) from_variant(variant &Variant)

fn (VoxelGIData) allocate #

fn (s &VoxelGIData) allocate(to_cell_xform Transform3D, aabb AABB, octree_size Vector3, octree_cells PackedByteArray, data_cells PackedByteArray, distance_field PackedByteArray, level_counts PackedInt32Array)

fn (VoxelGIData) get_bounds #

fn (s &VoxelGIData) get_bounds() AABB

Returns the bounds of the baked voxel data as an [AABB], which should match [member VoxelGI.size] after being baked (which only contains the size as a [Vector3]). [b]Note:[/b] If the size was modified without baking the VoxelGI data, then the value of [method get_bounds] and [member VoxelGI.size] will not match.

fn (VoxelGIData) get_octree_size #

fn (s &VoxelGIData) get_octree_size() Vector3

fn (VoxelGIData) get_to_cell_xform #

fn (s &VoxelGIData) get_to_cell_xform() Transform3D

fn (VoxelGIData) get_octree_cells #

fn (s &VoxelGIData) get_octree_cells() PackedByteArray

fn (VoxelGIData) get_data_cells #

fn (s &VoxelGIData) get_data_cells() PackedByteArray

fn (VoxelGIData) get_level_counts #

fn (s &VoxelGIData) get_level_counts() PackedInt32Array

fn (VoxelGIData) set_dynamic_range #

fn (s &VoxelGIData) set_dynamic_range(dynamic_range f64)

fn (VoxelGIData) get_dynamic_range #

fn (s &VoxelGIData) get_dynamic_range() f64

fn (VoxelGIData) set_energy #

fn (s &VoxelGIData) set_energy(energy f64)

fn (VoxelGIData) get_energy #

fn (s &VoxelGIData) get_energy() f64

fn (VoxelGIData) set_bias #

fn (s &VoxelGIData) set_bias(bias f64)

fn (VoxelGIData) get_bias #

fn (s &VoxelGIData) get_bias() f64

fn (VoxelGIData) set_normal_bias #

fn (s &VoxelGIData) set_normal_bias(bias f64)

fn (VoxelGIData) get_normal_bias #

fn (s &VoxelGIData) get_normal_bias() f64

fn (VoxelGIData) set_propagation #

fn (s &VoxelGIData) set_propagation(propagation f64)

fn (VoxelGIData) get_propagation #

fn (s &VoxelGIData) get_propagation() f64

fn (VoxelGIData) set_interior #

fn (s &VoxelGIData) set_interior(interior bool)

fn (VoxelGIData) is_interior #

fn (s &VoxelGIData) is_interior() bool

fn (VoxelGIData) set_use_two_bounces #

fn (s &VoxelGIData) set_use_two_bounces(enable bool)

fn (VoxelGIData) is_using_two_bounces #

fn (s &VoxelGIData) is_using_two_bounces() bool

struct VoxelGI_bake_Cfg #

@[params]
struct VoxelGI_bake_Cfg {
pub:
	from_node           Node
	create_visual_debug bool
}

Optional parameters for VoxelGI#bake

struct WeakRef #

struct WeakRef {
	RefCounted
}

Holds an [Object]. If the object is [RefCounted], it doesn't update the reference count.

fn (WeakRef) to_variant #

fn (s &WeakRef) to_variant() Variant

fn (WeakRef) from_variant #

fn (mut s WeakRef) from_variant(variant &Variant)

fn (WeakRef) get_ref #

fn (s &WeakRef) get_ref() Variant

Returns the [Object] this weakref is referring to. Returns null if that object no longer exists.

struct WebRTCDataChannel #

struct WebRTCDataChannel {
	PacketPeer
}

fn (WebRTCDataChannel) to_variant #

fn (s &WebRTCDataChannel) to_variant() Variant

fn (WebRTCDataChannel) from_variant #

fn (mut s WebRTCDataChannel) from_variant(variant &Variant)

fn (WebRTCDataChannel) poll #

fn (s &WebRTCDataChannel) poll() GDError

Reserved, but not used for now.

fn (WebRTCDataChannel) close #

fn (s &WebRTCDataChannel) close()

Closes this data channel, notifying the other peer.

fn (WebRTCDataChannel) was_string_packet #

fn (s &WebRTCDataChannel) was_string_packet() bool

Returns true if the last received packet was transferred as text. See [member write_mode].

fn (WebRTCDataChannel) set_write_mode #

fn (s &WebRTCDataChannel) set_write_mode(write_mode WebRTCDataChannelWriteMode)

fn (WebRTCDataChannel) get_write_mode #

fn (s &WebRTCDataChannel) get_write_mode() WebRTCDataChannelWriteMode

fn (WebRTCDataChannel) get_ready_state #

fn (s &WebRTCDataChannel) get_ready_state() WebRTCDataChannelChannelState

Returns the current state of this channel.

fn (WebRTCDataChannel) get_label #

fn (s &WebRTCDataChannel) get_label() string

Returns the label assigned to this channel during creation.

fn (WebRTCDataChannel) is_ordered #

fn (s &WebRTCDataChannel) is_ordered() bool

Returns true if this channel was created with ordering enabled (default).

fn (WebRTCDataChannel) get_id #

fn (s &WebRTCDataChannel) get_id() i64

Returns the ID assigned to this channel during creation (or auto-assigned during negotiation). If the channel is not negotiated out-of-band the ID will only be available after the connection is established (will return 65535 until then).

fn (WebRTCDataChannel) get_max_packet_life_time #

fn (s &WebRTCDataChannel) get_max_packet_life_time() i64

Returns the maxPacketLifeTime value assigned to this channel during creation. Will be 65535 if not specified.

fn (WebRTCDataChannel) get_max_retransmits #

fn (s &WebRTCDataChannel) get_max_retransmits() i64

Returns the maxRetransmits value assigned to this channel during creation. Will be 65535 if not specified.

fn (WebRTCDataChannel) get_protocol #

fn (s &WebRTCDataChannel) get_protocol() string

Returns the sub-protocol assigned to this channel during creation. An empty string if not specified.

fn (WebRTCDataChannel) is_negotiated #

fn (s &WebRTCDataChannel) is_negotiated() bool

Returns true if this channel was created with out-of-band configuration.

fn (WebRTCDataChannel) get_buffered_amount #

fn (s &WebRTCDataChannel) get_buffered_amount() i64

Returns the number of bytes currently queued to be sent over this channel.

struct WebRTCDataChannelExtension #

struct WebRTCDataChannelExtension {
	WebRTCDataChannel
}

fn (WebRTCDataChannelExtension) to_variant #

fn (s &WebRTCDataChannelExtension) to_variant() Variant

fn (WebRTCDataChannelExtension) from_variant #

fn (mut s WebRTCDataChannelExtension) from_variant(variant &Variant)

fn (WebRTCDataChannelExtension) gd_get_packet #

fn (s &WebRTCDataChannelExtension) gd_get_packet(r_buffer &&u8, r_buffer_size &i32) GDError

fn (WebRTCDataChannelExtension) gd_put_packet #

fn (s &WebRTCDataChannelExtension) gd_put_packet(p_buffer &u8, p_buffer_size i64) GDError

fn (WebRTCDataChannelExtension) gd_get_available_packet_count #

fn (s &WebRTCDataChannelExtension) gd_get_available_packet_count() i64

fn (WebRTCDataChannelExtension) gd_get_max_packet_size #

fn (s &WebRTCDataChannelExtension) gd_get_max_packet_size() i64

fn (WebRTCDataChannelExtension) gd_poll #

fn (s &WebRTCDataChannelExtension) gd_poll() GDError

fn (WebRTCDataChannelExtension) gd_close #

fn (s &WebRTCDataChannelExtension) gd_close()

fn (WebRTCDataChannelExtension) gd_set_write_mode #

fn (s &WebRTCDataChannelExtension) gd_set_write_mode(p_write_mode WebRTCDataChannelWriteMode)

fn (WebRTCDataChannelExtension) gd_get_write_mode #

fn (s &WebRTCDataChannelExtension) gd_get_write_mode() WebRTCDataChannelWriteMode

fn (WebRTCDataChannelExtension) gd_was_string_packet #

fn (s &WebRTCDataChannelExtension) gd_was_string_packet() bool

fn (WebRTCDataChannelExtension) gd_get_ready_state #

fn (s &WebRTCDataChannelExtension) gd_get_ready_state() WebRTCDataChannelChannelState

fn (WebRTCDataChannelExtension) gd_get_label #

fn (s &WebRTCDataChannelExtension) gd_get_label() string

fn (WebRTCDataChannelExtension) gd_is_ordered #

fn (s &WebRTCDataChannelExtension) gd_is_ordered() bool

fn (WebRTCDataChannelExtension) gd_get_id #

fn (s &WebRTCDataChannelExtension) gd_get_id() i64

fn (WebRTCDataChannelExtension) gd_get_max_packet_life_time #

fn (s &WebRTCDataChannelExtension) gd_get_max_packet_life_time() i64

fn (WebRTCDataChannelExtension) gd_get_max_retransmits #

fn (s &WebRTCDataChannelExtension) gd_get_max_retransmits() i64

fn (WebRTCDataChannelExtension) gd_get_protocol #

fn (s &WebRTCDataChannelExtension) gd_get_protocol() string

fn (WebRTCDataChannelExtension) gd_is_negotiated #

fn (s &WebRTCDataChannelExtension) gd_is_negotiated() bool

fn (WebRTCDataChannelExtension) gd_get_buffered_amount #

fn (s &WebRTCDataChannelExtension) gd_get_buffered_amount() i64

struct WebRTCMultiplayerPeer #

struct WebRTCMultiplayerPeer {
	MultiplayerPeer
}

A simple interface to create a peer-to-peer mesh network composed of [WebRTCPeerConnection] that is compatible with the [MultiplayerAPI].

fn (WebRTCMultiplayerPeer) to_variant #

fn (s &WebRTCMultiplayerPeer) to_variant() Variant

fn (WebRTCMultiplayerPeer) from_variant #

fn (mut s WebRTCMultiplayerPeer) from_variant(variant &Variant)

fn (WebRTCMultiplayerPeer) create_server #

fn (s &WebRTCMultiplayerPeer) create_server(cfg WebRTCMultiplayerPeer_create_server_Cfg) GDError

Initialize the multiplayer peer as a server (with unique ID of 1). This mode enables [method MultiplayerPeer.is_server_relay_supported], allowing the upper [MultiplayerAPI] layer to perform peer exchange and packet relaying. You can optionally specify a [param channels_config] array of [enum MultiplayerPeer.TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).

fn (WebRTCMultiplayerPeer) create_client #

fn (s &WebRTCMultiplayerPeer) create_client(peer_id i64, cfg WebRTCMultiplayerPeer_create_client_Cfg) GDError

Initialize the multiplayer peer as a client with the given [param peer_id] (must be between 2 and 2147483647). In this mode, you should only call [method add_peer] once and with [param peer_id] of 1. This mode enables [method MultiplayerPeer.is_server_relay_supported], allowing the upper [MultiplayerAPI] layer to perform peer exchange and packet relaying. You can optionally specify a [param channels_config] array of [enum MultiplayerPeer.TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).

fn (WebRTCMultiplayerPeer) create_mesh #

fn (s &WebRTCMultiplayerPeer) create_mesh(peer_id i64, cfg WebRTCMultiplayerPeer_create_mesh_Cfg) GDError

Initialize the multiplayer peer as a mesh (i.e. all peers connect to each other) with the given [param peer_id] (must be between 1 and 2147483647).

fn (WebRTCMultiplayerPeer) add_peer #

fn (s &WebRTCMultiplayerPeer) add_peer(peer WebRTCPeerConnection, peer_id i64, cfg WebRTCMultiplayerPeer_add_peer_Cfg) GDError

Add a new peer to the mesh with the given [param peer_id]. The [WebRTCPeerConnection] must be in state [constant WebRTCPeerConnection.STATE_NEW]. Three channels will be created for reliable, unreliable, and ordered transport. The value of [param unreliable_lifetime] will be passed to the "maxPacketLifetime" option when creating unreliable and ordered channels (see [method WebRTCPeerConnection.create_data_channel]).

fn (WebRTCMultiplayerPeer) remove_peer #

fn (s &WebRTCMultiplayerPeer) remove_peer(peer_id i64)

Remove the peer with given [param peer_id] from the mesh. If the peer was connected, and [signal MultiplayerPeer.peer_connected] was emitted for it, then [signal MultiplayerPeer.peer_disconnected] will be emitted.

fn (WebRTCMultiplayerPeer) has_peer #

fn (s &WebRTCMultiplayerPeer) has_peer(peer_id i64) bool

Returns true if the given [param peer_id] is in the peers map (it might not be connected though).

fn (WebRTCMultiplayerPeer) get_peer #

fn (s &WebRTCMultiplayerPeer) get_peer(peer_id i64) Dictionary

Returns a dictionary representation of the peer with given [param peer_id] with three keys. "connection" containing the [WebRTCPeerConnection] to this peer, "channels" an array of three [WebRTCDataChannel], and "connected" a boolean representing if the peer connection is currently connected (all three channels are open).

fn (WebRTCMultiplayerPeer) get_peers #

fn (s &WebRTCMultiplayerPeer) get_peers() Dictionary

Returns a dictionary which keys are the peer ids and values the peer representation as in [method get_peer].

struct WebRTCMultiplayerPeer_add_peer_Cfg #

@[params]
struct WebRTCMultiplayerPeer_add_peer_Cfg {
pub:
	unreliable_lifetime i64 = 1
}

Optional parameters for WebRTCMultiplayerPeer#add_peer

struct WebRTCMultiplayerPeer_create_client_Cfg #

@[params]
struct WebRTCMultiplayerPeer_create_client_Cfg {
pub:
	channels_config Array = Array.new0()
}

Optional parameters for WebRTCMultiplayerPeer#create_client

struct WebRTCMultiplayerPeer_create_mesh_Cfg #

@[params]
struct WebRTCMultiplayerPeer_create_mesh_Cfg {
pub:
	channels_config Array = Array.new0()
}

Optional parameters for WebRTCMultiplayerPeer#create_mesh

struct WebRTCMultiplayerPeer_create_server_Cfg #

@[params]
struct WebRTCMultiplayerPeer_create_server_Cfg {
pub:
	channels_config Array = Array.new0()
}

Optional parameters for WebRTCMultiplayerPeer#create_server

struct WebRTCPeerConnection #

struct WebRTCPeerConnection {
	RefCounted
}

Interface to a WebRTC peer connection.

fn (WebRTCPeerConnection) to_variant #

fn (s &WebRTCPeerConnection) to_variant() Variant

fn (WebRTCPeerConnection) from_variant #

fn (mut s WebRTCPeerConnection) from_variant(variant &Variant)

fn (WebRTCPeerConnection) initialize #

fn (s &WebRTCPeerConnection) initialize(cfg WebRTCPeerConnection_initialize_Cfg) GDError

Re-initialize this peer connection, closing any previously active connection, and going back to state [constant STATE_NEW]. A dictionary of [param configuration] options can be passed to configure the peer connection. Valid [param configuration] options are:

{
'iceServers': [
{
'urls': [ 'stun:stun.example.com:3478' ], ##},
{
'urls': [ 'turn:turn.example.com:3478' ], ##'username': 'a_username', ##'credential': 'a_password', ##}
]
}

fn (WebRTCPeerConnection) create_data_channel #

fn (s &WebRTCPeerConnection) create_data_channel(label string, cfg WebRTCPeerConnection_create_data_channel_Cfg) WebRTCDataChannel

Returns a new [WebRTCDataChannel] (or null on failure) with given [param label] and optionally configured via the [param options] dictionary. This method can only be called when the connection is in state [constant STATE_NEW]. There are two ways to create a working data channel: either call [method create_data_channel] on only one of the peer and listen to [signal data_channel_received] on the other, or call [method create_data_channel] on both peers, with the same values, and the "negotiated" option set to true. Valid [param options] are:

{
'negotiated': true, ##'id': 1, ##
##'maxRetransmits': 1, ##'maxPacketLifeTime': 100, ##'ordered': true, ##
'protocol': 'my-custom-protocol', ##}

[b]Note:[/b] You must keep a reference to channels created this way, or it will be closed.

fn (WebRTCPeerConnection) create_offer #

fn (s &WebRTCPeerConnection) create_offer() GDError

Creates a new SDP offer to start a WebRTC connection with a remote peer. At least one [WebRTCDataChannel] must have been created before calling this method. If this functions returns [constant OK], [signal session_description_created] will be called when the session is ready to be sent.

fn (WebRTCPeerConnection) set_local_description #

fn (s &WebRTCPeerConnection) set_local_description(gd_type string, sdp string) GDError

Sets the SDP description of the local peer. This should be called in response to [signal session_description_created]. After calling this function the peer will start emitting [signal ice_candidate_created] (unless an [enum Error] different from [constant OK] is returned).

fn (WebRTCPeerConnection) set_remote_description #

fn (s &WebRTCPeerConnection) set_remote_description(gd_type string, sdp string) GDError

Sets the SDP description of the remote peer. This should be called with the values generated by a remote peer and received over the signaling server. If [param type] is "offer" the peer will emit [signal session_description_created] with the appropriate answer. If [param type] is "answer" the peer will start emitting [signal ice_candidate_created].

fn (WebRTCPeerConnection) add_ice_candidate #

fn (s &WebRTCPeerConnection) add_ice_candidate(media string, index i64, name string) GDError

Add an ice candidate generated by a remote peer (and received over the signaling server). See [signal ice_candidate_created].

fn (WebRTCPeerConnection) poll #

fn (s &WebRTCPeerConnection) poll() GDError

Call this method frequently (e.g. in [method Node._process] or [method Node._physics_process]) to properly receive signals.

fn (WebRTCPeerConnection) close #

fn (s &WebRTCPeerConnection) close()

Close the peer connection and all data channels associated with it. [b]Note:[/b] You cannot reuse this object for a new connection unless you call [method initialize].

fn (WebRTCPeerConnection) get_connection_state #

fn (s &WebRTCPeerConnection) get_connection_state() WebRTCPeerConnectionConnectionState

Returns the connection state.

fn (WebRTCPeerConnection) get_gathering_state #

fn (s &WebRTCPeerConnection) get_gathering_state() WebRTCPeerConnectionGatheringState

Returns the ICE [enum GatheringState] of the connection. This lets you detect, for example, when collection of ICE candidates has finished.

fn (WebRTCPeerConnection) get_signaling_state #

fn (s &WebRTCPeerConnection) get_signaling_state() WebRTCPeerConnectionSignalingState

Returns the signaling state on the local end of the connection while connecting or reconnecting to another peer.

struct WebRTCPeerConnectionExtension #

struct WebRTCPeerConnectionExtension {
	WebRTCPeerConnection
}

fn (WebRTCPeerConnectionExtension) to_variant #

fn (s &WebRTCPeerConnectionExtension) to_variant() Variant

fn (WebRTCPeerConnectionExtension) from_variant #

fn (mut s WebRTCPeerConnectionExtension) from_variant(variant &Variant)

fn (WebRTCPeerConnectionExtension) gd_get_connection_state #

fn (s &WebRTCPeerConnectionExtension) gd_get_connection_state() WebRTCPeerConnectionConnectionState

fn (WebRTCPeerConnectionExtension) gd_get_gathering_state #

fn (s &WebRTCPeerConnectionExtension) gd_get_gathering_state() WebRTCPeerConnectionGatheringState

fn (WebRTCPeerConnectionExtension) gd_get_signaling_state #

fn (s &WebRTCPeerConnectionExtension) gd_get_signaling_state() WebRTCPeerConnectionSignalingState

fn (WebRTCPeerConnectionExtension) gd_initialize #

fn (s &WebRTCPeerConnectionExtension) gd_initialize(p_config Dictionary) GDError

fn (WebRTCPeerConnectionExtension) gd_create_data_channel #

fn (s &WebRTCPeerConnectionExtension) gd_create_data_channel(p_label string, p_config Dictionary) WebRTCDataChannel

fn (WebRTCPeerConnectionExtension) gd_create_offer #

fn (s &WebRTCPeerConnectionExtension) gd_create_offer() GDError

fn (WebRTCPeerConnectionExtension) gd_set_remote_description #

fn (s &WebRTCPeerConnectionExtension) gd_set_remote_description(p_type string, p_sdp string) GDError

fn (WebRTCPeerConnectionExtension) gd_set_local_description #

fn (s &WebRTCPeerConnectionExtension) gd_set_local_description(p_type string, p_sdp string) GDError

fn (WebRTCPeerConnectionExtension) gd_add_ice_candidate #

fn (s &WebRTCPeerConnectionExtension) gd_add_ice_candidate(p_sdp_mid_name string, p_sdp_mline_index i64, p_sdp_name string) GDError

fn (WebRTCPeerConnectionExtension) gd_poll #

fn (s &WebRTCPeerConnectionExtension) gd_poll() GDError

fn (WebRTCPeerConnectionExtension) gd_close #

fn (s &WebRTCPeerConnectionExtension) gd_close()

struct WebRTCPeerConnection_create_data_channel_Cfg #

@[params]
struct WebRTCPeerConnection_create_data_channel_Cfg {
pub:
	options Dictionary
}

Optional parameters for WebRTCPeerConnection#create_data_channel

struct WebRTCPeerConnection_initialize_Cfg #

@[params]
struct WebRTCPeerConnection_initialize_Cfg {
pub:
	configuration Dictionary
}

Optional parameters for WebRTCPeerConnection#initialize

struct WebSocketMultiplayerPeer #

struct WebSocketMultiplayerPeer {
	MultiplayerPeer
}

Base class for WebSocket server and client.

fn (WebSocketMultiplayerPeer) to_variant #

fn (s &WebSocketMultiplayerPeer) to_variant() Variant

fn (WebSocketMultiplayerPeer) from_variant #

fn (mut s WebSocketMultiplayerPeer) from_variant(variant &Variant)

fn (WebSocketMultiplayerPeer) create_client #

fn (s &WebSocketMultiplayerPeer) create_client(url string, cfg WebSocketMultiplayerPeer_create_client_Cfg) GDError

Starts a new multiplayer client connecting to the given [param url]. TLS certificates will be verified against the hostname when connecting using the wss:// protocol. You can pass the optional [param tls_client_options] parameter to customize the trusted certification authorities, or disable the common name verification. See [method TLSOptions.client] and [method TLSOptions.client_unsafe]. [b]Note:[/b] It is recommended to specify the scheme part of the URL, i.e. the [param url] should start with either ws:// or wss://.

fn (WebSocketMultiplayerPeer) create_server #

fn (s &WebSocketMultiplayerPeer) create_server(port i64, cfg WebSocketMultiplayerPeer_create_server_Cfg) GDError

Starts a new multiplayer server listening on the given [param port]. You can optionally specify a [param bind_address], and provide valid [param tls_server_options] to use TLS. See [method TLSOptions.server].

fn (WebSocketMultiplayerPeer) get_peer #

fn (s &WebSocketMultiplayerPeer) get_peer(peer_id i64) WebSocketPeer

Returns the [WebSocketPeer] associated to the given [param peer_id].

fn (WebSocketMultiplayerPeer) get_peer_address #

fn (s &WebSocketMultiplayerPeer) get_peer_address(id i64) string

Returns the IP address of the given peer.

fn (WebSocketMultiplayerPeer) get_peer_port #

fn (s &WebSocketMultiplayerPeer) get_peer_port(id i64) i64

Returns the remote port of the given peer.

fn (WebSocketMultiplayerPeer) get_supported_protocols #

fn (s &WebSocketMultiplayerPeer) get_supported_protocols() PackedStringArray

fn (WebSocketMultiplayerPeer) set_supported_protocols #

fn (s &WebSocketMultiplayerPeer) set_supported_protocols(protocols PackedStringArray)

fn (WebSocketMultiplayerPeer) get_handshake_headers #

fn (s &WebSocketMultiplayerPeer) get_handshake_headers() PackedStringArray

fn (WebSocketMultiplayerPeer) set_handshake_headers #

fn (s &WebSocketMultiplayerPeer) set_handshake_headers(protocols PackedStringArray)

fn (WebSocketMultiplayerPeer) get_inbound_buffer_size #

fn (s &WebSocketMultiplayerPeer) get_inbound_buffer_size() i64

fn (WebSocketMultiplayerPeer) set_inbound_buffer_size #

fn (s &WebSocketMultiplayerPeer) set_inbound_buffer_size(buffer_size i64)

fn (WebSocketMultiplayerPeer) get_outbound_buffer_size #

fn (s &WebSocketMultiplayerPeer) get_outbound_buffer_size() i64

fn (WebSocketMultiplayerPeer) set_outbound_buffer_size #

fn (s &WebSocketMultiplayerPeer) set_outbound_buffer_size(buffer_size i64)

fn (WebSocketMultiplayerPeer) get_handshake_timeout #

fn (s &WebSocketMultiplayerPeer) get_handshake_timeout() f64

fn (WebSocketMultiplayerPeer) set_handshake_timeout #

fn (s &WebSocketMultiplayerPeer) set_handshake_timeout(timeout f64)

fn (WebSocketMultiplayerPeer) set_max_queued_packets #

fn (s &WebSocketMultiplayerPeer) set_max_queued_packets(max_queued_packets i64)

fn (WebSocketMultiplayerPeer) get_max_queued_packets #

fn (s &WebSocketMultiplayerPeer) get_max_queued_packets() i64

struct WebSocketMultiplayerPeer_create_client_Cfg #

@[params]
struct WebSocketMultiplayerPeer_create_client_Cfg {
pub:
	tls_client_options TLSOptions
}

Optional parameters for WebSocketMultiplayerPeer#create_client

struct WebSocketMultiplayerPeer_create_server_Cfg #

@[params]
struct WebSocketMultiplayerPeer_create_server_Cfg {
pub:
	bind_address       string
	tls_server_options TLSOptions
}

Optional parameters for WebSocketMultiplayerPeer#create_server

struct WebSocketPeer #

struct WebSocketPeer {
	PacketPeer
}

A WebSocket connection.

fn (WebSocketPeer) to_variant #

fn (s &WebSocketPeer) to_variant() Variant

fn (WebSocketPeer) from_variant #

fn (mut s WebSocketPeer) from_variant(variant &Variant)

fn (WebSocketPeer) connect_to_url #

fn (s &WebSocketPeer) connect_to_url(url string, cfg WebSocketPeer_connect_to_url_Cfg) GDError

Connects to the given URL. TLS certificates will be verified against the hostname when connecting using the wss:// protocol. You can pass the optional [param tls_client_options] parameter to customize the trusted certification authorities, or disable the common name verification. See [method TLSOptions.client] and [method TLSOptions.client_unsafe]. [b]Note:[/b] This method is non-blocking, and will return [constant OK] before the connection is established as long as the provided parameters are valid and the peer is not in an invalid state (e.g. already connected). Regularly call [method poll] (e.g. during [Node] process) and check the result of [method get_ready_state] to know whether the connection succeeds or fails. [b]Note:[/b] To avoid mixed content warnings or errors in Web, you may have to use a [param url] that starts with wss:// (secure) instead of ws://. When doing so, make sure to use the fully qualified domain name that matches the one defined in the server's TLS certificate. Do not connect directly via the IP address for wss:// connections, as it won't match with the TLS certificate.

fn (WebSocketPeer) accept_stream #

fn (s &WebSocketPeer) accept_stream(stream StreamPeer) GDError

Accepts a peer connection performing the HTTP handshake as a WebSocket server. The [param stream] must be a valid TCP stream retrieved via [method TCPServer.take_connection], or a TLS stream accepted via [method StreamPeerTLS.accept_stream]. [b]Note:[/b] Not supported in Web exports due to browsers' restrictions.

fn (WebSocketPeer) send #

fn (s &WebSocketPeer) send(message PackedByteArray, cfg WebSocketPeer_send_Cfg) GDError

Sends the given [param message] using the desired [param write_mode]. When sending a [String], prefer using [method send_text].

fn (WebSocketPeer) send_text #

fn (s &WebSocketPeer) send_text(message string) GDError

Sends the given [param message] using WebSocket text mode. Prefer this method over [method PacketPeer.put_packet] when interacting with third-party text-based API (e.g. when using [JSON] formatted messages).

fn (WebSocketPeer) was_string_packet #

fn (s &WebSocketPeer) was_string_packet() bool

Returns true if the last received packet was sent as a text payload. See [enum WriteMode].

fn (WebSocketPeer) poll #

fn (s &WebSocketPeer) poll()

Updates the connection state and receive incoming packets. Call this function regularly to keep it in a clean state.

fn (WebSocketPeer) close #

fn (s &WebSocketPeer) close(cfg WebSocketPeer_close_Cfg)

Closes this WebSocket connection. [param code] is the status code for the closure (see RFC 6455 section 7.4 for a list of valid status codes). [param reason] is the human readable reason for closing the connection (can be any UTF-8 string that's smaller than 123 bytes). If [param code] is negative, the connection will be closed immediately without notifying the remote peer. [b]Note:[/b] To achieve a clean close, you will need to keep polling until [constant STATE_CLOSED] is reached. [b]Note:[/b] The Web export might not support all status codes. Please refer to browser-specific documentation for more details.

fn (WebSocketPeer) get_connected_host #

fn (s &WebSocketPeer) get_connected_host() string

Returns the IP address of the connected peer. [b]Note:[/b] Not available in the Web export.

fn (WebSocketPeer) get_connected_port #

fn (s &WebSocketPeer) get_connected_port() i64

Returns the remote port of the connected peer. [b]Note:[/b] Not available in the Web export.

fn (WebSocketPeer) get_selected_protocol #

fn (s &WebSocketPeer) get_selected_protocol() string

Returns the selected WebSocket sub-protocol for this connection or an empty string if the sub-protocol has not been selected yet.

fn (WebSocketPeer) get_requested_url #

fn (s &WebSocketPeer) get_requested_url() string

Returns the URL requested by this peer. The URL is derived from the url passed to [method connect_to_url] or from the HTTP headers when acting as server (i.e. when using [method accept_stream]).

fn (WebSocketPeer) set_no_delay #

fn (s &WebSocketPeer) set_no_delay(enabled bool)

Disable Nagle's algorithm on the underlying TCP socket (default). See [method StreamPeerTCP.set_no_delay] for more information. [b]Note:[/b] Not available in the Web export.

fn (WebSocketPeer) get_current_outbound_buffered_amount #

fn (s &WebSocketPeer) get_current_outbound_buffered_amount() i64

Returns the current amount of data in the outbound websocket buffer. [b]Note:[/b] Web exports use WebSocket.bufferedAmount, while other platforms use an internal buffer.

fn (WebSocketPeer) get_ready_state #

fn (s &WebSocketPeer) get_ready_state() WebSocketPeerState

Returns the ready state of the connection.

fn (WebSocketPeer) get_close_code #

fn (s &WebSocketPeer) get_close_code() i64

Returns the received WebSocket close frame status code, or -1 when the connection was not cleanly closed. Only call this method when [method get_ready_state] returns [constant STATE_CLOSED].

fn (WebSocketPeer) get_close_reason #

fn (s &WebSocketPeer) get_close_reason() string

Returns the received WebSocket close frame status reason string. Only call this method when [method get_ready_state] returns [constant STATE_CLOSED].

fn (WebSocketPeer) get_supported_protocols #

fn (s &WebSocketPeer) get_supported_protocols() PackedStringArray

fn (WebSocketPeer) set_supported_protocols #

fn (s &WebSocketPeer) set_supported_protocols(protocols PackedStringArray)

fn (WebSocketPeer) get_handshake_headers #

fn (s &WebSocketPeer) get_handshake_headers() PackedStringArray

fn (WebSocketPeer) set_handshake_headers #

fn (s &WebSocketPeer) set_handshake_headers(protocols PackedStringArray)

fn (WebSocketPeer) get_inbound_buffer_size #

fn (s &WebSocketPeer) get_inbound_buffer_size() i64

fn (WebSocketPeer) set_inbound_buffer_size #

fn (s &WebSocketPeer) set_inbound_buffer_size(buffer_size i64)

fn (WebSocketPeer) get_outbound_buffer_size #

fn (s &WebSocketPeer) get_outbound_buffer_size() i64

fn (WebSocketPeer) set_outbound_buffer_size #

fn (s &WebSocketPeer) set_outbound_buffer_size(buffer_size i64)

fn (WebSocketPeer) set_max_queued_packets #

fn (s &WebSocketPeer) set_max_queued_packets(buffer_size i64)

fn (WebSocketPeer) get_max_queued_packets #

fn (s &WebSocketPeer) get_max_queued_packets() i64

fn (WebSocketPeer) set_heartbeat_interval #

fn (s &WebSocketPeer) set_heartbeat_interval(interval f64)

fn (WebSocketPeer) get_heartbeat_interval #

fn (s &WebSocketPeer) get_heartbeat_interval() f64

struct WebSocketPeer_close_Cfg #

@[params]
struct WebSocketPeer_close_Cfg {
pub:
	code   i64 = 1000
	reason string
}

Optional parameters for WebSocketPeer#close

struct WebSocketPeer_connect_to_url_Cfg #

@[params]
struct WebSocketPeer_connect_to_url_Cfg {
pub:
	tls_client_options TLSOptions
}

Optional parameters for WebSocketPeer#connect_to_url

struct WebSocketPeer_send_Cfg #

@[params]
struct WebSocketPeer_send_Cfg {
pub:
	write_mode WebSocketPeerWriteMode = unsafe { WebSocketPeerWriteMode(1) }
}

Optional parameters for WebSocketPeer#send

struct WebXRInterface #

struct WebXRInterface {
	XRInterface
}

XR interface using WebXR.

fn (WebXRInterface) to_variant #

fn (s &WebXRInterface) to_variant() Variant

fn (WebXRInterface) from_variant #

fn (mut s WebXRInterface) from_variant(variant &Variant)

fn (WebXRInterface) is_session_supported #

fn (s &WebXRInterface) is_session_supported(session_mode string)

Checks if the given [param session_mode] is supported by the user's browser. Possible values come from [url=https://developer.mozilla.org/en-US/docs/Web/API/XRSessionMode]WebXR's XRSessionMode[/url], including: "immersive-vr", "immersive-ar", and "inline". This method returns nothing, instead it emits the [signal session_supported] signal with the result.

fn (WebXRInterface) set_session_mode #

fn (s &WebXRInterface) set_session_mode(session_mode string)

fn (WebXRInterface) get_session_mode #

fn (s &WebXRInterface) get_session_mode() string

fn (WebXRInterface) set_required_features #

fn (s &WebXRInterface) set_required_features(required_features string)

fn (WebXRInterface) get_required_features #

fn (s &WebXRInterface) get_required_features() string

fn (WebXRInterface) set_optional_features #

fn (s &WebXRInterface) set_optional_features(optional_features string)

fn (WebXRInterface) get_optional_features #

fn (s &WebXRInterface) get_optional_features() string

fn (WebXRInterface) get_reference_space_type #

fn (s &WebXRInterface) get_reference_space_type() string

fn (WebXRInterface) get_enabled_features #

fn (s &WebXRInterface) get_enabled_features() string

fn (WebXRInterface) set_requested_reference_space_types #

fn (s &WebXRInterface) set_requested_reference_space_types(requested_reference_space_types string)

fn (WebXRInterface) get_requested_reference_space_types #

fn (s &WebXRInterface) get_requested_reference_space_types() string

fn (WebXRInterface) is_input_source_active #

fn (s &WebXRInterface) is_input_source_active(input_source_id i64) bool

Returns true if there is an active input source with the given [param input_source_id].

fn (WebXRInterface) get_input_source_tracker #

fn (s &WebXRInterface) get_input_source_tracker(input_source_id i64) XRControllerTracker

Gets an [XRControllerTracker] for the given [param input_source_id]. In the context of WebXR, an input source can be an advanced VR controller like the Oculus Touch or Index controllers, or even a tap on the screen, a spoken voice command or a button press on the device itself. When a non-traditional input source is used, interpret the position and orientation of the [XRPositionalTracker] as a ray pointing at the object the user wishes to interact with. Use this method to get information about the input source that triggered one of these signals:- [signal selectstart]

  • [signal select]
  • [signal selectend]
  • [signal squeezestart]
  • [signal squeeze]
  • [signal squeezestart]

fn (WebXRInterface) get_input_source_target_ray_mode #

fn (s &WebXRInterface) get_input_source_target_ray_mode(input_source_id i64) WebXRInterfaceTargetRayMode

Returns the target ray mode for the given [param input_source_id]. This can help interpret the input coming from that input source. See [url=https://developer.mozilla.org/en-US/docs/Web/API/XRInputSource/targetRayMode]XRInputSource.targetRayMode[/url] for more information.

fn (WebXRInterface) get_visibility_state #

fn (s &WebXRInterface) get_visibility_state() string

fn (WebXRInterface) get_display_refresh_rate #

fn (s &WebXRInterface) get_display_refresh_rate() f64

Returns the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It may not report an accurate value until after using [method set_display_refresh_rate].

fn (WebXRInterface) set_display_refresh_rate #

fn (s &WebXRInterface) set_display_refresh_rate(refresh_rate f64)

Sets the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It won't take effect right away until after [signal display_refresh_rate_changed] is emitted.

fn (WebXRInterface) get_available_display_refresh_rates #

fn (s &WebXRInterface) get_available_display_refresh_rates() Array

Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the web browser and after the interface has been initialized.

struct Window #

struct Window {
	Viewport
}

Base class for all windows, dialogs, and popups.

fn (Window) to_variant #

fn (s &Window) to_variant() Variant

fn (Window) from_variant #

fn (mut s Window) from_variant(variant &Variant)

fn (Window) gd_get_contents_minimum_size #

fn (s &Window) gd_get_contents_minimum_size() Vector2

Virtual method to be implemented by the user. Overrides the value returned by [method get_contents_minimum_size].

fn (Window) set_title #

fn (s &Window) set_title(title string)

fn (Window) get_title #

fn (s &Window) get_title() string

fn (Window) set_initial_position #

fn (s &Window) set_initial_position(initial_position WindowInitialPosition)

fn (Window) get_initial_position #

fn (s &Window) get_initial_position() WindowInitialPosition

fn (Window) set_current_screen #

fn (s &Window) set_current_screen(index i64)

fn (Window) get_current_screen #

fn (s &Window) get_current_screen() i64

fn (Window) set_position #

fn (s &Window) set_position(position Vector2i)

fn (Window) get_position #

fn (s &Window) get_position() Vector2i

fn (Window) move_to_center #

fn (s &Window) move_to_center()

Centers a native window on the current screen and an embedded window on its embedder [Viewport].

fn (Window) set_size #

fn (s &Window) set_size(size Vector2i)

fn (Window) get_size #

fn (s &Window) get_size() Vector2i

fn (Window) reset_size #

fn (s &Window) reset_size()

Resets the size to the minimum size, which is the max of [member min_size] and (if [member wrap_controls] is enabled) [method get_contents_minimum_size]. This is equivalent to calling set_size(Vector2i()) (or any size below the minimum).

fn (Window) get_position_with_decorations #

fn (s &Window) get_position_with_decorations() Vector2i

Returns the window's position including its border. [b]Note:[/b] If [member visible] is false, this method returns the same value as [member position].

fn (Window) get_size_with_decorations #

fn (s &Window) get_size_with_decorations() Vector2i

Returns the window's size including its border. [b]Note:[/b] If [member visible] is false, this method returns the same value as [member size].

fn (Window) set_max_size #

fn (s &Window) set_max_size(max_size Vector2i)

fn (Window) get_max_size #

fn (s &Window) get_max_size() Vector2i

fn (Window) set_min_size #

fn (s &Window) set_min_size(min_size Vector2i)

fn (Window) get_min_size #

fn (s &Window) get_min_size() Vector2i

fn (Window) set_mode #

fn (s &Window) set_mode(mode WindowMode)

fn (Window) get_mode #

fn (s &Window) get_mode() WindowMode

fn (Window) set_flag #

fn (s &Window) set_flag(flag WindowFlags, enabled bool)

Sets a specified window flag.

fn (Window) get_flag #

fn (s &Window) get_flag(flag WindowFlags) bool

Returns true if the [param flag] is set.

fn (Window) is_maximize_allowed #

fn (s &Window) is_maximize_allowed() bool

Returns true if the window can be maximized (the maximize button is enabled).

fn (Window) request_attention #

fn (s &Window) request_attention()

Tells the OS that the [Window] needs an attention. This makes the window stand out in some way depending on the system, e.g. it might blink on the task bar.

fn (Window) move_to_foreground #

fn (s &Window) move_to_foreground()

Causes the window to grab focus, allowing it to receive user input.

fn (Window) set_visible #

fn (s &Window) set_visible(visible bool)

fn (Window) is_visible #

fn (s &Window) is_visible() bool

fn (Window) hide #

fn (s &Window) hide()

Hides the window. This is not the same as minimized state. Hidden window can't be interacted with and needs to be made visible with [method show].

fn (Window) show #

fn (s &Window) show()

Makes the [Window] appear. This enables interactions with the [Window] and doesn't change any of its property other than visibility (unlike e.g. [method popup]).

fn (Window) set_transient #

fn (s &Window) set_transient(transient bool)

fn (Window) is_transient #

fn (s &Window) is_transient() bool

fn (Window) set_transient_to_focused #

fn (s &Window) set_transient_to_focused(enable bool)

fn (Window) is_transient_to_focused #

fn (s &Window) is_transient_to_focused() bool

fn (Window) set_exclusive #

fn (s &Window) set_exclusive(exclusive bool)

fn (Window) is_exclusive #

fn (s &Window) is_exclusive() bool

fn (Window) set_unparent_when_invisible #

fn (s &Window) set_unparent_when_invisible(unparent bool)

If [param unparent] is true, the window is automatically unparented when going invisible. [b]Note:[/b] Make sure to keep a reference to the node, otherwise it will be orphaned. You also need to manually call [method Node.queue_free] to free the window if it's not parented.

fn (Window) can_draw #

fn (s &Window) can_draw() bool

Returns whether the window is being drawn to the screen.

fn (Window) has_focus #

fn (s &Window) has_focus() bool

Returns true if the window is focused.

fn (Window) grab_focus #

fn (s &Window) grab_focus()

Causes the window to grab focus, allowing it to receive user input.

fn (Window) start_drag #

fn (s &Window) start_drag()

Starts an interactive drag operation on the window, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's title bar. Using this method allows the window to participate in space switching, tiling, and other system features.

fn (Window) start_resize #

fn (s &Window) start_resize(edge DisplayServerWindowResizeEdge)

Starts an interactive resize operation on the window, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's edge.

fn (Window) set_ime_active #

fn (s &Window) set_ime_active(active bool)

If [param active] is true, enables system's native IME (Input Method Editor).

fn (Window) set_ime_position #

fn (s &Window) set_ime_position(position Vector2i)

Moves IME to the given position.

fn (Window) is_embedded #

fn (s &Window) is_embedded() bool

Returns true if the window is currently embedded in another window.

fn (Window) get_contents_minimum_size #

fn (s &Window) get_contents_minimum_size() Vector2

Returns the combined minimum size from the child [Control] nodes of the window. Use [method child_controls_changed] to update it when child nodes have changed. The value returned by this method can be overridden with [method _get_contents_minimum_size].

fn (Window) set_force_native #

fn (s &Window) set_force_native(force_native bool)

fn (Window) get_force_native #

fn (s &Window) get_force_native() bool

fn (Window) set_content_scale_size #

fn (s &Window) set_content_scale_size(size Vector2i)

fn (Window) get_content_scale_size #

fn (s &Window) get_content_scale_size() Vector2i

fn (Window) set_content_scale_mode #

fn (s &Window) set_content_scale_mode(mode WindowContentScaleMode)

fn (Window) get_content_scale_mode #

fn (s &Window) get_content_scale_mode() WindowContentScaleMode

fn (Window) set_content_scale_aspect #

fn (s &Window) set_content_scale_aspect(aspect WindowContentScaleAspect)

fn (Window) get_content_scale_aspect #

fn (s &Window) get_content_scale_aspect() WindowContentScaleAspect

fn (Window) set_content_scale_stretch #

fn (s &Window) set_content_scale_stretch(stretch WindowContentScaleStretch)

fn (Window) get_content_scale_stretch #

fn (s &Window) get_content_scale_stretch() WindowContentScaleStretch

fn (Window) set_keep_title_visible #

fn (s &Window) set_keep_title_visible(title_visible bool)

fn (Window) get_keep_title_visible #

fn (s &Window) get_keep_title_visible() bool

fn (Window) set_content_scale_factor #

fn (s &Window) set_content_scale_factor(factor f64)

fn (Window) get_content_scale_factor #

fn (s &Window) get_content_scale_factor() f64

fn (Window) set_mouse_passthrough_polygon #

fn (s &Window) set_mouse_passthrough_polygon(polygon PackedVector2Array)

fn (Window) get_mouse_passthrough_polygon #

fn (s &Window) get_mouse_passthrough_polygon() PackedVector2Array

fn (Window) set_wrap_controls #

fn (s &Window) set_wrap_controls(enable bool)

fn (Window) is_wrapping_controls #

fn (s &Window) is_wrapping_controls() bool

fn (Window) child_controls_changed #

fn (s &Window) child_controls_changed()

Requests an update of the [Window] size to fit underlying [Control] nodes.

fn (Window) set_theme #

fn (s &Window) set_theme(theme Theme)

fn (Window) get_theme #

fn (s &Window) get_theme() Theme

fn (Window) set_theme_type_variation #

fn (s &Window) set_theme_type_variation(theme_type string)

fn (Window) get_theme_type_variation #

fn (s &Window) get_theme_type_variation() string

fn (Window) begin_bulk_theme_override #

fn (s &Window) begin_bulk_theme_override()

Prevents *_theme_*_override methods from emitting [constant NOTIFICATION_THEME_CHANGED] until [method end_bulk_theme_override] is called.

fn (Window) end_bulk_theme_override #

fn (s &Window) end_bulk_theme_override()

Ends a bulk theme override update. See [method begin_bulk_theme_override].

fn (Window) add_theme_icon_override #

fn (s &Window) add_theme_icon_override(name string, texture Texture2D)

Creates a local override for a theme icon with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override]. See also [method get_theme_icon].

fn (Window) add_theme_stylebox_override #

fn (s &Window) add_theme_stylebox_override(name string, stylebox StyleBox)

Creates a local override for a theme [StyleBox] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override]. See also [method get_theme_stylebox] and [method Control.add_theme_stylebox_override] for more details.

fn (Window) add_theme_font_override #

fn (s &Window) add_theme_font_override(name string, font Font)

Creates a local override for a theme [Font] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override]. See also [method get_theme_font].

fn (Window) add_theme_font_size_override #

fn (s &Window) add_theme_font_size_override(name string, font_size i64)

Creates a local override for a theme font size with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override]. See also [method get_theme_font_size].

fn (Window) add_theme_color_override #

fn (s &Window) add_theme_color_override(name string, color Color)

Creates a local override for a theme [Color] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override]. See also [method get_theme_color] and [method Control.add_theme_color_override] for more details.

fn (Window) add_theme_constant_override #

fn (s &Window) add_theme_constant_override(name string, constant i64)

Creates a local override for a theme constant with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override]. See also [method get_theme_constant].

fn (Window) remove_theme_icon_override #

fn (s &Window) remove_theme_icon_override(name string)

Removes a local override for a theme icon with the specified [param name] previously added by [method add_theme_icon_override] or via the Inspector dock.

fn (Window) remove_theme_stylebox_override #

fn (s &Window) remove_theme_stylebox_override(name string)

Removes a local override for a theme [StyleBox] with the specified [param name] previously added by [method add_theme_stylebox_override] or via the Inspector dock.

fn (Window) remove_theme_font_override #

fn (s &Window) remove_theme_font_override(name string)

Removes a local override for a theme [Font] with the specified [param name] previously added by [method add_theme_font_override] or via the Inspector dock.

fn (Window) remove_theme_font_size_override #

fn (s &Window) remove_theme_font_size_override(name string)

Removes a local override for a theme font size with the specified [param name] previously added by [method add_theme_font_size_override] or via the Inspector dock.

fn (Window) remove_theme_color_override #

fn (s &Window) remove_theme_color_override(name string)

Removes a local override for a theme [Color] with the specified [param name] previously added by [method add_theme_color_override] or via the Inspector dock.

fn (Window) remove_theme_constant_override #

fn (s &Window) remove_theme_constant_override(name string)

Removes a local override for a theme constant with the specified [param name] previously added by [method add_theme_constant_override] or via the Inspector dock.

fn (Window) get_theme_icon #

fn (s &Window) get_theme_icon(name string, cfg Window_get_theme_icon_Cfg) Texture2D

Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) get_theme_stylebox #

fn (s &Window) get_theme_stylebox(name string, cfg Window_get_theme_stylebox_Cfg) StyleBox

Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) get_theme_font #

fn (s &Window) get_theme_font(name string, cfg Window_get_theme_font_Cfg) Font

Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) get_theme_font_size #

fn (s &Window) get_theme_font_size(name string, cfg Window_get_theme_font_size_Cfg) i64

Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) get_theme_color #

fn (s &Window) get_theme_color(name string, cfg Window_get_theme_color_Cfg) Color

Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for more details.

fn (Window) get_theme_constant #

fn (s &Window) get_theme_constant(name string, cfg Window_get_theme_constant_Cfg) i64

Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for more details.

fn (Window) has_theme_icon_override #

fn (s &Window) has_theme_icon_override(name string) bool

Returns true if there is a local override for a theme icon with the specified [param name] in this [Control] node. See [method add_theme_icon_override].

fn (Window) has_theme_stylebox_override #

fn (s &Window) has_theme_stylebox_override(name string) bool

Returns true if there is a local override for a theme [StyleBox] with the specified [param name] in this [Control] node. See [method add_theme_stylebox_override].

fn (Window) has_theme_font_override #

fn (s &Window) has_theme_font_override(name string) bool

Returns true if there is a local override for a theme [Font] with the specified [param name] in this [Control] node. See [method add_theme_font_override].

fn (Window) has_theme_font_size_override #

fn (s &Window) has_theme_font_size_override(name string) bool

Returns true if there is a local override for a theme font size with the specified [param name] in this [Control] node. See [method add_theme_font_size_override].

fn (Window) has_theme_color_override #

fn (s &Window) has_theme_color_override(name string) bool

Returns true if there is a local override for a theme [Color] with the specified [param name] in this [Control] node. See [method add_theme_color_override].

fn (Window) has_theme_constant_override #

fn (s &Window) has_theme_constant_override(name string) bool

Returns true if there is a local override for a theme constant with the specified [param name] in this [Control] node. See [method add_theme_constant_override].

fn (Window) has_theme_icon #

fn (s &Window) has_theme_icon(name string, cfg Window_has_theme_icon_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has an icon item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) has_theme_stylebox #

fn (s &Window) has_theme_stylebox(name string, cfg Window_has_theme_stylebox_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a stylebox item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) has_theme_font #

fn (s &Window) has_theme_font(name string, cfg Window_has_theme_font_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a font item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) has_theme_font_size #

fn (s &Window) has_theme_font_size(name string, cfg Window_has_theme_font_size_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a font size item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) has_theme_color #

fn (s &Window) has_theme_color(name string, cfg Window_has_theme_color_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a color item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) has_theme_constant #

fn (s &Window) has_theme_constant(name string, cfg Window_has_theme_constant_Cfg) bool

Returns true if there is a matching [Theme] in the tree that has a constant item with the specified [param name] and [param theme_type]. See [method Control.get_theme_color] for details.

fn (Window) get_theme_default_base_scale #

fn (s &Window) get_theme_default_base_scale() f64

Returns the default base scale value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_base_scale] value. See [method Control.get_theme_color] for details.

fn (Window) get_theme_default_font #

fn (s &Window) get_theme_default_font() Font

Returns the default font from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font] value. See [method Control.get_theme_color] for details.

fn (Window) get_theme_default_font_size #

fn (s &Window) get_theme_default_font_size() i64

Returns the default font size value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font_size] value. See [method Control.get_theme_color] for details.

fn (Window) get_window_id #

fn (s &Window) get_window_id() i64

Returns the ID of the window.

fn (Window) set_accessibility_name #

fn (s &Window) set_accessibility_name(name string)

fn (Window) get_accessibility_name #

fn (s &Window) get_accessibility_name() string

fn (Window) set_accessibility_description #

fn (s &Window) set_accessibility_description(description string)

fn (Window) get_accessibility_description #

fn (s &Window) get_accessibility_description() string

fn (Window) set_layout_direction #

fn (s &Window) set_layout_direction(direction WindowLayoutDirection)

Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).

fn (Window) get_layout_direction #

fn (s &Window) get_layout_direction() WindowLayoutDirection

Returns layout direction and text writing direction.

fn (Window) is_layout_rtl #

fn (s &Window) is_layout_rtl() bool

Returns true if the layout is right-to-left.

fn (Window) set_auto_translate #

fn (s &Window) set_auto_translate(enable bool)

fn (Window) is_auto_translating #

fn (s &Window) is_auto_translating() bool

fn (Window) set_use_font_oversampling #

fn (s &Window) set_use_font_oversampling(enable bool)

Enables font oversampling. This makes fonts look better when they are scaled up.

fn (Window) is_using_font_oversampling #

fn (s &Window) is_using_font_oversampling() bool

Returns true if font oversampling is enabled. See [method set_use_font_oversampling].

fn (Window) popup #

fn (s &Window) popup(cfg Window_popup_Cfg)

Shows the [Window] and makes it transient (see [member transient]). If [param rect] is provided, it will be set as the [Window]'s size. Fails if called on the main window. If [member ProjectSettings.display/window/subwindows/embed_subwindows] is true (single-window mode), [param rect]'s coordinates are global and relative to the main window's top-left corner (excluding window decorations). If [param rect]'s position coordinates are negative, the window will be located outside the main window and may not be visible as a result. If [member ProjectSettings.display/window/subwindows/embed_subwindows] is false (multi-window mode), [param rect]'s coordinates are global and relative to the top-left corner of the leftmost screen. If [param rect]'s position coordinates are negative, the window will be placed at the top-left corner of the screen. [b]Note:[/b] [param rect] must be in global coordinates if specified.

fn (Window) popup_on_parent #

fn (s &Window) popup_on_parent(parent_rect Rect2i)

Popups the [Window] with a position shifted by parent [Window]'s position. If the [Window] is embedded, has the same effect as [method popup].

fn (Window) popup_centered #

fn (s &Window) popup_centered(cfg Window_popup_centered_Cfg)

Popups the [Window] at the center of the current screen, with optionally given minimum size. If the [Window] is embedded, it will be centered in the parent [Viewport] instead. [b]Note:[/b] Calling it with the default value of [param minsize] is equivalent to calling it with [member size].

fn (Window) popup_centered_ratio #

fn (s &Window) popup_centered_ratio(cfg Window_popup_centered_ratio_Cfg)

If [Window] is embedded, popups the [Window] centered inside its embedder and sets its size as a [param ratio] of embedder's size. If [Window] is a native window, popups the [Window] centered inside the screen of its parent [Window] and sets its size as a [param ratio] of the screen size.

fn (Window) popup_centered_clamped #

fn (s &Window) popup_centered_clamped(cfg Window_popup_centered_clamped_Cfg)

Popups the [Window] centered inside its parent [Window]. [param fallback_ratio] determines the maximum size of the [Window], in relation to its parent. [b]Note:[/b] Calling it with the default value of [param minsize] is equivalent to calling it with [member size].

fn (Window) popup_exclusive #

fn (s &Window) popup_exclusive(from_node Node, cfg Window_popup_exclusive_Cfg)

Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup] on it. The dialog must have no current parent, otherwise the method fails. See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].

fn (Window) popup_exclusive_on_parent #

fn (s &Window) popup_exclusive_on_parent(from_node Node, parent_rect Rect2i)

Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup_on_parent] on it. The dialog must have no current parent, otherwise the method fails. See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].

fn (Window) popup_exclusive_centered #

fn (s &Window) popup_exclusive_centered(from_node Node, cfg Window_popup_exclusive_centered_Cfg)

Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup_centered] on it. The dialog must have no current parent, otherwise the method fails. See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].

fn (Window) popup_exclusive_centered_ratio #

fn (s &Window) popup_exclusive_centered_ratio(from_node Node, cfg Window_popup_exclusive_centered_ratio_Cfg)

Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup_centered_ratio] on it. The dialog must have no current parent, otherwise the method fails. See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].

fn (Window) popup_exclusive_centered_clamped #

fn (s &Window) popup_exclusive_centered_clamped(from_node Node, cfg Window_popup_exclusive_centered_clamped_Cfg)

Attempts to parent this dialog to the last exclusive window relative to [param from_node], and then calls [method Window.popup_centered_clamped] on it. The dialog must have no current parent, otherwise the method fails. See also [method set_unparent_when_invisible] and [method Node.get_last_exclusive_window].

struct Window_get_theme_color_Cfg #

@[params]
struct Window_get_theme_color_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#get_theme_color

struct Window_get_theme_constant_Cfg #

@[params]
struct Window_get_theme_constant_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#get_theme_constant

struct Window_get_theme_font_Cfg #

@[params]
struct Window_get_theme_font_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#get_theme_font

struct Window_get_theme_font_size_Cfg #

@[params]
struct Window_get_theme_font_size_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#get_theme_font_size

struct Window_get_theme_icon_Cfg #

@[params]
struct Window_get_theme_icon_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#get_theme_icon

struct Window_get_theme_stylebox_Cfg #

@[params]
struct Window_get_theme_stylebox_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#get_theme_stylebox

struct Window_has_theme_color_Cfg #

@[params]
struct Window_has_theme_color_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#has_theme_color

struct Window_has_theme_constant_Cfg #

@[params]
struct Window_has_theme_constant_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#has_theme_constant

struct Window_has_theme_font_Cfg #

@[params]
struct Window_has_theme_font_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#has_theme_font

struct Window_has_theme_font_size_Cfg #

@[params]
struct Window_has_theme_font_size_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#has_theme_font_size

struct Window_has_theme_icon_Cfg #

@[params]
struct Window_has_theme_icon_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#has_theme_icon

struct Window_has_theme_stylebox_Cfg #

@[params]
struct Window_has_theme_stylebox_Cfg {
pub:
	theme_type string
}

Optional parameters for Window#has_theme_stylebox

struct Window_popup_Cfg #

@[params]
struct Window_popup_Cfg {
pub:
	rect Rect2i = Rect2i{Vector2i{0, 0}, Vector2i{0, 0}}
}

Optional parameters for Window#popup

struct Window_popup_centered_Cfg #

@[params]
struct Window_popup_centered_Cfg {
pub:
	minsize Vector2i = Vector2i{0, 0}
}

Optional parameters for Window#popup_centered

struct Window_popup_centered_clamped_Cfg #

@[params]
struct Window_popup_centered_clamped_Cfg {
pub:
	minsize        Vector2i = Vector2i{0, 0}
	fallback_ratio f64      = 0.75
}

Optional parameters for Window#popup_centered_clamped

struct Window_popup_centered_ratio_Cfg #

@[params]
struct Window_popup_centered_ratio_Cfg {
pub:
	ratio f64 = 0.8
}

Optional parameters for Window#popup_centered_ratio

struct Window_popup_exclusive_Cfg #

@[params]
struct Window_popup_exclusive_Cfg {
pub:
	rect Rect2i = Rect2i{Vector2i{0, 0}, Vector2i{0, 0}}
}

Optional parameters for Window#popup_exclusive

struct Window_popup_exclusive_centered_Cfg #

@[params]
struct Window_popup_exclusive_centered_Cfg {
pub:
	minsize Vector2i = Vector2i{0, 0}
}

Optional parameters for Window#popup_exclusive_centered

struct Window_popup_exclusive_centered_clamped_Cfg #

@[params]
struct Window_popup_exclusive_centered_clamped_Cfg {
pub:
	minsize        Vector2i = Vector2i{0, 0}
	fallback_ratio f64      = 0.75
}

Optional parameters for Window#popup_exclusive_centered_clamped

struct Window_popup_exclusive_centered_ratio_Cfg #

@[params]
struct Window_popup_exclusive_centered_ratio_Cfg {
pub:
	ratio f64 = 0.8
}

Optional parameters for Window#popup_exclusive_centered_ratio

struct WorkerThreadPool #

struct WorkerThreadPool {
	Object
}

A singleton that allocates some [Thread]s on startup, used to offload tasks to these threads.

fn (WorkerThreadPool) to_variant #

fn (s &WorkerThreadPool) to_variant() Variant

fn (WorkerThreadPool) from_variant #

fn (mut s WorkerThreadPool) from_variant(variant &Variant)

fn (WorkerThreadPool) add_task #

fn (s &WorkerThreadPool) add_task(action Callable, cfg WorkerThreadPool_add_task_Cfg) i64

Adds [param action] as a task to be executed by a worker thread. [param high_priority] determines if the task has a high priority or a low priority (default). You can optionally provide a [param description] to help with debugging. Returns a task ID that can be used by other methods. [b]Warning:[/b] Every task must be waited for completion using [method wait_for_task_completion] or [method wait_for_group_task_completion] at some point so that any allocated resources inside the task can be cleaned up.

fn (WorkerThreadPool) is_task_completed #

fn (s &WorkerThreadPool) is_task_completed(task_id i64) bool

Returns true if the task with the given ID is completed. [b]Note:[/b] You should only call this method between adding the task and awaiting its completion.

fn (WorkerThreadPool) wait_for_task_completion #

fn (s &WorkerThreadPool) wait_for_task_completion(task_id i64) GDError

Pauses the thread that calls this method until the task with the given ID is completed. Returns [constant @GlobalScope.OK] if the task could be successfully awaited. Returns [constant @GlobalScope.ERR_INVALID_PARAMETER] if a task with the passed ID does not exist (maybe because it was already awaited and disposed of). Returns [constant @GlobalScope.ERR_BUSY] if the call is made from another running task and, due to task scheduling, there's potential for deadlocking (e.g., the task to await may be at a lower level in the call stack and therefore can't progress). This is an advanced situation that should only matter when some tasks depend on others (in the current implementation, the tricky case is a task trying to wait on an older one).

fn (WorkerThreadPool) get_caller_task_id #

fn (s &WorkerThreadPool) get_caller_task_id() i64

Returns the task ID of the current thread calling this method, or -1 if the task is a group task, invalid or the current thread is not part of the thread pool (e.g. the main thread). Can be used by a task to get its own task ID, or to determine whether the current code is running inside the worker thread pool. [b]Note:[/b] Group tasks have their own IDs, so this method will return -1 for group tasks.

fn (WorkerThreadPool) add_group_task #

fn (s &WorkerThreadPool) add_group_task(action Callable, elements i64, cfg WorkerThreadPool_add_group_task_Cfg) i64

Adds [param action] as a group task to be executed by the worker threads. The [Callable] will be called a number of times based on [param elements], with the first thread calling it with the value 0 as a parameter, and each consecutive execution incrementing this value by 1 until it reaches element - 1. The number of threads the task is distributed to is defined by [param tasks_needed], where the default value -1 means it is distributed to all worker threads. [param high_priority] determines if the task has a high priority or a low priority (default). You can optionally provide a [param description] to help with debugging. Returns a group task ID that can be used by other methods. [b]Warning:[/b] Every task must be waited for completion using [method wait_for_task_completion] or [method wait_for_group_task_completion] at some point so that any allocated resources inside the task can be cleaned up.

fn (WorkerThreadPool) is_group_task_completed #

fn (s &WorkerThreadPool) is_group_task_completed(group_id i64) bool

Returns true if the group task with the given ID is completed. [b]Note:[/b] You should only call this method between adding the group task and awaiting its completion.

fn (WorkerThreadPool) get_group_processed_element_count #

fn (s &WorkerThreadPool) get_group_processed_element_count(group_id i64) i64

Returns how many times the [Callable] of the group task with the given ID has already been executed by the worker threads. [b]Note:[/b] If a thread has started executing the [Callable] but is yet to finish, it won't be counted.

fn (WorkerThreadPool) wait_for_group_task_completion #

fn (s &WorkerThreadPool) wait_for_group_task_completion(group_id i64)

Pauses the thread that calls this method until the group task with the given ID is completed.

fn (WorkerThreadPool) get_caller_group_id #

fn (s &WorkerThreadPool) get_caller_group_id() i64

Returns the task group ID of the current thread calling this method, or -1 if invalid or the current thread is not part of a task group.

struct WorkerThreadPool_add_group_task_Cfg #

@[params]
struct WorkerThreadPool_add_group_task_Cfg {
pub:
	tasks_needed  i64 = -1
	high_priority bool
	description   string
}

Optional parameters for WorkerThreadPool#add_group_task

struct WorkerThreadPool_add_task_Cfg #

@[params]
struct WorkerThreadPool_add_task_Cfg {
pub:
	high_priority bool
	description   string
}

Optional parameters for WorkerThreadPool#add_task

struct World2D #

struct World2D {
	Resource
}

A resource that holds all components of a 2D world, such as a canvas and a physics space.

fn (World2D) to_variant #

fn (s &World2D) to_variant() Variant

fn (World2D) from_variant #

fn (mut s World2D) from_variant(variant &Variant)

fn (World2D) get_canvas #

fn (s &World2D) get_canvas() RID

fn (World2D) get_navigation_map #

fn (s &World2D) get_navigation_map() RID

fn (World2D) get_space #

fn (s &World2D) get_space() RID

fn (World2D) get_direct_space_state #

fn (s &World2D) get_direct_space_state() PhysicsDirectSpaceState2D

struct World3D #

struct World3D {
	Resource
}

A resource that holds all components of a 3D world, such as a visual scenario and a physics space.

fn (World3D) to_variant #

fn (s &World3D) to_variant() Variant

fn (World3D) from_variant #

fn (mut s World3D) from_variant(variant &Variant)

fn (World3D) get_space #

fn (s &World3D) get_space() RID

fn (World3D) get_navigation_map #

fn (s &World3D) get_navigation_map() RID

fn (World3D) get_scenario #

fn (s &World3D) get_scenario() RID

fn (World3D) set_environment #

fn (s &World3D) set_environment(env Environment)

fn (World3D) get_environment #

fn (s &World3D) get_environment() Environment

fn (World3D) set_fallback_environment #

fn (s &World3D) set_fallback_environment(env Environment)

fn (World3D) get_fallback_environment #

fn (s &World3D) get_fallback_environment() Environment

fn (World3D) set_camera_attributes #

fn (s &World3D) set_camera_attributes(attributes CameraAttributes)

fn (World3D) get_camera_attributes #

fn (s &World3D) get_camera_attributes() CameraAttributes

fn (World3D) get_direct_space_state #

fn (s &World3D) get_direct_space_state() PhysicsDirectSpaceState3D

struct WorldBoundaryShape2D #

struct WorldBoundaryShape2D {
	Shape2D
}

A 2D world boundary (half-plane) shape used for physics collision.

fn (WorldBoundaryShape2D) to_variant #

fn (s &WorldBoundaryShape2D) to_variant() Variant

fn (WorldBoundaryShape2D) from_variant #

fn (mut s WorldBoundaryShape2D) from_variant(variant &Variant)

fn (WorldBoundaryShape2D) set_normal #

fn (s &WorldBoundaryShape2D) set_normal(normal Vector2)

fn (WorldBoundaryShape2D) get_normal #

fn (s &WorldBoundaryShape2D) get_normal() Vector2

fn (WorldBoundaryShape2D) set_distance #

fn (s &WorldBoundaryShape2D) set_distance(distance f64)

fn (WorldBoundaryShape2D) get_distance #

fn (s &WorldBoundaryShape2D) get_distance() f64

struct WorldBoundaryShape3D #

struct WorldBoundaryShape3D {
	Shape3D
}

A 3D world boundary (half-space) shape used for physics collision.

fn (WorldBoundaryShape3D) to_variant #

fn (s &WorldBoundaryShape3D) to_variant() Variant

fn (WorldBoundaryShape3D) from_variant #

fn (mut s WorldBoundaryShape3D) from_variant(variant &Variant)

fn (WorldBoundaryShape3D) set_plane #

fn (s &WorldBoundaryShape3D) set_plane(plane Plane)

fn (WorldBoundaryShape3D) get_plane #

fn (s &WorldBoundaryShape3D) get_plane() Plane

struct WorldEnvironment #

struct WorldEnvironment {
	Node
}

Default environment properties for the entire scene (post-processing effects, lighting and background settings).

fn (WorldEnvironment) to_variant #

fn (s &WorldEnvironment) to_variant() Variant

fn (WorldEnvironment) from_variant #

fn (mut s WorldEnvironment) from_variant(variant &Variant)

fn (WorldEnvironment) set_environment #

fn (s &WorldEnvironment) set_environment(env Environment)

fn (WorldEnvironment) get_environment #

fn (s &WorldEnvironment) get_environment() Environment

fn (WorldEnvironment) set_camera_attributes #

fn (s &WorldEnvironment) set_camera_attributes(camera_attributes CameraAttributes)

fn (WorldEnvironment) get_camera_attributes #

fn (s &WorldEnvironment) get_camera_attributes() CameraAttributes

fn (WorldEnvironment) set_compositor #

fn (s &WorldEnvironment) set_compositor(compositor Compositor)

fn (WorldEnvironment) get_compositor #

fn (s &WorldEnvironment) get_compositor() Compositor

struct X509Certificate #

struct X509Certificate {
	Resource
}

An X509 certificate (e.g. for TLS).

fn (X509Certificate) to_variant #

fn (s &X509Certificate) to_variant() Variant

fn (X509Certificate) from_variant #

fn (mut s X509Certificate) from_variant(variant &Variant)

fn (X509Certificate) save #

fn (s &X509Certificate) save(path string) GDError

Saves a certificate to the given [param path] (should be a "*.crt" file).

fn (X509Certificate) load #

fn (s &X509Certificate) load(path string) GDError

Loads a certificate from [param path] ("*.crt" file).

fn (X509Certificate) save_to_string #

fn (s &X509Certificate) save_to_string() string

Returns a string representation of the certificate, or an empty string if the certificate is invalid.

fn (X509Certificate) load_from_string #

fn (s &X509Certificate) load_from_string(gd_string string) GDError

Loads a certificate from the given [param string].

struct XMLParser #

struct XMLParser {
	RefCounted
}

Provides a low-level interface for creating parsers for XML files.

fn (XMLParser) to_variant #

fn (s &XMLParser) to_variant() Variant

fn (XMLParser) from_variant #

fn (mut s XMLParser) from_variant(variant &Variant)

fn (XMLParser) read #

fn (s &XMLParser) read() GDError

Parses the next node in the file. This method returns an error code.

fn (XMLParser) get_node_type #

fn (s &XMLParser) get_node_type() XMLParserNodeType

Returns the type of the current node. Compare with [enum NodeType] constants.

fn (XMLParser) get_node_name #

fn (s &XMLParser) get_node_name() string

Returns the name of a node. This method will raise an error if the currently parsed node is a text node. [b]Note:[/b] The content of a [constant NODE_CDATA] node and the comment string of a [constant NODE_COMMENT] node are also considered names.

fn (XMLParser) get_node_data #

fn (s &XMLParser) get_node_data() string

Returns the contents of a text node. This method will raise an error if the current parsed node is of any other type.

fn (XMLParser) get_node_offset #

fn (s &XMLParser) get_node_offset() i64

Returns the byte offset of the currently parsed node since the beginning of the file or buffer. This is usually equivalent to the number of characters before the read position.

fn (XMLParser) get_attribute_count #

fn (s &XMLParser) get_attribute_count() i64

Returns the number of attributes in the currently parsed element. [b]Note:[/b] If this method is used while the currently parsed node is not [constant NODE_ELEMENT] or [constant NODE_ELEMENT_END], this count will not be updated and will still reflect the last element.

fn (XMLParser) get_attribute_name #

fn (s &XMLParser) get_attribute_name(idx i64) string

Returns the name of an attribute of the currently parsed element, specified by the [param idx] index.

fn (XMLParser) get_attribute_value #

fn (s &XMLParser) get_attribute_value(idx i64) string

Returns the value of an attribute of the currently parsed element, specified by the [param idx] index.

fn (XMLParser) has_attribute #

fn (s &XMLParser) has_attribute(name string) bool

Returns true if the currently parsed element has an attribute with the [param name].

fn (XMLParser) get_named_attribute_value #

fn (s &XMLParser) get_named_attribute_value(name string) string

Returns the value of an attribute of the currently parsed element, specified by its [param name]. This method will raise an error if the element has no such attribute.

fn (XMLParser) get_named_attribute_value_safe #

fn (s &XMLParser) get_named_attribute_value_safe(name string) string

Returns the value of an attribute of the currently parsed element, specified by its [param name]. This method will return an empty string if the element has no such attribute.

fn (XMLParser) is_empty #

fn (s &XMLParser) is_empty() bool

Returns true if the currently parsed element is empty, e.g. <element />.

fn (XMLParser) get_current_line #

fn (s &XMLParser) get_current_line() i64

Returns the current line in the parsed file, counting from 0.

fn (XMLParser) skip_section #

fn (s &XMLParser) skip_section()

Skips the current section. If the currently parsed node contains more inner nodes, they will be ignored and the cursor will go to the closing of the current element.

fn (XMLParser) seek #

fn (s &XMLParser) seek(position i64) GDError

Moves the buffer cursor to a certain offset (since the beginning) and reads the next node there. This method returns an error code.

fn (XMLParser) open #

fn (s &XMLParser) open(file string) GDError

Opens an XML [param file] for parsing. This method returns an error code.

fn (XMLParser) open_buffer #

fn (s &XMLParser) open_buffer(buffer PackedByteArray) GDError

Opens an XML raw [param buffer] for parsing. This method returns an error code.

struct XRAnchor3D #

struct XRAnchor3D {
	XRNode3D
}

An anchor point in AR space.

fn (XRAnchor3D) to_variant #

fn (s &XRAnchor3D) to_variant() Variant

fn (XRAnchor3D) from_variant #

fn (mut s XRAnchor3D) from_variant(variant &Variant)

fn (XRAnchor3D) get_size #

fn (s &XRAnchor3D) get_size() Vector3

Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table.

fn (XRAnchor3D) get_plane #

fn (s &XRAnchor3D) get_plane() Plane

Returns a plane aligned with our anchor; handy for intersection testing.

struct XRBodyModifier3D #

struct XRBodyModifier3D {
	SkeletonModifier3D
}

A node for driving body meshes from [XRBodyTracker] data.

fn (XRBodyModifier3D) to_variant #

fn (s &XRBodyModifier3D) to_variant() Variant

fn (XRBodyModifier3D) from_variant #

fn (mut s XRBodyModifier3D) from_variant(variant &Variant)

fn (XRBodyModifier3D) set_body_tracker #

fn (s &XRBodyModifier3D) set_body_tracker(tracker_name string)

fn (XRBodyModifier3D) get_body_tracker #

fn (s &XRBodyModifier3D) get_body_tracker() string

fn (XRBodyModifier3D) set_body_update #

fn (s &XRBodyModifier3D) set_body_update(body_update XRBodyModifier3DBodyUpdate)

fn (XRBodyModifier3D) get_body_update #

fn (s &XRBodyModifier3D) get_body_update() XRBodyModifier3DBodyUpdate

fn (XRBodyModifier3D) set_bone_update #

fn (s &XRBodyModifier3D) set_bone_update(bone_update XRBodyModifier3DBoneUpdate)

fn (XRBodyModifier3D) get_bone_update #

fn (s &XRBodyModifier3D) get_bone_update() XRBodyModifier3DBoneUpdate

struct XRBodyTracker #

struct XRBodyTracker {
	XRPositionalTracker
}

A tracked body in XR.

fn (XRBodyTracker) to_variant #

fn (s &XRBodyTracker) to_variant() Variant

fn (XRBodyTracker) from_variant #

fn (mut s XRBodyTracker) from_variant(variant &Variant)

fn (XRBodyTracker) set_has_tracking_data #

fn (s &XRBodyTracker) set_has_tracking_data(has_data bool)

fn (XRBodyTracker) get_has_tracking_data #

fn (s &XRBodyTracker) get_has_tracking_data() bool

fn (XRBodyTracker) set_body_flags #

fn (s &XRBodyTracker) set_body_flags(flags XRBodyTrackerBodyFlags)

fn (XRBodyTracker) get_body_flags #

fn (s &XRBodyTracker) get_body_flags() XRBodyTrackerBodyFlags

fn (XRBodyTracker) set_joint_flags #

fn (s &XRBodyTracker) set_joint_flags(joint XRBodyTrackerJoint, flags XRBodyTrackerJointFlags)

Sets flags about the validity of the tracking data for the given body joint.

fn (XRBodyTracker) get_joint_flags #

fn (s &XRBodyTracker) get_joint_flags(joint XRBodyTrackerJoint) XRBodyTrackerJointFlags

Returns flags about the validity of the tracking data for the given body joint.

fn (XRBodyTracker) set_joint_transform #

fn (s &XRBodyTracker) set_joint_transform(joint XRBodyTrackerJoint, transform Transform3D)

Sets the transform for the given body joint.

fn (XRBodyTracker) get_joint_transform #

fn (s &XRBodyTracker) get_joint_transform(joint XRBodyTrackerJoint) Transform3D

Returns the transform for the given body joint.

struct XRCamera3D #

struct XRCamera3D {
	Camera3D
}

A camera node with a few overrules for AR/VR applied, such as location tracking.

fn (XRCamera3D) to_variant #

fn (s &XRCamera3D) to_variant() Variant

fn (XRCamera3D) from_variant #

fn (mut s XRCamera3D) from_variant(variant &Variant)

struct XRController3D #

struct XRController3D {
	XRNode3D
}

A 3D node representing a spatially-tracked controller.

fn (XRController3D) to_variant #

fn (s &XRController3D) to_variant() Variant

fn (XRController3D) from_variant #

fn (mut s XRController3D) from_variant(variant &Variant)

fn (XRController3D) is_button_pressed #

fn (s &XRController3D) is_button_pressed(name string) bool

Returns true if the button with the given [param name] is pressed. [b]Note:[/b] The current [XRInterface] defines the [param name] for each input. In the case of OpenXR, these are the names of actions in the current action set.

fn (XRController3D) get_input #

fn (s &XRController3D) get_input(name string) Variant

Returns a [Variant] for the input with the given [param name]. This works for any input type, the variant will be typed according to the actions configuration. [b]Note:[/b] The current [XRInterface] defines the [param name] for each input. In the case of OpenXR, these are the names of actions in the current action set.

fn (XRController3D) get_float #

fn (s &XRController3D) get_float(name string) f64

Returns a numeric value for the input with the given [param name]. This is used for triggers and grip sensors. [b]Note:[/b] The current [XRInterface] defines the [param name] for each input. In the case of OpenXR, these are the names of actions in the current action set.

fn (XRController3D) get_vector2 #

fn (s &XRController3D) get_vector2(name string) Vector2

Returns a [Vector2] for the input with the given [param name]. This is used for thumbsticks and thumbpads found on many controllers. [b]Note:[/b] The current [XRInterface] defines the [param name] for each input. In the case of OpenXR, these are the names of actions in the current action set.

fn (XRController3D) get_tracker_hand #

fn (s &XRController3D) get_tracker_hand() XRPositionalTrackerTrackerHand

Returns the hand holding this controller, if known.

struct XRControllerTracker #

struct XRControllerTracker {
	XRPositionalTracker
}

A tracked controller.

fn (XRControllerTracker) to_variant #

fn (s &XRControllerTracker) to_variant() Variant

fn (XRControllerTracker) from_variant #

fn (mut s XRControllerTracker) from_variant(variant &Variant)

struct XRFaceModifier3D #

struct XRFaceModifier3D {
	Node3D
}

A node for driving standard face meshes from [XRFaceTracker] weights.

fn (XRFaceModifier3D) to_variant #

fn (s &XRFaceModifier3D) to_variant() Variant

fn (XRFaceModifier3D) from_variant #

fn (mut s XRFaceModifier3D) from_variant(variant &Variant)

fn (XRFaceModifier3D) set_face_tracker #

fn (s &XRFaceModifier3D) set_face_tracker(tracker_name string)

fn (XRFaceModifier3D) get_face_tracker #

fn (s &XRFaceModifier3D) get_face_tracker() string

fn (XRFaceModifier3D) set_target #

fn (s &XRFaceModifier3D) set_target(target NodePath)

fn (XRFaceModifier3D) get_target #

fn (s &XRFaceModifier3D) get_target() NodePath

struct XRFaceTracker #

struct XRFaceTracker {
	XRTracker
}

A tracked face.

fn (XRFaceTracker) to_variant #

fn (s &XRFaceTracker) to_variant() Variant

fn (XRFaceTracker) from_variant #

fn (mut s XRFaceTracker) from_variant(variant &Variant)

fn (XRFaceTracker) get_blend_shape #

fn (s &XRFaceTracker) get_blend_shape(blend_shape XRFaceTrackerBlendShapeEntry) f64

Returns the requested face blend shape weight.

fn (XRFaceTracker) set_blend_shape #

fn (s &XRFaceTracker) set_blend_shape(blend_shape XRFaceTrackerBlendShapeEntry, weight f64)

Sets a face blend shape weight.

fn (XRFaceTracker) get_blend_shapes #

fn (s &XRFaceTracker) get_blend_shapes() PackedFloat32Array

fn (XRFaceTracker) set_blend_shapes #

fn (s &XRFaceTracker) set_blend_shapes(weights PackedFloat32Array)

struct XRHandModifier3D #

struct XRHandModifier3D {
	SkeletonModifier3D
}

A node for driving hand meshes from [XRHandTracker] data.

fn (XRHandModifier3D) to_variant #

fn (s &XRHandModifier3D) to_variant() Variant

fn (XRHandModifier3D) from_variant #

fn (mut s XRHandModifier3D) from_variant(variant &Variant)

fn (XRHandModifier3D) set_hand_tracker #

fn (s &XRHandModifier3D) set_hand_tracker(tracker_name string)

fn (XRHandModifier3D) get_hand_tracker #

fn (s &XRHandModifier3D) get_hand_tracker() string

fn (XRHandModifier3D) set_bone_update #

fn (s &XRHandModifier3D) set_bone_update(bone_update XRHandModifier3DBoneUpdate)

fn (XRHandModifier3D) get_bone_update #

fn (s &XRHandModifier3D) get_bone_update() XRHandModifier3DBoneUpdate

struct XRHandTracker #

struct XRHandTracker {
	XRPositionalTracker
}

A tracked hand in XR.

fn (XRHandTracker) to_variant #

fn (s &XRHandTracker) to_variant() Variant

fn (XRHandTracker) from_variant #

fn (mut s XRHandTracker) from_variant(variant &Variant)

fn (XRHandTracker) set_has_tracking_data #

fn (s &XRHandTracker) set_has_tracking_data(has_data bool)

fn (XRHandTracker) get_has_tracking_data #

fn (s &XRHandTracker) get_has_tracking_data() bool

fn (XRHandTracker) set_hand_tracking_source #

fn (s &XRHandTracker) set_hand_tracking_source(source XRHandTrackerHandTrackingSource)

fn (XRHandTracker) get_hand_tracking_source #

fn (s &XRHandTracker) get_hand_tracking_source() XRHandTrackerHandTrackingSource

fn (XRHandTracker) set_hand_joint_flags #

fn (s &XRHandTracker) set_hand_joint_flags(joint XRHandTrackerHandJoint, flags XRHandTrackerHandJointFlags)

Sets flags about the validity of the tracking data for the given hand joint.

fn (XRHandTracker) get_hand_joint_flags #

fn (s &XRHandTracker) get_hand_joint_flags(joint XRHandTrackerHandJoint) XRHandTrackerHandJointFlags

Returns flags about the validity of the tracking data for the given hand joint.

fn (XRHandTracker) set_hand_joint_transform #

fn (s &XRHandTracker) set_hand_joint_transform(joint XRHandTrackerHandJoint, transform Transform3D)

Sets the transform for the given hand joint.

fn (XRHandTracker) get_hand_joint_transform #

fn (s &XRHandTracker) get_hand_joint_transform(joint XRHandTrackerHandJoint) Transform3D

Returns the transform for the given hand joint.

fn (XRHandTracker) set_hand_joint_radius #

fn (s &XRHandTracker) set_hand_joint_radius(joint XRHandTrackerHandJoint, radius f64)

Sets the radius of the given hand joint.

fn (XRHandTracker) get_hand_joint_radius #

fn (s &XRHandTracker) get_hand_joint_radius(joint XRHandTrackerHandJoint) f64

Returns the radius of the given hand joint.

fn (XRHandTracker) set_hand_joint_linear_velocity #

fn (s &XRHandTracker) set_hand_joint_linear_velocity(joint XRHandTrackerHandJoint, linear_velocity Vector3)

Sets the linear velocity for the given hand joint.

fn (XRHandTracker) get_hand_joint_linear_velocity #

fn (s &XRHandTracker) get_hand_joint_linear_velocity(joint XRHandTrackerHandJoint) Vector3

Returns the linear velocity for the given hand joint.

fn (XRHandTracker) set_hand_joint_angular_velocity #

fn (s &XRHandTracker) set_hand_joint_angular_velocity(joint XRHandTrackerHandJoint, angular_velocity Vector3)

Sets the angular velocity for the given hand joint.

fn (XRHandTracker) get_hand_joint_angular_velocity #

fn (s &XRHandTracker) get_hand_joint_angular_velocity(joint XRHandTrackerHandJoint) Vector3

Returns the angular velocity for the given hand joint.

struct XRInterface #

struct XRInterface {
	RefCounted
}

Base class for an XR interface implementation.

fn (XRInterface) to_variant #

fn (s &XRInterface) to_variant() Variant

fn (XRInterface) from_variant #

fn (mut s XRInterface) from_variant(variant &Variant)

fn (XRInterface) get_name #

fn (s &XRInterface) get_name() string

Returns the name of this interface ("OpenXR", "OpenVR", "OpenHMD", "ARKit", etc.).

fn (XRInterface) get_capabilities #

fn (s &XRInterface) get_capabilities() i64

Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface.

fn (XRInterface) is_primary #

fn (s &XRInterface) is_primary() bool

fn (XRInterface) set_primary #

fn (s &XRInterface) set_primary(primary bool)

fn (XRInterface) is_initialized #

fn (s &XRInterface) is_initialized() bool

Returns true if this interface has been initialized.

fn (XRInterface) initialize #

fn (s &XRInterface) initialize() bool

Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. [b]Note:[/b] You must enable the XR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR. If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different. While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.

fn (XRInterface) uninitialize #

fn (s &XRInterface) uninitialize()

Turns the interface off.

fn (XRInterface) get_system_info #

fn (s &XRInterface) get_system_info() Dictionary

Returns a [Dictionary] with extra system info. Interfaces are expected to return XRRuntimeName and XRRuntimeVersion providing info about the used XR runtime. Additional entries may be provided specific to an interface. [b]Note:[/b]This information may only be available after [method initialize] was successfully called.

fn (XRInterface) get_tracking_status #

fn (s &XRInterface) get_tracking_status() XRInterfaceTrackingStatus

If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.

fn (XRInterface) get_render_target_size #

fn (s &XRInterface) get_render_target_size() Vector2

Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.

fn (XRInterface) get_view_count #

fn (s &XRInterface) get_view_count() i64

Returns the number of views that need to be rendered for this device. 1 for Monoscopic, 2 for Stereoscopic.

fn (XRInterface) trigger_haptic_pulse #

fn (s &XRInterface) trigger_haptic_pulse(action_name string, tracker_name string, frequency f64, amplitude f64, duration_sec f64, delay_sec f64)

Triggers a haptic pulse on a device associated with this interface. [param action_name] is the name of the action for this pulse. [param tracker_name] is optional and can be used to direct the pulse to a specific device provided that device is bound to this haptic. [param frequency] is the frequency of the pulse, set to 0.0 to have the system use a default frequency. [param amplitude] is the amplitude of the pulse between 0.0 and 1.0. [param duration_sec] is the duration of the pulse in seconds. [param delay_sec] is a delay in seconds before the pulse is given.

fn (XRInterface) supports_play_area_mode #

fn (s &XRInterface) supports_play_area_mode(mode XRInterfacePlayAreaMode) bool

Call this to find out if a given play area mode is supported by this interface.

fn (XRInterface) get_play_area_mode #

fn (s &XRInterface) get_play_area_mode() XRInterfacePlayAreaMode

fn (XRInterface) set_play_area_mode #

fn (s &XRInterface) set_play_area_mode(mode XRInterfacePlayAreaMode) bool

Sets the active play area mode, will return false if the mode can't be used with this interface. [b]Note:[/b] Changing this after the interface has already been initialized can be jarring for the player, so it's recommended to recenter on the HMD with [method XRServer.center_on_hmd] (if switching to [constant XRInterface.XR_PLAY_AREA_STAGE]) or make the switch during a scene change.

fn (XRInterface) get_play_area #

fn (s &XRInterface) get_play_area() PackedVector3Array

Returns an array of vectors that represent the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualize the play area. This returns an empty array if this feature is not supported or if the information is not yet available.

fn (XRInterface) get_anchor_detection_is_enabled #

fn (s &XRInterface) get_anchor_detection_is_enabled() bool

fn (XRInterface) set_anchor_detection_is_enabled #

fn (s &XRInterface) set_anchor_detection_is_enabled(enable bool)

fn (XRInterface) get_camera_feed_id #

fn (s &XRInterface) get_camera_feed_id() i64

If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the [CameraServer] for this interface.

fn (XRInterface) is_passthrough_supported #

fn (s &XRInterface) is_passthrough_supported() bool

Returns true if this interface supports passthrough.

fn (XRInterface) is_passthrough_enabled #

fn (s &XRInterface) is_passthrough_enabled() bool

Returns true if passthrough is enabled.

fn (XRInterface) start_passthrough #

fn (s &XRInterface) start_passthrough() bool

Starts passthrough, will return false if passthrough couldn't be started. [b]Note:[/b] The viewport used for XR must have a transparent background, otherwise passthrough may not properly render.

fn (XRInterface) stop_passthrough #

fn (s &XRInterface) stop_passthrough()

Stops passthrough.

fn (XRInterface) get_transform_for_view #

fn (s &XRInterface) get_transform_for_view(view i64, cam_transform Transform3D) Transform3D

Returns the transform for a view/eye. [param view] is the view/eye index. [param cam_transform] is the transform that maps device coordinates to scene coordinates, typically the [member Node3D.global_transform] of the current XROrigin3D.

fn (XRInterface) get_projection_for_view #

fn (s &XRInterface) get_projection_for_view(view i64, aspect f64, near f64, far f64) Projection

Returns the projection matrix for a view/eye.

fn (XRInterface) get_supported_environment_blend_modes #

fn (s &XRInterface) get_supported_environment_blend_modes() Array

Returns the an array of supported environment blend modes, see [enum XRInterface.EnvironmentBlendMode].

fn (XRInterface) set_environment_blend_mode #

fn (s &XRInterface) set_environment_blend_mode(mode XRInterfaceEnvironmentBlendMode) bool

Sets the active environment blend mode. [param mode] is the environment blend mode starting with the next frame. [b]Note:[/b] Not all runtimes support all environment blend modes, so it is important to check this at startup. For example:

func _ready():
var xr_interface = XRServer.find_interface('OpenXR')
if xr_interface and xr_interface.is_initialized():
var vp = get_viewport()
vp.use_xr = true
var acceptable_modes = [XRInterface.XR_ENV_BLEND_MODE_OPAQUE, XRInterface.XR_ENV_BLEND_MODE_ADDITIVE]
var modes = xr_interface.get_supported_environment_blend_modes()
for mode in acceptable_modes:
if mode in modes:
xr_interface.set_environment_blend_mode(mode)
break

fn (XRInterface) get_environment_blend_mode #

fn (s &XRInterface) get_environment_blend_mode() XRInterfaceEnvironmentBlendMode

struct XRInterfaceExtension #

struct XRInterfaceExtension {
	XRInterface
}

Base class for XR interface extensions (plugins).

fn (XRInterfaceExtension) to_variant #

fn (s &XRInterfaceExtension) to_variant() Variant

fn (XRInterfaceExtension) from_variant #

fn (mut s XRInterfaceExtension) from_variant(variant &Variant)

fn (XRInterfaceExtension) gd_get_name #

fn (s &XRInterfaceExtension) gd_get_name() string

Returns the name of this interface.

fn (XRInterfaceExtension) gd_get_capabilities #

fn (s &XRInterfaceExtension) gd_get_capabilities() i64

Returns the capabilities of this interface.

fn (XRInterfaceExtension) gd_is_initialized #

fn (s &XRInterfaceExtension) gd_is_initialized() bool

Returns true if this interface has been initialized.

fn (XRInterfaceExtension) gd_initialize #

fn (s &XRInterfaceExtension) gd_initialize() bool

Initializes the interface, returns true on success.

fn (XRInterfaceExtension) gd_uninitialize #

fn (s &XRInterfaceExtension) gd_uninitialize()

Uninitialize the interface.

fn (XRInterfaceExtension) gd_get_system_info #

fn (s &XRInterfaceExtension) gd_get_system_info() Dictionary

Returns a [Dictionary] with system information related to this interface.

fn (XRInterfaceExtension) gd_supports_play_area_mode #

fn (s &XRInterfaceExtension) gd_supports_play_area_mode(mode XRInterfacePlayAreaMode) bool

Returns true if this interface supports this play area mode.

fn (XRInterfaceExtension) gd_get_play_area_mode #

fn (s &XRInterfaceExtension) gd_get_play_area_mode() XRInterfacePlayAreaMode

Returns the play area mode that sets up our play area.

fn (XRInterfaceExtension) gd_set_play_area_mode #

fn (s &XRInterfaceExtension) gd_set_play_area_mode(mode XRInterfacePlayAreaMode) bool

Set the play area mode for this interface.

fn (XRInterfaceExtension) gd_get_play_area #

fn (s &XRInterfaceExtension) gd_get_play_area() PackedVector3Array

Returns a [PackedVector3Array] that represents the play areas boundaries (if applicable).

fn (XRInterfaceExtension) gd_get_render_target_size #

fn (s &XRInterfaceExtension) gd_get_render_target_size() Vector2

Returns the size of our render target for this interface, this overrides the size of the [Viewport] marked as the xr viewport.

fn (XRInterfaceExtension) gd_get_view_count #

fn (s &XRInterfaceExtension) gd_get_view_count() i64

Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic.

fn (XRInterfaceExtension) gd_get_camera_transform #

fn (s &XRInterfaceExtension) gd_get_camera_transform() Transform3D

Returns the [Transform3D] that positions the [XRCamera3D] in the world.

fn (XRInterfaceExtension) gd_get_transform_for_view #

fn (s &XRInterfaceExtension) gd_get_transform_for_view(view i64, cam_transform Transform3D) Transform3D

Returns a [Transform3D] for a given view.

fn (XRInterfaceExtension) gd_get_projection_for_view #

fn (s &XRInterfaceExtension) gd_get_projection_for_view(view i64, aspect f64, z_near f64, z_far f64) PackedFloat64Array

Returns the projection matrix for the given view as a [PackedFloat64Array].

fn (XRInterfaceExtension) gd_get_vrs_texture #

fn (s &XRInterfaceExtension) gd_get_vrs_texture() RID

fn (XRInterfaceExtension) gd_get_vrs_texture_format #

fn (s &XRInterfaceExtension) gd_get_vrs_texture_format() XRInterfaceVRSTextureFormat

Returns the format of the texture returned by [method _get_vrs_texture].

fn (XRInterfaceExtension) gd_process #

fn (s &XRInterfaceExtension) gd_process()

Called if this [XRInterfaceExtension] is active before our physics and game process is called. Most XR interfaces will update its [XRPositionalTracker]s at this point in time.

fn (XRInterfaceExtension) gd_pre_render #

fn (s &XRInterfaceExtension) gd_pre_render()

Called if this [XRInterfaceExtension] is active before rendering starts. Most XR interfaces will sync tracking at this point in time.

fn (XRInterfaceExtension) gd_pre_draw_viewport #

fn (s &XRInterfaceExtension) gd_pre_draw_viewport(render_target RID) bool

Called if this is our primary [XRInterfaceExtension] before we start processing a [Viewport] for every active XR [Viewport], returns true if that viewport should be rendered. An XR interface may return false if the user has taken off their headset and we can pause rendering.

fn (XRInterfaceExtension) gd_post_draw_viewport #

fn (s &XRInterfaceExtension) gd_post_draw_viewport(render_target RID, screen_rect Rect2)

Called after the XR [Viewport] draw logic has completed.

fn (XRInterfaceExtension) gd_end_frame #

fn (s &XRInterfaceExtension) gd_end_frame()

Called if interface is active and queues have been submitted.

fn (XRInterfaceExtension) gd_get_suggested_tracker_names #

fn (s &XRInterfaceExtension) gd_get_suggested_tracker_names() PackedStringArray

Returns a [PackedStringArray] with tracker names configured by this interface. Note that user configuration can override this list.

fn (XRInterfaceExtension) gd_get_suggested_pose_names #

fn (s &XRInterfaceExtension) gd_get_suggested_pose_names(tracker_name string) PackedStringArray

Returns a [PackedStringArray] with pose names configured by this interface. Note that user configuration can override this list.

fn (XRInterfaceExtension) gd_get_tracking_status #

fn (s &XRInterfaceExtension) gd_get_tracking_status() XRInterfaceTrackingStatus

Returns a [enum XRInterface.TrackingStatus] specifying the current status of our tracking.

fn (XRInterfaceExtension) gd_trigger_haptic_pulse #

fn (s &XRInterfaceExtension) gd_trigger_haptic_pulse(action_name string, tracker_name string, frequency f64, amplitude f64, duration_sec f64, delay_sec f64)

Triggers a haptic pulse to be emitted on the specified tracker.

fn (XRInterfaceExtension) gd_get_anchor_detection_is_enabled #

fn (s &XRInterfaceExtension) gd_get_anchor_detection_is_enabled() bool

Return true if anchor detection is enabled for this interface.

fn (XRInterfaceExtension) gd_set_anchor_detection_is_enabled #

fn (s &XRInterfaceExtension) gd_set_anchor_detection_is_enabled(enabled bool)

Enables anchor detection on this interface if supported.

fn (XRInterfaceExtension) gd_get_camera_feed_id #

fn (s &XRInterfaceExtension) gd_get_camera_feed_id() i64

Returns the camera feed ID for the [CameraFeed] registered with the [CameraServer] that should be presented as the background on an AR capable device (if applicable).

fn (XRInterfaceExtension) gd_get_color_texture #

fn (s &XRInterfaceExtension) gd_get_color_texture() RID

Return color texture into which to render (if applicable).

fn (XRInterfaceExtension) gd_get_depth_texture #

fn (s &XRInterfaceExtension) gd_get_depth_texture() RID

Return depth texture into which to render (if applicable).

fn (XRInterfaceExtension) gd_get_velocity_texture #

fn (s &XRInterfaceExtension) gd_get_velocity_texture() RID

Return velocity texture into which to render (if applicable).

fn (XRInterfaceExtension) get_color_texture #

fn (s &XRInterfaceExtension) get_color_texture() RID

fn (XRInterfaceExtension) get_depth_texture #

fn (s &XRInterfaceExtension) get_depth_texture() RID

fn (XRInterfaceExtension) get_velocity_texture #

fn (s &XRInterfaceExtension) get_velocity_texture() RID

fn (XRInterfaceExtension) add_blit #

fn (s &XRInterfaceExtension) add_blit(render_target RID, src_rect Rect2, dst_rect Rect2i, use_layer bool, layer i64, apply_lens_distortion bool, eye_center Vector2, k1 f64, k2 f64, upscale f64, aspect_ratio f64)

Blits our render results to screen optionally applying lens distortion. This can only be called while processing _commit_views.

fn (XRInterfaceExtension) get_render_target_texture #

fn (s &XRInterfaceExtension) get_render_target_texture(render_target RID) RID

Returns a valid [RID] for a texture to which we should render the current frame if supported by the interface.

struct XRNode3D #

struct XRNode3D {
	Node3D
}

A 3D node that has its position automatically updated by the [XRServer].

fn (XRNode3D) to_variant #

fn (s &XRNode3D) to_variant() Variant

fn (XRNode3D) from_variant #

fn (mut s XRNode3D) from_variant(variant &Variant)

fn (XRNode3D) set_tracker #

fn (s &XRNode3D) set_tracker(tracker_name string)

fn (XRNode3D) get_tracker #

fn (s &XRNode3D) get_tracker() string

fn (XRNode3D) set_pose_name #

fn (s &XRNode3D) set_pose_name(pose string)

fn (XRNode3D) get_pose_name #

fn (s &XRNode3D) get_pose_name() string

fn (XRNode3D) set_show_when_tracked #

fn (s &XRNode3D) set_show_when_tracked(show bool)

fn (XRNode3D) get_show_when_tracked #

fn (s &XRNode3D) get_show_when_tracked() bool

fn (XRNode3D) get_is_active #

fn (s &XRNode3D) get_is_active() bool

Returns true if the [member tracker] has been registered and the [member pose] is being tracked.

fn (XRNode3D) get_has_tracking_data #

fn (s &XRNode3D) get_has_tracking_data() bool

Returns true if the [member tracker] has current tracking data for the [member pose] being tracked.

fn (XRNode3D) get_pose #

fn (s &XRNode3D) get_pose() XRPose

Returns the [XRPose] containing the current state of the pose being tracked. This gives access to additional properties of this pose.

fn (XRNode3D) trigger_haptic_pulse #

fn (s &XRNode3D) trigger_haptic_pulse(action_name string, frequency f64, amplitude f64, duration_sec f64, delay_sec f64)

Triggers a haptic pulse on a device associated with this interface. [param action_name] is the name of the action for this pulse. [param frequency] is the frequency of the pulse, set to 0.0 to have the system use a default frequency. [param amplitude] is the amplitude of the pulse between 0.0 and 1.0. [param duration_sec] is the duration of the pulse in seconds. [param delay_sec] is a delay in seconds before the pulse is given.

struct XROrigin3D #

struct XROrigin3D {
	Node3D
}

The origin point in AR/VR.

fn (XROrigin3D) to_variant #

fn (s &XROrigin3D) to_variant() Variant

fn (XROrigin3D) from_variant #

fn (mut s XROrigin3D) from_variant(variant &Variant)

fn (XROrigin3D) set_world_scale #

fn (s &XROrigin3D) set_world_scale(world_scale f64)

fn (XROrigin3D) get_world_scale #

fn (s &XROrigin3D) get_world_scale() f64

fn (XROrigin3D) set_current #

fn (s &XROrigin3D) set_current(enabled bool)

fn (XROrigin3D) is_current #

fn (s &XROrigin3D) is_current() bool

struct XRPose #

struct XRPose {
	RefCounted
}

This object contains all data related to a pose on a tracked object.

fn (XRPose) to_variant #

fn (s &XRPose) to_variant() Variant

fn (XRPose) from_variant #

fn (mut s XRPose) from_variant(variant &Variant)

fn (XRPose) set_has_tracking_data #

fn (s &XRPose) set_has_tracking_data(has_tracking_data bool)

fn (XRPose) get_has_tracking_data #

fn (s &XRPose) get_has_tracking_data() bool

fn (XRPose) set_name #

fn (s &XRPose) set_name(name string)

fn (XRPose) get_name #

fn (s &XRPose) get_name() string

fn (XRPose) set_transform #

fn (s &XRPose) set_transform(transform Transform3D)

fn (XRPose) get_transform #

fn (s &XRPose) get_transform() Transform3D

fn (XRPose) get_adjusted_transform #

fn (s &XRPose) get_adjusted_transform() Transform3D

Returns the [member transform] with world scale and our reference frame applied. This is the transform used to position [XRNode3D] objects.

fn (XRPose) set_linear_velocity #

fn (s &XRPose) set_linear_velocity(velocity Vector3)

fn (XRPose) get_linear_velocity #

fn (s &XRPose) get_linear_velocity() Vector3

fn (XRPose) set_angular_velocity #

fn (s &XRPose) set_angular_velocity(velocity Vector3)

fn (XRPose) get_angular_velocity #

fn (s &XRPose) get_angular_velocity() Vector3

fn (XRPose) set_tracking_confidence #

fn (s &XRPose) set_tracking_confidence(tracking_confidence XRPoseTrackingConfidence)

fn (XRPose) get_tracking_confidence #

fn (s &XRPose) get_tracking_confidence() XRPoseTrackingConfidence

struct XRPositionalTracker #

struct XRPositionalTracker {
	XRTracker
}

A tracked object.

fn (XRPositionalTracker) to_variant #

fn (s &XRPositionalTracker) to_variant() Variant

fn (XRPositionalTracker) from_variant #

fn (mut s XRPositionalTracker) from_variant(variant &Variant)

fn (XRPositionalTracker) get_tracker_profile #

fn (s &XRPositionalTracker) get_tracker_profile() string

fn (XRPositionalTracker) set_tracker_profile #

fn (s &XRPositionalTracker) set_tracker_profile(profile string)

fn (XRPositionalTracker) get_tracker_hand #

fn (s &XRPositionalTracker) get_tracker_hand() XRPositionalTrackerTrackerHand

fn (XRPositionalTracker) set_tracker_hand #

fn (s &XRPositionalTracker) set_tracker_hand(hand XRPositionalTrackerTrackerHand)

fn (XRPositionalTracker) has_pose #

fn (s &XRPositionalTracker) has_pose(name string) bool

Returns true if the tracker is available and is currently tracking the bound [param name] pose.

fn (XRPositionalTracker) get_pose #

fn (s &XRPositionalTracker) get_pose(name string) XRPose

Returns the current [XRPose] state object for the bound [param name] pose.

fn (XRPositionalTracker) invalidate_pose #

fn (s &XRPositionalTracker) invalidate_pose(name string)

Marks this pose as invalid, we don't clear the last reported state but it allows users to decide if trackers need to be hidden if we lose tracking or just remain at their last known position.

fn (XRPositionalTracker) set_pose #

fn (s &XRPositionalTracker) set_pose(name string, transform Transform3D, linear_velocity Vector3, angular_velocity Vector3, tracking_confidence XRPoseTrackingConfidence)

Sets the transform, linear velocity, angular velocity and tracking confidence for the given pose. This method is called by a [XRInterface] implementation and should not be used directly.

fn (XRPositionalTracker) get_input #

fn (s &XRPositionalTracker) get_input(name string) Variant

Returns an input for this tracker. It can return a boolean, float or [Vector2] value depending on whether the input is a button, trigger or thumbstick/thumbpad.

fn (XRPositionalTracker) set_input #

fn (s &XRPositionalTracker) set_input(name string, value_ ToVariant)

Changes the value for the given input. This method is called by a [XRInterface] implementation and should not be used directly.

struct XRServer #

struct XRServer {
	Object
}

Server for AR and VR features.

fn (XRServer) to_variant #

fn (s &XRServer) to_variant() Variant

fn (XRServer) from_variant #

fn (mut s XRServer) from_variant(variant &Variant)

fn (XRServer) get_world_scale #

fn (s &XRServer) get_world_scale() f64

fn (XRServer) set_world_scale #

fn (s &XRServer) set_world_scale(scale f64)

fn (XRServer) get_world_origin #

fn (s &XRServer) get_world_origin() Transform3D

fn (XRServer) set_world_origin #

fn (s &XRServer) set_world_origin(world_origin Transform3D)

fn (XRServer) get_reference_frame #

fn (s &XRServer) get_reference_frame() Transform3D

Returns the reference frame transform. Mostly used internally and exposed for GDExtension build interfaces.

fn (XRServer) clear_reference_frame #

fn (s &XRServer) clear_reference_frame()

Clears the reference frame that was set by previous calls to [method center_on_hmd].

fn (XRServer) center_on_hmd #

fn (s &XRServer) center_on_hmd(rotation_mode XRServerRotationMode, keep_height bool)

This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently. For platforms that do not offer spatial tracking, our origin point (0, 0, 0) is the location of our HMD, but you have little control over the direction the player is facing in the real world. For platforms that do offer spatial tracking, our origin point depends very much on the system. For OpenVR, our origin point is usually the center of the tracking space, on the ground. For other platforms, it's often the location of the tracking camera. This method allows you to center your tracker on the location of the HMD. It will take the current location of the HMD and use that to adjust all your tracking data; in essence, realigning the real world to your player's current position in the game world. For this method to produce usable results, tracking information must be available. This often takes a few frames after starting your game. You should call this method after a few seconds have passed. For example, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.

fn (XRServer) get_hmd_transform #

fn (s &XRServer) get_hmd_transform() Transform3D

Returns the primary interface's transformation.

fn (XRServer) set_camera_locked_to_origin #

fn (s &XRServer) set_camera_locked_to_origin(enabled bool)

fn (XRServer) is_camera_locked_to_origin #

fn (s &XRServer) is_camera_locked_to_origin() bool

fn (XRServer) add_interface #

fn (s &XRServer) add_interface(gd_interface XRInterface)

Registers an [XRInterface] object.

fn (XRServer) get_interface_count #

fn (s &XRServer) get_interface_count() i64

Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns true.

fn (XRServer) remove_interface #

fn (s &XRServer) remove_interface(gd_interface XRInterface)

Removes this [param interface].

fn (XRServer) get_interface #

fn (s &XRServer) get_interface(idx i64) XRInterface

Returns the interface registered at the given [param idx] index in the list of interfaces.

fn (XRServer) get_interfaces #

fn (s &XRServer) get_interfaces() Array

Returns a list of available interfaces the ID and name of each interface.

fn (XRServer) find_interface #

fn (s &XRServer) find_interface(name string) XRInterface

Finds an interface by its [param name]. For example, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.

fn (XRServer) add_tracker #

fn (s &XRServer) add_tracker(tracker XRTracker)

Registers a new [XRTracker] that tracks a physical object.

fn (XRServer) remove_tracker #

fn (s &XRServer) remove_tracker(tracker XRTracker)

Removes this [param tracker].

fn (XRServer) get_trackers #

fn (s &XRServer) get_trackers(tracker_types i64) Dictionary

Returns a dictionary of trackers for [param tracker_types].

fn (XRServer) get_tracker #

fn (s &XRServer) get_tracker(tracker_name string) XRTracker

Returns the positional tracker with the given [param tracker_name].

fn (XRServer) get_primary_interface #

fn (s &XRServer) get_primary_interface() XRInterface

fn (XRServer) set_primary_interface #

fn (s &XRServer) set_primary_interface(gd_interface XRInterface)

struct XRTracker #

struct XRTracker {
	RefCounted
}

A tracked object.

fn (XRTracker) to_variant #

fn (s &XRTracker) to_variant() Variant

fn (XRTracker) from_variant #

fn (mut s XRTracker) from_variant(variant &Variant)

fn (XRTracker) get_tracker_type #

fn (s &XRTracker) get_tracker_type() XRServerTrackerType

fn (XRTracker) set_tracker_type #

fn (s &XRTracker) set_tracker_type(gd_type XRServerTrackerType)

fn (XRTracker) get_tracker_name #

fn (s &XRTracker) get_tracker_name() string

fn (XRTracker) set_tracker_name #

fn (s &XRTracker) set_tracker_name(name string)

fn (XRTracker) get_tracker_desc #

fn (s &XRTracker) get_tracker_desc() string

fn (XRTracker) set_tracker_desc #

fn (s &XRTracker) set_tracker_desc(description string)

struct XRVRS #

struct XRVRS {
	Object
}

Helper class for XR interfaces that generates VRS images.

fn (XRVRS) to_variant #

fn (s &XRVRS) to_variant() Variant

fn (XRVRS) from_variant #

fn (mut s XRVRS) from_variant(variant &Variant)

fn (XRVRS) get_vrs_min_radius #

fn (s &XRVRS) get_vrs_min_radius() f64

fn (XRVRS) set_vrs_min_radius #

fn (s &XRVRS) set_vrs_min_radius(radius f64)

fn (XRVRS) get_vrs_strength #

fn (s &XRVRS) get_vrs_strength() f64

fn (XRVRS) set_vrs_strength #

fn (s &XRVRS) set_vrs_strength(strength f64)

fn (XRVRS) get_vrs_render_region #

fn (s &XRVRS) get_vrs_render_region() Rect2i

fn (XRVRS) set_vrs_render_region #

fn (s &XRVRS) set_vrs_render_region(render_region Rect2i)

fn (XRVRS) make_vrs_texture #

fn (s &XRVRS) make_vrs_texture(target_size Vector2, eye_foci PackedVector2Array) RID

Generates the VRS texture based on a render [param target_size] adjusted by our VRS tile size. For each eyes focal point passed in [param eye_foci] a layer is created. Focal point should be in NDC. The result will be cached, requesting a VRS texture with unchanged parameters and settings will return the cached RID.

struct ZIPPacker #

struct ZIPPacker {
	RefCounted
}

Allows the creation of ZIP files.

fn (ZIPPacker) to_variant #

fn (s &ZIPPacker) to_variant() Variant

fn (ZIPPacker) from_variant #

fn (mut s ZIPPacker) from_variant(variant &Variant)

fn (ZIPPacker) open #

fn (s &ZIPPacker) open(path string, cfg ZIPPacker_open_Cfg) GDError

Opens a zip file for writing at the given path using the specified write mode. This must be called before everything else.

fn (ZIPPacker) set_compression_level #

fn (s &ZIPPacker) set_compression_level(compression_level i64)

fn (ZIPPacker) get_compression_level #

fn (s &ZIPPacker) get_compression_level() i64

fn (ZIPPacker) start_file #

fn (s &ZIPPacker) start_file(path string) GDError

Starts writing to a file within the archive. Only one file can be written at the same time. Must be called after [method open].

fn (ZIPPacker) write_file #

fn (s &ZIPPacker) write_file(data PackedByteArray) GDError

Write the given [param data] to the file. Needs to be called after [method start_file].

fn (ZIPPacker) close_file #

fn (s &ZIPPacker) close_file() GDError

Stops writing to a file within the archive. It will fail if there is no open file.

fn (ZIPPacker) close #

fn (s &ZIPPacker) close() GDError

Closes the underlying resources used by this instance.

struct ZIPPacker_open_Cfg #

@[params]
struct ZIPPacker_open_Cfg {
pub:
	append ZIPPackerZipAppend = unsafe { ZIPPackerZipAppend(0) }
}

Optional parameters for ZIPPacker#open

struct ZIPReader #

struct ZIPReader {
	RefCounted
}

Allows reading the content of a ZIP file.

fn (ZIPReader) to_variant #

fn (s &ZIPReader) to_variant() Variant

fn (ZIPReader) from_variant #

fn (mut s ZIPReader) from_variant(variant &Variant)

fn (ZIPReader) open #

fn (s &ZIPReader) open(path string) GDError

Opens the zip archive at the given [param path] and reads its file index.

fn (ZIPReader) close #

fn (s &ZIPReader) close() GDError

Closes the underlying resources used by this instance.

fn (ZIPReader) get_files #

fn (s &ZIPReader) get_files() PackedStringArray

Returns the list of names of all files in the loaded archive. Must be called after [method open].

fn (ZIPReader) read_file #

fn (s &ZIPReader) read_file(path string, cfg ZIPReader_read_file_Cfg) PackedByteArray

Loads the whole content of a file in the loaded zip archive into memory and returns it. Must be called after [method open].

fn (ZIPReader) file_exists #

fn (s &ZIPReader) file_exists(path string, cfg ZIPReader_file_exists_Cfg) bool

Returns true if the file exists in the loaded zip archive. Must be called after [method open].

fn (ZIPReader) get_compression_level #

fn (s &ZIPReader) get_compression_level(path string, cfg ZIPReader_get_compression_level_Cfg) i64

Returns the compression level of the file in the loaded zip archive. Returns -1 if the file doesn't exist or any other error occurs. Must be called after [method open].

struct ZIPReader_file_exists_Cfg #

@[params]
struct ZIPReader_file_exists_Cfg {
pub:
	case_sensitive bool
}

Optional parameters for ZIPReader#file_exists

struct ZIPReader_get_compression_level_Cfg #

@[params]
struct ZIPReader_get_compression_level_Cfg {
pub:
	case_sensitive bool
}

Optional parameters for ZIPReader#get_compression_level

struct ZIPReader_read_file_Cfg #

@[params]
struct ZIPReader_read_file_Cfg {
pub:
	case_sensitive bool
}

Optional parameters for ZIPReader#read_file