MetaSoul

Loading...
Searching...
No Matches
ESBlueprintLibrary.h
Go to the documentation of this file.
1#pragma once
2
3#include "ESBlueprintLibrary.generated.h"
4
6UENUM()
7enum class EImageFormatBPType : uint8
8{
10 Invalid = 254,
11
13 PNG = 0,
14
16 JPEG,
17
19 GrayscaleJPEG,
20
22 BMP,
23
25 ICO,
26
28 EXR,
29
31 ICNS
32};
33
35UENUM(BlueprintType)
36enum ESIOCallbackType
37{
38 CALLBACK_GAME_THREAD,
39 CALLBACK_BACKGROUND_THREADPOOL,
40 CALLBACK_BACKGROUND_TASKGRAPH
41};
42
43UCLASS()
44class EMOSHAPESUBSYSTEM_API UESBlueprintLibrary : public UBlueprintFunctionLibrary
45{
46 GENERATED_BODY()
47 public:
48
49 //Conversion Nodes
50
54 UFUNCTION(BlueprintPure, meta = (DisplayName = "To String (Bytes)", BlueprintAutocast), Category = "CoreUtility|Conversion")
55 static FString Conv_BytesToString(const TArray<uint8>& InBytes);
56
60 UFUNCTION(BlueprintPure, meta = (DisplayName = "To Bytes (String)", BlueprintAutocast), Category = "CoreUtility|Conversion")
61 static TArray<uint8> Conv_StringToBytes(FString InString);
62
66 UFUNCTION(BlueprintPure, meta = (DisplayName = "To Texture2D (Bytes)", BlueprintAutocast), Category = "CoreUtility|Conversion")
67 static UTexture2D* Conv_BytesToTexture(const TArray<uint8>& InBytes);
68
72 UFUNCTION(BlueprintPure, meta = (DisplayName = "To Wav Bytes (Opus Bytes)", BlueprintAutocast), Category = "CoreUtility|Conversion")
73 static TArray<uint8> Conv_OpusBytesToWav(const TArray<uint8>& InBytes);
74
78 UFUNCTION(BlueprintPure, meta = (DisplayName = "To Opus Bytes (Wav Bytes)", BlueprintAutocast), Category = "CoreUtility|Conversion")
79 static TArray<uint8> Conv_WavBytesToOpus(const TArray<uint8>& InBytes);
80
84 UFUNCTION(BlueprintPure, meta = (DisplayName = "To SoundWave (Wav Bytes)", BlueprintAutocast), Category = "CoreUtility|Conversion")
85 static USoundWave* Conv_WavBytesToSoundWave(const TArray<uint8>& InBytes);
86
90 UFUNCTION(BlueprintPure, meta = (DisplayName = "To Bytes (SoundWave)", BlueprintAutocast), Category = "CoreUtility|Conversion")
91 static TArray<uint8> Conv_SoundWaveToWavBytes(USoundWave* SoundWave);
92
93
97 UFUNCTION(BlueprintPure, meta = (DisplayName = "To Transforms (Bytes)", BlueprintAutocast), Category = "CoreUtility|Conversion")
98 static void Conv_CompactBytesToTransforms(const TArray<uint8>& InCompactBytes, TArray<FTransform>& OutTransforms);
99
103 UFUNCTION(BlueprintPure, meta = (DisplayName = "To Transforms (Location Bytes)", BlueprintAutocast), Category = "CoreUtility|Conversion")
104 static void Conv_CompactPositionBytesToTransforms(const TArray<uint8>& InCompactBytes, TArray<FTransform>& OutTransforms);
105
109 UFUNCTION(BlueprintCallable, Category = "CoreUtility|Conversion")
110 static void SetSoundWaveFromWavBytes(USoundWaveProcedural* InSoundWave, const TArray<uint8>& InBytes);
111
115 static TFuture<UTexture2D*> Conv_BytesToTexture_Async(const TArray<uint8>& InBytes);
116
120 UFUNCTION(BlueprintPure, meta = (DisplayName = "To Bytes (Texture2D)", BlueprintAutocast), Category = "CoreUtility|Conversion")
121 static bool Conv_TextureToBytes(UTexture2D* Texture, TArray<uint8>& OutBuffer, EImageFormatBPType Format = EImageFormatBPType::PNG);
122
126 UFUNCTION(BlueprintPure, Category = "CoreUtility|Misc")
127 static FString NowUTCString();
128
132 UFUNCTION(BlueprintPure, Category = "CoreUtility|Misc")
133 static FString GetLoginId();
134
138 UFUNCTION(BlueprintPure, Category = "CoreUtility|Misc")
139 static int32 ToHashCode(const FString& String);
140
144 UFUNCTION(BlueprintCallable, Category = "CoreUtility|Misc")
145 static void MeasureTimerStart(const FString& Category = TEXT("TimeTaken"));
146
150 UFUNCTION(BlueprintCallable, Category = "CoreUtility|Misc")
151 static float MeasureTimerStop(const FString& Category = TEXT("TimeTaken"), bool bShouldLogResult = true);
152
158 UFUNCTION(BlueprintCallable, Category = "CoreUtility|Threading", meta = (WorldContext = "WorldContextObject"))
159 static void CallFunctionOnThread(const FString& Function, ESIOCallbackType ThreadType, UObject* WorldContextObject = nullptr);
160
165 UFUNCTION(BlueprintCallable, Category = "CoreUtility|Threading", meta = (Latent, LatentInfo = "LatentInfo", WorldContext = "WorldContextObject"))
166 static void CallFunctionOnThreadGraphReturn(const FString& Function, ESIOCallbackType ThreadType, struct FLatentActionInfo LatentInfo, UObject* WorldContextObject = nullptr);
167};
EImageFormatBPType
EImageFormatBPType
Definition ESBlueprintLibrary.h:8
EImageFormatBPType::ICO
@ ICO
EImageFormatBPType::GrayscaleJPEG
@ GrayscaleJPEG
EImageFormatBPType::ICNS
@ ICNS
EImageFormatBPType::Invalid
@ Invalid
EImageFormatBPType::PNG
@ PNG
EImageFormatBPType::JPEG
@ JPEG
EImageFormatBPType::BMP
@ BMP
EImageFormatBPType::EXR
@ EXR
ESIOCallbackType
ESIOCallbackType
Definition ESBlueprintLibrary.h:37
CALLBACK_GAME_THREAD
@ CALLBACK_GAME_THREAD
Definition ESBlueprintLibrary.h:38
CALLBACK_BACKGROUND_THREADPOOL
@ CALLBACK_BACKGROUND_THREADPOOL
Definition ESBlueprintLibrary.h:39
CALLBACK_BACKGROUND_TASKGRAPH
@ CALLBACK_BACKGROUND_TASKGRAPH
Definition ESBlueprintLibrary.h:40
UESBlueprintLibrary
Definition ESBlueprintLibrary.h:45
UESBlueprintLibrary::UFUNCTION
UFUNCTION(BlueprintPure, meta=(DisplayName="To String (Bytes)", BlueprintAutocast), Category="CoreUtility|Conversion") static FString Conv_BytesToString(const TArray< uint8 > &InBytes)