语言中文(简体)
  • C#

RenderingLayerMask.RenderingLayerToName

声明

public static string RenderingLayerToName(int layer);

参数

layer 提供图层索引。

返回

string 如果未找到,则返回空字符串。

说明

在提供渲染图层索引的情况下,返回 标签和图层管理器 中定义的图层名称。

using UnityEngine;
using UnityEngine.Rendering;

public class Example : MonoBehaviour { void Start() { // Prints the name of the rendering layer 1

Debug.Log(RenderingLayerMask.RenderingLayerToName(1)); } }

Did you find this page useful? Please give it a rating: