Can't run Laser Defender from my website

Built LaserDefender in Unity 5 - it is fully working.
In Build Settings, switched platform to WebGL and selected Build and Run.
Runs fine in Chrome.
Uploaded files to my website.
On going to the game’s Index.htl file I get the WebGL page, with the correct project, but with the error message ‘Uncaught incorrect header check’.
Tried on Chrome, IE, Edge and FireFox, with the same result.
Any ideas?

Hi,

You need to create a file named:

Web.config

Web is the filename, .config is the extension
with the following as content:

[code]

<system.webServer>



        <!-- Unity 5.3 -->
        <mimeMap fileExtension=".datagz" mimeType="application/binary" />
        <mimeMap fileExtension=".jsgz" mimeType="application/binary" />
        <mimeMap fileExtension=".memgz" mimeType="application/binary" />
    </staticContent>
</system.webServer>

[/code]

Put the Web.config file in the same directory as the index.html of your game

I had the same issue and that fixed it for me.

4 Likes

Brilliant Mike!

Worked perfectly.

Note to Ben and Sam - should this be included in the course somewhere?

Chris

Privacy & Terms