Animator.isInitialized

Switch to Manual
public bool isInitialized ;

Description

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

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


using UnityEngine;

public class CheckAndRebind : MonoBehaviour { Animator animator;

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

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