{"__v":6,"_id":"54895e2a960cdf0b00f86570","category":{"__v":5,"_id":"54890012f291f61400c02d36","project":"543b9b0065bf840e00b473d5","version":"543b9b0065bf840e00b473d8","pages":["54890033f291f61400c02d37","548906c7c178b40b00aa3075","548959f053c7810b0090a058","54895c8dfd3e570b00658fa7","54895e2a960cdf0b00f86570"],"reference":false,"createdAt":"2014-12-11T02:23:14.048Z","from_sync":false,"order":6,"slug":"build-run","title":"Build & Run"},"project":"543b9b0065bf840e00b473d5","user":"543b9aa865bf840e00b473d1","version":{"__v":11,"_id":"543b9b0065bf840e00b473d8","project":"543b9b0065bf840e00b473d5","createdAt":"2014-10-13T09:27:28.467Z","releaseDate":"2014-10-13T09:27:28.467Z","categories":["543b9b0065bf840e00b473d9","543b9ef065bf840e00b473e0","54890012f291f61400c02d36","54890902f291f61400c02d3e","54890c43f291f61400c02d44","54890d71c178b40b00aa3086","5508125c0c4d8c19008a5f83","55094050961f17170070abbd","550945111c38c50d006118ad","550a4c2e42fff40d00ae6049","55221c074801a40d00a77610"],"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"createdAt":"2014-12-11T09:04:42.904Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"basic_auth":false,"results":{"codes":[]},"settings":"","try":true,"auth":"never","params":[],"url":""},"order":4,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"The Starter Kit controls are optimized for mobile touch. In the top left corner we've added developer scrolling controls but these are not designed for gameplay. Customize the kit with your own mouse controls for scrolling across the map before building your web game.\",\n  \"title\": \"Scrolling Controls\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Web Player\",\n  \"body\": \"You must use the most recent version of the Complete Kit to export games with the Web Player.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/9PKnV4RHQ5GI1vBjQ1zX\",\n        \"Screen Shot 2015-08-19 at 4.29.30 PM.png\",\n        \"651\",\n        \"523\",\n        \"#6bae54\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/pD2E1WRQDC2EY2gvZtKQ\",\n        \"Screen-Shot-2015-08-19-at-4.29.24-PM.jpg\",\n        \"409\",\n        \"398\",\n        \"#c2c2c2\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/v0pucurgSwGI6WdUpFp2\",\n        \"new_save_load_buttons.png\",\n        \"1735\",\n        \"997\",\n        \"#d07055\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/egiWbTaoQWm9lvbowohx\",\n        \"Screen Shot 2015-08-19 at 4.27.55 PM.png\",\n        \"700\",\n        \"418\",\n        \"\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/yK5W1jm9Toa1Zl98uUuO\",\n        \"Screen Shot 2015-08-19 at 4.28.02 PM.png\",\n        \"705\",\n        \"421\",\n        \"#4e100e\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/Jxxa6fgzQX6gbzw1CbUH\",\n        \"web-player-strategy-game-template-unity.jpg\",\n        \"544\",\n        \"315\",\n        \"#bb9f91\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n1. Open the Starter Kit in Unity. If you haven't already, import NGUI in a new empty scene, not directly in the Game.unity scene (throws a few internal NGUI specific errors otherwise). Safer to apply this to importing 2D ToolKit as well.\n\n2. In Unity, click **File** > **Build Settings**\n\n3. Click **Web Player** in the Platforms list\n\n4. Look at Player Settings first to make sure your icon is customized, then press the **Build and Run** button.\n\n5. Test your game. When you build your web game, Unity will create an HTML file automatically for you. It contains example HTML code to load your strategy game content for the browser. You can change and customize this HTML file to blend with your website design or add more HTML.\n\n**Tip:** Release your game on Facebook and as an extension:\n- [Chrome Web Store](https://chrome.google.com/webstore/category/apps)\n- [Firefox Extensions](https://marketplace.firefox.com/developers/submit/)\n- [Facebook](https://developers.facebook.com/docs/games/appcenter/tutorial)","excerpt":"","slug":"web","type":"basic","title":"Web Player"}

Web Player


[block:callout] { "type": "info", "body": "The Starter Kit controls are optimized for mobile touch. In the top left corner we've added developer scrolling controls but these are not designed for gameplay. Customize the kit with your own mouse controls for scrolling across the map before building your web game.", "title": "Scrolling Controls" } [/block] [block:callout] { "type": "success", "title": "Web Player", "body": "You must use the most recent version of the Complete Kit to export games with the Web Player." } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/9PKnV4RHQ5GI1vBjQ1zX", "Screen Shot 2015-08-19 at 4.29.30 PM.png", "651", "523", "#6bae54", "" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/pD2E1WRQDC2EY2gvZtKQ", "Screen-Shot-2015-08-19-at-4.29.24-PM.jpg", "409", "398", "#c2c2c2", "" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/v0pucurgSwGI6WdUpFp2", "new_save_load_buttons.png", "1735", "997", "#d07055", "" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/egiWbTaoQWm9lvbowohx", "Screen Shot 2015-08-19 at 4.27.55 PM.png", "700", "418", "", "" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/yK5W1jm9Toa1Zl98uUuO", "Screen Shot 2015-08-19 at 4.28.02 PM.png", "705", "421", "#4e100e", "" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/Jxxa6fgzQX6gbzw1CbUH", "web-player-strategy-game-template-unity.jpg", "544", "315", "#bb9f91", "" ] } ] } [/block] 1. Open the Starter Kit in Unity. If you haven't already, import NGUI in a new empty scene, not directly in the Game.unity scene (throws a few internal NGUI specific errors otherwise). Safer to apply this to importing 2D ToolKit as well. 2. In Unity, click **File** > **Build Settings** 3. Click **Web Player** in the Platforms list 4. Look at Player Settings first to make sure your icon is customized, then press the **Build and Run** button. 5. Test your game. When you build your web game, Unity will create an HTML file automatically for you. It contains example HTML code to load your strategy game content for the browser. You can change and customize this HTML file to blend with your website design or add more HTML. **Tip:** Release your game on Facebook and as an extension: - [Chrome Web Store](https://chrome.google.com/webstore/category/apps) - [Firefox Extensions](https://marketplace.firefox.com/developers/submit/) - [Facebook](https://developers.facebook.com/docs/games/appcenter/tutorial)