ドキュメント

Unity Engine

Unity Engine

HeaderAttribute

Use this PropertyAttribute to add a header above some fields in the Inspector.
読み終わるまでの所要時間 3 分最終更新 1ヶ月前

Definition

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, Inherited = true, AllowMultiple = true)]public class HeaderAttribute : PropertyAttribute

Remarks

The header is done using a DecoratorDrawer.

Examples

using UnityEngine;public class Example : MonoBehaviour{ [Header("Health Parameters")] public int health = 0; public int maxHealth = 100; [Header("Shield Parameters")] public int shield = 0; public int maxShield = 0;}

Fields

Value

Description

headerThe header text.

Constructors

Constructor

Description

HeaderAttribute(System.String)Add a header above some fields in the Inspector.

Inheritance

Inherited Members