Adding the image target

Back in Unity, we will now tell our scene about the business card image target to use. We identify it in the project using tags. We'll tag our target PurpleFinch:

  1. In Hierarchy, the Main Camera should be a child of Root. Select Main Camera.
  2. Using Add Component, choose ARMarker to add the component to camera.
  3. For Target Tag enter the name PurpleFinch.
  4. Set its Type to NFT.
  5. For NFT dataset name set the same name of our datafiles (which are now in StreamingAssets). Ours is named PurpleFinchCard.

Assuming it finds the dataset, you will see confirmation messages in the editor Console window, and the component will show the UID of the found marker, as shown in the following screenshot:

Now we add it to the scene as a tracked object.

  1. Add an empty object as a child of Root. A quick way is to right-click Root and choose Create Empty.
  2. Rename it PurpleFinch Target.
  3. Using Add Component choose AR Tracked Object to add the component to it.
  4. It asks for a Marker Tag, give it the same tag name we entered earlier (PurpleFinch).
  5. When the tag is recognized the Marker UID will be shown in the component pane.

The resulting AR Tracked Object component values are shown in the following screenshot:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.238.70