public void Set(LobbySearchCopySearchResultByIndexOptions other) { if (other != null) { m_ApiVersion = LobbySearch.LobbysearchCopysearchresultbyindexApiLatest; LobbyIndex = other.LobbyIndex; } }
/// <summary> /// Short GetSearchResultCount /// </summary> /// <param name="search">LobbySearch</param> /// <param name="localUserId">Login user id</param> public static LobbyDetails CopySearchResultByIndex(this LobbySearch search, uint lobbyIndex) { var resOp = new LobbySearchCopySearchResultByIndexOptions { LobbyIndex = lobbyIndex }; var result = search.CopySearchResultByIndex(resOp, out LobbyDetails detail); if (result == Result.Success) { return(detail); } Debug.LogError($"error {DebugTools.GetClassMethodName()}:{result}"); return(null); }
/// <summary> /// <see cref="CopySearchResultByIndex" /> is used to immediately retrieve a handle to the lobby information from a given search result. /// If the call returns an <see cref="Result.Success" /> result, the out parameter, OutLobbyDetailsHandle, must be passed to <see cref="LobbyDetails.Release" /> to release the memory associated with it. /// <seealso cref="LobbySearchCopySearchResultByIndexOptions" /> /// <seealso cref="LobbyDetails.Release" /> /// </summary> /// <param name="options">Structure containing the input parameters</param> /// <param name="outLobbyDetailsHandle">out parameter used to receive the lobby details handle</param> /// <returns> /// <see cref="Result.Success" /> if the information is available and passed out in OutLobbyDetailsHandle /// <see cref="Result.InvalidParameters" /> if you pass an invalid index or a null pointer for the out parameter /// <see cref="Result.IncompatibleVersion" /> if the API version passed in is incorrect /// </returns> public Result CopySearchResultByIndex(LobbySearchCopySearchResultByIndexOptions options, out LobbyDetails outLobbyDetailsHandle) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <LobbySearchCopySearchResultByIndexOptionsInternal, LobbySearchCopySearchResultByIndexOptions>(ref optionsAddress, options); var outLobbyDetailsHandleAddress = System.IntPtr.Zero; var funcResult = EOS_LobbySearch_CopySearchResultByIndex(InnerHandle, optionsAddress, ref outLobbyDetailsHandleAddress); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryMarshalGet(outLobbyDetailsHandleAddress, out outLobbyDetailsHandle); return(funcResult); }