Edit code for build
This commit is contained in:
parent
b5ae2b567f
commit
f89b26f6f1
@ -9,12 +9,17 @@ public class Pawn : ModuleRules {
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"InputCore",
|
||||
"EditorStyle",
|
||||
"Slate",
|
||||
"SlateCore",
|
||||
"PropertyEditor"
|
||||
"SlateCore"
|
||||
});
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(new string[] { });
|
||||
|
||||
if (Target.bBuildEditor) {
|
||||
PublicDependencyModuleNames.AddRange(new[] {
|
||||
"EditorStyle",
|
||||
"PropertyEditor"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,24 +1,9 @@
|
||||
#include "PawnModule.h"
|
||||
|
||||
#include "PropertyEditorModule.h"
|
||||
#include "Interaction/PwnInteractableActor.h"
|
||||
#include "Interaction/PwnInteractableActorCustomization.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
IMPLEMENT_PRIMARY_GAME_MODULE(FPawnModule, Pawn, "Pawn");
|
||||
|
||||
void FPawnModule::StartupModule() {
|
||||
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
|
||||
PropertyModule.RegisterCustomPropertyTypeLayout(FPwnInteractableActor::StaticStruct()->GetFName(),
|
||||
FOnGetPropertyTypeCustomizationInstance::CreateStatic(
|
||||
&UPwnInteractableActorCustomization::MakeInstance));
|
||||
PropertyModule.NotifyCustomizationModuleChanged();
|
||||
}
|
||||
void FPawnModule::StartupModule() {}
|
||||
|
||||
void FPawnModule::ShutdownModule() {
|
||||
if (FModuleManager::Get().IsModuleLoaded("PropertyEditor")) {
|
||||
FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
|
||||
PropertyModule.UnregisterCustomPropertyTypeLayout(FPwnInteractableActor::StaticStruct()->GetFName());
|
||||
PropertyModule.NotifyCustomizationModuleChanged();
|
||||
}
|
||||
}
|
||||
void FPawnModule::ShutdownModule() {}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "Interaction/PwnInteractableActorCustomization.h"
|
||||
#include "PawnEditor/Customization/PwnInteractableActorCustomization.h"
|
||||
|
||||
#include "PropertyCustomizationHelpers.h"
|
||||
#include "PropertyHandle.h"
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
#include "IPropertyTypeCustomization.h"
|
||||
|
||||
class PAWN_API UPwnInteractableActorCustomization : public IPropertyTypeCustomization {
|
||||
class UPwnInteractableActorCustomization : public IPropertyTypeCustomization {
|
||||
public:
|
||||
static TSharedRef<IPropertyTypeCustomization> MakeInstance();
|
||||
|
||||
@ -35,7 +35,9 @@ public class PawnEditor : ModuleRules {
|
||||
"MainFrame",
|
||||
"PropertyEditor",
|
||||
"ComponentVisualizers",
|
||||
"Pawn"
|
||||
"EditorStyle",
|
||||
"PropertyEditor",
|
||||
"Pawn",
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,26 @@
|
||||
#include "PawnEditorModule.h"
|
||||
|
||||
#include "PwnStyle.h"
|
||||
#include "Customization/PwnInteractableActorCustomization.h"
|
||||
#include "Interaction/PwnInteractableActor.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
IMPLEMENT_MODULE(FPawnEditorModule, PawnEditor)
|
||||
|
||||
void FPawnEditorModule::StartupModule() {
|
||||
FPwnStyle::Initialize();
|
||||
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
|
||||
PropertyModule.RegisterCustomPropertyTypeLayout(FPwnInteractableActor::StaticStruct()->GetFName(),
|
||||
FOnGetPropertyTypeCustomizationInstance::CreateStatic(
|
||||
&UPwnInteractableActorCustomization::MakeInstance));
|
||||
PropertyModule.NotifyCustomizationModuleChanged();
|
||||
}
|
||||
|
||||
void FPawnEditorModule::ShutdownModule() {
|
||||
FPwnStyle::Shutdown();
|
||||
if (FModuleManager::Get().IsModuleLoaded("PropertyEditor")) {
|
||||
FPropertyEditorModule& PropertyModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
|
||||
PropertyModule.UnregisterCustomPropertyTypeLayout(FPwnInteractableActor::StaticStruct()->GetFName());
|
||||
PropertyModule.NotifyCustomizationModuleChanged();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user