Delaying CurveEditor command registration until PostEngineInit

#rb trivial
[FYI] Max.Chen
#preflight 627ad8251e749933433e1e4d

#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20132075 via CL 20143953 via CL 20145123 via CL 20145967
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20149261 by lauren barnes in ue5-main branch]
This commit is contained in:
lauren barnes
2022-05-11 16:35:41 -04:00
parent edd11997c3
commit f4a7a3694d
2 changed files with 10 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ public class CurveEditor : ModuleRules
"TimeManagement",
"UnrealEd",
"SequencerWidgets",
"ToolMenus",
}
);

View File

@@ -6,6 +6,7 @@
#include "CurveEditor.h"
#include "CurveEditorViewRegistry.h"
#include "Framework/MultiBox/MultiBoxExtender.h"
#include "ToolMenus.h"
class FCurveEditorModule : public ICurveEditorModule
{
@@ -14,7 +15,14 @@ public:
{
if (GIsEditor)
{
FCurveEditorCommands::Register();
if (UToolMenus::TryGet())
{
FCurveEditorCommands::Register();
}
else
{
FCoreDelegates::OnPostEngineInit.AddStatic(&FCurveEditorCommands::Register);
}
}
}