- Home /
AppEngine and big WebGL.data files
Hey, I'm trying to set up a WebGL export to App Engine. Short version: where does Unity call the WebGL.data file, and can the location of it be changed? And especially can it be done for cross domain items
Longer version: My WebGL.data file is 80 mb in size, or 30 when compressed
The issue is that that App Engine doesn't allow file hosting of files larger than 32 mb, so the 80mb file can't be uploaded, and AEG compresses files itself so you can't flag the 30 mb file as "compressed".
What I've done is set up the file on Cloud Storage and fetch it using blobstore.Send whenever the WebGL.data url is called. This works perfectly for the 80mb file.
func handleWebGLRequest(w http.ResponseWriter, r *http.Request) {
c := appengine.NewContext(r)
blobKey, err := blobstore.BlobKeyForFile(c, "/gs/<url>/WebGL.data")
if err != nil {
fmt.Fprintf(w, "Problem: cannot find WebGL.data")
return
}
blobstore.Send(w, blobKey)
}
However, bandwidth, and worse, loading times for the 80mb files are very long. I'd like to upload the compressed file and have it sent over. this almost works, the file is on cloud storage marked as compressed.. except sending it through code makes the content-encoding header "disappear" and it doesn't look at the file as a compressed one.
Alternatively if one tries to mark the file as public and simply redirect to the url provided by cloud storage, this again almost works, but a cross-domain policy problem pops up
http.Redirect(w, r, "http://storage.googleapis.com/<url>/WebGL.datagz", http.StatusMovedPermanently)
So my question is, is there a place I can change where the WebGL.data file is called? maybe if I can make it cross-domain-able this issue will finally be resolved. Or any other suggestions
Your answer
Follow this Question
Related Questions
Mouse won't unlock in WebGL build but does in the editor 1 Answer
Calling JS WebGL plugins from browser JavaScript 0 Answers
Weird black overlay(look like shadow) in WebGL build 0 Answers
Scrolling WebGL Canvas on Mobile / Tablet 0 Answers
How to clear all the players that have played my games playerprefs? 2 Answers