Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

Glyph

struct in UnityEngine.UIElements

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Encapsulates a single glyph rendered inside a TextElement mesh. A glyph is a quad made of four vertices, laid out clockwise: bottom‑left → top‑left → top‑right → bottom‑right

Each Vertex stores:

  • Position – 3‑D coordinates
  • Color – per‑vertex tint
  • UV0 (x,y) – location of the glyph in the atlas texture
  • UV2.x – index of the texture slice inside a texture‑atlas array
  • UV2.y – SDF scale (negative values indicate bold weight)

Properties

Property Description
kind What this glyph represents. See GlyphKind.
line Zero-based visual line number on which this glyph is laid out.
linkID Value of the enclosing <link=...> tag, matching PointerDownLinkTagEvent.linkID, or null when the glyph is not inside a <link> tag.
vertices Four vertices that describe the glyph’s quad in BL‑TL‑TR‑BR order.

Public Methods

Method Description
SetTints Overrides the outline and/or shadow tint for this glyph. Pass null to leave a field at the element baseline (unityTextOutlineColor / textShadow.color).
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961