Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Unity 2019.4.8f WebGLCachedXMLHttpRequest

Discussion in 'WebGL' started by pthater, May 29, 2021.

  1. pthater

    pthater

    Joined:
    Feb 15, 2017
    Posts:
    5
    Do Unity include WebGLCachedXMLHttpRequest 2019.4.8f? I cant find CachedXMLHttpRequest. And what is the way we should use it? I tried https://github.com/kongregate/Unity-WebGL-Utilities
    But i observe cache issue or cors issues that dont bubble up when using inkoknito browser mode.
    Can we use a more recent UnityLoader.js?

    What are the know issues and why we dont have CachedXMLHttpRequest in the old UnityLoader.js.
    Would be very helpful to clarify.
     
  2. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    944
    CachedXMLHttpRequest should be present in the generated build if you enabled the "Data Caching" option in the WebGL build settings. If Data Caching is disabled, then CachedXMLHttpRequest is not emitted in the build (since it would take up wasted space)

    To get the most recent UnityLoader.js, recommend updating to Unity 2020.3 branch. There the file has been renamed to "build.loader.js", where "build" is the name of the WebGL build you are doing.
     
  3. pthater

    pthater

    Joined:
    Feb 15, 2017
    Posts:
    5
    The option Data Caching was the option to store data in indexDB. XMLRequest is for using the Browser cache only. Enable Data Caching blows up the indexDB and the RAM heap of the application. I stuck with unity 2019.4 cause more recent version doesn't mean its more stable. However thanks