Hello,
I’m trying to bind the Nakama Client delegates to function callbacks in Unreal 5.2.
class NAKAMAUNREAL_API UNakamaClient : public UObject
since the client is a UObject and has the delegates defined as:
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnUserAccountInfo, const FNakamaAccount&, AccountData);
I would think that this kind of call would work (this is happening on authentication success hence the login data with vars)
Client->GetAccount(
LoginData,
FOnUserAccountInfo::CreateUObject(this, &MyClass::OnGetAccountSuccess),
FOnError::CreateUObject(this, &MyClass::OnGetAccountError)
);
using the appropriate function signatures:
UFUNCTION()
void OnGetAccountSuccess(const FNakamaAccount& AccountData);
UFUNCTION()
void OnGetAccountError(const FNakamaError& Error);
but I am getting an error
Error C2039 : 'CreateUObject': is not a member of 'FOnUserAccountInfo
I tried putting “NakamaUnreal” and “NakamaCore” in the build.cs file but no luck
What’s the correct way to write these?