RealtimeStyleTransferRuntime/Source/LyraGame/Replays/AsyncAction_QueryReplays.h

55 lines
1.5 KiB
C
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
2022-09-13 07:18:28 +00:00
#include "Delegates/Delegate.h"
2022-05-23 18:41:30 +00:00
#include "Kismet/BlueprintAsyncActionBase.h"
2022-09-13 07:18:28 +00:00
#include "Templates/SharedPointer.h"
#include "UObject/UObjectGlobals.h"
#include "UObject/WeakObjectPtrTemplates.h"
2022-05-23 18:41:30 +00:00
#include "AsyncAction_QueryReplays.generated.h"
class APlayerController;
class INetworkReplayStreamer;
class ULyraReplayList;
2022-09-13 07:18:28 +00:00
class UObject;
struct FEnumerateStreamsResult;
struct FFrame;
2022-05-23 18:41:30 +00:00
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FQueryReplayAsyncDelegate, ULyraReplayList*, Results);
/**
* Watches for team changes in the specified player controller
*/
UCLASS()
class UAsyncAction_QueryReplays : public UBlueprintAsyncActionBase
{
GENERATED_BODY()
public:
UAsyncAction_QueryReplays(const FObjectInitializer& ObjectInitializer);
// Watches for team changes in the specified player controller
UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"))
static UAsyncAction_QueryReplays* QueryReplays(APlayerController* PlayerController);
virtual void Activate() override;
public:
// Called when the replay query completes
UPROPERTY(BlueprintAssignable)
FQueryReplayAsyncDelegate QueryComplete;
private:
void OnEnumerateStreamsComplete(const FEnumerateStreamsResult& Result);
private:
UPROPERTY()
2022-09-13 07:18:28 +00:00
TObjectPtr<ULyraReplayList> ResultList;
2022-05-23 18:41:30 +00:00
TWeakObjectPtr<APlayerController> PlayerController;
TSharedPtr<INetworkReplayStreamer> ReplayStreamer;
};