diff --git a/sdks/unity/AgonesSdk.cs b/sdks/unity/AgonesSdk.cs index e202110823..b8a8bf8a77 100644 --- a/sdks/unity/AgonesSdk.cs +++ b/sdks/unity/AgonesSdk.cs @@ -91,10 +91,11 @@ private void OnApplicationQuit() /// Async method that waits to connect to the SDK Server. Will timeout /// and return false after 30 seconds. /// + /// The number of seconds to wait before timing out. Defaults to 30 seconds. /// A task that indicated whether it was successful or not - public async Task Connect() + public async Task Connect(int timeoutSeconds = 30) { - for (var i = 0; i < 30; i++) + for (var i = 0; i < timeoutSeconds; i++) { Log($"Attempting to connect...{i + 1}"); try