Version: 2022.1
언어: 한국어
public void GetOverrides (List<KeyValuePair<AnimationClip,AnimationClip>> overrides);

파라미터

overrides Array to receive results.

설명

Gets the list of Animation Clip overrides currently defined in this Animator Override Controller.

This function is allocation-free if you pre-allocate the overrides list with AnimatorOverrideController.overridesCount.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ResetOverrides : MonoBehaviour { public AnimatorOverrideController overrideController; protected List<KeyValuePair<AnimationClip, AnimationClip>> overrides;

public void ResetAllOverrides() { overrides = new List<KeyValuePair<AnimationClip, AnimationClip>>(overrideController.overridesCount); overrideController.GetOverrides(overrides); for (int i = 0; i < overrides.Count; ++i) overrides[i] = new KeyValuePair<AnimationClip, AnimationClip>(overrides[i].Key, null); overrideController.ApplyOverrides(overrides); } }