[UNITY] UGUI - 가변 길이 텍스트 박스

spixychz·2025년 10월 1일

Unity

목록 보기
11/14
  • 계층 구조
- Image (Image, LayoutGroup, ContentSizeFitter)
	ㄴ Text (Text)

가로로 늘어나는 텍스트 박스

Middle-Left 기준

  • Image의 Rect Transform
    • Anchor Preset
      • Top/Middle/Bottom : 자유
      • Left/Center/Right : 텍스트 박스가 늘어나는 방식
  • Image
    • Image Type : Sliced
  • Horizontal Layout Group
    • Padding : 자유
    • Child Alignment : 텍스트 오브젝트 정렬
      • Left/Center/Right는 영향 없음
    • Control Child Size : Width = true, Height = true
    • 그 외 = false
  • Content Size Fitter
    • Horizontal Fit : Preferred Size
    • Vertical Fit : Unconstrained

가로, 세로 늘어나는 텍스트 박스

Bottom-Left 기준

  • Image의 Rect Transform
    • Anchor Preset
      • Top/Middle/Bottom & Left/Centr/Right : 텍스트 박스가 늘어나는 방식
  • Image
    • Image Type : Sliced
  • Vertical Layout Group
    • Padding : 자유
    • Control Child Size : Width = true, Height = true
    • 그 외 = false
  • Content Size Fitter
    • Horizontal Fit : Preferred Size
    • Vertical Fit : Preferred Size
profile
UNITY로 게임 개발하는 사람

0개의 댓글