Pathways
Build skills in Unity with guided learning pathways designed to help anyone interested in pursuing a career in gaming and the Real Time 3D Industry.
Courses
Explore a topic in-depth through a combination of step-by-step tutorials and projects.
Projects
Create a Unity application, with opportunities to mod and experiment.
Tutorials
Find what you’re looking for with short, bite-sized tutorials.
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
using UnityEngine; using System.Collections; public class UsingOtherComponents : MonoBehaviour { public GameObject otherGameObject; private AnotherScript anotherScript; private YetAnotherScript yetAnotherScript; private BoxCollider boxCol; void Awake () { anotherScript = GetComponent<AnotherScript>(); yetAnotherScript = otherGameObject.GetComponent<YetAnotherScript>(); boxCol = otherGameObject.GetComponent<BoxCollider>(); } void Start () { boxCol.size = new Vector3(3,3,3); Debug.Log("The player's score is " + anotherScript.playerScore); Debug.Log("The player has died " + yetAnotherScript.numberOfPlayerDeaths + " times"); } }
using UnityEngine; using System.Collections; public class AnotherScript : MonoBehaviour { public int playerScore = 9001; }
using UnityEngine; using System.Collections; public class YetAnotherScript : MonoBehaviour { public int numberOfPlayerDeaths = 3; }