Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

PrefabUtility.FindRootGameObjectWithSameParentPrefab

Switch to Manual
public static GameObject FindRootGameObjectWithSameParentPrefab(GameObject target);

Parameters

Description

Returns the topmost game object that has the same prefab parent as target.