When using your “Add a Class” Wizard through UE4’s Editor, I select “Volume” as my parent class and hit “Create Class” and it loads into my solution. Without doing any modifications, I hit “Build Solution” so the class can be compiled into the game but Visual Studio will not compile with it. I’ve tried this on multiple projects, and can’t get it to extend a volume. As soon as I delete the class it compiles fine.
Error:
> 1> [15/15] link.exe
> UE4Editor-SpaceVacation.dll 1>
> Creating library
> C:\Users\Micah\Documents\Unreal
> Projects\SpaceVacation\Intermediate\Build\Win64\SpaceVacationEditor\Development\UE4Editor-SpaceVacation.lib
> and object
> C:\Users\Micah\Documents\Unreal
> Projects\SpaceVacation\Intermediate\Build\Win64\SpaceVacationEditor\Development\UE4Editor-SpaceVacation.exp
> 1>SVCameraVolume.cpp.obj : error
> LNK2001: unresolved external symbol
> "public: virtual bool __cdecl
> ABrush::IsLevelBoundsRelevant(void)const
> "
> (?IsLevelBoundsRelevant@ABrush@@UEBA_NXZ)
> 1>SpaceVacation.generated.cpp.obj :
> error LNK2019: unresolved external
> symbol "public: virtual bool __cdecl
> ABrush::IsLevelBoundsRelevant(void)const
> "
> (?IsLevelBoundsRelevant@ABrush@@UEBA_NXZ)
> referenced in function "class UClass *
> __cdecl Z_Construct_UClass_UPSA25D_BlueprintLibrary(void)"
> (?Z_Construct_UClass_UPSA25D_BlueprintLibrary@@YAPEAVUClass@@XZ)
> 1>SVCameraVolume.cpp.obj : error
> LNK2001: unresolved external symbol
> "public: virtual void __cdecl
> ABrush::CheckForErrors(void)"
> (?CheckForErrors@ABrush@@UEAAXXZ)
> 1>SpaceVacation.generated.cpp.obj :
> error LNK2019: unresolved external
> symbol "public: virtual void __cdecl
> ABrush::CheckForErrors(void)"
> (?CheckForErrors@ABrush@@UEAAXXZ)
> referenced in function "class UClass *
> __cdecl Z_Construct_UClass_UPSA25D_BlueprintLibrary(void)"
> (?Z_Construct_UClass_UPSA25D_BlueprintLibrary@@YAPEAVUClass@@XZ)
> 1>SVCameraVolume.cpp.obj : error
> LNK2001: unresolved external symbol
> "public: virtual bool __cdecl
> ABrush::IsStaticBrush(void)const "
> (?IsStaticBrush@ABrush@@UEBA_NXZ)
> 1>SpaceVacation.generated.cpp.obj :
> error LNK2019: unresolved external
> symbol "public: virtual bool __cdecl
> ABrush::IsStaticBrush(void)const "
> (?IsStaticBrush@ABrush@@UEBA_NXZ)
> referenced in function "class UClass *
> __cdecl Z_Construct_UClass_UPSA25D_BlueprintLibrary(void)"
> (?Z_Construct_UClass_UPSA25D_BlueprintLibrary@@YAPEAVUClass@@XZ)
> 1>C:\Users\Micah\Documents\Unreal
> Projects\SpaceVacation\Binaries\Win64\UE4Editor-SpaceVacation.dll
> : fatal error LNK1120: 3 unresolved
> externals
SVCameraVolume.h
#pragma once
#include "GameFramework/Volume.h"
#include "SVCameraVolume.generated.h"
/**
*
*/
UCLASS()
class SPACEVACATION_API ASVCameraVolume : public AVolume
{
GENERATED_UCLASS_BODY()
};
SVCameraVolume.cpp
#include "SpaceVacation.h"
#include "SVCameraVolume.h"
ASVCameraVolume::ASVCameraVolume(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
}