Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- redirector crash
- tscriptinterface
- unity
- ue4 Crash
- skill system
- 13iew
- 리디렉션 크래쉬
- 리디렉터 크래쉬
- 랜덤 맵 생성
- redirection crash
- Unreal Engine 4
- unreal engine redirection crash
- ue4 error
- UE4
- splinemeshcomponent scale
- staticmesh mobility
- UnrealEngine
- Random Map Generator
- LittleNightMare
- unreal engine skill
- Ai
- 언리얼
- UE5
- change textblock color
- Unreal Engine 5
- UE
- unreal engine
- Unreal Engine Error
- register component
- deltaTime
Archives
- Today
- Total
Class GameDev* SheepAdult
[Unreal Engine 5] Runtime에 TextBlock 색상 변경하기 (Changing Widget TextBlock Color at Runtime) 본문
Unreal Engine
[Unreal Engine 5] Runtime에 TextBlock 색상 변경하기 (Changing Widget TextBlock Color at Runtime)
SheepAdult 2024. 8. 29. 19:05검색해도 정보가 없어 작성하게 되었다.
TextBlock에 SetColorAndOpacity() 함수가 있는데 인자를 FSlateColor로 받는다. 하지만 해당 구조체는 Color를 set할 수 가 없어 엔진 코드를 들여다보니 아래와 같이 오버로딩된 생성자가 있었다.
위를 참고하여 아래와 같이 생성자를 통해 색상을 넘겨주면 된다.
void UDamageIndicatorWidget::SetDamageIndicatorTextColor(FLinearColor ColorToSet)
{
DamageIndicatorText->SetColorAndOpacity(FSlateColor(ColorToSet));
}
* 만약 위와 같이 해도 색상이 변하지 않는다면 WidgetAnimation을 통해 색상을 고정하지 않는지 확인해볼 필요가 있다.
'Unreal Engine' 카테고리의 다른 글
[Unreal Engine] Set Scale of SplineMeshComponent (0) | 2025.01.28 |
---|---|
[Unreal Engine] RegisterComponent 주의점 (0) | 2025.01.28 |
[Unreal Engine 5] MoveToLocation 반환 값을 통한 상황 판단 (EPathFollowingRequestResult) (0) | 2024.08.20 |
[Unreal Engine 5] Actor가 Spawn되기 전에 Actor 정보 세팅하기 (0) | 2024.08.04 |
[Unreal Engine 5] Interface Execute_ 시 Debug Break 에러 (0) | 2024.07.15 |