private bool ApproveAll(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) | Certificate callback that accepts every TLS certificate. Used by IgnoreSecurityProtocol. |
private void AttemptGameLaunchedEvent() | Posts the GameLaunch analytics event now, or after the login attempt when started with /access_token. Skipped with /agones. |
private static async Task<bool> AttemptServerJoinAsync(string[] joinArgs) | Parses a server id from the /join_server argument, fetches that server from the API and joins it. |
private static async Task<bool> AttemptServerStartAsync(string[] startServerArguments) | Parses id, headless flag and port from /start_server and starts that server. Id -1 starts the local test server. |
private void Awake() | Sets the working directory to the folder above the game's data folder. |
private async void CheckVersion() | Asks IValidVersionService if this version is valid and shows a popup if not. |
private void CleanStoreCredentials() | On logout: clears the stored offline token and stops tracking credential refreshes. |
private void HandlePostLogin() | Posts the GameLaunch analytics event with the logged in user's id, if any. |
private bool HasOfflinePermissions() | True if the user has the play_offline permission. |
private void IgnoreSecurityProtocol() | Turns off TLS certificate checks for all web requests. Not called in this file. |
private static async Task<bool> JoinLocalServer() | Joins a dev server on localhost port 1757, or starts a local test if that fails and StartLocalTestOnServerJoinFail is set. |
private void OnApplicationQuit() | Empty. |
private void OnLoggedIn() | Login handler that posts the launch event. It re-adds itself to LoggedIn instead of removing itself, so it probably fires again on later logins. |
private void OnLoginAttemptFailed(string message) | Posts the launch event without a user id after a failed login, and unhooks itself. |
private static void OnStarted() | Raises the Started event. |
private static async void PostGameLaunchedEvent(int? userId = null) | Posts a GameLaunch analytics event with the source (/source flag, or Launcher), version and user id. |
private static void RegularStartupActions() | Runs once on the first login: calls RunStartupActions without the tutorial check. |
private async void Start() | Client: loads the no-internet scene if offline. Otherwise runs Startup. |
private static async Task<bool> StartLocalServer(int serverSceneIndex) | Starts a local server for the given scene index and saves the index for GetLastLaunchedSceneIndex. |
private void Startup() | Hooks login and logout handlers, checks the version and handles the launch analytics event. |
private void StoreOfflineCredentials() | If the user may play offline, stores the access token as the offline token and keeps it updated on refresh. |
private static void StoreOfflineCredentials(LoginCredentials userCredentials) | If the user may play offline, stores the access token as the offline token and keeps it updated on refresh. |
private void StoreUpdatedOfflineCredentials(LoginCredentials oldCredentials, LoginCredentials newCredentials) | Stores the new access token as the offline token when the login refreshes. |