YouTube doesn't want you know this subscribers secret
Get Free YouTube Subscribers, Views and Likes

How to solve your Unity 2D sprite sorting / layer issues!

Follow
AlienBoomBoomDev

A lot more active on Twitter @IndieGameDAV

This addresses some important setting up of unity to address
unity sprite layering issues that many people have.

The promised code..


using UnityEngine;
using UnityEngine.Rendering;
using UnityEditor;
[InitializeOnLoad]
class SpriteSorter
{
static SpriteSorter()
{
Initialize();
}
[RuntimeInitializeOnLoadMethod]
static void Initialize()
{
GraphicsSettings.transparencySortMode = TransparencySortMode.CustomAxis;
GraphicsSettings.transparencySortAxis = new Vector3(0.0f, 1.0f, 1.0f);
}
}

posted by Rumburkau