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