Version: 2017.1

TooltipAttribute

class in UnityEngine

/

继承自:PropertyAttribute

切换到手册

描述

为 Inspector 窗口中的字段指定工具提示。

\ 工具提示悬停在所添加到的类上。

下面的脚本中添加了一个 health。它向用户提供有关 health 变量的值的范围信息。建议的范围在 TooltipAttribute 字符串中提供。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { [Tooltip("Health value between 0 and 100.")] public int health = 0; }

变量

tooltip工具提示文本。

构造函数

TooltipAttribute为字段指定工具提示。

继承的成员

变量

order可选字段,用于指定多个 DecorationDrawer 应采用的绘制顺序。