Started adding in Steam Workshop support today

Former-commit-id: 61ccb9268f557fc3b9be093fde7b157d9a926bfd
This commit is contained in:
mordentral
2017-02-23 15:58:07 -05:00
parent 7383733d45
commit fd410f8c5f
5 changed files with 310 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "OnlineSubSystemHeader.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Online.h"
#include "OnlineSubsystem.h"
#include "OnlineSessionInterface.h"
#include "AdvancedSteamWorkshopLibrary.generated.h"
//General Advanced Sessions Log
DECLARE_LOG_CATEGORY_EXTERN(AdvancedSteamWorkshopLog, Log, All);
// Using a custom struct because uint32 isn't blueprint supported and I don't want to cast to int32
// due to the size of the workshop it could end up overflowing?
USTRUCT(BlueprintType)
struct FBPSteamWorkshopID
{
GENERATED_USTRUCT_BODY()
public:
uint32 SteamWorkshopID;
FBPSteamWorkshopID()
{
}
FBPSteamWorkshopID(uint32 ID)
{
SteamWorkshopID = ID;
}
};
UCLASS()
class UAdvancedSteamWorkshopLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
//********* Steam Functions *************//
// Returns IDs for subscribed workshop items, TArray length dictates how many
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSteamWorkshop")
static TArray<FBPSteamWorkshopID> GetSubscribedWorkshopItems(int32 & NumberOfItems);
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSteamWorkshop")
static void GetNumSubscribedWorkshopItems(int32 & NumberOfItems);
};