复制粘贴删除
This commit is contained in:
@@ -206,7 +206,6 @@ namespace Ichni.RhythmGame
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
Debug.Log(attachedElementGuid);
|
||||
(attachedElement as IHaveTransformSubmodule).transformSubmodule = new TransformSubmodule(attachedElement, originalPosition, originalEulerAngles, originalScale);
|
||||
attachedElement.submoduleList.Add((attachedElement as IHaveTransformSubmodule).transformSubmodule);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Ichni.RhythmGame
|
||||
/// </summary>
|
||||
public virtual void Delete()
|
||||
{
|
||||
if (this.childElementList != null)
|
||||
if (childElementList is { Count: > 0 })
|
||||
{
|
||||
for (int i = 0; i < childElementList.Count; i++)
|
||||
{
|
||||
@@ -133,13 +133,16 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
OnDelete();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
Debug.Log("Delete " + elementName + "(" + elementGuid + ")");
|
||||
#endif
|
||||
|
||||
LogWindow.Log("Deleted element: " + elementName);
|
||||
|
||||
EditorManager.instance.beatmapContainer.gameElementList.Remove(this); //从保存列表中剔除
|
||||
this.parentElement.childElementList.Remove(this);
|
||||
Destroy(connectedTab.gameObject);
|
||||
|
||||
if (connectedTab != null)
|
||||
{
|
||||
Destroy(connectedTab.gameObject);
|
||||
}
|
||||
|
||||
Destroy(gameObject); //销毁
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user