Minor cleanup #891
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
|
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
using FlaxEngine;
|
|
||||||
using FlaxEditor.Utilities;
|
using FlaxEditor.Utilities;
|
||||||
|
|
||||||
namespace FlaxEditor.Progress.Handlers
|
namespace FlaxEditor.Progress.Handlers
|
||||||
@@ -21,7 +20,7 @@ namespace FlaxEditor.Progress.Handlers
|
|||||||
// Link for events
|
// Link for events
|
||||||
ScriptsBuilder.CompilationBegin += OnStart;
|
ScriptsBuilder.CompilationBegin += OnStart;
|
||||||
ScriptsBuilder.CompilationSuccess += OnEnd;
|
ScriptsBuilder.CompilationSuccess += OnEnd;
|
||||||
ScriptsBuilder.CompilationFailed += OnCompilationFail;
|
ScriptsBuilder.CompilationFailed += OnCompilationFailed;
|
||||||
ScriptsBuilder.CompilationStarted += () => OnUpdate(0.2f, "Compiling scripts...");
|
ScriptsBuilder.CompilationStarted += () => OnUpdate(0.2f, "Compiling scripts...");
|
||||||
ScriptsBuilder.ScriptsReloadCalled += () => OnUpdate(0.8f, "Reloading scripts...");
|
ScriptsBuilder.ScriptsReloadCalled += () => OnUpdate(0.8f, "Reloading scripts...");
|
||||||
ScriptsBuilder.ScriptsReloadBegin += OnScriptsReloadBegin;
|
ScriptsBuilder.ScriptsReloadBegin += OnScriptsReloadBegin;
|
||||||
@@ -45,6 +44,11 @@ namespace FlaxEditor.Progress.Handlers
|
|||||||
Newtonsoft.Json.JsonSerializer.ClearCache();
|
Newtonsoft.Json.JsonSerializer.ClearCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnCompilationFailed()
|
||||||
|
{
|
||||||
|
OnFail("Scripts compilation failed");
|
||||||
|
}
|
||||||
|
|
||||||
private void OnScriptsReloadEnd()
|
private void OnScriptsReloadEnd()
|
||||||
{
|
{
|
||||||
_selectionCache.Restore();
|
_selectionCache.Restore();
|
||||||
@@ -57,13 +61,5 @@ namespace FlaxEditor.Progress.Handlers
|
|||||||
|
|
||||||
OnUpdate(0, "Starting scripts compilation...");
|
OnUpdate(0, "Starting scripts compilation...");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called when scripts compilation fails
|
|
||||||
/// </summary>
|
|
||||||
private void OnCompilationFail()
|
|
||||||
{
|
|
||||||
OnFail("Scripts Compilation Failed");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user