Closed rfadeev closed 5 years ago
Heya, thanks so much for the contribution!
I've gone ahead and fixed up that use case, we can actually use the result from AssetDatabase.GetAssetPath(obj)
which will return an empty string when obj
is an object in a scene. (b7a1105)
Summary
Check
Selection.activeTransform
to early return fromExplodeAsset
if active transform is not null. For objects selected in project view active transform is null, for objects in the scene it's not (also for objects selected in prefab view it's not null).How to reproduce exception
Open any scene and select object in the scene hierarchy. Click "Explore Asset" button and observe exception. This is caused by
ExplodeAsset
failed to load selected asset properly withassetPath
being empty string andmainObject
being null.