// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Containers/Ticker.h" #include "Subsystems/WorldSubsystem.h" #include "PocketCaptureSubsystem.generated.h" #define UE_API POCKETWORLDS_API template class TSubclassOf; class FSubsystemCollectionBase; class UObject; class UPocketCapture; class UPrimitiveComponent; struct FFrame; UCLASS(MinimalAPI, BlueprintType) class UPocketCaptureSubsystem : public UWorldSubsystem { GENERATED_BODY() public: UE_API UPocketCaptureSubsystem(); // Begin USubsystem UE_API virtual void Initialize(FSubsystemCollectionBase& Collection) override; UE_API virtual void Deinitialize() override; // End USubsystem UFUNCTION(BlueprintCallable, meta = (DeterminesOutputType = "PocketCaptureClass")) UE_API UPocketCapture* CreateThumbnailRenderer(TSubclassOf PocketCaptureClass); UFUNCTION(BlueprintCallable) UE_API void DestroyThumbnailRenderer(UPocketCapture* ThumbnailRenderer); UE_API void StreamThisFrame(TArray& PrimitiveComponents); protected: UE_API bool Tick(float DeltaTime); TArray> StreamNextFrame; TArray> StreamedLastFrameButNotNext; private: TArray> ThumbnailRenderers; FTSTicker::FDelegateHandle TickHandle; }; #undef UE_API