Created
February 20, 2014 19:23
-
-
Save bzgeb/9121281 to your computer and use it in GitHub Desktop.
Set sorting layer component. Sets the sorting layer and order of any renderer, not just sprite renderers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SetSortingLayer : MonoBehaviour | |
{ | |
public string sortingLayerName; | |
public int sortingLayerOrder; | |
void Start() { | |
renderer.sortingLayerName = sortingLayerName; | |
renderer.sortingOrder = sortingLayerOrder; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment