First Submit

This commit is contained in:
Arnaud Jamin
2023-10-02 01:32:41 -04:00
parent c34574e841
commit 1aabdb5c4e
445 changed files with 93851 additions and 0 deletions
@@ -0,0 +1,54 @@
#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, CogEditor);
//----------------------------------------------------------------------------------------------------------------------
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