How do i paste this into unity in the right way?
void Start(){
animation.AddClip(deathClip,"Death");
}
void OnTriggerEnter(Collider other) {
if (other.gameObject.tag=="Bullet"){
animation.Play("Death");
}
}
How do i paste this into unity in the right way?
void Start(){
animation.AddClip(deathClip,"Death");
}
void OnTriggerEnter(Collider other) {
if (other.gameObject.tag=="Bullet"){
animation.Play("Death");
}
}
Create a new script, open it (double clicking opens with Monodevelop by default), paste into it, and save it.
You’d benefit from watching the Get Started tutorials, and other scripting tutorials on the Unity Tutorials page. http://unity3d.com/learn/tutorials/modules