yyl
2025-07-18 cc074976c8644508d80abafbfa8de5d31146abdf
Main/System/Hero/UIHeroController.cs
@@ -6,11 +6,11 @@
using UnityEngine.EventSystems;
public class UIHeroController : MonoBehaviour
{
   public void Create(int _skinID, Action _onComplete = null)
   public void Create(int _skinID, float scale = 1f, Action _onComplete = null)
   {
      skinID = _skinID;
      onComplete = _onComplete;
      GameObject battleGO = ResManager.Instance.LoadAsset<GameObject>("Hero/SpineRes", "Hero_001");
      GameObject battleGO = UILoader.LoadPrefab("UIHero");
      GameObject instanceGO = null;
      if (!transform.gameObject.activeSelf)
      {
@@ -21,6 +21,7 @@
      var skinConfig = HeroSkinConfig.Get(skinID);
      skeletonGraphic.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("Hero/SpineRes/", skinConfig.SpineRes + "_SkeletonData");
      skeletonGraphic.Initialize(true);
      this.transform.localScale = Vector3.one * scale;
      spineAnimationState = skeletonGraphic.AnimationState;
      PlayAnimation(MotionName.idle, true);