Exemplo n.º 1
0
    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();
    }
Exemplo n.º 2
0
    public void InitBundles(BundleConfig.BundleTypes type)
    {
        CategoryDropdown     = GetComponentInChildren <Dropdown>();
        CategoryDeleteButton = GetComponentInChildren <Button>();
        CategoryDeleteButton.onClick.AddListener(DeleteOption);

        CategoryType      = type;
        CategoryText.text = CategoryType.ToString();
        RefreshOptions();
    }
Exemplo n.º 3
0
    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();
    }