Search Unity

Unable to read file in StreamingAssets on Linux/macOS - Cannot connect to destination host

Discussion in 'Linux' started by Deleted User, Nov 25, 2019.

  1. Deleted User

    Deleted User

    Guest

    Hey y'all,

    I cant read project files in streaming assets on *nix OS. At first I thought it was a pathing issue, but that is correct.

    Any idea what this means?

    I am using UnityWebRequest to read the files, as I believe that is best practice.

    Thank you for your help
     
  2. andrews_unity

    andrews_unity

    Unity Technologies

    Joined:
    Dec 11, 2015
    Posts:
    264
    You can use standard System.IO functions and classes, can you provide any info on whats happening ?
     
  3. Deleted User

    Deleted User

    Guest

    The error was as obscure as I made it sound

    I needed to add file:// to the URI on nix.

    Thank you
     
  4. Alanmars0214

    Alanmars0214

    Joined:
    Sep 27, 2020
    Posts:
    2
    We also got this issue in unity editor with Android platform, we have queried official document of StreamingAssets, but it didn't give answer, finally, the answer is here, it help us solved the problem, thank you so much!
     
    Last edited: Apr 13, 2021
    ting_poplab likes this.