Question by 
               VeTK85 · Jul 21, 2017 at 04:33 PM · 
                getcomponent  
              
 
              how Specify each object in getcomponent
I'm trying to pull animations on 3 different objects in just one button, could they give me a force?
     using System.Collections;
     using System.Collections.Generic;
     using UnityEngine;
 
     public class anim2: MonoBehaviour {
     Animator optionsubir;
     Animator subirplay2;
     Animator extralado;
     public void ChamarAnimacao() {
     optionsubir.GetComponent<Animation>().Play ("optionsubir");
     subirplay2.GetComponent<Animation>().Play ("subirplay2");
     extralado.GetComponent<Animation>().Play ("extralado");
     }
     }
 
              
               Comment
              
 
               
              Your answer