Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


HeaderAttribute

Use this PropertyAttribute to add a header above some fields in the Inspector.
Read time 3 minutesLast updated 6 days ago

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