July 2017
Beginner to intermediate
390 pages
10h 53m
English
Save this script, but do not compile it just yet. Go back to Unity, click on the camera, and observe the Inspector:

As you can see, Unity has picked up the change. It saw the public field and made it into a property in the Inspector. It even fixed the case here.
Go back to Visual Studio, and add another field in this class:
[Tooltip("The position the cursor is placed at when nothing is hit.")] public float maxDistance = 5.0f;
This will also be visible in Unity. We will use this to position the cursor far away when nothing is underneath it. So if we have no objects we can interact ...
Read now
Unlock full access