PrefabUtility.IsPartOfNonAssetPrefabInstance

切换到手册
public static bool IsPartOfNonAssetPrefabInstance (Object componentOrGameObject);

参数

componentOrGameObject要检查的对象。必须是组件或游戏对象。

返回

bool 如果对象是预制件实例(不在预制件资源内)的一部分,则返回 true。

描述

如果给定对象是预制件实例的一部分而不是资源的一部分,则返回 true。

即使预制件实例的预制件资源缺失,也将返回 true。