Hey Unikron,
Sorry, I'm not sure where else to post this, but I think I've found an issue (and solution).
This bug is on a Mac (unsure if it exists on PC, but it should), but when you select a sprite/sprite collection then Command+click or shift+click (ie select an additional sprite/sprite collection), your new selection gets unselected. This seems to be an issue with tk2dEditorUtility's UnloadUnusedAssets function.
The original function clears the selected object, then sets it back to what it was after garbage collection. This only seems to work for the first selected object.
public static void UnloadUnusedAssets () {
Object previousSelectedObject = Selection.activeObject;
Selection.activeObject = null;
EditorUtility.UnloadUnusedAssets();
System.GC.Collect();
index = null;
Selection.activeObject = previousSelectedObject;
}
Swapping it to this seems to solve the issue (as it stores all objects selected, rather then just the active one):
public static void UnloadUnusedAssets () {
Object[] previousSelectedObjects = Selection.objects;
Selection.objects = new Object[0];
EditorUtility.UnloadUnusedAssets();
System.GC.Collect();
index = null;
Selection.objects = previousSelectedObjects;
}
~Cyro