指定应显示控制句柄的轴的标志。
默认情况下,所有轴都已启用。您可以使用按位操作来启用或禁用各个轴。禁用的轴已被扁平化。
using UnityEngine; using UnityEditor; using UnityEditor.IMGUI.Controls;
public class ExampleScript : MonoBehaviour { void Start() { // create a 2D box handle that only works on the x- and y-axes BoxBoundsHandle box = new BoxBoundsHandle("MyBox".GetHashCode()); box.axes = PrimitiveBoundsHandle.Axes.X | PrimitiveBoundsHandle.Axes.Y; } }