Table of Contents

Configure ar scene

This article uses image tracking as an example to explain how to configure the simplest AR scene.

Before starting

  • Import the EasyAR Sense Unity plugin and fill in the license key according to Enable EasyAR.
Note

If your project uses URP (Universal Render Pipeline), additional URP configuration is required.

Add ar session

In the Hierarchy view, right-click in a blank area, and create an image tracking session via EasyAR Sense > Image Tracking > AR Session (Image Tracking Preset).

PresetImageTracking

Configure camera

Select Main Camera, and set the following parameters in Inspector.

  • Set Clear Flags to Solid Color.
  • Set Background to black.
  • Set Clipping Planes Near to 0.1 (meters), Far to 1000 (meters).

mainCameraSetting

Add target

In the Hierarchy view, right-click in a blank area, and add an Image Target via EasyAR Sense > Image Tracking > Target : Image Target. It appears as a question mark icon by default.

createimagetarget

Select the image to be tracked, set the following parameters, and click the Apply button:

  • Set Texture Type to Editor GUI and Legacy GUI.
  • Enable Read/Write in Advanced.
  • Set Format to RGB 24-bit.

createimagetarget

Configure ImageTargetController:

  • Set Source Type to Texture 2D.
  • Set Texture to the configured image.
  • Set Name to namecard.
  • Set Scale to 0.09 (indicating 0.09 meters).
  • Set Tracker to ImageTrackerFrameFilter under ARSession.

addimagetargetcontroler

Tip

Partial configuration content varies when Source Type differs.

Add 3D content following target

3D content added under the Image Target node maintains a fixed position relative to the image. When the image moves, virtual content follows accordingly.

In the Hierarchy view, select Image Target, and add a Cube via 3D Object > Cube.

add3D-1

Select the newly added Cube and configure its properties:

  • Set Transform Scale to {0.5, 0.3, 0.3}.
  • Set z value of Transform Position to -0.15 (aligning the Cube's bottom face with the recognition image).

add3D-2

At this point, the simplest AR scene configuration is complete. Run the scene and align the image to see the Cube appear above it.

Next steps