Hi,
I want to expose the simple struct to blueprint.So here is what i am doing i created empty c++ project and added new c++ class through the wizard under file option.Then for parent class i chose “None” and gave the name of the file as
FFSFollowCamProp_S,this created a .h and .cpp file in visual studio.Now when i compile it its fine.When i replace it with struct i get errors.This is my code
.h
class FFSFollowCamProp_S
{
public:
FFSFollowCamProp_S();
~FFSFollowCamProp_S();
};
.cpp
#include “Engine.h”
#include “FFSFollowCamProp_S.h”
FFSFollowCamProp_S::FFSFollowCamProp_S()
{
}
FFSFollowCamProp_S::~FFSFollowCamProp_S()
{
}
Works fine when i compile.Now after this i replaced .h and .cpp file with this code
USTRUCT()
struct FFSFollowCamProp_S
{
GENERATED_USTRUCT_BODY()
FFSFollowCamProp_S()
{
}
};
.cpp
#include “Engine.h”
#include “FFSFollowCamProp_S.h”
Now when i compile i get this error:
\FFSFollowCamProp_S.h(28) : error C2146: syntax error : missing ‘;’ before identifier ‘FFSFollowCamProp_S’
\FFSFollowCamProp_S.h(28) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\FFSFollowCamProp_S.h(28) : error C2146: syntax error : missing ‘;’ before identifier ‘FFSFollowCamProp_S’
\FFSFollowCamProp_S.h(28) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
: error C2039: ‘StaticStruct’ : is not a member of ‘FFSFollowCamProp_S’
: see declaration of ‘FFSFollowCamProp_S’
error C2039: ‘StaticStruct’ : is not a member of ‘FFSFollowCamProp_S’
Can some one help me how to solve this i already searched google and checked out this links A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums but it was not clear.
Thanks,