Skip to content

Instantly share code, notes, and snippets.

View guiMendel's full-sized avatar
🐒

Gui Mendel guiMendel

🐒
View GitHub Profile
@sinbad
sinbad / MeshRendererSortingEditor.cs
Last active October 6, 2024 16:10
Expose sorting layer in MeshRenderer inspector, for rendering on top of sprites
using UnityEngine;
using UnityEditor;
using System.Linq;
/// This just exposes the Sorting Layer / Order in MeshRenderer since it's there
/// but not displayed in the inspector. Getting MeshRenderer to render in front
/// of a SpriteRenderer is pretty hard without this.
[CustomEditor(typeof(MeshRenderer))]
public class MeshRendererSortingEditor : Editor
{