LineRenderer.SetWidth Manual     Reference     Scripting  
Scripting > Runtime Classes > LineRenderer
LineRenderer.SetWidth

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

Description

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

JavaScripts
// 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);
}

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Start() {
LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>();
lineRenderer.SetWidth(0, 3);
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Start():
lineRenderer as LineRenderer = gameObject.AddComponent[of LineRenderer]()
lineRenderer.SetWidth(0, 3)