This is pretty basic but I’m able to see the equal function in the gameobject inspector but doesn’t show with more than one parameter. Any ideas?
public void sub(int a, int b)
result = a - b;
public void equal(string st)
I guess you talk about the selection of a method in an exposed UnityEvent callback? Well, Unity only allows a single parameter for their serializable closure construct. The PersistentCall class has a single instance of the ArgumentCache class which can hold a single variable value of various types.
As you can see in the PersistantCall class when it actually creates the delegate, it only supports methods with one parameter. Since the serialization system doesn’t support polymorphism for custom serializable classes it would be way to complex to support several different parameters as they all need to be serialized.