UI换了很多,spine主视觉停用
This commit is contained in:
@@ -776,7 +776,7 @@ public class EffectSystem : MonoBehaviour
|
||||
List<GameObject> list = new List<GameObject>();
|
||||
|
||||
// prefer teamUIController when available for authoritative ally/enemy objects
|
||||
var ui = teamUIController.Instance != null ? teamUIController.Instance : UnityEngine.Object.FindAnyObjectByType<teamUIController>();
|
||||
var ui = teamUIController.Instance != null ? teamUIController.Instance : SceneObjectLookupCache.FindAny<teamUIController>();
|
||||
|
||||
switch (selector)
|
||||
{
|
||||
@@ -858,7 +858,7 @@ public class EffectSystem : MonoBehaviour
|
||||
if (go != null) list.Add(go);
|
||||
else
|
||||
{
|
||||
var named = GameObject.Find($"ally_0{idx + 1}");
|
||||
var named = SceneObjectLookupCache.Find($"ally_0{idx + 1}");
|
||||
if (named != null) list.Add(named);
|
||||
}
|
||||
}
|
||||
@@ -870,11 +870,11 @@ public class EffectSystem : MonoBehaviour
|
||||
int right = slotIndex + 1;
|
||||
if (left >= 0)
|
||||
{
|
||||
var g = GameObject.Find($"ally_0{left + 1}"); if (g != null) list.Add(g);
|
||||
var g = SceneObjectLookupCache.Find($"ally_0{left + 1}"); if (g != null) list.Add(g);
|
||||
}
|
||||
if (right <= 4)
|
||||
{
|
||||
var g = GameObject.Find($"ally_0{right + 1}"); if (g != null) list.Add(g);
|
||||
var g = SceneObjectLookupCache.Find($"ally_0{right + 1}"); if (g != null) list.Add(g);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -884,11 +884,11 @@ public class EffectSystem : MonoBehaviour
|
||||
int right = slotIndex + 1;
|
||||
if (left >= 0)
|
||||
{
|
||||
var g = GameObject.Find($"ally_0{left + 1}"); if (g != null) list.Add(g);
|
||||
var g = SceneObjectLookupCache.Find($"ally_0{left + 1}"); if (g != null) list.Add(g);
|
||||
}
|
||||
if (right <= 4)
|
||||
{
|
||||
var g = GameObject.Find($"ally_0{right + 1}"); if (g != null) list.Add(g);
|
||||
var g = SceneObjectLookupCache.Find($"ally_0{right + 1}"); if (g != null) list.Add(g);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -963,7 +963,7 @@ public class EffectSystem : MonoBehaviour
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
string name = $"ally_0{i}"; // ally_01..ally_05
|
||||
var go = GameObject.Find(name);
|
||||
var go = SceneObjectLookupCache.Find(name);
|
||||
if (go != null && !_cachedAllies.Contains(go)) _cachedAllies.Add(go);
|
||||
}
|
||||
|
||||
@@ -1002,7 +1002,7 @@ public class EffectSystem : MonoBehaviour
|
||||
// If we really need to find "thisEnemy" by name even if inactive, we should do it differently.
|
||||
try
|
||||
{
|
||||
var single = GameObject.Find("thisEnemy");
|
||||
var single = SceneObjectLookupCache.Find("thisEnemy");
|
||||
if (single != null && !_cachedEnemies.Contains(single)) _cachedEnemies.Add(single);
|
||||
} catch { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user