Hi guys
I’ve a problem with this declaration of delegate on my VS 2022:
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyActorTT.generated.h"
DECLARE_MULTICAST_DELEGATE_OneParam(FOnScoreChanged, float, NewScore);
UCLASS()
class TESTRTS_API AMyActorTT : public AActor
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintAssignable)
FOnScoreChanged OnScoreChange;
// Sets default values for this actor's properties
AMyActorTT();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};
This is the error: TestRTS/MyActorTT.h(16) : Error: Unrecognized type ‘FOnScoreChanged’ - type must be a UCLASS, USTRUCT, UENUM, or global delegate.
I’ve try to build solution, delete old sln and generate a new,etcc…
Some problem when use dynamic delegate.
Any solution?
Thank you!!