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

static function FindPrefabRoot(source: GameObject): GameObject;
static GameObject FindPrefabRoot(GameObject source);
static def FindPrefabRoot(source as GameObject) as GameObject

Description

Helper function to find the prefab root of an object (used for picking niceness).