From db81ec6f5d03cd6e1be777db357ac593c7f38626 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 29 一月 2026 21:32:30 +0800
Subject: [PATCH] 449 查看他人-客户端 有spine皮肤名字的UIHeroController组件初始化后加载皮肤
---
Main/System/Hero/UIHeroController.cs | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/Main/System/Hero/UIHeroController.cs b/Main/System/Hero/UIHeroController.cs
index 6119e98..dd7ae75 100644
--- a/Main/System/Hero/UIHeroController.cs
+++ b/Main/System/Hero/UIHeroController.cs
@@ -126,14 +126,25 @@
Debug.LogError("鏈厤缃畇pine");
return;
}
+ skeletonGraphic.initialSkinName = skinConfig.InitialSkinName;
skeletonGraphic.Initialize(true);
+ // 鍒濆鍖栧畬鎴愬悗璁剧疆鐨偆
+ if (!string.IsNullOrEmpty(skinConfig.InitialSkinName))
+ {
+ var skeleton = skeletonGraphic.Skeleton;
+ skeleton.SetSkin(skinConfig.InitialSkinName);
+ skeleton.SetSlotsToSetupPose();
+ skeletonGraphic.Update(0);
+ }
skeletonGraphic.enabled = true;
SetMaterialNone();
+
spineAnimationState = skeletonGraphic.AnimationState;
spineAnimationState.Data.DefaultMix = 0f;
if (motionName == "")
motionName = GetFistSpineAnim();
+
PlayAnimation(motionName, true);
spineAnimationState.Complete -= OnAnimationComplete;
spineAnimationState.Complete += OnAnimationComplete;
--
Gitblit v1.8.0