public void Set(CopyLeaderboardRecordByIndexOptions other) { if (other != null) { m_ApiVersion = LeaderboardsInterface.CopyleaderboardrecordbyindexApiLatest; LeaderboardRecordIndex = other.LeaderboardRecordIndex; } }
/// <summary> /// Fetches a leaderboard record from a given index. /// <seealso cref="Release" /> /// </summary> /// <param name="options">Structure containing the index being accessed.</param> /// <param name="outLeaderboardRecord">The leaderboard record for the given index, if it exists and is valid, use <see cref="Release" /> when finished.</param> /// <returns> /// <see cref="Result.Success" /> if the leaderboard record is available and passed out in OutLeaderboardRecord /// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter /// <see cref="Result.NotFound" /> if the leaderboard is not found /// </returns> public Result CopyLeaderboardRecordByIndex(CopyLeaderboardRecordByIndexOptions options, out LeaderboardRecord outLeaderboardRecord) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <CopyLeaderboardRecordByIndexOptionsInternal, CopyLeaderboardRecordByIndexOptions>(ref optionsAddress, options); var outLeaderboardRecordAddress = System.IntPtr.Zero; var funcResult = EOS_Leaderboards_CopyLeaderboardRecordByIndex(InnerHandle, optionsAddress, ref outLeaderboardRecordAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet <LeaderboardRecordInternal, LeaderboardRecord>(outLeaderboardRecordAddress, out outLeaderboardRecord)) { EOS_Leaderboards_LeaderboardRecord_Release(outLeaderboardRecordAddress); } return(funcResult); }