Skip to content

Instantly share code, notes, and snippets.

View juzdepeche's full-sized avatar

Justin Gagnon-Lavoie juzdepeche

  • Woodrunner Games
  • Montréal
View GitHub Profile
@sinbad
sinbad / MeshRendererSortingEditor.cs
Last active July 3, 2026 02:45
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
{
@dustingraham
dustingraham / ScriptableObjectWithId.cs
Created February 2, 2021 16:55
ScriptableObject with GUID
// Reference: https://github.com/Bunny83/UUID/blob/master/UUID.cs
using System;
using System.Collections.Generic;
using System.Globalization;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif