Hej, w Unrealu w żadnej klasie nie mogę niczego wpisać powyżej makra UCLASS(), podam przykład:
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/HUD.h"
#include "LearningHUD.generated.h"
UCLASS()
class ALearningHUD : public AHUD
{
GENERATED_BODY()
public:
ALearningHUD();
/** Primary draw call for the HUD */
virtual void DrawHUD() override;
private:
/** Crosshair asset pointer */
class UTexture2D* CrosshairTex;
};
UCLASS() musi być dokładnie w dziewiątej linijce, w wyniku czego nie mogę niczego zainkludować. Nawet jak wstawię pusty wiersz to wyskakuje błąd: this declaration has no storage class or type specifier.
Znalazłem podobny wątek oraz rozwiązanie.
If it compiles correctly, even when IntelliSense is complaining, do this:
Change to DevelopmentEditor configuration, compile; Change to DevelopmentGame configuration, compile. This gets IntelliSense to recompile and rescan headers and everything works fine again.
This often happens when you alter the lines in your .h code, above the declaration of UCLASS but it can affect other types too.
Udało mi się to zrobić, ale jest to mega niewygodne w pracy i nie wiem co zrobić, żeby wszystko działało normalnie.