Search Unity

Unity WebRequest Inconsistencies On Hololens

Discussion in 'VR' started by sgiovanni_unity, Jan 24, 2019.

  1. sgiovanni_unity

    sgiovanni_unity

    Joined:
    Jul 10, 2018
    Posts:
    2
    Hello,

    Not sure if this is a bug or if it's just something I miss. I've been working on an app for hololens that will share world anchor data through web service. Basically, what I did was the following:

    C# in unity:
    1. export anchor data
    2. convert byte array to string
    3. call unity web service PUT to the nodejs server with the string from the step above

    using nodejs:
    4. catch the PUT request
    5. save the string into a file

    C# in unity:
    6. call unity web service GET to the nodejs server and wait for the response

    using nodejs:
    7. catch the GET request
    8. read the string
    9. send the string back as response

    C# in unity:
    10. read the response
    11. convert the string back to byte array
    12. import the anchor data back to world anchor store

    the issue lies when unity receives the string back from the webserver. On Unity itself, the received string is the same as the sent string. But on the hololens, the received string is only similar to the sent string up to the 1281th character. After that, the string seems to just repeat some previous encountered characters. This anchor string is obviously super big (8mb data), so I'm not sure if there's any limitation on unity webservice. However, as mentioned before. It works perfectly on the editor itself.
     
  2. rubikCZ

    rubikCZ

    Joined:
    Nov 21, 2020
    Posts:
    4
    Hello,
    despite the fact, that this topic is today quite old, have you or anyone else found any additional information regarding content length of unitywebrequest in combination with HL and/or HL2 ? I'm building currently an app which needs to fetch data when its loaded and I'm facing the same issue. In Unity Editor - Play mode it works like a charm, but not when app is deployed to hololens 2. I'm currently working with Unity 2020.3.25f1.

    Any feedback is highly appreciated.