Unity3D: default parameters in C# script
- by Heisenbug
Accordingly to this thread, it seems that default parameters aren't supported by C# script in Unity3D environment.
Declaring an optional parameter in a C# scirpt makes Mono Ide complaint about it:
void Foo(int first, int second = 10) // this line is marked as wrong inside Mono IDE
Anyway if I ignore the error message of Mono and run the script in Unity, it works without notify any error inside Unity Console.
Could anyone clarify a little bit this issue?
Particularly:
Are default parameters allowed inside C# scripts?
If yes, are they supported by all platforms?
Why Mono complains about them if the actually works?