UE 4.7 Preview 5 Generated Files still reference FVector4 as struct

When you generate your XCode project using Mac version of UE4 or UE4 Services, classes that reference FVector4 will have:

struct FVector4;

In their .generated.h file. It should be

class FVector4;

project won’t compile unless you manually change .generated.h file from struct to class

Hi ,

I’m not getting same result. I tested by created a new C++ FP project. In ProjectCharacter.h, I added

FVector4 TestVar;

It build without a compile error. Are there additional steps I need to take to get this error? Thanks!

Hmm… it was a project that was converted from 4.6, not a new project. That’s only other thing I can imagine that would impact it. I launched 4.7 preview 5, selected an existing 4.6 project, let it convert it. I got error when it tried to compile, so I had it open Xcode and got error again compiling in Xcode.

I then went and re-generated project again by right-clicking on Project file in Finder, and it didn’t fix it. Manually tweaking .generated.h file did, though

I used same setup in a 4.6.1 project and made a copy in 4.7 Preview 5, and it also compiled without error. Are generated.h files incorrect in 4.6 project as well?

No, it compiles just fine in 4.6. :-/

Hi ,

I’m not certain why this is behaving differently in 4.7 than 4.6, but it’s due to reflection proxy types in Object.h mismatching their C++ declarations in struct versus class. There is a list in UStructProperty::GetCPPTypeForwardDeclaration that you could try to edit to add FVector4 to for now to work around it, and I’ll file a bug to see if we can get that sorted in 4.7.