godot_luaAPI icon indicating copy to clipboard operation
godot_luaAPI copied to clipboard

Feature Resuest: Pushing modules to lua

Open Fran6nd opened this issue 11 months ago • 1 comments

Is your feature request related to a problem? Please describe. Currently there is no way to push a gdscript made library to lua.

Describe the solution you'd like I would like to have a pushModule(name, array) function pushing an array as global. The array would formatted as follows: [[function_name1, function1],...] So we can use as follow from lua: module_name.function_name()

I have done yet unsuccessful attempts to implement it but working on it!

Thank you!

Fran6nd avatar Mar 09 '24 14:03 Fran6nd

Use

api.push_variant("module_name",{
   "function_name_1":function_1,
   "function_name_2":function_2
})

it will behave as expected

radiantgurl avatar May 22 '24 20:05 radiantgurl