destinationScene | Scene to instantiate the prefab in. |
GameObject The GameObject at the root of the prefab.
Returns the topmost game object that has the same prefab parent as target
.
This returns a valid result when a prefab instance object, or an object that has been disconnected from a prefab, is used. This function finds the transform associated with the input object. It will the walk up the ancestors of the transform tree as long as the transform was instantiated from the same prefab asset. Once it reaches the transform that matches the transform on the root game object of the prefab asset it will stop and returns the game object instance. This is similar to FindPrefabRoot but it also works if the prefab instance has been disconnected. This is useful if you have a disconnected prefab instance object and you want to reconnect it to the prefab asset.