How to get selected sprites from Texture asset?

Hi,

so my question is how to get selected sprites from Texture asset? I know I can get selection using something like:

Selection.GetFiltered (typeof(Object), SelectionMode.Assets);

I also found out that I can iterate all the sprites in texture:

Object[] allSprites = AssetDatabase.LoadAllAssetRepresentationsAtPath(path);

But how can I get the editor selection? Selection just shows I’ve selected a texture sheet.

Any help would be appreciated!

I actually figured this out (eventually).

If someone else needs this - here it is:

Sprite[] selSprites = Selection.GetFiltered<Sprite>(SelectionMode.Unfiltered);
4 Likes

thanks