Skip to content
Sign upLog in
← Back to Community

How to post Unity 3D creations onto replit

Profile icon
mesquite2234

I decided to learn unity, and made some pretty cool things that I want to share, but can't. How do I embed a unity3D project onto a repl?

Answered by ch1ck3n [earned 5 cycles]
View Answer
Comments
hotnewtop
Profile icon
ch1ck3n

build the project as a web project

file->build settings->HTML thing->change build settings to this and build

Profile icon
mesquite2234

@ch1ck3n
Thanks! I knew it had something to do with building, I just didn't know what to build for

Profile icon
mesquite2234

@ch1ck3n
What do I do after I build it? (Sorry for the ping)

Profile icon
ch1ck3n

@mesquite2234
just upload the html files to replit

Profile icon
mesquite2234

@ch1ck3n
So I got the HTML file and assets into a repl, but it's giving me an error:

Unable to parse Build/WebGL_MAYBE.framework.js.gz! This can happen if build compression was enabled but web server hosting the content was misconfigured to not serve the file with HTTP Response Header "Content-Encoding: gzip" present. Check browser Console and Devtools` Network tab to debug.

What do I do?
(Again, sorry for the ping)

Profile icon
ch1ck3n

@mesquite2234
im not sure as i have not encountered that error :(

Profile icon
developer1001

@mesquite2234
You can fix this by decompressing the files using 'gzip -d <.gz filename>', moving the files to be in the same directory as index.html and changing the path name of the files in index.html. This works most of the time unless the server is under much stress and the wasm file times out.

Profile icon
developer1001

@developer1001
Also rename the .js files so they include no dots. Only the one in .js and change this in index.html

Profile icon
ch1ck3n

@developer1001
thanks