mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 12:58:27 +00:00
profile loading steps
This commit is contained in:
parent
baedb28277
commit
7d6e6ca84c
1 changed files with 4 additions and 0 deletions
|
@ -247,7 +247,9 @@ namespace SanAndreasUnity.Behaviours
|
|||
|
||||
while (hasNext) {
|
||||
|
||||
UnityEngine.Profiling.Profiler.BeginSample($"Loading step: {step.Description}");
|
||||
hasNext = en.MoveNext();
|
||||
UnityEngine.Profiling.Profiler.EndSample();
|
||||
|
||||
// update description
|
||||
LoadingStatus = step.Description;
|
||||
|
@ -257,7 +259,9 @@ namespace SanAndreasUnity.Behaviours
|
|||
} else {
|
||||
// this step uses a function
|
||||
|
||||
UnityEngine.Profiling.Profiler.BeginSample($"Loading step: {step.Description}");
|
||||
step.LoadFunction();
|
||||
UnityEngine.Profiling.Profiler.EndSample();
|
||||
}
|
||||
|
||||
// step finished it's work
|
||||
|
|
Loading…
Add table
Reference in a new issue