文档

Unity Engine

Unity Engine

CreateEditorWithContext(Object[], Object, Type)

Make a custom editor for targetObject or targetObjects with a context object.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static Editor CreateEditorWithContext(Object[] targetObjects, Object context, Type editorType)

Parameters

targetObjects


context


editorType

Returns

Type

Description

Editor

Remarks

This method is identical to Editor.CreateEditor except that the SerializedObject will be created using the context object passed as parameter. This context object will be used to store and retrieve the value for ExposedReference types declared on the SerializedObject.