michaelcassidy.net

I post things about webdev and gamedev

Load Unity WebGL player only after user clicks a button

25 June 2021 6 min read webdev gamedev

Unity allows you to publish WebGL builds of your games, which is great for easily sharing prototypes or publishing complete projects. But these builds can get large (hundreds of megabytes) and you may wish to warn your users before the download initiates. It’s pretty easy to do this by modifying the html page output by the Unity WebGL build.

This post assumes only beginner-level knowledge of HTML, CSS and JavaScript.

Continue reading