July 2017
Beginner to intermediate
390 pages
10h 53m
English
To do so, we must make a prefab out of our guitar. A prefab in Unity is analogous to a class in C#. It is a template for objects we can use later on.
First, we will tell our script which prefab we will recreate by tapping on it. Add the following field in our GestureManager script :
public GameObject objectToPlace;
To create a prefab, we first need to create an object in Unity and then move it to the Assets pane. Later, we can use this to create instances of this prefab. Like C# instances, they will be live objects based on the template.
So, grab the guitar from the hierarchy tab and move it to the Prefabs folder in the assets pane. Once you have done that, delete the guitar from the hierarchy.
Since we already had a ...
Read now
Unlock full access