Skip to content

Instantly share code, notes, and snippets.

@lee2sman
Last active April 24, 2020 16:25
Show Gist options
  • Save lee2sman/58d6feca246a57560bc79aaf9c9f3af3 to your computer and use it in GitHub Desktop.
Save lee2sman/58d6feca246a57560bc79aaf9c9f3af3 to your computer and use it in GitHub Desktop.
gabe unity starter
GameObject g = GameObject.Find("face");
GameObject h = GameObject.Find("face2");
void OnCollisionEnter(Collision collision) {
if (collision.gameObject.tag == "switch")
{
//turn animation component off
g.GetComponent<"Doodle Animator">().enabled= false;
h.GetComponent<"Static Face">().enabled= true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment