LuooYu
(LuooYu)
March 20, 2017, 6:37am
1
When I build my project, the editor gives me an error.
USTRUCT()
struct STATEMACHINE_API FStateMachineResult
{
GENERATED_BODY()
UPROPERTY()
EStateMachineCompoletionType CompletionType;
UPROPERTY()
USM_STate* FinalState;
UPROPERTY()
int32 DateIndex;
};
Undefined identifier “MissionSystem_Plugins_StateMachine_Source_StateMachine_Classes_SM_State_h_24_GENERATED_BODY”
2>EXEC : error : UnrealHeaderTool failed for target ‘MissionSystemEditor’ (platform: Win64, module info: D:\Library\Document\Unreal Projects\MissionSystem\Intermediate\Build\Win64\MissionSystemEditor\Development\MissionSystemEditor.uhtmanifest, exit code: OtherCompilationError (5)).
Muzaheed
(ahsan Muzaheed)
March 20, 2017, 10:24am
2
where did u put your header file ?
also do a try by removing STATEMACHINE_API .
LuooYu
(LuooYu)
March 20, 2017, 12:25pm
3
if I remove STATEMACHINE_API, how to use this struct in the editor?
LuooYu
(LuooYu)
March 20, 2017, 12:43pm
4
I tried. but it still doesn’t work.
LuooYu
(LuooYu)
March 20, 2017, 12:57pm
5
I tried it, and get these error.
cant open source “SM_State.generated.h”
undefined GENERATED_USTRUCT_BODY()
LuooYu
(LuooYu)
March 20, 2017, 1:00pm
6
An irrelevant question
I created a plugin, but i cant find the PCH.h file.
My unreal engine version is 4.15
Muzaheed
(ahsan Muzaheed)
March 20, 2017, 12:39pm
7
my mistake.
i should have noticed that it is an struct.
change GENERATED_BODY() to GENERATED_USTRUCT_BODY().
USTRUCT()
struct STATEMACHINE_API FStateMachineResult
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
EStateMachineCompletionType CompletionType;
UPROPERTY()
USM_State* FinalState;
UPROPERTY()
int32 DataIndex;
};
Muzaheed
(ahsan Muzaheed)
March 20, 2017, 12:45pm
8
delete this Intermediate folder:
D:\Library\Document\Unreal Projects\MissionSystem\Intermediate\
also search for any other Intermediate folders and delete them too. specially inside plugins
then regenerate the project and rebuild from visual studio.
Muzaheed
(ahsan Muzaheed)
March 20, 2017, 2:14pm
9
cant open source
“SM_State.generated.h”
regenerate the project and then build the project. that error will be gone.
LuooYu
(LuooYu)
March 21, 2017, 2:53am
10
i tried to regenerate the project, but i cant build it.