x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: Not Selected
Tags:
more ▼

asked Apr 21 '15 at 03:30 PM in C++ Programming

avatar image

2rusbekov
96 7 12 20

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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

more ▼

answered Apr 27 '15 at 11:17 AM

avatar image

2rusbekov
96 7 12 20

(comments are locked)
10|2000 characters needed characters left

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.

more ▼

answered Apr 21 '15 at 03:39 PM

avatar image

Jargon
808 39 30 65

avatar image 2rusbekov Apr 21 '15 at 05:39 PM

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.

avatar image Jargon Apr 21 '15 at 05:40 PM

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

avatar image 2rusbekov Apr 21 '15 at 05:52 PM

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

avatar image Jargon Apr 21 '15 at 05:53 PM

Okay- are you getting any compilation errors?

avatar image 2rusbekov Apr 21 '15 at 05:54 PM

no. Build successfull

avatar image Jargon Apr 21 '15 at 05:57 PM

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 :) Just code on and you should be fine.

avatar image 2rusbekov Apr 21 '15 at 06:02 PM

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.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question