用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:gl:gl.wireframe

GL.wireframe 线框

JavaScript ⇒ public static var wireframe: bool;
C# ⇒ public static bool wireframe; ;

Description 描述

Should rendering be done in wireframe?

是否渲染线框?

Turning on wireframe mode will affect all objects rendered after the call, until you turn wireframe back off. In the Unity editor, wireframe mode is always turned off before repainting any window.

打开线框模式将影响调用以后所有渲染的对象,直到你关闭线框。在Unity编辑器,在任意窗口重绘之前,线框模式总是关闭的。

Note that some platforms, for example mobile (OpenGL ES) and Flash (Stage3D) do not support wireframe rendering.

注意默写平台,例如手机(OpenGL ES)和Flash(Stage3D)不支持线框渲染。

JavaScript:

	// Attach this script to a camera, this will make it render in wireframe
	function OnPreRender() {
		GL.wireframe = true;
	}
	function OnPostRender() {
		GL.wireframe = false;
	}

C#:

using UnityEngine;
using System.Collections;
 
public class ExampleClass : MonoBehaviour {
    void OnPreRender() {
        GL.wireframe = true;
    }
    void OnPostRender() {
        GL.wireframe = false;
    }
}

GL

script/unityengine/classes/gl/gl.wireframe.txt · 最后更改: 2016/08/02 05:24 (外部编辑)