Hi,
[edit: I edited the questions with more details]
I want to create a new module
NO MODULE GETS CREATED USING "Create Visual Studio Project Files"
-
I use this tutorial : https://www.orfeasel.com/creating-custom-modules/?unapproved=11714&moderation-hash=c9674c7dd82cbe11e50417ccf827b6b8#comment-11714
-
I create an empty blueprint project in unreal editor, then I close the project
-
I add the module to the .uproject file and created the following .h .cpp .cs files in Source folder
-
I right click the unreal .uproject and click on "Create Visual Studio Project Files"
-
the VS project gets created but no files (mine, nor the target build file) are added to it
-
I use VS 2019
EditorCustomScript.uproject:
{
"FileVersion": 3,
"EngineAssociation": "4.25",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "MyModules",
"Type": "Editor",
"LoadingPhase": "PostEngineInit",
"AdditionalDependencies": [
"Engine",
"CoreUObject"
]
}
]
}
MyModule.Build.cs:
using UnrealBuildTool;
public class MyModule : ModuleRules
{
public MyModule(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine","GDBlogPost"});
PublicIncludePaths.AddRange(new string[] {"MyModule/Public"});
PrivateIncludePaths.AddRange(new string[] {"MyModule/Private"});
}
}
MyModule.h
#pragma once
#include "ModuleManager.h"
DECLARE_LOG_CATEGORY_EXTERN(MyModule, All, All);
class FMyModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};
MyModule.cpp
#include "MyModule.h"
DEFINE_LOG_CATEGORY(MyModule);
#define LOCTEXT_NAMESPACE "FMyModule"
void FMyModule::StartupModule()
{
UE_LOG(MyModule, Warning, TEXT("MyModule module has started!"));
}
void FMyModule::ShutdownModule()
{
UE_LOG(MyModule, Warning, TEXT("MyModule module has shut down"));
}
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FMyModule,MyModule)
here is visual studio project with nothing in it (appart from UE4 folder wich is Unreal stuffs):
thanks for your help