I am trying to subclass the ExponentialHeightFog into ExponentialHeightFog so that I can change the color of the fog on the fly based on logical parameters.
I was able to subclass Actor and compile but when I try with ExponentialHeightFog, I get all sorts of errors leading me to believe the code generated in the .h and .cpp are not complete. What do I need to add to this code to make it more complete. I just want to get it compiling first.
ExponentialHeightFogColor.h
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Engine/ExponentialHeightFog.h"
#include "MyExponentialHeightFogColor.generated.h"
/**
*
*/
UCLASS()
class HEX3_API AMyExponentialHeightFogColor : public AExponentialHeightFog
{
GENERATED_BODY()
};
ExponentialHeightFogColor.cpp
// Fill out your copyright notice in the Description page of Project Settings.
#include "Hex3.h"
#include "MyExponentialHeightFogColor.h"
I know there is nothing in the .cpp but I have no idea if it needs anything. I see no mention of a constructor or anything.
Here is the compiling error:
Error 1 error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class FDefaultAllocator> &)const " (?GetLifetimeReplicatedProps@AExponentialHeightFog@@UEBAXAEAV?$TArray@VFLifetimeProperty@@VFDefaultAllocator@@@@@Z) C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Intermediate\ProjectFiles\MyExponentialHeightFogColor.cpp.obj Hex3
Error 2 error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class FDefaultAllocator> &)const " (?GetLifetimeReplicatedProps@AExponentialHeightFog@@UEBAXAEAV?$TArray@VFLifetimeProperty@@VFDefaultAllocator@@@@@Z) C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Intermediate\ProjectFiles\Hex3.generated.cpp.obj Hex3
Error 3 error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::OnRep_bEnabled(void)" (?OnRep_bEnabled@AExponentialHeightFog@@UEAAXXZ) C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Intermediate\ProjectFiles\MyExponentialHeightFogColor.cpp.obj Hex3
Error 4 error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::OnRep_bEnabled(void)" (?OnRep_bEnabled@AExponentialHeightFog@@UEAAXXZ) C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Intermediate\ProjectFiles\Hex3.generated.cpp.obj Hex3
Error 5 error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::PostInitializeComponents(void)" (?PostInitializeComponents@AExponentialHeightFog@@UEAAXXZ) C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Intermediate\ProjectFiles\MyExponentialHeightFogColor.cpp.obj Hex3
Error 6 error LNK2001: unresolved external symbol "public: virtual void __cdecl AExponentialHeightFog::PostInitializeComponents(void)" (?PostInitializeComponents@AExponentialHeightFog@@UEAAXXZ) C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Intermediate\ProjectFiles\Hex3.generated.cpp.obj Hex3
Error 7 error LNK1120: 3 unresolved externals C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Binaries\Win64\UE4Editor-Hex3-9436.dll 1 1 Hex3
Error 8 error : Failed to produce item: C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Binaries\Win64\UE4Editor-Hex3-9436.dll C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Intermediate\ProjectFiles\ERROR Hex3
Error 9 error MSB3073: The command ""C:\Program Files\Epic Games\4.6\Engine\Build\BatchFiles\Build.bat" Hex3Editor Win64 Development "C:\Users\Spaniel\Documents\Unreal Projects\Hex3\Hex3.uproject" -rocket" exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 Hex3
10 IntelliSense: identifier "FGuid" is undefined c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Core\Public\Serialization\ArchiveBase.h 561 26 Hex3
11 IntelliSense: identifier "FGuid" is undefined c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Core\Public\Serialization\ArchiveBase.h 569 18 Hex3
12 IntelliSense: identifier "FGuid" is undefined c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Core\Public\Serialization\ArchiveBase.h 770 24 Hex3
13 IntelliSense: identifier "FOnSelectedLevelsChangedEvent" is undefined c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Engine\Classes\Engine\World.h 1976 2 Hex3
14 IntelliSense: identifier "UParticleModuleEventSendToGame" is undefined c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Engine\Classes\Particles\ParticleSystemComponent.h 890 68 Hex3
15 IntelliSense: identifier "UParticleModuleEventSendToGame" is undefined c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Engine\Classes\Particles\ParticleSystemComponent.h 903 68 Hex3
16 IntelliSense: identifier "UParticleModuleEventSendToGame" is undefined c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Engine\Classes\Particles\ParticleSystemComponent.h 921 69 Hex3
17 IntelliSense: identifier "UParticleModuleEventSendToGame" is undefined c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Engine\Classes\Particles\ParticleSystemComponent.h 933 42 Hex3
18 IntelliSense: no instance of constructor "FReadSurfaceDataFlags::FReadSurfaceDataFlags" matches the argument list c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Engine\Public\UnrealClient.h 57 92 Hex3
19 IntelliSense: no instance of constructor "FReadSurfaceDataFlags::FReadSurfaceDataFlags" matches the argument list c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\Engine\Public\UnrealClient.h 65 87 Hex3
20 IntelliSense: identifier "FMeshBatchElement" is undefined c:\Program Files\Epic Games\4.6\Engine\Source\Runtime\ShaderCore\Public\VertexFactory.h 488 131 Hex3