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"

class "UUserWidget" not found

Hi I keep getting the same message when trying to compile a basic HUD. I'm able to make it work in other projects, but not in this one. Here's where the error keeps coming up.

 // Fill out your copyright notice in the Description page of Project Settings.
 #pragma once
 #include "GameFramework/GameModeBase.h"
 #include "Penmen.h"
 #include "HUDGameModeBase.generated.h"
 class GE_1_API AHUDGameModeBase : public AGameModeBase
     virtual void BeginPlay() override;
     virtual void Tick(float DeltaTime) override;
         TSubclassOf<class UUserWidget> HUDWidgetClass;
     class UUserWidget* CurrentWidget;
     UPROPERTY(EditAnywhere, BlueprintReadWrite)
         int32 Score;
     UPROPERTY(EditAnywhere, BlueprintReadWrite)
         float Time;
     UPROPERTY(EditAnywhere, BlueprintReadWrite)
         float Health;
     APenmen* Avatar;

I also have a phot of the error. alt text

Product Version: UE 4.15
2017-04-26.png (81.4 kB)
more ▼

asked Apr 27 '17 at 03:58 AM in C++ Programming

avatar image

Spongedart 12
1 1

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

1 answer: sort voted first

You'll need to #include UMG.h Also, ensure that you have added the UMG module as a PrivateDependencyModuleName in your project's build.cs file.

more ▼

answered Apr 28 '17 at 12:34 AM

avatar image

629 26 28 55

(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