/// <summary> /// Unlocks a number of achievements for a specific player. /// </summary> /// <param name="options">Structure containing information about the achievements and the player whose achievements we're unlocking.</param> /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param> /// <param name="completionDelegate">This function is called when the unlock achievements operation completes.</param> /// <returns> /// <see cref="Result.Success" /> if the operation completes successfully /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect /// </returns> public void UnlockAchievements(UnlockAchievementsOptions options, object clientData, OnUnlockAchievementsCompleteCallback completionDelegate) { var optionsInternal = Helper.CopyProperties <UnlockAchievementsOptionsInternal>(options); var completionDelegateInternal = new OnUnlockAchievementsCompleteCallbackInternal(OnUnlockAchievementsComplete); var clientDataAddress = IntPtr.Zero; Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); EOS_Achievements_UnlockAchievements(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsInternal); }
/// <summary> /// Unlocks a number of achievements for a specific player. /// </summary> /// <param name="options">Structure containing information about the achievements and the player whose achievements we're unlocking.</param> /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param> /// <param name="completionDelegate">This function is called when the unlock achievements operation completes.</param> /// <returns> /// <see cref="Result.Success" /> if the operation completes successfully /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect /// </returns> public void UnlockAchievements(UnlockAchievementsOptions options, object clientData, OnUnlockAchievementsCompleteCallback completionDelegate) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <UnlockAchievementsOptionsInternal, UnlockAchievementsOptions>(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnUnlockAchievementsCompleteCallbackInternal(OnUnlockAchievementsCompleteCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); EOS_Achievements_UnlockAchievements(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); }
internal static extern void EOS_Achievements_UnlockAchievements(System.IntPtr handle, System.IntPtr options, System.IntPtr clientData, OnUnlockAchievementsCompleteCallbackInternal completionDelegate);
private static extern void EOS_Achievements_UnlockAchievements(IntPtr handle, ref UnlockAchievementsOptionsInternal options, IntPtr clientData, OnUnlockAchievementsCompleteCallbackInternal completionDelegate);