Version: 2017.3
public void GetOverrides (List<KeyValuePair<AnimationClip,AnimationClip>> overrides);

Parámetros

overrides Arreglo para recibir resultados.

Descripción

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