public void Set(CopyLeaderboardRecordByUserIdOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = LeaderboardsInterface.CopyleaderboardrecordbyuseridApiLatest;
         UserId       = other.UserId;
     }
 }
Exemple #2
0
        /// <summary>
        /// Fetches a leaderboard record from a given user ID.
        /// <seealso cref="Release" />
        /// </summary>
        /// <param name="options">Structure containing the user ID being accessed.</param>
        /// <param name="outLeaderboardRecord">The leaderboard record for the given user ID, 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 data is not found
        /// </returns>
        public Result CopyLeaderboardRecordByUserId(CopyLeaderboardRecordByUserIdOptions options, out LeaderboardRecord outLeaderboardRecord)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <CopyLeaderboardRecordByUserIdOptionsInternal, CopyLeaderboardRecordByUserIdOptions>(ref optionsAddress, options);

            var outLeaderboardRecordAddress = System.IntPtr.Zero;

            var funcResult = EOS_Leaderboards_CopyLeaderboardRecordByUserId(InnerHandle, optionsAddress, ref outLeaderboardRecordAddress);

            Helper.TryMarshalDispose(ref optionsAddress);

            if (Helper.TryMarshalGet <LeaderboardRecordInternal, LeaderboardRecord>(outLeaderboardRecordAddress, out outLeaderboardRecord))
            {
                EOS_Leaderboards_LeaderboardRecord_Release(outLeaderboardRecordAddress);
            }

            return(funcResult);
        }