IsPartOfModelPrefab(Object)
Returns true if the given object is part of a Model Prefab Asset or Model Prefab instance.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static bool IsPartOfModelPrefab(Object componentOrGameObject)
Parameters
The object to check. Must be a component or GameObject.
Returns
Type | Description |
|---|---|
| bool | True if the object is part of a Model Prefab. |
Remarks
An object is part of a Model Prefab instance if it has a Model Prefab as outermost Prefab instance root. To get the outermost Prefab instance root, use PrefabUtility.GetOutermostPrefabInstanceRoot.