//---------------------------------------------------------------------------------- private void SampleAnimationController(GameObject go) { if (Data.UN_AnimationClip != null) { Animator animator = CREditorUtils.GetFirstAnimatorInHierarchy(go); if (animator != null) { if (Data.OverrideAnimationController) { OverrideAnimatorController(animator); } animator.Update(0.0f); } } }
//----------------------------------------------------------------------------------- public GameObject[] GetAnimatorGameObjects() { List <GameObject> listGameObject = new List <GameObject>(); List <GameObject> listBodyObjects = GetGameObjects(); foreach (var go in listBodyObjects) { Animator animator = CREditorUtils.GetFirstAnimatorInHierarchy(go); if (animator != null) { GameObject animatorGO = animator.gameObject; if (!listGameObject.Contains(animatorGO)) { listGameObject.Add(animatorGO); } } } return(listGameObject.ToArray()); }