Starting with a new scene
We start this project with a new empty scene and set it up with the AR Foundation objects: AR Session and AR Session Origin. Create a new scene named ARFramework
using the following steps:
- Create a new scene using File | New Scene.
- Choose the Basic (Built-in) template. Press Create.
- Save the scene using File | Save As, navigate to your
Assets/Scenes/
folder, give it the nameARFramework
, and then click Save.
Next, we'll set up the scene with the basic AR Foundation game objects as follows:
- Delete Main Camera from the Hierarchy window by right-clicking and selecting Delete (or the pressing Del key on your keyboard).
- Add an AR session by selecting GameObject from the main menu, and then XR | AR Session.
- Add an AR Session Origin object by selecting GameObject from the main menu, and then XR | AR Session Origin.
- Select the AR Session Origin object in the Hierarchy window. In the Inspector window, click Add Component...