CSharpMessenger Extended - parsing objects

Hello.

I’d like to use CSharpMessenger and I try to parse a parameter (custom class which inherits ScriptableObject) like this:

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class CKRecipeSlot : MonoBehaviour
{
    private Recipe _slotRecipe;

    void Awake()
    {
        GetComponent<Button> ().onClick.AddListener(ButtonClicked);
    }

    public void ButtonClicked()
    {
        Messenger.Broadcast<Recipe>(MESSENGER_MESSAGES.ActiveRecipeChanged, _slotRecipe, MessengerMode.DONT_REQUIRE_LISTENER);
    }

    public void SetSlotRecipe(Recipe recipe)
    {
        _slotRecipe = recipe;
    }
}

Now I recieve the compiler-errors:

Perhaps it is too late and I am too tired but I can not figure out this problem :).
Does anybody can help me with this issue?

The second argument needs to be an action (or essentially a delegate to a function within the Recipe class). Check this page out for more information.

I’m not familiar with Messenger.Broadcast but from the error message, looks like you just put _slotRecipe where you meant to put SetSlotRecipe.

Thanks for your reply.

I just want to parse an object to the listener but how do I do it?