This quick tutorial will show you how to set up your Unity project to run in the editor.
Editor API Key
To use Kudan’s Unity Plugin in the editor, an Editor API Key is required. To get one, you can click the button labelled “Get Editor API Key” at the bottom of the
Kudan Tracker script on the
Kudan Camera object, or follow this link.
To enter the key, go back to your Unity project and select the
Kudan Camera object. In the
Kudan Tracker script and enter the key in the box labelled “Editor API Key”.
Note: Do not confuse the Editor Key for the Development License Key.
When running the scene in Play Mode, view messages in the console. Verify that the message “[KudanAR] Editor Play Mode Key is Valid” is displayed.
If you have a built-in webcam, this step isn’t necessary, and you should be able to start Play Mode. If you’re planning to use a USB webcam, however, you should continue reading.
Kudan Tracker script also has a slider labelled “Play Mode Webcam ID”. 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 “Zero” should be fine.
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.
Note: a camera can be assigned different IDs based on the system.