The_Xismy
(The_Xismy)
September 20, 2016, 1:43pm
1
I am trying to add a new C++ header to my game, but when I generate Visual Studio files it doesn’t generate the AnimNode_weapon.generated.h file.
The code of the file is:
//AnimNode_weapon.h
#pragma once
#include "Runtime\Engine\Classes\Animation\AnimNodeBase.h"
#include "AnimNode_weapon.generated.h"
USTRUCT()
struct FAnimNode_weapon : public FAnimNode_Base {
GENERATED_BODY()
FAnimNode_weapon();
};
What I have trying:
1 Put this file in the source direcotry.
2 Delete the bin and Intermediate folders.
3 Right click on the project and Generate Visual Studio project files .
mdonge
(mdonge)
September 20, 2016, 2:09pm
2
create your c++ files from Unreal Editor using “Add a new C++ class”, it’s the best way to do it and you won’t have errors
The_Xismy
(The_Xismy)
September 20, 2016, 3:17pm
3
I usually do that way, but in this case I need to extend the AnimNode_Base struct. I can´t extend a struct from the editor. I’ll try to create a class in the editor and substitute the code.
The_Xismy
(The_Xismy)
September 20, 2016, 3:44pm
4
Ok, I fixed it by typing game name _API behind struct keyword as in the classes files. Now the .generated.h is created. Thanks for answering.
mdonge
(mdonge)
September 20, 2016, 4:12pm
5
Nice to see that you find a solution !