Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  5. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

UnityWebRequest vs. WWW

Discussion in 'Documentation' started by jhocking, Jul 22, 2017.

  1. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    770
    I'm in the middle of updating the code in Unity in Action and just noticed something I'm confused about, and was hoping someone could clear it up. Official response from Unity would be great, but failing that maybe someone could link a blog post or something that discusses this issue...

    I had been using WWW in some code, and replaced that with UnityWebRequest since I had read that WWW was being deprecated. Well, I just noticed that the manual no longer says that; compare the first sentence of the documentation from 5.4 to the latest documentation:
    https://docs.unity3d.com/540/Documentation/Manual/UnityWebRequest.html
    https://docs.unity3d.com/Manual/UnityWebRequest.html

    This seems to suggest Unity's developers have changed their minds about deprecating WWW, so now I'm confused. First off, have they changed their minds about this? And if so, is it still a good idea for me to switch to UnityWebRequest? I can't imagine the developers want to maintain two APIs that do essentially the same thing, in which case they might have decided UnityWebRequest was a failed attempt and it's the method that's going away.
     
    Last edited: Jul 26, 2017
    tonialatalo likes this.
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,289
    My understanding is that the WWW feature is being "removed". Well, will be left in the code for a while, but isn't something we'd ever suggest should be used. UnityWebRequest is the future. The same is used for things like Animation which is replaced by Animator. Documented as Legacy.
     
    jhocking likes this.
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    3,470
    If you're considering WWW as a legacy component, you should go through the docs where other things use WWW as an example, and use UnityWebRequest instead.

    For example, the page for Asset Bundles explains them like this:
    "AssetBundles let you stream additional assets via the WWW class and instantiate them at runtime"
     
    tonialatalo likes this.
  4. fanhieu8x

    fanhieu8x

    Joined:
    Dec 19, 2016
    Posts:
    4
    TheoSabattie likes this.