ドキュメント

Unity Engine

Unity Engine

SpaceAttribute

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

Definition

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

Remarks

The spacing is done using a DecoratorDrawer.

Examples

using UnityEngine;public class Example : MonoBehaviour{ int health = 0; int maxHealth = 100; [Space(10)] // 10 pixels of spacing here. int shield = 0; int maxShield = 0;}

Fields

Value

Description

heightThe spacing in pixels.

Constructors

Constructor

Description

SpaceAttribute()Use this DecoratorDrawer to add some spacing in the Inspector.
SpaceAttribute(System.Single)Use this DecoratorDrawer to add some spacing in the Inspector.

Inheritance

Inherited Members