纳金网
标题:
开发技巧-UI分层
[打印本页]
作者:
烟雨
时间:
2018-8-17 02:13
标题:
开发技巧-UI分层
using UnityEngine;
using System.Collections;
[ExecuteInEditMode()]
public class SetRenderingLayer : MonoBehaviour
{
public string sortingLayer; //分类层
public int sortingOrder; //排序顺序
void Start()
{
this.GetComponent<Renderer>().sortingLayerName = sortingLayer;
this.GetComponent<Renderer>().sortingOrder = sortingOrder;
}
}
复制代码
欢迎光临 纳金网 (http://go.narkii.com/club/)
Powered by Discuz! X2.5