Version: 2017.2

Animator.isInitialized

切换到手册
public bool isInitialized ;

描述

返回动画器是否已成功初始化。

请参阅 Animator.Rebind 手动初始化动画器。

using UnityEngine;

public class CheckAndRebind : MonoBehaviour { Animator animator;

void Start() { animator = GetComponent<Animator>();

if (!animator.isInitialized) animator.Rebind(); } }