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

パラメーター

overrides結果を受け取る配列

説明

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