Exemple #1
0
        private void RefreshSizeInfo()
        {
            UIUtils.SetElementDisplay(detailSizesContainer, displayVersion.sizes.Any());
            detailSizes.Clear();

            var sizeInfo = displayVersion.sizes.FirstOrDefault(info => info.supportedUnityVersion == displayVersion.supportedVersion);

            if (sizeInfo == null)
            {
                sizeInfo = displayVersion.sizes.LastOrDefault();
            }

            if (sizeInfo != null)
            {
                detailSizes.Add(new Label($"Size: {UIUtils.ConvertToHumanReadableSize(sizeInfo.downloadSize)} (Number of files: {sizeInfo.assetCount})"));
            }
        }
Exemple #2
0
        private bool RefreshSizeInfo()
        {
            var showSizes = displayVersion.sizes.Any();

            UIUtils.SetElementDisplay(detailSizesContainer, showSizes);
            detailSizes.Clear();

            var sizeInfo = displayVersion.sizes.FirstOrDefault(info => info.supportedUnityVersion == displayVersion.supportedVersion);

            if (sizeInfo == null)
            {
                sizeInfo = displayVersion.sizes.LastOrDefault();
            }

            if (sizeInfo != null)
            {
                detailSizes.Add(new Label(string.Format(ApplicationUtil.instance.GetTranslationForText("Size: {0} (Number of files: {1})"), UIUtils.ConvertToHumanReadableSize(sizeInfo.downloadSize), sizeInfo.assetCount)));
            }

            return(showSizes);
        }