After previous times trying out and using Unreal Engine to hack around to test if some ideas and concepts I want to implement in a 3D environment, I am now ready and wanting to get serious and create something tangible and productive in Unreal Engine using C++.
The first thing I want to do is to extend and expand the existing ACharacter class so I can use this extended ACharacter class in the character object that the UE editor creates. I thought this should not be too difficult as all I needed to do would be to create a new class within a blank C++ file created by UE which inherits the ACharacter class as
class myUEprojectname_API ACharacter_extension : public ACharacter
{
GENERATED_BODY()
Public:
ACharacter_extension();
~ACharacter_extension();
}
add my own code and then modify the character generated .h file UE creates using the class wizard from
"#include "GameFramework/Character.h"
UCLASS(config = Game)
class myUEprojectname_API Amy_Character : public ACharacter
to
"#include "Character_extension.h"
UCLASS(config = Game)
class myUEprojectname_API Amy_Character : public ACharacter_extension
and changing references of ACharacter in the my_Character.generated and my_Character.gen files to ACharacter_extension.
In my naivity and ignorance of what UE does and how it works when creating a character using the class wizard, and what is involved in compiling a UE project, this failed.
I have spent a lot of time scouring the documentation, the internet, and google and have found scant and confusing information, and certainly no examples on if what I want to do can be possible, and if it can, how it can be done.
If it can be done, I suspect it it may be a line of code added to one of the .cs files that instructs the editor to substitute the GameFramework/Character.h and .cpp file with a specified pathname.
Is there anyone out there that can help indicate to me if using an extended ACharacter class can be substituted for the default ACharacter class the class wizard uses or can manually be assigned? If so how or where I can find the information on how to do so. I would much appreciate any help.
Thanks in advance.