Hello Guest

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

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
2D Toolkit 1.60 + patch 1
« on: March 28, 2012, 10:55:15 pm »
Maintenance patch fixing a few issues introduced in 1.60.

BUGFIX: Newly created sprite collections keep updating the data object until they are reopened. This results in sprites in the scene being invalidated every time the collection is committed, until the sprite collection editor is closed and reopened.
BUGFIX: Free tmp textures after geometry has been built - previous behavior shouldn't have worked, but it did in all test textures, but failed in some others.
BUGFIX: Reset build before committing. Sometimes if a build crashes or somehow fails, it will be impossible to build a sprite collection again until Unity is restarted.
« Last Edit: March 28, 2012, 10:57:30 pm by unikron »

kemp40

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #1 on: March 29, 2012, 09:58:46 am »
Thanks for the ultra fast bugfix response.
I was just about to request a bug according to the issue #1  8) Now, it all works properly after applying patch version.


Neverbe

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #2 on: March 29, 2012, 01:04:48 pm »
Any news about Tilemap editor?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #3 on: March 29, 2012, 01:19:36 pm »
Yup, now that this is out of the way, all my efforts will be directed at the tilemap editor (and the video tutorial...). This update was really a prerequisite to the tilemap editor, as the previous method didn't scale to large numbers of sprites which will be required in a tilemap. I'll have more news and a new beta of the tilemap editor posted hopefully by the end of the week.

Neverbe

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #4 on: March 29, 2012, 02:46:12 pm »
Good to know. So you'll release it in a couple of week?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #5 on: March 29, 2012, 08:58:56 pm »
Thats the idea, unless some other serious issues crop up.

cyro_349

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #6 on: March 30, 2012, 04:55:10 pm »
Hey,

Firstly, awesome job mate.

Just a random question. Throughout the code you seem to have put in:

#if (UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_4)

It's meant to be this right?

#if (UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5)

It seems as if it should be, but, I've met some programmer with random programming practices, and for all I know you have an extra UNITY_3_4 because you like to look of it  ;D

~Cyro

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #7 on: March 30, 2012, 05:29:28 pm »
HAHA. Typical cut and paste error!

Its actually correct except theres an additional UNITY_3_4 in there. That #if is meant to identify all versions of Unity prior to 3.5 as there are some new APIs introduced in 3.5.

cyro_349

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #8 on: March 30, 2012, 08:08:15 pm »
hehe, mmk, just wanted to know. Thanks for the quick reply.

~Cyro

cyro_349

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #9 on: April 02, 2012, 11:13:54 am »
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

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #10 on: April 02, 2012, 02:08:47 pm »
Cheers for the fix!

I'll get that tested and integrated for 1.70 beta 1.

cyro_349

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #11 on: April 02, 2012, 05:08:53 pm »
Alright, looks like it was an old version of the code that I was using (too many simultaneous projects, updates aren't applied and clients want changes on 6 month old projects...), the offending lines had been removed in the latest version.

Although selecting a sprite in the hierarchy then selecting something in the project deselects whatever you had selected in the project, adding those lines seems to fix that ;)

~Cyro

Neverbe

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #12 on: April 02, 2012, 05:16:05 pm »
Any news about 1.7 beta?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #13 on: April 02, 2012, 06:10:33 pm »
Yes,

I will be releasing it in the next few days, once I've tested it sufficiently. It works fine right now, but I keep finding little annoying bugs. I want to eliminate any bugs which could cause lost work before releasing it.

One feature that won't make it into the first beta is saving and loading brushes.

Neverbe

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: 2D Toolkit 1.60 + patch 1
« Reply #14 on: April 02, 2012, 06:14:58 pm »
Good to know  ;D