Updates for Pluralsight: HoloLens Development Fundamentals by Lars Klint (edits: Will Fleming)

If you are following along Lars’ tutorial on Pluralsight, learning how to get started with HoloLens1 development, you may have encountered, as I did, a couple items needing update. I’ll share the edits here, should you want to kick things off right away in your own development environment.

Tooling has changed so much over the past years; it can be daunting trying to figure out what works together. I’ve presently found the following tools to work.

  • Unity Hub 3.3.0
  • Unity 2018.3.14f1 (Installs from within Unity Hub) — I found this version closely matches Lars’s tutorials; you may find other versions that also work
  • Visual Studio Code 1.71.0 — should be able to use latest version
  • Visual Studio Installer, comes along with your VS install
  • Visual Studio 2022— be sure to get Workload titled: “Game Development with Unity” which in the details on the right panel mentions: “Visual Studio tools for Unity” and ” C# and Visual Basic”.
Visual Studio Installer Workload selection and details

A couple personal preferences here, I find Visual Studio way too bulky and overkill just to edit the simple c-sharp scripts. I replace the script editor setting with “Visual Studio Code” and leave the hefty compilation task to the full Visual Studio when it comes time to test and deploy-to-device. Since the file extension in Windows remains mapped to Visual Studio, double-clicking the project file still launches VS. I also enjoy SourceGear’s Diffmerge when working with diffs. These settings can be set within the project preferences screen.

Unity Project Preference Screen

In Module-3 “Gaze, Gestures, and Spatial Mappings: Hands On: Gestures” 1:10 we find our first code edit; it is in the shoot.cs file — GestureRecognizer changed location from UnityEngine.VR.WSA.Input to UnityEngine.XR.WSA.Input — this is a simple edit in the using code line.

editing the “using” declaration in shoot.cs

In Module-4 “Voice and Audio: Hands On: Voice Commands” 3:50 We learn about broadcasting messages to children game objects and demonstrate this with the “Reset Blocks” voice command in the VoiceCommands.cs script. However, when we attempt to use the “Shoot Ball” command, it doesn’t work, locally. There’s no problem in the video of shooting balls, so perhaps something changed behind the scenes. Utilizing this same concept of broadcasting messages to children, we can simply add an empty game object, name it whatever we like, “SceneParent” perhaps and then drop all components in under that hierarchy. Once we place the voice commands script as member of this new game object, the broadcast for “Shoot Ball” now trickles down to the appropriate method which is part of the shoot script on the Main Camera.

Unity scene parent game object for VoiceCommands.cs script