Super Desperite - basic question

hi guys,

i’m going silly, I cant work out how to do the following in C#

*Find object in scene

*play legacy animation from the start

HELLLPP!!

Thanks guys

*Find object in scene

GameObject.Find OR GameObject.FindGameObjectsByTag

*play legacy animation from the start

  • Get a reference to the Animation Component attached to that gameobject.
  • Use Animation.Play to play the animation from that component.

Something like:

GameObject myGameObject = GameObject.Find("NameOfGameObject");

Animation anim = myGameObject.GetComponent<Animation>();
anim.Play("NameOfAnimationToPlay");