👋
NRSDK(Old)
v1.10.2
v1.10.2
  • NRSDK Fundamentals
    • NRSDK Overview
    • XREAL Devices
      • XREAL Glasses
      • Controller
      • Compatibility
    • Getting Started with NRSDK
    • Sample Code
    • Tutorials
    • Release Note
      • 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
    • 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
    • Tools
      • First Person View
      • Emulator
      • Notification popup
      • Reset Camera
    • MRTK Integration
  • Advanced
    • Access RGB Camera
    • NRSDK Coordinate Systems
  • XR Streaming
  • Frequently Asked Questions
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

Last updated 1 year ago

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, and in Target Devices, Nreal Light should keep checked.

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 Nreal 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