/Engine/Source/Editor/UnrealEd/Public/EditorScriptingHelpers.h
Check if the editor is in a valid state to run a command.
namespace EditorScriptingHelpers { bool EditorScriptingHelpers::CheckIfInEditorAndPIE() }