2D Toolkit Forum

2D Toolkit => Releases => Topic started by: unikronsoftware on May 24, 2017, 11:16:35 pm

Title: 2D Toolkit 2.5.8.1
Post by: unikronsoftware 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

Bug fixes and improvements
Title: Re: 2D Toolkit 2.5.8.1
Post by: kenglou.lee 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?
Title: Re: 2D Toolkit 2.5.8.1
Post by: jason.appx 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
}
Title: Re: 2D Toolkit 2.5.8.1
Post by: unikronsoftware on June 21, 2017, 10:59:33 am
@jason.appx - that is a bug. I'll issue an update soon.
Title: Re: 2D Toolkit 2.5.8.1
Post by: jmenossi 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!
Title: Re: 2D Toolkit 2.5.8.1
Post by: unikronsoftware 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!
Title: Re: 2D Toolkit 2.5.8.1
Post by: unikronsoftware 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.