using System.Collections; using System.Collections.Generic; using UnityEngine; using ChivaXR; public class EnterCurrentAniData : MonoBehaviour { bool EditorMode = true; private void Awake() { EditorMode = false; } public void EnterCurrentAni(AniData aniData) { if (!EditorMode) return; Debug.Log(aniData.aniName); bool firstUnityAnimation = false; for (int i = 0; i < aniData.AnimationDriverDatas.Count; i++) { if (!firstUnityAnimation) { if ((aniData.AnimationDriverDatas[i] as AniDriver_UnityAnimation) == null) aniData.AnimationDriverDatas[i].FinishedState(); else firstUnityAnimation = true; } else { aniData.AnimationDriverDatas[i].InitState(); } } } }