zl程序教程

您现在的位置是:首页 >  其他

当前栏目

Odin Inspector 系列教程 — Indent Attribute「建议收藏」

教程 建议 收藏 系列 attribute inspector Odin Indent
2023-06-13 09:12:29 时间

大家好,又见面了,我是你们的朋友全栈君。

Indent Attribute特性:用于缩进可用于任何属性,并将属性的标签向右移动。使用它可以清楚地组织检查器中的属性。

using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class IndentAttributeExample : MonoBehaviour
{
    [Title("Nicely organize your properties.")]
    [Indent]
    public int A;

    [Indent(2)]
    public int B;

    [Indent(3)]
    public int C;

    [Indent(4)]
    public int D;

    [Title("Using the Indent attribute")]
    [Indent]
    public int E;

    [Indent(0)]
    public int F;

    [Indent(-1)]
    public int G;
}

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/162816.html原文链接:https://javaforall.cn