# Conflicts: # Source/Platforms/DotNet/NUnit/agents/net40/nunit-agent.exe # Source/Platforms/DotNet/NUnit/agents/net40/nunit.engine.api.dll # Source/Platforms/DotNet/NUnit/agents/net40/nunit.engine.core.dll # Source/Platforms/DotNet/NUnit/agents/net7.0/nunit.agent.addins # Source/Platforms/DotNet/NUnit/nunit.engine.api.dll # Source/Platforms/DotNet/NUnit/nunit.engine.core.dll # Source/Platforms/DotNet/NUnit/nunit.engine.dll # Source/Platforms/DotNet/NUnit/nunit3-console.exe # Source/Platforms/DotNet/NUnit/nunit3-console.exe.config # Source/Platforms/DotNet/NUnit/testcentric.engine.metadata.dll # Source/Tools/Flax.Build/Deps/Downloader.cs # Source/Tools/Flax.Stats/CodeFrame.cs # Source/Tools/Flax.Stats/CodeFrameNode.cs # Source/Tools/Flax.Stats/Flax.Stats.Build.cs # Source/Tools/Flax.Stats/Languages.cs # Source/Tools/Flax.Stats/Program.cs # Source/Tools/Flax.Stats/TaskType.cs # Source/Tools/Flax.Stats/Tools.cs # Source/Tools/FlaxEngine.Tests/TestEditorUtils.cs
46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
|
|
|
|
using FlaxEngine;
|
|
using FlaxEditor.Utilities;
|
|
using FlaxEngine.Utilities;
|
|
|
|
namespace FlaxEditor.States
|
|
{
|
|
/// <summary>
|
|
/// In this state editor is reloading user scripts.
|
|
/// </summary>
|
|
/// <seealso cref="FlaxEditor.States.EditorState" />
|
|
[HideInEditor]
|
|
public sealed class ReloadingScriptsState : EditorState
|
|
{
|
|
/// <inheritdoc />
|
|
public override string Status => "Reloading scripts...";
|
|
|
|
internal ReloadingScriptsState(Editor editor)
|
|
: base(editor)
|
|
{
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void OnEnter()
|
|
{
|
|
base.OnEnter();
|
|
|
|
ScriptsBuilder.ScriptsReloadEnd += OnScriptsReloadEnd;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void OnExit(State nextState)
|
|
{
|
|
ScriptsBuilder.ScriptsReloadEnd -= OnScriptsReloadEnd;
|
|
|
|
base.OnExit(nextState);
|
|
}
|
|
|
|
private void OnScriptsReloadEnd()
|
|
{
|
|
StateMachine.GoToState<EditingSceneState>();
|
|
}
|
|
}
|
|
}
|