Definition of FVector takes me to CoreFwd.h and not definition of FVector - why?

Refer to animated gif.
definitionNotRight

This is visual studio 2022. I right click on FVector and go to its definition and instead of being taken to the FVector definition, I am taken to something that has nothing to do with FVector (CoreFwd.h - there is no FVector here at all)

Is there a reason why this is? Googling isn’t helping me. I don’t have this issue in C# with Visual Studio.

This is a change in UE5. FVector is actually a typedef for UE::Math::TVector<double> and that typedef is implemented via that macro.

Thanks Dan. I see - the instructor is using UE4 for this and my assumption was that he was using UE5.

Is there a documentation set or something that exists where these changes are outlined that you would recommend? I will also pursue the Googles. :slight_smile:

In FVector? There isn’t really. It’s now just a template so it can have different underlying types.

In a nutshell

template<typename T>
struct TVector
{
    T X;
    T Y;
    T Z;
    // same member functions
};

using FVector = TVector<double>;
using FVector3d = TVector<double>;
using FVector3f = TVector<float>;

So you can have different underlying T’s all with the same implementation.

Nah I meant more a document that said that FVector got changed over to the macro. It is a basic struct, so that part I understand, but you can embed behavior in structs and I wanted to be able to drill into the code.

FVector is TVector where T = double

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms