- Odin Inspector 系列教程 --- Hide Dup
- Odin Inspector 系列教程 --- Hide If
- Odin Inspector 系列教程 --- Hide In
- Odin Inspector 系列教程 --- Hide In
- Odin Inspector 系列教程 --- Hide In
- Odin Inspector 系列教程 --- Hide In
- Odin Inspector 系列教程 --- Hide If
- Odin Inspector 系列教程 --- Hide In
- Odin Inspector 系列教程 --- Hide Lab
- Odin Inspector 系列教程 --- 自定义Odin序
HideDuplicateReferenceBox
using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HideDuplicateReferenceBoxAttributeExample : MonoBehaviour
{
[ShowInInspector]
public ReferenceTypeClass firstObject;
[ShowInInspector]
public ReferenceTypeClass withReferenceBox;
[ShowInInspector]
[HideDuplicateReferenceBox]
public ReferenceTypeClass withoutReferenceBox;
[Button("初始化",ButtonSizes.Large)]
public void Setup()
{
this.firstObject = new ReferenceTypeClass();
this.withReferenceBox = this.firstObject;
this.withoutReferenceBox = this.firstObject;
this.firstObject.recursiveReference = this.firstObject;
}
public partial class ReferenceTypeClass
{
[HideDuplicateReferenceBox]
public ReferenceTypeClass recursiveReference;
}
}
网友评论