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 can i avoid "type UUserWidget incomplete" error in VS?

Hi there,
i try to extend the UserWidget class with my own C++ class and followed the tutorial here: https://wiki.unrealengine.com/Extend_UserWidget_for_UMG_Widgets

But i get the "red lines" in Visual Studio in my new UserWidget class with the following error: Type UUserWidget is incomplete

The header file looks like this:

 #pragma once
 #include "Blueprint/UserWidget.h"
 #include "BottomInfoUserWidget.generated.h"
 class MYGAME_API UBottomInfoUserWidget : public UUserWidget

I also included UMG, Slate and SlateCore to my Build file and added the header files to my MyGame.h file

 using UnrealBuildTool;
 public class MyGame : ModuleRules
     public MyGame(TargetInfo Target)
         PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG" });
         PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });


 #pragma once
 #include "Engine.h"
 #include "Runtime/UMG/Public/UMG.h"
 #include "Runtime/UMG/Public/UMGStyle.h"
 #include "Runtime/UMG/Public/Slate/SObjectWidget.h"
 #include "Runtime/UMG/Public/IUMGModule.h"
 #include "Runtime/UMG/Public/Blueprint/UserWidget.h"

I already saw this post here but already did everything they suggested.

The code compiles and the Editor / Game runs fine but i still get this annoying errors in visual studio. Is there something i can do about it?

EDIT: I also have the VS configuration of this link here: https://docs.unrealengine.com/latest/INT/Programming/Development/VisualStudioSetup/index.html

My IntelliSense configuration:

alt text

Product Version: UE 4.7
more ▼

asked Jun 07 '15 at 04:27 PM in C++ Programming

avatar image

25 4 8 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

So in this case it wasn't the fault of Intellisense but Resharper (Jetbrain VisualStudio Extension). When i disable Code Inspection the squiggle are gone. Unfortunately i couldn't find the setting for this particular error so i have to turn it off completely. Thanks for the help.

Your can also exclude some files from analysis to remove "wrong" errors in certain files.

more ▼

answered Jun 10 '15 at 07:30 AM

avatar image

25 4 8 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi ljms,

By "red lines" do you mean the squiggle lines where Intellisense detects errors?


I use Visual Assist, and generally have Intellisense turned off, so I don't see these squiggles. In general, any Intellisense errors can be ignored. The code that you provided is fine, and shouldn't provide any actual problems. With Intellisense enabled however, you are likely to see a large number of "errors" in the Error List.


None of these errors will prevent the project from building successfully, though. Intellisense tends to have a difficult time with large code bases, such as UE4, and the large amount of reflection that takes place in the Unreal Build Tool when building a project in Visual Studio doesn't help either. As you use the Engine, you will learn what errors are actually important, and which ones can be safely ignored.


squiggle.png (1.0 kB)
errors.png (27.1 kB)
more ▼

answered Jun 09 '15 at 09:01 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Duplicate question: intellisense errors

more ▼

answered Jun 09 '15 at 03:38 AM

avatar image

383 8 133 45

avatar image ljms Jun 09 '15 at 04:47 PM

I have the proposed visual studio configuration from this link: https://docs.unrealengine.com/latest/INT/Programming/Development/VisualStudioSetup/index.html So intellisense can't be the reason for the problem. except the documentation is not corrent anymore? I have adjusted my description.

avatar image Kory Jun 09 '15 at 05:56 PM

I see you are using GENERATED_BODY, you need to define a constructor with that (AFAIK).

avatar image ljms Jun 09 '15 at 08:45 PM

According to this post here i don't need a constructor anymore since 4.6.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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