2D Toolkit Forum

2D Toolkit => Releases => Topic started by: unikronsoftware on December 04, 2016, 12:26:07 pm

Title: 2D Toolkit 2.5.7
Post by: unikronsoftware on December 04, 2016, 12:26:07 pm
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.7
Post by: jmenossi on December 04, 2016, 07:09:35 pm
Thanks a lot! You are great!  ;D
Title: Re: 2D Toolkit 2.5.7
Post by: oug on December 04, 2016, 08:29:16 pm
Yes! Amazing! I was just wondering when the big update would come! Thanks!!!
Title: Re: 2D Toolkit 2.5.7
Post by: Sir_Rai on December 04, 2016, 09:33:27 pm
I'm trying Unity 5.5.0f3  and I have imported the new 2D Toolkit 2.5.7 version to a new empty  project and trying to build the project causes compiler error:

Code: [Select]
Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs(225,3): error CS0103: The name `BuilderUtil' does not exist in the current context

Error building Player because scripts had compiler errors
Title: Re: 2D Toolkit 2.5.7
Post by: unikronsoftware on December 04, 2016, 10:13:00 pm
Ugh, my bad.
tk2dTileMapBuilderUtil.cs, line 4
Replace with #if true

I'll post an update later this week to fix this.
Title: Re: 2D Toolkit 2.5.7
Post by: unikronsoftware on December 04, 2016, 11:49:58 pm
Updated the file above to 2.5.7.1 - fixing the build issue.
Title: Re: 2D Toolkit 2.5.7
Post by: xcube on December 05, 2016, 06:43:05 pm
Super!!!
Thanks  :)
Title: Re: 2D Toolkit 2.5.7
Post by: fsadeq on December 08, 2016, 11:35:14 pm
After upgrading to this, I am getting runtime errors when changing a Sprite's sorting order:

Code: [Select]
InvalidOperationException: This cannot be used during play mode.
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty (Scene scene) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:156)
tk2dUtil.SetDirty (UnityEngine.Object object) (at Assets/TK2DROOT/tk2d/Code/tk2dUtil.cs:128)
tk2dBaseSprite.set_SortingOrder (Int32 value) (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dBaseSprite.cs:183)

Any ideas? Thanks.
Title: Re: 2D Toolkit 2.5.7
Post by: SengiG on December 16, 2016, 09:45:30 am
Hi, we`ve got the same problem as fsadeq on preloaded image from steam

apparently you can fix this by simply checking whether is application is in play mode tk2dUtil.cs:

Code: [Select]
// Replicate old pre-5.3 behaviour
public static void SetDirty(UnityEngine.Object @object)
{
#if UNITY_EDITOR
UnityEditor.EditorUtility.SetDirty(@object);

#if (UNITY_5_3 || UNITY_5_4 || UNITY_5_6 || UNITY_5_7 || UNITY_5_8 || UNITY_5_9 || UNITY_6_0)
string objectPath = UnityEditor.AssetDatabase.GetAssetPath(@object);
if (string.IsNullOrEmpty(objectPath))
{
string scenePath = UnityEditor.AssetDatabase.GetAssetOrScenePath(@object);
var scene = UnityEditor.SceneManagement.EditorSceneManager.GetSceneByPath(scenePath);
if (scene.IsValid())
{
    if (!Application.isPlaying) {
        UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(scene);
    }
}
}
#endif

#endif // UNITY_EDITOR
}
Title: Re: 2D Toolkit 2.5.7
Post by: lolpolice on February 09, 2017, 03:09:15 pm
Thankyou :)
Title: Re: 2D Toolkit 2.5.7
Post by: DarrickEli on May 29, 2017, 04:19:25 pm
I'm trying these legal steroids here (http://www.nationalparalegal.org/) and I have imported the new 2D Toolkit 2.5.7 version to a new empty  project and trying to build the project causes compiler error:

Hey Sengi I tried doing that but it didn't fix it.  :(