public override void OnInspectorGUI()
{
@object.Update();
SerializedProperty property = @object.GetIterator();
while (property.NextVisible(true))
{
using (new EditorGUI.DisabledScope("m_Script" == property.propertyPath))
{
EditorGUILayout.PropertyField(property, true);
break;
}
}
@object.ApplyModifiedProperties();
}
在OnInspectorGUI中加入这段代码即可