PretendProgress is a fake progress bar tool for the Unity Editor, used to simulate long-running tasks. Scripts only compile/run in the Editor (see PretendProgress.asmdef includePlatforms=Editor).
- Create assets in Project view:
Create -> PretendProgress -> SimulateTaskTableCreate -> PretendProgress -> PretendProgressSo
- Open
SimulateTaskTable, input task config intextArea, clickHandleTextArea. - Open
PretendProgressSo, configure it and assignsimulateTaskTable. - In
PretendProgressSoInspector, clickStartPretend.
SimulateTaskTable configures task list and run order:
runType: task order (Order/Random/Reverse)textArea: bulk-generate tasks from tagged textsimulateTasksTable: parsed task list
<Task>
<title value="Import Assets"/>
<taskTime value="2.5"/>
<detail>
<l>Loading... {P}%</l>
<l>Processing shaders... {P}%</l>
</detail>
</Task>
<Task>
<title value="Build Cache"/>
<taskTime value="1.0"/>
<detail>
<l>Hashing files... {P}%</l>
</detail>
</Task>title: task titletaskTime: task duration (used for summary/config only)detail: multi-line detail,{P}replaced by percent (0-100)- default detail is
Processing... {P}%when empty
Click HandleTextArea to parse into simulateTasksTable.
PretendProgressBarSo controls progress behavior:
isBlock: block main thread (true=blocking)workType:Forever: run until canceledByTime: end byworkTimehideAfterRun: hide Inspect panel and project panelhideAfterRun
workTime: ByTime duration (seconds)simulateTaskTable: task table asset , progressbar will show title and detail form this table.showCancleBtn: show cancel button (hidden field, be careful)
- Inspector: click
StartPretendinPretendProgressSo,you can create file on mouse context - Code (Editor only):
using PretendProgressBar;
PretendProgressBarHandle.HandleSo(pretendProgressSo);SimulateTaskTable.cs: task table and textArea parsingSimulatedProgressIncrement.cs: random/smoothed incrementsPretendProgressBarSo.cs: config dataPretendProgressBar.cs: main logic (blocking/non-blocking)Editor/SimulateTaskTableEditor.cs: task table buttonEditor/PretendProgressEditor.cs: StartPretend button
- In
Foreverwithout cancel button, a 120s timeout prevents editor lockup detailprefers{P}placeholder;{0}also supported- Editor-only, not included in runtime build