{"id":268,"date":"2018-10-03T17:16:06","date_gmt":"2018-10-03T17:16:06","guid":{"rendered":"https:\/\/www.xlsoft.com\/doc\/kudan\/?page_id=268"},"modified":"2018-10-18T21:05:34","modified_gmt":"2018-10-18T21:05:34","slug":"unity-getting-started","status":"publish","type":"page","link":"https:\/\/www.xlsoft.com\/doc\/kudan\/unity-getting-started\/","title":{"rendered":"Unity Getting Started"},"content":{"rendered":"<p>This tutorial will show you how to setup Kudan&#8217;s Unity Plugin.<\/p>\n<div class=\"excerpt\">\n<hr \/>\n<div class=\"magic-block-api-header\">\n<h1 class=\"header-scroll is-api-header\">1. Download Kudan&#8217;s AR Framework for Unity<\/h1>\n<\/div>\n<div class=\"magic-block-textarea\">\n<p>To get started, the first thing you&#8217;ll need is Kudan&#8217;s Unity Plugin. You can download it on our\u00a0<a href=\"https:\/\/www.xlsoft.com\/en\/products\/kudan\/download.html\" target=\"_blank\">Download<\/a>\u00a0page.<\/p>\n<figure id=\"attachment_291\" aria-describedby=\"caption-attachment-291\" style=\"width: 522px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-291\" src=\"https:\/\/www.xlsoft.com\/doc\/kudan\/files\/2018\/09\/1e598c3-unity_download-300x295.png\" alt=\"\" width=\"532\" height=\"523\" srcset=\"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/1e598c3-unity_download-300x295.png 300w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/1e598c3-unity_download-768x755.png 768w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/1e598c3-unity_download-1024x1006.png 1024w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/1e598c3-unity_download.png 1154w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><figcaption id=\"caption-attachment-291\" class=\"wp-caption-text\">Download the Unity Plugin<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"magic-block-textarea\">\n<p>If you don&#8217;t have the Unity Engine installed on your machine yet, you&#8217;ll also need to download it from Unity&#8217;s\u00a0<a href=\"https:\/\/unity3d.com\/\" target=\"_blank\">website<\/a>\u00a0and follow the steps of the installation process.<\/p>\n<div class=\"magic-block-callout type-info no-title\">\n<div class=\"callout-body\">\n<p>If this is your first time using Unity, or if you are not familiar with the layout and functions of the Unity editor, we recommend going over some of Unity&#8217;s basic tutorials and familiarising yourself with the interface before continuing.<\/p>\n<\/div>\n<\/div>\n<div class=\"magic-block-api-header\">\n<div id=\"section-create-a-new-unity-project\" class=\"anchor waypoint\"><\/div>\n<h1 class=\"header-scroll is-api-header\">Create a new Unity Project<\/h1>\n<\/div>\n<div class=\"magic-block-textarea\">\n<p>Once you&#8217;ve got both Unity and the Plugin, start up Unity up and create a new project. You can call it whatever you like. We&#8217;ll be calling ours &#8220;Kudan Unity Tutorial&#8221;.<\/p>\n<figure id=\"attachment_295\" aria-describedby=\"caption-attachment-295\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-295\" src=\"https:\/\/www.xlsoft.com\/doc\/kudan\/files\/2018\/09\/e0f8717-NewUnityProject-300x185.png\" alt=\"\" width=\"590\" height=\"364\" srcset=\"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/e0f8717-NewUnityProject-300x185.png 300w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/e0f8717-NewUnityProject-768x472.png 768w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/e0f8717-NewUnityProject-1024x630.png 1024w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/e0f8717-NewUnityProject.png 1112w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><figcaption id=\"caption-attachment-295\" class=\"wp-caption-text\">Create a new project<\/figcaption><\/figure>\n<\/div>\n<div class=\"magic-block-api-header\">\n<h1 class=\"header-scroll is-api-header\">Import Kudan&#8217;s Unity Plugin<\/h1>\n<\/div>\n<div class=\"magic-block-textarea\">\n<p>Once the project has been created, the editor will start up and present us with an empty scene.<\/p>\n<p>To add Kudan&#8217;s Plugin to your project, right-click in the assets box at the bottom of the window, then go into the\u00a0<strong>Import Package<\/strong>\u00a0menu and select\u00a0<strong>Custom Package<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-298 aligncenter\" src=\"https:\/\/www.xlsoft.com\/doc\/kudan\/files\/2018\/09\/4998be8-ImportPlugin-300x152.png\" alt=\"\" width=\"673\" height=\"341\" srcset=\"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/4998be8-ImportPlugin-300x152.png 300w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/4998be8-ImportPlugin-768x389.png 768w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/4998be8-ImportPlugin-1024x519.png 1024w\" sizes=\"(max-width: 673px) 100vw, 673px\" \/><\/p>\n<\/div>\n<\/div>\n<div class=\"magic-block-textarea\">\n<p>Navigate to the Plugin package file, which will be called\u00a0<code>KudanARUnity.unitypackage<\/code>\u00a0and open it. When prompted to select which files and folders you want to import, just click the\u00a0<code>import<\/code>button to add everything.<\/p>\n<p>You will now have a folder in your assets called \u201cKudanAR\u201d. Inside it are several folders, including one called \u201cSamples\u201d. In the &#8220;Samples&#8221; folder is a Unity scene called \u201cKudanSample\u201d. Double-click it to load the scene.<\/p>\n<p>Once the scene loads, you&#8217;ll notice that your hierarchy has a number of new objects in it. There are objects containing Kudan&#8217;s scripts, as well as a simple UI consisting of three buttons that allow us to switch between tracking methods and start\/stop markerless tracking.<\/p>\n<p>You can actually test this scene out right here in the editor, but before you can build or run the app, there are a couple of things you need to set up first.<\/p>\n<\/div>\n<div class=\"magic-block-api-header\">\n<div id=\"section-building-the-app\" class=\"anchor waypoint\"><\/div>\n<h1 class=\"header-scroll is-api-header\">Building the app<\/h1>\n<\/div>\n<div class=\"magic-block-textarea\">\n<p>If you want to build the app for iOS or Android, or simply try out your AR scene in the editor, please select the appropriate page and we&#8217;ll take you through the steps required to get your project up and running:<\/p>\n<p><a class=\"doc-link\" href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/unity-building-the-app-for-ios\/\" data-sidebar=\"building-the-app-for-ios\">Building The App for iOS<\/a><br \/>\n<a class=\"doc-link\" href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/unity-building-the-app-for-android\/\" data-sidebar=\"building-the-app-for-android\">Building The App for Android<\/a><br \/>\n<a class=\"doc-link\" href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/unity-setting-up-play-mode\/\" data-sidebar=\"setting-up-play-mode\">Setting up Play Mode<\/a><\/p>\n<\/div>\n<div class=\"magic-block-api-header\">\n<div id=\"section-running-the-app\" class=\"anchor waypoint\"><\/div>\n<h1 class=\"header-scroll is-api-header\">Running the app<\/h1>\n<\/div>\n<div class=\"magic-block-textarea\">\n<p>Once you have set up your project, you can either run it in the editor or build it for iOS or Android.<\/p>\n<\/div>\n<div class=\"magic-block-callout type-info \">\n<h3><i class=\"fa fa-info-circle\" title=\"Info\"><\/i>Play Mode<\/h3>\n<div class=\"callout-body\">\n<p>Only marker tracking is supported in the editor right now, so you won&#8217;t be able to try out markerless tracking. In order to test markerless tracking, you&#8217;ll have to build the project for iOS or Android and run it on a smart device.<\/p>\n<\/div>\n<\/div>\n<div class=\"magic-block-textarea\">\n<p>Once your app is running, you can try out marker tracking by opening \/ printing the Lego image found in\u00a0<strong><em>KudanAR<\/em><\/strong>\u00a0-&gt;\u00a0<strong><em>Samples<\/em><\/strong>\u00a0-&gt;\u00a0<strong><em>Textures<\/em><\/strong>\u00a0and aiming your camera at it. A sphere should appear floating above it.<\/p>\n<p>Congratulations on creating your first AR app with Unity and KudanAR!<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to setup Kudan&#8217;s Unity Plugin. 1. Download Kudan&#8217;s AR Framework for Unity To get started, the first thing you&#8217;ll need is Kudan&#8217;s Unity Plugin. You can download it on our\u00a0Download\u00a0page. &nbsp; If you don&#8217;t have the Unity Engine installed on your machine yet, you&#8217;ll also need to download it &#8230; <a title=\"Unity Getting Started\" class=\"read-more\" href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/unity-getting-started\/\">Read more<span class=\"screen-reader-text\">Unity Getting Started<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"bekko_page_header":""},"_links":{"self":[{"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages\/268"}],"collection":[{"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":17,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages\/268\/revisions"}],"predecessor-version":[{"id":1420,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages\/268\/revisions\/1420"}],"wp:attachment":[{"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/media?parent=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}