Edit of asset "Kivano GDscript utils" Accepted
Old/Current | New/Edit | |
---|---|---|
Title | Kivano GDscript utils | Kivano GDscript utils |
Description |
# ClassUtils ClassUtils is a Godot Engine **singleton** designed to extend GDScript with features currently unavailable natively, specifically focused on **enforcing abstract function implementations**. ## Features Abstract Function Checking: Automatically identifies if concrete classes fail to implement abstract functions defined in their abstract parent classes. ## How to Use 1. Add as a Singleton: Add `class_utils.tscn` as a singleton in your Godot project settings. 2. Mark Abstract Classes: Above your abstract class's `class_name` declaration, add the line: "@abstract_class" ex: "@abstract_class" class_name MyAbstractClass extends Node 3. Mark Abstract Functions: Inside the body of any abstract function, add the following assertion: func my_abstract_function(): assert(false, ClassUtils.ABSTRACT_FUNCTION_MSG) # Your abstract function logic (if any default behavior is desired) # Promise Utility `Promise` is a helper class designed to simplify asynchronous workflows in GDScript. It allows you to `await` operations and check results in a structured way. ### Example Usage var promise: Promise = async_compute_value() await promise.wait_for_fulfill() assert(promise.is_correct(), promise.get_error()) var computed_value: float = promise.get_result() as float |
# ClassUtils ClassUtils is a Godot Engine **singleton** designed to extend GDScript with features currently unavailable natively, specifically focused on **enforcing abstract function implementations**. ## Features Abstract Function Checking: Automatically identifies if concrete classes fail to implement abstract functions defined in their abstract parent classes. ## How to Use 1. Add as a Singleton: Add `class_utils.tscn` as a singleton in your Godot project settings. 2. Mark Abstract Classes: Above your abstract class's `class_name` declaration, add the line: "@abstract_class" ex: "@abstract_class" class_name MyAbstractClass extends Node 3. Mark Abstract Functions: Inside the body of any abstract function, add the following assertion: func my_abstract_function(): assert(false, ClassUtils.ABSTRACT_FUNCTION_MSG) # Your abstract function logic (if any default behavior is desired) # Promise Utility `Promise` is a helper class designed to simplify asynchronous workflows in GDScript. It allows you to `await` operations and check results in a structured way. ### Example Usage var promise: Promise = async_compute_value() await promise.wait_for_fulfill() assert(promise.is_correct(), promise.get_error()) var computed_value: float = promise.get_result() as float |
Category | Scripts | Scripts |
License | MIT | MIT |
Repository Provider | GitHub | GitHub |
Repository Url | https://github.com/kubecz3k/gdscript-language-extension | https://github.com/kubecz3k/gdscript-language-extension |
Issues Url | https://github.com/kubecz3k/gdscript-language-extension | https://github.com/kubecz3k/gdscript-language-extension |
Godot version | Godot 4.1 | Godot 4.1 |
Version String | 1.0 | 1.0 |
Download Commit | 9c7a7227f7ebc0d024d58ce428d1b5a0312fb76f | 9c7a7227f7ebc0d024d58ce428d1b5a0312fb76f |
Download Url (Computed) | https://github.com/kubecz3k/gdscript-language-extension/archive/9c7a7227f7ebc0d024d58ce428d1b5a0312fb76f.zip | https://github.com/kubecz3k/gdscript-language-extension/archive/9c7a7227f7ebc0d024d58ce428d1b5a0312fb76f.zip |
Icon Url |
https://raw.githubusercontent.com/kubecz3k/public-web-assets/refs/heads/main/icons/kivano_gdscript_utils.png
![]() |
https://raw.githubusercontent.com/kubecz3k/public-web-assets/refs/heads/main/icons/kivano_gdscript_utils.png
![]() |