SetDownloadResolution() 개인적인 메소드

private SetDownloadResolution ( string guid, DownloadResolution res ) : void
guid string
res DownloadResolution
리턴 void
예제 #1
0
        private void ResolveSelectedDownloadConflicts(DownloadResolution res)
        {
            int  num  = -1;
            bool flag = false;
            int  i    = 0;

            while (i < this.downloadConflicts.Length)
            {
                if (this.selectedLV1Items[i])
                {
                    string guid = this.downloadConflicts[i];
                    if (res == DownloadResolution.Merge && (AssetServer.AssetIsBinaryByGUID(guid) || AssetServer.IsItemDeleted(guid)))
                    {
                        flag = true;
                    }
                    else
                    {
                        if (res != DownloadResolution.Unresolved)
                        {
                            if (AssetServer.GetDownloadResolution(guid) == DownloadResolution.Unresolved)
                            {
                                this.downloadConflictsToResolve--;
                            }
                        }
                        else
                        {
                            this.downloadConflictsToResolve++;
                        }
                        this.downloadResolutions[i] = res;
                        AssetServer.SetDownloadResolution(guid, res);
                        num = ((num != -1) ? -2 : i);
                    }
                }
IL_9F:
                i++;
                continue;
                goto IL_9F;
            }
            this.enableContinueButton = (this.downloadConflictsToResolve == 0);
            if (num >= 0)
            {
                this.selectedLV1Items[num] = false;
                if (num < this.selectedLV1Items.Length - 1)
                {
                    this.selectedLV1Items[num + 1] = true;
                }
            }
            this.enableMergeButton = this.AtLeastOneSelectedAssetCanBeMerged();
            if (flag)
            {
                EditorUtility.DisplayDialog("Some conflicting changes cannot be merged", "Notice that not all selected changes where selected for merging. This happened because not all of them can be merged (e.g. assets are binary or deleted).", "OK");
            }
        }
        private void ResolveSelectedDownloadConflicts(DownloadResolution res)
        {
            int  index1 = -1;
            bool flag   = false;

            for (int index2 = 0; index2 < this.downloadConflicts.Length; ++index2)
            {
                if (this.selectedLV1Items[index2])
                {
                    string downloadConflict = this.downloadConflicts[index2];
                    if (res == DownloadResolution.Merge && (AssetServer.AssetIsBinaryByGUID(downloadConflict) || AssetServer.IsItemDeleted(downloadConflict)))
                    {
                        flag = true;
                    }
                    else
                    {
                        if (res != DownloadResolution.Unresolved)
                        {
                            if (AssetServer.GetDownloadResolution(downloadConflict) == DownloadResolution.Unresolved)
                            {
                                --this.downloadConflictsToResolve;
                            }
                        }
                        else
                        {
                            ++this.downloadConflictsToResolve;
                        }
                        this.downloadResolutions[index2] = res;
                        AssetServer.SetDownloadResolution(downloadConflict, res);
                        index1 = index1 != -1 ? -2 : index2;
                    }
                }
            }
            this.enableContinueButton = this.downloadConflictsToResolve == 0;
            if (index1 >= 0)
            {
                this.selectedLV1Items[index1] = false;
                if (index1 < this.selectedLV1Items.Length - 1)
                {
                    this.selectedLV1Items[index1 + 1] = true;
                }
            }
            this.enableMergeButton = this.AtLeastOneSelectedAssetCanBeMerged();
            if (!flag)
            {
                return;
            }
            EditorUtility.DisplayDialog("Some conflicting changes cannot be merged", "Notice that not all selected changes where selected for merging. This happened because not all of them can be merged (e.g. assets are binary or deleted).", "OK");
        }