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

static function GetPrefabObject(targetObject: Object): Object;
static Object GetPrefabObject(Object targetObject);
static def GetPrefabObject(targetObject as Object) as Object

Parameters

targetObjectAn object contained within a prefab object.

Description

Retrieves the enclosing prefab for any object contained within.