Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IsPartOfModelPrefab(Object)

Returns true if the given object is part of a Model Prefab Asset or Model Prefab instance.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static bool IsPartOfModelPrefab(Object componentOrGameObject)

Parameters

componentOrGameObject

The object to check. Must be a component or GameObject.

Returns

Type

Description

boolTrue 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.