Created
October 8, 2015 06:03
-
-
Save naojitaniguchi/ae456d9f49930835201c to your computer and use it in GitHub Desktop.
Unity Script for set render queue , this script works at editor mode .
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; | |
[ExecuteInEditMode] | |
public class SetRenderQueue : MonoBehaviour { | |
public int rQueue; | |
// Use this for initialization | |
void Start () { | |
GetComponent<Renderer>().material.renderQueue = rQueue; | |
Transform trans = transform; | |
for (int i = 0; i < trans.childCount; i++) | |
{ | |
transform.GetChild(i).gameObject.GetComponent<Renderer>().material.renderQueue = rQueue; | |
} | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment