-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Unity Animation Essentials
By :
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "By default, all new scripts are created with two functions, Start and Update."
A block of code is set as follows:
using UnityEngine;
using System.Collections;
public class MoviePlay : MonoBehaviour
{
//Reference to movie to play
public MovieTexture Movie = null;
// Use this for initialization
void Start ()
{
//Get Mesh Renderer Component
MeshRenderer MeshR = GetComponent<MeshRenderer>();
//Assign movie texture
MeshR.material.mainTexture = Movie;
GetComponent<AudioSource>().clip = Movie.audioClip;
GetComponent<AudioSource>().spatialBlend=0;
Movie.Play();
GetComponent<AudioSource>().Play();
}
}When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
using UnityEngine;
using System.Collections;
public class Mover : MonoBehaviour
{
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update ()
{
//Transform component on this object
Transform ThisTransform = GetComponent<Transform>();
//Add 1 to x axis position
ThisTransform.position += new Vector3(1f,0f,0f);
}
}New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Once the curve is constructed, give the code a test run by playing the Unity project, and see the effect it has in the Game tab."
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Change the font size
Change margin width
Change background colour