level 2
贴吧用户_5VEV9et
楼主
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
GUI.enabled = false;
EditorGUI.PropertyField(position, property, label,true);
GUI.enabled = true;
}
我想自定义Inspector面板,让字段只读,但是用了上面的代码后普通字段可以,但是数组就不行,还能增删元素,查了很多api都没找到解决方案,求求大佬
2024年08月01日 09点08分
1
{
GUI.enabled = false;
EditorGUI.PropertyField(position, property, label,true);
GUI.enabled = true;
}
我想自定义Inspector面板,让字段只读,但是用了上面的代码后普通字段可以,但是数组就不行,还能增删元素,查了很多api都没找到解决方案,求求大佬