Unrecognized type 'void' - type must be a UCLASS, USTRUCT or UENUM

Hello dear unreal engine community, i created a function :

UPROPERTY(BlueprintCallable, Category = "Game")
    	void StartGame();

And the compiler throw me this error :

Unrecognized type ‘void’ - type must be a UCLASS, USTRUCT or UENUM

I made other functions just like this one,with same UPROPERTY and they compile without any error.
Thank you for your help.

Ok, thank you, i’m stupid :stuck_out_tongue:

Hi,

You need UFUNCTION, not UPROPERTY.

Steve

1 Like