How to add code to editor?

Hi! I got sources from github, and want to add some changes to AnimGraph. But I dont know how to add code to editor solution in VS properly. Particularly how to generate “Blabla.generated.h”? I tried GenerateProjectFiles.bat but didn’t help.

Hey there!

If you want to change the AnimGraph, edit the relevant files in the engine’s source. Don’t worry about .generated.h files, as they are generated by the Unreal Header Tool automatically when you build your project through VS if the class derives from UObject somewhere along the line.

GenerateProjectFiles just creates files like the .sln and Intermediate folder’s contents for you.

I want to add node like Conduit in state machine. I took AnimStateConduitNode as example.

I added empty code derived from UAnimStateNodeBase, build/rebuild UE4 project. “Blabla.generated.h” didn’t generate.

Yes, since your empty code isn’t deriving from UObject. It’s just a plain C++ class.

Okay- are you getting any compilation errors?

In that case, it has generated the generated.h file - it’s not intended to be edited directly, and thus it’s hidden away in your Intermediate folder.

You’ve done everything correctly so far :slight_smile: Just code on and you should be fine.

It’s inherited from UAnimStateNodeBase that inherited from UEdGraphNode that inherited from UObject

no. Build successfull

But I cant include it. And can’t use GENERATED_UCLASS_BODY() like macros and constructor UBlabla::UBlabla(const FObjectInitializer& ObjectInitializer)

There is no file in explorer too.

Put files in Editor folder. Cleaned and Rebuild full solution. All headers generated sucessfully.