Version: 2022.3
public bool IsValid ();

返回

bool 如果 PresetType 有效,则返回 true。否则返回 false。

描述

检查 PresetType 是否与有效的原生类或托管的类相对应。

当 MonoScript 已从项目中移除,或者包含 MonoBehaviour 的文件已重命名并且不再与类名称匹配,或者使用 ExcludeFromPresetAttribute 显式排除了此类型时,PresetType 无效。