SpaceAttribute

class in UnityEngine

/

Inherits from:PropertyAttribute

Switch to Manual

Description

使用此 PropertyAttribute 可在 Inspector 中添加一些间距。

间距是通过 DecoratorDrawer 完成的。

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; }

Variables

height间距(以像素为单位)。

Constructors

SpaceAttribute使用此 DecoratorDrawer 可在 Inspector 中添加一些间距。

Inherited members

Variables

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