Skip to content

Commit b4cb231

Browse files
committed
Not uploaded
1 parent 9002675 commit b4cb231

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

Runtime/Loading/Process/ILoadingProcess.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ public interface ILoadingProcess
88
{
99
event Action OnCompleted;
1010

11-
ILoadingProcess NewChild();
12-
1311
Task StartLoading(CancellationToken cancellationToken);
1412
Task CompletedLoading(CancellationToken cancellationToken);
1513
}

Runtime/Loading/Process/LoadingProcess.cs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ namespace Juce.CoreUnity.Loading.Process
77
{
88
public sealed class LoadingProcess : ILoadingProcess
99
{
10+
public static LoadingProcess Empty = new LoadingProcess();
11+
1012
private readonly IReadOnlyList<Func<CancellationToken, Task>> beforeLoad = Array.Empty<Func<CancellationToken, Task>>();
1113
private readonly IReadOnlyList<Func<CancellationToken, Task>> afterLoad = Array.Empty<Func<CancellationToken, Task>>();
1214

@@ -17,7 +19,7 @@ private LoadingProcess()
1719

1820
}
1921

20-
private LoadingProcess(
22+
public LoadingProcess(
2123
IReadOnlyList<Func<CancellationToken, Task>> beforeLoad,
2224
IReadOnlyList<Func<CancellationToken, Task>> afterLoad
2325
)
@@ -26,19 +28,6 @@ IReadOnlyList<Func<CancellationToken, Task>> afterLoad
2628
this.afterLoad = afterLoad;
2729
}
2830

29-
public static ILoadingProcess New(
30-
IReadOnlyList<Func<CancellationToken, Task>> beforeLoad,
31-
IReadOnlyList<Func<CancellationToken, Task>> afterLoad
32-
)
33-
{
34-
return new LoadingProcess(beforeLoad, afterLoad);
35-
}
36-
37-
public ILoadingProcess NewChild()
38-
{
39-
return new LoadingProcess();
40-
}
41-
4231
public async Task StartLoading(CancellationToken cancellationToken)
4332
{
4433
foreach(Func<CancellationToken, Task> before in beforeLoad)

Runtime/Loading/Services/LoadingService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public bool TryGetNewProcess(out ILoadingProcess loadingProcess)
3333

3434
isLoading = true;
3535

36-
loadingProcess = LoadingProcess.New(beforeLoad, afterLoad);
36+
loadingProcess = new LoadingProcess(beforeLoad, afterLoad);
3737

3838
loadingProcess.OnCompleted += OnLoadingProcessCompleted;
3939

0 commit comments

Comments
 (0)