Open
Description
Description:
Unity throws TargetParameterCountException
- when an instanced ExtEvent calls a static method with one parameter (int in my case).
- It does not throw when calling a method without parameter.
- It does not throw when the ExtEvent is set to static and is calling a static method with a parameter.
Expected:
Calling a static method with one parameter using an instance event should behave the same way as calling a static method with no parameter using an instance event.
How to reproduce:
Given the code below:
public class Test : MonoBehaviour
{
public ExtEvent voidEvent;
private void OnEnable()
{
voidEvent.Invoke();
}
public static void StaticCallNoArg()
{
Debug.Log("StaticCallNoArg");
}
public static void StaticCallOneArg(int a)
{
Debug.Log($"StaticCallOneArg {a}");
}
public void InstanceCallNoArg()
{
Debug.Log("InstanceCallNoArg");
}
public void InstanceCallOneArg(int a)
{
Debug.Log($"InstanceCallOneArg {a}");
}
}
Additional information:
- Unity 2021.3.9
- ExtEvents 1.7.0
Metadata
Metadata
Assignees
Labels
No labels