goncasmage1 / UINavigation

A UE4/5 plugin designed to help easily make UMG menus navigated by mouse, keyboard and gamepad
MIT License
209 stars 42 forks source link

Compile errors when adding new C++ class #2

Closed lotsofbugs closed 5 years ago

lotsofbugs commented 5 years ago

Hello. When I add a new C++ class, empty or not, to my game (that's using UINav) I get compile errors related to this plugin. These are the errors:

2>C:/Program Files/Epic Games/UE_4.21/Engine/Plugins/Marketplace/UINavigation/Source/UINavigation/Public/UINavInputBox.h(44) : LogCompile: Error: An explicit Category specifier is required for any property exposed to the editor or Blueprints in an Engine module. 2>C:/Program Files/Epic Games/UE_4.21/Engine/Plugins/Marketplace/UINavigation/Source/UINavigation/Public/UINavInputBox.h(49) : LogCompile: Error: An explicit Category specifier is required for any property exposed to the editor or Blueprints in an Engine module. 2>C:/Program Files/Epic Games/UE_4.21/Engine/Plugins/Marketplace/UINavigation/Source/UINavigation/Public/UINavInputBox.h(51) : LogCompile: Error: An explicit Category specifier is required for any property exposed to the editor or Blueprints in an Engine module. 2>C:/Program Files/Epic Games/UE_4.21/Engine/Plugins/Marketplace/UINavigation/Source/UINavigation/Public/UINavInputBox.h(53) : LogCompile: Error: An explicit Category specifier is required for any property exposed to the editor or Blueprints in an Engine module. 2>C:/Program Files/Epic Games/UE_4.21/Engine/Plugins/Marketplace/UINavigation/Source/UINavigation/Public/UINavInputBox.h(56) : LogCompile: Error: An explicit Category specifier is required for any property exposed to the editor or Blueprints in an Engine module. 2>C:/Program Files/Epic Games/UE_4.21/Engine/Plugins/Marketplace/UINavigation/Source/UINavigation/Public/UINavInputBox.h(59) : LogCompile: Error: An explicit Category specifier is required for any property exposed to the editor or Blueprints in an Engine module. 2>C:/Program Files/Epic Games/UE_4.21/Engine/Plugins/Marketplace/UINavigation/Source/UINavigation/Public/UINavInputComponent.h(20) : LogCompile: Error: An explicit Category specifier is required for any property exposed to the editor or Blueprints in an Engine module.

Even an empty C++ class returns this error when compiling. If I delete the newly added C++ classes, I get no more errors and I'm able to compile. I'm using UE4.21

lotsofbugs commented 5 years ago

These are the classes with erros:

UINavInputBox.h `// Fill out your copyright notice in the Description page of Project Settings.

pragma once

include "CoreMinimal.h"

include "Blueprint/UserWidget.h"

include "UINavInputBox.generated.h"

define DISPLAYERROR(Text) GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Red, FString::Printf(TEXT("%s"), *(FString(TEXT("Error in ")).Append(GetName()).Append(TEXT(": ")).Append(Text))));

/**

protected:

TArray<FKey> Keys;

TArray<bool> bUsingKeyImage = { false, false, false };

bool ShouldRegisterKey(FKey NewKey, int Index) const;
bool UpdateKeyIconForKey(int Index);
FText GetKeyName(int Index);
void CheckKeyIcon(int Index);

public:

virtual void NativeConstruct() override;

void BuildKeyMappings();
void ResetKeyMappings();
void UpdateActionKey(FInputActionKeyMapping NewAction, int Index);
void RevertToActionText(int Index);

void NotifySelected(int Index);

bool ContainsKey(FKey CompareKey) const;

UPROPERTY(EditDefaultsOnly)
    TSubclassOf<class UUINavInputComponent> InputButton_BP;

TArray<class UUINavInputComponent*> InputButtons;

UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
    class UUINavInputComponent* InputButton1;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
    class UUINavInputComponent* InputButton2;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
    class UUINavInputComponent* InputButton3;

UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
    class UTextBlock* ActionText;

UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
    class UHorizontalBox* HorizontalBox;

class UUINavInputContainer* Container;

FString ActionName;

int InputsPerAction = 2;

}; `

UINavInputComponent.h `// Fill out your copyright notice in the Description page of Project Settings.

pragma once

include "CoreMinimal.h"

include "UINavComponent.h"

include "UINavInputComponent.generated.h"

/**

public:

UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
    class UImage* InputImage;

}; `

goncasmage1 commented 5 years ago

Hi lotsofbugs (pertinent username ;) ),

I have already fixed those issues on the latest release of the plugin. Have you updated it from the Epic Games Launcher?