From a7bbe4767fb5ec5de271290c4ccea710eb3dd191 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 17 十一月 2025 18:36:13 +0800
Subject: [PATCH] Merge branch 'master' of http://mobile.secondworld.net.cn:10010/r/Project_SG_scripts

---
 Main/System/Battle/BattleObject/BattleObjectFactory.cs |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Main/System/Battle/BattleObject/BattleObjectFactory.cs b/Main/System/Battle/BattleObject/BattleObjectFactory.cs
index f909931..82bbde4 100644
--- a/Main/System/Battle/BattleObject/BattleObjectFactory.cs
+++ b/Main/System/Battle/BattleObject/BattleObjectFactory.cs
@@ -1,4 +1,3 @@
-
 using System.Collections.Generic;
 using System;
 using UnityEngine;
@@ -50,9 +49,19 @@
 
         float finalScaleRate = modelScaleRate * teamHero.modelScale;
 
-        skeletonAnimation.skeletonDataAsset = skeletonDataAsset;
         skeletonAnimation.initialSkinName = skinCfg.InitialSkinName;
+        skeletonAnimation.skeletonDataAsset = skeletonDataAsset;
         skeletonAnimation.Initialize(true);
+
+        // 鍒濆鍖栧畬鎴愬悗璁剧疆鐨偆
+        if (!string.IsNullOrEmpty(skinCfg.InitialSkinName))
+        {
+            var skeleton = skeletonAnimation.Skeleton;
+            skeleton.SetSkin(skinCfg.InitialSkinName);
+            skeleton.SetSlotsToSetupPose();
+            skeletonAnimation.Update(0);
+        }
+
         realGO.name = battleObject.ObjID.ToString();
         realGO.transform.localScale = new Vector3(finalScaleRate, finalScaleRate, finalScaleRate);
         RectTransform rectTrans = realGO.GetComponent<RectTransform>();

--
Gitblit v1.8.0