文档

Unity Engine


User Manual

Script Reference

Unity Engine


CanCacheInspectorGUI(SerializedProperty)

Override this method to determine whether the inspector GUI for your property can be cached.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
警告
Deprecated. CanCacheInspectorGUI has been deprecated and is no longer used.
public virtual bool CanCacheInspectorGUI(SerializedProperty property)

Parameters

The SerializedProperty to make the custom GUI for.

Returns

Type

Description

boolWhether the drawer's UI can be cached.

Remarks

The default is true. If your UI is only using EditorGUI controls, it is cacheable. If you're using Handles, GL, or some other method to draw directly into your rect, then you should override this method and return false when your property is visible.