UI换了很多,spine主视觉停用

This commit is contained in:
2026-06-15 20:17:25 +08:00
parent 5eec879582
commit 216ab08e8d
3634 changed files with 814422 additions and 382766 deletions
+8 -8
View File
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -351,7 +351,7 @@ public class AllyCombatant : MonoBehaviour, ICombatant
private void ResolveUIReferences()
{
// Try singleton first, fallback to scene search (works in editor)
var ui = teamUIController.Instance != null ? teamUIController.Instance : UnityEngine.Object.FindAnyObjectByType<teamUIController>();
var ui = teamUIController.Instance != null ? teamUIController.Instance : SceneObjectLookupCache.FindAny<teamUIController>();
if (ui == null) return;
switch (slotIndex)
{
@@ -2876,7 +2876,7 @@ public class AllyCombatant : MonoBehaviour, ICombatant
for (int i = 0; i < adj.Length; i++)
{
int idx = adj[i];
GameObject go = ui.GetAllyObjectBySlot(idx) ?? GameObject.Find($"ally_0{idx + 1}");
GameObject go = ui.GetAllyObjectBySlot(idx) ?? SceneObjectLookupCache.Find($"ally_0{idx + 1}");
if (go == null) continue;
var ally = go.GetComponent<AllyCombatant>() ?? go.GetComponentInChildren<AllyCombatant>(true);
eval(ally);
@@ -2888,13 +2888,13 @@ public class AllyCombatant : MonoBehaviour, ICombatant
int right = slotIndex + 1;
if (left >= 0)
{
var go = GameObject.Find($"ally_0{left + 1}");
var go = SceneObjectLookupCache.Find($"ally_0{left + 1}");
var ally = go != null ? (go.GetComponent<AllyCombatant>() ?? go.GetComponentInChildren<AllyCombatant>(true)) : null;
eval(ally);
}
if (right <= 4)
{
var go = GameObject.Find($"ally_0{right + 1}");
var go = SceneObjectLookupCache.Find($"ally_0{right + 1}");
var ally = go != null ? (go.GetComponent<AllyCombatant>() ?? go.GetComponentInChildren<AllyCombatant>(true)) : null;
eval(ally);
}
@@ -2951,7 +2951,7 @@ public class AllyCombatant : MonoBehaviour, ICombatant
for (int i = 0; i < adj.Length; i++)
{
int idx = adj[i];
GameObject go = ui.GetAllyObjectBySlot(idx) ?? GameObject.Find($"ally_0{idx + 1}");
GameObject go = ui.GetAllyObjectBySlot(idx) ?? SceneObjectLookupCache.Find($"ally_0{idx + 1}");
if (go == null) continue;
var ally = go.GetComponent<AllyCombatant>() ?? go.GetComponentInChildren<AllyCombatant>(true);
eval(ally);
@@ -2963,13 +2963,13 @@ public class AllyCombatant : MonoBehaviour, ICombatant
int right = slotIndex + 1;
if (left >= 0)
{
var go = GameObject.Find($"ally_0{left + 1}");
var go = SceneObjectLookupCache.Find($"ally_0{left + 1}");
var ally = go != null ? (go.GetComponent<AllyCombatant>() ?? go.GetComponentInChildren<AllyCombatant>(true)) : null;
eval(ally);
}
if (right <= 4)
{
var go = GameObject.Find($"ally_0{right + 1}");
var go = SceneObjectLookupCache.Find($"ally_0{right + 1}");
var ally = go != null ? (go.GetComponent<AllyCombatant>() ?? go.GetComponentInChildren<AllyCombatant>(true)) : null;
eval(ally);
}