Hello Guest

Author Topic: 2D Toolkit 2.5.8.1  (Read 23017 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
2D Toolkit 2.5.8.1
« on: May 24, 2017, 11:16:35 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
  • Unity 2017.1 compatibility fixes
  • Lots of bug fixes and improvements
  • Updated to work with Unity 5.6 and fixed some Unity 5.6 specific issues
  • Exported in Unity 5.3. Previous versions of Unity are no longer supported
  • Added experimental support for polygon colliders in tilemap. In the tilemap edit page, Edit > Settings > Tile Properties > Use 2D Polygon Colliders to turn this mode on.

Bug fixes and improvements
  • Fixed tilemap prefab instantiation bug
  • Fixed tk2dCamera rotation issue, added support for WSA
  • Fixed issue with some inspectors not saving changes correctly in Unity 5.3+
  • Inertial scrolling fix for scrollable area
  • Removed platform specific functionality for WebPlayer, WP8 and Flash
  • Fixed negative box collider warning
  • Fixed input field string doubling up on Android
  • Rudimentary physics stripping to remove dependencies to 2D and/or 3D physics
  • Fixed deprecation warnings for Unity 5.4 and 5.5
  • Fixed texel size when atlas texture is globally scaled 0.5x or 0.25x
  • Editor collider rebuilder script - Don't rebuild when sprites have "user defined" colliders set
  • Texture importer supports "Sprite" textures as input in Unity 5.5

kenglou.lee

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: 2D Toolkit 2.5.8.1
« Reply #1 on: June 17, 2017, 06:43:16 am »
Hi,

Recently when i try to use 2dtoolkit in Unity3d 5.6.1, i found the following message.
Quote
Use of UNITY_MATRIX_MV is detected. To transform a vertex into view space, consider using UnityObjectToViewPos for better performance

is it something that we can do to fix this?

jason.appx

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: 2D Toolkit 2.5.8.1
« Reply #2 on: June 19, 2017, 03:55:12 am »
Hi,

When using tk2d in Unity 5.5.3, I found that some components were not properly set dirty when modified. Then I found out that the SetDirty function in tk2dUtil does not have the pre-processor UNITY_5_5. Is this bug or intended?

Currently I added UNITY_5_5 to that line as a workaround.

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

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())
{
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(scene);
}
}
#endif

#endif // UNITY_EDITOR
}

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.5.8.1
« Reply #3 on: June 21, 2017, 10:59:33 am »
@jason.appx - that is a bug. I'll issue an update soon.

jmenossi

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: 2D Toolkit 2.5.8.1
« Reply #4 on: July 22, 2017, 10:34:13 pm »
Hi, I am getting some warnings with 2.5.8.1 and Unity 2017.1.0f3...

>Shader warning in 'Hidden/tk2d/EditorUtility': Use of UNITY_MATRIX_MV is detected. To transform a vertex into view space, consider using UnityObjectToViewPos for better performance.

>Assembly: 'D:/PROJECT/Assets/TK2DROOT/tk2d/Editor/tk2dSkin.dll' uses obsolete Unity API (UnityUpgradable)

And this warning:
>SendMessage cannot be called during Awake, CheckConsistency, or OnValidate UnityEngine.MeshFilter:set_sharedMesh(Mesh)
for files:
tk2dSprite:OnValidate() (118)
tk2dSlicedSprite:OnValidate() (137)
tk2dTextMesh:OnValidate() (388)

Hope this can help.
Thanks!
« Last Edit: July 23, 2017, 12:00:50 am by jmenossi »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.5.8.1
« Reply #5 on: July 23, 2017, 05:10:08 pm »
Hi there,

Code: [Select]
>Shader warning in 'Hidden/tk2d/EditorUtility': Use of UNITY_MATRIX_MV is detected. To transform a vertex into view space, consider using UnityObjectToViewPos for better performance.
This is a one off warning as far as I am aware when Unity upgrades the shader. I can't fix it with defines unfortunately as it still complains about it, and I can't fix it permanently without breaking compatibility with older versions of Unity, which is a shame. The saving grace is its an editor only shader, so it doesn't affect runtime :)

For the other 2, I shall investigate these. Thanks for reporting!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit 2.5.8.1
« Reply #6 on: July 27, 2017, 11:31:43 am »
Hi there,

Code: [Select]
>Shader warning in 'Hidden/tk2d/EditorUtility': Use of UNITY_MATRIX_MV is detected. To transform a vertex into view space, consider using UnityObjectToViewPos for better performance.
This is a one off warning as far as I am aware when Unity upgrades the shader. I can't fix it with defines unfortunately as it still complains about it, and I can't fix it permanently without breaking compatibility with older versions of Unity, which is a shame. The saving grace is its an editor only shader, so it doesn't affect runtime :)

For the other 2, I shall investigate these. Thanks for reporting!


The other 2 (OnValidate and tk2dSkin) have been resolved now and will be in the next update.