How to host a Unity web-game with Google Drive | { Jibran I. Syed }

[Update Jan 2017] Google stopped hosting links from Google Drive a while ago, so this post is basically useless now.

[UPDATE: Dec ’14] Hosting Unity games on Google Drive has recently stopped working (at least for me). Even when I follow Google’s new instructions for getting the hosting link, Unity games don’t load from Google Drive. This includes games that were previously hosted and used to work. So I’m afraid it is no longer possible to rely on Google Drive to host Unity games. Your mileage may vary.

[Update: Jan ’14] It seems Google thought it would be a good idea to change Google Drive’s interface a little bit. So I updated the tutorial to match the new interface.

In this tutorial, I’ll show you how to host a game made with Unity3D on Google Drive. This tutorial assumes you know what the Unity Web Player is. I have seen a few results on how to host a Unity web-game from Dropbox, but I personally couldn’t find one about hosting from Google Drive. I wanted to host a Unity3D game from Google Drive to present to the Ludum Dare game dev competition.

Assuming you made your Unity game and you’re ready to share it with people, you first go to “File -> Build Settings”. Under “Platform”, select “Web Player”. You can choose to have your game streamed, if you want. If it’s small, you probably don’t need to.

READ:  How much does it cost to host a website in 2022?

Screen Shot 2013-08-26 at 8.38.06 PM

Then click “Build” on the bottom right corner. Choose a place to save the build. Whatever you choose, you should see an .html file and a .unity3d file when done building. You should put these 2 files into a folder for convenience (in case Unity doesn’t do it).

You can now upload the web-game build on Google Drive either by using the desktop app (for Mac or Windows) or upload on the Google Drive website.

It’s important that you upload the web-game in the Public Share folder in order for people to play your game online.

Screen Shot 2013-08-26 at 9.04.53 PM

It doesn’t matter where in the Public Share folder you upload.

If by chance you don’t have a Public folder, you’ll have to make one. To do that, press the Create button on the website and select Folder. You can name it whatever you want, but for clarity it should be called something like “Public”. Then you right-click on your new folder and select “Share…” → “Share…”

Share-share

The Share Settings window will pop up. Under “Who has access”, press “Change…”

sharesettings

A new window will show 3 choices. Select “Public on the web”, and click the green Save button. Now that your new public folder is ready, you can upload the needed files.

READ:  How to create a REST API using Spring Boot, Maven, and MySQL

Once you upload the game, go to the folder where you uploaded the files and make sure the Details and Activity side-panel is open. (It’s the “i” button on the top right.)

sidepanelButton

The Details and Activity side-panel opens. Be sure to click on your game’s HTML file so that its details are exposed on the Details side-panel. (Click the checkmark box, not the file link.)

unityhtmlClick

The Details side-panel will show details about the HTML file. Scroll down to “HOSTING” and you will see a web link to access the game. Unfortunately, Google will not allow this link to be right clicked, so you’ll have to left click it.

detailsSidePannel

It should open in a new tab. From what I experienced, the game does not show up until you reload the page. Once reloaded, your game should load and you can simply copy the web link from the URL bar of your browser.

That’s all there is to it! Test that web link on some browsers, and you should be able to play your game online. Share the link with friends, or submit it to a game jam, or whatever you want. Enjoy!