/Hololens-SliderWidget

3D Slider widget for the Hololens - Mini Project for Designing Interactive Systems, RWTH

Primary LanguageC#MIT LicenseMIT

Hololens-Slider : 3D Slider widget for the Hololens

Mini Project for Designing Interactive Systems, RWTH

Table of Contents

Unity asset package

Getting Started

Most common errors and their solutions


Unity asset package

Please find the recent Unity asset package in Release folder

Getting Started

Importing Assets

  • Download the latest Holotoolkit and Hololens-Slider Unity asset packages.
  • Right click the Assets folder in the Project panel.
  • Click on Import Package > Custom Package.
  • Navigate to the project files you downloaded and click on Holotoolkit-Unity-vX.unitypackage.
  • Do the same as above and now select Hololens-Slider.unitypackage
  • Now you have imported all the necessary assets to use the Hololens slider widget

Setting up the scene for Hololens development

  • Select File > Save Scenes and save your current scene
  • In menu bar select HoloToolkit > Configure > Apply HoloLens Project Settings and choose Apply
  • Unity will prompt for a Project reload. Choose Yes
  • Wait till unity reloads the project
  • In menu bar select HoloToolkit > Configure > Apply HoloLens Scene Settings and choose Apply
  • Now you have successfully setup the Unity project for HoloLens development

Using the Holotoolkit Input and Cursor Manager

  • In Project panel,
  • Type "inputmanager". Select the prefab "InputManager" and drag-drop it to the Scene.
  • Type "cursorwith". Select the prefab "CursorWithFeedback" and drag-drop it to the Scene.
  • Now you have successfully setup the Input and Cursor Manager of Holotoolkit

Using the Hololens Slider widget

  • In Project panel,
  • Type "hololens-slider". Select the prefab "Hololens-Slider" and drag-drop it to the Scene.
  • Select the GameObject that should be connected with the Hololens Slider.
  • In the Inspector Panel, choose Add Component
  • Type "sliderconnection" and click on the "Slider Connection" script to add it.
  • Drag the Hololens-Slider from the Scene and drop it on the Slider option in Slider Connection script
  • Now in the GameObject script you can create a function void GetSliderValue(uint value) to get the Slider widge current value (as the value is sent using the SendMessage Unity function from Slider Connection script)

Building and Deploying the HoloLens Application in Hololens Emulator

  • Select File > Build Settings and select Windows Store option.
  • Choose Switch platform if not chosen already. Also select Unity C# Projects in Debugging.
  • Click Build.
  • Create a New Folder named "App".
  • Single click the App Folder.
  • Press Select Folder.
  • When Unity is done, a File Explorer window will appear.
  • Open the App folder in file explorer.
  • Open the generated Visual Studio solution
  • Using the top toolbar in Visual Studio, change the target from Debug to Release and from ARM to X86.
    • Click on the arrow next to the Device button, and select HoloLens Emulator.
    • Click Debug -> Start Without debugging or press Ctrl + F5.
    • After some time the emulator will start with your project.

Most common errors and their solutions

  • UnassignedReferenceException: The variable Slider of SliderConnection has not been assigned.
    • Solution: Drag the Hololens-Slider from the Scene and drop it on the Slider option in Slider Connection script