Hi!
I’m using Unreal Engine 5.4.4.
In a project with two modules I’m getting this error in the secondary module:
C:\OpenDoorMultiplayer\Source\MultiplayerDoor\Public\DoorLeverInteract.h(7): fatal error C1083: Cannot open file: ‘DoorLeverInteract.generated.h’: No such file or directory
This is DoorLeverInteract.h
:
#pragma once
#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "DoorLeverInteract.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FLeverInteractMultiDelegate);
// This class does not need to be modified.
UINTERFACE(MinimalAPI)
class UDoorLeverInteract : public UInterface
{
GENERATED_BODY()
};
/**
*
*/
class MULTIPLAYERDOOR_API IDoorLeverInteract
{
GENERATED_BODY()
// Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:
FLeverInteractMultiDelegate LeverInteractDelegate;
};
Any advice?
I have removed the Intermediate folder, recreate the class interface from Unreal Editor.
I get the error three times in file OpenDoorCharacter.cpp. Its header file is:
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "MultiplayerDoor/Public/DoorLeverInteract.h"
#include "OpenDoorCharacter.generated.h"
UCLASS()
class OPENDOORMULTIPLAYER_API AOpenDoorCharacter : public ACharacter, public IDoorLeverInteract
Maybe the problem is that these files are on different modules and OpenDoorCharacter
can’t find file DoorLeverInteract.generated.h
and the include in DoorLeverInteract.h
should be #include "MultiplayerDoor/Public/DoorLeverInteract.generated.h"
instead of #include "DoorLeverInteract.generated.h"
.
I don’t know.
Thanks!