This documentation is for Unity SDK 1.x through 3.x. If you are using Unity SDK 4.x or above, please visit our new documentation.

Ask a Question

Ask a Question
Back to all

Can you set a parameter as optional in C#?

I have a question.
Is there any parameter attribute to set the parameter as optional in C# ?
[ClientCallable]
public async Task<S2C_SESSION_URL_WITH_TOKEN> GetSession(string passCode = "")
{
...
}

I'm going to make the parameter "passCode" as optional.