mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 08:02:23 -07:00
934ef438f8
Update ImPlot Fix misc compilation errors
55 lines
2.0 KiB
C++
55 lines
2.0 KiB
C++
#include "CogDebugEditorModule.h"
|
|
|
|
#include "CogDebugGraphPanelPinFactory.h"
|
|
#include "CogDebugLogCategoryDetails.h"
|
|
#include "IAssetTools.h"
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "GameplayCoreEditorModule"
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
class FCogDebugEditorModule : public ICogDebugEditorModule
|
|
{
|
|
public:
|
|
virtual void StartupModule() override;
|
|
virtual void ShutdownModule() override;
|
|
|
|
private:
|
|
/** Pin factory for abilities graph; Cached so it can be unregistered */
|
|
TSharedPtr<FCogGraphPanelPinFactory> GraphPanelPinFactory;
|
|
|
|
EAssetTypeCategories::Type AssetCategory;
|
|
};
|
|
|
|
IMPLEMENT_MODULE(FCogDebugEditorModule, CogDebugEditor);
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
void FCogDebugEditorModule::StartupModule()
|
|
{
|
|
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
|
|
PropertyModule.RegisterCustomPropertyTypeLayout("CogLogCategory", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FCogLogCategoryDetails::MakeInstance));
|
|
|
|
// Register factories for pins and nodes
|
|
GraphPanelPinFactory = MakeShareable(new FCogGraphPanelPinFactory());
|
|
FEdGraphUtilities::RegisterVisualPinFactory(GraphPanelPinFactory);
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
void FCogDebugEditorModule::ShutdownModule()
|
|
{
|
|
if (FModuleManager::Get().IsModuleLoaded("PropertyEditor"))
|
|
{
|
|
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
|
|
PropertyModule.UnregisterCustomPropertyTypeLayout("CogLogCategory");
|
|
}
|
|
|
|
// Unregister graph factories
|
|
if (GraphPanelPinFactory.IsValid())
|
|
{
|
|
FEdGraphUtilities::UnregisterVisualPinFactory(GraphPanelPinFactory);
|
|
GraphPanelPinFactory.Reset();
|
|
}
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|