
Adding a target image
Now we can start creating the AR application. First, let's decide what to use for an image target and tell the application about it. In later chapters, you will get to choose your own picture or another target, but for now we will use one of the samples that Vuforia provides.
If you haven't done so already, please download the Core Features samples from the Dev Portal (https://developer.vuforia.com/downloads/samples) and unzip it. Then do the following:
- Import the package, named, for example, VuforiaSamples-x-x-x.unitypackage into your app (via the Main Menu, clicking on Assets | Import Package | Custom Package...).
There's a lot of stuff in that package, including an image target database. We're going to use one of those images right now-the one named stones_scaled.jpg.
In your operating system (Windows or macOS), among the files installed with the samples package, is a printable copy of the stones image as a PDF file. Navigate to the Assets/Editor/Vuforia/ForPrint/ folder.
- Open the target_stones_USLetter.pdf (or target_stones_A4.pdf) file, and print it.
It looks like this:

Back in Unity:
- In the Project panel, navigate to Assets | Vuforia | Prefabs and select and drag the ImageTarget prefab into the Hierarchy.
- Look in the Inspector panel. Under the Image Target Behavior component, for Type, select Predefined.
- Then for Database, select StonesAndChips.
- For Image Target, select stones.
It should now look like this:

Note the width and height dimensions of the image in the component properties: 0.247 x 0.1729. That is the actual size of the printed image in meters (9.75 x 6.5 inches).
You should now be able to see the Image Target in your Scene view panel. If you cannot, it may be out of view. A quick way to find a specific object in the Scene view is to double-click on the object in the Hierarchy (alternatively, select the object in the Hierarchy, mouse over to the Scene panel, and press F on the keyboard). As described earlier in the chapter, you can further modify the Scene view using the 3-axis gizmo in the upper-right corner, or using the right-mouse, or middle-mouse buttons (on Windows). Here's what mine looks like now:

We also need to tell Vuforia and Unity that we're going to use one of the image databases:
- From the Main Menu, click Vuforia | Configuration.
- In Inspector, check the Load StonesAndChips Database checkbox.
- Then check its Activate checkbox, as shown here (macOS):
