// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "UObject/ObjectMacros.h" #include "UObject/Object.h" #include "Engine/TextureDefines.h" #include "CookerSettings.h" #include "ASTCCompressionSettings.generated.h" UENUM() enum EASTCCompressionQuality { ASTCCQ_Lowest = 0 UMETA(DisplayName = "12x12"), ASTCCQ_Low = 1 UMETA(DisplayName = "10x10"), ASTCCQ_Medium = 2 UMETA(DisplayName = "8x8"), ASTCCQ_High = 3 UMETA(DisplayName = "6x6"), ASTCCQ_Highest = 4 UMETA(DisplayName = "4x4"), ASTCCQ_MAX, }; UENUM() enum EASTCCompressionMaxSize { ASTCMS_Lowest = 0 UMETA(DisplayName = "256x256"), ASTCMS_Low = 1 UMETA(DisplayName = "512x512"), ASTCMS_Medium = 2 UMETA(DisplayName = "1024x1024"), ASTCMS_High = 3 UMETA(DisplayName = "2048x2048"), ASTCMS_Highest = 4 UMETA(DisplayName = "4096x4096"), ASTCMS_MAX, }; int32 UNREALED_API GetASTCCompressionMaxSize(EASTCCompressionMaxSize MaxSize); USTRUCT() struct UNREALED_API FASTCCompressionItem { GENERATED_USTRUCT_BODY() FASTCCompressionItem(): CookLevel(EASTCCookLevel::ASTCCL_Medium), Group(TEXTUREGROUP_World), CompressionQuality(ASTCCQ_Medium), CompressionMaxSize(ASTCMS_Medium) { } UPROPERTY() EASTCCookLevel CookLevel; UPROPERTY() TEnumAsByte Group; UPROPERTY() TEnumAsByte CompressionQuality; UPROPERTY() TEnumAsByte CompressionMaxSize; }; UCLASS(Config = ASTCCompressionSettings, defaultconfig) class UNREALED_API UASTCCompressionSettings: public UObject { GENERATED_UCLASS_BODY() public: static TEnumAsByte ASTCGroups[]; static int ASTCGroupNums; static UASTCCompressionSettings* ASTCCompressionSettingsSingleton; static UASTCCompressionSettings* GetSingleton(); static FASTCCompressionItem GetASTCCompressionItem(TextureGroup Group); static EASTCCookLevel CookLevel; static FString CookLevelStr; static void SetCookLevel(EASTCCookLevel CookLevel); static EASTCCookLevel GetCookLevel(); static FString GetCookLevelStr(); UPROPERTY(EditAnywhere, Config, Category = "ASTC Compression Settings") TArray ASTCCompressionGroups; };