2D Toolkit > Releases
2D Toolkit 2.5.7
unikronsoftware:
Updated the file above to 2.5.7.1 - fixing the build issue.
xcube:
Super!!!
Thanks :)
fsadeq:
After upgrading to this, I am getting runtime errors when changing a Sprite's sorting order:
--- Code: ---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)
--- End code ---
Any ideas? Thanks.
SengiG:
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: --- // 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
}
--- End code ---
lolpolice:
Thankyou :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version