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

A quick example

Before we dig deep into the theory, let's take some time to make a class and see it in action.

First, we will need to create a sphere in our Hierarchy view:

  1. Click on the Create button.
  2. Hover over 3D object and click on sphere.
  3. Name the sphere Ball.
  4. In the Inspector, make sure that all position elements are 0. Alternatively, you can simply click on the gear icon and select reset.
  5. With the sphere reset, change its position.x to 3.05, position.y to 0.87, and position.z to 4.15.

Now, we will add a script file to the ball:

  1. Click on the Add Component button in the Inspector.
  2. Scroll down to New Script and click on it.
  3. Name the script LaunchBall; click on Create and then on Add.
  4. Double-click on the Launchball script in the Inspector. ...

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