fix: Fix incorrect iteration when destroying game objects
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user