{"__v":39,"_id":"5507e16243d3400d0052fdee","category":{"__v":8,"_id":"543b9b0065bf840e00b473d9","project":"543b9b0065bf840e00b473d5","version":"543b9b0065bf840e00b473d8","pages":["543b9b0065bf840e00b473db","5488547ff291f61400c02bfd","548909a4c178b40b00aa307d","548a68631bd6c40b00f77733","548eb5afe52d2b0b001b9a20","55079db843d3400d0052fd40","5507e16243d3400d0052fdee","55917cfd4e50b50d001960eb"],"reference":false,"createdAt":"2014-10-13T09:27:28.477Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"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":"2015-03-17T08:10:10.701Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"order":2,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Compatibility\",\n  \"body\": \"Works with both Unity and Unity Pro [version 4.5.5](https://unity3d.com/get-unity/download/archive) or greater.\\n\\nUp to $40 in NGUI/2DTK coupons are included for [Complete Kit](https://www.citybuildingkit.com/#pricing) buyers. Look in your purchase confirmation email from our site.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Demo\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<iframe width=\\\"560\\\" height=\\\"315\\\" src=\\\"https://www.youtube.com/embed/W1ZGA1dXPNQ?rel=0&amp;showinfo=0\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Instructions:\"\n}\n[/block]\n1. First, unzip the downloaded file you received after ordering.\n2. Open Unity and select **File** > **Open Project...**\n3. In the Project Wizard window that appears, click **Open Other...** \n4. Pick the folder you just unzipped as the **Project Directory** and press **Open**\n5. If Unity says **Project reimport required**, continue to reimport it. \n\nThe project will open, and you will see a screen like this:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/byQ3BCqXSayyq89bzofi\",\n        \"city building kit.png\",\n        \"1194\",\n        \"786\",\n        \"#fb04fb\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Next, import NGUI and 2D Toolkit assets\"\n}\n[/block]\nUnity 5 introduces new UI and 2D features, but they're not as further developed as NGUI and 2D Toolkit. You'll need to download both of these assets for the Starter Kit to function properly. \n\n**Requirements: \n- [NGUI](http://www.tasharen.com/?page_id=140) (version 3.6.8+ required)\n- [2D Toolkit](http://www.unikronsoftware.com/2dtoolkit/) (version 2.4+ required)**\n\nAs per NGUI's team instructions, NGUI should be imported in a new empty scene, not directly in the game scene (throws a few internal NGUI errors otherwise). Safer to apply this to 2DToolKit as well. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"1. In Unity, File > New Scene\\n2. Delete the NGUI folder from the Project View (if it exists)\\n3. Import NGUI from the updated Unity Package or your purchase.\",\n      \"language\": \"text\",\n      \"name\": \"NGUI Installation Instructions\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"You will still see UILabel errors even after importing. Please use the Standard or Professional version of NGUI version 3.6+ [available here](http://www.tasharen.com/?page_id=140)\\n\\n*Up to $40 in coupons for NGUI and 2D Toolkit are available if you buy our [Complete Kit](https://www.citybuildingkit.com/#pricing)\",\n  \"title\": \"NGUI Free Version is not compatible (version 2.7.0)\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"After importing both assets\"\n}\n[/block]\nOpen the **Scenes** folder in Assets and click the **Game.unity** scene. You're ready to run the demo scene! \n\nThe UILabel compile errors you saw earlier and the pink color should be gone so long as **NGUI** and **2DToolkit** have both been properly imported. You should see the green checkerboard from the game. Run the scene by pressing the **Play** button in the top center. (When playing on a PC, use the developer controls in the top left of the game to move or zoom)\n\n**Tip: **We recommend you use **File** > **Build and Run..**. to test on your mobile device for native touch controls like scrolling, pinch, zoom, or drag-and-drop.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/oaRPqe1SRSCNYgKYIeaj\",\n        \"city-building-kit.jpg\",\n        \"700\",\n        \"460\",\n        \"#72ad34\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"**Did you follow the instructions above and still don't see see the green checkerboard?**\\n1. Do you have the **Game.unity** scene open from the **Scenes** folder?\\n2. Are you using a version of NGUI greater than 3.6? (Not the free version 2.7.0)\\n3. Did you import both 2D Toolkit and NGUI correctly?\",\n  \"title\": \"Troubleshooting Problems\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Testing PVP\"\n}\n[/block]\nWhen testing the competitions, if you get the following error \"Downloaded file corrupted\" it means you need to update the kit with your license code.\n[block:image]\n{\n  \"images\": [\n    {\n      \"caption\": \"Downloaded file corrupted License error\",\n      \"image\": [\n        \"https://www.filepicker.io/api/file/zQtZpE9LQaqakjr28nJ6\",\n        \"license.jpg\",\n        \"800\",\n        \"600\",\n        \"\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nUpload the PvP Server Sync scripts to your web host. You can download these scripts from our download center and upload to your website like http://yoursite.com/pvp/ or https://mybucket.s3.amazonaws.com/pvp/\n\nThen update the URLs and license used for both Save Load WWW and Save Load Battle. (For the Pro Kit, you'll find the URLs hardcoded in the SaveLoadWWW.cs and SaveLoadBattle.cs files - the screenshots below are from the Complete Kit which has an easier way to update the license using Unity)\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Also change the server address variable, if you uploaded the script to your own website. All you need to do is change the URL to the folder you uploaded like: \\nhttp://yoursite.com/pvp/ or https://mybucket.s3.amazonaws.com/pvp/\",\n  \"title\": \"Add your License code to both the Game and Map01 scenes\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/ZQeSTmaPQQ4CLLKVSt0Q\",\n        \"license1.jpg\",\n        \"981\",\n        \"666\",\n        \"#76ae3a\",\n        \"\"\n      ],\n      \"caption\": \"Add the license code and Sever Address to Game > GameManager > SaveLoadWWW\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"caption\": \"Add the license code and Sever Address to Map01 > Game Manager > SaveLoadBattle\",\n      \"image\": [\n        \"https://www.filepicker.io/api/file/m45zTEgRi1NBV9XBeKXA\",\n        \"license2.jpg\",\n        \"979\",\n        \"665\",\n        \"#75af3a\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"Thank you for purchasing our kit. The following instructions will help you run the Starter Kit's demo.","slug":"installation","type":"basic","title":"Installation"}

Installation

Thank you for purchasing our kit. The following instructions will help you run the Starter Kit's demo.

[block:callout] { "type": "info", "title": "Compatibility", "body": "Works with both Unity and Unity Pro [version 4.5.5](https://unity3d.com/get-unity/download/archive) or greater.\n\nUp to $40 in NGUI/2DTK coupons are included for [Complete Kit](https://www.citybuildingkit.com/#pricing) buyers. Look in your purchase confirmation email from our site." } [/block] [block:api-header] { "type": "basic", "title": "Demo" } [/block] [block:html] { "html": "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/W1ZGA1dXPNQ?rel=0&amp;showinfo=0\" frameborder=\"0\" allowfullscreen></iframe>" } [/block] [block:api-header] { "type": "basic", "title": "Instructions:" } [/block] 1. First, unzip the downloaded file you received after ordering. 2. Open Unity and select **File** > **Open Project...** 3. In the Project Wizard window that appears, click **Open Other...** 4. Pick the folder you just unzipped as the **Project Directory** and press **Open** 5. If Unity says **Project reimport required**, continue to reimport it. The project will open, and you will see a screen like this: [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/byQ3BCqXSayyq89bzofi", "city building kit.png", "1194", "786", "#fb04fb", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "Next, import NGUI and 2D Toolkit assets" } [/block] Unity 5 introduces new UI and 2D features, but they're not as further developed as NGUI and 2D Toolkit. You'll need to download both of these assets for the Starter Kit to function properly. **Requirements: - [NGUI](http://www.tasharen.com/?page_id=140) (version 3.6.8+ required) - [2D Toolkit](http://www.unikronsoftware.com/2dtoolkit/) (version 2.4+ required)** As per NGUI's team instructions, NGUI should be imported in a new empty scene, not directly in the game scene (throws a few internal NGUI errors otherwise). Safer to apply this to 2DToolKit as well. [block:code] { "codes": [ { "code": "1. In Unity, File > New Scene\n2. Delete the NGUI folder from the Project View (if it exists)\n3. Import NGUI from the updated Unity Package or your purchase.", "language": "text", "name": "NGUI Installation Instructions" } ] } [/block] [block:callout] { "type": "info", "body": "You will still see UILabel errors even after importing. Please use the Standard or Professional version of NGUI version 3.6+ [available here](http://www.tasharen.com/?page_id=140)\n\n*Up to $40 in coupons for NGUI and 2D Toolkit are available if you buy our [Complete Kit](https://www.citybuildingkit.com/#pricing)", "title": "NGUI Free Version is not compatible (version 2.7.0)" } [/block] [block:api-header] { "type": "basic", "title": "After importing both assets" } [/block] Open the **Scenes** folder in Assets and click the **Game.unity** scene. You're ready to run the demo scene! The UILabel compile errors you saw earlier and the pink color should be gone so long as **NGUI** and **2DToolkit** have both been properly imported. You should see the green checkerboard from the game. Run the scene by pressing the **Play** button in the top center. (When playing on a PC, use the developer controls in the top left of the game to move or zoom) **Tip: **We recommend you use **File** > **Build and Run..**. to test on your mobile device for native touch controls like scrolling, pinch, zoom, or drag-and-drop. [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/oaRPqe1SRSCNYgKYIeaj", "city-building-kit.jpg", "700", "460", "#72ad34", "" ] } ] } [/block] [block:callout] { "type": "danger", "body": "**Did you follow the instructions above and still don't see see the green checkerboard?**\n1. Do you have the **Game.unity** scene open from the **Scenes** folder?\n2. Are you using a version of NGUI greater than 3.6? (Not the free version 2.7.0)\n3. Did you import both 2D Toolkit and NGUI correctly?", "title": "Troubleshooting Problems" } [/block] [block:api-header] { "type": "basic", "title": "Testing PVP" } [/block] When testing the competitions, if you get the following error "Downloaded file corrupted" it means you need to update the kit with your license code. [block:image] { "images": [ { "caption": "Downloaded file corrupted License error", "image": [ "https://www.filepicker.io/api/file/zQtZpE9LQaqakjr28nJ6", "license.jpg", "800", "600", "", "" ] } ] } [/block] Upload the PvP Server Sync scripts to your web host. You can download these scripts from our download center and upload to your website like http://yoursite.com/pvp/ or https://mybucket.s3.amazonaws.com/pvp/ Then update the URLs and license used for both Save Load WWW and Save Load Battle. (For the Pro Kit, you'll find the URLs hardcoded in the SaveLoadWWW.cs and SaveLoadBattle.cs files - the screenshots below are from the Complete Kit which has an easier way to update the license using Unity) [block:callout] { "type": "info", "body": "Also change the server address variable, if you uploaded the script to your own website. All you need to do is change the URL to the folder you uploaded like: \nhttp://yoursite.com/pvp/ or https://mybucket.s3.amazonaws.com/pvp/", "title": "Add your License code to both the Game and Map01 scenes" } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/ZQeSTmaPQQ4CLLKVSt0Q", "license1.jpg", "981", "666", "#76ae3a", "" ], "caption": "Add the license code and Sever Address to Game > GameManager > SaveLoadWWW" } ] } [/block] [block:image] { "images": [ { "caption": "Add the license code and Sever Address to Map01 > Game Manager > SaveLoadBattle", "image": [ "https://www.filepicker.io/api/file/m45zTEgRi1NBV9XBeKXA", "license2.jpg", "979", "665", "#75af3a", "" ] } ] } [/block]