Skip to content

Instantly share code, notes, and snippets.

@anchan828
Created November 16, 2012 15:31
Show Gist options
  • Save anchan828/4088238 to your computer and use it in GitHub Desktop.
Save anchan828/4088238 to your computer and use it in GitHub Desktop.
GameObject cube = GameObject.Find ("cube");
if (cube == null) {
Debug.LogException (new NullReferenceException ());
}
cube.GetComponent<Hoge> ();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment