I wonder, for cleanness in my case, if it’s possible to link a method (to an invoked UnityEvent) with an argument and still use context.
I have 0 to 9 keys that I use the same way and wondered if I could call the same method for all those keys, but with an int argument to differentiate them. But I also need to use context. And if I put only the int parameter I can use it but if I add the context in an argument it breaks: I can’t access it in the UnityEvent method dropdown.
The method:
public void PlayNumButtonAnim(int numKey, InputAction.CallbackContext context)
{
// Stuff
}
I tried to put the arguments in both orders, it doesn’t work.
Am I missing something or is it impossible?
I find it odd that it would accept an argument, be able to be set which is very useful, but then having to sacrifice context.