Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

PrefabUtility.FindRootGameObjectWithSameParentPrefab

static function FindRootGameObjectWithSameParentPrefab(target: GameObject): GameObject;
static GameObject FindRootGameObjectWithSameParentPrefab(GameObject target);
static def FindRootGameObjectWithSameParentPrefab(target as GameObject) as GameObject

Description

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