GetPrefabParent(Object)
Returns the parent asset object of source, or null if it can't be found.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static Object GetPrefabParent(Object obj)
Parameters
Returns
Type | Description |
|---|---|
| Object |
Remarks
Use this function to get a Prefab Asset object the was instantiated from. This also returns the Prefab parent if the Prefab has become disconnected, which can then be used to reconnect the Prefab.
source