LineRenderer.SetWidth 设置宽度

function SetWidth (start : float, end : float) : void

Description描述

Set the line width at the start and at the end.

设置线的开始和结束的宽度。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Start() {
		LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>();
		lineRenderer.SetWidth(0, 3);
	}
}
// Adds a lineRenderer to this transform and
// Converts the line Renderer into a triangle.
//给这个变换添加一个线渲染器,并转换这个线渲染器为一个三角形
function Start() {
	var lineRenderer : LineRenderer = gameObject.AddComponent(LineRenderer);
	lineRenderer.SetWidth(0,3);
}
Page last updated: 2011-1-24