fix: Fix incorrect iteration when destroying game objects

This commit is contained in:
2025-02-14 18:22:19 +08:00
parent 76b33627d5
commit 26b476fa78
2 changed files with 0 additions and 2 deletions

View File

@@ -9,7 +9,6 @@ namespace Cryville.EEW.Unity.UI {
public void Set(ReportUnit unit) {
foreach (Transform child in transform) {
child.SetParent(null, false);
Destroy(child.gameObject);
}
foreach (var e in unit) {

View File

@@ -9,7 +9,6 @@ namespace Cryville.EEW.Unity.UI {
public void Set(IEnumerable<Localized<ReportViewModelProperty>> props) {
foreach (Transform child in transform) {
child.SetParent(null, false);
Destroy(child.gameObject);
}
foreach (var prop in props) {