Create xr origin
Through the following content, you will learn how to create and configure an XR Origin and XR Origin Child in a Unity scene.
Before you begin
- Understand the basic concepts, components, and workflow of sessions through Introduction to ARSession.
- Understand the basic concepts, components, and lifecycle of XR Origin through XR Origin.
Create xr origin (EasyAR)
In the Hierarchy view, right-click on a blank area, and select EasyAR Sense > Origin > Origin : XR Origin (EasyAR) from the menu to create a complete origin structure.

In scripts, you can use ARSessionFactory.CreateOrigin() to create:
ARSessionFactory.CreateOrigin();
Note
When the session is running, if there is no correct XR Origin structure in the scene, an XR Origin and an XR Origin Child will be automatically created.
[Optional] Create xr origin (Unity XR)
In the Hierarchy view, right-click on a blank area, and select XR > XR Origin (Mobile AR) from the menu to create an XR Origin suitable for AR Foundation. For detailed information and creation methods about this XR Origin, please refer to the Unity official documentation: Add Unity XR's XR Origin to Scene.
Note
When using head-mounted displays, be sure to refer to the documentation of the corresponding headset SDK.
When using the XR Origin provided by the Unity XR framework, you need to manually add an XR Origin Child.
Add xr origin child to xr origin
In the Hierarchy view, select XR Origin (EasyAR) or XR Origin and right-click, then select EasyAR Sense > Origin > Origin : XR Origin Child from the menu to add an XR Origin Child under the XR Origin.

In scripts, you can use ARSessionFactory.AddOriginChild(GameObject):
ARSessionFactory.AddOriginChild(origin);
You can add any number of XR Origin Children, and they will all work properly. However, for objects generated internally by the session, only the first XR Origin Child will be used as the parent node.
Note
When the session is running, if there is no correct XR Origin Child structure in the scene, an XR Origin Child will be automatically created.
Next steps
- Learn about the active control strategy of XR Origin