Hi all, I got limited programming experience but know enough to debug with many languages. This one on the other hand has me confused with me learning C++ and I cant find any source material to better explain how to resolve the problem. I’m just trying to create a function using a C++ Actor which can then be pulled through a level blueprint and used in my Gerstner wave material to determine the height of an effected object. I found the tutorial on YouTube and I got the waves working but now I’m trying to get the buoyancy part down with the C++ required to make it work.
This only effects my .h
[[[[[Here is the code that does not contain any errors.]]]]]
UCLASS()
class BOUYANCY_API AHeightMapReader : public AActor
{
GENERATED_BODY()
UPROPERTY(Category = HeightMap, EditAnywhere)
UTextureRenderTarget2D* RenderTarget;
UFUNCTION(BlueprintCallable, Category = "HeightMap|Update")
void UpdateBuffer();
UFUNCTION(BlueprintCallable, Category = "HeightMap|Texture Helper")
FColor GetRenderTargetValue(float x, float y);
private:
TArray<FColor> ColorBuffer;
};
[[[[[Here is the code with the errors 18 to be exact.]]]]]
UCLASS()
class BOUYANCY_API AHeightMapReader : public AActor
{
GENERATED_UCLASS_BODY()
UPROPERTY(Category = HeightMap, EditAnywhere)
UTextureRenderTarget2D* RenderTarget;
UFUNCTION(BlueprintCallable, Category = "HeightMap|Update")
void UpdateBuffer();
UFUNCTION(BlueprintCallable, Category = "HeightMap|Texture Helper")
FColor GetRenderTargetValue(float x, float y);
private:
TArray<FColor> ColorBuffer;
};
The UCLASS is the only change that causes the errors, why is that?
I also cant seem to pull the function UpdateBuffer in my level blueprint. For some reason other people can use UCLASS without error so why is mine the case? Here is the link for the Tutorial:A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums
Here is the first Error I get Error 1 error LNK2019: unresolved external symbol “public: __cdecl AHeightMapReader::AHeightMapReader(class FObjectInitializer const &)” (??0AHeightMapReader@@QEAA@AEBVFObjectInitializer@@@Z) referenced in function “public: static void __cdecl AHeightMapReader::__DefaultConstructor(class FObjectInitializer const &)” (?__DefaultConstructor@AHeightMapReader@@SAXAEBVFObjectInitializer@@@Z) E:\UNREAL4\Unreal Projects\GunsBackup2\Bouyancy\Intermediate\ProjectFiles\HeightMapReader.cpp.obj Bouyancy