Join Kelley Hecker for an in-depth discussion in this video Using the Unity Scripting API, part of Scripting Unity with C#.
- One of the advantages of using Unity…is its great documentation.…Not only are all variables and functions clearly described,…but almost all of them have examples…in both UnityScript and C#.…You can access the scripting API…at the Unity documentation website,…docs.unity3d.com…Just search for a class or a function name…to find the reference for it.…For example, we can search for MonoBehaviour…to see the documentation for the functions and events…we talked about in the previous section.…As an example, let's look at the StartCoroutine function.…
You can see that has sample code…for how to use this function.…You can switch the language of the sample code…by clicking the buttons in the top right.…Let's search for another class.…This class has a more in-depth section in the manual,…which you can access by clicking "Switch to manual."…The scripting API is extremely handy to have bookmarked.…And even as an advanced programmer…you'll likely reference it frequently.…
If you're not quite of a function's name,…or the parameters it takes,…
- Defining classes and variables
- Attaching scripts to objects
- Understanding MonoBehaviour class
- Using the Unity Scripting API
- Importing assets
- Using a singleton pattern to manage game state
- Creating an event
Skill Level Intermediate
Q: Why am I getting a script compile error when trying to load the exercise files?
A: This course was recorded in Unity 4.6, and Unity has since released Unity 5. There are two items to address for Unity 5 users.
Q: Why can't I see the Render Settings option in the Edit menu?
A: The Render Settings options have been moved in Unity 5. You can access them by going to the Window menu and choosing Lighting. In the window that loads, Render Settings can be found under the Scene tab.