/
Manifest
/
Real_Texture
Обзор
Документация
Войти
/
Manifest
/
Real_Texture
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Plugins/pixelreader/Source/PixelReader/Public/AsyncCaptureLibrary.h
97 строк
3 KB
m.samodurov
init commit for The Invaders
17 фев 2026, 04:57
17 фев 2026, 04:57
4a668d4
Код
Авторство
О чём код?
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "ImageStruct.h" #include "Async/Async.h" #include "IImageWrapper.h" #include "IImageWrapperModule.h" #include "Modules/ModuleManager.h" #include "Misc/FileHelper.h" #include "Misc/Paths.h" #include "ReadPixelsLib.h" #include "CoreMinimal.h" #include "Kismet/BlueprintAsyncActionBase.h" #include "Kismet/BlueprintFunctionLibrary.h" #include "AsyncCaptureLibrary.generated.h" // UCLASS() class PIXELREADER_API UAsyncCaptureLibrary : public UBlueprintFunctionLibrary { GENERATED_BODY() public: // Async Capture by Time. Delegated UFUNCTION(BluePrintCallable, Category = "Async Capture Library | Capture By Time. Image Delegated", meta = (WorldContext = "WorldContextObject")) static void AsyncCaptureByTimeDelegated ( FImageStructDelegate Out, USceneCaptureComponent2D* CameraCapture, E_PR_ImageFormat imFormat = E_PR_ImageFormat::PNG, int imQuality = 0 ); // Async Capture by Time with saving. Delegated UFUNCTION(BluePrintCallable, Category = "Async Capture Library | Capture By Time with Save. Image Delegated", meta = (WorldContext = "WorldContextObject")) static void AsyncCaptureByTimeWithSaveDelegated ( FImageStructDelegate Out, USceneCaptureComponent2D* CameraCapture, const FString& FileName, const FString& SubFolder, E_PR_ImageFormat imFormat = E_PR_ImageFormat::PNG, int imQuality = 0, bool bNeedSaved = true ); }; // DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnImageAsyncCaptured, FImageStruct, ImageStruct); UCLASS() class PIXELREADER_API UAsyncCaptureImageWithSaveReternedBase : public UBlueprintAsyncActionBase { GENERATED_BODY() public: UAsyncCaptureImageWithSaveReternedBase(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); UPROPERTY(BlueprintAssignable) FOnImageAsyncCaptured ImageAsyncCaptured; public: // Async Capture by Time. Return with saving UFUNCTION(BluePrintCallable, Category = "Async Capture Library | Capture by Time with Save. Image Reterned", meta = (BlueprintInternalUseOnly = "true", WorldContext = "WorldContextObject")) static UAsyncCaptureImageWithSaveReternedBase* AsyncCaptureByTimeWithSaveReterned ( UObject* WorldContextObject, USceneCaptureComponent2D* CameraCapture, const FString& FileName, const FString& SubFolder, E_PR_ImageFormat imFormat = E_PR_ImageFormat::PNG, int imQuality = 0, bool NeedSaved = true ); virtual void Activate() override; private: void ExecuteCapture(); void OnCaptureCompleted(const FImageStruct& ImageStruct = FImageStruct()); private: // ������ ��� ������� TWeakObjectPtr<USceneCaptureComponent2D> WeakCameraCapture; FString FileName; FString SubFolder; E_PR_ImageFormat ImageFormat; int ImageQuality; bool bNeedSaved; };