246 B
246 B
#unity/日常积累
接口:GetCorrespondingObjectFromOriginalSource()
GameObject rootPrefab = PrefabUtility.GetCorrespondingObjectFromOriginalSource(instance.gameObject);
string rootPath = AssetDatabase.GetAssetPath(rootPrefab);