Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Retrieving wrong FVector / FRotator in Unreal Eng.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sitnduck
Senior Member

47 Posts

Posted - Oct 07 2022 :  11:06:33 AM  Show Profile  Reply with Quote
Hi! This has happened to me on multiple projects, across Unreal versions, and I'm not sure if there is a good answer for it.

SOMETIMES only, auto completion for say FVector, will point to the "simple" version in:

UE_5.0\Engine\Source\Runtime\CoreUObject\Public\UObject\NoExportTypes.h

This only has .X .Y .Z as members and is no help to get assistance on complex members (e.g. Length())

In that file, there is even a comment stating:

* @note The full C++ class is located here:
Engine\Source\Runtime\Core\Public\Math\Vector.h

I can't really say what conditions make this happen or not, it's just disruptive. I tried reversing/reloading the solution etc.

Thank you for any assistance!

Francois

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Nov 14 2022 :  12:20:37 PM  Show Profile  Reply with Quote
Apologies for the slow reply. With your solution open, can you please look at:

VA Options -> C/C++ Directories

Do you have a short list of stable include directories, or do you have a long list, including many directories under your UE5 install? If VA is not picking up the UE directories properly, and adding them to this list, then that might help to explain what is going on here.

This assumes you have enabled VA's Unreal Engine support:

VA Options -> Game Development -> Enable support for Unreal Engine (UE)

zen is the art of being at one with the two'ness
Go to Top of Page

Vnep
New Member

Ukraine
8 Posts

Posted - Oct 04 2023 :  6:43:33 PM  Show Profile  Reply with Quote
There is a real problem, it appeared on UE5. It seems that in this version of the engine epics made FVector and similar types as typedef and initialized them through UE_DECLARE_LWC_TYPE macros. But it's not clear why VA sees them as simple structures in
Engine\Source\Runtime\CoreUObject\Public\UObject\NoExportTypes.h
The code in this file is not active because it has
#if !CPP
at the beginning, where
CPP = 1


VA Options -> Game Development -> Enable support for Unreal Engine (UE) enabled
Adding paths here VA Options -> C/C++ Directories does not solve the problem.

Any ideas how to fix this?

Edited by - Vnep on Oct 04 2023 7:45:54 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Oct 05 2023 :  08:33:35 AM  Show Profile  Reply with Quote
Part of the problem here is that VA is designed to parse inside of disabled code, since we assume you want VA to help you inside DEBUG code, or code for a different platform, even though that code won't compile with the current project settings.

Having said that, using UE 5.1, I am only seeing one "NoExportTypes.h" file listed in VA's Open File dialog, and it is:

C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\CoreUObject\Public\UObject\NoExportTypes.h

and it starts differently, wrapping the file in a "#if CPP" with CPP defined as 1. So it looks like this is something else that varies with different versions of Unreal Engine.

FVector is currently a known problem, with Unreal Engine 5 having renamed some types:

case=149728

I have a work around for now, while we look for a more complete solution. Can you please make a new text file in the same directory as your SLN file, called "va_stdafx.h" and then give the file the following content:

typedef UE::Math::TVector< double > FVector;
typedef UE::Math::TClipProjectionMatrix< double > FClipProjectionMatrix;
typedef UE::Math::TDualQuat< double > FDualQuat;
typedef UE::Math::TInverseRotationMatrix< double > FInverseRotationMatrix;
typedef UE::Math::TMirrorMatrix< double > FMirrorMatrix;
typedef UE::Math::TOrthoMatrix< double > FOrthoMatrix;
typedef UE::Math::TPerspectiveMatrix< double > FPerspectiveMatrix;
typedef UE::Math::TQuatRotationTranslationMatrix< double > FQuatRotationTranslationMatrix;
typedef UE::Math::TRotationAboutPointMatrix< double > FRotationAboutPointMatrix;
typedef UE::Math::TRotationMatrix< double > FRotationMatrix;
typedef UE::Math::TRotationTranslationMatrix< double > FRotationTranslationMatrix;
typedef UE::Math::TScaleMatrix< double > FScaleMatrix;
typedef UE::Math::TScaleRotationTranslationMatrix< double > FScaleRotationTranslationMatrix;
typedef UE::Math::TTranslationMatrix< double > FTranslationMatrix;


making sure that the file ends with a blank line. The file should NOT be added to your solution.

Next you need to press the button:

VA Options -> Performance -> Rebuild symbol databases

and restart your IDE.

VA checks for this file when doing a full symbol database rebuild, and the file can be used to help VA's parser with any odd or problem code that it runs into. In this case, making sure that these typedef's take priority.

I found this list of renamed symbols by doing a directory diff on UE 5 verses UE 4, but I suspect it isn't a complete list of renamed types. So please do let me know if you run into any more problem symbols like this.

zen is the art of being at one with the two'ness
Go to Top of Page

Vnep
New Member

Ukraine
8 Posts

Posted - Oct 05 2023 :  2:44:03 PM  Show Profile  Reply with Quote
This works on the FVector object itself, but for some reason it still doesn't work if I try to call static methods via FVector::. This is weird. I added some more typedefs to va_stdafx.h that I found in the engine, so it looks like this:

typedef UE::Math::TVector<float> FVector3f;
typedef UE::Math::TVector<double> FVector3d;
typedef UE::Math::TVector<double> FVector;

typedef UE::Math::TVector4<float> FVector4f;
typedef UE::Math::TVector4<double> FVector4d;
typedef UE::Math::TVector4<double> FVector4;

typedef UE::Math::TVector2<float> FVector2f;
typedef UE::Math::TVector2<double> FVector2d;
typedef UE::Math::TVector2<double> FVector2D;

typedef UE::Math::TTransform<float> FTransform3f;
typedef UE::Math::TTransform<double> FTransform3d;
typedef UE::Math::TTransform<double> FTransform;

typedef UE::Math::TRotator<float> FRotator3f;
typedef UE::Math::TRotator<double> FRotator3d;
typedef UE::Math::TRotator<double> FRotator;

typedef UE::Math::TQuat<float> FQuat4f;
typedef UE::Math::TQuat<double> FQuat4d;
typedef UE::Math::TQuat<double> FQuat;

typedef UE::Math::TPlane<float> FPlane4f;
typedef UE::Math::TPlane<double> FPlane4d;
typedef UE::Math::TPlane<double> FPlane;

typedef UE::Math::TMatrix<float> FMatrix44f;
typedef UE::Math::TMatrix<double> FMatrix44d;
typedef UE::Math::TMatrix<double> FMatrix;

typedef UE::Math::TBox<float> FBox3f;
typedef UE::Math::TBox<double> FBox3d;
typedef UE::Math::TBox<double> FBox;

typedef UE::Math::TBox2<float> FBox2f;
typedef UE::Math::TBox2<double> FBox2d;
typedef UE::Math::TBox2<double> FBox2D;

typedef UE::Math::TSphere<float> FSphere3f;
typedef UE::Math::TSphere<double> FSphere3d;
typedef UE::Math::TSphere<double> FSphere;

typedef UE::Math::TClipProjectionMatrix< double > FClipProjectionMatrix;
typedef UE::Math::TDualQuat< double > FDualQuat;
typedef UE::Math::TInverseRotationMatrix< double > FInverseRotationMatrix;
typedef UE::Math::TMirrorMatrix< double > FMirrorMatrix;
typedef UE::Math::TOrthoMatrix< double > FOrthoMatrix;
typedef UE::Math::TPerspectiveMatrix< double > FPerspectiveMatrix;
typedef UE::Math::TQuatRotationTranslationMatrix< double > FQuatRotationTranslationMatrix;
typedef UE::Math::TRotationAboutPointMatrix< double > FRotationAboutPointMatrix;
typedef UE::Math::TRotationMatrix< double > FRotationMatrix;
typedef UE::Math::TRotationTranslationMatrix< double > FRotationTranslationMatrix;
typedef UE::Math::TScaleMatrix< double > FScaleMatrix;
typedef UE::Math::TScaleRotationTranslationMatrix< double > FScaleRotationTranslationMatrix;
typedef UE::Math::TTranslationMatrix< double > FTranslationMatrix;

Edited by - Vnep on Oct 05 2023 2:45:49 PM
Go to Top of Page

Vnep
New Member

Ukraine
8 Posts

Posted - Oct 05 2023 :  2:48:41 PM  Show Profile  Reply with Quote
But either way, it's at least something. I really love the VA, thanks for what you do. I hope you find a solution to this issue soon.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Oct 06 2023 :  10:11:37 AM  Show Profile  Reply with Quote
Which version of Unreal Engine are you currently using?

Which members are you trying to call via:

FVector::

Testing this here, in UE 5.1, I am seeing a full list of members suggested just with the smaller va_stdafx.h file, so I am wondering if I am missing something here.

If we need more fixes then that is something we need to know about, but I am starting to wonder if the specific version of UE is also a factor.

zen is the art of being at one with the two'ness
Go to Top of Page

Vnep
New Member

Ukraine
8 Posts

Posted - Oct 06 2023 :  3:53:29 PM  Show Profile  Reply with Quote
VA_X64.dll file version 10.9.2502.0 built 2023.09.07
DevEnv.exe version 17.7.34031.279 Community
msenv.dll version 17.0.34031.279
Comctl32.dll version 6.10.22621.2215
Windows 11 11.0 22H2 Build 22621
20 processors (x86-64)
Language info: 1251, 0x422

UE: 5.3.1

Here's how it works for me. I hope this information helps you.
https://youtu.be/wIqVw_vGC1E
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Oct 11 2023 :  10:44:36 AM  Show Profile  Reply with Quote
Thank you for the video. That is really strange, especially since both listboxes show the VA tomato icon, so are coming from VA.

Are you able to reproduce this odd effect in a new, default UE project?

I don't think that the va_stdafx.h file is going to help with this, since regardless of the content of this file, you should be getting consistent results. Either a proper or a tiny listbox for "FVector::", not jumping between two quite different listboxes.

Are you working with IDE intellisense enabled or disabled? It is normally disabled via:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Advanced -> Disable Database = True

I am wondering if, despite the icons, one listbox could be coming from the IDE and one from VA. That still doesn't explain jumping between the two, but it would at least make a small amount of sense.

zen is the art of being at one with the two'ness
Go to Top of Page

Vnep
New Member

Ukraine
8 Posts

Posted - Oct 12 2023 :  1:06:05 PM  Show Profile  Reply with Quote
Yes, I was able to reproduce this on a new project and with Disable Database = True. The lists are definitely being called by VA, because if I turn it off - the lists are not called at all.

I discovered something, I couldn't reproduce this problem just now and haven't encountered it for a few days. But after I opened Engine\Source\Runtime\CoreUObject\Public\UObject\NoExportTypes.h, the issue appeared again.

It feels like while I was working with time VA removed the NoExportTypes.h symbols, but as soon as I opened the file again VA loaded the symbols again and the problem came back.

Edited by - Vnep on Oct 12 2023 4:22:46 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Oct 13 2023 :  05:24:08 AM  Show Profile  Reply with Quote
So far I still cannot reproduce this, and opening this file doesn't make any difference for me.

Assuming you have:

VA Options -> Coloring and Attributes -> Show system symbols in italics

turned On, are any Unreal Engine symbols being shown in italics on your system? I am wondering if VA is properly picking up your Unreal Engine install on your system.

There is a known limitation in VA, that it won�t correctly pick up the Unreal Engine directory tree if it installed outside of "C:\Program Files\", so if your UE is installed outside of this directory tree this could be a factor. If your UE is installed outside of this directory tree there is a work around I can give you that should help.

zen is the art of being at one with the two'ness
Go to Top of Page

Vnep
New Member

Ukraine
8 Posts

Posted - Oct 13 2023 :  09:30:38 AM  Show Profile  Reply with Quote
The source code of the engine is located here D:\UnrealEngine\ and the folder of the project itself has the following path D:\UnrealEngine\Arena\.

I recorded another video https://youtu.be/vAg-oJbIltM

In the first part I turn on Show system symbols in italics. Yes, some symbols became italics, but not that many, I think there should be more.

In the second part of the video we can see what happens to FVector when I switch between Engine\Source\Runtime\Runtime\Core\Public\Math\MathFwd.h and Engine\Source\Runtime\CoreUObject\Public\UObject\NoExportTypes.h.

Maybe this will help.

Edited by - Vnep on Oct 13 2023 09:32:18 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Oct 16 2023 :  07:42:39 AM  Show Profile  Reply with Quote
For many UE symbols not being shown in italics, there is a known limitation in VA, that it won�t correctly pick up the Unreal Engine directory tree if it installed outside of "C:\Program Files\"

case=149208

I have a work around for this, but it assumes that your solution is not actually inside the UE directory tree. VA makes the assumption that your solution and the stable include directories don't overlap.

For my install of UE 5.3, the install has the root directory:

F:\ProgFiles\Epic Games\UE_5.3
and to run the editor I have the exe:

F:\ProgFiles\Epic Games\UE_5.3\Engine\Binaries\Win64\UnrealEditor.exe

so I tell Windows to create a junction point, at the file system level, to make the "UE_5.3" directory appear to be located inside the "C:\Program Files\Epic Games" directory, so Windows is happy with me running the file:

C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\Win64\UnrealEditor.exe

assuming your solution and UE directory don't overlap I can explain how to do this on your system, to see if it helps with this FVector problem.

You might need to create one junction point for each of the directories inside the UE base directory, which for me are the directories:

F:\ProgFiles\Epic Games\UE_5.3\.egstoreF:\ProgFiles\Epic Games\UE_5.3\EngineF:\ProgFiles\Epic Games\UE_5.3\FeaturePacksF:\ProgFiles\Epic Games\UE_5.3\SamplesF:\ProgFiles\Epic Games\UE_5.3\Templates

zen is the art of being at one with the two'ness
Go to Top of Page

Vnep
New Member

Ukraine
8 Posts

Posted - Oct 17 2023 :  3:33:50 PM  Show Profile  Reply with Quote
I'm not quite sure what I should do with va_stdafx.h. But I tried 2 options:

1. I made mklink C:\Program Files\Epic Games\UE_5.3 <===> D:\UnrealEngine (nothing changed).

2. I did as you advise mklinks to:
C:\Program Files\Epic Games\UE_5.3\Arena <===> D:\UnrealEngine\Arena
C:\Program Files\Epic Games\UE_5.3\Engine <===> D:\UnrealEngine\Engine
C:\Program Files\Epic Games\UE_5.3\FeaturePacks <===> D:\UnrealEngine\FeaturePacks
C:\Program Files\Epic Games\UE_5.3\Samples <===> D:\UnrealEngine\Samples
C:\Program Files\Epic Games\UE_5.3\Templates <===> D:\UnrealEngine\Templates

But nothing has changed, everything works as it did before. And yes, I did rebuild the VA symbols in each method.

By the way, I noticed that I had more italics at the beginning of the VA symbol build, but after the full build it disappeared.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Oct 18 2023 :  06:26:01 AM  Show Profile  Reply with Quote
Apologies, I didn't give you the full instructions since I wasn't sure if this was an approach that would actually work for you. Once you have set up the junction points, which you obviously have, can you please run the UE editor via the junction point, so run the program:

C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\Win64\UnrealEditor.exe

and then open your solution. Now use the menu option:

Tools menu -> Refresh Visual Studio Project

now when you open the Visual Studio solution, it will use the "C:\Program Files\Epic Games\" path for the UE engine. Unfortunately this will require one more VA symbol database rebuild to take effect, but at this point VA's support for UE should be properly enabled, and the symbols should be shown in italics correctly.

FVector and the other symbols defined in the va_stdafx.h file won't be shown in italics, but for now I just want to see if this fixes the two different listboxes on "FVector::", since so far I cannot reproduce that problem here.

zen is the art of being at one with the two'ness
Go to Top of Page

Vnep
New Member

Ukraine
8 Posts

Posted - Oct 18 2023 :  5:28:55 PM  Show Profile  Reply with Quote
I found the reason why it wasn't working for me. The problem was in C/C++ Directories. VA was still getting symbols from D:\UnrealEngine\. To fix this, I updated the directories to C:\Program Files\Epic Games\UE_5.3\ and rebuilt VA Symbols.

I have a lot of italics now. And no problems with FVector, since now VA does not take symbols from NoExportTypes.h at all, just from MathFwd.h and va_stdafx.h

So that worked, thanks a lot for the help!

Edited by - Vnep on Oct 18 2023 5:30:09 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Oct 19 2023 :  05:39:31 AM  Show Profile  Reply with Quote
Thank you for the update. The idea behind the mklink's and rebuilding the solution was to make sure that VA saw Unreal Engine as living under the "C:\Program Files\" directory, so all of the UE paths being under here. We are looking to handle UE being installed somewhere else more smoothly:

case=149208

I am still surprised that this different install location caused two different listboxes for "FVector::" to appear, but it is good this has been fixed now.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000