{"id":25603273,"url":"https://github.com/toasterofbread/godot-utilities","last_synced_at":"2026-02-26T23:01:00.928Z","repository":{"id":134734638,"uuid":"419719853","full_name":"toasterofbread/Godot-Utilities","owner":"toasterofbread","description":"A collection of various nodes and scenes. Note: don't use this, it probably sucks.","archived":false,"fork":false,"pushed_at":"2022-03-16T13:40:41.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-10T23:35:57.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toasterofbread.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-21T12:46:34.000Z","updated_at":"2022-02-23T12:32:55.000Z","dependencies_parsed_at":"2023-05-31T08:15:22.344Z","dependency_job_id":null,"html_url":"https://github.com/toasterofbread/Godot-Utilities","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/toasterofbread/Godot-Utilities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toasterofbread%2FGodot-Utilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toasterofbread%2FGodot-Utilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toasterofbread%2FGodot-Utilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toasterofbread%2FGodot-Utilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toasterofbread","download_url":"https://codeload.github.com/toasterofbread/Godot-Utilities/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toasterofbread%2FGodot-Utilities/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29876333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T22:37:10.609Z","status":"ssl_error","status_checked_at":"2026-02-26T22:37:09.019Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-21T17:26:07.464Z","updated_at":"2026-02-26T23:01:00.918Z","avatar_url":"https://github.com/toasterofbread.png","language":"GDScript","readme":"# **Godot Utilities**\n\n#### A collection of various nodes and functions\n\n\n\n### Nodes:\n\n- **NinePatchRectTextureButton**\n  - A combination of a NinePatchRect and a TextureButton, with some extra features like text\n- **NodeTrailEmitter**\n  - Emits a trail for each added node based on customisable parameters\n- **ExPhysicsBodyArea2D**\n  - A script intended for use with PhysicsBody2Ds and Area2Ds, with functions for quickly enabling and disabling all collision layers and masks.\n\n- **KinematicBody2DWithArea2D**\n  - A KinematicBody2D with an embedded Area2D that shares the same collision shapes\n\n- **CustomDialog**\n  - A custom WindowDialog with various additional functionality such as a signal emitted when any action occurs, and a static function to create and display the dialog with a single call.\n\n\n\n### Classes:\n\n- **ExArray**\n  - A custom array with a limit property and signals emitted when items are added or removed\n- **ExTexture**\n  - A texture class which allows a texture to be scaled\n\n### Functions (contained in Utils.gd):\n\n- `RandomNumberGenerator` **get_RNG** `( )`\n\n  ​\tReturns the RNG object (a RandomNumberGenerator created and randomised on init).\n\n- `Node` **get_anchor** `( )`\n\n  ​\tReturns the anchor node (an Node added to the Utils singleton on ready).\n\n- `Node` **get_unique_anchor** `( type: GDScript or GDScriptNativeClass )`\n\n  ​\tCreates a new node using [type], adds it to the anchor node, and returns it.\n\n- `void` **sprint** `( items: Array, divider: String = \" | \", tprint: bool = false )`\n\n  ​\tPrints [items] in a single line with dividers. If [tprint] is true, prints using the tprint function.\n\n   Example: `sprint([\"one\", 2, \"three\"])` **-\u003e** one | 2 | three\n\n- `void` **tprint** `( msg: Any )`\n\n  ​\tPrints [msg] prepended with the current engine time (OS.get_ticks_msec()). Useful for printing every frame.\n\n- `Any` **random_array_item** `( array: Array, rng: RandomNumberGenerator = get_RNG() )`\n\n  ​\tReturns a random item from [array] using [rng].\n\n- `Color` **random_colour** `( r: float = NAN, g: float = NAN, b: float = NAN, a: float = NAN, rng: RandomNumberGenerator = get_rng() )`\n\n  ​\tReturns a random colour. Individual values can be overridden using [r], [g], [b], and [a].\n\n- `void` **reparent_node** `( node: Node, new_parent: Node, retain_global_position: bool = false )`\n\n  ​\tRemoves [node] from its parent, then adds it to  [new_parent]. If [retain_global_position] is true, the global_position of [node] will be maintained.\n\n- `Vector2` **to_local** `( position_of: Node, relative_to: Node )`\n\n  ​\tReturns the position of [position_of] relative to [relative_to]. Equivalent to Node2D.to_local(), but also works for Control and Spatial nodes.\n\n- `Vector2` **get_node_position** `( node: Node, global: bool = false )`\n\n   Returns the local or [global] position of [node]. [node] must be a Node2D, Control, or Spatial.\n\n- `void` **set_node_position** `( node: Node, global: bool = false )`\n\n   Sets the local or [global] position of the [node]. [node] must be a Node2D, Control, or Spatial.\n\n- `Color` **get_global_modulate** `( node: CanvasItem )`\n\n   Returns the global modulation of [node] (the product of the modulations of the node and all its ancestors). In other words, returns the actual modulation applied to the node when rendered.\n\n- `void` **append_dictionary** `( base: Dictionary, append: Dictionary, duplicate_values: bool = false )`\n\n  ​\tAppends [append] onto [base] (values will be overwritten). If [duplicate_values] is true, values that are an array or dictionary will be duplicated.\n\n- `String` **bbcode_colour_text** `( text: String, colour: Color )`\n\n   Returns [text] as a BBCode formatted string with the passed [colour].\n\n- `int` **get_line_of_position** `( string: String, position: int )`\n\n  ​\tReturns the line number of [position] within [string].\n\n- `int` **get_position_of_line** `( string: String, line: int )`\n\n  ​\tReturns the position of [line] within [string].\n\n- `Array or int (error)` **get_dir_items** `( directory: String (path) or Directory, skip_navigational: bool = true, skip_hidden: bool = true )`\n\n  ​\tReturns the items contained in [directory] as an array. May return an int error.\n\n- `JSONParseResult` **load_json** `( path: String )`\n\n  ​\tLoads file at [path], parses its contents as JSON, and returns the result.\n\n- `void` **save_json** `( path: String, data, pretty: bool = false )`\n\n  ​\tWrites a file at [path] with [data] in JSON format. If [pretty] is true, indentation is added to the file.\n\n- `void` **yield_particle_completion** `( emitter: Node )`\n\n  ​\tYields until [emitter] has stopped emitting, and has no remaining particles. [emitter] must be of type Particles, Particles2D, CPUParticles, or CPUParticles2D.\n\n  \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoasterofbread%2Fgodot-utilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoasterofbread%2Fgodot-utilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoasterofbread%2Fgodot-utilities/lists"}