Unity3d Scripting Quick Reference PDF
Unity3d Scripting Quick Reference PDF
Logic switch(name) {
case "brian":
Logic Symbol Debug.Log("Welcome Brian");
break;
Equal == case "will":
Debug.Log("Welcome Will");
Not Equal != break;
default:
Greater Than > Debug.Log("I don’t know you");
break;
Greater Than or Equal To >= }
1 of 2
C# and Unity API
Typical C# Script Template Referencing Components
using UnityEngine; You can get a reference to a component in the following ways:
using System.Collections;
Setup a public variable that holds the reference that you set in the
public class BasicTargetMover : MonoBehaviour { Editor, such as:
} gameObject.GetComponent<AudioSource>();
2 of 2