admin管理员组文章数量:1400218
Been working on a C++/BP unreal 5.3 project for about a year now and all of a sudden, any time we add a new UFUNCTION
or UPROPERTY
declaration, the entire build massively fails with hundreds of random errors in the code. If i simply comment out the UFUNCTION/UPROPERTY
, there are zero errors and both the build and editor function correctly.
#pragma once
#include "CoreMinimal.h"
#include "DevHelp.generated.h"
UCLASS(BlueprintType)
class VR_BASE_API UDevHelp : public UObject {
GENERATED_BODY()
public:
//Build works if UFUNCTION is commented out
UFUNCTION(BlueprintCallable, Category = "00 Test")
float DoMath(float first, float second) {
return first * second;
}
};
UBT log just claims OtherCompilationError
after spewing over 100 random errors. (All of which clear when commenting out the UFUNCTION
declaration)
CompilationResultException: Error: OtherCompilationError
at UnrealBuildTool.ActionGraph.ExecuteActionsAsync(BuildConfiguration BuildConfiguration, List`1 ActionsToExecute, List`1 TargetDescriptors, ILogger Logger, IActionArtifactCache actionArtifactCache) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\System\ActionGraph.cs:line 417
at UnrealBuildTool.BuildMode.BuildAsync(TargetMakefile[] Makefiles, List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, BuildOptions Options, FileReference WriteOutdatedActionsFile, ILogger Logger) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 801
at UnrealBuildTool.BuildMode.BuildAsync(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile, ILogger Logger, Boolean bSkipPreBuildTargets) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 411
at UnrealBuildTool.BuildMode.ExecuteAsync(CommandLineArguments Arguments, ILogger Logger) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 252
at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 659
This occurs regardless of whether the class inherits from a UObject
or UBlueprintFunctionLibrary
. Regardless of whether the function is instanced
or static
. Regardless of if we use a new, or old file. Additionally, the same issue exists regardless of if we use a UPROPERTY
, or UFUNCTION
within a USTRUCT
, or UCLASS
.
So far I've:
- Re-written/restored MyGame.target.cs, and MyGame.Editor.Target.cs
- Reverted the entire project repo.
- Deleted: Saved, Intermediate, DerivedDataCache, Binaries, and .vs folders.
- Regenerated Visual Studio Project Files. (~20-30 times now)
- Reinstalled Unreal Engine.
- Updated Visual Studio. (2022 14.13.2)
- Tried on a different computer.
All without success or additional indicators of where UBT's gone wrong...
Been working on a C++/BP unreal 5.3 project for about a year now and all of a sudden, any time we add a new UFUNCTION
or UPROPERTY
declaration, the entire build massively fails with hundreds of random errors in the code. If i simply comment out the UFUNCTION/UPROPERTY
, there are zero errors and both the build and editor function correctly.
#pragma once
#include "CoreMinimal.h"
#include "DevHelp.generated.h"
UCLASS(BlueprintType)
class VR_BASE_API UDevHelp : public UObject {
GENERATED_BODY()
public:
//Build works if UFUNCTION is commented out
UFUNCTION(BlueprintCallable, Category = "00 Test")
float DoMath(float first, float second) {
return first * second;
}
};
UBT log just claims OtherCompilationError
after spewing over 100 random errors. (All of which clear when commenting out the UFUNCTION
declaration)
CompilationResultException: Error: OtherCompilationError
at UnrealBuildTool.ActionGraph.ExecuteActionsAsync(BuildConfiguration BuildConfiguration, List`1 ActionsToExecute, List`1 TargetDescriptors, ILogger Logger, IActionArtifactCache actionArtifactCache) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\System\ActionGraph.cs:line 417
at UnrealBuildTool.BuildMode.BuildAsync(TargetMakefile[] Makefiles, List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, BuildOptions Options, FileReference WriteOutdatedActionsFile, ILogger Logger) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 801
at UnrealBuildTool.BuildMode.BuildAsync(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile, ILogger Logger, Boolean bSkipPreBuildTargets) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 411
at UnrealBuildTool.BuildMode.ExecuteAsync(CommandLineArguments Arguments, ILogger Logger) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 252
at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 659
This occurs regardless of whether the class inherits from a UObject
or UBlueprintFunctionLibrary
. Regardless of whether the function is instanced
or static
. Regardless of if we use a new, or old file. Additionally, the same issue exists regardless of if we use a UPROPERTY
, or UFUNCTION
within a USTRUCT
, or UCLASS
.
So far I've:
- Re-written/restored MyGame.target.cs, and MyGame.Editor.Target.cs
- Reverted the entire project repo.
- Deleted: Saved, Intermediate, DerivedDataCache, Binaries, and .vs folders.
- Regenerated Visual Studio Project Files. (~20-30 times now)
- Reinstalled Unreal Engine.
- Updated Visual Studio. (2022 14.13.2)
- Tried on a different computer.
All without success or additional indicators of where UBT's gone wrong...
Share Improve this question edited Mar 24 at 19:32 Reahreic asked Mar 24 at 19:25 ReahreicReahreic 6442 gold badges9 silver badges33 bronze badges1 Answer
Reset to default 0I'm not super confidant with UE5, but I have had this happen to me and I can't remember what I did to fix it.
Are you always using
UCLASS(BlueprintType)
As the class type? All mine use UCLASS()
Using my IT support hat, what about a fresh project? Where are you generating the new class? Same result inside an already working class?
本文标签: Adding any UFUNCTION or UPROPERTY breaks Unreal buildStack Overflow
版权声明:本文标题:Adding any UFUNCTION or UPROPERTY breaks Unreal build - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744231848a2596375.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论