2D Toolkit Forum
2D Toolkit => Support => Topic started by: NMD on February 05, 2017, 11:33:13 pm
-
Hello,
Recently updated 2dtk and am getting this error...
To updated 2dtk, like I usually do, I made a new scene, imported 2dtk, and rebuild index.
InvalidOperationException: This cannot be used during play mode.
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty (Scene scene) (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:156)
tk2dUtil.SetDirty (UnityEngine.Object object) (at Assets/[Vendor]/TK2DROOT/tk2d/Code/tk2dUtil.cs:128)
It's coming after an assignment to tk2dbasesprtie.sortingOrder.
I found another post about that particular function(tk2dUtil.SetDirty), but it does not seem to apply here. Thanks!
-
So, we were on 5.4 and somehow the update to 5.5 fixed this.
-
I am still investigating this to figure out why it was doing it in the first place. Will get back to you this week.
-
Well... lol
Just updated from 5.5 to 5.6 and getting this again.
I've rebuilt index twice, still getting this when I set a sprite sorting order...
InvalidOperationException: This cannot be used during play mode.
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty (Scene scene) (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:165)
tk2dUtil.SetDirty (UnityEngine.Object object) (at Assets/[Vendor]/TK2DROOT/tk2d/Code/tk2dUtil.cs:128)
tk2dBaseSprite.set_SortingOrder (Int32 value) (at Assets/[Vendor]/TK2DROOT/tk2d/Code/Sprites/tk2dBaseSprite.cs:183)
-
I thought I'd fixed that in the last release... I'll look again tonight. I've been fixing some 5.6 specific things, this will fit right in.
-
All of these should be fixed now, will be releasing an update.