{"__v":16,"_id":"548add501bd6c40b00f777d2","category":{"__v":14,"_id":"54890d71c178b40b00aa3086","project":"543b9b0065bf840e00b473d5","version":"543b9b0065bf840e00b473d8","pages":["548a63d41bd6c40b00f77728","548a6fbab77bb70b00ac8bf2","548adcb7b77bb70b00ac8c9d","548add501bd6c40b00f777d2","548ae445b77bb70b00ac8cad","548aef1bb77bb70b00ac8ccb","548af4b41bd6c40b00f777fc","548eb9d5e52d2b0b001b9a28","5508449ba42e812500b711f3","550a8eed42fff40d00ae60e3","550ce8fd6c0b4c0d00fd42fb","550ce9026c0b4c0d00fd42fd","550d840f11e8d00d00b80383","550e7e7f8387ac0d00ed9e1a"],"reference":false,"createdAt":"2014-12-11T03:20:17.529Z","from_sync":false,"order":5,"slug":"game-settings","title":"Game Settings"},"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-12T12:19:28.702Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"basic_auth":false,"results":{"codes":[]},"settings":"","try":true,"auth":"never","params":[],"url":""},"order":0,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Looking for UI Controls?\",\n  \"body\": \"Please view the **[Menu UI](doc:menu-ui)** section for menu and building controls.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"The Complete Kit makes development easier with mouse scrolling. ([Kit information](https://www.citybuildingkit.com/#pricing))\",\n  \"title\": \"PC/Mac Desktop Scrolling included with the Complete Game Kit\"\n}\n[/block]\nThe mobile game kit was designed for a perfect mobile experience on devices such as the Apple iPhone, iPod, iPad and Android phones and tablet computers. Touch controls with these iOS and Android devices let the players drag the map around with one finger, zoom in or out by pinching two fingers, or drop characters for battle with a finger.\n\n**Developer Controls:** Because Unity development is easier when running the scene in Unity during edits, we have included scroll and zoom controls in the top left corner to mimic the mobile performance. There's a special way to use them, and you can read more about developer controls below. \n\n**Desktop Games:** The Complete Kit includes a scrolling demo with the mouse. If you haven't upgraded to the Complete Kit yet, should you want to release a web, PC, or Mac standalone strategy game with this city builder as your Unity starter kit, we recommend you modify scrolling and zooming to use your mouse.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Kinetic Scrolling\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Kinetic scrolling is only included in the Complete Kit\",\n  \"body\": \"Experience a more polished user experience with the Complete Kit. ([Kit information](https://www.citybuildingkit.com/#pricing))\"\n}\n[/block]\nWe've improved the scrolling for both desktop games and mobile games by implementing kinetic scrolling like many top-grossing games such as Castle Clash, Game of War or Simpson's Tapped Out.\n\nThis feature is enabled by default on the Complete Kit and can be seen in the video demo, but the mobile experience is much better and a huge visual improvement from the Starter and Pro Kits.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Mobile Touch Controls\"\n}\n[/block]\nThe Kit performs beautifully as a Unity mobile game template. There are four different touch controls included that you would expect in any industry leading strategy game template:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Control\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"One Finger Drag\",\n    \"1-0\": \"Two Finger Pinch\",\n    \"1-1\": \"Zoom in and out across the map\",\n    \"0-1\": \"Scroll the map in any direction\",\n    \"2-0\": \"Tap\",\n    \"2-1\": \"Interact with buttons or Menu objects\",\n    \"3-0\": \"Drag and Drop\",\n    \"3-1\": \"Move objects around the map or use the arrows to move them by one grid space.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Developer Scroll and Zoom Controls\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"How to Scroll with the Developer Controls\",\n  \"body\": \"Click each button once to activate, and click the opposite button to deactivate. \\nFor example, to scroll left click the (<) button, then click (>) to stop scrolling left.\"\n}\n[/block]\nThe kit is optimized for mobile app gameplay. It works great on your iOS or Android devices. This means buildings can be dragged and dropped, and you can pinch and zoom or tap the screen with your finger and drag to move around the map just like you would in any strategy city builder game.\n\nWhile you're developing your game in Unity, it may be more convenient to test the scene inside Unity instead of building a copy for your device. We've included developer controls in the top left of the scene to move around.  Click a button once to activate, and click the opposite button to deactivate. For example, to scroll left click the (<) button, then click (>) to stop scrolling left.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/woggNXj3SWDbfrVWC8jQ\",\n        \"unity-game-developer-controls-example.jpg\",\n        \"798\",\n        \"365\",\n        \"#42992f\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How to Disable Developer Controls\"\n}\n[/block]\n\n[block:embed]\n{\n  \"html\": \"\",\n  \"url\": \"https://www.youtube.com/watch?v=zdg4rjvx914\",\n  \"title\": \"Getting Ready to Submit Your Mobile App\",\n  \"favicon\": \"https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico\",\n  \"image\": \"https://i.ytimg.com/vi/zdg4rjvx914/hqdefault.jpg\"\n}\n[/block]\nWhen you are ready to publish your Unity mobile game, hide these controls. Here's how:\n\nFirst, in **Hierarchy**:\n1. Go to **UIAnchor/Anchor - Top Left**\n2. Disable **NavigBt** (navigation buttons) \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/8Q6TRvRmQsWuN61rq9QL\",\n        \"disable-navigation-buttons-for-developers-unity-starter-kit.jpg\",\n        \"999\",\n        \"562\",\n        \"#6cb04d\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThen, in the **Project Browser**:\n1. Open **Assets/Scripts/Menus/MainMenu.cs**\n2. In **ActivateInterface()** uncomment this line: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Uncomment to disable navigation buttons\\n// if(i!=9) \",\n      \"language\": \"csharp\",\n      \"name\": \"ActivateInterface()\"\n    }\n  ]\n}\n[/block]\nUncommenting this line in **MainMenu.cs** will prevent the navigation buttons from being reactivated when switching between menus during the game.","excerpt":"","slug":"controls","type":"basic","title":"Dev and Touch Controls"}

Dev and Touch Controls


[block:callout] { "type": "info", "title": "Looking for UI Controls?", "body": "Please view the **[Menu UI](doc:menu-ui)** section for menu and building controls." } [/block] [block:callout] { "type": "success", "body": "The Complete Kit makes development easier with mouse scrolling. ([Kit information](https://www.citybuildingkit.com/#pricing))", "title": "PC/Mac Desktop Scrolling included with the Complete Game Kit" } [/block] The mobile game kit was designed for a perfect mobile experience on devices such as the Apple iPhone, iPod, iPad and Android phones and tablet computers. Touch controls with these iOS and Android devices let the players drag the map around with one finger, zoom in or out by pinching two fingers, or drop characters for battle with a finger. **Developer Controls:** Because Unity development is easier when running the scene in Unity during edits, we have included scroll and zoom controls in the top left corner to mimic the mobile performance. There's a special way to use them, and you can read more about developer controls below. **Desktop Games:** The Complete Kit includes a scrolling demo with the mouse. If you haven't upgraded to the Complete Kit yet, should you want to release a web, PC, or Mac standalone strategy game with this city builder as your Unity starter kit, we recommend you modify scrolling and zooming to use your mouse. [block:api-header] { "type": "basic", "title": "How to Use the Developer Controls" } [/block] [block:html] { "html": "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/sAIuwLMK4bY?rel=0&amp;showinfo=0\" frameborder=\"0\" allowfullscreen></iframe>" } [/block] [block:api-header] { "type": "basic", "title": "Kinetic Scrolling" } [/block] [block:callout] { "type": "success", "title": "Kinetic scrolling is only included in the Complete Kit", "body": "Experience a more polished user experience with the Complete Kit. ([Kit information](https://www.citybuildingkit.com/#pricing))" } [/block] We've improved the scrolling for both desktop games and mobile games by implementing kinetic scrolling like many top-grossing games such as Castle Clash, Game of War or Simpson's Tapped Out. This feature is enabled by default on the Complete Kit and can be seen in the video demo, but the mobile experience is much better and a huge visual improvement from the Starter and Pro Kits. [block:api-header] { "type": "basic", "title": "Mobile Touch Controls" } [/block] The Kit performs beautifully as a Unity mobile game template. There are four different touch controls included that you would expect in any industry leading strategy game template: [block:parameters] { "data": { "h-0": "Control", "h-1": "Description", "0-0": "One Finger Drag", "1-0": "Two Finger Pinch", "1-1": "Zoom in and out across the map", "0-1": "Scroll the map in any direction", "2-0": "Tap", "2-1": "Interact with buttons or Menu objects", "3-0": "Drag and Drop", "3-1": "Move objects around the map or use the arrows to move them by one grid space." }, "cols": 2, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Developer Scroll and Zoom Controls" } [/block] [block:callout] { "type": "info", "title": "How to Scroll with the Developer Controls", "body": "Click each button once to activate, and click the opposite button to deactivate. \nFor example, to scroll left click the (<) button, then click (>) to stop scrolling left." } [/block] The kit is optimized for mobile app gameplay. It works great on your iOS or Android devices. This means buildings can be dragged and dropped, and you can pinch and zoom or tap the screen with your finger and drag to move around the map just like you would in any strategy city builder game. While you're developing your game in Unity, it may be more convenient to test the scene inside Unity instead of building a copy for your device. We've included developer controls in the top left of the scene to move around. Click a button once to activate, and click the opposite button to deactivate. For example, to scroll left click the (<) button, then click (>) to stop scrolling left. [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/woggNXj3SWDbfrVWC8jQ", "unity-game-developer-controls-example.jpg", "798", "365", "#42992f", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "How to Disable Developer Controls" } [/block] [block:embed] { "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fzdg4rjvx914%3Ffeature%3Doembed&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dzdg4rjvx914&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fzdg4rjvx914%2Fhqdefault.jpg&key=02466f963b9b4bb8845a05b53d3235d7&type=text%2Fhtml&schema=youtube\" width=\"854\" height=\"480\" scrolling=\"no\" frameborder=\"0\" allowfullscreen></iframe>", "url": "https://www.youtube.com/watch?v=zdg4rjvx914", "title": "Getting Ready to Submit Your Mobile App", "favicon": "https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico", "image": "https://i.ytimg.com/vi/zdg4rjvx914/hqdefault.jpg" } [/block] When you are ready to publish your Unity mobile game, hide these controls. Here's how: First, in **Hierarchy**: 1. Go to **UIAnchor/Anchor - Top Left** 2. Disable **NavigBt** (navigation buttons) [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/8Q6TRvRmQsWuN61rq9QL", "disable-navigation-buttons-for-developers-unity-starter-kit.jpg", "999", "562", "#6cb04d", "" ] } ] } [/block] Then, in the **Project Browser**: 1. Open **Assets/Scripts/Menus/MainMenu.cs** 2. In **ActivateInterface()** uncomment this line: [block:code] { "codes": [ { "code": "// Uncomment to disable navigation buttons\n// if(i!=9) ", "language": "csharp", "name": "ActivateInterface()" } ] } [/block] Uncommenting this line in **MainMenu.cs** will prevent the navigation buttons from being reactivated when switching between menus during the game.