extends SceneTree # 临时冒烟脚本:headless 验证 C++ GDExtension 是否被加载、类是否可实例化调用。 # 用法:godot --headless --path . -s res://gdextension/verify_native.gd func _init() -> void: var ok := ClassDB.class_exists("SpellforgeNative") print("CLASS_EXISTS=", ok) if ok: var n: Object = ClassDB.instantiate("SpellforgeNative") print("INFO=", n.native_info()) print("MULTIPLY_6x7=", n.multiply(6.0, 7.0)) var arr := PackedFloat32Array([1.0, 2.0, 3.0]) print("SCALE_INPLACE_x10=", n.scale_inplace(arr, 10.0)) quit()