Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetWidth(float, float)

Set the line width at the start and at the end.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
Warning
Deprecated. Use startWidth, endWidth or widthCurve instead.
public void SetWidth(float start, float end)

Parameters

start

The width at the start of the line.

The width at the end of the line.

Remarks

Examples

using UnityEngine;public class Example : MonoBehaviour{ // Adds a lineRenderer to this transform and // Converts the line Renderer into a triangle. void Start() { LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>(); lineRenderer.SetWidth(0, 3); }}