class

Godot::CrystalScript

Inherits Godot::ScriptExtension < Godot::Script < Godot::Resource < Godot::RefCounted < Godot::Object < Reference < Object

Represents a standalone .cr file as a first-class Godot Script resource. Bridges source text, AST reflection, and Inspector property presentation.

Constructors

new(pointer : Pointer(Void) = Pointer(Void).null)
Source
new(path : String, source : String = "", pointer : Pointer(Void) = Pointer(Void).null)
Source

Class methods

_godot_has_virtual_method(method_name : String) : Bool
Source
godot_class_name
Source
godot_parent_class_name
Source

Instance methods

_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
base_type
Source
call(method : String, *args) : Pointer(Void)

Calls the named method on the object with variable arguments.

Source
class_name
Source
doc_comments
Source
doc_comments=(v : Hash(String, String))
Source
is_tool_script
Source
is_tool_script=(v : Bool)
Source
methods
Source
methods=(v : Array(String))
Source
parse_source_metadata

Fast, pure-Crystal AST scanner to extract class name, base type, exported properties, signals, and doc comments directly from .cr source.

Source
properties
Source
properties=(v : Array(ScriptProperty))
Source
reload(keep_state : Bool = true) : Int32
Source
script_base_type
Source
script_base_type=(v : String)
Source
script_class_name
Source
script_class_name=(v : String)
Source
script_path
Source
script_path=(v : String)
Source
set_script_path(p : String) : Void
Source
set_source_code(code : String) : Void
Source
signals
Source
signals=(v : Array(String))
Source
source_code

Property source_code getter

Source
source_code=(v : String)
Source
variant_type_from_string(type_str : String) : Int32
Source