### get_is_setup() -> bool / set_is_setup(is_setup: bool) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_skeletonmodification2d.rst Gets or sets whether the modification has been initialized and setup. ```APIDOC ## get_is_setup / set_is_setup ### Description Checks or sets the setup state of the modification. ### Syntax ```gdscript func get_is_setup() -> bool func set_is_setup(is_setup: bool) -> void ``` ### Parameters - **is_setup** (`bool`) - True if the modification is setup, false otherwise. ### Return Value - `bool` (for getter) - True if the modification is setup. ``` -------------------------------- ### start(one_time: bool = false) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_skeletonik3d.rst Starts the IK solver calculations for the skeleton bone chain. ```APIDOC ## start ### Description Starts the IK solver. If `one_time` is `true`, the solver calculates transformations once and stops immediately. ### Signature `void start(one_time: bool = false)` ### Parameters - **one_time** (`bool`, optional, default = `false`) - If `true`, the IK solver executes only once instead of running continuously every frame. ``` -------------------------------- ### Install mold on Fedora Source: https://github.com/godotengine/godot-docs/blob/master/engine_details/development/compiling/compiling_for_linuxbsd.rst Installs the mold linker on Fedora systems using dnf. ```shell sudo dnf install -y mold ``` -------------------------------- ### Install build dependencies on NetBSD Source: https://github.com/godotengine/godot-docs/blob/master/engine_details/development/compiling/compiling_for_linuxbsd.rst Configures pkgin and installs pkg-config, SCons, Wayland, and PulseAudio on NetBSD. ```shell pkg_add pkgin pkgin -y install \ pkg-config \ py313-scons \ wayland \ pulseaudio ``` -------------------------------- ### start(from_pos: float = 0.0) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_audiostreamplayback.rst Starts playing the audio stream from the specified position in seconds. ```APIDOC ### Method Signature ```gdscript func start(from_pos: float = 0.0) -> void ``` ### Parameters - **from_pos** (float) - Optional. The starting position in seconds (default: 0.0). ``` -------------------------------- ### Install build dependencies on openKylin Source: https://github.com/godotengine/godot-docs/blob/master/engine_details/development/compiling/compiling_for_linuxbsd.rst Installs system dependencies using `apt`, then installs SCons via `pip` on openKylin. ```shell sudo apt update sudo apt install -y \ python3-pip \ build-essential \ pkg-config \ libx11-dev \ libxcursor-dev \ libxinerama-dev \ libgl1-mesa-dev \ libglu1-mesa-dev \ libasound2-dev \ libpulse-dev \ libudev-dev \ libxi-dev \ libxrandr-dev \ libwayland-dev sudo pip install scons ``` -------------------------------- ### start(from_pos: float = 0.0) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_audiostreamplayback.rst Starts playing the stream from a specified position. ```APIDOC ### Method Signature `void start(from_pos: float = 0.0)` ### Description Starts the stream from the given `from_pos`, in seconds. ### Parameters - **from_pos** (`float`, optional) - Position to start playback from, in seconds. Default value is `0.0`. ``` -------------------------------- ### Install mold on Debian or Ubuntu Source: https://github.com/godotengine/godot-docs/blob/master/engine_details/development/compiling/compiling_for_linuxbsd.rst Installs the mold linker on Debian and Ubuntu distributions using apt-get. ```shell sudo apt-get update sudo apt-get install -y mold ``` -------------------------------- ### AudioStreamWAV.loop_begin Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_audiostreamwav.rst Gets or sets the loop starting sample position. ```APIDOC ### Property: `loop_begin` **Type:** `int` **Default:** `0` #### Methods - `void set_loop_begin(value: int)` - `int get_loop_begin()` #### Description The loop start point (in number of samples, relative to the beginning of the stream). ``` -------------------------------- ### start() Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_godotinstance.rst Finishes the initialization and startup sequence of the instance. Returns true on success. ```APIDOC ## start ### Description Finishes this instance's startup sequence. Returns `true` on success. ### Signature `bool start()` ### Return Value - **bool** - `true` on successful completion of startup sequence. ``` -------------------------------- ### setup Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_skeletonmodificationstack2d.rst Initializes and sets up the modification stack. ```APIDOC ### setup ```gdscript void setup() ``` Sets up the modification stack. ``` -------------------------------- ### set_start_position / get_start_position Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_navigationpathqueryparameters3d.rst Sets or gets the pathfinding start position in global 3D coordinates. ```APIDOC ### start_position ```gdscript void set_start_position(value: Vector3) Vector3 get_start_position() ``` #### Parameters - **value** (`Vector3`): The starting position in global coordinates. Default is `Vector3(0, 0, 0)`. #### Returns - `Vector3`: The current start position. #### Description The pathfinding start position in global coordinates. ``` -------------------------------- ### Implement entry point in src/init.c Source: https://github.com/godotengine/godot-docs/blob/master/engine_details/engine_api/gdextension/gdextension_c_example.rst Implement gdexample_library_init to configure callbacks and set the minimum initialization level to GDEXTENSION_INITIALIZATION_SCENE. ```c #include "init.h" void initialize_gdexample_module(void *p_userdata, GDExtensionInitializationLevel p_level) { } void deinitialize_gdexample_module(void *p_userdata, GDExtensionInitializationLevel p_level) { } GDExtensionBool GDE_EXPORT gdexample_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) { r_initialization->initialize = initialize_gdexample_module; r_initialization->deinitialize = deinitialize_gdexample_module; r_initialization->userdata = NULL; r_initialization->minimum_initialization_level = GDEXTENSION_INITIALIZATION_SCENE; return true; } ``` -------------------------------- ### byte_offset Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_gltfaccessor.rst Gets or sets the byte offset relative to the start of the referenced buffer view. ```APIDOC ### byte_offset ```gdscript var byte_offset: int func set_byte_offset(value: int) -> void func get_byte_offset() -> int ``` The offset relative to the start of the buffer view in bytes. ``` -------------------------------- ### void submit() Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_renderingdevice.rst Pushes the frame setup and draw command buffers, marking the local device as processing. ```APIDOC ## submit ### Description Pushes the frame setup and draw command buffers then marks the local device as currently processing (which allows calling `sync()`). **Note:** Only available in local RenderingDevices. ### Signature ```gdscript void submit() ``` ### Parameters None. ### Return Value - `void` ``` -------------------------------- ### sparse_indices_byte_offset Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_gltfaccessor.rst Gets or sets the offset relative to the start of the sparse indices buffer view in bytes. ```APIDOC ### sparse_indices_byte_offset ```gdscript var sparse_indices_byte_offset: int func set_sparse_indices_byte_offset(value: int) -> void func get_sparse_indices_byte_offset() -> int ``` The offset relative to the start of the buffer view in bytes. ``` -------------------------------- ### get_is_setup() -> bool / set_is_setup(is_setup: bool) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_skeletonmodification2d.rst Gets or sets whether this modification has been successfully setup. ```APIDOC ### get_is_setup / set_is_setup ```gdscript func get_is_setup() -> bool func set_is_setup(is_setup: bool) -> void ``` #### Description `get_is_setup` returns whether this modification has been successfully setup or not. `set_is_setup` manually allows setting the setup state; it should rarely be used since the modification stack handles setup automatically. #### Parameters - `is_setup` (bool) - The setup state to apply. ``` -------------------------------- ### void setup(action_map: OpenXRActionMap, binding_modifier: OpenXRBindingModifier) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_openxrbindingmodifiereditor.rst Initializes and configures the editor with the provided action map and binding modifier instances. ```APIDOC ### setup ```gdscript func setup(action_map: OpenXRActionMap, binding_modifier: OpenXRBindingModifier) -> void ``` #### Description Setup this editor for the provided `action_map` and `binding_modifier`. #### Parameters - **action_map** (`OpenXRActionMap`): The action map associated with the binding modifier. - **binding_modifier** (`OpenXRBindingModifier`): The binding modifier to be edited. ``` -------------------------------- ### setup_local_to_scene() -> void Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_resource.rst Initializes the resource for local scene usage. Typically called when a scene instance with local resources is created. ```APIDOC ### Method Signature `setup_local_to_scene() -> void` ### Description Configures and initializes the resource for local scene instantiation. ``` -------------------------------- ### path_return_max_radius Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_navigationagent2d.rst Gets or sets the maximum allowed radius in world units that the returned path can be from the path start. A sphere clip is performed considering actual navigation mesh path points with the path start as the center. ```APIDOC ### Property: path_return_max_radius - **Type:** `float` - **Default Value:** `0.0` #### Methods - `void set_path_return_max_radius(value: float)` - `float get_path_return_max_radius()` #### Description The maximum allowed radius in world units that the returned path can be from the path start. The path will be clipped when going over this radius. Compared to `path_return_max_length`, this allows the agent to go that much further if they need to walk around a corner. **Note:** This will perform a sphere clip considering only the actual navigation mesh path points with the first path position being the sphere's center. ``` -------------------------------- ### Engine.prototype.startGame(override) Source: https://github.com/godotengine/godot-docs/blob/master/tutorials/platform/web/html5_shell_classref.rst Initializes, loads, and starts the game instance, preloading the main pack file. ```APIDOC ### Engine.prototype.startGame(override) Start the game instance using the given configuration override (if any). This will initialize the instance if it is not initialized, load the engine if it is not loaded, and preload the main pck. #### Arguments - **override** (`EngineConfig`, optional) - An optional configuration override. #### Returns - **Promise** - A Promise that resolves once the game started. ``` -------------------------------- ### fog_height Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_environment.rst Gets or sets the starting height coordinate for height-based fog effects. Controls the elevation where height fog begins. ```APIDOC ### Property: fog_height - **Type:** `float` - **Default Value:** `0.0` - **Setter:** `set_fog_height(value: float)` - **Getter:** `get_fog_height() -> float` #### Description The height at which the height fog effect begins. ``` -------------------------------- ### setup(server_options) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_dtlsserver.rst Initializes and configures the DTLS server state with the specified TLS options (private key and certificate). Upon setup, the server is ready to accept incoming DTLS connections. ```APIDOC ### Method `setup(server_options: TLSOptions)` ### Description Configures the DTLS server with TLS settings, such as certificates and private keys via `TLSOptions`. ### Parameters - **server_options** (`TLSOptions`) - Required - The TLS configuration options for the server. ### Example (GDScript) ```gdscript var dtls = DTLSServer.new() var key = load("key.key") var cert = load("cert.crt") dtls.setup(TlsOptions.server(key, cert)) ``` ### Example (C#) ```csharp var dtls = new DtlsServer(); var key = GD.Load("key.key"); var cert = GD.Load("cert.crt"); dtls.Setup(TlsOptions.Server(key, cert)); ``` ``` -------------------------------- ### radius Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_navigationagent2d.rst Gets or sets the avoidance agent body radius in world units. This controls the avoidance body size rather than the maneuver start radius. ```APIDOC ### Property: radius - **Type:** `float` - **Default Value:** `10.0` #### Methods - `void set_radius(value: float)` - `float get_radius()` #### Description The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by `neighbor_distance`). Does not affect normal pathfinding. ``` -------------------------------- ### Create a Godot project from the command line Source: https://github.com/godotengine/godot-docs/blob/master/tutorials/editor/command_line_tutorial.rst Navigate to the target directory and create a project.godot file to initialize a new project. ```shell mkdir newgame cd newgame touch project.godot ``` -------------------------------- ### set_constant_id(value: int) / get_constant_id() -> int Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_rdpipelinespecializationconstant.rst Sets or gets the identifier of the specialization constant. This value starts from 0 and increments for each distinct specialization constant in a shader. ```APIDOC ### constant_id - **Type**: `int` - **Default**: `0` - **Setter**: `set_constant_id(value: int)` - **Getter**: `get_constant_id() -> int` #### Description The identifier of the specialization constant. This is a value starting from `0` and that increments for every different specialization constant for a given shader. ``` -------------------------------- ### Example of Project File System Layout Source: https://github.com/godotengine/godot-docs/blob/master/tutorials/scripting/filesystem.rst Demonstrates a typical Godot project directory structure with project.godot located at the project root. ```none /project.godot /enemy/enemy.tscn /enemy/enemy.gd /enemy/enemysprite.png /player/player.gd ``` -------------------------------- ### path_search_max_distance Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_navigationagent2d.rst Gets or sets the maximum distance a searched polygon can be away from the start polygon before canceling the search. When cancelled, builds a path to the closest found polygon. ```APIDOC ### Property: path_search_max_distance - **Type:** `float` - **Default Value:** `0.0` #### Methods - `void set_path_search_max_distance(value: float)` - `float get_path_search_max_distance()` #### Description The maximum distance a searched polygon can be away from the start polygon before the pathfinding cancels the search for a path to the (possibly unreachable or very far away) target position polygon. In this case the pathfinding resets and builds a path from the start polygon to the polygon that was found closest to the target position so far. A value of `0` or below counts as unlimited. ``` -------------------------------- ### Configure iceServers with STUN and TURN for initialize() Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_webrtcpeerconnection.rst Dictionary of valid configuration options passed to WebRTCPeerConnection.initialize(). Includes one or more STUN and TURN server URLs, with optional TURN username and credential. ```gdscript { "iceServers": [ { "urls": [ "stun:stun.example.com:3478" ], # One or more STUN servers. }, { "urls": [ "turn:turn.example.com:3478" ], # One or more TURN servers. "username": "a_username", # Optional username for the TURN server. "credential": "a_password", # Optional password for the TURN server. } ] } ``` -------------------------------- ### Find custom element index in GDScript Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_array.rst Use find_custom() with a callable to get the index of the first element that satisfies the condition. The example prints 2 for both cases. ```gdscript func is_even(number): return number % 2 == 0 func _ready(): print([1, 3, 4, 7].find_custom(is_even.bind())) # Prints 2 # Another example using `bind()` to pass an additional parameter: func is_specific_number(number, expected): return number == expected func _ready(): print([1, 3, 4, 7].find_custom(is_specific_number.bind(4))) # Prints 2 ``` -------------------------------- ### setup(action_map: OpenXRActionMap, interaction_profile: OpenXRInteractionProfile) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_openxrinteractionprofileeditorbase.rst Initializes and sets up the editor with the provided action map and interaction profile. This is used by the OpenXR action map editor when configuring interaction profile UI components. ```APIDOC ## setup ### Description Setup this editor for the provided `action_map` and `interaction_profile`. ### Syntax ```gdscript func setup(action_map: OpenXRActionMap, interaction_profile: OpenXRInteractionProfile) -> void ``` ### Parameters - **action_map** (`OpenXRActionMap`) - The OpenXR action map instance to be edited. - **interaction_profile** (`OpenXRInteractionProfile`) - The OpenXR interaction profile to configure. ``` -------------------------------- ### set_path_search_max_distance / get_path_search_max_distance Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_navigationpathqueryparameters3d.rst Sets or gets the maximum distance a searched polygon can be from the start polygon before pathfinding cancels the search. A value of 0 or below indicates an unlimited search distance. ```APIDOC ### path_search_max_distance ```gdscript void set_path_search_max_distance(value: float) float get_path_search_max_distance() ``` #### Parameters - **value** (`float`): The maximum search distance in world units. Default is `0.0`. #### Returns - `float`: The maximum search distance. #### Description The maximum distance a searched polygon can be away from the start polygon before the pathfinding cancels the search for a path to the target position polygon. When canceled, the search resets and builds a path to the closest polygon found so far. A value of `0` or below counts as unlimited. ``` -------------------------------- ### setup Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_drawabletexture2d.rst Initializes the DrawableTexture with the given dimensions, format, initial fill color, and mipmap configuration. ```APIDOC ### setup ```gdscript setup(width: int, height: int, format: DrawableFormat, color: Color = Color(1, 1, 1, 1), use_mipmaps: bool = false) ``` #### Description Initializes the DrawableTexture to a White texture of the given `width`, `height`, and `format`. *Note: This method is experimental and may be changed or removed in future versions.* #### Parameters - **width** (`int`) - Texture width in pixels. - **height** (`int`) - Texture height in pixels. - **format** (`DrawableFormat`) - Texture format enumeration value. - **color** (`Color`, optional) - Initial texture color. Default: `Color(1, 1, 1, 1)`. - **use_mipmaps** (`bool`, optional) - Whether to enable mipmaps. Default: `false`. ``` -------------------------------- ### setup(points: PackedVector2Array, connections: PackedInt32Array) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_polygonpathfinder.rst Initializes the pathfinder with a set of polygon points and their corresponding connections. ```APIDOC ## setup ### Description Configures the pathfinder with polygon vertices and edge connection data. ### Syntax ```gdscript void setup(points: PackedVector2Array, connections: PackedInt32Array) ``` ### Parameters - **points** (`PackedVector2Array`) - The array of 2D points forming the pathfinding graph. - **connections** (`PackedInt32Array`) - The array of index pairs defining connections between points. ### Return Value - `void` ``` -------------------------------- ### audio_track_get_key_start_offset(track_idx: int, key_idx: int) -> float Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_animation.rst Gets the start offset for a key in an audio track. Defines how many seconds into the audio stream playback should begin. ```APIDOC ### Method: audio_track_get_key_start_offset ```gdscript float audio_track_get_key_start_offset(track_idx: int, key_idx: int) ``` #### Parameters - **track_idx** (`int`) - The index of the audio track. - **key_idx** (`int`) - The index of the key. #### Returns - `float` - The start offset in seconds. ``` -------------------------------- ### Set custom starting property value with From in C# Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_propertytweener.rst Sets a custom initial value for the PropertyTweener. In this example, the node is moved from position (100, 100) to (200, 100). ```csharp Tween tween = GetTree().CreateTween(); tween.TweenProperty(this, "position", new Vector2(200.0f, 100.0f), 1.0f).From(new Vector2(100.0f, 100.0f)); ``` -------------------------------- ### Manually initialize and start engine with engine.start Source: https://github.com/godotengine/godot-docs/blob/master/tutorials/platform/web/customizing_html5_shell.rst Provides full control over startup by manually initializing the WASM module, preloading the PCK file concurrently, and passing custom runtime arguments. ```javascript const myWasm = 'mygame.wasm'; const myPck = 'mygame.pck'; const engine = new Engine(); Promise.all([ // Load and init the engine engine.init(myWasm), // And the pck concurrently engine.preloadFile(myPck), ]).then(() => { // Now start the engine. return engine.start({ args: ['--main-pack', myPck] }); }).then(() => { console.log('Engine has started!'); }); ``` -------------------------------- ### Start game with Engine.prototype.startGame Source: https://github.com/godotengine/godot-docs/blob/master/tutorials/platform/web/customizing_html5_shell.rst Initializes and starts the game using the exported configuration. Returns a Promise that resolves when the game finishes loading. ```javascript const engine = new Engine($GODOT_CONFIG); engine.startGame({ // Optional override configuration, for example: // unloadAfterInit: false, // canvasResizePolicy: 0, // ... }); ``` -------------------------------- ### Set custom starting property value with from in GDScript Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_propertytweener.rst Sets a custom initial value for the PropertyTweener. In this example, the node is moved from position (100, 100) to (200, 100). ```gdscript var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) ``` -------------------------------- ### Engine.prototype.start(override) Source: https://github.com/godotengine/godot-docs/blob/master/tutorials/platform/web/html5_shell_classref.rst Starts the engine instance with optional configuration overrides. ```APIDOC ### Engine.prototype.start(override) Start the engine instance using the given override configuration (if any). This will initialize the instance if it is not initialized. The engine must be loaded beforehand. Fails if a canvas cannot be found on the page or is not specified in configuration. #### Arguments - **override** (`EngineConfig`, optional) - An optional configuration override. #### Returns - **Promise** - A Promise that resolves once the engine started. ``` -------------------------------- ### set_min_lod_override(value: int) / get_min_lod_override() -> int Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_streamedtexture2d.rst Sets or gets the minimum LOD (mipmap level) this texture starts at when loaded. Higher values result in lower initial resolution. ```APIDOC ### Property: `min_lod_override` #### Description Overrides the minimum LOD (mipmap level) this texture starts at when loaded. Higher values result in lower initial resolution. A value of `0` uses the global setting (`rendering/textures/streaming/min_lod`). Values `1` to `14` correspond to LOD levels `0` to `13`. #### Signatures ```gdscript func set_min_lod_override(value: int) -> void func get_min_lod_override() -> int ``` #### Parameters - **value** (`int`) - The minimum LOD level override (range: `0` to `14`). #### Return Value - **int** - The current minimum LOD override value. ``` -------------------------------- ### String get_delimiter_start_key(delimiter_index: int) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_codeedit.rst Gets the start key string associated with a specific string or comment region index. Allows inspecting defined region open delimiters. ```APIDOC ### Method Signature ```gdscript String get_delimiter_start_key(delimiter_index: int) ``` ### Description Gets the start key for a string or comment region index. ### Parameters - **delimiter_index** (`int`): Index of the delimiter region. ### Return Value - **String**: The delimiter start key string. ``` -------------------------------- ### void start(one_time: bool = false) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_skeletonik3d.rst Starts applying IK effects to the Skeleton3D bones. Can be configured to run continuously or apply once immediately. ```APIDOC ## void start(one_time: bool = false) ### Description Starts applying IK effects on each frame to the Skeleton3D bones but will only take effect starting on the next frame. If one_time is true, this will take effect immediately but also reset on the next frame. ### Parameters - **one_time** (bool, optional, default: false) - If true, applies IK effect immediately and resets on next frame instead of continuous execution. ``` -------------------------------- ### ConcavePolygonShape2D.segments Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_concavepolygonshape2d.rst Gets or sets the array of points that form the line segments of the ConcavePolygonShape2D. The array length must be divisible by two, where each pair represents the start and end point of a segment. ```APIDOC ### Property: segments - **Type:** `PackedVector2Array` - **Default Value:** `PackedVector2Array()` - **Setter:** `set_segments(value: PackedVector2Array)` - **Getter:** `get_segments() -> PackedVector2Array` #### Description The array of points that make up the `ConcavePolygonShape2D`'s line segments. The array (of length divisible by two) is naturally divided into pairs (one pair for each segment); each pair consists of the starting point of a segment and the endpoint of a segment. ``` -------------------------------- ### Error pck_start(pck_path: String, alignment: int = 32, key: String = "0000000000000000000000000000000000000000000000000000000000000000", encrypt_directory: bool = false) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_pckpacker.rst Initializes a new PCK package file for writing. Configures the output path, alignment, encryption key, and whether the directory should be encrypted. ```APIDOC ### Method Signature `Error pck_start(pck_path: String, alignment: int = 32, key: String = "0000000000000000000000000000000000000000000000000000000000000000", encrypt_directory: bool = false)` ### Description Starts creating a new PCK file at the specified `pck_path`. ### Parameters - **pck_path** (`String`) - Required. The path where the package file will be created. - **alignment** (`int`) - Optional. Byte alignment (default: `32`). - **key** (`String`) - Optional. Encryption key string (default: 64-character zero string). - **encrypt_directory** (`bool`) - Optional. Whether to encrypt the package directory index (default: `false`). ### Return Value - **Error** - Returns an Error enum code indicating success (`OK`) or failure. ``` -------------------------------- ### Get Word and Line Break Boundaries with string_get_word_breaks Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_textserver.rst Returns an array of start and end offsets for word boundaries. When chars_per_line is greater than zero, returns line break boundaries instead. ```gdscript var ts = TextServerManager.get_primary_interface() # Corresponds to the substrings "The", "Godot", "Engine", and "4". print(ts.string_get_word_breaks("The Godot Engine, 4")) # Prints [0, 3, 4, 9, 10, 16, 18, 19] # Corresponds to the substrings "The", "Godot", "Engin", and "e, 4". print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 5)) # Prints [0, 3, 4, 9, 10, 15, 15, 19] # Corresponds to the substrings "The Godot" and "Engine, 4". print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 10)) # Prints [0, 9, 10, 19] ``` -------------------------------- ### Get child node by index using get_child Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_node.rst Fetches a child node by its index. Negative indices start from the end; if no child exists at the index, returns null and generates an error. ```gdscript # Assuming the following are children of this node, in order: # First, Middle, Last. var a = get_child(0).name # a is "First" var b = get_child(1).name # b is "Middle" var b = get_child(2).name # b is "Last" var c = get_child(-1).name # c is "Last" ``` -------------------------------- ### Configure Build Paths from Alternative Working Directories Source: https://github.com/godotengine/godot-docs/blob/master/tutorials/scripting/cpp/build_system/cmake.rst Demonstrates equivalent ways to specify source and build directories depending on the current working directory. ```shell # Current working directory is the godot-cpp source root. cmake . -B build-dir # Current working directory is an empty godot-cpp/build-dir. cmake ../ # Current working directory is an existing build path. cmake . ``` -------------------------------- ### Complete Shader Example Following Style Guidelines Source: https://github.com/godotengine/godot-docs/blob/master/tutorials/shaders/shaders_style_guide.rst Demonstrates a screen-space 2D canvas_item shader configured to adjust brightness, contrast, and saturation using uniforms and textureLod. ```glsl shader_type canvas_item; // Screen-space shader to adjust a 2D scene's brightness, contrast // and saturation. Taken from // https://github.com/godotengine/godot-demo-projects/blob/master/2d/screen_space_shaders/shaders/BCS.gdshader uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap; uniform float brightness = 0.8; uniform float contrast = 1.5; uniform float saturation = 1.8; void fragment() { vec3 c = textureLod(screen_texture, SCREEN_UV, 0.0).rgb; c.rgb = mix(vec3(0.0), c.rgb, brightness); c.rgb = mix(vec3(0.5), c.rgb, contrast); c.rgb = mix(vec3(dot(vec3(1.0), c.rgb) * 0.33333), c.rgb, saturation); COLOR.rgb = c; } ``` -------------------------------- ### Get node and resource with GDScript Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_node.rst Shows how get_node_and_resource returns the node, resource, and subpath for different NodePath formats. The examples print the node name, resource class, and remaining subpath. ```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" ``` -------------------------------- ### Cut Video Duration with FFmpeg Source: https://github.com/godotengine/godot-docs/blob/master/tutorials/animation/creating_movies.rst Trims unwanted sections from a recorded video by specifying a start timestamp and duration. In this example, footage before 12.1 seconds is discarded and 5.2 seconds of video is preserved. ```gdscript ffmpeg -i input.avi -ss 00:00:12.10 -t 00:00:05.20 -crf 15 output.mp4 ``` -------------------------------- ### start_compression(use_deflate: bool = false, buffer_size: int = 65535) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_streampeergzip.rst Initializes the stream peer in compression mode using either GZIP or deflate. ```APIDOC ## start_compression ### Description Start the stream in compression mode with the given `buffer_size`, if `use_deflate` is `true` uses deflate instead of GZIP. ### Signature ```gdscript func start_compression(use_deflate: bool = false, buffer_size: int = 65535) -> Error ``` ### Parameters - **use_deflate** (`bool`, optional, default = `false`) - If `true`, uses deflate compression instead of GZIP. - **buffer_size** (`int`, optional, default = `65535`) - Size of the internal buffer in bytes. ### Return Value - **Error** - Returns an Error status code indicating whether the stream was initialized successfully. ``` -------------------------------- ### Get node and resource with C# Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_node.rst Shows how GetNodeAndResource returns the node, resource, and subpath for different NodePath formats in C#. The examples print the node name, resource class, and remaining subpath. ```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" ``` -------------------------------- ### surface_begin(primitive, material = null) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_immediatemesh.rst Begins the creation of a new surface with a specified primitive type and optional material. ```APIDOC ### surface_begin(primitive: PrimitiveType, material: Material = null) #### Description Begin a new surface. #### Parameters - **primitive** (`Mesh.PrimitiveType`) - The primitive rendering mode (e.g., lines, triangles). - **material** (`Material`, optional) - Material to assign to the surface. Defaults to `null`. #### Syntax ```gdscript void surface_begin(primitive: Mesh.PrimitiveType, material: Material = null) ``` ``` -------------------------------- ### set_path_return_max_radius / get_path_return_max_radius Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_navigationpathqueryparameters3d.rst Sets or gets the maximum allowed radius in world units that the returned path can be from the path start. The path will be clipped with a sphere-shaped operation when exceeding this radius. A value of 0 or below disables the radius limit. ```APIDOC ### set_path_return_max_radius ```gdscript void set_path_return_max_radius(value: float) float get_path_return_max_radius() ``` #### Parameters - **value** (`float`): The maximum allowed radius in world units. #### Returns - `float`: The current maximum return radius. #### Description The maximum allowed radius in world units that the returned path can be from the path start. The path will be clipped when going over this radius. A value of `0` or below counts as disabled. **Note:** This will perform a sphere shaped clip operation on the path with the first path position being the sphere's center position. ``` -------------------------------- ### Get node by path in C# Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_node.rst Fetches a node using a relative or absolute path. The example assumes the call is from the Character node in the provided tree; valid paths include "Sword", "Backpack/Dagger", "../Swamp/Alligator", and "/root/MyGame". ```csharp GetNode("Sword"); GetNode("Backpack/Dagger"); GetNode("../Swamp/Alligator"); GetNode("/root/MyGame"); ``` -------------------------------- ### surface_begin(primitive, material = null) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_immediatemesh.rst Begins the creation of a new surface using the specified primitive type and optional material. ```APIDOC ## surface_begin ### Description Begins creating a new surface with a specified primitive type and optional material. ### Signature ```gdscript void surface_begin(primitive: Mesh.PrimitiveType, material: Material = null) ``` ### Parameters - **primitive** (Mesh.PrimitiveType) - Primitive rendering mode (e.g. `Mesh.PRIMITIVE_TRIANGLES`). - **material** (Material) - Optional. Material assigned to the surface. Defaults to `null`. ### Return Value void ``` -------------------------------- ### start_simulation(bones: Array[StringName] = []) Source: https://github.com/godotengine/godot-docs/blob/master/classes/class_skeletonmodification2dphysicalbones.rst Tells the PhysicalBone2D nodes to start simulating and interacting with the physics world. ```APIDOC ### start_simulation ```gdscript func start_simulation(bones: Array[StringName] = []) -> void ``` #### Description Tell the `PhysicalBone2D` nodes to start simulating and interacting with the physics world. #### Parameters - **bones** (`Array[StringName]`, optional) - Array of bone names. If provided, only `PhysicalBone2D` nodes matching those names will start simulating. Defaults to `[]`. ```