2D Toolkit Forum
2D Toolkit => Support => Topic started by: zeitweise on October 11, 2013, 11:46:53 pm
-
Hello,
I don't see what I am missing here: I upgraded to tk2d 2.20 final + hotfix
Now my z-ordering is broken. I figured out that using these options works: Projection: "Perspective", Sort mode: "Orthographic".
My problem: Always when I enter play mode (or when I make a build) the camera’s sort mode reverts back to "Default".
Best regards
@zeitweise
-
Hi,
This was an issue - I believe it should be fixed in 2D Toolkit 2.2.2 - please let me know if its still broken there and I'll investigate this further.
-
Hello,
thanks for the reply. I’ve updated to 2.2.2. now but unfortunately it is still broken. It does not matter if I use my old project or setup a new one.
Best regards
@zeitweise
-
Ok. I've investigated this - I will add a better fix to the next version, but for now I suggest setting it in the tk2dCamera.Start function, or your own script (you don't need tk2dCamera for a perspective camera anyway).
The older behaviour in 2.0 was leaking memory - the transparencysortmode function shouldn't be called every frame as it allocates memory. Turns out that value isn't saved in Unity, which makes the current fix not work as it should.
-
Thanks.
I manually added
void Start() {
camera.transparencySortMode = TransparencySortMode.Orthographic;
}
to tk2dCamera.cs
and that seems to work.
I am looking forward to an update but this will work for now.
Best regards
@zeitweise