diff --git a/Assets/Scripts/EditorGame/Base/GeneralSubmodules/SubmoduleBase.cs b/Assets/Scripts/EditorGame/Base/GeneralSubmodules/SubmoduleBase.cs
index efba78de..8d40426e 100644
--- a/Assets/Scripts/EditorGame/Base/GeneralSubmodules/SubmoduleBase.cs
+++ b/Assets/Scripts/EditorGame/Base/GeneralSubmodules/SubmoduleBase.cs
@@ -29,6 +29,7 @@ namespace Ichni.RhythmGame
public virtual void Delete()
{
+ OnDelete();
attachedGameElement.submoduleList.Remove(this);
}
diff --git a/Assets/Scripts/Manager/OperationManager.cs b/Assets/Scripts/Manager/OperationManager.cs
index 4e3d79d7..0d6ca228 100644
--- a/Assets/Scripts/Manager/OperationManager.cs
+++ b/Assets/Scripts/Manager/OperationManager.cs
@@ -58,13 +58,19 @@ namespace Ichni.Editor
if (gameElement.parentElement != null)
{
- gameElement.parentElement.childElementList.Remove(gameElement);
+ gameElement.parentElement.childElementList.Remove(gameElement); //从父物体的子物体列表中移除,避免报null
}
gameElement.Delete();
}
- private GameElement AffiliatedPaste(GameElement gameElement, GameElement parent)
+ ///
+ /// 使用递归的方式复制粘贴物体及其所有子物体
+ ///
+ /// 将要被粘贴的物体
+ /// (将要)被粘贴物体的父物体
+ ///
+ private void AffiliatedPaste(GameElement gameElement, GameElement parent)
{
gameElement.SaveBM();
GameElement pastedElement = (gameElement.matchedBM as GameElement_BM).DuplicateBM(parent);
@@ -82,8 +88,6 @@ namespace Ichni.Editor
AffiliatedPaste(gameElement.childElementList[i], pastedElement);
}
}
-
- return pastedElement;
}
}
}
\ No newline at end of file
diff --git a/Assets/StreamingAssets/.DS_Store b/Assets/StreamingAssets/.DS_Store
index 156b1dbb..c577c1b1 100644
Binary files a/Assets/StreamingAssets/.DS_Store and b/Assets/StreamingAssets/.DS_Store differ