Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tolua 调用unitywebrequest 无反应 #251

Open
azmja opened this issue Aug 18, 2022 · 0 comments
Open

tolua 调用unitywebrequest 无反应 #251

azmja opened this issue Aug 18, 2022 · 0 comments

Comments

@azmja
Copy link

azmja commented Aug 18, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant