KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
FColorData.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
7#pragma once
8
9#include "CoreMinimal.h"
10#include "Engine/DataTable.h"
11#include "FColorData.generated.h"
12
17USTRUCT(BlueprintType)
18struct LATTELIBRARY_API FColorData : public FTableRowBase
19{
20 GENERATED_BODY()
21
22
23 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ColorData")
24 int32 Index = 0;
25
27 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ColorData")
28 int32 Level = 1;
29
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ColorData")
32 FString Desc;
33
35 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ColorData")
36 FString HexColor;
37
38 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ColorData")
39 FString Eng;
40
41
43 FLinearColor GetLinearColor() const
44 {
45 if (HexColor.IsEmpty())
46 {
47 return FLinearColor::White;
48 }
49
50 // '#' 있어도 없어도 처리 가능
51 FString Parsed = HexColor;
52 Parsed.RemoveFromStart(TEXT("#"));
53
54 // FColor 파싱 (6자리/8자리 자동 처리)
55 FColor SRGBColor = FColor::FromHex(Parsed);
56
57 // FLinearColor로 변환 (sRGB → Linear)
58 return FLinearColor::FromSRGBColor(SRGBColor);
59 }
60};
색상 데이터를 정의하는 구조체
Definition FColorData.h:19