Hello Guest

Author Topic: 2D Toolkit 1.60 + patch 1  (Read 22133 times)

Neverbe

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #15 on: April 03, 2012, 11:05:34 am »
Will 1.70 beta be released on AssetStore or I will need to register my copy?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #16 on: April 03, 2012, 12:29:59 pm »
The beta will only be released here, but the final version will be on the assetstore.

Neverbe

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #17 on: April 03, 2012, 12:49:45 pm »
The beta will only be released here, but the final version will be on the assetstore.
Ok so let me know when it will be out so I can buy the current version on the asset store and then registr here for the beta.
Thank you

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #18 on: April 05, 2012, 01:37:48 pm »
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.

Code: [Select]
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):

Code: [Select]
public static void UnloadUnusedAssets () {
Object[] previousSelectedObjects = Selection.objects;
Selection.objects = new Object[0];

EditorUtility.UnloadUnusedAssets();
System.GC.Collect();

index = null;

Selection.objects = previousSelectedObjects;
}

~Cyro


Hi,
I've just looked in version 1.6 + patch 1 and these lines don't exist any more. What version are you on?

cyro_349

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #19 on: April 08, 2012, 08:01:43 pm »
Yea, looks like it was an older version, if you take a look at my other post it mentions this. Without the lines the bug is different (only happens when trying to select something in the project view while you have something selected in the hierarchy).

~Cyro

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #20 on: April 08, 2012, 08:20:28 pm »
I'll merge your changes in for the next 1.70 release - was just a bit confused that's all. Thanks.