public void Set(CopyPlayerAchievementByIndexOptions other)
 {
     if (other != null)
     {
         m_ApiVersion     = AchievementsInterface.CopyplayerachievementbyindexApiLatest;
         UserId           = other.UserId;
         AchievementIndex = other.AchievementIndex;
     }
 }
        /// <summary>
        /// Fetches a player achievement from a given index.
        /// <seealso cref="Release" />
        /// </summary>
        /// <param name="options">Structure containing the Epic Online Services Account ID and index being accessed</param>
        /// <param name="outAchievement">The player achievement data for the given index, if it exists and is valid, use <see cref="Release" /> when finished</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the information is available and passed out in OutAchievement
        /// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
        /// <see cref="Result.NotFound" /> if the player achievement is not found
        /// <see cref="Result.InvalidProductUserID" /> if you pass an invalid user ID
        /// </returns>
        public Result CopyPlayerAchievementByIndex(CopyPlayerAchievementByIndexOptions options, out PlayerAchievement outAchievement)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <CopyPlayerAchievementByIndexOptionsInternal, CopyPlayerAchievementByIndexOptions>(ref optionsAddress, options);

            var outAchievementAddress = System.IntPtr.Zero;

            var funcResult = EOS_Achievements_CopyPlayerAchievementByIndex(InnerHandle, optionsAddress, ref outAchievementAddress);

            Helper.TryMarshalDispose(ref optionsAddress);

            if (Helper.TryMarshalGet <PlayerAchievementInternal, PlayerAchievement>(outAchievementAddress, out outAchievement))
            {
                EOS_Achievements_PlayerAchievement_Release(outAchievementAddress);
            }

            return(funcResult);
        }