O'Reilly logo

HoloLens Beginner’s Guide by Jason Odom

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing the color

So, the final lesson in this chapter will add interaction to change the color of our material. Instead of Gaze and Gesture though, we will use a voice command:

  1. With LeftRect selected, click on the Add Component button.
  2. Scroll down and click on the New Script option.
  3. Type ChangeRectColor in the new script dialog; then, click on Create and then Add.

Just like last time, instead of creating a second script for the right side, we will add the same script to RightRect using the following steps:

  1. Select RightRect.
  2. Click on the Add Component button.
  3. Click on Scripts.
  4. Select ChangeRectColor from the list.

This script will be slightly more complex than the previous one. From a scripting standpoint, materials are handled by the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required