I could compile and package my project with the old version of Unreal Engine (4.15) but after update project and engine to 4.16 I can’t compile project and I don’t know what is the problem. by the way, I attached the log file.
please help.
There may be some updated nodes in 4.16 that didn’t update correctly in the blueprints. R u able to play in editor in 4.16?
Yes. I can play in editor without any error.
BWGame.Target.cs :
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.Collections.Generic;
public class BWGameTarget : TargetRules
{
public BWGameTarget(TargetInfo Target):base(Target)
{
Type = TargetType.Game;
ExtraModuleNames.AddRange(new string[] { "BWGame" } );
// ExtraModuleNames.AddRange("BWGame");
}
//
// TargetRules interface.
//
//public override void SetupBinaries(
// TargetInfo Target,
// ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
// ref List<string> OutExtraModuleNames
// )
//{
// OutExtraModuleNames.AddRange( new string[] { "BWGame" } );
//}
}
BWGameEditor.Target.cs :
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.Collections.Generic;
public class BWGameEditorTarget : TargetRules
{
public BWGameEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
ExtraModuleNames.AddRange(new string[] {"BWGame"} );
//ExtraModuleNames.AddRange("BWGame");
}
//
// TargetRules interface.
//
//public override void SetupBinaries(
// TargetInfo Target,
// ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
// ref List<string> OutExtraModuleNames
// )
//{
// OutExtraModuleNames.AddRange( new string[] { "BWGame" } );
//}
}
BWGame.Build.cs
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
public class BWGame : ModuleRules
{
//public BWGame(TargetInfo Target)
//{
// PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AIModule", "UMG", "Slate", "SlateCore", "RHI", "MoviePlayer"});
// PrivateDependencyModuleNames.AddRange(new string[] { });
// if (UEBuildConfiguration.bBuildEditor)
// {
// PublicDependencyModuleNames.AddRange(new string[] { "AnimGraph", "BlueprintGraph", "GraphEditor" });
// }
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
// {
// if (UEBuildConfiguration.bCompileSteamOSS == true)
// {
// DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
// }
// }
// }
public BWGame(ReadOnlyTargetRules ROTargetRules) : base(ROTargetRules)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AIModule", "UMG", "Slate", "SlateCore", "RHI", "MoviePlayer" });
PrivateDependencyModuleNames.AddRange(new string[] { });
if (UEBuildConfiguration.bBuildEditor)
{
PublicDependencyModuleNames.AddRange(new string[] { "AnimGraph", "BlueprintGraph", "GraphEditor", "AnimGraphRuntime"});
}
}
}
please help
Finally I figure out how to fix it.
I opened the .uproject file in notepad and made a tiny change.
original :
{
"FileVersion": 3,
"EngineAssociation": "{7C5D7434-4FEB-44E5-0374-D08F24EA03CB}",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "BWGame",
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"Engine",
"AIModule",
"UMG",
"AnimGraph"
]
}
],
"TargetPlatforms": [
"WindowsNoEditor"
]
}
edit :
{
"FileVersion": 3,
"EngineAssociation": "{7C5D7434-4FEB-44E5-0374-D08F24EA03CB}",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "BWGame",
"Type": "Runtime",
"LoadingPhase": "Default"
}
],
"TargetPlatforms": [
"WindowsNoEditor"
]
}