diff --git a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBakingWindow.cs b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBakingWindow.cs index 71765aecb0a..50ee529e95a 100644 --- a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBakingWindow.cs +++ b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBakingWindow.cs @@ -155,8 +155,11 @@ void InitializeBakingSetList() EditorUtility.DisplayDialog("Can't delete baking set", "You can't delete the last Baking set. You need to have at least one.", "Ok"); return; } - if (EditorUtility.DisplayDialog("Delete the selected baking set?", $"Do you really want to delete the baking set '{sceneData.bakingSets[list.index].name}'?", "Yes", "Cancel")) + if (EditorUtility.DisplayDialog("Delete the selected baking set?", $"Deleting the baking set will also delete it's profile asset on disk.\nDo you really want to delete the baking set '{sceneData.bakingSets[list.index].name}'?\n\nYou cannot undo the delete assets action.", "Yes", "Cancel")) { + var pathToDelete = AssetDatabase.GetAssetPath(sceneData.bakingSets[list.index].profile); + if (!String.IsNullOrEmpty(pathToDelete)) + AssetDatabase.DeleteAsset(pathToDelete); Undo.RegisterCompleteObjectUndo(sceneData.parentAsset, "Deleted baking set"); ReorderableList.defaultBehaviours.DoRemoveButton(list); }