Tanoda
PushShaderToBack.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using UnityEngine;
4
5
6[RequireComponent(typeof(MeshRenderer))]
7public class PushShaderToBack : MonoBehaviour
8{
9 public int renderQueue = 0;
10 void Start()
11 {
12 StartCoroutine(Work());
13 }
14
15 IEnumerator Work()
16 {
17 yield return new WaitForEndOfFrame();
18 GetComponent<MeshRenderer>().material.renderQueue = renderQueue;
19 }
20}