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
+34
View File
@@ -98,6 +98,23 @@ public class roomDetails : MonoBehaviour
{
_service = service;
UIBackStack.RegisterOrBump(
this,
() => this != null && gameObject != null && gameObject.activeInHierarchy,
() =>
{
if (_spawnedRoomRankingInstance != null)
{
UIBackStack.Unregister(_spawnedRoomRankingInstance);
Destroy(_spawnedRoomRankingInstance);
_spawnedRoomRankingInstance = null;
return true;
}
Destroy(gameObject);
return true;
});
if (_service == null)
{
Debug.LogWarning("[roomDetails] ArenaRoomService is missing.");
@@ -172,6 +189,8 @@ public class roomDetails : MonoBehaviour
private void OnDestroy()
{
UIBackStack.Unregister(this);
if (_service != null)
{
_service.OnRoomSnapshotChanged -= HandleRoomSnapshotChanged;
@@ -244,6 +263,7 @@ public class roomDetails : MonoBehaviour
if (_spawnedRoomRankingInstance != null)
{
UIBackStack.Unregister(_spawnedRoomRankingInstance);
Destroy(_spawnedRoomRankingInstance);
_spawnedRoomRankingInstance = null;
}
@@ -1192,6 +1212,20 @@ public class roomDetails : MonoBehaviour
}
}
UIBackStack.RegisterOrBump(
_spawnedRoomRankingInstance,
() => _spawnedRoomRankingInstance != null && _spawnedRoomRankingInstance.activeInHierarchy,
() =>
{
if (_spawnedRoomRankingInstance != null)
{
Destroy(_spawnedRoomRankingInstance);
_spawnedRoomRankingInstance = null;
}
return true;
});
rankingListPrefab ranking = _spawnedRoomRankingInstance.GetComponent<rankingListPrefab>();
if (ranking == null)
{