Hi,
I’m trying to follow along with the tutorial but I’m stuck at the USTRUCT part. I’m using Engine 4.17 while this was designed to work with 4.10 so I know there will be changes.
I keep getting the below errors:
CompilerResultsLog: Error: D:/UE4/Projects/Tanks/Source/Tanks/Tank.h(19) : LogCompile: Error: Cannot expose property to blueprints in a struct that is not a BlueprintType. TankInput.MovementInput
CompilerResultsLog: Error: D:/UE4/Projects/Tanks/Source/Tanks/Tank.h(75) : LogCompile: Error: Type ‘FTankInput’ is not supported by blueprint. Tank.TankInput
CompilerResultsLog: Error: UnrealHeaderTool failed for target ‘TanksEditor’ (platform: Win64, module info: D:\UE4\Projects\Tanks\Intermediate\Build\Win64\TanksEditor\Development\TanksEditor.uhtmanifest, exit code: OtherCompilationError (5)).
And the Code I have for the struct is:
USTRUCT()
struct FTankInput
{
GENERATED_BODY()
public:
// Sanitized movement input, usable for game logic.
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Tank Input")
FVector2D MovementInput;
void Sanitize();
void MoveX(float AxisValue);
void MoveY(float AxisValue);
private:
// Private because it's internal, raw data. Game code should never see this.
FVector2D RawMovementInput;
};
I’ve tried to go ahead to see if something changed later on in the tutorials but I am unable to find this issue. Everything I’ve searched for just returns that the UPROPERTY needs to be editable in the Blueprint, so I’ve tried to change “BlueprintReadOnly” to “BlueprintReadWrite”.