I have a pointer in my class like this:
UPROPERTY(ReplicatedUsing=OnRep_PawnTemplate) class UB3hPawnTemplate* mPawnTemplate;
And say I want to make that pointer into a Shared Pointer so I assume I would do something like this:
UPROPERTY(ReplicatedUsing=OnRep_PawnTemplate) TSharedPtr mPawnTemplate;
But when I do that I get the following errors (but everything still compiles/links fine):
1> G:/Rocket/B3hGame/Source/B3hGame/Classes/Player/B3hPawn.h(16) : G:/Rocket/B3hGame/Source/B3hGame/Classes/Player/B3hPawn.h(16): Error: In B3hPawn: Unrecognized type ‘TSharedPtr’
1> G:/Rocket/B3hGame/Source/B3hGame/Classes/Player/B3hPlayerController.h(13) : LogCompile:Error: Class ‘B3hPawn’ has no script to compile and is not marked intrinsic - removing from static class registration…
I’ve compiled ExampleGame which uses TSharedPtr’s without this error so I tried to make my B3hGame.h file look like ExampleGame.h as well as the Build.cs file. Is there any reason this error is happening?