This commit is contained in:
CortexCore
2023-10-06 23:43:19 +08:00
parent ebf9c1f526
commit 2c4710bc5d
186 changed files with 111802 additions and 764 deletions

View File

@@ -54,15 +54,23 @@ namespace BITKit.UX
}
}
public async void SetDirect(float progess,string label)
public async void SetDirect(float progess, string label)
{
await UniTask.SwitchToMainThread(cancellationToken);
Set(progess);
if (labelElement is not null)
try
{
await UniTask.SwitchToMainThread(cancellationToken);
Set(progess);
if (labelElement is not null)
{
labelElement.text = label;
}
}
catch (OperationCanceledException)
{
labelElement.text = label;
}
}
float IProvider<float>.Get()
{
throw new System.NotImplementedException();