I have issues with the Lightweight Render Pipeline and the Isometric Tilemap
I want my player to be rendered infront of the object, when behind the object, if want it to be rendered behind.
You can do this with the Transparency Sort Mode, but it is disabled if I choose the Lightweight render pipeline. I need the LWRP for the sprite shader to be affected by light and the Fire which I created with the Shaker-Graph Tool
is there a workaround for using the Transparency Sort Mode with the Lightweight render pipeline?
The settings for Transparency Sort Mode do not show up with you have a Render Pipeline Asset set in Graphics Settings. As a workaround, if you are using Graphics Settings to handle the Transparency Sort Mode, you can set the Render Pipeline Asset to None, set the Transparency Sort Mode settings now that the option is there, and reset the Render Pipeline Asset. The Transparency Sort Mode settings will still be set even though the UI is gone.
Otherwise, you could try something like this script:
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;
using UnityEngine.Rendering;
#if UNITY_EDITOR
[InitializeOnLoad]
#endif
class TransparencySortGraphicsHelper
{
static TransparencySortGraphicsHelper()
{
OnLoad();
}
[RuntimeInitializeOnLoadMethod]
static void OnLoad()
{
GraphicsSettings.transparencySortMode = TransparencySortMode.CustomAxis;
GraphicsSettings.transparencySortAxis = new Vector3(0.0f, 1.0f, 0.0f);
}
}
Thanks a lot!, ChuanXin.The method to empty the asset temporarily to see the setting does not work (in 2019.1.0f2), but the script does. For other total newbies, go to to Edit > Project Settings > Graphics > Scriptable Render Pipeline Settings and empty it to test out the values you need. Then set the asset again, and make a script in your assets, name it TransparencySortGraphicsHelper, and set the values you tested out before. The script doesn’t need to be attached to anything.
While this was not part of the original question I would like to add that the same is true for the Universal Render Pipeline - to configure the Custom Sorting Axis you have to remove the asset and add it again afterwards.
(I was struggling with this myself so I hope my comment will make this solution come up in Google search for people using URP instead of the LWRP as well )
For those new to this problem. If using URP. Go to your Assets folder then Settings and in there will be the Renderer 2D data object. Select it and change the Transparency Sort settings in the Inspector. (Works for both Editor and Game view)