public void Set(CopyLeaderboardDefinitionByIndexOptions other) { if (other != null) { m_ApiVersion = LeaderboardsInterface.CopyleaderboarddefinitionbyindexApiLatest; LeaderboardIndex = other.LeaderboardIndex; } }
/// <summary> /// Fetches a leaderboard definition from the cache using an index. /// <seealso cref="Release" /> /// </summary> /// <param name="options">Structure containing the index being accessed.</param> /// <param name="outLeaderboardDefinition">The leaderboard 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 OutLeaderboardDefinition /// <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 CopyLeaderboardDefinitionByIndex(CopyLeaderboardDefinitionByIndexOptions options, out Definition outLeaderboardDefinition) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <CopyLeaderboardDefinitionByIndexOptionsInternal, CopyLeaderboardDefinitionByIndexOptions>(ref optionsAddress, options); var outLeaderboardDefinitionAddress = System.IntPtr.Zero; var funcResult = EOS_Leaderboards_CopyLeaderboardDefinitionByIndex(InnerHandle, optionsAddress, ref outLeaderboardDefinitionAddress); Helper.TryMarshalDispose(ref optionsAddress); if (Helper.TryMarshalGet <DefinitionInternal, Definition>(outLeaderboardDefinitionAddress, out outLeaderboardDefinition)) { EOS_Leaderboards_Definition_Release(outLeaderboardDefinitionAddress); } return(funcResult); }