x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to use the vs2017

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 alt text

And in my vs tools ,has a problem "incomplete type is note allowed" alt text why? what should I do? Is anyone konws it ? plsease tell me ,thank you .!!!

Product Version: UE 4.16
Tags:
more ▼

asked Aug 24 '17 at 03:30 AM in C++ Programming

avatar image

Master王
3 1 2 4

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

You had Visual Studio 2015 before? If you did, do this:

1 Remove Visual Studio 2017

2.Download Total Uninstaller to remove VS2015 completely with it: https://github.com/Microsoft/VisualStudioUninstaller/releases

3.Download and install VS2017 with these included: https://docs.unrealengine.com/latest/images/Programming/Development/VisualStudioSetup/VS2017_SettingsNoInstaller.jpg

If not, you only had VS2017, retrieve old .sln file and delete folders I told you. Only folders should be deleted, not .sln file

more ▼

answered Aug 24 '17 at 07:42 AM

avatar image

phoenix[illusion]
118 8 10 15

avatar image Master王 Aug 24 '17 at 08:01 AM

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!

avatar image phoenix[illusion] Aug 24 '17 at 10:22 AM

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.

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AActor/GetOwner/index.html

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

avatar image Master王 Aug 24 '17 at 11:00 AM

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.

avatar image phoenix[illusion] Aug 24 '17 at 11:26 AM

dunno, never worked with xcode, i'm wondering how that passed too.

avatar image Master王 Aug 24 '17 at 11:54 AM

Now I create a class named TestC It's inhirt from UActorComponent alt text

alt text

And they hanv the same problem. Do you find something wrong ?

avatar image phoenix[illusion] Aug 24 '17 at 04:06 PM

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)

avatar image Master王 Aug 24 '17 at 04:19 PM

Ok, I will try it . finally thanks a lot! have a nice day

(comments are locked)
10|2000 characters needed characters left

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.

more ▼

answered Aug 24 '17 at 04:48 AM

avatar image

phoenix[illusion]
118 8 10 15

avatar image Master王 Aug 24 '17 at 07:44 AM

no,this issue is still exists,you say include all the headers?what's headers? can you give me a screenshot?

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question