While binding event to delegate broadcast call happening in code, I get the following error:
I think it has to do with the fact I’m returning an array, (saw fixed bugs talking about a NOTE message - not an error)
FoundSessions struct:
// Session result struct
USTRUCT(BlueprintType)
struct FRedIronSessionResult
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FName ServerName;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 Ping;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 MaxNumberOfPlayers;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 CurrentNumberOfPlayers;
FRedIronSessionResult() {}
};
The delegate declaration
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FFindSessionSuccessDelegateCall, bool, bIsSuccess, TArray<FRedIronSessionResult>, FoundSessions);
The binding inside my class (under public:)
UPROPERTY(BlueprintAssignable, Category = "Sessions|Delegates")
FFindSessionSuccessDelegateCall OnFindSessionDone;
The broadcast: (from inside one of the .cpp function)
TArray<FRedIronSessionResult> SessionResults;
OnFindSessionDone.Broadcast(false, SessionResults);
What have i done wrong?
Thanks
—edit—
Done some more checking - this is happening with every TArray I try to broadcast, not just my struct.
Is that a bug or am I using it wrong?