Object tracking samples
The Object Tracking
sample demonstrates AR Foundation Object tracking functionality. You can open this sample in Unity from the Assets/Scenes/ObjectTracking
folder.
Tip
AR Foundation samples are supported on platforms that support the demonstrated feature. To check whether a feature is supported on your chosen platform, refer to the Platform support table and the documentation for that feature.
Requirements
Object tracking is supported by ARKit only. This sample requires iOS 12 or newer.
To use this sample, you must have a physical object the device can recognize as described in Reference objects.
Reference objects
To use object tracking you must use a reference object library. You can Use Unity's sample reference objects or Create your own reference objects. To learn more about reference objects, refer to Object tracking
Use Unity's sample reference objects
The sample's reference object library is built using two reference objects. The sample includes printable templates which you can print on 8.5×11
inch paper and fold into a cube and cylinder. You can find these printable templates in the Assets/Scenes/ObjectTracking/Printable Templates
folder.
Create your own reference objects
You can scan your own objects and add them to the XRReferenceObjectLibrary
. Refer to Create a reference object library to understand how to create your own reference library.
Object tracking scene
The Object tracking
scene detects a 3D object from a set of reference objects in an XRReferenceObjectLibrary
.
Tip
AR Foundation samples are supported on platforms that support the demonstrated feature. To check whether a feature is supported on your chosen platform, refer to the Platform support table and the documentation for that feature.
Apple and ARKit are trademarks of Apple Inc., registered in the U.S. and other countries and regions.