ScriptReference/PrefabUtility #335
Replies: 1 comment
-
|
Open the prefab stage from a GameObject in scene: var assetPath = PrefabUtility.GetPrefabAssetPathOfNearestInstanceRoot(gameObject);
if (assetPath != string.Empty)
{
AssetDatabase.OpenAsset(AssetDatabase.LoadAssetAtPath<GameObject>(assetPath));
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/PrefabUtility
https://docs.unity3d.com/ScriptReference/PrefabUtility.html
Beta Was this translation helpful? Give feedback.
All reactions