文本和图像标签

*此内容使用人工智能(Beta)翻译,可能包含错误。若要查看英文页面,请点按 此处

标签GuiObjects,允许您在屏幕上体验中显示可自定义的文本和图像。标签有两种类型:

  • TextLabel 是一个带有文本的矩形,您可以通过可自定义的属性来设置样式。这是体验中显示文本的主要方式。

  • ImageLabel 是一个带有图像 资产 的矩形,您可以通过可自定义的属性来设置样式。加上纹理和贴花,这使您能够在体验中显示图像。

在屏幕上创建标签

屏幕上的标签对显示角色对话的图像等功能非常有用。

要在屏幕上添加标签:

  1. Explorer 窗口中,选择 StarterGui 并添加 ScreenGui

    1. 将鼠标悬停在 StarterGui 上并单击 ⊕ 按钮。上下文菜单显示。

    2. 从菜单中插入 ScreenGui

  2. 选择新的 ScreenGui 并添加标签。

    1. 将鼠标悬停在 ScreenGui 上并单击 ⊕ 按钮。上下文菜单显示。

    2. 从菜单中插入 TextLabelImageLabel

在零件面上创建标签

零件上的标签对创建广告牌、海报和墙纸等功能非常有用。

要在零件的面上添加标签:

  1. Explorer 窗口中,在零件上插入 SurfaceGui

    1. 将鼠标悬停在零件实例上并单击 ⊕ 按钮。上下文菜单显示。

    2. 从菜单中插入 SurfaceGui

  2. 选择新的 SurfaceGui 并添加标签。

    1. 将鼠标悬停在 SurfaceGui 上并单击 ⊕ 按钮。上下文菜单显示。

    2. 从菜单中插入 TextLabelImageLabel

调整 ImageLabel 属性

所有 ImageLabel 中的图像必须是已导入到 Studio 的资产。虽然图像会自动缩放以适应矩形的区域,但图像在以其原生分辨率显示时效果最佳。

您可以使用以下属性自定义图像的外观:

例如,要仅显示图像并隐藏矩形,将 BackgroundTransparency 属性设置为 1

文本过滤

Applied to various sources and inputs, text filtering prevents users from seeing inappropriate language and personally identifiable information such as phone numbers. Roblox automatically filters common text outputs such as messages that have passed through in-experience text chat, but you are responsible for filtering any displayed text that you don't have explicit control over, including 显示在文本标签上的字符/字符串.

©2026 Roblox Corporation、Roblox、Roblox 标志及 Powering Imagination 是我们在美国及其他国家或地区的注册与未注册商标。