Unity 摄像机编辑器。
这是 Unity 摄像机编辑器类。如果您要编写您自己的自定义摄像机编辑器,则可以扩展此类并重写 OnInspectorGUI 函数。
settings | 摄像机编辑器的设置。 |
CreatePreviewOverlay | Creates an Overlay preview of the selected camera. |
OnDestroy | 请参阅 ScriptableObject.OnDestroy。 |
OnDisable | 请参阅 ScriptableObject.OnDisable。 |
OnEnable | 请参阅 ScriptableObject.OnEnable。 |
OnInspectorGUI | 请参阅 Editor.OnInspectorGUI。 |
OnSceneGUI | 请参阅 Editor.OnSceneGUI。 |
hasUnsavedChanges | This property specifies whether the Editor prompts the user to save or discard unsaved changes before the Inspector gets rebuilt. |
saveChangesMessage | The message that displays to the user if they are prompted to save. |
serializedObject | 表示正在检查的一个或多个对象的 SerializedObject。 |
target | 所检查的对象。 |
targets | 正在检查的所有对象的数组。 |
hideFlags | 该对象应该隐藏、随场景一起保存还是由用户修改? |
name | 对象的名称。 |
CreateInspectorGUI | 实现此方法以创建自定义 UIElements 检视面板。 |
DiscardChanges | Discards unsaved changes to the contents of the editor. |
DrawDefaultInspector | Draws the built-in Inspector. |
DrawHeader | 调用此函数以绘制编辑器标头。 |
DrawPreview | 预览绘制的第一个入口点。 |
GetInfoString | 实现此方法以在资源预览上显示资源信息。 |
GetPreviewTitle | 如果要更改 Preview 区域的标签,可重载此方法。 |
HasPreviewGUI | 如果实现 OnPreviewGUI,可在子类中重载此方法。 |
OnInteractivePreviewGUI | 实现此方法可创建您自己的交互式自定义预览。交互式自定义预览用于检视面板和对象选择器的预览区域。 |
OnPreviewGUI | Creates a custom preview for the preview area of the Inspector, the headers of the primary Editor, and the object selector.You must implement Editor.HasPreviewGUI for this method to be called. |
OnPreviewSettings | 如果要在预览标头中显示自定义控件,可重载此方法。 |
RenderStaticPreview | 如果要渲染静态预览,可重载此方法。 |
Repaint | 重新绘制显示此编辑器的任意检视面板。 |
RequiresConstantRepaint | 检查此编辑器在其当前状态下是否需要不断重绘。 |
SaveChanges | Performs a save action on the contents of the editor. |
UseDefaultMargins | 如果您不想使用默认边距,可在子类中重载此方法以返回 false。 |
GetInstanceID | Gets the instance ID of the object. |
ToString | 返回对象的名称。 |
ShouldHideOpenButton | 返回检视面板中“open”按钮的可见性设置。 |
CreateCachedEditor | 返回时,previousEditor 是 targetObject 或 targetObjects 的编辑器。如果该编辑器已经在跟踪对象,则函数会返回,否则该函数会销毁之前的编辑器并创建一个新编辑器。 |
CreateCachedEditorWithContext | 使用上下文对象创建缓存的编辑器。 |
CreateEditor | 为 targetObject 或 targetObjects 创建自定义编辑器。 |
CreateEditorWithContext | 使用上下文对象为 targetObject 或 targetObjects 创建自定义编辑器。 |
DrawFoldoutInspector | 为 target 绘制带有折叠标头的检视面板 GUI。 |
Destroy | 移除 GameObject、组件或资源。 |
DestroyImmediate | 立即销毁对象 /obj/。强烈建议您改用 Destroy。 |
DontDestroyOnLoad | 在加载新的 Scene 时,请勿销毁 Object。 |
FindAnyObjectByType | Retrieves any active loaded object of Type type. |
FindFirstObjectByType | Retrieves the first active loaded object of Type type. |
FindObjectOfType | 返回第一个类型为 type 的已加载的激活对象。 |
FindObjectsByType | Retrieves a list of all loaded objects of Type type. |
FindObjectsOfType | Gets a list of all loaded objects of Type type. |
Instantiate | 克隆 original 对象并返回克隆对象。 |
CreateInstance | 创建脚本化对象的实例。 |
bool | 该对象是否存在? |
operator != | 比较两个对象是否引用不同的对象。 |
operator == | 比较两个对象引用,判断它们是否引用同一个对象。 |
HasFrameBounds | Validates whether custom bounds can be calculated for this Editor. |
OnGetFrameBounds | Gets custom bounds for the target of this editor. |
Awake | 当 ScriptableObject 脚本启动时调用此函数。 |
OnValidate | Editor-only function that Unity calls when the script is loaded or a value changes in the Inspector. |
Reset | 重置为默认值。 |
finishedDefaultHeaderGUI | 在绘制默认标题项之后,在绘制 Inspector 窗口的标题时引发的事件。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.