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?