- Home /
How to host my webGL build on blogger?
This is probably a really weird question, but does anyone know how I could host a webGL build of my game in a blogger page/post? I've tried using html with the iframe tag and a google drive sharing link, but all I get is a message saying, "drive.google,com refused to connect. Does anyone know how to get it to work using this or another method? Or would I have to use something other than blogger.
For reference, here is the page where I'm trying to put my game: https://brokenpiecegames.blogspot.com/2021/04/roll-ball-html-embed-test.html
Answer by rh_galaxy · Jun 09, 2021 at 11:17 AM
I just copy the output to the web-server.
index.html
TemplateData
StreamingAssets
Build
Then use parameters for the index.html to be used from Unity.
https://www.galaxy-forces-vr.com/webreplay/index.html?Level=2race02&Id=3568860373180847&IsQuest=0
Accessing the page path from Unity to parse it.
Application.absoluteURL()
Also use this for the path, to support debug in Unity and to the release version.
#if UNITY_EDITOR
//access from unity editor for debug
public static string WEB_HOST = "https://galaxy-forces-vr.com";
#else
//local access from code already on web server
public static string WEB_HOST = "";
#endif
//example: string url = WEB_HOST + "/user_levels/" + i_szFilename;
Most webservers will refuse to allow the app to access data from another url-base.
Your answer
![](https://koobas.hobune.stream/wayback/20220613034732im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to open a Webgl unity game from a different html page? 1 Answer
game view differs between devices in web 1 Answer
Unity - WebGL build works fine into the localhost but not into the webserver 2 Answers
Textinputs not working when I implemented "Unity webGL" in VueJS Project 1 Answer
Scale WebGL cavas to browser window size 0 Answers