As I understand it (I am not a language mechanic) in c#, Action must return only void. So given
public void teste( String s ) {}
public int pesty( String s ) {}
Then if you have
private Action<String> xx;
You can indeed say xx = teste, but you can never say xx = pesty.
ie, there is no syntax along the lines
private Action ?int?<string> xx
In short (as far as I know, IANALM) in c# Action can only return void. (You can use “Func” if there’s one argument and one return.)
Anyways, I just noticed that if you try xx=pesty, the resulting error in Unity is in fact,
CS0407: A method or delegate string testy(string)' return type does not match delegate
void System.Action(string)’ return type
…rather than something more like “you forgot that Actions must return void, dumbass”. This perhaps suggests that maybe you CAN set a return type for Actions, in c# in Unity?
In short, is there anything I’m missing here, thanks!