class

Godot::CrystalIntegrationPlugin

Inherits Godot::EditorPlugin < Godot::Node < Godot::Object < Reference < Object

Constants

CRYSTAL_ICON_SVG = "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 193.2 206.7' width='16' height='16'><path fill='#e0e0e0' d='m165.4 122-50 49.9c-.2.2-.5.3-.7.2l-68.3-18.3c-.3-.1-.5-.3-.5-.5L27.5 85.1c-.1-.3 0-.5.2-.7l50-49.9c.2-.2.5-.3.7-.2l68.3 18.3c.3.1.5.3.5.5l18.3 68.2c.2.3.1.5-.1.7zm-67-54.3L31.3 85.6c-.1 0-.2.2-.1.3l49.1 49c.1.1.3.1.3-.1l18-67c.1 0-.1-.2-.2-.1z'/></svg>"

Constructors

Class methods

_godot_has_virtual_method(method_name : String) : Bool
Source
apply_highlighter_if_needed
Source
build_compiler_env

Builds an environment Hash with properly configured CRYSTAL_PATH ensuring libgodot and local shards can be resolved from anywhere.

Source
building?
Source
check_test_build_button_flow

Automated verification workflow for the Build Crystal toolbar button and GDExtension reload

Source
cleanup
Source
cleanup_on_shutdown
Source
clear_theme_icons
Source
ensure_editor_setup

Ensures all editor integration components are active when running inside the Godot Editor. Safe to call both on startup and after GDExtension reloads.

Source
ensure_highlighter_registered

Ensures syntax highlighter is registered with ScriptEditor

Source
ensure_project_bindings

Automatically generates project bindings for custom GDScript nodes if present

Source
ensure_theme_icons

Registers Crystal icons into Godot's EditorIcons theme so ScriptCreateDialog and FileSystem dock display proper icons

Source
execute_crystal_build

Compiles project Crystal code into shared library

Source
execute_crystal_build_with_options(is_release : Bool = false) : Bool

Compiles project Crystal code with optional release optimizations

Source
get_crystal_icon_texture
Source
godot_class_name
Source
godot_parent_class_name
Source
has_editor_interface?
Source
headless?
Source
on_cleanup
Source
on_cleanup=(on_cleanup : Proc(Void) | Nil)
Source
on_compile_button_pressed

Handles toolbar compile button press to trigger manual Crystal rebuild

Source
recompile_modified_addons_silent

Scans project addons/ directory and recompiles any Crystal addons whose source code changed

Source
reload_pending=(val : Bool) : Void
Source
reload_pending?
Source
report_build_failure(context : String, out_msg : String, err_msg : String, exit_code : Int32) : Void

Formats and bubbles up compilation failures into the Godot Editor UI:

  • Outputs clean formatted error banner in the bottom panel
  • Emits EditorToaster notification (toast in status bar)
  • Pops up centered AcceptDialog in the editor viewport
  • Jumps to the offending line in ScriptEditor if file/line is detected
Source
save_open_editor_files

Saves all open scripts and scenes in the editor before compiling so modifications on disk are up to date

Source
schedule_test_button_press(delay_sec : Float64, cycle : Int64, total_cycles : Int64) : Void
Source
setup_debugger_plugin

Registers and configures the native LLDB debugger plugin

Source
setup_main_screen_panel

Docks the CrystalPanel into Godot Editor's main screen

Source
setup_new_script_button
Source
setup_toolbar_button
Source
show_build_error_dialog(context : String, summary : String, full_error : String, file_path : String = "", line_num : Int32 = -1) : Void
Source
show_create_script_dialog
Source
sync_script_file(base_ed : Godot::Object, path : String) : Void

Synchronizes a script editor buffer with the file on disk. If the file on disk was modified externally (or on initial load), disk changes take precedence. If the buffer was modified in-editor inside Godot, changes are flushed to disk.

Source

Instance methods

_build

Invoked by Godot editor before running project (F5 / F6)

Source
_enter_tree
Source
_exit_tree
Source
_get_plugin_icon
Source
_get_plugin_name
Source
_godot_call_tool_button(button_name : String) : Void

Dispatches inspector tool button clicks on this object.

Source
_godot_call_virtual(method_name : String, delta : Float64) : Void

Virtual method and property dispatch hooks overridden by class registration macros. Delta timestep is received with 64-bit precision (Float64).

Source
_godot_call_virtual_with_data(method_name : String, args : Pointer(Pointer(Void)), ret : Pointer(Void)) : Void

Dispatches generic virtual methods with raw arguments and return buffer.

Source
_godot_get_property(prop_name : String, ret_ptr : Pointer(Void)) : Void

Invoked by the GDExtension bridge when retrieving an exposed @export property.

Source
_godot_set_property(prop_name : String, val_ptr : Pointer(Void)) : Void

Invoked by the GDExtension bridge when setting an exposed @export property.

Source
_has_main_screen
Source
_make_visible(visible : Bool) : Void
Source
_process(delta : Float64) : Void

Per-frame process callback receiving delta timestep in seconds (Float64).

Source
active

Active status of the compiled Crystal editor integration

Source
apply_highlighter_if_needed
Source
call(method : String, *args) : Pointer(Void)

Calls the named method on the object with variable arguments.

Source
emit_ready_in_editor

Type-safe emission helper

Source
execute_crystal_build
Source
execute_crystal_build_with_options(is_release : Bool = false) : Bool
Source
get_crystal_plugin_icon
Source
make_crystal_panel_visible(visible : Bool) : Void
Source
on_compile_button_pressed
Source
on_ready_in_editor

Type-safe signal listener

Source
on_ready_in_editor_once

One-shot type-safe signal listener that automatically disconnects after firing once

Source
ready_in_editor

Bound signal accessor for idiomatic await(node.ready_in_editor) or node.ready_in_editor.connect { ... }

Source
recompile_modified_addons_silent
Source
setup_debugger_plugin
Source
setup_main_screen_panel
Source
setup_new_script_button
Source
setup_toolbar_button
Source
status_message

Status message visible in inspector or tooling

Source
version

Version of the compiled LibGodot library

Source