Odin Inspector 系列教程 --- Disable In Prefab Instances Attribute

Disable In Prefab Instances Attribute:用于当属性所在的组件在预制体上且预制体在Hierarchy(实例)中时,禁用属性

Odin Inspector 系列教程 --- Disable In Prefab Instances Attribute_第1张图片
using Sirenix.OdinInspector;
using UnityEngine;

public class DisableInPrefabInstancesAttributeExample : MonoBehaviour
{
    [DisableInPrefabInstances]//在hierarchy中为预制体时则禁用此属性
    public GameObject DisabledInPrefabInstances;
}

更多教程内容详见:革命性Unity 编辑器扩展工具 --- Odin Inspector 系列教程

你可能感兴趣的:(Odin Inspector 系列教程 --- Disable In Prefab Instances Attribute)