From 976ffa9fc1be319284ff22dafa3c7809be350d30 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 16 十月 2018 11:39:54 +0800
Subject: [PATCH] 3335 坐骑的ui模型加载动画状态机逻辑修改

---
 UI/Common/UI3DModelFactory.cs |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/UI/Common/UI3DModelFactory.cs b/UI/Common/UI3DModelFactory.cs
index 59424ac..f087ebe 100644
--- a/UI/Common/UI3DModelFactory.cs
+++ b/UI/Common/UI3DModelFactory.cs
@@ -179,6 +179,14 @@
         var animator = model.GetComponent<Animator>();
         if (animator != null)
         {
+            var config = Config.Instance.Get<NPCConfig>(id);
+            var suffix = AnimatorControllerLoader.controllerUISuffix;
+            var animatorController = AnimatorControllerLoader.LoadMobController(suffix, config.MODE);
+            if (animatorController != null)
+            {
+                animator.runtimeAnimatorController = animatorController;
+            }
+
             animator.enabled = true;
             animator.SetInteger(GAStaticDefine.Param_Action, GAStaticDefine.Act_Idle);
             animator.Play(GAStaticDefine.State_IdleHash);

--
Gitblit v1.8.0