🕶️
NRSDK(Old)
New DocumentationSDK DownloadAPI Reference
v2.2.1
v2.2.1
  • NRSDK Fundamentals
    • NRSDK Overview
    • XREAL Devices
      • XREAL Glasses
      • Controller
      • Compatibility
    • Getting Started with NRSDK
    • Sample Code
    • Tutorials
    • Release Note
      • NRSDK 2.2.1
      • NRSDK 2.2.0
      • NRSDK 2.1.1
      • NRSDK 2.1.0
      • NRSDK 1.10.2
      • NRSDK 1.9.5
      • NRSDK 1.9.3
      • NRSDK 1.9.1
      • NRSDK 1.8.0
      • NRSDK 1.7.0
      • NRSDK 1.6.0
  • Development
    • Input and Camera
      • NRInput
      • Interact with Unity UI (Tutorial)
      • Customize Controller UI
      • NRCameraRig
    • Hand Tracking
    • Image Tracking
      • XREAL Markers
    • Plane Detection (Tutorial)
      • Overview
      • Import the package
      • Detect planes in the real world
      • Perform a hit test against detected planes
      • Add a car
      • Add gems
      • Wrap up
    • Depth Mesh
      • Meshing Manager Overview
      • Use Meshes in the Editor
      • Tutorial: Mesh Collision
    • Spatial Anchor
      • Mapping Example Scene
      • Tutorial: Halloween Treasure Hunt
        • Handle the Situation of Failed Anchor Saving
      • Tutorial: Sharing Anchors
        • Setting Up Photon
        • Cloud Storage: Firebase (optional)
        • Cloud Storage: Aliyun OSS (optional)
        • Implementing Cloud Save and Load
        • Sharing Anchors with Photon
    • Tools
      • Single Pass Stereo Rendering
      • First Person View
      • Emulator
      • XR Streaming
      • Dual Screen Display
    • Miscellaneous
      • Access RGB Camera
      • NRSDK Coordinate Systems
      • MRTK2 Integration
      • MRTK3 Integration
      • Notification popup
      • Reset Camera
      • Render Metrics
      • Render MonoMode(Obsolete)
  • API Reference
  • Frequently Asked Questions
  • Design Guide
    • Design Guide Overview
    • Displaying
    • Interacting
    • Controlling
    • Navigating
Powered by GitBook
On this page
  • Import the Starter Package
  • Add the required scene elements
  • Verify the setup

Was this helpful?

  1. Development
  2. Plane Detection (Tutorial)

Import the package

PreviousOverviewNextDetect planes in the real world

Was this helpful?

Import the Starter Package

For this tutorial, we've provided a starter package that contains prefabs and scripts that will expedite some parts of the tutorial so you can focus on how to use plane detection feature in NRSDK.

1.Download the Plane Detection Starter Package:

2. Install the starter package by opening Assets > Import Package > Custom Package... and opening PlaneDetectionStarterPackage.unitypackage.

3. In the window that pops up, ensure everything is selected.

4. Click Import.

5. After importing NRSDK and plane detection starter package, your project folder should look like this:

Add the required scene elements

  1. In Assets > Scene folder, rename the SampleScene to PlaneDetection

2. In the project hierarchy, delete MainCamera, search in the project panel and drag in NRInput and NRCameraRig prefab (located in Assets > NRSDK > Prefabs) in the hierarchy. Your hierarchy should look like this:

3. Click NRInput in Hierarchy, make sure it is configured as following in the inspector. Specifically, Raycast Mode set to Laser, and Input Source Type to Controller

4. Click NRCameraRig, then click NRKernalSessionConfig in NR Session Behaviour component to find NRKernalSessionConfig configuration. Click the NRKernalSessionConfig file appeared in the project folder. You could also locate NRKernalSessionConfig in Assets/NRSDK

5. In NR Kernal Session Config panel, activate Plane Finding Mode and Image Tracking Mode is activated as follows.

Verify the setup

1.Search and Drag NRLogo (located in Assets/NRSDK/Demos/HelloMR/Logo/Models/NRLogo.prefab) into the hierarchy.

2. Ensure your Android phone is plugged in or connected through Wi-Fi for ADB debugging.

4. You should see XREAL logo (NRLogo) appeared on the glasses.

3. Follows Step 7 and Step 8 in to test if your app built with the current environment runs properly.

Getting Started with NRSDK
477KB
PlaneDetectionStarterPackage.unitypackage