コード例 #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();
    }
コード例 #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();
    }
コード例 #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();
    }