HMD Scene Build¶
Add EasyAR Support in Device Scene¶
The following images use Pico for example, operations are same when using other device extensions.
Prepare a Usable device Scene¶
In the next section, a usable device scene is required. Create a scene usable on device according to device documents or its demos. You can also use its demo directly.
Add EasyAR Components in the Scene¶
Add EasyAR AR Session in the scene. AR Session can be created from some AR Session presets using EasyAR Sense > * > AR Session *
GameObject menu.
You can also assemble AR Session by yourself if necessary.
To use EasyAR on device, the device frame source must be selected as frame source in the AR Session after Session start.
(It is saft to skip this step when using built-in supported devices.) Select AR Session (EasyAR) object, use menum EasyAR Sense > Extensions > Frame Source : Pico (keep it only)
to create Pico frame source and keep it only. If you need other frame sources to get cross-platform support, you need to make sure above frame source can be selected on Pico.
And session will become,
Then add targets or maps in the scene, for example, if you want to build Sparse SpatialMap
, you need to create SparseSpatialMapController by EasyAR Sense > SpatialMap > Map : Sparse SpatialMap
Finally, a simple scene for sparse spatial map building on device could look like this,
Scenes can be different according to features in use from both device SDK and EasyAR Sense Unity Plugin.
Add Device Support in EasyAR Scene¶
The following images use Pico for example, operations are same when using other device extensions.
Prepare a Usable EasyAR Scene¶
In the next section, a usable EasyAR scene is required. You can reference How to Use Samples to use a sample, or create a new scene reference Start from Zero.
Delete Main Camera¶
Please follow device usage rules. Most device SDK will control the camera, but exceptions may exist.
There is already a camera inside device SDK objects, so you need to delete camera in the scene in most cases.
You can also judge if the deletion is needed according to your needs in some advanced usages.
Add EasyAR Components for device support in the Scene¶
(It is saft to skip this step when using built-in supported devices.)
Select AR Session (EasyAR) object, use menum EasyAR Sense > Extensions > Frame Source : Pico (keep it only)
to create Pico frame source and keep it only. If you need other frame sources to get cross-platform support, you need to make sure above frame source can be selected on Pico.
In some advanced usages, you can also move it to where you want, or change the order in scripts.
Add device Components in the Scene¶
You can follow device documents to add device components in the scene.
Take Pico for example, in most of the cases, you need to add a XR Interaction Manager
and a XR Origin
(follow Pico official instructions if there are any conflicts).
Finally, a simple scene for sparse spatial map building on device could look like this,
Scenes can be different according to features in use from both device SDK and EasyAR Sense Unity Plugin.
Before run on a device, make sure to read device official instructions for how to configure and run a scene containing device SDK.