标题: 中英文对照Unity3D脚本参考手册:线渲染器 [打印本页] 作者: . 时间: 2012-10-12 10:52 标题: 中英文对照Unity3D脚本参考手册:线渲染器 线渲染器 Line Renderer
The Line Renderer takes an array of two or more points in 3D space and draws a straight line between each one. A single Line Renderer Component can thus be used to draw anything from a simple straight line, to a complex spiral. The line is always continuous; if you need to draw two or more completely separate lines, you should use multiple GameObjects, each with its own Line Renderer.
线渲染器(Line Renderer)有一个包含两个或更多3D空间中点的数组并在每两个点之间绘制平直的线。一个单独的线渲染器(Line Renderer)组件因此可以用来绘制任何东西,从一条简单的平直线到一条复杂的螺旋线。这些线一直是连续的;如果你需要绘制两条或更多完全间断的线,你需要使用多个游戏物体(GameObject),每一个都带有它们自己的线渲染器(Line Renderer)。
The Line Renderer does not render one pixel thin lines. It renders billboard lines that have width and can be textured. It uses the same algorithm for line rendering as the Trail Renderer.
线渲染器(Line Renderer)并不渲染一个像素宽的线。它渲染有宽度并可以被赋予贴图的告示板线。它使用与拖尾渲染器(TrailRenderer)相同的线渲染算法。
The Line Renderer Inspector 线渲染器检视面板
Properties 属性
Details 细节
To create a line renderer:
来创建一个线渲染器(Line Renderer):
1.Choose GameObject->Create Empty
选择菜单GameObject->Create Empty
2.Choose Component->Miscellaneous->Line Renderer
选择菜单Component->Miscellaneous->Line Renderer
3.Drag a texture or Material on the Line Renderer. It looks best if you use a particle shader in the Material.