I have a FPS controller with a Selector component. I have a door with a Usable component. I'm having trouble with the Selector's OnSelectedUsable UnityEvent. When I set that event, I'm getting this error:
But, it looks like the usable being passed in (the wooden door with the Usable component on it) is the correct type.
If I set the OnSelect() event on the Usable itself to a custom method, that works, but I'd rather set the selector's "on select" method so that I can call the same method for every Usable.
The error thrown is:
ArgumentException: Object of type 'UnityEngine.Object' cannot be converted to type 'PixelCrushers.DialogueSystem.Usable'.
I was under the impression that when the selector selects (aka hovers) a Usable, the Unity Event calls that function and it would pass in the Usable so that I can act on it (in my case, highlight the game object).