Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

make UnityLoader.js read accept data instead of urls.

Discussion in 'WebGL' started by joonturbo, Jul 19, 2017.

  1. joonturbo

    joonturbo

    Joined:
    Jun 24, 2013
    Posts:
    52
    I'm working on a project where a Unity WebGL game needs to be contained in an existing environment.
    This environment doesn't let me access files on a server, but rather has functions that just return the binary or text data from a given file ID. I'm working on a dev build of a simple WebGL game to try to get it to work.

    The environment is in JavaScript, so I can access UnityLoader.js, except already the Bin.json parameter path file is an issue since it's inaccessible. Inside that Bin.json are 4 other URLs that I'd need to bypass similarly.

    Has anybody done something similar, or does anybody know how to hack UnityLoader.js and pass it the raw data rather than have it download it for itself?
     
unityunity