> For the complete documentation index, see [llms.txt](https://xreal.gitbook.io/nrsdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xreal.gitbook.io/nrsdk/development/plane-detection-tutorial/detect-planes-in-the-real-world.md).

# Detect planes in the real world

Now that a basic scene has been set up, you can start on developing the game. In this step, you will detect planes and draw them to the scene.

### Add an `PlaneDetector` component <a href="#add-an-arplanemanager-component" id="add-an-arplanemanager-component"></a>

An `PlaneDetector` detects and creates, updates, and removes game objects when the device's understanding of the environment changes.

1.Using the Hierarchy pane, create an empty `GameObject`.

2\. Rename it to `PlaneDetector`. This component will display planes until one is selected by the player.

3\. Select the new game object. Within the Inspector pane, click **Add Component** to add a `PlaneDetector`

![](/files/exH3sVYo0P0tbFLyH40a)

4\. Configure the `PlaneDetector`by setting the `Detected Plane Prefab` field:

* Click the button next to `None` to bring up the **Select GameObject** window.
* Select the **Assets** tab and search for **WoodenPlaneVisualizer**.

![](/files/jczexVqkhnaiL3YynGqK)

This prefab from the starter package provides a wooden floor texture that will be used as the plane decoration.

### Run the app <a href="#run-the-app" id="run-the-app"></a>

1.Build and deploy your app as described in **Step 7** and **8** in [Getting Started with NRSDK](/nrsdk/nrsdk-fundamentals/quickstart-for-android.md) to test your changes

2\. Point your glasses at a horizontal real-world surface and move your glasses around to improve NRSDK's understanding of the world.

3\. When NRSDK has detected a plane, you should see a wood texture cover real-world surfaces. The `Plane Detector` instantiates the given `Detected Plane Prefab` for each detected plane.<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xreal.gitbook.io/nrsdk/development/plane-detection-tutorial/detect-planes-in-the-real-world.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
