Skip to content

tolua 调用unitywebrequest 无反应 #251

Description

@azmja

tolua 调用unitywebrequest 无反应,tolua中调用CS.UnityEngine.Networking.UnityWebRequest.Get(url) 时候 CS.UnityEngine.Networking 无法被识别,我尝试将CS.UnityEngine.Networking _GT(typeof(UnityWebRequest))引入,是可以使用unitywebrequest的 但是却无法收到request.downloadHandler.text的消息,下面是我的代码 ,很困扰
local co = coroutine.create(function()
request = UnityEngine.Networking.UnityWebRequest.Get(Localurl);

 logGreen("----开启协程 开启coroutine")
yield_return(request:SendWebRequest())
logGreen("----111111111111111111111")
if (request.isHttpError or request.isNetworkError) then
logGreen(request.error)
else
logGreen(request.downloadHandler.text)
end

end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions