Skip to content

Instantly share code, notes, and snippets.

@FVSHaLuan
FVSHaLuan / SortingLayerSetter.cs
Last active October 13, 2015 07:47
**Function: Expose Sorting layer & Sorting Id in layer properties in inspector for any kind of renderer. **Usage: put SortingLayerSetterEditor.cs into any folder named Editor, add SortingLayerSetter to a GameObject with a render component attached (SpriteRenderer, MeshRenderer,...). **Disclaimer: I just extracted, learned and customized the code…
using UnityEngine;
using System.Collections;
public class SortingLayerSetter : MonoBehaviour {
}
@FVSHaLuan
FVSHaLuan / StartWithSpecificScene.cs
Last active April 26, 2017 21:34
**Function: - Add menu DoC/Start with first game scene to Unity3D editor main menus. - The menu starts playing your game from the specified scene and brings you back to the scene you were editting when stop playing
using UnityEngine;
using System.Collections;
using UnityEditor;
/* by FVS - Ha Luan */
public class StartWithSpecificScene : Editor
{
const string settingKey = "FVSHaluanStartWithSpecificScene";
const string firstScenePath = "Assets/Scenes/Login.unity";