{"id":277,"date":"2018-10-03T23:13:48","date_gmt":"2018-10-03T23:13:48","guid":{"rendered":"https:\/\/www.xlsoft.com\/doc\/kudan\/?page_id=277"},"modified":"2020-10-09T01:00:31","modified_gmt":"2020-10-09T01:00:31","slug":"unity-setting-up-play-mode","status":"publish","type":"page","link":"https:\/\/www.xlsoft.com\/doc\/kudan\/unity-setting-up-play-mode\/","title":{"rendered":"Unity Setting up Play Mode"},"content":{"rendered":"<p>This quick tutorial will show you how to set up your Unity project to run in the editor.<\/p>\n<div class=\"excerpt\">\n<hr \/>\n<div class=\"magic-block-api-header\">\n<h1 class=\"header-scroll is-api-header\">Editor API Key<\/h1>\n<\/div>\n<div class=\"magic-block-textarea\">\n<p>To use Kudan&#8217;s Unity Plugin in the editor, an Editor API Key is required. To get one, you can click the button labelled &#8220;<em>Get Editor API Key<\/em>&#8221; at the bottom of the\u00a0<code>Kudan Tracker<\/code>\u00a0script on the\u00a0<code>Kudan Camera<\/code>\u00a0object, or follow\u00a0this <a href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/development-license-keys\/\" target=\"_blank\" rel=\"noopener noreferrer\">link<\/a>.<\/p>\n<p>To enter the key, go back to your Unity project and select the\u00a0<code>Kudan Camera<\/code>\u00a0object. In the\u00a0<code>Kudan Tracker<\/code>\u00a0script and enter the key in the box labelled &#8220;Editor API Key&#8221;.<br \/>\nNote: Do not confuse the Editor Key for the Development License Key.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-338 aligncenter\" src=\"https:\/\/www.xlsoft.com\/doc\/kudan\/files\/2018\/09\/0327d8c-EditorAPIKey-160x300.png\" alt=\"\" width=\"291\" height=\"546\" srcset=\"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/0327d8c-EditorAPIKey-160x300.png 160w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/0327d8c-EditorAPIKey.png 519w\" sizes=\"(max-width: 291px) 100vw, 291px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"magic-block-callout type-info no-title\">\n<div class=\"callout-body\">\n<p>When running the scene in Play Mode, view messages in the console. Verify that the message &#8220;[KudanAR] Editor Play Mode Key is Valid&#8221; is displayed.\n<\/p><\/div>\n<\/div>\n<div class=\"magic-block-api-header\">\n<div id=\"section-webcam-id\" class=\"anchor waypoint\"><\/div>\n<h1 class=\"header-scroll is-api-header\">Webcam ID<\/h1>\n<\/div>\n<div class=\"magic-block-callout type-info no-title\">\n<div class=\"callout-body\">\n<p>If you have a built-in webcam, this step isn&#8217;t necessary, and you should be able to start Play Mode. If you&#8217;re planning to use a USB webcam, however, you should continue reading.<\/p>\n<\/div>\n<\/div>\n<div class=\"magic-block-textarea\">\n<p>The\u00a0<code>Kudan Tracker<\/code>\u00a0script also has a slider labelled &#8220;Play Mode Webcam ID&#8221;. This is the camera that will be used when the app starts. Usually, when a USB webcam is plugged in, the computer sets it to have an ID of 0, as it generally prioritises something plugged in over something built-in. If you plugged in a USB camera , then leaving the Webcam ID at &#8220;Zero&#8221; should be fine.<\/p>\n<p>However, if you change the USB port that the camera is plugged into, or if you have multiple USB cameras and wish to use a specific one, or if you have a USB webcam plugged in but want to try out a built-in webcam, set the correct ID.<br \/>\nNote: a camera can be assigned different IDs based on the system.<\/p>\n<\/div>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-339 aligncenter\" src=\"https:\/\/www.xlsoft.com\/doc\/kudan\/files\/2018\/09\/cc0c2f4-PlayModeWebcamID-158x300.png\" alt=\"\" width=\"301\" height=\"572\" srcset=\"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/cc0c2f4-PlayModeWebcamID-158x300.png 158w, https:\/\/www.xlsoft.com\/doc\/kudan\/wp-content\/uploads\/2018\/09\/cc0c2f4-PlayModeWebcamID.png 516w\" sizes=\"(max-width: 301px) 100vw, 301px\" \/><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This quick tutorial will show you how to set up your Unity project to run in the editor. Editor API Key To use Kudan&#8217;s Unity Plugin in the editor, an Editor API Key is required. To get one, you can click the button labelled &#8220;Get Editor API Key&#8221; at the bottom of the\u00a0Kudan Tracker\u00a0script on &#8230; <a title=\"Unity Setting up Play Mode\" class=\"read-more\" href=\"https:\/\/www.xlsoft.com\/doc\/kudan\/unity-setting-up-play-mode\/\">Read more<span class=\"screen-reader-text\">Unity Setting up Play Mode<\/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\/277"}],"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=277"}],"version-history":[{"count":15,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages\/277\/revisions"}],"predecessor-version":[{"id":2477,"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/pages\/277\/revisions\/2477"}],"wp:attachment":[{"href":"https:\/\/www.xlsoft.com\/doc\/kudan\/wp-json\/wp\/v2\/media?parent=277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}