Steamworks.SteamUGC.CreateQueryAllUGCRequest C# (CSharp) Méthode

CreateQueryAllUGCRequest() public static méthode

Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.

public static CreateQueryAllUGCRequest ( EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage ) : UGCQueryHandle_t
eQueryType EUGCQuery
eMatchingeMatchingUGCTypeFileType EUGCMatchingUGCType
nCreatorAppID AppId_t
nConsumerAppID AppId_t
unPage uint
Résultat UGCQueryHandle_t
		public static UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage) {
			InteropHelp.TestIfAvailableClient();
			return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryAllUGCRequest(eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage);
		}

Usage Example

Exemple #1
0
        public static Task <SteamUGCDetails[]> QueryAllUGCAsync(UGCQuery eQueryType, MatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId creatorAppId, AppId consumerAppId, uint unPage)
        {
            var tcs         = new TaskCompletionSource <SteamUGCDetails[]>();
            var queryHandle = SteamUGC.CreateQueryAllUGCRequest(eQueryType, eMatchingeMatchingUGCTypeFileType, creatorAppId, consumerAppId, unPage);

            var call = SteamUGC.SendQueryUGCRequest(queryHandle);

            var callback = new CallResult <SteamUGCQueryCompleted>();

            callback.Set(call, (a, b) =>
            {
                var results = new SteamUGCDetails[a.ResultsCount];
                for (uint i = 0; i < a.ResultsCount; i++)
                {
                    SteamUGCDetails details;
                    GetQueryUGCResult(queryHandle, i, out details);
                    results[i] = details;
                }
                tcs.SetResult(results);
            });

            return(tcs.Task);
        }