public void DeleteOption() { if (SimulationsData != null) { SimulationService.Delete(SimulationsData[CategoryDropdown.value]); RefreshSimulationsOptions(); } else { string assetGuid = CategoryAssets[CategoryDropdown.value].AssetGuid; string assetPath = Path.Combine(Config.PersistentDataPath, CategoryType.ToString() + "s", assetGuid); // TODO align types with path Service.Delete(assetGuid); if (File.Exists(assetPath)) { File.Delete(assetPath); } RefreshOptions(); } }