Search Unity

WWW does not function on Master build only for UWP

Discussion in 'Windows' started by shenzyapp, Mar 30, 2018.

  1. shenzyapp

    shenzyapp

    Joined:
    May 23, 2017
    Posts:
    3
    Hello
    I have a very weird error of HTTP communication for UWP. The codes are simple,

    Code (CSharp):
    1. WWW ScorePost = new WWW (postUrl)
    2. string ret = ScorePost.text;
    On Debug build or Release build, the codes function well. But in Master build, it seems the returned "ret" is null.

    My Unity is 2017.4.0f1 and is up to date. My visual studio communication is version 15.6.4 also up to date.
    Before, I used old Unity and previous VS (one or two version earlier), all builds functioned!

    Any advice? Thank you very much!

    Shen

    p.s.
    Similar reports found here: https://answers.unity.com/questions/1469087/www-functions-not-working-in-uwp-master-build-with.html
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    In real code you are waiting for download to finish, right?
     
  3. shenzyapp

    shenzyapp

    Joined:
    May 23, 2017
    Posts:
    3
    Thank you for your follow-up!

    Yes, the real codes are

    Code (CSharp):
    1. WWW ScorePost = new WWW (postUrl);
    2. yield return ScorePost;
    3. if(!IsNullOrEmpty(ScorePost.error))
    4. {
    5.    string ret = ScorePost.text;
    6.   //more codes here to do sth here.
    7. }
    These codes work perfect on Debug/Release build, but fail on Master build.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,676
  5. shenzyapp

    shenzyapp

    Joined:
    May 23, 2017
    Posts:
    3
  6. jghospital

    jghospital

    Joined:
    Nov 22, 2017
    Posts:
    17
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,676
  8. jghospital

    jghospital

    Joined:
    Nov 22, 2017
    Posts:
    17
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,676
    Unity 2017.3 was renamed into 2017.4. And that's currently the most recommended and supported version to develop on.
     
  10. joseGuate97

    joseGuate97

    Joined:
    Mar 1, 2018
    Posts:
    57
    Is anyone else experiencing a similar behavior in 2019.3.3f1?
     
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,676
    It's very unlikely to be the same issue. The original issue was related to marshaling peculiarities on .NET Scripting Backend together with link time code generation optimization. Can you create a new thread describing what you're seeing?