TextMeshPro 와 TextMeshProUGUI 에 대해서

UI 를 다루는데 있어서 스크립트 상에서 TextMeshProUGUI 를 사용하는것을 접하게 되었는데, 기본적인 TextMeshPro 가 아니라
TextMeshProUGUI 를 사용하는지에 대해서 알기 위해 검색해보았고, 아래와 같은 내용을 얻을 수 있었다.
월드에 있는 오브젝트와, Canvas 에 있는 UI 에 대한것의 차이라고 이해하면 될 것 같다.


TextMeshPro와 TextMeshProUGUI는 둘 다 Unity의 TextMeshPro 패키지에서 제공되는 텍스트 렌더링 솔루션입니다. 그러나 사용되는 환경에 따라 다르게 사용됩니다.

  1. TextMeshPro:

    • TextMeshPro는 3D 텍스트에 사용됩니다. 즉, 3D 공간 내에서 텍스트를 렌더링할 때 주로 사용됩니다.
    • 주로 3D 게임 환경에서 텍스트를 표시하고자 할 때 사용됩니다.
    • 텍스트의 폰트, 스타일링, 크기 등을 세밀하게 조정할 수 있습니다.
  2. TextMeshProUGUI:

    • TextMeshProUGUI는 Unity GUI(주로 Canvas 위에 표시되는 UI 요소)에서 텍스트를 렌더링하는 데 사용됩니다.
    • Unity의 UI 시스템에서 사용되며, 주로 2D 게임의 UI 텍스트 표시에 적합합니다.
    • TextMeshProUGUI는 Unity UI의 기능과 편의성을 그대로 활용할 수 있으면서도 TextMeshPro와 유사한 풍부한 텍스트 기능을 제공합니다.

두 컴포넌트는 Rich Text Formatting, 글리프(글자의 시각적인 모양) 컨트롤, 텍스트 매쉬의 생성 및 조작, 다양한 폰트 및 스타일 옵션 등을 공통으로 제공합니다. 그러나 사용 환경에 따라 선택되어져야 합니다. 예를 들어, 3D 공간에서 텍스트를 표시해야 하는 경우 TextMeshPro를 사용하고, 2D UI에서 텍스트를 표시해야 하는 경우 TextMeshProUGUI를 사용하는 것이 일반적입니다.

Unity에서는 텍스트를 렌더링하는데 더 나은 제어와 풍부한 기능을 제공하기 위해 TextMeshPro 패키지를 사용하고 있으며, 사용자는 상황에 따라 적절한 컴포넌트를 선택하여 사용할 수 있습니다.


추가적으로 유니티 도큐멘터리 내용

유니티 doc에서의 TextMeshPro[https://docs.unity3d.com/Packages/com.unity.textmeshpro@3.0/manual/index.html]

유니티 문서를 찾아보면 아래와 같은 내용을 확인할 수 있다

Quick Start

There are two TextMesh Pro components available. The first TMP text component is of type and designed to work with the MeshRenderer. This component is an ideal replacement for the legacy TextMesh component.

To add a new text object, go to: �GameObject->3D Object->TextMeshPro Text�.

The second TMP text component is of type and designed to work with the CanvasRenderer and Canvas system. This component is an ideal replacement for the UI.Text component.

To add a new text object, go to: �GameObject->UI->TextMeshPro Text�.

You may also wish to watch this Getting Started short video which covers this topic.

We strongly recommend that you also watch the Font Asset Creation video as well as the Working with Material Presets as these two topics is also key to working and getting the most out of TextMesh Pro.

As mentionned in the Installation section of this guide, it is recommended that you import the "TMP Examples & Extras" and take the time to explore each of the examples as they provide a great overview of the functionality of the tool and the many text layout and rich text tags available in TextMesh Pro.

이 부분을 볼때에도 TextMeshProUGUI 의 경우는 CanvasRenderer 와 Canvas system 과 함께 사용하기 위해 디자인되었다고 나온다
참고하도록 하자.

  Comments,     Trackbacks