Hi, i am coding in ue but when i try to compile it gives me an unspecified error, it just says "Patch could not be activated at the end of compilation without errors or warnings.
I cannot figure out why, but i think it has something to do with the compiler c# files, so i’ll write them here
Note that this project is still pretty small, i just started it.
attritionEditor.Target.cs
using UnrealBuildTool;
using System.Collections.Generic;
public class attritionEditorTarget : TargetRules
{
public attritionEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
ExtraModuleNames.AddRange(new string[] { "attrition" });
}
}
attrition.Target.cs
using UnrealBuildTool;
using System.Collections.Generic;
public class attritionTarget : TargetRules
{
public attritionTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
ExtraModuleNames.AddRange(new string[] { "attrition" });
}
}
attrition.Build.cs
using UnrealBuildTool;
public class attrition : ModuleRules
{
public attrition(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicIncludePaths.AddRange(
new string[] {
"attrition"
}
);
PrivateIncludePaths.AddRange(
new string[] {
}
);
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "ModularGameplay" });
DynamicallyLoadedModuleNames.AddRange(
new string[] {
}
);
// Generate compile errors if using DrawDebug functions in test/shipping builds.
PublicDefinitions.Add("SHIPPING_DRAW_DEBUG_ERROR=1");
}
}
There is a “.sln” file in the same folder as your project - that’s the Visual Studio project file which you can double click to open in Visual Studio (without your project open in UE).
You can build that without unreal running, and when you execute it - the Unreal Editor will start up with your project loaded.
when i try to start up after the compilation is says
The game module ‘attrition’ could not be loaded. There may be an operating system error, the module may not be properly set up, or a plugin which hash been included into the build has not been turned on
not sure if it will be useful for @Pelaculi still, but i will still post it; this error can be caused too by using a plugin in the code BUT NOT enabling it in the editor (i.e. the data in the uproject file, if it’s not convenient to open unreal editor up, you can open that file in visual studio); as the same error after VS build states, “or a plugin which has been included into the build has not been turned on”
the error @Pelaculi shown at the beggining explains that everything built without mistakes, but the patch couldn’t be linked because some metadata was lacking, obviously this is not verbose, but the metadata is just that, the inclusion of the plugin in the project “header”, i.e. the .uproject file.