GameLoad

Play Unity games through your browser

How to embed GameLoad on your website?

With Chrome extension (working only in Chrome)

  • Advantages: It is enough to place a link for installing the extension and the extension will take care of everything else.
  • Disadvantages: Besides installing the extension, it is also necessary to install the program. But you, as webmaster, don’t have to worry about this because the extension will itself offer the installation of the program.


Here are a few ways how to embed GameLoad on your website:
1. a simple link to download the program
2. modifying the code for the Unity Web Player and detect Chrome
Special settings to define your own file or iframe.

    
Only for Chrome users: <a href="#" target="_blank">Install Gameload to play Unity games</a>

<meta data-unity-replace = "true" data-div-id = "#divID" data-width = "800" data-height = "600" data-file = "http://example.com/file.unity3d" data-type = "unity" data-title = "Game Title" />
    



2. modifying the code for the Unity Web Player and detect Chrome
If the user is using Chrome, instead of the installation of the Unity Web Player, the script will display the installation of the GameLoad extension.

See it in action

    
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.0.8/jquery.browser.min.js"></script>
<script>
$(document).ready(function(){
    if ($.browser.chrome === true && $.browser.versionNumber >= 45) { //detect Chrome 45+
        $('#unityPlayer .missing').prepend('<center>Install Gameload to play Unity games<br /><a href="https://chrome.google.com/webstore/detail/game-player-app/cajoopobkbcpiniljegibngikdbidbkh" title="Install Gameload now!"><img alt="Install Gameload now!" src="http://data.gameload.top/download/getgameload.png" /></a></center>');
    }
});
</script>
<div id="unityPlayer">
    <div class="missing"></div>
</div>
<meta data-unity-replace = "true" data-div-id = "#unityPlayer" data-width = "800" data-height = "600" data-file = "http://example.com/file.unity3d" data-type = "unity" data-title = "Game Title" />
    



Special settings:
GameLoad automatically finds the Unity game, but if you need some specific settings, it is possible to define exactly what GameLoad has to open. Just put these metatags on your website:

    
<meta data-unity-replace = "true" data-div-id = "#divID" data-width = "800" data-height = "600" data-file = "http://example.com/file.unity3d" data-type = "unity" data-title = "Game Title" />
    



Properties

Name Type Description
data-unity-replace boolean If it is true, Gameload will replace old Unity object
data-div-id string Id of element, which will be replaced (For example old Id element of Unity object)
data-width integer Width of game
data-height integer Height of game
data-file string Url of game
data-type string There are three types: unity, flash, iframe
data-title string Title of game