Basic setup
Since the player can be anywhere when the game starts, we can’t use a camera in the traditional sense, so we will start by removing the original one. Follow the steps given here:
- From the Hierarchy panel, select the Main Camera object and delete it by right-clicking and selecting Delete or pressing the Delete key.
There are two key objects that we will need to create before we can start implementing our own features: AR Session and AR Session Origin.
- Right-click in the Hierarchy panel and select XR | AR Session:
Figure 15.6 – Creating an AR session
AR Session is what controls the life cycle of any AR experience, which allows us to enable or disable AR features depending on the platform we are working on.
Note
AR Session is also responsible for telling you whether your device supports AR. For information on handling this, check out https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2...