My Transparency Sort mode only won't work in game view!
I'm making a 2.5D game in unity, and I've done everything from sorting layers to manually changing the z axis, but nothing has worked. I've set the transparency mode to custom, and the sort axes to X: 0, Y: 1, Z: 1, as well as just Y: 1. I have the pivot points of all of the enemy and player sprites set to the bottom center, as well as having turned the sprite sort points all to pivot in the spriterenderer. I don't understand why the player shows up in front of the enemy at all times in the game view, while the rendering order works correctly only in the scene view.
@$$anonymous$$ortalVegetable are you using any asset like Ferr2D? Some assets overrides TransparencySort$$anonymous$$ode, in my case Ferr2D overrides to Ortographic, you may find that line and change it to CustomAxis.
Answer by blu3drag0n · May 05 at 09:38 PM
I found out that the issue is with the Tilemaps rendering mode "chunk". You need to set it to "individual" then it will work :-) But be aware that "individual" render mode for tilemaps can harm your performance, so it depends. If the performance won't do well for you you need to use multiple layers and use sort order. KR
Answer by kdeger · Jan 08, 2020 at 09:06 AM
@MortalVegetable Had the same problem, I hope you found a solution already. I fixed this issue with a non-convenient way. The graphic transparency axis settings doesn't apply on my camera, the scene view looks fine (sorting via Y axis) but the game still looks the same. So I hardcoded the properties on Start() function;
GetComponent<Camera>().transparencySortMode = TransparencySortMode.CustomAxis;
GetComponent<Camera>().transparencySortAxis = new Vector3(0, 1, 0);
This works fine for me but I had to call this script on every start of each scene.
Hope this will help on someone who will have the same problem.
Answer by Kaldrin · Nov 25, 2020 at 07:07 PM
I'm having a similar issue, I've set it all up correctly but it doesn't work, even with your script, I don't know what to do :/
Answer by vickyfyrehart · Dec 14, 2020 at 07:17 PM
Any solutions to this issue? Nothing works, I've tried hardcoding the camera. Reinstalled. It worked 2 months ago, only when going through the Ruby 2D Adventure project. It still works on my project save for that tutorial, but never when I try to implement my knowledge to my own project. Everything else works, my character gets sorted correctly on the y-axis when behind the GameObject but not sorted correctly when in front of it on the y-axis. This issue makes me question whether I even want to try to make my game in Unity at all. ,Any solutions to this issue? Nothing works, I've tried hardcoding the camera. Reinstalled. It worked 2 months ago, only when going through the Ruby 2D Adventure project. It still works on my project save for that tutorial, but never when I try to implement my knowledge to my own project. Everything else works, my character gets sorted correctly on the y-axis when behind the GameObject but not sorted correctly when in front of it on the y-axis. This issue makes me question whether I even want to try make my game in Unity at all.
Hi, I managed to make it work this way, by hardcoding the graphic settings, after days of looking for a solution, maybe this can help
https://answers.unity.com/questions/1792262/2d-custom-sort-axis-not-working-at-all.html
Your answer
Follow this Question
Related Questions
Transparency without additive blending 1 Answer
Poor quality sprite 2D game 0 Answers
2D Lights - How to change the color of "darkness"? 0 Answers
C# 2D top down shooter game, How do I get the player to shoot towards the mouse cursor? 0 Answers
how can i anchor a point of a sprite to make it swing? 1 Answer