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

static function ReconnectToLastPrefab(go: GameObject): bool;
static bool ReconnectToLastPrefab(GameObject go);
static def ReconnectToLastPrefab(go as GameObject) as bool

Description

Connects the game object to the prefab that it was last connected to.

Returns true if the game object has never been a prefab instance.