Version: 5.5
public Animator animator ;

説明

ゲームオブジェクトの Animator コンポーネントを取得するための便利関数

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; } }