- Odin Inspector 系列教程 --- Enable G
- Odin Inspector 系列教程 --- Enable I
- Odin Inspector 系列教程 --- 自定义Odin序
- Odin Inspector 系列教程 --- Toggle G
- Odin Inspector 系列教程 --- Button G
- Odin Inspector 系列教程 --- Odin Sta
- Odin Inspector 系列教程 --- RoadMap(
- Odin Inspector 系列教程 --- Foldout
- Odin Inspector 系列教程 --- Vertical
- Odin Inspector 系列教程 --- Responsi
Enable GUIAttribute特性:可以控制只有Get的属性,在Inspector中是否为可灰态的(但是依然不可编辑),不写则默认为灰态。

完整示例代码
using Sirenix.OdinInspector;
using UnityEngine;
public class EnableGUIExample : MonoBehaviour
{
[ShowInInspector]
public int GUIDisabledProperty { get { return 20; } }
[ShowInInspector, EnableGUI]
public int GUIEnabledProperty { get { return 10; } }
}
网友评论