Version: 2020.1
언어: 한국어

Progress

class in UnityEditor

매뉴얼로 전환

설명

The Progress utility class reports the progress of asynchronous tasks to Unity.

public IEnumerator Run_OneTask()
{
    // Create a new progress indicator
    int progressId = Progress.Start("Running one task", 0);

// Report the progress status at anytime for (int frame = 0; frame <= 1000; ++frame) { Progress.Report(progressId, "any progress update or null if it hasn't changed", frame / 1000.0f);

// Do something else yield return null; }

// The task is finished. Remove the associated progress indicator. Progress.Remove(progressId); }

정적 변수

globalProgressReturns the global average progression of all running tasks.
globalRemainingTimeReturns the maximum time remaining for all running progress indicators.
runningReturns true if there is at least one running progress indicator, false otherwise.

정적 함수

CancelCancels a runnning progress indicator, and invokes the cancel callback for the associated task.
ClearRemainingTimeResets the computation of a progress indicator's remaining time.
EnumerateItemsReturns an enumerator to loop over all progress indicators.
ExistsChecks whether a progress indicator with the specified ID exists.
FinishMarks the progress indicator as finished.
GetCountGets the number of available progress indicators.
GetCountPerStatusFor each available status, gets the number of progress indicators with that status.
GetDescriptionGets a progress indicator's description.
GetIdFinds a progress indicator's unique ID using its index in the set of all available progress indicators.
GetNameGets a progress indicator's name.
GetOptionsGets the options that you specified when you started the progress indicator.
GetParentIdGets the unique ID of the progress indicator's parent, if any.
GetProgressGets a progress indicator's progress.
GetProgressByIdGets information about a progress indicator.
GetRemainingTimeGets a progress indicator's remaining time, in seconds.
GetRunningProgressCountGets the number of active or running progress indicators.
GetStartDateTimeGets the timestamp of when the progress indicator started.
GetStatusGets the progress indicator's status.
GetTimeDisplayModeGet a progress indicator's time display mode.
GetUpdateDateTimeGets the time that the progress indicator last changed, or finished.
IsCancellableIndicates whether you can cancel the progress indicator's associated task.
RegisterCancelCallbackRegisters a callback that is called when the user cancels a running progress indicator's associated task.
RemoveFinishes and removes an active progress indicator.
ReportReports a running progress indicator's current status.
SetDescriptionSets the progress indicator's description. To clear the description pass null.
SetRemainingTimeSets the progress indicator's remaining time, in seconds.
SetTimeDisplayModeSet a progress indicator's time display mode.
ShowDetailsOpens the progress window for background tasks.
StartThis method starts a new progress indicator.
UnregisterCancelCallbackUnregisters a previously registered progress cancellation callback.

Events

addedAn event raised when a new progress indicator starts.
removedAn event raised when a progress indicator is removed.
updatedAn event raised when a progress indicator's state updates.