Version: 2020.3

GL.wireframe

切换到手册
public static bool wireframe ;

描述

是否应在线框中进行渲染?

打开线框模式将影响调用后渲染的所有对象, 直到您再次关闭线框。在 Unity Editor 中,重绘任何窗口前始终 关闭线框模式。

注意,例如移动 (OpenGL ES) 等一些平台不支持 线框渲染。

using UnityEngine;

public class Example : MonoBehaviour { // Attach this script to a camera, this will make it render in wireframe void OnPreRender() { GL.wireframe = true; }

void OnPostRender() { GL.wireframe = false; } }