美文网首页
Odin Inspector 系列教程 --- Disable

Odin Inspector 系列教程 --- Disable

作者: su9257_海澜 | 来源:发表于2019-10-12 11:20 被阅读0次

Disable In Prefabs Attribute:用于当所在的属性的组件在预制体上时,禁用组件

using Sirenix.OdinInspector;
using UnityEngine;

public class DisableInPrefabsAttributeExample : MonoBehaviour
{
    [DisableInPrefabs]//只要是预制体,就隐藏此属性,不管是否在asset还是hierarchy
    public GameObject DisabledInPrefabs;
}

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

相关文章

网友评论

      本文标题:Odin Inspector 系列教程 --- Disable

      本文链接:https://www.haomeiwen.com/subject/pwaxmctx.html