文档

Unity Engine

Unity Engine

serializedObject

A SerializedObject representing the object or objects being inspected.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public SerializedObject serializedObject { get; }

Remarks

Use the serializedObject inside the Editor.OnInspectorGUI() function of a custom Editor, as described on the page about the Editor class.
Do not use the serializedObject inside OnSceneGUI or Editor.OnPreviewGUI. Use the target property directly in those callback functions instead.
Additional Resources: Editor class, SerializedObject class.