Could someone help me out?
I’m working on building a Unity webGL app and I need to add some code in index.html. However, when I publish using the WebGL Publisher, I’m not seeing my changes. When I run it on my localhost, the index.html is triggered and I can see that my code is working.
I followed the instructions from here on how to add a custom index.html. I copied the default one and only added some logging for example.
In my build folder, the index.html page contains my changes from the template, but when I publish it, they never seem to execute.
I’m wondering if the WebGL Publisher is using some unique start page, or how I can overcome this problem. Any help would be appreciated.
Hmmm I wouldn’t be surprised if modifications to index.html are simply not supported on play.unity.com
This would be a major security hole since you could inject any custom Javascript in your custom index.html and run it on a domain that’s not yours. Naturally nobody will want their users to upload and run html files with custom javascript on their servers. This could have backfiring repercussions if attacks or any kind of malicious play were to originate from play.unity.com (eg domain blacklisted in malware tools or even search engines).