Search Unity

Can't use file protocol to load resources from another IP since 2017.1

Discussion in 'Scripting' started by Deleted User, Nov 21, 2017.

  1. Deleted User

    Deleted User

    Guest

    In 5.6 and below I've been successfully able to load files at runtime using the file:// protocol with WWW.
    Here is an example (this would of course be in a coroutine):
    WWW www = new WWW("file://123.456.78.90/test.png");

    This does not work in 2017.x, with neither WWW nor UnityWebRequest. I am aware of the WWW deprecation in favour of UnityWebRequest, but haven't been able to make either work in 2017.x.

    I have tried
    - Both WWW and UnityWebRequest
    - file://, file:///, file:////, file:\\
    - double slashes instead of slashes in url
    - backslashes instead of forward slashes in url
    - all of the above on versions: 2017.1.0, .1.1, .1.2, .1.2p2, 2017.2.0p2, 2017.3.0b10

    Not once have I been able to get anything but either "Generic/unknown HTTP error" or "404 not found".

    - I am developing exclusively on Windows
    - I am releasing exclusively on Windows (internal software)
    - All my files are hosted on networked Windows machines
    - All the files I'm trying to access have no restrictions regarding permissions
    - All the files work fine in browsers
    - I have tried the machine name as well as the machine IP

    This has worked seamlessly in versions prior to 2017.1. I've checked the 2017.1 release notes but can't see anything on this topic.

    Was the ability to load files from other IP addresses just somehow silently removed, or am I the one at fault here? Help would be greatly appreciated as I'm kind of stuck on 5.6 until I can resolve this!
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Internally we have made a lot of changes to the web request code in 2017, it sounds like a bug. Can you file a bug report please.
     
  3. Deleted User

    Deleted User

    Guest