Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
HoloLens Beginner???s Guide

You're reading from   HoloLens Beginner???s Guide Join the AR revolution with HoloLens

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781786464729
Length 376 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jason M. Odom Jason M. Odom
Author Profile Icon Jason M. Odom
Jason M. Odom
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface Welcome to the New World FREE CHAPTER HoloWorld I am in Control User-Friendly Interface Now That Is How It Should Sound Not So Blank Spaces The Tools of the Trade Share What You Have Got Putting It All Together Fixing Problems

Our first script


Here, we will take our first steps into Visual Studio's code editing capabilities. As previously explained, this will be a very simple script with some, but with very little, explanation.

Now, double-click on the grayed-out RectAnim script to open Visual Studio:

Once it is loaded, your screen should look comparable to this:

You should see the RectAnim.cs filename highlighted in the left-upper corner. When a developer writes code, this is where we do it. Currently, you will see a couple of namespace declarations, the class name, and a few functions.

The Start() function is called when an object is first instantiated; it is one of the first things that happens. So, it is the setup for a scripted object in Unity.

The Update() function is called for every frame. When you need something to change on a regular basis, it is normally done through Update.

Now, replace all the code in RectAnim.cs with the following code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image