public override void Shutdown() { if (CollectPlayerMetrics) { // Stop Metrics collection session EndPlayerSessionOptions endSessionOptions = new EndPlayerSessionOptions(); endSessionOptions.AccountId = new EndPlayerSessionOptionsAccountId() { External = LocalUserProductIdString }; Result result = MetricsInterface.EndPlayerSession(endSessionOptions); if (result == Result.Success) { Debug.LogError("Stopped Metric Session"); } } server?.Shutdown(); client?.Disconnect(); server = null; client = null; activeNode = null; Debug.Log("Transport shut down."); }
public void Set(EndPlayerSessionOptions other) { if (other != null) { m_ApiVersion = MetricsInterface.EndplayersessionApiLatest; AccountId = other.AccountId; } }
/// <summary> /// Logs the end of a game session for a local player. /// /// Call once when the game client leaves the active game session. /// Each call to BeginPlayerSession must be matched with a corresponding call to EndPlayerSession. /// </summary> /// <param name="options">Structure containing the Epic Online Services Account ID of the player whose session to end.</param> /// <returns> /// Returns <see cref="Result.Success" /> on success, or an error code if the input parameters are invalid or there was no active session for the player. /// </returns> public Result EndPlayerSession(EndPlayerSessionOptions options) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <EndPlayerSessionOptionsInternal, EndPlayerSessionOptions>(ref optionsAddress, options); var funcResult = EOS_Metrics_EndPlayerSession(InnerHandle, optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); return(funcResult); }
public override void Shutdown() { if (EOSSDKComponent.CollectPlayerMetrics) { // Stop Metrics collection session EndPlayerSessionOptions endSessionOptions = new EndPlayerSessionOptions(); endSessionOptions.AccountId = EOSSDKComponent.LocalUserAccountId; Result result = EOSSDKComponent.GetMetricsInterface().EndPlayerSession(endSessionOptions); if (result == Result.Success) { Debug.LogError("Stopped Metric Session"); } } server?.Shutdown(); client?.Disconnect(); server = null; client = null; activeNode = null; Debug.Log("Transport shut down."); }