You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-157414 #rb chris.caulfield,cedric.caillaud,benn.gallagher #preflight 62fe844657316140a8f9659e [CL 21455241 by danny chapman in ue5-main branch]
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "PhysicsControlVisualizerModule.h"
|
|
#include "PhysicsControlComponent.h"
|
|
#include "PhysicsControlComponentVisualizer.h"
|
|
#include "UnrealEdGlobals.h"
|
|
#include "Editor/UnrealEdEngine.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "FPhysicsControlModule"
|
|
|
|
void FPhysicsControlVisualizerModule::StartupModule()
|
|
{
|
|
if (GUnrealEd)
|
|
{
|
|
TSharedPtr<FPhysicsControlComponentVisualizer> Visualizer = MakeShared<FPhysicsControlComponentVisualizer>();
|
|
GUnrealEd->RegisterComponentVisualizer(UPhysicsControlComponent::StaticClass()->GetFName(), Visualizer);
|
|
// This call should maybe be inside the RegisterComponentVisualizer call above, but since it's not,
|
|
// we'll put it here.
|
|
Visualizer->OnRegister();
|
|
VisualizersToUnregisterOnShutdown.Add(UPhysicsControlComponent::StaticClass()->GetFName());
|
|
}
|
|
}
|
|
|
|
void FPhysicsControlVisualizerModule::ShutdownModule()
|
|
{
|
|
if (GUnrealEd)
|
|
{
|
|
for (const FName& Name : VisualizersToUnregisterOnShutdown)
|
|
{
|
|
GUnrealEd->UnregisterComponentVisualizer(Name);
|
|
}
|
|
}
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
|
|
IMPLEMENT_MODULE(FPhysicsControlVisualizerModule, PhysicsControl)
|
|
|