UnrealVoxta 0.1.1
 
Loading...
Searching...
No Matches
AsyncVoxtaFetchThumbnail.h
Go to the documentation of this file.
1// Copyright(c) 2025 grrimgrriefer & DZnnah, see LICENSE for details.
2
3#pragma once
4#include "Kismet/BlueprintAsyncActionBase.h"
5#include "AsyncVoxtaFetchThumbnail.generated.h"
6
7class UVoxtaClient;
8
9DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FVoxtaThumbnailFetched, bool, ThumbnailAvailable, const UTexture2DDynamic*, Texture, int, Width, int, Height);
10
11UCLASS(BlueprintType, Category = "Voxta", meta = (ExposedAsyncProxy = AsyncAction))
12class UNREALVOXTA_API UAsyncVoxtaFetchThumbnail : public UBlueprintAsyncActionBase
13{
14 GENERATED_BODY()
15
16public:
17 UPROPERTY(BlueprintAssignable)
18 FVoxtaThumbnailFetched ThumbnailFetched;
19
20 UFUNCTION(BlueprintCallable, Category = "Voxta", meta = (BlueprintInternalUseOnly = "true", WorldContext = "worldContextObject"))
21 static UAsyncVoxtaFetchThumbnail* AsyncVoxtaFetchThumbnail(const UObject* worldContextObject, const FGuid& baseCharacterId);
22
23 virtual void Activate() override;
24
25private:
26 UFUNCTION()
27 void OnThumbnailFetched(bool success, const UTexture2DDynamic* texture, const FIntVector2& textureSize);
28
29 UPROPERTY()
30 const UObject* WORLD_CONTEXT = nullptr;
31
32 UPROPERTY()
33 UVoxtaClient* m_voxtaClient = nullptr;
34
35 FGuid m_baseCharacterId = FGuid();
36 bool m_isActive = false;
37};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FVoxtaThumbnailFetched, bool, ThumbnailAvailable, const UTexture2DDynamic *, Texture, int, Width, int, Height)
Definition AsyncVoxtaFetchThumbnail.h:13
FVoxtaThumbnailFetched ThumbnailFetched
Definition AsyncVoxtaFetchThumbnail.h:18
virtual void Activate() override
Definition AsyncVoxtaFetchThumbnail.cpp:16
static UAsyncVoxtaFetchThumbnail * AsyncVoxtaFetchThumbnail(const UObject *worldContextObject, const FGuid &baseCharacterId)
Definition AsyncVoxtaFetchThumbnail.cpp:7
UVoxtaClient Main public-facing subsystem for Voxta integration.
Definition VoxtaClient.h:50