2D Toolkit Forum

2D Toolkit => Releases => Topic started by: unikronsoftware on December 29, 2015, 12:49:14 am

Title: 2D Toolkit 2.5.5 - DO NOT DOWNLOAD
Post by: unikronsoftware on December 29, 2015, 12:49:14 am
DO NOT DOWNLOAD THIS VERSION
THERE IS A CRITICAL BUG IN IT THAT IS FIXED IN 2.5.6

Please read the migration guide before updating. 2D Toolkit 2.x is not API compatible with 1.x.
http://2dtoolkit.com/docs/2.4/migration_guide.html

Documentation available at:
http://2dtoolkit.com/docs/2.5


Be sure to run "Setup for JavaScript" after importing if you're using JavaScript/UnityScript or Boo.

What's new

Bug fixes and improvements

Title: Re: 2D Toolkit 2.5.5
Post by: kenglou.lee on December 30, 2015, 03:54:34 am
Good to see there is a new version, but i found that when I'm using Unity3d 5.3.1p1 version with 2D Toolkit 2.5.5, my Unity crashes when I just change PreMultiplied Alpha and Commit. Do you have any idea on this or do you aware of this problem?

Edit:
I think I found the reason why it crashes, in tk2dUtil.cs, I found that the "SetDirty" functions keep pointing back to itself due to the "UNITY_EDITOR" pragma, I change it to as below and it seems solve my problem.

   // Replicate old pre-5.3 behaviour
   public static void SetDirty(UnityEngine.Object @object)
   {
#if UNITY_EDITOR
      //tk2dUtil.SetDirty(@object);  //take away this as it keep pointing back to itself

#if (UNITY_5_3 || UNITY_5_4 || UNITY_5_6 || UNITY_5_7 || UNITY_5_8 || UNITY_5_9 || UNITY_6_0)
      if (!string.IsNullOrEmpty(UnityEditor.AssetDatabase.GetAssetPath(@object)))
      {
         string scenePath = UnityEditor.AssetDatabase.GetAssetOrScenePath(@object);
         var scene = UnityEditor.SceneManagement.EditorSceneManager.GetSceneByPath(scenePath);
         if (scene.IsValid())
         {
            UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(scene);
         }
      }
#else
      EditorUtility.SetDirty(@object); //added this so it still functioning for previous version.
#endif

#endif  // UNITY_EDITOR
Title: Re: 2D Toolkit 2.5.5
Post by: Rarier on December 30, 2015, 11:58:50 pm
@kenglou.lee Thank you for your fix, have the same issue while committing the sprite collection.
Title: Re: 2D Toolkit 2.5.5
Post by: TheMightyGit on December 31, 2015, 11:58:23 am
I too also get a crash when hitting Commit in any of my sprite collections ( Unity 5.3.1p1 ).

EDIT: kenglou.lee's fix seems to work, thanks :)
Title: Re: 2D Toolkit 2.5.5 - DO NOT DOWNLOAD
Post by: unikronsoftware on December 31, 2015, 01:57:18 pm
Really sorry for the issue folks :(
Released 2.5.6 that sorts it out.