Skip to content

Commit

Permalink
Merge pull request #2 from SDFTDusername/patch-2
Browse files Browse the repository at this point in the history
Update main.gd to show how to use vm.open_libraries
  • Loading branch information
Manonox authored Aug 8, 2024
2 parents 58e82ee + 2f7c90f commit 222dc86
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions demo/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ func _ready():

vm.open_all_libraries()

# You can also open libraries like this
#vm.open_libraries([
#vm.LUA_BASE_LIB,
#vm.LUA_COROUTINE_LIB,
#vm.LUA_TABLE_LIB,
#vm.LUA_OS_LIB,
#vm.LUA_STRING_LIB,
#vm.LUA_MATH_LIB,
#vm.LUA_VECTOR_LIB,
#vm.LUA_DEBUG_LIB,
#vm.LUA_UTF8_LIB,
#vm.LUA_BIT32_LIB
#])

vm.lua_pushobject(self)
vm.lua_setfield(vm.LUA_GLOBALSINDEX, "node")

Expand Down

0 comments on commit 222dc86

Please sign in to comment.