HOOZi文档
Skip to content

script

脚本元管理。


script.load(path) → bool

参数path : string —— scripts/ 下的相对路径

script.unload(path) → bool


示例

lua
-- 加载另一个脚本(一般在交互按钮里调)
if not script.load("_test_05_net.lua") then
    gui.notify:error("加载失败", 2.0)
end