require("framework.System")
local WindowContainer = CS.Loxodon.Framework.Views.WindowContainer
local Context = CS.Loxodon.Framework.Contexts.Context
function launch()
print("lua launching...")
local context = Context.GetApplicationContext()
local locator = context:GetService("AddressableUIViewLocator")
local winContainer = WindowContainer.Create("MAIN")
locator:LoadWindowAsync(winContainer, "HotUpdate/Startup/Startup"):OnPostExecute(
function(window)
window:Create()
local transition = window:Show()
transition:OnStateChanged(
function(w, state)
print("Window:" .. w.Name .. " State:" .. state:ToString())
end
)
transition:OnFinish(
function()
print("OnFinished")
end
)
end
)
end
lua代码如下:
我写了一个新的IUIViewLocator接口实现——AddressableUIViewLocator,用于Addressable资源的加载,所以需要使用异步方式。 错误提示说参数无效:
请教一下,应该如何调用才能争取的呢?