New StateTree Classes in C++ break build

I am running 5.2 and am tryingto add StateTrees into my project I am working on and whenever I add a new StateTree based class to it in C++ it throws these type of errors. If I try adding different verison of classes that apply to StateTree like Evaluators or Conditons it gives me the same error.

Building 3 actions with 3 processes...
  [1/3] Compile [x64] USI_StateTree_TaskBase .cpp
  E:\Unreal Engine\UE_5.2\Engine\Plugins\Runtime\StateTree\Source\StateTreeModule\Public\StateTree.h(80): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

I was following this tutorial here:
StateTree Custom C++ Task

Plugin is enabled in editor.
Dependencies are added: “StateTreeModule”, “GameplayStateTreeModule”

Here is the class I added:

#include "CoreMinimal.h"
#include "Blueprint/StateTreeTaskBlueprintBase.h"
#include "SI_StateTree_TaskBase.generated.h"

UCLASS()
class SI_PROTOTYPE_API USI_StateTree_TaskBase : public UStateTreeTaskBlueprintBase
{
	GENERATED_BODY()
	
};

Upon adding this code to the build it gives me the error above. If I delete the class and build it again it will work just fine.

Has anyone ran into this issue. And am I missing an include or a dependency?

I just built out a project in 5.1 and added the plugin and created the class the same way and it worked just fine. but even in a brand new project of 5.2 you cannot create custom C++ classes for StateTrees. I am guessing this is a bug. Can anyone else replicate this problem?

Create new C++ project in 5.2.1
Enable StateTree & GameplayStateTree Plugins
Restart Editot
Create C++ class using StateTreeTaskBlueprintBase as parent.

As soon as that is done it will not compile again. it will give the default-int error.

This looks to be a bug :bug: in the engine code of 5.2. It works in 5.1 just fine as well as 5.3.

Looks like something was introduced in 5.2 that changed the way the .generated file is being created that was fixed in the 5.3 preview.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.