Adaug proiectul Unity

This commit is contained in:
2026-11-01 23:39:55 +02:00
parent cb14d9d37d
commit 863eac8f2c
23463 changed files with 5412601 additions and 0 deletions
@@ -0,0 +1,59 @@
using System;
using UnityEditor;
using Codice.Client.BaseCommands;
using Codice.Client.Commands;
using PlasticGui.WorkspaceWindow;
using PlasticGui.WorkspaceWindow.Update;
namespace Unity.PlasticSCM.Editor.Headless
{
internal class HeadlessUpdateProgress
{
internal void ShowUpdateProgress(string title, UpdateNotifier notifier)
{
mProgressData = new BuildProgressSpeedAndRemainingTime.ProgressData(DateTime.Now);
if (mProgressId == -1)
Progress.Finish(mProgressId);
mProgressId = Progress.Start(title);
mUpdateProgressNotifier = notifier;
EditorApplication.update += UpdateProgress;
}
internal void EndUpdateProgress()
{
EditorApplication.update -= UpdateProgress;
Progress.Finish(mProgressId);
mProgressId = -1;
}
internal bool IsOperationRunning()
{
return mProgressId != -1;
}
void UpdateProgress()
{
if (mProgressId == -1)
return;
UpdateOperationStatus status = mUpdateProgressNotifier.GetUpdateStatus();
float progress = GetProgressBarPercent.ForTransfer(
status.UpdatedSize, status.TotalSize) / 100f;
Progress.Report(
mProgressId,
progress,
UpdateProgressRender.GetProgressString(status, mProgressData));
}
int mProgressId = -1;
UpdateNotifier mUpdateProgressNotifier;
BuildProgressSpeedAndRemainingTime.ProgressData mProgressData;
}
}