Add DialogueSystemEditor Module for Tree Factory
This commit is contained in:
parent
c682f72afa
commit
d736224daa
@ -0,0 +1,36 @@
|
|||||||
|
using UnrealBuildTool;
|
||||||
|
|
||||||
|
public class DialogueSystemEditor : ModuleRules
|
||||||
|
{
|
||||||
|
public DialogueSystemEditor(ReadOnlyTargetRules Target) : base(Target)
|
||||||
|
{
|
||||||
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
|
PublicIncludePaths.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"EndlessVendetta/DialogueSystem"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
PublicDependencyModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"Core",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
PrivateDependencyModuleNames.AddRange(
|
||||||
|
new string[]
|
||||||
|
{
|
||||||
|
"CoreUObject",
|
||||||
|
"Engine",
|
||||||
|
"Slate",
|
||||||
|
"SlateCore",
|
||||||
|
"UnrealEd",
|
||||||
|
"GenericGraphRuntime",
|
||||||
|
"EndlessVendetta"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
#include "DialogueSystemEditor.h"
|
||||||
|
|
||||||
|
#define LOCTEXT_NAMESPACE "FDialogueSystemEditorModule"
|
||||||
|
|
||||||
|
void FDialogueSystemEditorModule::StartupModule()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void FDialogueSystemEditorModule::ShutdownModule()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef LOCTEXT_NAMESPACE
|
||||||
|
|
||||||
|
IMPLEMENT_MODULE(FDialogueSystemEditorModule, DialogueSystemEditor)
|
@ -0,0 +1,28 @@
|
|||||||
|
#include "DialogueTreeFactory.h"
|
||||||
|
#include "DialogueTree.h"
|
||||||
|
|
||||||
|
#define LOCTEXT_NAMESPACE "DialogueSessionFactory"
|
||||||
|
|
||||||
|
UDialogueTreeFactory::UDialogueTreeFactory()
|
||||||
|
{
|
||||||
|
bCreateNew = true;
|
||||||
|
bEditAfterNew = true;
|
||||||
|
SupportedClass = UDialogueTree::StaticClass();
|
||||||
|
}
|
||||||
|
|
||||||
|
UObject* UDialogueTreeFactory::FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn)
|
||||||
|
{
|
||||||
|
return NewObject<UObject>(InParent, Class, Name, Flags | RF_Transactional);
|
||||||
|
}
|
||||||
|
|
||||||
|
FText UDialogueTreeFactory::GetDisplayName() const
|
||||||
|
{
|
||||||
|
return LOCTEXT("FactoryName", "Dialogue Tree");
|
||||||
|
}
|
||||||
|
|
||||||
|
FString UDialogueTreeFactory::GetDefaultNewAssetName() const
|
||||||
|
{
|
||||||
|
return "DialogueTree";
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef LOCTEXT_NAMESPACE
|
@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Factories/Factory.h"
|
||||||
|
#include "DialogueTreeFactory.generated.h"
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class UDialogueTreeFactory : public UFactory
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UDialogueTreeFactory();
|
||||||
|
|
||||||
|
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
||||||
|
virtual FText GetDisplayName() const override;
|
||||||
|
virtual FString GetDefaultNewAssetName() const override;
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Modules/ModuleManager.h"
|
||||||
|
|
||||||
|
class FDialogueSystemEditorModule : public IModuleInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void StartupModule() override;
|
||||||
|
virtual void ShutdownModule() override;
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user