public async Task StartConnection(string ip, int port) { // Initialize client G9SuperNetCoreClient = await G9SuperNetCoreClient4Unity.Initialize <GameAccount, GameSession>(GameAccount); await G9SuperNetCoreClient.StartConnection(ip, port); }
/// <summary> /// Run automatic in first time just one time /// </summary> #region Awake // ReSharper disable once UnusedMember.Local private async Task Awake() { // Run in background Application.runInBackground = true; // Screen set NeverSleep Screen.sleepTimeout = SleepTimeout.NeverSleep; // Make the game run as fast as possible Application.targetFrameRate = 60; // Initialize client G9SuperNetCoreClient = await G9SuperNetCoreClient4Unity.Initialize <ClientAccountSample, ClientSessionSample>(GameAccount); await G9SuperNetCoreClient.StartConnection(); }
private void OnEnable() { _clientTarget = target as G9SuperNetCoreClient4Unity; }