Version: 2017.3

SpaceAttribute

class in UnityEngine

/

继承自:PropertyAttribute

切换到手册

描述

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

间距是通过 DecoratorDrawer 完成的。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public int health = 0; public int maxHealth = 100; [Space(10)] public int shield = 0; public int maxShield = 0; }

变量

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

构造函数

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

继承的成员

变量

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