Version: 2017.2
public Animator animator ;

설명

Convenience function to get the Animator component on the GameObject.

using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.

public class ExampleClass : MonoBehaviour { private Animator buttonAnimator; public Button button;

void Start() { //Assigns the "buttonAnimator" with the button's animator. buttonAnimator = button.animator; } }