To detect surfaces within our real-world environment, we will need to make use of a new component, the AR Plane Manager. The AR Plane Manager allows us to create, remove, or update game objects in our scene based on the surfaces within the real-world environment. The following steps will automatically create invisible planes with colliders that we could possibly use for gameplay reasons:
- We no longer need the original cube we created, so we can delete it from the scene by right-clicking it and selecting Delete or by selecting it and pressing the Delete key.
- From the Hierarchy panel, select the AR Session Origin object. From there, add the AR Plane Manager component to it by clicking on the Add Component button at the bottom of the Inspector window and then typing in the name of the component and pressing Enter.
At this point, we will have surfaces being generated to our scene while being run but for things such as debugging, it would be a good idea to visually see...