public void DeleteOption() { 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(); }
public void InitBundles(BundleConfig.BundleTypes type) { CategoryDropdown = GetComponentInChildren <Dropdown>(); CategoryDeleteButton = GetComponentInChildren <Button>(); CategoryDeleteButton.onClick.AddListener(DeleteOption); CategoryType = type; CategoryText.text = CategoryType.ToString(); RefreshOptions(); }
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(); } ConnectionUI.instance.UpdateDropdown(); }