From ab243b5e8c7fadc0817f491f475bff9996d407b7 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 14 四月 2026 17:20:30 +0800
Subject: [PATCH] 0312 特效try报错,砍价界面打开try报错,群英胜利结算防范没有玩家ID
---
Main/Component/UI/Effect/EffectPlayer.cs | 75 ++++++++++++++++++++-----------------
1 files changed, 41 insertions(+), 34 deletions(-)
diff --git a/Main/Component/UI/Effect/EffectPlayer.cs b/Main/Component/UI/Effect/EffectPlayer.cs
index e12dbe3..f84139b 100644
--- a/Main/Component/UI/Effect/EffectPlayer.cs
+++ b/Main/Component/UI/Effect/EffectPlayer.cs
@@ -263,43 +263,50 @@
protected void PlaySpineEffect(bool closePMA = false)
{
-
- // 浠庣壒鏁堥鍒朵綋姹犺幏鍙栫壒鏁�
- if (spineComp == null)
- {
- spineComp = gameObject.AddMissingComponent<SkeletonGraphic>();
- }
-
- if (spineComp.skeletonDataAsset == null || spineAnimationState == null)
+ try
{
- //LoadAsset 宸茬粡鏈夌紦瀛楽keletonDataAsset
- spineComp.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("UIEffect/" + effectConfig.packageName, effectConfig.fxName);
- //涓簍rue鏃朵細鏈夐儴鍒嗙壒鏁堜笉鏄剧ず 濡傛弧绾х粡楠屾潯锛涙敼鎴愪冀椹悗閮ㄥ垎鐗规晥姝e父锛岃繕鏈夐儴鍒嗕緷鐒惰鏀规璁剧疆
- spineComp.MeshGenerator.settings.pmaVertexColors = !closePMA;
- spineComp.raycastTarget = false;
- spineComp.Initialize(true);
- // 妫�鏌ュ姩鐢绘槸鍚︽湁鐩稿姞妯″紡
- // bool hasAdditiveBlend = CheckForAdditiveBlend(spineComp.Skeleton);
- // if (hasAdditiveBlend)
- // {
- // spineComp.material = ResManager.Instance.LoadAsset<Material>("UIEffect/" + effectConfig.packageName, effectConfig.fxName.Split('_')[0] + "_Material-Additive");
- // }
- // else
- // {
- // spineComp.material = null;
- // }
- spineComp.material = ResManager.Instance.LoadAsset<Material>("Materials", "SkeletonGraphicDefault-Straight");
+ // 浠庣壒鏁堥鍒朵綋姹犺幏鍙栫壒鏁�
+ if (spineComp == null)
+ {
+ spineComp = gameObject.AddMissingComponent<SkeletonGraphic>();
+ }
- spineAnimationState = spineComp.AnimationState;
- spineAnimationState.TimeScale = speedRate;
- spineAnimationState.Data.DefaultMix = 0f;
- spineAnimationState.Complete -= OnSpineAnimationComplete;
- spineAnimationState.Complete += OnSpineAnimationComplete;
+ if (spineComp.skeletonDataAsset == null || spineAnimationState == null)
+ {
+ //LoadAsset 宸茬粡鏈夌紦瀛楽keletonDataAsset
+ spineComp.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("UIEffect/" + effectConfig.packageName, effectConfig.fxName);
+ //涓簍rue鏃朵細鏈夐儴鍒嗙壒鏁堜笉鏄剧ず 濡傛弧绾х粡楠屾潯锛涙敼鎴愪冀椹悗閮ㄥ垎鐗规晥姝e父锛岃繕鏈夐儴鍒嗕緷鐒惰鏀规璁剧疆
+ spineComp.MeshGenerator.settings.pmaVertexColors = !closePMA;
+ spineComp.raycastTarget = false;
+ spineComp.Initialize(true);
+ // 妫�鏌ュ姩鐢绘槸鍚︽湁鐩稿姞妯″紡
+ // bool hasAdditiveBlend = CheckForAdditiveBlend(spineComp.Skeleton);
+ // if (hasAdditiveBlend)
+ // {
+ // spineComp.material = ResManager.Instance.LoadAsset<Material>("UIEffect/" + effectConfig.packageName, effectConfig.fxName.Split('_')[0] + "_Material-Additive");
+ // }
+ // else
+ // {
+ // spineComp.material = null;
+ // }
+ spineComp.material = ResManager.Instance.LoadAsset<Material>("Materials", "SkeletonGraphicDefault-Straight");
+
+ spineAnimationState = spineComp.AnimationState;
+ spineAnimationState.TimeScale = speedRate;
+ spineAnimationState.Data.DefaultMix = 0f;
+ spineAnimationState.Complete -= OnSpineAnimationComplete;
+ spineAnimationState.Complete += OnSpineAnimationComplete;
+ }
+
+ spineComp.enabled = true;
+ PlayerTheSpineAnim();
+ SoundPlayer.Instance.PlayUIAudioDelay(effectConfig.audio).Forget();
}
-
- spineComp.enabled = true;
- PlayerTheSpineAnim();
- SoundPlayer.Instance.PlayUIAudioDelay(effectConfig.audio).Forget();
+ catch (Exception e)
+ {
+ Debug.LogError(e);
+ }
+
}
// 鎾斁鎸囧畾鍔ㄧ敾
--
Gitblit v1.8.0