Hi,
I use the editor version is 4.16.2,and visual studio 2017.
now,I change the Source code editor ->visual studio 2017,because the default is visual studio 2015.
thie issue is my editor always show the loading visual studio 2017 ,like the beneath screenshot.
then I delete the old *.sln file and regenerate visual studio project files in project file
Delete .vs, Binaries and Intermediate folders in your Game Project.
Generate solution by opening project.
In the editor go to In the editor File->Refresh VS Project.
Btw, was project created in older version? Cause V4.15+ uses Include What You Use principle, so you have to include all the headers.
Thanks a lot!
But I think the problme is the #include file.
You say " Cause V4.15+ uses Include What You Use principle, so you have to include all the headers. "
Do you know if I will use the “GetOnwer()->” what headers file should been included?
Thanks again!
Ahh I see what’s the problem. GetOwner() is method of an AActor and judging by the name (UPositionReport) your class is not AActor but UObject and what you wrote is illegal, that’s why it says error, has nothing to do with VS2017.
GetOwner() is already included when you create AActor, but you created UObject, that’s why you cannot use it. For UObject you use just GetName() such as:
FString objectName = GetName();
If you need a guidance post your code or project, cause I don’t really see why would you want name of an UObject
But,why the same code in xocde is fine?
I created this project in my mac ,then i git clone it from github.
In mac this’s fine with xcoe,I am sure the code is same.
Hmm, strange, should work. GetOwner() is also method of UActorComponent, works for me, although I only use V4.14 and VS2015 reason being this (IntelliSense gets stupid with V4.15+ ,IWYU and their minimal engine includes with CoreMinimal.h). If you ignore it and just compile it does it compile? If it does, and gives you results, just go with that…
Or try Visual Assist instead of IntelliSense (it doesn’t make much problems as IntelliSense, and you can download trial and see if it helps)