HeaderAttribute

class in UnityEngine

/

Inherits from:PropertyAttribute

Switch to Manual

Description

使用该 PropertyAttribute 在 Inspector 中的某些字段上方添加标题。

标题使用 DecoratorDrawer 完成。

using UnityEngine;

public class Example : MonoBehaviour { [Header("Health Settings")] public int health = 0; public int maxHealth = 100;

[Header("Shield Settings")] public int shield = 0; public int maxShield = 0; }

Variables

header标题文本。

Constructors

HeaderAttribute在 Inspector 中的某些字段上方添加标题。

Inherited members

Variables

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